diff --git a/source/games/duke/src/actors.cpp b/source/games/duke/src/actors.cpp index 3e7b5679f..2622fcc0c 100644 --- a/source/games/duke/src/actors.cpp +++ b/source/games/duke/src/actors.cpp @@ -265,7 +265,7 @@ void clearcamera(player_struct* ps) updatesector(ps->posx, ps->posy, &ps->cursectnum); setpal(ps); - int k = headspritestat[1]; + int k = headspritestat[STAT_ACTOR]; while (k >= 0) { if (sprite[k].picnum == CAMERA1) @@ -2070,4 +2070,546 @@ void camera(int i) } } +//--------------------------------------------------------------------------- +// +// taken out of moveexplosion +// +//--------------------------------------------------------------------------- + +void forcesphere(int i) +{ + spritetype* s = &sprite[i]; + auto t = &hittype[i].temp_data[0]; + int l = s->xrepeat; + if (t[1] > 0) + { + t[1]--; + if (t[1] == 0) + { + deletesprite(i); + return; + } + } + if (hittype[s->owner].temp_data[1] == 0) + { + if (t[0] < 64) + { + t[0]++; + l += 3; + } + } + else + if (t[0] > 64) + { + t[0]--; + l -= 3; + } + + s->x = sprite[s->owner].x; + s->y = sprite[s->owner].y; + s->z = sprite[s->owner].z; + s->ang += hittype[s->owner].temp_data[0]; + + if (l > 64) l = 64; + else if (l < 1) l = 1; + + s->xrepeat = l; + s->yrepeat = l; + s->shade = (l >> 1) - 48; + + for (int j = t[0]; j > 0; j--) + ssp(i, CLIPMASK0); +} + +//--------------------------------------------------------------------------- +// +// +// +//--------------------------------------------------------------------------- + +void watersplash2(int i) +{ + spritetype* s = &sprite[i]; + int sect = s->sectnum; + auto t = &hittype[i].temp_data[0]; + t[0]++; + if (t[0] == 1) + { + if (sector[sect].lotag != 1 && sector[sect].lotag != 2) + { + deletesprite(i); + return; + } + if (!S_CheckSoundPlaying(ITEM_SPLASH)) + spritesound(ITEM_SPLASH, i); + } + if (t[0] == 3) + { + t[0] = 0; + t[1]++; + } + if (t[1] == 5) + deletesprite(i); +} + +//--------------------------------------------------------------------------- +// +// +// +//--------------------------------------------------------------------------- + +void frameeffect1(int i) +{ + spritetype* s = &sprite[i]; + auto t = &hittype[i].temp_data[0]; + if (s->owner >= 0) + { + t[0]++; + + if (t[0] > 7) + { + deletesprite(i); + return; + } + else if (t[0] > 4) + s->cstat |= 512 + 2; + else if (t[0] > 2) + s->cstat |= 2; + s->xoffset = sprite[s->owner].xoffset; + s->yoffset = sprite[s->owner].yoffset; + } +} + +//--------------------------------------------------------------------------- +// +// +// +//--------------------------------------------------------------------------- + +bool money(int i, int BLOODPOOL) +{ + spritetype* s = &sprite[i]; + int sect = s->sectnum; + auto t = &hittype[i].temp_data[0]; + + s->xvel = (krand() & 7) + (sintable[hittype[i].temp_data[0] & 2047] >> 9); + hittype[i].temp_data[0] += (krand() & 63); + if ((hittype[i].temp_data[0] & 2047) > 512 && (hittype[i].temp_data[0] & 2047) < 1596) + { + if (sector[sect].lotag == 2) + { + if (s->zvel < 64) + s->zvel += (gc >> 5) + (krand() & 7); + } + else + if (s->zvel < 144) + s->zvel += (gc >> 5) + (krand() & 7); + } + + ssp(i, CLIPMASK0); + + if ((krand() & 3) == 0) + setsprite(i, s->x, s->y, s->z); + + if (s->sectnum == -1) + { + deletesprite(i); + return false; + } + int l = getflorzofslope(s->sectnum, s->x, s->y); + + if (s->z > l) + { + s->z = l; + + insertspriteq(i); + sprite[i].picnum++; + + int j = headspritestat[STAT_MISC]; + while (j >= 0) + { + if (sprite[j].picnum == BLOODPOOL) + if (ldist(s, &sprite[j]) < 348) + { + s->pal = 2; + break; + } + j = nextspritestat[j]; + } + } + return true; +} + +//--------------------------------------------------------------------------- +// +// +// +//--------------------------------------------------------------------------- + +bool jibs(int i, int JIBS6, bool timeout, bool callsetsprite, bool floorcheck, bool zcheck1, bool zcheck2) +{ + spritetype* s = &sprite[i]; + int sect = s->sectnum; + auto t = &hittype[i].temp_data[0]; + + if (s->xvel > 0) s->xvel--; + else s->xvel = 0; + + if (timeout) + { + if (t[5] < 30 * 10) + t[5]++; + else + { + deletesprite(i); + return false; + } + } + + if (s->zvel > 1024 && s->zvel < 1280) + { + setsprite(i, s->x, s->y, s->z); + sect = s->sectnum; + } + + if (callsetsprite) setsprite(i, s->x, s->y, s->z); + + int l = getflorzofslope(sect, s->x, s->y); + int x = getceilzofslope(sect, s->x, s->y); + if (x == l || sect < 0 || sect >= MAXSECTORS) + { + deletesprite(i); + return false; + } + + if (s->z < l - (2 << 8)) + { + if (t[1] < 2) t[1]++; + else if (sector[sect].lotag != 2) + { + t[1] = 0; + if (zcheck1) + { + if (t[0] > 6) t[0] = 0; + else t[0]++; + } + else + { + if (t[0] > 2) + t[0] = 0; + else t[0]++; + } + } + + if (s->zvel < 6144) + { + if (sector[sect].lotag == 2) + { + if (s->zvel < 1024) + s->zvel += 48; + else s->zvel = 1024; + } + else s->zvel += gc - 50; + } + + s->x += (s->xvel * sintable[(s->ang + 512) & 2047]) >> 14; + s->y += (s->xvel * sintable[s->ang & 2047]) >> 14; + s->z += s->zvel; + + if (floorcheck && s->z >= sector[s->sectnum].floorz) + { + deletesprite(i); + return false; + } + } + else + { + if (zcheck2) + { + deletesprite(i); + return false; + } + if (t[2] == 0) + { + if (s->sectnum == -1) + { + deletesprite(i); + return false; + } + if ((sector[s->sectnum].floorstat & 2)) + { + deletesprite(i); + return false; + } + t[2]++; + } + l = getflorzofslope(s->sectnum, s->x, s->y); + + s->z = l - (2 << 8); + s->xvel = 0; + + if (s->picnum == JIBS6) + { + t[1]++; + if ((t[1] & 3) == 0 && t[0] < 7) + t[0]++; + if (t[1] > 20) + { + deletesprite(i); + return false; + } + } + else { s->picnum = JIBS6; t[0] = 0; t[1] = 0; } + } + return true; +} + +//--------------------------------------------------------------------------- +// +// +// +//--------------------------------------------------------------------------- + +bool bloodpool(int i, bool puke, int TIRE) +{ + spritetype* s = &sprite[i]; + int sect = s->sectnum; + auto t = &hittype[i].temp_data[0]; + + if (t[0] == 0) + { + t[0] = 1; + if (sector[sect].floorstat & 2) + { + deletesprite(i); + return false; + } + else insertspriteq(i); + } + + makeitfall(i); + + int x; + int p = findplayer(s, &x); + + s->z = hittype[i].floorz - (FOURSLEIGHT); + + if (t[2] < 32) + { + t[2]++; + if (hittype[i].picnum == TIRE) + { + if (s->xrepeat < 64 && s->yrepeat < 64) + { + s->xrepeat += krand() & 3; + s->yrepeat += krand() & 3; + } + } + else + { + if (s->xrepeat < 32 && s->yrepeat < 32) + { + s->xrepeat += krand() & 3; + s->yrepeat += krand() & 3; + } + } + } + + if (x < 844 && s->xrepeat > 6 && s->yrepeat > 6) + { + if (s->pal == 0 && (krand() & 255) < 16 && !puke) + { + if (ps[p].boot_amount > 0) + ps[p].boot_amount--; + else + { + if (!S_CheckSoundPlaying(DUKE_LONGTERM_PAIN)) + spritesound(DUKE_LONGTERM_PAIN, ps[p].i); + sprite[ps[p].i].extra--; + SetPlayerPal(&ps[p], PalEntry(32, 16, 0, 0)); + } + } + + if (t[1] == 1) return false; + t[1] = 1; + + if (hittype[i].picnum == TIRE) + ps[p].footprintcount = 10; + else ps[p].footprintcount = 3; + + ps[p].footprintpal = s->pal; + ps[p].footprintshade = s->shade; + + if (t[2] == 32) + { + s->xrepeat -= 6; + s->yrepeat -= 6; + } + } + else t[1] = 0; + return true; +} + +//--------------------------------------------------------------------------- +// +// +// +//--------------------------------------------------------------------------- + +void shell(int i, bool morecheck) +{ + spritetype* s = &sprite[i]; + int sect = s->sectnum; + auto t = &hittype[i].temp_data[0]; + + ssp(i, CLIPMASK0); + + if (sect < 0 || morecheck) + { + deletesprite(i); + return; + } + + if (sector[sect].lotag == 2) + { + t[1]++; + if (t[1] > 8) + { + t[1] = 0; + t[0]++; + t[0] &= 3; + } + if (s->zvel < 128) s->zvel += (gc / 13); // 8 + else s->zvel -= 64; + if (s->xvel > 0) + s->xvel -= 4; + else s->xvel = 0; + } + else + { + t[1]++; + if (t[1] > 3) + { + t[1] = 0; + t[0]++; + t[0] &= 3; + } + if (s->zvel < 512) s->zvel += (gc / 3); // 52; + if (s->xvel > 0) + s->xvel--; + else + { + deletesprite(i); + } + } +} + +//--------------------------------------------------------------------------- +// +// +// +//--------------------------------------------------------------------------- + +void glasspieces(int i) +{ + spritetype* s = &sprite[i]; + int sect = s->sectnum; + auto t = &hittype[i].temp_data[0]; + + makeitfall(i); + + if (s->zvel > 4096) s->zvel = 4096; + if (sect < 0) + { + deletesprite(i); + return; + } + + if (s->z == hittype[i].floorz - (FOURSLEIGHT) && t[0] < 3) + { + s->zvel = -((3 - t[0]) << 8) - (krand() & 511); + if (sector[sect].lotag == 2) + s->zvel >>= 1; + s->xrepeat >>= 1; + s->yrepeat >>= 1; + if (rnd(96)) + setsprite(i, s->x, s->y, s->z); + t[0]++;//Number of bounces + } + else if (t[0] == 3) + { + deletesprite(i); + return; + } + + if (s->xvel > 0) + { + s->xvel -= 2; + s->cstat = ((s->xvel & 3) << 2); + } + else s->xvel = 0; + + ssp(i, CLIPMASK0); +} + +//--------------------------------------------------------------------------- +// +// +// +//--------------------------------------------------------------------------- + +void scrap(int i, int SCRAP1, int SCRAP6) +{ + spritetype* s = &sprite[i]; + int sect = s->sectnum; + auto t = &hittype[i].temp_data[0]; + + if (s->xvel > 0) + s->xvel--; + else s->xvel = 0; + + if (s->zvel > 1024 && s->zvel < 1280) + { + setsprite(i, s->x, s->y, s->z); + sect = s->sectnum; + } + + if (s->z < sector[sect].floorz - (2 << 8)) + { + if (t[1] < 1) t[1]++; + else + { + t[1] = 0; + + if (s->picnum < SCRAP6 + 8) + { + if (t[0] > 6) + t[0] = 0; + else t[0]++; + } + else + { + if (t[0] > 2) + t[0] = 0; + else t[0]++; + } + } + if (s->zvel < 4096) s->zvel += gc - 50; + s->x += (s->xvel * sintable[(s->ang + 512) & 2047]) >> 14; + s->y += (s->xvel * sintable[s->ang & 2047]) >> 14; + s->z += s->zvel; + } + else + { + if (s->picnum == SCRAP1 && s->yvel > 0) + { + int j = spawn(i, s->yvel); + setsprite(j, s->x, s->y, s->z); + getglobalz(j); + sprite[j].hitag = sprite[j].lotag = 0; + } + deletesprite(i); + } +} + END_DUKE_NS diff --git a/source/games/duke/src/actors.h b/source/games/duke/src/actors.h index d423575e7..1a00b5dbb 100644 --- a/source/games/duke/src/actors.h +++ b/source/games/duke/src/actors.h @@ -336,6 +336,7 @@ ACTOR_INLINE int A_CheckEnemyTile(int const tileNum) } int ssp(short i, unsigned int cliptype); //The set sprite function +void insertspriteq(int i); ACTOR_INLINE int A_SetSprite(int const spriteNum, uint32_t cliptype) { @@ -396,6 +397,15 @@ void recon(int i, int explosion, int firelaser, int attacksnd, int painsnd, int void ooz(int i); void reactor(int i, int REACTOR, int REACTOR2, int REACTORBURNT, int REACTOR2BURNT); void camera(int i); +void forcesphere(int i); +void watersplash2(int i); +void frameeffect1(int i); +bool money(int i, int BLOODPOOL); +bool jibs(int i, int JIBS6, bool timeout, bool callsetsprite, bool floorcheck, bool zcheck1, bool zcheck2); +bool bloodpool(int i, bool puke, int TIRE); +void shell(int i, bool morecheck); +void glasspieces(int i); +void scrap(int i, int SCRAP1, int SCRAP6); void respawn_rrra(int i, int j); diff --git a/source/games/duke/src/actors_d.cpp b/source/games/duke/src/actors_d.cpp index 47f01dae9..05cc71174 100644 --- a/source/games/duke/src/actors_d.cpp +++ b/source/games/duke/src/actors_d.cpp @@ -3154,5 +3154,191 @@ void moveactors_d(void) } +//--------------------------------------------------------------------------- +// +// +// +//--------------------------------------------------------------------------- + +void moveexplosions_d(void) // STATNUM 5 +{ + int nexti, sect, p; + int x, * t; + spritetype* s; + + + for (int i = headspritestat[STAT_MISC]; i >= 0; i = nexti) + { + nexti = nextspritestat[i]; + + t = &hittype[i].temp_data[0]; + s = &sprite[i]; + sect = s->sectnum; + + if (sect < 0 || s->xrepeat == 0) + { + deletesprite(i); + continue; + } + + hittype[i].bposx = s->x; + hittype[i].bposy = s->y; + hittype[i].bposz = s->z; + + switch (s->picnum) + { + case NEON1: + case NEON2: + case NEON3: + case NEON4: + case NEON5: + case NEON6: + + if ((global_random / (s->lotag + 1) & 31) > 4) s->shade = -127; + else s->shade = 127; + continue; + + case BLOODSPLAT1: + case BLOODSPLAT2: + case BLOODSPLAT3: + case BLOODSPLAT4: + + if (t[0] == 7 * 26) continue; + s->z += 16 + (krand() & 15); + t[0]++; + if ((t[0] % 9) == 0) s->yrepeat++; + continue; + + case NUKEBUTTON: + case NUKEBUTTON + 1: + case NUKEBUTTON + 2: + case NUKEBUTTON + 3: + + if (t[0]) + { + t[0]++; + if (t[0] == 8) s->picnum = NUKEBUTTON + 1; + else if (t[0] == 16) + { + s->picnum = NUKEBUTTON + 2; + ps[sprite[s->owner].yvel].fist_incs = 1; + } + if (ps[sprite[s->owner].yvel].fist_incs == 26) + s->picnum = NUKEBUTTON + 3; + } + continue; + + case FORCESPHERE: + forcesphere(i); + continue; + case WATERSPLASH2: + watersplash2(i); + continue; + + case FRAMEEFFECT1: + frameeffect1(i); + continue; + case INNERJAW: + case INNERJAW + 1: + + p = findplayer(s, &x); + if (x < 512) + { + SetPlayerPal(&ps[p], PalEntry(32, 32, 0, 0)); + sprite[ps[p].i].extra -= 4; + } + + case FIRELASER: + if (s->extra != 999) + s->extra = 999; + else + { + deletesprite(i); + continue; + } + break; + case TONGUE: + deletesprite(i); + continue; + case MONEY + 1: + case MAIL + 1: + case PAPER + 1: + hittype[i].floorz = s->z = getflorzofslope(s->sectnum, s->x, s->y); + break; + case MONEY: + case MAIL: + case PAPER: + money(i, BLOODPOOL); + + break; + + case JIBS1: + case JIBS2: + case JIBS3: + case JIBS4: + case JIBS5: + case JIBS6: + case HEADJIB1: + case ARMJIB1: + case LEGJIB1: + case LIZMANHEAD1: + case LIZMANARM1: + case LIZMANLEG1: + case DUKETORSO: + case DUKEGUN: + case DUKELEG: + jibs(i, JIBS6, true, false, false, s->picnum == DUKELEG || s->picnum == DUKETORSO || s->picnum == DUKEGUN, false); + + continue; + case BLOODPOOL: + case PUKE: + bloodpool(i, s->picnum == PUKE, TIRE); + + continue; + + case LAVAPOOL: + case ONFIRE: + case BURNEDCORPSE: + case LAVAPOOLBUBBLE: + case WHISPYSMOKE: + if (!isWorldTour()) + continue; + + case BURNING: + case BURNING2: + case FECES: + case WATERBUBBLE: + case SMALLSMOKE: + case EXPLOSION2: + case SHRINKEREXPLOSION: + case EXPLOSION2BOT: + case BLOOD: + case LASERSITE: + case FORCERIPPLE: + case TRANSPORTERSTAR: + case TRANSPORTERBEAM: + p = findplayer(s, &x); + execute(i, p, x); + continue; + + case SHELL: + case SHOTGUNSHELL: + shell(i, (sector[sect].floorz + (24 << 8)) < s->z); + continue; + + case GLASSPIECES: + case GLASSPIECES + 1: + case GLASSPIECES + 2: + glasspieces(i); + continue; + } + + if (s->picnum >= SCRAP6 && s->picnum <= SCRAP5 + 3) + { + scrap(i, SCRAP1, SCRAP6); + } + } +} + END_DUKE_NS diff --git a/source/games/duke/src/actors_r.cpp b/source/games/duke/src/actors_r.cpp index d9f588539..fad0798d4 100644 --- a/source/games/duke/src/actors_r.cpp +++ b/source/games/duke/src/actors_r.cpp @@ -2969,6 +2969,7 @@ static int henstand(int i) } return 0; } + //--------------------------------------------------------------------------- // // @@ -3253,5 +3254,244 @@ void moveactors_r(void) } +//--------------------------------------------------------------------------- +// +// +// +//--------------------------------------------------------------------------- + +void moveexplosions_r(void) // STATNUM 5 +{ + int nexti, sect, p; + int x, * t; + spritetype* s; + + + for (int i = headspritestat[STAT_MISC]; i >= 0; i = nexti) + { + nexti = nextspritestat[i]; + + t = &hittype[i].temp_data[0]; + s = &sprite[i]; + sect = s->sectnum; + + if (sect < 0 || s->xrepeat == 0) + { + deletesprite(i); + continue; + } + + hittype[i].bposx = s->x; + hittype[i].bposy = s->y; + hittype[i].bposz = s->z; + + switch (s->picnum) + { + case SHOTGUNSPRITE: + if (sector[s->sectnum].lotag == 800) + if (s->z >= sector[s->sectnum].floorz - (8 << 8)) + { + deletesprite(i); + continue; + } + break; + case NEON1: + case NEON2: + case NEON3: + case NEON4: + case NEON5: + case NEON6: + + if ((global_random / (s->lotag + 1) & 31) > 4) s->shade = -127; + else s->shade = 127; + continue; + + case BLOODSPLAT1: + case BLOODSPLAT2: + case BLOODSPLAT3: + case BLOODSPLAT4: + + if (t[0] == 7 * 26) continue; + s->z += 16 + (krand() & 15); + t[0]++; + if ((t[0] % 9) == 0) s->yrepeat++; + continue; + + + case FORCESPHERE: + forcesphere(i); + continue; + + case MUD: + + t[0]++; + if (t[0] == 1) + { + if (sector[sect].floorpicnum != 3073) + { + deletesprite(i); + continue; + } + if (S_CheckSoundPlaying(22)) + spritesound(22, i); + } + if (t[0] == 3) + { + t[0] = 0; + t[1]++; + } + if (t[1] == 5) + deletesprite(i); + continue; + + case WATERSPLASH2: + watersplash2(i); + continue; + + case FRAMEEFFECT1: + frameeffect1(i); + continue; + case INNERJAW: + case INNERJAW + 1: + + p = findplayer(s, &x); + if (x < 512) + { + SetPlayerPal(&ps[p], PalEntry(32, 32, 0, 0)); + sprite[ps[p].i].extra -= 4; + } + + case COOLEXPLOSION1: + case FIRELASER: + case OWHIP: + case UWHIP: + if (s->extra != 999) + s->extra = 999; + else + { + deletesprite(i); + continue; + } + break; + case TONGUE: + deletesprite(i); + continue; + case MONEY + 1: + hittype[i].floorz = s->z = getflorzofslope(s->sectnum, s->x, s->y); + if (sector[s->sectnum].lotag == 800) + { + deletesprite(i); + continue; + } + break; + case MONEY: + if (!money(i, BLOODPOOL)) continue; + + if (sector[s->sectnum].lotag == 800) + if (s->z >= sector[s->sectnum].floorz - (8 << 8)) + { + deletesprite(i); + continue; + } + + break; + + case RRTILE2460: + case RRTILE2465: + case BIKEJIBA: + case BIKEJIBB: + case BIKEJIBC: + case BIKERJIBA: + case BIKERJIBB: + case BIKERJIBC: + case BIKERJIBD: + case CHEERJIBA: + case CHEERJIBB: + case CHEERJIBC: + case CHEERJIBD: + case FBOATJIBA: + case FBOATJIBB: + case RABBITJIBA: + case RABBITJIBB: + case RABBITJIBC: + case MAMAJIBA: + case MAMAJIBB: + if (!isRRRA()) break; + + case BILLYJIBA: + case BILLYJIBB: + case HULKJIBA: + case HULKJIBB: + case HULKJIBC: + case MINJIBA: + case MINJIBB: + case MINJIBC: + case COOTJIBA: + case COOTJIBB: + case COOTJIBC: + case JIBS1: + case JIBS2: + case JIBS3: + case JIBS4: + case JIBS5: + case JIBS6: + case DUKETORSO: + case DUKEGUN: + case DUKELEG: + if (!jibs(i, JIBS6, false, true, true, s->picnum == DUKELEG || s->picnum == DUKETORSO || s->picnum == DUKEGUN, + isRRRA() && (s->picnum == RRTILE2465 || s->picnum == RRTILE2560))) continue; + + if (sector[s->sectnum].lotag == 800) + if (s->z >= sector[s->sectnum].floorz - (8 << 8)) + { + deletesprite(i); + continue; + } + + continue; + + case BLOODPOOL: + if (!bloodpool(i, false, TIRE)) continue; + + if (sector[s->sectnum].lotag == 800) + if (s->z >= sector[s->sectnum].floorz - (8 << 8)) + { + deletesprite(i); + } + continue; + + case BURNING: + case WATERBUBBLE: + case SMALLSMOKE: + case EXPLOSION2: + case EXPLOSION3: + case BLOOD: + case FORCERIPPLE: + case TRANSPORTERSTAR: + case TRANSPORTERBEAM: + p = findplayer(s, &x); + execute(i, p, x); + continue; + + case SHELL: + case SHOTGUNSHELL: + shell(i, false); + continue; + + case GLASSPIECES: + case GLASSPIECES + 1: + case GLASSPIECES + 2: + case POPCORN: + glasspieces(i); + continue; + } + + if (s->picnum >= SCRAP6 && s->picnum <= SCRAP5 + 3) + { + scrap(i, SCRAP1, SCRAP6); + } + } +} + END_DUKE_NS diff --git a/source/games/duke/src/e_actors.cpp b/source/games/duke/src/e_actors.cpp index f80d7cf18..4190fdd1a 100644 --- a/source/games/duke/src/e_actors.cpp +++ b/source/games/duke/src/e_actors.cpp @@ -389,664 +389,6 @@ static void Proj_BounceOffWall(spritetype *s, int j) } -ACTOR_STATIC void G_MoveMisc(void) // STATNUM 5 -{ - int spriteNum = headspritestat[STAT_MISC]; - - while (spriteNum >= 0) - { - int const nextSprite = nextspritestat[spriteNum]; - int32_t playerDist; - int32_t *const pData = actor[spriteNum].t_data; - spritetype *const pSprite = &sprite[spriteNum]; - int sectNum = pSprite->sectnum; // XXX: not const - int switchPic; - - if (sectNum < 0 || pSprite->xrepeat == 0) - DELETE_SPRITE_AND_CONTINUE(spriteNum); - - Bmemcpy(&actor[spriteNum].bpos, pSprite, sizeof(vec3_t)); - - switchPic = pSprite->picnum; - - if (!RR && pSprite->picnum > TILE_NUKEBUTTON && pSprite->picnum <= TILE_NUKEBUTTON+3) - switchPic = TILE_NUKEBUTTON; - - if (pSprite->picnum > TILE_GLASSPIECES && pSprite->picnum <= TILE_GLASSPIECES+2) - switchPic = TILE_GLASSPIECES; - - if (pSprite->picnum == TILE_INNERJAW+1) - switchPic--; - - if ((pSprite->picnum == TILE_MONEY+1) || (!RR && (pSprite->picnum == TILE_MAIL+1 || pSprite->picnum == TILE_PAPER+1))) - { - actor[spriteNum].floorz = pSprite->z = getflorzofslope(pSprite->sectnum,pSprite->x,pSprite->y); - if (RR && sector[pSprite->sectnum].lotag == 800) - DELETE_SPRITE_AND_CONTINUE(spriteNum); - } - else switch (DYNAMICTILEMAP(switchPic)) - { - //case APLAYER__STATIC: pSprite->cstat = 32768; goto next_sprite; - - case SHOTGUNSPRITE__STATIC: - if (!RR) break; - if (sector[pSprite->sectnum].lotag == 800 && pSprite->z >= sector[pSprite->sectnum].floorz - ZOFFSET3) - DELETE_SPRITE_AND_CONTINUE(spriteNum); - break; - - case NEON1__STATIC: - case NEON2__STATIC: - case NEON3__STATIC: - case NEON4__STATIC: - case NEON5__STATIC: - case NEON6__STATIC: - pSprite->shade = ((tabledivide32_noinline(g_globalRandom, pSprite->lotag + 1) & 31) > 4) ? -127 : 127; - goto next_sprite; - - case BLOODSPLAT1__STATIC: - case BLOODSPLAT2__STATIC: - case BLOODSPLAT3__STATIC: - case BLOODSPLAT4__STATIC: - if (pData[0] == 7 * GAMETICSPERSEC) - goto next_sprite; - - pSprite->z += 16 + (krand2() & 15); - - if ((++pData[0] % 9) == 0) - pSprite->yrepeat++; - - - goto next_sprite; - - case NUKEBUTTON__STATIC: - // case TILE_NUKEBUTTON+1: - // case TILE_NUKEBUTTON+2: - // case TILE_NUKEBUTTON+3: - - if (RR) break; - - if (pData[0]) - { - pData[0]++; - if (pData[0] == 8) - pSprite->picnum = TILE_NUKEBUTTON + 1; - else if (pData[0] == 16) - { - pSprite->picnum = TILE_NUKEBUTTON + 2; - g_player[P_Get(pSprite->owner)].ps->fist_incs = 1; - } - if (g_player[P_Get(pSprite->owner)].ps->fist_incs == GAMETICSPERSEC) - pSprite->picnum = TILE_NUKEBUTTON + 3; - } - goto next_sprite; - - case FORCESPHERE__STATIC: - { - int forceRepeat = pSprite->xrepeat; - if (pData[1] > 0) - { - pData[1]--; - if (pData[1] == 0) - DELETE_SPRITE_AND_CONTINUE(spriteNum); - } - if (actor[pSprite->owner].t_data[1] == 0) - { - if (pData[0] < 64) - { - pData[0]++; - forceRepeat += 3; - } - } - else if (pData[0] > 64) - { - pData[0]--; - forceRepeat -= 3; - } - - *(vec3_t *)pSprite = *(vec3_t *)&sprite[pSprite->owner]; - pSprite->ang += actor[pSprite->owner].t_data[0]; - - forceRepeat = clamp2(forceRepeat, 1, 64); - pSprite->xrepeat = forceRepeat; - pSprite->yrepeat = forceRepeat; - pSprite->shade = (forceRepeat >> 1) - 48; - - for (bsize_t j = pData[0]; j > 0; j--) - A_SetSprite(spriteNum, CLIPMASK0); - goto next_sprite; - } - - case MUD__STATICRR: - pData[0]++; - if (pData[0] == 1) - { - if (sector[sectNum].floorpicnum != TILE_RRTILE3073) - DELETE_SPRITE_AND_CONTINUE(spriteNum); - if (!S_CheckSoundPlaying(spriteNum,ITEM_SPLASH)) - A_PlaySound(ITEM_SPLASH,spriteNum); - } - if (pData[0] == 3) - { - pData[0] = 0; - pData[1]++; // WATERSPLASH_T2 - } - if (pData[1] == 5) - A_DeleteSprite(spriteNum); - goto next_sprite; - - case WATERSPLASH2__STATIC: - pData[0]++; - if (pData[0] == 1) - { - if (sector[sectNum].lotag != ST_1_ABOVE_WATER && sector[sectNum].lotag != ST_2_UNDERWATER) - DELETE_SPRITE_AND_CONTINUE(spriteNum); - /* - else - { - l = getflorzofslope(sect,s->x,s->y)-s->z; - if( l > ZOFFSET2 ) KILLIT(i); - } - else - */ - if (!S_CheckSoundPlaying(spriteNum,ITEM_SPLASH)) - A_PlaySound(ITEM_SPLASH,spriteNum); - } - if (pData[0] == 3) - { - pData[0] = 0; - pData[1]++; // WATERSPLASH_T2 - } - if (pData[1] == 5) - A_DeleteSprite(spriteNum); - goto next_sprite; - case FRAMEEFFECT1__STATIC: - - if (pSprite->owner >= 0) - { - pData[0]++; - - if (pData[0] > 7) - { - DELETE_SPRITE_AND_CONTINUE(spriteNum); - } - else if (pData[0] > 4) - pSprite->cstat |= 512 + 2; - else if (pData[0] > 2) - pSprite->cstat |= 2; - pSprite->xoffset = sprite[pSprite->owner].xoffset; - pSprite->yoffset = sprite[pSprite->owner].yoffset; - } - goto next_sprite; - case INNERJAW__STATIC: - { - // case TILE_INNERJAW+1: - int32_t playerDist, playerNum = A_FindPlayer(pSprite,&playerDist); - - if (playerDist < 512) - { - P_PalFrom(g_player[playerNum].ps, 32, 32,0,0); - sprite[g_player[playerNum].ps->i].extra -= 4; - } - } - fallthrough__; - case COOLEXPLOSION1__STATIC: - if (!RR && switchPic == TILE_COOLEXPLOSION1) - break; - fallthrough__; - case OWHIP__STATICRR: - case UWHIP__STATICRR: - case FIRELASER__STATIC: - if (pSprite->extra != 999) - pSprite->extra = 999; - else DELETE_SPRITE_AND_CONTINUE(spriteNum); - break; - case TONGUE__STATIC: - DELETE_SPRITE_AND_CONTINUE(spriteNum); - - case MONEY__STATIC: - case MAIL__STATIC: - case PAPER__STATIC: - { - if (RR && (switchPic == TILE_MAIL || switchPic == TILE_PAPER)) - break; - pSprite->xvel = (krand2()&7)+(sintable[T1(spriteNum)&2047]>>9); - T1(spriteNum) += (krand2()&63); - if ((T1(spriteNum)&2047) > 512 && (T1(spriteNum)&2047) < 1596) - { - if (sector[sectNum].lotag == ST_2_UNDERWATER) - { - if (pSprite->zvel < 64) - pSprite->zvel += (g_spriteGravity>>5)+(krand2()&7); - } - else if (pSprite->zvel < 144) - pSprite->zvel += (g_spriteGravity>>5)+(krand2()&7); - } - - A_SetSprite(spriteNum, CLIPMASK0); - - if ((krand2()&3) == 0) - setsprite(spriteNum, (vec3_t *) pSprite); - - if (pSprite->sectnum == -1) - DELETE_SPRITE_AND_CONTINUE(spriteNum); - - int const floorZ = getflorzofslope(pSprite->sectnum, pSprite->x, pSprite->y); - - if (pSprite->z > floorZ) - { - pSprite->z = floorZ; - A_AddToDeleteQueue(spriteNum); - PN(spriteNum)++; - - for (bssize_t SPRITES_OF(STAT_MISC, j)) - { - if (sprite[j].picnum == TILE_BLOODPOOL && ldist(pSprite, &sprite[j]) < 348) - { - pSprite->pal = 2; - break; - } - } - } - - - if (RR && sector[pSprite->sectnum].lotag == 800 && pSprite->z >= sector[pSprite->sectnum].floorz - ZOFFSET3) - DELETE_SPRITE_AND_CONTINUE(spriteNum); - - break; - } - - case HEADJIB1__STATIC: - case ARMJIB1__STATIC: - case LEGJIB1__STATIC: - case LIZMANHEAD1__STATIC: - case LIZMANARM1__STATIC: - case LIZMANLEG1__STATIC: - if (RR) break; - goto jib_code; - case RRTILE2460__STATICRR: - case RRTILE2465__STATICRR: - case BIKEJIBA__STATICRR: - case BIKEJIBB__STATICRR: - case BIKEJIBC__STATICRR: - case BIKERJIBA__STATICRR: - case BIKERJIBB__STATICRR: - case BIKERJIBC__STATICRR: - case BIKERJIBD__STATICRR: - case CHEERJIBA__STATICRR: - case CHEERJIBB__STATICRR: - case CHEERJIBC__STATICRR: - case CHEERJIBD__STATICRR: - case FBOATJIBA__STATICRR: - case FBOATJIBB__STATICRR: - case RABBITJIBA__STATICRR: - case RABBITJIBB__STATICRR: - case RABBITJIBC__STATICRR: - case MAMAJIBA__STATICRR: - case MAMAJIBB__STATICRR: - if (!RRRA) break; - goto jib_code; - case JIBS1__STATIC: - case JIBS2__STATIC: - case JIBS3__STATIC: - case JIBS4__STATIC: - case JIBS5__STATIC: - case JIBS6__STATIC: - case DUKETORSO__STATIC: - case DUKEGUN__STATIC: - case DUKELEG__STATIC: - case BILLYJIBA__STATICRR: - case BILLYJIBB__STATICRR: - case HULKJIBA__STATICRR: - case HULKJIBB__STATICRR: - case HULKJIBC__STATICRR: - case MINJIBA__STATICRR: - case MINJIBB__STATICRR: - case MINJIBC__STATICRR: - case COOTJIBA__STATICRR: - case COOTJIBB__STATICRR: - case COOTJIBC__STATICRR: -jib_code: - { - pSprite->xvel = (pSprite->xvel > 0) ? pSprite->xvel - 1 : 0; - - if (!RR) - { - if (pData[5] < (30*10)) - pData[5]++; - else - DELETE_SPRITE_AND_CONTINUE(spriteNum); - } - - if (pSprite->zvel > 1024 && pSprite->zvel < 1280) - { - setsprite(spriteNum, (vec3_t *) pSprite); - sectNum = pSprite->sectnum; - } - - if (RR) - setsprite(spriteNum, (vec3_t * ) pSprite); - - int32_t floorZ, ceilZ; - getzsofslope(sectNum, pSprite->x, pSprite->y, &ceilZ, &floorZ); - - if (ceilZ == floorZ || sectNum < 0 || sectNum >= MAXSECTORS) - DELETE_SPRITE_AND_CONTINUE(spriteNum); - - if (pSprite->z < floorZ-(2<<8)) - { - if (pData[1] < 2) pData[1]++; - else if (sector[sectNum].lotag != ST_2_UNDERWATER) - { - pData[1] = 0; - - if (pSprite->picnum == TILE_DUKELEG || pSprite->picnum == TILE_DUKETORSO || pSprite->picnum == TILE_DUKEGUN) - { - pData[0] = (pData[0] > 6) ? 0 : pData[0] + 1; - } - else - { - pData[0] = (pData[0] > 2) ? 0 : pData[0] + 1; - } - } - - if (pSprite->zvel < 6144) - { - if (sector[sectNum].lotag == ST_2_UNDERWATER) - { - if (pSprite->zvel < 1024) - pSprite->zvel += 48; - else pSprite->zvel = 1024; - } - else pSprite->zvel += g_spriteGravity-50; - } - - pSprite->x += (pSprite->xvel*sintable[(pSprite->ang+512)&2047])>>14; - pSprite->y += (pSprite->xvel*sintable[pSprite->ang&2047])>>14; - pSprite->z += pSprite->zvel; - - if (RR && pSprite->z >= sector[pSprite->sectnum].floorz) - DELETE_SPRITE_AND_CONTINUE(spriteNum); - } - else - { - if (RRRA || (pSprite->picnum == TILE_RRTILE2465 || pSprite->picnum == TILE_RRTILE2560)) - DELETE_SPRITE_AND_CONTINUE(spriteNum); - if (pData[2] == 0) - { - if (pSprite->sectnum == -1) - DELETE_SPRITE_AND_CONTINUE(spriteNum); - - if ((sector[pSprite->sectnum].floorstat&2)) - DELETE_SPRITE_AND_CONTINUE(spriteNum); - - pData[2]++; - } - - floorZ = getflorzofslope(pSprite->sectnum, pSprite->x, pSprite->y); - pSprite->z = floorZ - (2 << 8); - pSprite->xvel = 0; - - if (pSprite->picnum == TILE_JIBS6) - { - pData[1]++; - - if ((pData[1]&3) == 0 && pData[0] < 7) - pData[0]++; - - if (pData[1] > 20) - DELETE_SPRITE_AND_CONTINUE(spriteNum); - } - else - { - pSprite->picnum = TILE_JIBS6; - pData[0] = 0; - pData[1] = 0; - } - } - - if (RR && sector[pSprite->sectnum].lotag == 800 && pSprite->z >= sector[pSprite->sectnum].floorz - ZOFFSET3) - DELETE_SPRITE_AND_CONTINUE(spriteNum); - goto next_sprite; - } - - case PUKE__STATIC: - if (RR) break; - fallthrough__; - case BLOODPOOL__STATIC: - { - if (pData[0] == 0) - { - pData[0] = 1; - if (sector[sectNum].floorstat&2) - { - DELETE_SPRITE_AND_CONTINUE(spriteNum); - } - else A_AddToDeleteQueue(spriteNum); - } - - A_Fall(spriteNum); - - int32_t playerDist; - int const playerNum = A_FindPlayer(pSprite, &playerDist); - pSprite->z = actor[spriteNum].floorz - ZOFFSET; - - DukePlayer_t *const pPlayer = g_player[playerNum].ps; - - if (pData[2] < 32) - { - pData[2]++; - - if (actor[spriteNum].picnum == TILE_TIRE) - { - if (pSprite->xrepeat < 64 && pSprite->yrepeat < 64) - { - pSprite->xrepeat += krand2()&3; - pSprite->yrepeat += krand2()&3; - } - } - else - { - if (pSprite->xrepeat < 32 && pSprite->yrepeat < 32) - { - pSprite->xrepeat += krand2()&3; - pSprite->yrepeat += krand2()&3; - } - } - } - - if (playerDist < 844 && pSprite->xrepeat > 6 && pSprite->yrepeat > 6) - { - if (pSprite->pal == 0 && (krand2()&255) < 16 && (RR || pSprite->picnum != TILE_PUKE)) - { - if (pPlayer->inv_amount[GET_BOOTS] > 0) - pPlayer->inv_amount[GET_BOOTS]--; - else - { - if (!A_CheckSoundPlaying(pPlayer->i,DUKE_LONGTERM_PAIN)) - A_PlaySound(DUKE_LONGTERM_PAIN,pPlayer->i); - - sprite[pPlayer->i].extra --; - - P_PalFrom(pPlayer, 32, 16,0,0); - } - } - - if (pData[1] == 1) goto next_sprite; - - pData[1] = 1; - - pPlayer->footprintcount = (actor[spriteNum].picnum == TILE_TIRE) ? 10 : 3; - pPlayer->footprintpal = pSprite->pal; - pPlayer->footprintshade = pSprite->shade; - - if (pData[2] == 32) - { - pSprite->xrepeat -= 6; - pSprite->yrepeat -= 6; - } - } - else pData[1] = 0; - - if (RR && sector[pSprite->sectnum].lotag == 800 && pSprite->z >= sector[pSprite->sectnum].floorz - ZOFFSET3) - DELETE_SPRITE_AND_CONTINUE(spriteNum); - goto next_sprite; - } - - case BURNING2__STATIC: - case FECES__STATIC: - case SHRINKEREXPLOSION__STATIC: - case EXPLOSION2BOT__STATIC: - case LASERSITE__STATIC: - if (RR) break; - fallthrough__; - case BURNING__STATIC: - case WATERBUBBLE__STATIC: - case SMALLSMOKE__STATIC: - case EXPLOSION2__STATIC: - case EXPLOSION3__STATICRR: - case BLOOD__STATIC: - case FORCERIPPLE__STATIC: - case TRANSPORTERSTAR__STATIC: - case TRANSPORTERBEAM__STATIC: - { - if (!G_HaveActor(sprite[spriteNum].picnum)) - goto next_sprite; - int const playerNum = A_FindPlayer(pSprite, &playerDist); - A_Execute(spriteNum, playerNum, playerDist); - goto next_sprite; - } - - - case SHELL__STATIC: - case SHOTGUNSHELL__STATIC: - - A_SetSprite(spriteNum,CLIPMASK0); - - if (sectNum < 0 || (!RR && (sector[sectNum].floorz + (24<<8)) < pSprite->z)) - DELETE_SPRITE_AND_CONTINUE(spriteNum); - - if (sector[sectNum].lotag == ST_2_UNDERWATER) - { - pData[1]++; - if (pData[1] > 8) - { - pData[1] = 0; - pData[0]++; - pData[0] &= 3; - } - if (pSprite->zvel < 128) pSprite->zvel += (g_spriteGravity/13); // 8 - else pSprite->zvel -= 64; - if (pSprite->xvel > 0) - pSprite->xvel -= 4; - else pSprite->xvel = 0; - } - else - { - pData[1]++; - if (pData[1] > 3) - { - pData[1] = 0; - pData[0]++; - pData[0] &= 3; - } - if (pSprite->zvel < 512) pSprite->zvel += (g_spriteGravity/3); // 52; - if (pSprite->xvel > 0) - pSprite->xvel --; - else - DELETE_SPRITE_AND_CONTINUE(spriteNum); - } - - goto next_sprite; - - case GLASSPIECES__STATIC: - case POPCORN__STATICRR: - // case TILE_GLASSPIECES+1: - // case TILE_GLASSPIECES+2: - - A_Fall(spriteNum); - - if (pSprite->zvel > 4096) pSprite->zvel = 4096; - if (sectNum < 0) - DELETE_SPRITE_AND_CONTINUE(spriteNum); - - if (pSprite->z == actor[spriteNum].floorz-(ZOFFSET) && pData[0] < 3) - { - pSprite->zvel = -((3-pData[0])<<8)-(krand2()&511); - if (sector[sectNum].lotag == ST_2_UNDERWATER) - pSprite->zvel >>= 1; - pSprite->xrepeat >>= 1; - pSprite->yrepeat >>= 1; - if (rnd(96)) - setsprite(spriteNum,(vec3_t *)pSprite); - pData[0]++;//Number of bounces - } - else if (pData[0] == 3) - DELETE_SPRITE_AND_CONTINUE(spriteNum); - - if (pSprite->xvel > 0) - { - pSprite->xvel -= 2; - pSprite->cstat = ((pSprite->xvel&3)<<2); - } - else pSprite->xvel = 0; - - A_SetSprite(spriteNum,CLIPMASK0); - - goto next_sprite; - } - - if (PN(spriteNum) >= TILE_SCRAP6 && PN(spriteNum) <= TILE_SCRAP5+3) - { - if (pSprite->xvel > 0) - pSprite->xvel--; - else pSprite->xvel = 0; - - if (pSprite->zvel > 1024 && pSprite->zvel < 1280) - { - setsprite(spriteNum,(vec3_t *)pSprite); - sectNum = pSprite->sectnum; - } - - if (pSprite->z < sector[sectNum].floorz-(2<<8)) - { - if (pData[1] < 1) pData[1]++; - else - { - pData[1] = 0; - - if (pSprite->picnum < TILE_SCRAP6 + 8) - pData[0] = (pData[0] > 6) ? 0 : pData[0] + 1; - else - pData[0] = (pData[0] > 2) ? 0 : pData[0] + 1; - } - if (pSprite->zvel < 4096) - pSprite->zvel += g_spriteGravity - 50; - pSprite->x += (pSprite->xvel*sintable[(pSprite->ang+512)&2047])>>14; - pSprite->y += (pSprite->xvel*sintable[pSprite->ang&2047])>>14; - pSprite->z += pSprite->zvel; - } - else - { - if (pSprite->picnum == TILE_SCRAP1 && pSprite->yvel > 0 && pSprite->yvel < MAXUSERTILES) - { - int32_t j = A_Spawn(spriteNum, pSprite->yvel); - - setsprite(j,(vec3_t *)pSprite); - A_GetZLimits(j); - sprite[j].hitag = sprite[j].lotag = 0; - } - - DELETE_SPRITE_AND_CONTINUE(spriteNum); - } - goto next_sprite; - } - -next_sprite: - spriteNum = nextSprite; - } -} - - // i: SE spritenum static void HandleSE31(int spriteNum, int setFloorZ, int spriteZ, int SEdir, int zDifference) { @@ -3969,6 +3311,7 @@ void movestandables_d(); void moveweapons_d(); void movetransports_d(void); void moveactors_d(); +void moveexplosions_d(); void movefta_r(void); void moveplayers(); @@ -3979,6 +3322,7 @@ void moveweapons_r(); void movetransports_r(void); void moveactors_r(); void thunder(); +void moveexplosions_r(); void G_MoveWorld_d(void) { @@ -3991,7 +3335,7 @@ void G_MoveWorld_d(void) moveplayers(); //ST 10 movefallers_d(); //ST 12 - G_MoveMisc(); //ST 5 + moveexplosions_d(); //ST 5 const double actorsTime = timerGetHiTicks(); @@ -4027,7 +3371,7 @@ void G_MoveWorld_r(void) moveplayers(); //ST 10 movefallers_r(); //ST 12 if (!DEER) - G_MoveMisc(); //ST 5 + moveexplosions_r(); //ST 5 const double actorsTime = timerGetHiTicks(); diff --git a/source/games/rr/actors.cpp b/source/games/rr/actors.cpp deleted file mode 100644 index 532fcee24..000000000 --- a/source/games/rr/actors.cpp +++ /dev/null @@ -1,106 +0,0 @@ -//------------------------------------------------------------------------- -/* -Copyright (C) 1996, 2003 - 3D Realms Entertainment -Copyright (C) 2000, 2003 - Matt Saettler (EDuke Enhancements) -Copyright (C) 2017-2019 - Nuke.YKT -Copyright (C) 2020 - Christoph Oelckers - -This file is part of Enhanced Duke Nukem 3D version 1.5 - Atomic Edition - -Duke Nukem 3D is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -Original Source: 1996 - Todd Replogle -Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms - -EDuke enhancements integrated: 04/13/2003 - Matt Saettler - -Note: EDuke source was in transition. Changes are in-progress in the -source as it is released. - -This file is a combination of code from the following sources: -- EDuke 2 by Matt Saettler -- JFDuke by Jonathon Fowler (jf@jonof.id.au), -- DukeGDX and RedneckGDX by Alexander Makarov-[M210] (m210-2007@mail.ru) -- Redneck Rampage reconstructed source by Nuke.YKT - -Note: - Most of this code follows DukeGDX and RedneckGDX because for Java it had - to undo all the macro hackery that make the Duke source extremely hard to read. - The other code bases were mainly used to add missing feature support (e.g. WW2GI) - and verify correctness. - -*/ -//------------------------------------------------------------------------- - -#include "ns.h" -#include "global.h" -#include "names.h" - -BEGIN_RR_NS - -//--------------------------------------------------------------------------- -// -// -// -//--------------------------------------------------------------------------- - -bool ceilingspace(int sectnum) -{ - if ((sector[sectnum].ceilingstat & 1) && sector[sectnum].ceilingpal == 0) - { - switch (sector[sectnum].ceilingpicnum) - { - case MOONSKY1: - case BIGORBIT1: - return true; - } - } - return false; -} - -//--------------------------------------------------------------------------- -// -// -// -//--------------------------------------------------------------------------- - -bool floorspace(int sectnum) -{ - if ((sector[sectnum].floorstat & 1) && sector[sectnum].ceilingpal == 0) - { - switch (sector[sectnum].floorpicnum) - { - case MOONSKY1: - case BIGORBIT1: - return true; - } - } - return false; -} - -//--------------------------------------------------------------------------- -// -// -// -//--------------------------------------------------------------------------- - -bool ifsquished(int i, int p) -{ - return false; // this function is a no-op in RR's source. -} - - -END_RR_NS diff --git a/source/games/rr/names.h b/source/games/rr/names.h deleted file mode 100644 index b4005377e..000000000 --- a/source/games/rr/names.h +++ /dev/null @@ -1,430 +0,0 @@ -//------------------------------------------------------------------------- -/* -Copyright (C) 1996, 2003 - 3D Realms Entertainment - -This file is part of Duke Nukem 3D version 1.5 - Atomic Edition - -Duke Nukem 3D is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -Original Source: 1996 - Todd Replogle -Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms -*/ -//------------------------------------------------------------------------- - -enum -{ - GRID = 0, - SECTOREFFECTOR = 1, - ACTIVATOR = 2, - TOUCHPLATE = 3, - ACTIVATORLOCKED = 4, - MUSICANDSFX = 5, - LOCATORS = 6, - CYCLER = 7, - MASTERSWITCH = 8, - RESPAWN = 9, - GPSPEED = 10, - JAILDOOR = 11, - LNRDTAG = 15, - SIGN1 = 16, - SIGN2 = 17, - TORCH = 18, - FIRSTGUNSPRITE = 21, - RIFLESPRITE = 22, - CROSSBOWSPRITE = 23, - TEATGUN = 24, - BUZSAWSPRITE = 25, - DYNAMITE = 26, - POWDERKEGSPRITE = 27, - SHOTGUNSPRITE = 28, - ALIENARMGUN = 29, - HEALTHBOX = 30, - AMMOBOX = 31, - TEATAMMO = 32, - INVENTORYBOX = 33, - DOORKEYS = 34, - LIGHTNIN = 35, - DESTRUCTO = 36, - JAILSOUND = 38, - AMMO = 40, - RIFLEAMMO = 41, - ALIENBLASTERAMMO = 42, - BLADEAMMO = 43, - HBOMBAMMO = 47, - SHOTGUNAMMO = 49, - BEER = 51, - PORKBALLS = 52, - WHISKEY = 53, - MOONSHINE = 55, - SNORKLE = 56, - COWPIE = 57, - DOORKEY = 60, - BOOTS = 61, - MINECARTKILLER = 67, - SHADESECTOR = 68, - SOUNDFX = 71, - MULTISWITCH = 98, - DOORSHOCK = 120, - FLOORSLIME = 132, - BIGFORCE = 135, - SCREENBREAK6 = 164, - SCREENBREAK7 = 165, - SCREENBREAK8 = 166, - FANSPRITEWORK = 210, - FANSPRITE = 211, - FANSPRITEBROKE = 215, - GRATE1 = 234, - BGRATE1 = 235, - WATERDRIP = 239, - WATERBUBBLE = 240, - WATERBUBBLEMAKER = 241, - W_FORCEFIELD = 242, - LIGHTSWITCH2 = 250, - UFOBEAM = 252, - BOULDER = 256, - BOULDER1 = 264, - BOWLLINE = 280, - CHICKENA = 285, - CHICKENC = 286, - HEADCHK = 287, - FEATHERCHK = 288, - LOAF = 289, - NUGGETS = 290, - PACKEDCHK = 291, - BONELESSCHK = 292, - JIBSCHK = 293, - BIGFNTCURSOR = 512, - SMALLFNTCURSOR = 513, - STARTALPHANUM = 514, - ENDALPHANUM = 607, - BIGALPHANUM = 632, - BIGPERIOD = 694, - BIGCOMMA = 695, - BIGX = 696, - BIGQ = 697, - BIGSEMI = 698, - BIGCOLIN = 699, - THREEBYFIVE = 702, - BIGAPPOS = 714, - MINIFONT = 718, - RESPAWNMARKERRED = 866, - - MOONSKY1 = 1022, - MOONSKY2 = 1023, - MOONSKY3 = 1024, - MOONSKY4 = 1025, - BIGORBIT1 = 1026, - BIGORBIT2 = 1027, - BIGORBIT3 = 1028, - BIGORBIT4 = 1029, - BIGORBIT5 =1030, - WATERTILE2 = 1045, - GLASS = 1056, - GLASS2 = 1057, - CRACK1 = 1075, - CRACK2 = 1076, - CRACK3 = 1077, - CRACK4 = 1078, - FOOTPRINTS = 1079, - MIRROR = 1089, - WATERFOUNTAIN = 1092, - REACTOR = 1107, - REACTORBURNT = 1108, - REACTORSPARK = 1109, - BOLT1 = 1127, - - - CAMERA1 = 1134, - FOOTPRINTS2 = 1144, - FOOTPRINTS3 = 1145, - FOOTPRINTS4 = 1146, - SLIME = 1161, - QUEBALL = 1184, - STRIPEBALL = 1185, - POCKET = 1186, - NEON1 = 1200, - NEON2 = 1201, - BOUNCEMINE = 1204, - BULLETHOLE = 1212, - TIRE = 1230, - NEON3 = 1241, - NEON4 = 1242, - NEON5 = 1243, - GLASSPIECES = 1256, - NEON6 = 1264, - OOZFILTER = 1273, - FLOORPLASMA = 1276, - BOTTLE12 = 1282, - BOTTLE13 = 1283, - BOTTLE14 = 1284, - BOTTLE15 = 1285, - BOTTLE16 = 1286, - BOTTLE17 = 1287, - BOTTLE18 = 1288, - VENDMACHINE = 1291, - VENDMACHINEBROKE = 1293, - COLAMACHINE = 1294, - COLAMACHINEBROKE = 1296, - CRANE = 1299, - BLOODPOOL = 1303, - CANWITHSOMETHING = 1309, - FEATHERS = 1310, - BANNER = 1313, - SEENINE = 1324, - SEENINEDEAD = 1325, - STEAM = 1327, - CEILINGSTEAM = 1332, - TRANSPORTERBEAM = 1338, - RAT = 1344, - TRASH = 1346, - WATERSPLASH2 = 1383, - BLOOD = 1391, - TRANSPORTERSTAR = 1398, - ALIENBLAST = 1409, - TONGUE = 1414, - MORTER = 1416, - MUD = 1420, - RADIUSEXPLOSION = 1426, - FORCERIPPLE = 1427, - INNERJAW = 1439, - EXPLOSION2 = 1441, - EXPLOSION3 = 1442, - JIBS1 = 1463, - JIBS2 = 1468, - JIBS3 = 1473, - JIBS4 = 1478, - JIBS5 = 1483, - BURNING = 1494, - FIRE = 1495, - JIBS6 = 1515, - BLOODSPLAT1 = 1525, - BLOODSPLAT3 = 1526, - BLOODSPLAT2 = 1527, - BLOODSPLAT4 = 1528, - OOZ = 1529, - WALLBLOOD1 = 1530, - WALLBLOOD2 = 1531, - WALLBLOOD3 = 1532, - WALLBLOOD4 = 1533, - WALLBLOOD5 = 1534, - WALLBLOOD6 = 1535, - WALLBLOOD7 = 1536, - WALLBLOOD8 = 1537, - OOZ2 = 1538, - BURNING2 = 1539, - FIRE2 = 1540, - SMALLSMOKE = 1554, - SMALLSMOKEMAKER = 1555, - SCRAP6 = 1595, - SCRAP1 = 1605, - SCRAP2 = 1609, - SCRAP3 = 1613, - SCRAP4 = 1617, - SCRAP5 = 1621, - F1HELP = 1633, - MENUSCREEN = 1641, - MENUBAR = 1642, - KILLSICON = 1643, - WHISHKEY_ICON = 1645, - EMPTY_ICON = 1646, - BOTTOMSTATUSBAR = 1647, - BOOT_ICON = 1648, - FRAGBAR = 1650, - COWPIE_ICON = 1652, - SNORKLE_ICON = 1653, - MOONSHINE_ICON = 1654, - BEER_ICON = 1655, - ACCESS_ICON = 1656, - DIGITALNUM = 1657, - SLIDEBAR = 1674, - WINDOWBORDER1 = 1679, - TEXTBOX = 1680, - WINDOWBORDER2 = 1681, - INGAMELNRDTHREEDEE = 1684, - TENSCREEN = 1685, - NEWCROSSHAIR = 1689, - CROSSHAIR = 1692, - SHELL = 1702, - SHOTGUNSHELL = 1704, - FORCESPHERE = 1759, - SHOTSPARK1 = 1764, - CROSSBOW = 1774, - TORNADO = 1930, - TIKILAMP = 1990, - POPCORN = 2021, - TESLACON = 2056, - TESLABALL = 2094, - DILDO = 2095, - TESLA = 2097, - HURTRAIL = 2221, - LOCKSWITCH1 = 2224, - REACTOR2 = 2239, - REACTOR2SPARK = 2243, - REACTOR2BURNT = 2247, - EXPLOSION2BOT = 2272, - SELECTDIR = 2444, - VIEWBORDER = 2520, - ORDERING = 2531, - TEXTSTORY = 2541, - LOADSCREEN = 2542, - STARSKY2 = 2577, - SPINNINGNUKEICON = 896, - TOILETPAPER = 2864, - BUSTAWIN5A = 2878, - BUSTAWIN5B = 2879, - BUSTAWIN4A = 2898, - BUSTAWIN4B = 2899, - FRAMEEFFECT1 = 2999, - - LOAFTILE = 3120, - NUGGETTILE = 3122, - BROASTEDTILE = 3123, - BONELESSTILE = 3124, - HEAD1TILE = 3132, - HEAD2TILE = 3133, - CHICKENATILE = 3190, - CHICKENBTILE = 3191, - CHICKENCTILE = 3192, - - NEWPISTOL = 3328, - NEWPISTOLCOCK = 3336, - NEWCROWBAR = 3340, - CROWBAR = NEWCROWBAR, - NEWSHOTGUN = 3350, - SHOTGUN = NEWSHOTGUN, - NEWDYNAMITE = 3360, - RIFLE = 3380, - CIRCLESTUCK = 3388, - SHITBALL = 3390, - BUZSAW = 3395, - CIRCLESAW = 3400, - LUMBERBLADE = 3411, - FIRELASER = 3420, - BOWLINGBALL = 3430, - BOWLINGBALLSPRITE = 3437, - OWHIP = 3471, - UWHIP = 3475, - BACKGROUND = 3822, - APLAYERTOP = 3840, - APLAYER = 3845, - PLAYERONWATER = 3860, - LNYDLADDER = 3975, - LNRDLYINGDEAD = 3998, - LNRDGUN = 4041, - LNRDTORSO = 4046, - LNRLEG = 4055, - DOGATTACK = 4060, - BILLYWALK = 4096, - BILLYDIE = 4137, - BILLYCOCK = 4147, - BILLYRAY = 4162, - BILLYSHOOT = 4162, - BILLYRAYSTAYPUT = 4163, - BILLYBUT = 4188, - BILLYSCRATCH = 4191, - BILLYSNIFF = 4195, - BILLYWOUND = 4202, - BILLYGORE = 4228, - BILLYJIBA = 4235, - BILLYJIBB = 4244, - DOGRUN = 4260, - DOGDIE = 4295, - DOGDEAD = 4303, - DOGBARK = 4305, - LTH = 4352, - LTHSTRAFE = 4395, - LTHLOAD = 4430, - LTHDIE = 4456, - BUBBASCRATCH = 4464, - BUBBANOSE = 4476, - BUBBAPISS = 4487, - BUBBASTAND = 4504, - BUBBAOUCH = 4506, - BUBBADIE = 4513, - BUBBADEAD = 4523, - HULK = 4649, - HULKSTAYPUT = 4650, - HULKA = 4651, - HULKB = 4652, - HULKC = 4653, - HULKJIBA = 4748, - HULKJIBB = 4753, - HULKJIBC = 4758, - SBSWIPE = 4770, - SBPAIN = 4810, - SBDIE = 4820, - HEN = 4861, - HENSTAYPUT = 4862, - HENSTAND = 4897, - MOSQUITO = 4916, - PIG = 4945, - PIGSTAYPUT = 4946, - PIGEAT = 4983, - SBMOVE = 5015, - SBSPIT = 5050, - SBDIP = 5085, - MINION = 5120, - MINIONSTAYPUT = 5121, - UFO1 = 5270, - UFO2 = 5274, - UFO3 = 5278, - UFO4 = 5282, - UFO5 = 5286, - MINJIBA = 5290, - MINJIBB = 5295, - MINJIBC = 5300, - COW = 5317, - COOT = 5376, - COOTSTAYPUT = 5377, - COOTSHOOT = 5411, - COOTDIE = 5437, - COOTDUCK = 5481, - COOTPAIN = 5548, - COOTTRANS = 5568, - COOTGETUP = 5579, - ECLAIRHEALTH = 5595, - COOTJIBA = 5602, - COOTJIBB = 5607, - COOTJIBC = 5616, - VIXEN = 5635, - VIXENPAIN = 5675, - VIXENDIE = 5710, - VIXENSHOOT = 5720, - VIXENWDN = 5740, - VIXENWUP = 5775, - VIXENKICK = 5805, - VIXENTELE = 5845, - VIXENTEAT = 5851, - - //RA - AIRPLANE = 8450, - SWAMPBUGGY = 7233, - MOTORCYCLE = 7220, - CHIKENCROSSBOW = 1781, - BIKERSTAND = 5995, - BIKERRIDE = 5890, - BIKERRIDEDAISY = 6401, - MINIONAIRBOAT = 7192, - HULKAIRBOAT = 7199, - DAISYMAE = 6658, - DAISYAIRBOAT = 7206, - MINIONUFO = 5260, - JACKOLOPE = 7280, - BANJOCOOTER = 7030, - GUITARBILLY = 7035, - MAMAJACKOLOPE = 8705, - -};