Rev 61 | Rev 73 | 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 | 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 | |||
10 | h266 | 25 | gamevar temp 0 2 |
26 | gamevar x 0 2 |
||
27 | gamevar y 0 2 |
||
28 | gamevar picnum 0 2 |
||
29 | |||
1 | h266 | 30 | gamevar temp2 0 2 |
31 | gamevar temp3 0 2 |
||
32 | gamevar x2 0 2 |
||
33 | gamevar y2 0 2 |
||
34 | gamevar pose 0 0 |
||
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 |
||
80 | getactor[THISACTOR].lotag temp |
||
81 | |||
82 | switch temp |
||
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 |
||
93 | getactor[THISACTOR].picnum picnum |
||
94 | switch picnum |
||
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 |
||
107 | getactor[THISACTOR].cstat temp |
||
108 | setvar temp2 0 |
||
109 | ifvarand temp 4 addvar temp2 4 |
||
110 | ifvarand temp 8 addvar temp2 8 |
||
111 | setactor[THISACTOR].cstat temp2 |
||
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 |
||
124 | getactor[THISACTOR].picnum picnum |
||
125 | switch picnum |
||
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 |
||
145 | ifvare temp3 0 |
||
146 | { |
||
25 | h266 | 147 | findnearsprite3d 1037 768 temp |
148 | ifvarn temp -1 |
||
1 | h266 | 149 | { |
150 | getactor[temp].x x2 |
||
151 | getactor[temp].y y2 |
||
152 | getactor[THISACTOR].x x |
||
153 | getactor[THISACTOR].y y // gets the coordinates of the chair and table |
||
154 | subvarvar x2 x |
||
155 | subvarvar y2 y |
||
156 | getangle temp2 x2 y2 // calculates the angle to face the table |
||
157 | setactor[THISACTOR].ang temp2 // sets the angle |
||
158 | setvar temp3 1 |
||
159 | } |
||
25 | h266 | 160 | else setvar 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 |
||
25 | h266 | 170 | setactor[THISACTOR].cstat temp2 |
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 |
||
197 | getactor[THISACTOR].picnum picnum |
||
198 | switch picnum |
||
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 |
||
255 | setvar temp2 0 |
||
256 | randvar temp2 2 |
||
257 | switch temp2 |
||
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 | { |
||
299 | getplayer[THISACTOR].gotweapon SHRINKER_WEAPON temp2 |
||
300 | getplayer[THISACTOR].gotweapon GROW_WEAPON temp |
||
301 | addammo SHRINKER_WEAPON CRYSTALAMMOAMOUNT |
||
302 | ifvare temp2 0 ifvare temp 1 setplayer[THISACTOR].gotweapon SHRINKER_WEAPON 1 |
||
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 | { |
||
324 | getplayer[THISACTOR].gotweapon SHRINKER_WEAPON temp2 |
||
325 | getplayer[THISACTOR].gotweapon GROW_WEAPON temp |
||
326 | addammo GROW_WEAPON GROWCRYSTALAMMOAMOUNT |
||
327 | ifvare temp 0 ifvare temp2 1 setplayer[THISACTOR].gotweapon GROW_WEAPON 1 |
||
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 |
||
353 | getplayer[THISACTOR].gotweapon GROW_WEAPON temp |
||
354 | addweapon SHRINKER_WEAPON 10 |
||
355 | ifvare temp 0 setplayer[THISACTOR].gotweapon GROW_WEAPON 0 |
||
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 |
||
381 | getplayer[THISACTOR].gotweapon SHRINKER_WEAPON temp |
||
382 | addweapon GROW_WEAPON 10 |
||
383 | ifvare temp 0 setplayer[THISACTOR].gotweapon SHRINKER_WEAPON 0 |
||
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 |
||
413 | getactor[THISACTOR].sectnum temp |
||
414 | getplayer[THISACTOR].cursectnum temp2 |
||
415 | ifvarvare temp temp2 |
||
416 | { |
||
417 | setuserdef[THISACTOR].volume_number 2 |
||
418 | endofgame 13 |
||
419 | } |
||
420 | enda |
||
421 | |||
422 | |||
423 | useractor notenemy TIKIGOD 0 |
||
424 | getactor[THISACTOR].cstat temp |
||
425 | ifvarand temp 16 setactor[THISACTOR].mdflags 1 |
||
426 | enda |
||
427 | |||
428 | |||
429 | onevent EVENT_ANIMATESPRITES |
||
25 | h266 | 430 | switch picnum |
431 | |||
432 | case GROWAMMO |
||
433 | // t->shade = (sintable[(totalclock<<4)&2047]>>10); |
||
434 | setvarvar temp totalclock |
||
435 | shiftvarl temp 4 |
||
436 | andvar temp 2047 |
||
437 | sin temp temp |
||
438 | shiftvarr temp 10 |
||
439 | settspr[THISACTOR].tsprshade temp |
||
440 | break |
||
441 | |||
442 | case DRAGON |
||
443 | case DRAGONDEATH |
||
444 | ifvarn temp3 -1 |
||
445 | settspr[THISACTOR].tsprang temp3 |
||
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 |
||
458 | // getplayer[THISACTOR].gm temp |
||
459 | // ifvarand temp 4 nullop else |
||
460 | // { |
||
461 | rotatesprite title_x1 title_y1 title_zoom 0 3838 0 0 0 0 0 xdim ydim |
||
462 | rotatesprite title_x2 title_y2 title_zoom 0 3839 0 0 0 0 0 xdim ydim |
||
463 | // } |
||
464 | endevent |
||
465 | |||
466 | /* |
||
467 | onevent EVENT_DISPLAYTITLE |
||
468 | rotatesprite title_x1 title_y1 title_zoom 0 3838 0 0 0 0 0 xdim ydim |
||
469 | rotatesprite title_x2 title_y2 title_zoom 0 3839 0 0 0 0 0 xdim ydim |
||
470 | endevent |
||
471 | */ |