-
Notifications
You must be signed in to change notification settings - Fork 0
/
seatrade.h.bak
520 lines (489 loc) · 19 KB
/
seatrade.h.bak
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
/*
* Source machine generated by GadToolsBox V2.0b
* which is (c) Copyright 1991-1993 Jaba Development
*
* GUI Designed by : JIPsoft (Joona I Palaste)
*/
#define GetString( g ) ((( struct StringInfo * )g->SpecialInfo )->Buffer )
#define GetNumber( g ) ((( struct StringInfo * )g->SpecialInfo )->LongInt )
#define GD_UL 0
#define GD_U 1
#define GD_UR 2
#define GD_L 3
#define GD_Center 4
#define GD_R 5
#define GD_DL 6
#define GD_D 7
#define GD_DR 8
#define GD_Info 9
#define GD_Dock 10
#define GD_Ships 11
#define GD_Moves 12
#define GD_Fuel 13
#define GD_Crew 14
#define GD_Food 15
#define GD_Date 16
#define GD_Money 17
#define GD_Latitude 18
#define GD_Longitude 19
#define GDX_UL 0
#define GDX_U 1
#define GDX_UR 2
#define GDX_L 3
#define GDX_Center 4
#define GDX_R 5
#define GDX_DL 6
#define GDX_D 7
#define GDX_DR 8
#define GDX_Info 9
#define GDX_Dock 10
#define GDX_Ships 11
#define GDX_Moves 12
#define GDX_Fuel 13
#define GDX_Crew 14
#define GDX_Food 15
#define GDX_Date 16
#define GDX_Money 17
#define GDX_Latitude 18
#define GDX_Longitude 19
#define GD_Name 0
#define GD_Class 1
#define GD_List 2
#define GD_Docked 3
#define GD_View 4
#define GD_Release 5
#define GD_Transfer 6
#define GDX_Name 0
#define GDX_Class 1
#define GDX_List 2
#define GDX_Docked 3
#define GDX_View 4
#define GDX_Release 5
#define GDX_Transfer 6
#define GD_Mode 0
#define GD_Items 1
#define GD_To 2
#define GD_Free 3
#define GD_Ship 4
#define GD_TransferOther 5
#define GD_TransferThis 6
#define GD_Amount 7
#define GD_HowMuch 8
#define GDX_Mode 0
#define GDX_Items 1
#define GDX_To 2
#define GDX_Free 3
#define GDX_Ship 4
#define GDX_TransferOther 5
#define GDX_TransferThis 6
#define GDX_Amount 7
#define GDX_HowMuch 8
#define GD_Welcome 0
#define GD_Coordinates 1
#define GD_CityDate 2
#define GD_CityShip 3
#define GD_Select 4
#define GD_CityMoney 5
#define GD_Sell 6
#define GD_Buy 7
#define GD_Cargo 8
#define GD_ViewCrew 9
#define GD_ViewPassengers 10
#define GD_Exit 11
#define GD_BuySell 12
#define GD_CityTransfer 13
#define GDX_Welcome 0
#define GDX_Coordinates 1
#define GDX_CityDate 2
#define GDX_CityShip 3
#define GDX_Select 4
#define GDX_CityMoney 5
#define GDX_Sell 6
#define GDX_Buy 7
#define GDX_Cargo 8
#define GDX_ViewCrew 9
#define GDX_ViewPassengers 10
#define GDX_Exit 11
#define GDX_BuySell 12
#define GDX_CityTransfer 13
#define GD_CargoName 0
#define GD_CargoShip 1
#define GD_CargoAmount 2
#define GD_CargoSpace 3
#define GD_CargoCity 4
#define GD_Price 5
#define GD_CargoSupply 6
#define GD_CargoDemand 7
#define GD_CargoHowMuch 8
#define GD_CargoBuy 9
#define GD_CargoSell 10
#define GDX_CargoName 0
#define GDX_CargoShip 1
#define GDX_CargoAmount 2
#define GDX_CargoSpace 3
#define GDX_CargoCity 4
#define GDX_Price 5
#define GDX_CargoSupply 6
#define GDX_CargoDemand 7
#define GDX_CargoHowMuch 8
#define GDX_CargoBuy 9
#define GDX_CargoSell 10
#define GD_ShipClass 0
#define GD_Weight 1
#define GD_ShipCargo 2
#define GD_Cabins 3
#define GD_Docks 4
#define GD_Speed 5
#define GD_ShipPrice 6
#define GD_ShipMoney 7
#define GD_ShipBuy 8
#define GD_Previous 9
#define GD_Next 10
#define GDX_ShipClass 0
#define GDX_Weight 1
#define GDX_ShipCargo 2
#define GDX_Cabins 3
#define GDX_Docks 4
#define GDX_Speed 5
#define GDX_ShipPrice 6
#define GDX_ShipMoney 7
#define GDX_ShipBuy 8
#define GDX_Previous 9
#define GDX_Next 10
#define GD_SelectShip 0
#define GDX_SelectShip 0
#define GD_MapLatitude 0
#define GD_MapLongitude 1
#define GDX_MapLatitude 0
#define GDX_MapLongitude 1
#define GD_PeopleShip 0
#define GD_ShipList 1
#define GD_PeopleCity 2
#define GD_CityList 3
#define GD_Move 4
#define GD_Text1 5
#define GD_Text2 6
#define GD_Text3 7
#define GD_Text4 8
#define GDX_PeopleShip 0
#define GDX_ShipList 1
#define GDX_PeopleCity 2
#define GDX_CityList 3
#define GDX_Move 4
#define GDX_Text1 5
#define GDX_Text2 6
#define GDX_Text3 7
#define GDX_Text4 8
#define SeaTrade_CNT 20
#define Info_CNT 7
#define Transfer_CNT 9
#define City_CNT 14
#define Cargo_CNT 11
#define BuyShip_CNT 11
#define Select_CNT 1
#define Map_CNT 2
#define People_CNT 9
extern struct IntuitionBase *IntuitionBase;
extern struct Library *GadToolsBase;
extern struct Screen *Scr;
extern APTR VisualInfo;
extern struct Window *SeaTradeWnd;
extern struct Window *InfoWnd;
extern struct Window *TransferWnd;
extern struct Window *CityWnd;
extern struct Window *CargoWnd;
extern struct Window *BuyShipWnd;
extern struct Window *SelectWnd;
extern struct Window *MapWnd;
extern struct Window *PeopleWnd;
extern struct Gadget *SeaTradeGList;
extern struct Gadget *InfoGList;
extern struct Gadget *TransferGList;
extern struct Gadget *CityGList;
extern struct Gadget *CargoGList;
extern struct Gadget *BuyShipGList;
extern struct Gadget *SelectGList;
extern struct Gadget *MapGList;
extern struct Gadget *PeopleGList;
extern struct Menu *SeaTradeMenus;
extern struct IntuiMessage SeaTradeMsg;
extern struct IntuiMessage InfoMsg;
extern struct IntuiMessage TransferMsg;
extern struct IntuiMessage CityMsg;
extern struct IntuiMessage CargoMsg;
extern struct IntuiMessage BuyShipMsg;
extern struct IntuiMessage SelectMsg;
extern struct IntuiMessage MapMsg;
extern struct IntuiMessage PeopleMsg;
extern struct Gadget *SeaTradeGadgets[20];
extern struct Gadget *InfoGadgets[7];
extern struct Gadget *TransferGadgets[9];
extern struct Gadget *CityGadgets[14];
extern struct Gadget *CargoGadgets[11];
extern struct Gadget *BuyShipGadgets[11];
extern struct Gadget *SelectGadgets[1];
extern struct Gadget *MapGadgets[2];
extern struct Gadget *PeopleGadgets[9];
extern UWORD SeaTradeLeft;
extern UWORD SeaTradeTop;
extern UWORD SeaTradeWidth;
extern UWORD SeaTradeHeight;
extern UWORD InfoLeft;
extern UWORD InfoTop;
extern UWORD InfoWidth;
extern UWORD InfoHeight;
extern UWORD TransferLeft;
extern UWORD TransferTop;
extern UWORD TransferWidth;
extern UWORD TransferHeight;
extern UWORD CityLeft;
extern UWORD CityTop;
extern UWORD CityWidth;
extern UWORD CityHeight;
extern UWORD CargoLeft;
extern UWORD CargoTop;
extern UWORD CargoWidth;
extern UWORD CargoHeight;
extern UWORD BuyShipLeft;
extern UWORD BuyShipTop;
extern UWORD BuyShipWidth;
extern UWORD BuyShipHeight;
extern UWORD SelectLeft;
extern UWORD SelectTop;
extern UWORD SelectWidth;
extern UWORD SelectHeight;
extern UWORD MapLeft;
extern UWORD MapTop;
extern UWORD MapWidth;
extern UWORD MapHeight;
extern UWORD PeopleLeft;
extern UWORD PeopleTop;
extern UWORD PeopleWidth;
extern UWORD PeopleHeight;
extern UBYTE *SeaTradeWdt;
extern UBYTE InfoWdt[];
extern UBYTE *TransferWdt;
extern UBYTE *CityWdt;
extern UBYTE *CargoWdt;
extern UBYTE *BuyShipWdt;
extern UBYTE *SelectWdt;
extern UBYTE *MapWdt;
extern UBYTE *PeopleWdt;
extern UBYTE *View1Labels[];
extern UBYTE *Mode2Labels[];
extern UBYTE *Ship2Labels[];
extern UBYTE *CargoName4Labels[];
extern struct MinList Ships0List;
extern struct MinList List1List;
extern struct MinList Docked1List;
extern struct MinList Items2List;
extern struct MinList Cargo3List;
extern struct MinList SelectShip6List;
extern struct MinList ShipList8List;
extern struct MinList CityList8List;
extern struct TextAttr topaz8;
extern struct NewMenu SeaTradeNewMenu[];
extern UWORD SeaTradeGTypes[];
extern UWORD InfoGTypes[];
extern UWORD TransferGTypes[];
extern UWORD CityGTypes[];
extern UWORD CargoGTypes[];
extern UWORD BuyShipGTypes[];
extern UWORD SelectGTypes[];
extern UWORD MapGTypes[];
extern UWORD PeopleGTypes[];
extern struct NewGadget SeaTradeNGad[];
extern struct NewGadget InfoNGad[];
extern struct NewGadget TransferNGad[];
extern struct NewGadget CityNGad[];
extern struct NewGadget CargoNGad[];
extern struct NewGadget BuyShipNGad[];
extern struct NewGadget SelectNGad[];
extern struct NewGadget MapNGad[];
extern struct NewGadget PeopleNGad[];
extern ULONG SeaTradeGTags[];
extern ULONG InfoGTags[];
extern ULONG TransferGTags[];
extern ULONG CityGTags[];
extern ULONG CargoGTags[];
extern ULONG BuyShipGTags[];
extern ULONG SelectGTags[];
extern ULONG MapGTags[];
extern ULONG PeopleGTags[];
extern struct ColorSpec ScreenColors[];
extern UWORD DriPens[];
extern int ULClicked( void );
extern int UClicked( void );
extern int URClicked( void );
extern int LClicked( void );
extern int CenterClicked( void );
extern int RClicked( void );
extern int DLClicked( void );
extern int DClicked( void );
extern int DRClicked( void );
extern int InfoClicked( void );
extern int DockClicked( void );
extern int ShipsClicked( void );
extern int NameClicked( void );
extern int ListClicked( void );
extern int DockedClicked( void );
extern int ViewClicked( void );
extern int ReleaseClicked( void );
extern int TransferClicked( void );
extern int ModeClicked( void );
extern int ItemsClicked( void );
extern int ShipClicked( void );
extern int TransferOtherClicked( void );
extern int TransferThisClicked( void );
extern int HowMuchClicked( void );
extern int SelectClicked( void );
extern int SellClicked( void );
extern int BuyClicked( void );
extern int CargoClicked( void );
extern int ViewCrewClicked( void );
extern int ViewPassengersClicked( void );
extern int ExitClicked( void );
extern int BuySellClicked( void );
extern int CityTransferClicked( void );
extern int CargoNameClicked( void );
extern int CargoHowMuchClicked( void );
extern int CargoBuyClicked( void );
extern int CargoSellClicked( void );
extern int ShipBuyClicked( void );
extern int PreviousClicked( void );
extern int NextClicked( void );
extern int SelectShipClicked( void );
extern int ShipListClicked( void );
extern int CityListClicked( void );
extern int MoveClicked( void );
extern int SeaTradeSave( void );
extern int SeaTradeAbout( void );
extern int SeaTradeQuit( void );
extern int SeaTradeNext( void );
extern int SeaTradePrevious( void );
extern int SeaTradeReleaseall( void );
extern int SeaTradeReleaseselect( void );
extern int SeaTradeNone( void );
extern int SeaTradeOffline( void );
extern int SeaTradeOnline( void );
extern int SeaTradeSkip( void );
extern int SeaTradeAlarms( void );
extern int SeaTradeLog( void );
extern int SeaTradeCloseLog( void );
extern int SetupScreen( void );
extern void CloseDownScreen( void );
extern void SeaTradeRender( void );
extern int HandleSeaTradeIDCMP( void );
extern int OpenSeaTradeWindow( void );
extern void CloseSeaTradeWindow( void );
extern void InfoRender( void );
extern int HandleInfoIDCMP( void );
extern int InfoCloseWindow();
extern int OpenInfoWindow( void );
extern void CloseInfoWindow( void );
extern int HandleTransferIDCMP( void );
extern int TransferCloseWindow();
extern int OpenTransferWindow( void );
extern void CloseTransferWindow( void );
extern void CityRender( void );
extern int HandleCityIDCMP( void );
extern int CityCloseWindow();
extern int OpenCityWindow( void );
extern void CloseCityWindow( void );
extern void CargoRender( void );
extern int HandleCargoIDCMP( void );
extern int CargoCloseWindow();
extern int OpenCargoWindow( void );
extern void CloseCargoWindow( void );
extern void BuyShipRender( void );
extern int HandleBuyShipIDCMP( void );
extern int BuyShipCloseWindow();
extern int OpenBuyShipWindow( void );
extern void CloseBuyShipWindow( void );
extern int HandleSelectIDCMP( void );
extern int SelectCloseWindow();
extern int OpenSelectWindow( void );
extern void CloseSelectWindow( void );
extern void MapRender( void );
extern int HandleMapIDCMP( void );
extern int MapCloseWindow();
extern int OpenMapWindow( void );
extern void CloseMapWindow( void );
extern void PeopleRender( void );
extern int HandlePeopleIDCMP( void );
extern int PeopleCloseWindow();
extern int OpenPeopleWindow( void );
extern void ClosePeopleWindow( void );
struct ship
{
struct Node node;
struct ship *next;
struct ship *prev;
struct ship *carrying[3];
struct ship *carriedby;
UBYTE name[13];
UBYTE class;
UBYTE location[3];
UBYTE flags;
UWORD cargo[12];
UBYTE crew;
UBYTE passengers;
double moves;
UWORD serialnumber;
};
struct class
{
UBYTE name[12];
UWORD weight;
UWORD engine;
UBYTE cabins;
UWORD maxcargo;
UBYTE docks;
UWORD docksize;
ULONG price;
};
struct city
{
UBYTE name[8];
UBYTE location[3];
UBYTE type;
UBYTE price[12];
UBYTE shipsmade[14];
UBYTE shipsavailable[56];
UWORD supply[12];
UWORD demand[12];
struct ship store;
};
struct citystub
{
UBYTE name[8];
UBYTE location[3];
UBYTE type;
UBYTE price[12];
UBYTE shipsmade[14];
UBYTE shipsavailable[56];
};
struct person
{
struct Node node;
struct person *next;
struct person *prev;
UBYTE name[14];
UBYTE source;
UBYTE destination;
UWORD flags;
UWORD pay;
ULONG deadline;
void *location;
};
#define CREW 0 /* crew member */
#define TOURIST 1 /* passenger, not yet taken on ship */
#define PASSENGER 2 /* passenger, taken on ship (contract fixed) */
#define FAILED 3 /* player screwed up, passenger missed his/her deadline */
#define CONTRACTMARK 0x800 /* mark for persons who have recently become
passengers */
#define FAILMARK 0x1000 /* mark for passengers who have recently become failed
passengers */
#define LOCMASK 0xFE00
#define TYPEMASK 0xF9FF
#define MARKMASK 0xE7FF