Subversion Repositories vaca_plus

Rev

Rev 1 | Rev 17 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1 h266 1
/*
2
--------------------------------------------------------------------------------
3
Duke Caribbean: Life's A Beach
4
By Joris Weimar
5
© 1997 Sunstorm Interactive
6
--------------------------------------------------------------------------------
7
Duke Caribbean: Life's A Beach Plus
8
By Hendricks266
9
--------------------------------------------------------------------------------
10
*/
11
 
12
definegamefuncname 34 Sunglasses
13
definegamefuncname 35 Crate_of_Bananas
14
definegamefuncname 48 Hot_Sauce
15
 
16
definecheat 14 endepisode
17
definecheat 15 endlevel
18
// definecheat 23 creditcards
19
// keys
20
definecheat 25 endvolume
21
 
22
include VacaDefs.con
23
include VacaUser.con
24
include VSounds.con
25
include VBeachBall.con
26
 
27
spritenoshade GROWAMMO
28
 
29
setgamename Duke Caribbean: Life's A Beach
30
 
10 h266 31
gamevar temp 0 2
32
gamevar x 0 2
33
gamevar y 0 2
34
gamevar picnum 0 2
35
 
1 h266 36
gamevar temp2 0 2
37
gamevar temp3 0 2
38
gamevar x2 0 2
39
gamevar y2 0 2
40
gamevar pose 0 0
41
 
42
// The following gamevars disable the Polymer dynamic muzzle flashes for certain Caribbean weapons.
43
gamevar WEAPON1_FLASHCOLOR 0 1
44
gamevar WEAPON2_FLASHCOLOR 0 1
45
gamevar WEAPON3_FLASHCOLOR 0 1
46
gamevar WEAPON4_FLASHCOLOR 0 1
47
gamevar WEAPON7_FLASHCOLOR 0 1
48
gamevar WEAPON9_FLASHCOLOR 0 1
49
 
50
onevent EVENT_GETMENUTILE
51
 setvar RETURN 3281
52
endevent
53
 
54
/*
55
onevent EVENT_GETLOADTILE
56
 ifvare VOLUME 2
57
   {
58
     ifvare LEVEL 2 setvar RETURN 19665
59
     ifvare LEVEL 3 setvar RETURN 19665
60
   }
61
endevent
62
 
63
onevent EVENT_DISPLAYLOADINGSCREEN
64
 ifvare VOLUME 2
65
   {
66
     ifvare LEVEL 2 rotatesprite 160 100 65536 0 3706 0 0 2 0 0 xdim ydim
67
     ifvare LEVEL 3 rotatesprite 160 95 65536 0 3639 0 0 2 0 0 xdim ydim
68
   }
69
endevent
70
*/
71
 
72
state cutsceneambience
73
  getactor[THISACTOR].lotag temp
74
 
75
  switch temp
76
 
77
    case WIND_AMBIENCE
78
    case WIND_REPEAT
79
     setactor[THISACTOR].lotag WIND2
80
    break
81
 
82
  endswitch
83
ends
84
 
85
onevent EVENT_LOADACTOR
86
  getactor[THISACTOR].picnum picnum
87
  switch picnum
88
 
89
   case DRAGON sizeat 42 50 break
90
   case BEACHBABE1 sizeat 40 40 break
91
   case BEACHBALL sizeat 30 30 break
92
   case BEACHBATHER1 sizeat 42 40 break
93
   case SEAGULL sizeat 20 20 break
94
 
95
   case GROWSPRITEICON sizeat 28 28 break
96
 
97
   case 681 case 682 case 683 case 684 cactor CHAIR3 break
98
 
99
   case CAMERA1
100
    getactor[THISACTOR].cstat temp
101
    setvar temp2 0
102
    ifvarand temp 4 addvar temp2 4
103
    ifvarand temp 8 addvar temp2 8
104
    setactor[THISACTOR].cstat temp2
105
   break
106
 
107
   case MUSICANDSFX
108
    state cutsceneambience
109
   break
110
 
111
  endswitch
112
endevent
113
 
114
gamevar LOGO_FLAGS 767 0 // default; TEN screen reenabled
115
 
116
onevent EVENT_GAME
117
  getactor[THISACTOR].picnum picnum
118
  switch picnum
119
 
120
   case RPG
121
   case FREEZEBLAST
122
    setactor[THISACTOR].htflags 256
123
   break
124
 
125
   case FIRELASER
126
    spritepal 1
127
    setactor[THISACTOR].htflags 256
128
   break
129
 
130
/*
131
   case MUSICANDSFX
132
       ifsound WIND_AMBIENCE stopsound WIND_AMBIENCE
133
       ifsound WIND_REPEAT stopsound WIND_REPEAT
134
   break
135
*/
136
 
137
   case CHAIR3
138
     ifvare temp3 0
139
     {
140
     findnearsprite3d 1037 768 temp
141
     ifvarn temp -1
142
       {
143
          getactor[temp].x x2
144
          getactor[temp].y y2
145
          getactor[THISACTOR].x x
146
          getactor[THISACTOR].y y // gets the coordinates of the chair and table
147
          subvarvar x2 x
148
          subvarvar y2 y
149
          getangle temp2 x2 y2 // calculates the angle to face the table
150
          setactor[THISACTOR].ang temp2 // sets the angle
151
          setvar temp3 1
152
       }
153
     else setvar temp3 1
154
     }
155
   break
156
 
157
   case SHELL
158
   case SHOTGUNSHELL
159
    killit
160
   break
161
 
162
   case CAMERA1
163
      setactor[THISACTOR].cstat temp2
164
   break
165
 
166
   case SMALLSMOKE
167
      ifspawnedby RPG killit
168
   break
169
 
170
   case SHOTSPARK1
171
     ifspawnedby JIBS6 spritepal 1
172
     ifspawnedby BLOODSPLAT1 spritepal 1
173
     ifspawnedby SHOTSPARK1 spritepal 1
174
     ifspawnedby SHOTGUN spritepal 1
175
     ifspawnedby CHAINGUN spritepal 1
176
     ifspawnedby FIRELASER spritepal 1
177
     ifspawnedby APLAYER spritepal 1
178
     ifspawnedby RPG killit
179
     ifspritepal 1 setactor[THISACTOR].htflags 256 // replace with blue light placement code when available
180
   break
181
 
182
  endswitch
183
endevent
184
 
185
onevent EVENT_EGS
186
  getactor[THISACTOR].picnum picnum
187
  switch picnum
188
 
189
   case FREEZEAMMO
190
     spritepal 1
191
     spawn BLOODPOOL
192
     getlastpal
193
   break
194
 
195
   case WATERSPLASH2
196
     ifspawnedby SEAGULLSHIT spritepal 19
197
   break
198
 
199
   case GROWAMMO
200
     setactor[THISACTOR].mdflags 16
201
   break
202
 
203
  endswitch
204
endevent
205
 
206
state scrap3_colorchange
207
        ifspritepal 10 spritepal 2
208
   else ifspritepal 11 spritepal 8
209
   else ifspritepal 12 spritepal 0
210
   else ifspritepal 13 spritepal 0 // needs work
211
   else ifspritepal 14 spritepal 8
212
   else ifspritepal 15 spritepal 7 // needs work
213
   else ifspritepal 16 spritepal 1
214
   else ifspritepal 18 spritepal 0
215
   else ifspritepal 21 spritepal 2
216
   else ifspritepal 22 spritepal 8
217
   else ifspritepal 23 spritepal 7
218
   else spritepal 1 // This is so that the white SCRAP3 will turn the color of the object (chair, dragon) (approximately).
219
ends
220
 
221
onevent EVENT_KILLIT
222
 ifactor CHAIR3
223
   {
224
        state scrap3_colorchange
225
        debris SCRAP3 12
226
        getlastpal
227
        sound GLASS_HEAVYBREAK
228
        sound VENT_BUST
229
   }
230
endevent
231
 
232
// -----------------------------------------------------------------------------
233
 
234
state standard_bjibs
235
  guts JIBS2 1
236
  guts JIBS3 2
237
  guts JIBS4 3
238
  guts JIBS5 2
239
  guts JIBS6 3
240
  ifrnd 6
241
  {
242
    guts JIBS1 1
243
    spawn BLOODPOOL
244
  }         // a badly drawn spine
245
ends
246
 
247
state randgetweapsnds
248
    setvar temp2 0
249
    randvar temp2 2
250
    switch temp2
251
     case 0 globalsound DUKE_GETWEAPON1 break
252
     case 1 globalsound DUKE_GETWEAPON2 break
253
     case 2 globalsound DUKE_GETWEAPON4 break
254
    endswitch
255
ends
256
 
257
actor FIRSTGUNSPRITE
258
  fall
259
  ifmove RESPAWN_ACTOR_FLAG
260
    state respawnit
261
  else
262
    ifp pshrunk nullop
263
    else
264
      ifp palive
265
        ifpdistl RETRIEVEDISTANCE
266
          ifcount 6
267
            ifcanseetarget
268
      {
269
        ifgotweaponce 0
270
          break
271
        addweapon PISTOL_WEAPON 48
272
        quote 1118
273
        ifspawnedby FIRSTGUNSPRITE
274
          state getweaponcode
275
        else
276
          state quikweaponget
277
      }
278
enda
279
 
280
actor CRYSTALAMMO
281
  fall
282
  ifmove RESPAWN_ACTOR_FLAG
283
    state respawnit
284
  else
285
    ifp pshrunk nullop
286
    else
287
      ifp palive
288
        ifpdistl RETRIEVEDISTANCE
289
          ifcount 6
290
            ifcanseetarget
291
      {
292
        getplayer[THISACTOR].gotweapon SHRINKER_WEAPON temp2
293
        getplayer[THISACTOR].gotweapon GROW_WEAPON temp
294
        addammo SHRINKER_WEAPON CRYSTALAMMOAMOUNT
295
        ifvare temp2 0 ifvare temp 1 setplayer[THISACTOR].gotweapon SHRINKER_WEAPON 1
296
 
297
        quote 78
298
        ifspawnedby CRYSTALAMMO
299
          state getcode
300
        else
301
          state quikget
302
      }
303
enda
304
 
305
actor GROWAMMO
306
  fall
307
  ifmove RESPAWN_ACTOR_FLAG
308
    state respawnit
309
  else
310
    ifp pshrunk nullop
311
    else
312
      ifp palive
313
        ifpdistl RETRIEVEDISTANCE
314
          ifcount 6
315
            ifcanseetarget
316
      {
317
        getplayer[THISACTOR].gotweapon SHRINKER_WEAPON temp2
318
        getplayer[THISACTOR].gotweapon GROW_WEAPON temp
319
        addammo GROW_WEAPON GROWCRYSTALAMMOAMOUNT
320
        ifvare temp 0 ifvare temp2 1 setplayer[THISACTOR].gotweapon GROW_WEAPON 1
321
 
322
        quote 123
323
        ifspawnedby GROWAMMO
324
          state getcode
325
        else
326
          state quikget
327
      }
328
 
329
 
330
enda
331
 
332
actor SHRINKERSPRITE
333
  fall
334
  ifmove RESPAWN_ACTOR_FLAG
335
    state respawnit
336
  else
337
    ifp pshrunk nullop
338
    else
339
      ifp palive
340
        ifpdistl RETRIEVEDISTANCE
341
          ifcount 6
342
            ifcanseetarget
343
      {
344
        ifgotweaponce 0
345
          break
346
        getplayer[THISACTOR].gotweapon GROW_WEAPON temp
347
        addweapon SHRINKER_WEAPON 10
348
        ifvare temp 0 setplayer[THISACTOR].gotweapon GROW_WEAPON 0
349
 
350
        quote 60
351
        ifspawnedby SHRINKERSPRITE
352
          state getweaponcode
353
        else
354
          state quikweaponget
355
      }
356
enda
357
 
358
useractor notenemy GROWSPRITEICON 0
359
  fall
360
  ifspritepal 1 ifmultiplayer spritepal 0 else killit
361
 
362
  ifmove RESPAWN_ACTOR_FLAG
363
    state respawnit
364
  else
365
    ifp pshrunk nullop
366
    else
367
      ifp palive
368
        ifpdistl RETRIEVEDISTANCE
369
          ifcount 6
370
            ifcanseetarget
371
      {
372
        ifgotweaponce 0
373
          break
374
        getplayer[THISACTOR].gotweapon SHRINKER_WEAPON temp
375
        addweapon GROW_WEAPON 10
376
        ifvare temp 0 setplayer[THISACTOR].gotweapon SHRINKER_WEAPON 0
377
 
378
        quote 999
379
        ifspawnedby GROWSPRITEICON
380
          state getweaponcode
381
        else
382
          state quikweaponget
383
      }
384
enda
385
 
386
state babechecksquished
387
  ifsquished
388
  {
389
    sound SQUISHED
390
    state standard_bjibs
391
    state random_ooz
392
    killit
393
  }
394
ends
395
 
396
include VSeagull.con
397
include VDragon.con
398
include VBeachBather.con
399
include VBeachBabe.con
400
 
401
// -----------------------------------------------------------------------------
402
 
403
useractor notenemy 3831 0
404
// cstat 32768
405
 sizeat 12 13
406
 getactor[THISACTOR].sectnum temp
407
 getplayer[THISACTOR].cursectnum temp2
408
 ifvarvare temp temp2
409
   {
410
     setuserdef[THISACTOR].volume_number 2
411
     endofgame 13
412
   }
413
enda
414
 
415
 
416
useractor notenemy TIKIGOD 0 
417
     getactor[THISACTOR].cstat temp
418
     ifvarand temp 16 setactor[THISACTOR].mdflags 1
419
enda
420
 
421
 
422
onevent EVENT_ANIMATESPRITES
423
 ifactor GROWAMMO
424
   {
425
   // t->shade = (sintable[(totalclock<<4)&2047]>>10);
426
     setvarvar temp totalclock
427
     shiftvarl temp 4
428
     andvar temp 2047
429
     sin temp temp
430
     shiftvarr temp 10
431
     settspr[THISACTOR].tsprshade temp
432
   }
433
endevent
434
 
435
define title_x1 54
436
define title_x2 306
437
define title_y1 186
438
define title_y2 194
439
define title_zoom 32768
440
 
441
onevent EVENT_DISPLAYMENU
442
//  getplayer[THISACTOR].gm temp
443
//  ifvarand temp 4 nullop else
444
// {
445
  rotatesprite title_x1 title_y1 title_zoom 0 3838 0 0 0 0 0 xdim ydim
446
  rotatesprite title_x2 title_y2 title_zoom 0 3839 0 0 0 0 0 xdim ydim
447
// }
448
endevent
449
 
450
/*
451
onevent EVENT_DISPLAYTITLE
452
  rotatesprite title_x1 title_y1 title_zoom 0 3838 0 0 0 0 0 xdim ydim
453
  rotatesprite title_x2 title_y2 title_zoom 0 3839 0 0 0 0 0 xdim ydim
454
endevent
455
*/