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