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