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