DI-Guy SDK Documentation  13.1
diguy_dis_constants.h
Go to the documentation of this file.
1 
2 /*********************************************************************
3  ** Copyright (c) 1992-2015 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 usuable 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
196  *- - Meaning: call diguyCharacter::set_appearance() call
197  *- diguyCharacter::set_current_head_appearance() (possibly with "default"),
198  *- optionally call diguyCharacter::set_current_hand_item_appearance()
199  **
200  *i DIGUY_CUSTOM_PDU_ID_SET_CHAR_ACTION
201  **
202  *- - Contents: String A, String B, Float C
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  *- float C is optional and represent the speed modifier that force action was called with.
208  **
209  *i DIGUY_CUSTOM_PDU_ID_SET_CHAR_VISIBLE
210  **
211  *- - Contents: Long Boolean
212  **
213  *i DIGUY_CUSTOM_PDU_ID_SET_SCENARIO_FRAME
214  **
215  *- - Contents: Long val
216  *- - Meaning: call diguyScenario::set_frame_desired(val)
217  **
218  *i DIGUY_CUSTOM_PDU_ID_SET_SCENARIO_PLAYBACK_MODE
219  **
220  *- - Contents: Long val
221  *- - Meaning: call diguyScenario::set_playback_mode(val)
222  **
223  *i DIGUY_CUSTOM_PDU_ID_LOAD_SCENARIO_CAMERA
224  **
225  *- - Contents: string
226  *- - Meaning: call diguyScenario::get_scenario_camera()->load_settings(string)
227  **
228  *i DIGUY_CUSTOM_PDU_ID_RESET
229  **
230  *- - Meaning: call diguyScenario::reset()
231  **
232  *i DIGUY_CUSTOM_PDU_ID_HAIL
233  **
234  *i DIGUY_CUSTOM_PDU_ID_LOAD_SCENARIO_FILE
235  **
236  *- - Contents: string
237  *- - Meaning: call diguyScenario::load(string)
238  **
239  *i DIGUY_CUSTOM_PDU_ID_SET_CAMERA_DETAILS
240  **
241  *- Internal Use only
242  **
243  *i DIGUY_CUSTOM_PDU_ID_XC_LOAD_SCENARIO
244  **
245  *- - Contents:
246  ** - NetU16 => Target_site
247  ** - NetU16 => Target_host
248  ** - String => Filename
249  ** - String => Reference name
250  **
251  *i DIGUY_CUSTOM_PDU_ID_XC_LOAD_SCENARIO_COMPLETE
252  **
253  *- - Contents: string
254  *- - Meaning: Indicates scenario has finished loading
255  **
256  *i DIGUY_CUSTOM_PDU_ID_XC_MERGE_SCENARIO
257  **
258  *- - Contents:
259  ** - NetU16 => Target_site
260  ** - NetU16 => Target_host
261  ** - NetFlt32 => Time of Day
262  ** - NetFlt32[3] => Refx, Refy, Refz
263  ** - NetFlt32[3] => x, y, z
264  ** - NetFlt32[3] => w,r,p
265  ** - String => Filename
266  ** - String => Reference name
267  **
268  *i DIGUY_CUSTOM_PDU_ID_XC_MERGE_SCENARIO_COMPLETE
269  **
270  *- - Contents: string
271  *- - Meaning: Indicates scenario has finished loading
272  **
273  *i DIGUY_CUSTOM_PDU_ID_XC_SET_TIN_TOD
274  **
275  *- - Contents:
276  ** - NetU16 => Target_site
277  ** - NetU16 => Target_host
278  ** - NetFlt32 => Time of Day
279  *- - Meaning: call diguyScenario::set_tin_time_of_day()
280  **
281  *i DIGUY_CUSTOM_PDU_ID_XC_TIME_NOW
282  **
283  *- - Contents:
284  ** - NetFlt32 => seconds since midnight
285  ** - NetFlt32 => seconds to smooth
286  *- - Meaning: call diguyScenario::set_sync_info()
287  **
288  *i DIGUY_CUSTOM_PDU_ID_XC_CONTROL
289  **
290  *- - Contents:
291  ** - NetU16 => Target_site
292  ** - NetU16 => Target_host
293  ** - String => Command ("RUN", "STOP", "RESET", "FF", "REWIND")
294  **
295  *i DIGUY_CUSTOM_PDU_ID_XC_TRIGGER_SCRIPT
296  **
297  *- - Contents:
298  ** - NetU16 => Target_site
299  ** - NetU16 => Target_host
300  ** - String Script name
301  **
302  *i DIGUY_CUSTOM_PDU_ID_XC_EVAL_SCRIPT
303  **
304  *- - Contents:
305  ** - NetU16 => Target_site
306  ** - NetU16 => Target_host
307  ** - String => Script text
308  **
309  *i DIGUY_CUSTOM_PDU_ID_XC_SET_FF_SPEED
310  **
311  *- - Contents:
312  ** - NetU16 => Target_site
313  ** - NetU16 => Target_host
314  ** - NetFlt32 => Speed multiple
315  **
316  *i DIGUY_CUSTOM_PDU_ID_XC_TRIGGER_SIGNAL
317  **
318  *- - Contents:
319  ** - NetU16 => Target_site
320  ** - NetU16 => Target_host
321  ** - String => Signal to trigger
322  **
323  *i DIGUY_CUSTOM_PDU_ID_XC_RESET_SCENARIO
324  **
325  *- - Contents:
326  ** - NetU16 => Target_site
327  ** - NetU16 => Target_host
328  **
329  *i DIGUY_CUSTOM_PDU_ID_XC_ENTER_SLAVE_MODE
330  **
331  *- - Contents:
332  ** - NetU16 => Target_site
333  ** - NetU16 => Target_host
334  **
335  *i DIGUY_CUSTOM_PDU_ID_XC_EXIT_SLAVE_MODE
336  **
337  *- - Contents:
338  ** - NetU16 => Target_site
339  ** - NetU16 => Target_host
340  **
341  *i DIGUY_CUSTOM_PDU_ID_VARIABLE_STATE
342  **
343  *- - Contents:
344  ** - NetU16 => Target_site
345  ** - NetU16 => Target_host
346  ** - String => variable
347  ** - String => value
348  **
349  *i DIGUY_CUSTOM_PDU_ID_SAVE_SCENARIO
350  **
351  *- - Contents:
352  ** - NetU16 => Target_site
353  ** - NetU16 => Target_host
354  ** - NetU16 => use_user_name
355  ** - String => file name
356  **
357  *i DIGUY_CUSTOM_PDU_ID_SAVE_SCENARIO_COMPLETE
358  **
359  *- - Contents:
360  ** - String => file name
361  **
362  *i DIGUY_CUSTOM_PDU_ID_AI_SEND_MESSAGE_TO_CHARACTER
363  **
364  *- - Contents:
365  ** - NetU16 => Target_site
366  ** - NetU16 => Target_host
367  ** - NetU16 => target AI network number
368  ** - String => sender
369  ** - String => message_type
370  ** - String => message
371  ** - String => message_params
372  *- - Meaning: call
373  *e diguyCharacter::agent_accept_message(sender,
374  *e message_type,
375  *e message,
376  *e message_params);
377  *- on character with diguyCharacter::get_network_entity_number() == target AI network number
378  **
379  *i DIGUY_CUSTOM_PDU_ID_AI_SEND_MESSAGE_TO_GROUP
380  **
381  *- - Contents:
382  ** - String => group_name
383  ** - String => sender
384  ** - String => message_type
385  ** - String => message
386  ** - String => message_params
387  *- - Meaning: call
388  *e diguyCharacterGroup::send_message_to_all_members(sender,
389  *e message_type,
390  *e message,
391  *e message_params);
392  **
393  *i DIGUY_CUSTOM_PDU_ID_AI_BROADCAST_MESSAGE
394  **
395  *- - Contents:
396  ** - String => sender
397  ** - NetFlt32 => radius
398  ** - String => message_type
399  ** - String => message
400  ** - String => message_params
401  *- - Meaning: call
402  *e diguyCharacter::agent_broadcast_message(sender,
403  *e radius,
404  *e message_type,
405  *e message,
406  *e message_params);
407  ** Where character is the sender of message.
408  **
409  *i DIGUY_CUSTOM_PDU_ID_AI_BROADCAST_MESSAGE_TO_GROUP
410  **
411  *- - Contents:
412  ** - String => sender
413  ** - String => group_name
414  ** - NetFlt32 => radius
415  ** - String => message_type
416  ** - String => message
417  ** - String => message_params
418  *- - Meaning: call
419  *e diguyCharacter::agent_broadcast_message_to_group(group_name,
420  *e radius,
421  *e message_type,
422  *e message,
423  *e message_params);
424  ** Where character is the sender of message.
425  **
426  *i DIGUY_CUSTOM_PDU_ID_BEGIN_APPEARANCE_EFFECT
427  **
428  *- - Contents:
429  ** - String => appearance effect
430  ** - bool => flag if theres extended data
431  *- - Optional extended data:
432  ** - NetFlt32 => override scale
433  ** - NetFlt32[3] => override_offset x, y, z
434  ** - NetFlt32 => override duration
435  *- - Meaning: call
436  *e diguyCharacter::begin_appearance_effect(app_name, link_name, override_scale,
437  *e override_offset_x, override_offset_y, override_offset_z,
438  *e override_duration,
439  ** or
440  *e diguyCharacter::begin_appearance_effect(app_name);
441  **
442  *i DIGUY_CUSTOM_PDU_ID_END_APPEARANCE_EFFECT ( Gradual Stop )
443  **
444  *- - Contents:
445  *- - String => appearance_effect_name
446  ** - String => link_name
447  *- - Meaning: call
448  *e diguyCharacter::end_appearance_effect(appearance_effect_name,link_name)
449  **
450  *i DIGUY_CUSTOM_PDU_ID_STOP_APPEARANCE_EFFECT ( Instant Stop )
451  **
452  *- - Contents:
453  *- - String => appearance_effect_name
454  ** - String => link_name
455  *- - Meaning: call
456  *e diguyCharacter::stop_appearance_effect(appearance_effect_name, link_name)
457  **
458  *i DIGUY_CUSTOM_PDU_ID_SET_SCENE_OBJECT_BIT
459  **
460  *- - Contents:
461  *- - bool => true false
462  *- - Meaning: call
463  *e diguyCharacter::set_is_scene_object(value)
464  **
465  *i DIGUY_CUSTOM_PDU_ID_BROADCAST_EXERCISE_DATETIME
466  **
467  *b internal use only
468  *- - Contents:
469  ** - NetU16 => Target_site
470  ** - NetU16 => Target_host
471  ** - NetU16[7] => year, month, day, hour, minute, second, msec
472  *- - Meaning: call
473  ** bdiScenario::set_network_datetime(network_datetime);
474  **
475  *i DIGUY_CUSTOM_PDU_ID_REQUEST_EXERCISE_DATETIME_BROADCAST
476  **
477  ** Unused
478  **
479  *i DIGUY_CUSTOM_PDU_ID_SET_SHAPE_VARIATION_2
480  **
481  *- - Contents:
482  *- - complicated: a series of NetU16 ( link index ), NetU16 (shape index )
483  *- followed by a slightly compressed chunk of pixel data.
484  *- should probably only happen once per character, DI-Guy 13 adds a force
485  *- update and a version number to this PDU.
486  *-
487  *e int offset = 0;
488  *e short version = 0;
489  *e pdu->pullShort(version, offset);
490  *e
491  *e if(version != DIGUY_CUSTOM_PDU_ID_SET_SHAPE_VARIATION_VERSION){
492  *e return;
493  *e }
494  *e bool force = 0;
495  *e pdu->pullBool(force, offset);
496  *e if(character->get_has_texture_variations() && !force ){
497  *e return;
498  *e }
499  *e character->set_shape_texture_variations_no_effect(1);
500  *e
501  *e short link_index = 0;
502  *e while(pdu->pullShort(link_index, offset) == 0)
503  *e {
504  *e short shape_index = 0;
505  *e pdu->pullShort(shape_index, offset);
506  *e
507  *e bdiLink * link = character->get_link_at_index(link_index);
508  *e if(link)
509  *e {
510  *e bdiShape * shape = link->get_shape(shape_index);
511  *e if(!shape )
512  *e {
513  *e // we're done here character's don't match
514  *e break;
515  *e }
516  *e const unsigned char * data_blob = NULL;
517  *e int bytes_read;
518  *e if(pdu->pullUnsignedData(data_blob, offset, bytes_read) == 0 )
519  *e {
520  *e // note pull the data first ignore if variation is already set.
521  *e if(!shape->get_has_custom_variation() || force)
522  *e {
523  *e // special value to register that rampdata is loaded off network
524  *e shape->set_variation_index(-2);
525 
526  *e unsigned char * data_blob_copy = shape->get_unique_ramp_data();
527  *e int new_data = 0;
528  *e if(!data_blob_copy){
529  *e new_data = 1;
530  *e data_blob_copy = new unsigned char [ shape->get_unique_ramp_data_size()*4 ];
531  *e }
532  *e // fill out the 0th index with nothing (that
533  *e data_blob_copy[0] = 128;
534  *e data_blob_copy[1] = 128;
535  *e data_blob_copy[2] = 128;
536  *e data_blob_copy[3] = 255;
537  *e
538  *e int q;
539  *e for(q = 0; q < bytes_read/3; q++)
540  *e {
541  *e data_blob_copy[(q+1)*4] = data_blob[q*3];
542  *e data_blob_copy[(q+1)*4+1] = data_blob[q*3+1];
543  *e data_blob_copy[(q+1)*4+2] = data_blob[q*3+2];
544  *e data_blob_copy[(q+1)*4+3] = 255;;
545  *e }
546  *e // fill the rest of the buffer with padding
547  *e for( ; q < shape->get_unique_ramp_data_size()-1; q++)
548  *e {
549  *e data_blob_copy[(q+1)*4] = 128;
550  *e data_blob_copy[(q+1)*4+1] = 128;
551  *e data_blob_copy[(q+1)*4+2] = 128;
552  *e data_blob_copy[(q+1)*4+3] = 255;
553  *e }
554  *e if(new_data){
555  *e shape->set_unique_ramp_data(data_blob_copy);
556  *e }
557  *e else{
558  *e shape->update_variation_texture();
559  *e }
560  *e }
561  *e }
562  *e }
563  *e }
564  *e
565  **
566  *i DIGUY_CUSTOM_PDU_ID_EXECUTE_GESTURE
567  **
568  *- - Contents:
569  ** - String => gesture_name
570  ** - Long => reps
571  ** - NetFlt32 => overall_duration
572  ** - NetFlt32 => channel_A_weight
573  *- - Meaning: call
574  ** diguyCharacter::execute_gesture(gesture_name,reps, overall_duration, channel_A_weight);
575  **
576  *i DIGUY_CUSTOM_PDU_ID_CHARACTER_SCALE
577  **
578  *- - Contents:
579  ** - NetFlt32[3] => scale x,y,z
580  *- - Meaning: call
581  *- diguyCharacter::set_scale(x,y,z);
582  **
583  *i DIGUY_CUSTOM_PDU_ID_PLUGIN_RESERVED0
584  *i DIGUY_CUSTOM_PDU_ID_PLUGIN_RESERVED9
585  */
587 {
644 } ;
645 
647 
648 #endif /* __diguy_dis_constants_H */
649 
650 
651 /*********************************************************************
652  ** Copyright (c) 1992-2015 VT MAK
653  ** All rights reserved.
654  *********************************************************************/
655 
Definition: diguy_dis_constants.h:588
Definition: diguy_dis_constants.h:601
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:637
Definition: diguy_dis_constants.h:120
Definition: diguy_dis_constants.h:586
Definition: diguy_dis_constants.h:585
Definition: diguy_dis_constants.h:35
Definition: diguy_dis_constants.h:592
Definition: diguy_dis_constants.h:609
Definition: diguy_dis_constants.h:598
Definition: diguy_dis_constants.h:154
Definition: diguy_dis_constants.h:620
Definition: diguy_dis_constants.h:34
Definition: diguy_dis_constants.h:623
Definition: diguy_dis_constants.h:626
Definition: diguy_dis_constants.h:43
Definition: diguy_dis_constants.h:68
Definition: diguy_dis_constants.h:635
Definition: diguy_dis_constants.h:602
Definition: diguy_dis_constants.h:599
Definition: diguy_dis_constants.h:607
Definition: diguy_dis_constants.h:590
Definition: diguy_dis_constants.h:143
Definition: diguy_dis_constants.h:628
Definition: diguy_dis_constants.h:30
Definition: diguy_dis_constants.h:605
Definition: diguy_dis_constants.h:69
Definition: diguy_dis_constants.h:70
Definition: diguy_dis_constants.h:613
Definition: diguy_dis_constants.h:604
Definition: diguy_dis_constants.h:595
Definition: diguy_dis_constants.h:606
Definition: diguy_dis_constants.h:95
Definition: diguy_dis_constants.h:33
Definition: diguy_dis_constants.h:38
Definition: diguy_dis_constants.h:621
Definition: diguy_dis_constants.h:622
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:634
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:627
Definition: diguy_dis_constants.h:584
const int DIGUY_CUSTOM_PDU_ID_SET_SHAPE_VARIATION_VERSION
Definition: diguy_dis_constants.h:641
Definition: diguy_dis_constants.h:625
Definition: diguy_dis_constants.h:638
Definition: diguy_dis_constants.h:39
diguyCustomPDUType
This enumeration lists the message IDs for DI-Guy's custom pdus, not all are usuable outside of diguy...
Definition: diguy_dis_constants.h:581
Definition: diguy_dis_constants.h:144
Definition: diguy_dis_constants.h:121
Definition: diguy_dis_constants.h:131
Definition: diguy_dis_constants.h:614
Definition: diguy_dis_constants.h:597
Definition: diguy_dis_constants.h:631
Definition: diguy_dis_constants.h:42
Definition: diguy_dis_constants.h:587
Definition: diguy_dis_constants.h:596
Definition: diguy_dis_constants.h:82
Definition: diguy_dis_constants.h:603
Definition: diguy_dis_constants.h:610
Definition: diguy_dis_constants.h:54
Definition: diguy_dis_constants.h:55
Definition: diguy_dis_constants.h:629
Definition: diguy_dis_constants.h:108
Definition: diguy_dis_constants.h:593
Definition: diguy_dis_constants.h:617
Definition: diguy_dis_constants.h:94
Definition: diguy_dis_constants.h:616
Definition: diguy_dis_constants.h:632
Definition: diguy_dis_constants.h:583
Definition: diguy_dis_constants.h:600
Definition: diguy_dis_constants.h:636
Definition: diguy_dis_constants.h:84
Definition: diguy_dis_constants.h:630
Definition: diguy_dis_constants.h:615
Definition: diguy_dis_constants.h:619
Definition: diguy_dis_constants.h:83
Definition: diguy_dis_constants.h:624
Definition: diguy_dis_constants.h:633
Definition: diguy_dis_constants.h:594
Definition: diguy_dis_constants.h:32
Definition: diguy_dis_constants.h:611
Definition: diguy_dis_constants.h:612
Definition: diguy_dis_constants.h:618
Definition: diguy_dis_constants.h:589
Definition: diguy_dis_constants.h:591
Definition: diguy_dis_constants.h:608
Definition: diguy_dis_constants.h:41