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