00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef _h_struct
00020 #define _h_struct
00021
00022 struct distress
00023 {
00024 unsigned char sender;
00025 unsigned char dam, shld, arms, wtmp, etmp, fuelp, sts;
00026 unsigned char wtmpflag, etempflag, cloakflag, distype, macroflag;
00027 unsigned char close_pl, close_en, tclose_pl, tclose_en, pre_app, i;
00028 unsigned char close_j, close_fr, tclose_j, tclose_fr;
00029 unsigned char cclist[6];
00030
00031
00032
00033 char preappend[80];
00034 };
00035
00036 struct dmacro_list
00037 {
00038 unsigned char c;
00039 char *name;
00040 char *macro;
00041 };
00042
00043 struct status
00044 {
00045 unsigned char tourn;
00046
00047 unsigned int armsbomb, planets, kills, losses, time;
00048
00049 unsigned long timeprod;
00050 };
00051
00052 enum dist_type
00053 {
00054
00055 take = 1, ogg, bomb, space_control,
00056 save_planet,
00057 base_ogg,
00058 help3, help4,
00059
00060
00061 escorting, ogging, bombing, controlling,
00062 asw,
00063 asbomb,
00064 doing3, doing4,
00065
00066
00067 free_beer,
00068
00069 no_gas,
00070 crippled,
00071
00072 pickup,
00073
00074 pop,
00075
00076 carrying,
00077 other1, other2,
00078
00079
00080 generic
00081
00082 #ifdef RCM
00083 ,rcm
00084 #endif
00085 };
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106 #define PFREE 0
00107 #define POUTFIT 1
00108 #define PALIVE 2
00109 #define PEXPLODE 3
00110 #define PDEAD 4
00111
00112 #define PFSHIELD 0x0001
00113 #define PFREPAIR 0x0002
00114 #define PFBOMB 0x0004
00115 #define PFORBIT 0x0008
00116 #define PFCLOAK 0x0010
00117 #define PFWEP 0x0020
00118 #define PFENG 0x0040
00119 #define PFROBOT 0x0080
00120 #define PFBEAMUP 0x0100
00121 #define PFBEAMDOWN 0x0200
00122 #define PFSELFDEST 0x0400
00123 #define PFGREEN 0x0800
00124 #define PFYELLOW 0x1000
00125 #define PFRED 0x2000
00126 #define PFPLOCK 0x4000
00127 #define PFPLLOCK 0x8000
00128 #define PFCOPILOT 0x10000
00129 #define PFWAR 0x20000
00130
00131 #define PFPRACTR 0x40000
00132
00133 #define PFDOCK 0x80000
00134
00135 #define PFREFIT 0x100000
00136 #define PFREFITTING 0x200000
00137
00138 #define PFTRACT 0x400000
00139 #define PFPRESS 0x800000
00140 #define PFDOCKOK 0x1000000
00141 #define PFOBSERV 0x8000000
00142
00143 #define KQUIT 0x01
00144 #define KTORP 0x02
00145 #define KPHASER 0x03
00146 #define KPLANET 0x04
00147 #define KSHIP 0x05
00148 #define KDAEMON 0x06
00149 #define KWINNER 0x07
00150 #define KGHOST 0x08
00151 #define KGENOCIDE 0x09
00152 #define KPROVIDENCE 0x0a
00153 #define KPLASMA 0x0b
00154
00155 #define TOURNEND 0x0c
00156 #define KOVER 0x0d
00157 #define TOURNSTART 0x0e
00158 #define KBADBIN 0x0f
00159
00160 #define NUM_TYPES 8
00161 #define SCOUT 0
00162 #define DESTROYER 1
00163 #define CRUISER 2
00164 #define BATTLESHIP 3
00165 #define ASSAULT 4
00166 #define STARBASE 5
00167 #define SGALAXY 6
00168 #define ATT 7
00169
00170 struct ship
00171 {
00172 short s_phaserdamage;
00173 int s_maxspeed;
00174 int s_maxfuel;
00175 int s_maxshield;
00176 int s_maxdamage;
00177 int s_maxegntemp;
00178 int s_maxwpntemp;
00179 short s_maxarmies;
00180 short s_width;
00181 short s_height;
00182 short s_type;
00183 int s_torpspeed;
00184 };
00185
00186 struct stats
00187 {
00188 double st_maxkills;
00189 int st_kills;
00190 int st_losses;
00191 int st_armsbomb;
00192 int st_planets;
00193 int st_ticks;
00194 int st_tkills;
00195 int st_tlosses;
00196 int st_tarmsbomb;
00197 int st_tplanets;
00198
00199 int st_tticks;
00200
00201 int st_sbkills;
00202 int st_sblosses;
00203 int st_sbticks;
00204 double st_sbmaxkills;
00205 long st_lastlogin;
00206 int st_flags;
00207
00208 #ifdef MOUSE_AS_SHIFT
00209 unsigned char st_keymap[480];
00210 #else
00211 unsigned char st_keymap[96];
00212 #endif
00213 int st_rank;
00214 };
00215
00216 #define ST_MAPMODE 1
00217 #define ST_NAMEMODE 2
00218 #define ST_SHOWSHIELDS 4
00219 #define ST_KEEPPEACE 8
00220 #define ST_SHOWLOCAL 16
00221 #define ST_SHOWGLOBAL 64
00222
00223 struct player
00224 {
00225 int p_no;
00226 int p_updates;
00227
00228 int p_status;
00229 unsigned int p_flags;
00230 char p_name[16];
00231 char p_login[16];
00232 char p_monitor[16];
00233 char p_mapchars[2];
00234
00235 struct ship p_ship;
00236 int p_x;
00237 int p_y;
00238 unsigned char p_dir;
00239 unsigned char p_desdir;
00240 int p_subdir;
00241
00242 int p_speed;
00243 short p_desspeed;
00244 int p_subspeed;
00245 short p_team;
00246 int p_damage;
00247 int p_subdamage;
00248 int p_shield;
00249 int p_subshield;
00250
00251 short p_cloakphase;
00252
00253 short p_ntorp;
00254 short p_nplasmatorp;
00255
00256 char p_hostile;
00257 char p_swar;
00258
00259 float p_kills;
00260 short p_planet;
00261
00262 short p_playerl;
00263
00264 #ifdef ARMY_SLIDER
00265 int p_armies;
00266 #else
00267 short p_armies;
00268 #endif
00269 int p_fuel;
00270 short p_explode;
00271
00272 int p_etemp;
00273 short p_etime;
00274 int p_wtemp;
00275 short p_wtime;
00276 short p_whydead;
00277 short p_whodead;
00278 struct stats p_stats;
00279 short p_genoplanets;
00280
00281 short p_genoarmsbomb;
00282
00283 short p_planets;
00284 short p_armsbomb;
00285 int p_ghostbuster;
00286 int p_docked;
00287
00288 int p_port[4];
00289
00290
00291
00292
00293 short p_tractor;
00294
00295 int p_pos;
00296
00297 };
00298
00299 struct statentry
00300 {
00301 char name[16], password[16];
00302 struct stats stats;
00303 };
00304
00305
00306
00307 #define TFREE 0
00308 #define TMOVE 1
00309 #define TEXPLODE 2
00310 #define TDET 3
00311 #define TOFF 4
00312 #define TSTRAIGHT 5
00313
00314
00315 struct torp
00316 {
00317 unsigned char t_status;
00318 short t_owner;
00319 char t_war;
00320 int t_x;
00321 int t_y;
00322 short t_fuse;
00323
00324 unsigned char t_updateFuse;
00325
00326 unsigned char t_dir;
00327 };
00328
00329
00330
00331
00332 #define PTFREE 0
00333 #define PTMOVE 1
00334 #define PTEXPLODE 2
00335 #define PTDET 3
00336
00337 struct plasmatorp
00338 {
00339 unsigned char pt_status;
00340 char pt_war;
00341 short pt_owner;
00342 short pt_fuse;
00343
00344 short pt_updateFuse;
00345 int pt_x;
00346 int pt_y;
00347 };
00348
00349 #define PHFREE 0x00
00350 #define PHHIT 0x01
00351 #define PHMISS 0x02
00352 #define PHHIT2 0x04
00353
00354 struct phaser
00355 {
00356 unsigned char ph_status;
00357 unsigned char ph_dir;
00358 short ph_target;
00359
00360 short ph_updateFuse;
00361 short ph_fuse;
00362 int ph_x, ph_y;
00363 };
00364
00365
00366 #ifdef RSA
00367 struct rsa_key
00368 {
00369 unsigned char client_type[KEY_SIZE];
00370 unsigned char architecture[KEY_SIZE];
00371 unsigned char global[KEY_SIZE];
00372 unsigned char public[KEY_SIZE];
00373 };
00374
00375 #endif
00376
00377
00378
00379
00380
00381
00382 #define PLREPAIR 0x010
00383 #define PLFUEL 0x020
00384 #define PLAGRI 0x040
00385 #define PLREDRAW 0x080
00386 #define PLHOME 0x100
00387
00388 #define PLCOUP 0x200
00389 #define PLCHEAP 0x400
00390
00391 #define PLCLEAR 0x800
00392
00393 struct planet
00394 {
00395 int pl_no;
00396 int pl_flags;
00397 int pl_owner;
00398 int pl_x;
00399 int pl_y;
00400 char pl_name[16];
00401 int pl_namelen;
00402 int pl_armies;
00403 int pl_info;
00404
00405 int pl_deadtime;
00406
00407 int pl_couptime;
00408
00409 };
00410
00411 #define MVALID 0x01
00412 #define MGOD 0x10
00413 #define MMOO 0x12
00414
00415 #ifdef TOOLS
00416 #define MTOOLS 0x14
00417 #endif
00418
00419
00420
00421
00422
00423
00424
00425
00426
00427 #define MINDIV 0x02
00428
00429
00430 #ifdef STDBG
00431 #define MDBG 0x20
00432 #endif
00433
00434 #define MCONFIG 0x40
00435
00436 #define MDIST 0x60
00437
00438
00439 #ifdef MULTILINE_MACROS
00440 #define MMACRO 0x80
00441 #endif
00442
00443 #define MTEAM 0x04
00444
00445 #define MTAKE 0x20
00446 #define MDEST 0x40
00447 #define MBOMB 0x60
00448 #define MCOUP1 0x80
00449 #define MCOUP2 0xA0
00450 #define MDISTR 0xC0
00451
00452
00453 #define MALL 0x08
00454
00455 #define MGENO 0x20
00456
00457
00458 #define MCONQ 0x20
00459
00460 #define MKILLA 0x40
00461 #define MKILLP 0x60
00462 #define MKILL 0x80
00463 #define MLEAVE 0xA0
00464 #define MJOIN 0xC0
00465 #define MGHOST 0xE0
00466
00467
00468 #define MWHOMSK 0x1f
00469
00470 #define MWHATMSK 0xe0
00471
00472
00473
00474
00475
00476
00477
00478
00479
00480
00481
00482
00483
00484
00485
00486
00487
00488
00489
00490
00491
00492
00493
00494
00495
00496
00497 struct message
00498 {
00499 int m_no;
00500 int m_flags;
00501 int m_time;
00502 int m_recpt;
00503 char m_data[80];
00504 };
00505
00506
00507
00508 struct mctl
00509 {
00510 int mc_current;
00511 };
00512
00513
00514
00515 #define PLANETTYPE 0x1
00516 #define PLAYERTYPE 0x2
00517
00518 struct obtype
00519 {
00520 int o_type;
00521 int o_num;
00522 };
00523
00524 struct rank
00525 {
00526 float hours, ratings, defense;
00527 char *name, *cname;
00528 };
00529
00530 struct memory
00531 {
00532 struct player players[MAXPLAYER];
00533 struct torp torps[MAXPLAYER * MAXTORP];
00534 struct plasmatorp plasmatorps[MAXPLAYER * MAXPLASMA];
00535 struct status status[1];
00536 struct planet planets[MAXPLANETS];
00537 struct phaser phasers[MAXPLAYER];
00538 struct mctl mctl[1];
00539 struct message messages[MAXMESSAGE];
00540 struct ship shipvals[NUM_TYPES];
00541 };
00542
00543 struct plupdate
00544 {
00545 int plu_update;
00546 int plu_x, plu_y;
00547 };
00548
00549 struct macro_list
00550 {
00551 int type;
00552 unsigned char key;
00553 char who;
00554 char *string;
00555 };
00556
00557
00558
00559
00560
00561
00562
00563
00564
00565
00566
00567 #define DIST_LOW ( 0 )
00568 #define DIST_MID ( 1 )
00569 #define DIST_HIGH ( 2 )
00570
00571 #define DIST_SHIELDS ( 0 )
00572 #define DIST_DAMAGE ( 1 )
00573 #define DIST_WTEMP ( 2 )
00574 #define DIST_ETEMP ( 3 )
00575 #define DIST_ARMYS ( 4 )
00576 #define DIST_FUEL ( 5 )
00577
00578 typedef struct distress_block
00579 {
00580 int min, max;
00581 int on;
00582 char *item[3];
00583 }
00584
00585 DISTRESS_DESC;
00586
00587 struct distress_list
00588 {
00589
00590 DISTRESS_DESC problem[6];
00591 };
00592
00593 #ifdef HOCKEY_LINES
00594 struct s_line
00595 {
00596 int begin_x, begin_y;
00597 int end_x, end_y;
00598
00599 int orientation;
00600 int *flag;
00601 };
00602
00603 #endif
00604
00605 struct shipdef
00606 {
00607 char *name;
00608 char *rcfile;
00609 unsigned char *keymap;
00610 unsigned char *buttonmap;
00611 unsigned char *ckeymap;
00612 };
00613
00614 #ifdef TOOLS
00615 struct key_list
00616 {
00617 unsigned char dest;
00618 char *name;
00619 };
00620
00621 #endif
00622
00623 #endif
00624
00625
00626
00627
00628
00629
00630
00631
00632
00633
00634
00635
00636
00637