Subversion Repositories vaca_plus

Rev

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