DI-Guy SDK Documentation  13.5
diguy_dis_constants.h
Go to the documentation of this file.
1 
2 /*********************************************************************
3  ** Copyright (c) 1992-2020 MAK Technologies, Inc.
4  ** All rights reserved.
5  *********************************************************************/
6 
7 /*********************************************************************
8  **
9  *t DI-Guy API, DIS Constants and Enumerations
10  **
11  ** This file contains constants defined by the DIS
12  ** networking standard. They should be compatible with
13  ** other DIS networking applications that follow the
14  ** DIS standard.
15  */
16 
17 #pragma once
18 
19 
20 /****************************************************************************/
21 /*l
22  *b Description:
23  **
24  ** Lifeform state values from an Entity State PDU.
25  **
26  ** Note that the values for sitting, squatting, crouching, and wading
27  ** don't appear to be part of the official DIS standard, but are included
28  ** for compatibility with MaK Technologies, Inc. VR-Link.
29  */
30 enum
31 {
42 
47 };
48 
49 
50 /****************************************************************************/
51 /*l
52  *b Description:
53  **
54  ** Primary weapon position values from an Entity State PDU.
55  */
56 enum
57 {
62 };
63 
64 
65 /****************************************************************************/
66 /*l
67  *b Description:
68  **
69  ** Secondary weapon position values from an Entity State PDU.
70  */
71 enum
72 {
77 };
78 
79 
80 /****************************************************************************/
81 /*l
82  *b Description:
83  **
84  ** Damage appearance values from an Entity State PDU.
85  */
86 enum
87 {
93 };
94 
95 
96 /****************************************************************************/
97 /*l
98  *b Description:
99  **
100  ** Smoke appearance values from an Entity State PDU.
101  */
102 enum
103 {
108 };
110 
111 /****************************************************************************/
112 /*l
113  *b Description:
114  **
115  ** Trailing effect values from an Entity State PDU.
116  */
117 enum
118 {
123 };
124 
125 
126 /****************************************************************************/
127 /*l
128  *b Description:
129  **
130  ** Flames appearance values from an Entity State PDU.
131  */
132 enum
133 {
136 };
137 
138 
139 /****************************************************************************/
140 /*l
141  *b Description:
142  **
143  ** Power plant status values from an Entity State PDU.
144  */
145 enum
146 {
149 };
150 
151 
152 /****************************************************************************/
153 /*l
154  *b Description:
155  **
156  ** This enumeration lists missile trail status values from an Entity
157  ** State PDU.
158  */
159 enum
160 {
163 };
164 
165 
166 /****************************************************************************/
167 /*l
168  *b Description:
169  **
170  ** This enumeration lists the Articulated part info for DI-Guy's gazing.
171  */
172 enum
173 {
174  DIGUY_DIS_FOCUS_TARGET = 10240
175 };
176 
177 
178 /****************************************************************************/
179 /*l
180  ** \enum diguyCustomPDUType
181  **
182  *b Description:
183  **
184  ** This enumeration lists the message IDs for DI-Guy's custom pdus,
185  ** not all are usable outside of diguyscenario
186  **
187  *i DIGUY_CUSTOM_PDU_ID_SET_CHAR_TYPE
188  **
189  *- - Contents: String
190  *- - Meaning: call diguyCharacter::set_character_type()
191  **
192  *i DIGUY_CUSTOM_PDU_ID_SET_CHAR_APPEARANCE
193  **
194  *- - Contents: String A, String B, String C, Float D
195  *- - Meaning: Set the character appearance to A. If strings B and C are present (either both or
196  *- neither), they set the head appearance (B) and hand item appearance (C). The final float (D)
197  *- sets the body weight ratio (valid range 0.5 - 2.0, defaults to 1.0).
198  **
199  *i DIGUY_CUSTOM_PDU_ID_SET_CHAR_ACTION
200  **
201  *- - Contents: String A, String B, [Float C, Bool D, Float E_x, Float E_y, Float E_z]
202  *- - Meaning: Set the character action to A, the second string is either "p" or ""
203  *- (the empty string). A value of "p" for the second string indicates that the
204  *- action is paused. Characters are typically paused if the sending application
205  *- such as DI-Guy Scenario has been playing and the user hits "pause" on the VCR control.
206  *- The remaining arguments are optional. Float C represents the speed modifier that force
207  *- action was called with. Bool D indicates whether the transition uses motion offsets to
208  *- reposition the character. Floats E_x, E_y, and E_z are an adjustment vector that can be
209  *- used to slide the character into position during the transition.
210  **
211  *i DIGUY_CUSTOM_PDU_ID_SET_CHAR_VISIBLE
212  **
213  *- - Contents: Long Boolean
214  **
215  *i DIGUY_CUSTOM_PDU_ID_SET_SCENARIO_FRAME
216  **
217  *- - Contents: Long val
218  *- - Meaning: call diguyScenario::set_frame_desired(val)
219  **
220  *i DIGUY_CUSTOM_PDU_ID_SET_SCENARIO_PLAYBACK_MODE
221  **
222  *- - Contents: Long val
223  *- - Meaning: call diguyScenario::set_playback_mode(val)
224  **
225  *i DIGUY_CUSTOM_PDU_ID_LOAD_SCENARIO_CAMERA
226  **
227  *- - Contents: string
228  *- - Meaning: call diguyScenario::get_scenario_camera()->load_settings(string)
229  **
230  *i DIGUY_CUSTOM_PDU_ID_RESET
231  **
232  *- - Meaning: call diguyScenario::reset()
233  **
234  *i DIGUY_CUSTOM_PDU_ID_HAIL
235  **
236  *i DIGUY_CUSTOM_PDU_ID_LOAD_SCENARIO_FILE
237  **
238  *- - Contents: string
239  *- - Meaning: call diguyScenario::load(string)
240  **
241  *i DIGUY_CUSTOM_PDU_ID_SET_CAMERA_DETAILS
242  **
243  *- Internal Use only
244  **
245  *i DIGUY_CUSTOM_PDU_ID_XC_LOAD_SCENARIO
246  **
247  *- - Contents:
248  ** - NetU16 => Target_site
249  ** - NetU16 => Target_host
250  ** - String => Filename
251  ** - String => Reference name
252  **
253  *i DIGUY_CUSTOM_PDU_ID_XC_LOAD_SCENARIO_COMPLETE
254  **
255  *- - Contents: string
256  *- - Meaning: Indicates scenario has finished loading
257  **
258  *i DIGUY_CUSTOM_PDU_ID_XC_MERGE_SCENARIO
259  **
260  *- - Contents:
261  ** - NetU16 => Target_site
262  ** - NetU16 => Target_host
263  ** - NetFlt32 => Time of Day
264  ** - NetFlt32[3] => Refx, Refy, Refz
265  ** - NetFlt32[3] => x, y, z
266  ** - NetFlt32[3] => w,r,p
267  ** - String => Filename
268  ** - String => Reference name
269  **
270  *i DIGUY_CUSTOM_PDU_ID_XC_MERGE_SCENARIO_COMPLETE
271  **
272  *- - Contents: string
273  *- - Meaning: Indicates scenario has finished loading
274  **
275  *i DIGUY_CUSTOM_PDU_ID_XC_SET_TIN_TOD
276  **
277  *- - Contents:
278  ** - NetU16 => Target_site
279  ** - NetU16 => Target_host
280  ** - NetFlt32 => Time of Day
281  *- - Meaning: call diguyScenario::set_tin_time_of_day()
282  **
283  *i DIGUY_CUSTOM_PDU_ID_XC_TIME_NOW
284  **
285  *- - Contents:
286  ** - NetFlt32 => seconds since midnight
287  ** - NetFlt32 => seconds to smooth
288  *- - Meaning: call diguyScenario::set_sync_info()
289  **
290  *i DIGUY_CUSTOM_PDU_ID_XC_CONTROL
291  **
292  *- - Contents:
293  ** - NetU16 => Target_site
294  ** - NetU16 => Target_host
295  ** - String => Command ("RUN", "STOP", "RESET", "FF", "REWIND")
296  **
297  *i DIGUY_CUSTOM_PDU_ID_XC_TRIGGER_SCRIPT
298  **
299  *- - Contents:
300  ** - NetU16 => Target_site
301  ** - NetU16 => Target_host
302  ** - String Script name
303  **
304  *i DIGUY_CUSTOM_PDU_ID_XC_EVAL_SCRIPT
305  **
306  *- - Contents:
307  ** - NetU16 => Target_site
308  ** - NetU16 => Target_host
309  ** - String => Script text
310  **
311  *i DIGUY_CUSTOM_PDU_ID_XC_SET_FF_SPEED
312  **
313  *- - Contents:
314  ** - NetU16 => Target_site
315  ** - NetU16 => Target_host
316  ** - NetFlt32 => Speed multiple
317  **
318  *i DIGUY_CUSTOM_PDU_ID_XC_TRIGGER_SIGNAL
319  **
320  *- - Contents:
321  ** - NetU16 => Target_site
322  ** - NetU16 => Target_host
323  ** - String => Signal to trigger
324  **
325  *i DIGUY_CUSTOM_PDU_ID_XC_RESET_SCENARIO
326  **
327  *- - Contents:
328  ** - NetU16 => Target_site
329  ** - NetU16 => Target_host
330  **
331  *i DIGUY_CUSTOM_PDU_ID_XC_ENTER_SLAVE_MODE
332  **
333  *- - Contents:
334  ** - NetU16 => Target_site
335  ** - NetU16 => Target_host
336  **
337  *i DIGUY_CUSTOM_PDU_ID_XC_EXIT_SLAVE_MODE
338  **
339  *- - Contents:
340  ** - NetU16 => Target_site
341  ** - NetU16 => Target_host
342  **
343  *i DIGUY_CUSTOM_PDU_ID_VARIABLE_STATE
344  **
345  *- - Contents:
346  ** - NetU16 => Target_site
347  ** - NetU16 => Target_host
348  ** - String => variable
349  ** - String => value
350  **
351  *i DIGUY_CUSTOM_PDU_ID_SAVE_SCENARIO
352  **
353  *- - Contents:
354  ** - NetU16 => Target_site
355  ** - NetU16 => Target_host
356  ** - NetU16 => use_user_name
357  ** - String => file name
358  **
359  *i DIGUY_CUSTOM_PDU_ID_SAVE_SCENARIO_COMPLETE
360  **
361  *- - Contents:
362  ** - String => file name
363  **
364  *i DIGUY_CUSTOM_PDU_ID_AI_SEND_MESSAGE_TO_CHARACTER
365  **
366  *- - Contents:
367  ** - NetU16 => Target_site
368  ** - NetU16 => Target_host
369  ** - NetU16 => target AI network number
370  ** - String => sender
371  ** - String => message_type
372  ** - String => message
373  ** - String => message_params
374  *- - Meaning: call
375  *e diguyCharacter::agent_accept_message(sender,
376  *e message_type,
377  *e message,
378  *e message_params);
379  *- on character with diguyCharacter::get_network_entity_number() == target AI network number
380  **
381  *i DIGUY_CUSTOM_PDU_ID_AI_SEND_MESSAGE_TO_GROUP
382  **
383  *- - Contents:
384  ** - String => group_name
385  ** - String => sender
386  ** - String => message_type
387  ** - String => message
388  ** - String => message_params
389  *- - Meaning: call
390  *e diguyCharacterGroup::send_message_to_all_members(sender,
391  *e message_type,
392  *e message,
393  *e message_params);
394  **
395  *i DIGUY_CUSTOM_PDU_ID_AI_BROADCAST_MESSAGE
396  **
397  *- - Contents:
398  ** - String => sender
399  ** - NetFlt32 => radius
400  ** - String => message_type
401  ** - String => message
402  ** - String => message_params
403  *- - Meaning: call
404  *e diguyCharacter::agent_broadcast_message(sender,
405  *e radius,
406  *e message_type,
407  *e message,
408  *e message_params);
409  ** Where character is the sender of message.
410  **
411  *i DIGUY_CUSTOM_PDU_ID_AI_BROADCAST_MESSAGE_TO_GROUP
412  **
413  *- - Contents:
414  ** - String => sender
415  ** - String => group_name
416  ** - NetFlt32 => radius
417  ** - String => message_type
418  ** - String => message
419  ** - String => message_params
420  *- - Meaning: call
421  *e diguyCharacter::agent_broadcast_message_to_group(group_name,
422  *e radius,
423  *e message_type,
424  *e message,
425  *e message_params);
426  ** Where character is the sender of message.
427  **
428  *i DIGUY_CUSTOM_PDU_ID_BEGIN_APPEARANCE_EFFECT
429  **
430  *- - Contents:
431  ** - String => appearance effect
432  ** - bool => flag if theres extended data
433  *- - Optional extended data:
434  ** - NetFlt32 => override scale
435  ** - NetFlt32[3] => override_offset x, y, z
436  ** - NetFlt32 => override duration
437  *- - Meaning: call
438  *e diguyCharacter::begin_appearance_effect(app_name, link_name, override_scale,
439  *e override_offset_x, override_offset_y, override_offset_z,
440  *e override_duration,
441  ** or
442  *e diguyCharacter::begin_appearance_effect(app_name);
443  **
444  *i DIGUY_CUSTOM_PDU_ID_END_APPEARANCE_EFFECT ( Gradual Stop )
445  **
446  *- - Contents:
447  *- - String => appearance_effect_name
448  ** - String => link_name
449  *- - Meaning: call
450  *e diguyCharacter::end_appearance_effect(appearance_effect_name,link_name)
451  **
452  *i DIGUY_CUSTOM_PDU_ID_STOP_APPEARANCE_EFFECT ( Instant Stop )
453  **
454  *- - Contents:
455  *- - String => appearance_effect_name
456  ** - String => link_name
457  *- - Meaning: call
458  *e diguyCharacter::stop_appearance_effect(appearance_effect_name, link_name)
459  **
460  *i DIGUY_CUSTOM_PDU_ID_SET_SCENE_OBJECT_BIT
461  **
462  *- - Contents:
463  *- - bool => true false
464  *- - Meaning: call
465  *e diguyCharacter::set_is_scene_object(value)
466  **
467  *i DIGUY_CUSTOM_PDU_ID_BROADCAST_EXERCISE_DATETIME
468  **
469  *b internal use only
470  *- - Contents:
471  ** - NetU16 => Target_site
472  ** - NetU16 => Target_host
473  ** - NetU16[7] => year, month, day, hour, minute, second, msec
474  *- - Meaning: call
475  ** bdiScenario::set_network_datetime(network_datetime);
476  **
477  *i DIGUY_CUSTOM_PDU_ID_REQUEST_EXERCISE_DATETIME_BROADCAST
478  **
479  ** Unused
480  **
481  *i DIGUY_CUSTOM_PDU_ID_SET_SHAPE_VARIATION_2
482  **
483  *- - Contents:
484  *- - complicated: a series of NetU16 ( link index ), NetU16 (shape index )
485  *- followed by a slightly compressed chunk of pixel data.
486  *- should probably only happen once per character, DI-Guy 13 adds a force
487  *- update and a version number to this PDU.
488  *-
489  *e int offset = 0;
490  *e short version = 0;
491  *e pdu->pullShort(version, offset);
492  *e
493  *e if(version != DIGUY_CUSTOM_PDU_ID_SET_SHAPE_VARIATION_VERSION){
494  *e return;
495  *e }
496  *e bool force = 0;
497  *e pdu->pullBool(force, offset);
498  *e if(character->get_has_texture_variations() && !force ){
499  *e return;
500  *e }
501  *e character->set_shape_texture_variations_no_effect(1);
502  *e
503  *e short link_index = 0;
504  *e while ( pdu->pullShort(link_index,offset) )
505  *e {
506  *e short shape_index = 0;
507  *e pdu->pullShort(shape_index, offset);
508  *e
509  *e bdiLink * link = character->get_link_at_index(link_index);
510  *e if(link)
511  *e {
512  *e bdiShape * shape = link->get_shape(shape_index);
513  *e if(!shape )
514  *e {
515  *e // we're done here character's don't match
516  *e break;
517  *e }
518  *e const unsigned char * data_blob = NULL;
519  *e int bytes_read;
520  *e if ( pdu->pullUnsignedData(data_blob, offset, bytes_read) )
521  *e {
522  *e // note pull the data first ignore if variation is already set.
523  *e if(!shape->get_has_custom_variation() || force)
524  *e {
525  *e // special value to register that rampdata is loaded off network
526  *e shape->set_variation_index(-2);
527 
528  *e unsigned char * data_blob_copy = shape->get_unique_ramp_data();
529  *e int new_data = 0;
530  *e if(!data_blob_copy){
531  *e new_data = 1;
532  *e data_blob_copy = new unsigned char [ shape->get_unique_ramp_data_size()*4 ];
533  *e }
534  *e // fill out the 0th index with nothing (that
535  *e data_blob_copy[0] = 128;
536  *e data_blob_copy[1] = 128;
537  *e data_blob_copy[2] = 128;
538  *e data_blob_copy[3] = 255;
539  *e
540  *e int q;
541  *e for(q = 0; q < bytes_read/3; q++)
542  *e {
543  *e data_blob_copy[(q+1)*4] = data_blob[q*3];
544  *e data_blob_copy[(q+1)*4+1] = data_blob[q*3+1];
545  *e data_blob_copy[(q+1)*4+2] = data_blob[q*3+2];
546  *e data_blob_copy[(q+1)*4+3] = 255;;
547  *e }
548  *e // fill the rest of the buffer with padding
549  *e for( ; q < shape->get_unique_ramp_data_size()-1; q++)
550  *e {
551  *e data_blob_copy[(q+1)*4] = 128;
552  *e data_blob_copy[(q+1)*4+1] = 128;
553  *e data_blob_copy[(q+1)*4+2] = 128;
554  *e data_blob_copy[(q+1)*4+3] = 255;
555  *e }
556  *e if(new_data){
557  *e shape->set_unique_ramp_data(data_blob_copy);
558  *e }
559  *e else{
560  *e shape->update_variation_texture();
561  *e }
562  *e }
563  *e }
564  *e }
565  *e }
566  *e
567  **
568  *i DIGUY_CUSTOM_PDU_ID_EXECUTE_GESTURE
569  **
570  *- - Contents:
571  ** - String => gesture_name
572  ** - Long => reps
573  ** - NetFlt32 => overall_duration
574  ** - NetFlt32 => channel_A_weight
575  *- - Meaning: call
576  ** diguyCharacter::execute_gesture(gesture_name,reps, overall_duration, channel_A_weight);
577  **
578  *i DIGUY_CUSTOM_PDU_ID_CHARACTER_SCALE
579  **
580  *- - Contents:
581  ** - NetFlt32[3] => scale x,y,z
582  ** - NetFlt32 => body_weight (optional added in 13.2)
583  *- - Meaning: call
584  *- diguyCharacter::set_scale(x,y,z);
585  *- if body_weight was found in pdu call
586  *- diguyCharacter::set_weight_scale(body_weight);
587  **
588  *i DIGUY_CUSTOM_PDU_ID_PLUGIN_RESERVED0
589  *i DIGUY_CUSTOM_PDU_ID_PLUGIN_RESERVED9
590  */
592 {
649 } ;
650 
Definition: diguy_dis_constants.h:592
Definition: diguy_dis_constants.h:605
Definition: diguy_dis_constants.h:30
Definition: diguy_dis_constants.h:95
Definition: diguy_dis_constants.h:131
Definition: diguy_dis_constants.h:35
Definition: diguy_dis_constants.h:96
Definition: diguy_dis_constants.h:56
Definition: diguy_dis_constants.h:641
Definition: diguy_dis_constants.h:119
Definition: diguy_dis_constants.h:590
Definition: diguy_dis_constants.h:589
Definition: diguy_dis_constants.h:34
Definition: diguy_dis_constants.h:596
Definition: diguy_dis_constants.h:613
Definition: diguy_dis_constants.h:602
Definition: diguy_dis_constants.h:153
Definition: diguy_dis_constants.h:624
Definition: diguy_dis_constants.h:33
Definition: diguy_dis_constants.h:627
Definition: diguy_dis_constants.h:630
Definition: diguy_dis_constants.h:42
Definition: diguy_dis_constants.h:67
Definition: diguy_dis_constants.h:639
Definition: diguy_dis_constants.h:606
Definition: diguy_dis_constants.h:603
Definition: diguy_dis_constants.h:611
Definition: diguy_dis_constants.h:594
Definition: diguy_dis_constants.h:142
Definition: diguy_dis_constants.h:632
Definition: diguy_dis_constants.h:29
Definition: diguy_dis_constants.h:609
Definition: diguy_dis_constants.h:68
Definition: diguy_dis_constants.h:69
Definition: diguy_dis_constants.h:617
Definition: diguy_dis_constants.h:608
Definition: diguy_dis_constants.h:599
Definition: diguy_dis_constants.h:610
Definition: diguy_dis_constants.h:94
Definition: diguy_dis_constants.h:32
Definition: diguy_dis_constants.h:37
Definition: diguy_dis_constants.h:625
Definition: diguy_dis_constants.h:626
Definition: diguy_dis_constants.h:79
Definition: diguy_dis_constants.h:108
Definition: diguy_dis_constants.h:55
Definition: diguy_dis_constants.h:106
Definition: diguy_dis_constants.h:43
Definition: diguy_dis_constants.h:638
Definition: diguy_dis_constants.h:66
Definition: diguy_dis_constants.h:109
Definition: diguy_dis_constants.h:80
Definition: diguy_dis_constants.h:36
Definition: diguy_dis_constants.h:631
Definition: diguy_dis_constants.h:588
const int DIGUY_CUSTOM_PDU_ID_SET_SHAPE_VARIATION_VERSION
Definition: diguy_dis_constants.h:645
Definition: diguy_dis_constants.h:629
Definition: diguy_dis_constants.h:642
Definition: diguy_dis_constants.h:38
diguyCustomPDUType
This enumeration lists the message IDs for DI-Guy's custom pdus, not all are usable outside of diguys...
Definition: diguy_dis_constants.h:585
Definition: diguy_dis_constants.h:143
Definition: diguy_dis_constants.h:120
Definition: diguy_dis_constants.h:130
Definition: diguy_dis_constants.h:618
Definition: diguy_dis_constants.h:601
Definition: diguy_dis_constants.h:635
Definition: diguy_dis_constants.h:41
Definition: diguy_dis_constants.h:591
Definition: diguy_dis_constants.h:600
Definition: diguy_dis_constants.h:81
Definition: diguy_dis_constants.h:607
Definition: diguy_dis_constants.h:614
Definition: diguy_dis_constants.h:53
Definition: diguy_dis_constants.h:54
Definition: diguy_dis_constants.h:633
Definition: diguy_dis_constants.h:107
Definition: diguy_dis_constants.h:597
Definition: diguy_dis_constants.h:621
Definition: diguy_dis_constants.h:93
Definition: diguy_dis_constants.h:620
Definition: diguy_dis_constants.h:636
Definition: diguy_dis_constants.h:587
Definition: diguy_dis_constants.h:604
Definition: diguy_dis_constants.h:640
Definition: diguy_dis_constants.h:83
Definition: diguy_dis_constants.h:634
Definition: diguy_dis_constants.h:619
Definition: diguy_dis_constants.h:623
Definition: diguy_dis_constants.h:82
Definition: diguy_dis_constants.h:628
Definition: diguy_dis_constants.h:637
Definition: diguy_dis_constants.h:598
Definition: diguy_dis_constants.h:31
Definition: diguy_dis_constants.h:615
Definition: diguy_dis_constants.h:616
Definition: diguy_dis_constants.h:622
Definition: diguy_dis_constants.h:593
Definition: diguy_dis_constants.h:595
Definition: diguy_dis_constants.h:612
Definition: diguy_dis_constants.h:40