// SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- // Copyright (C) 1993-1996 by id Software, Inc. // Copyright (C) 1998-2000 by DooM Legacy Team. // Copyright (C) 1999-2021 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. // See the 'LICENSE' file for more details. //----------------------------------------------------------------------------- /// \file info.c /// \brief Thing frame/state LUT // Data. #include "doomdef.h" #include "doomstat.h" #include "sounds.h" #include "p_mobj.h" #include "p_local.h" // DMG_ constants #include "m_misc.h" #include "z_zone.h" #include "d_player.h" #include "v_video.h" // V_*MAP constants #include "lzf.h" #ifdef HWRENDER #include "hardware/hw_light.h" #endif // Hey, moron! If you change this table, don't forget about the sprite enum in info.h and the sprite lights in hw_light.c! // For the sake of constant merge conflicts, let's spread this out char sprnames[NUMSPRITES + 1][5] = { "NULL", // invisible object "UNKN", "THOK", // Thok! mobj "PLAY", // Enemies "POSS", // Crawla (Blue) "SPOS", // Crawla (Red) "FISH", // SDURF "BUZZ", // Buzz (Gold) "RBUZ", // Buzz (Red) "JETB", // Jetty-Syn Bomber "JETG", // Jetty-Syn Gunner "CCOM", // Crawla Commander "DETN", // Deton "SKIM", // Skim mine dropper "TRET", // Industrial Turret "TURR", // Pop-Up Turret "SHRP", // Sharp "CRAB", // Crushstacean "CR2B", // Banpyura "CSPR", // Banpyura spring "JJAW", // Jet Jaw "SNLR", // Snailer "VLTR", // BASH "PNTY", // Pointy "ARCH", // Robo-Hood "CBFS", // Castlebot Facestabber "STAB", // Castlebot Facestabber spear aura "SPSH", // Egg Guard "ESHI", // Egg Guard's shield "GSNP", // Green Snapper "GSNL", // Green Snapper leg "GSNH", // Green Snapper head "MNUS", // Minus "MNUD", // Minus dirt "SSHL", // Spring Shell "UNID", // Unidus "CANA", // Canarivore "CANG", // Canarivore gas "PYRE", // Pyre Fly "PTER", // Pterabyte "DRAB", // Dragonbomber // Generic Boss Items "JETF", // Boss jet fumes // Boss 1 (Greenflower) "EGGM", // Boss 1 "EGLZ", // Boss 1 Junk // Boss 2 (Techno Hill) "EGGN", // Boss 2 "TANK", // Boss 2 Junk "GOOP", // Boss 2 Goop // Boss 3 (Deep Sea) "EGGO", // Boss 3 "SEBH", // Boss 3 Junk "FAKE", // Boss 3 Fakemobile "SHCK", // Boss 3 Shockwave // Boss 4 (Castle Eggman) "EGGP", "EFIR", // Boss 4 jet flame "EGR1", // Boss 4 Spectator Eggrobo // Boss 5 (Arid Canyon) "FANG", // replaces EGGQ "BRKN", // broken robot chunk "WHAT", // alart "VWRE", "PROJ", // projector light "FBOM", "FSGN", "BARX", // bomb explosion (also used by barrel) "BARD", // bomb dust (also used by barrel) // Boss 6 (Red Volcano) "EGGR", // Boss 7 (Dark City) "BRAK", "BGOO", // Goop "BMSL", // Boss 8 (Egg Rock) "EGGT", // Cy-Brak-Demon; uses "BRAK" as well, but has some extras "RCKT", // Rockets! "ELEC", // Electricity! "TARG", // Targeting reticules! "NPLM", // Big napalm bombs! "MNPL", // Mini napalm bombs! // Metal Sonic "METL", "MSCF", "MSCB", // Collectible Items "RING", "TRNG", // Team Rings "TOKE", // Special Stage Token "RFLG", // Red CTF Flag "BFLG", // Blue CTF Flag "SPHR", // Sphere "NCHP", // NiGHTS chip "NSTR", // NiGHTS star "EMBM", // Emblem "CEMG", // Chaos Emeralds "SHRD", // Emerald hunt shards // Interactive Objects "BBLS", // water bubble source "SIGN", // Level end sign "SPIK", // Spike Ball "SFLM", // Spin fire "TFLM", // Spin fire (team) "USPK", // Floor spike "WSPK", // Wall spike "WSPB", // Wall spike base "STPT", // Starpost "BMNE", // Big floating mine "PUMI", // Rollout Rock // Monitor Boxes "MSTV", // MiSc TV sprites "XLTV", // eXtra Large TV sprites "TRRI", // Red team: 10 RIngs "TBRI", // Blue team: 10 RIngs "TVRI", // 10 RIng "TVPI", // PIty shield "TVAT", // ATtraction shield "TVFO", // FOrce shield "TVAR", // ARmageddon shield "TVWW", // WhirlWind shield "TVEL", // ELemental shield "TVSS", // Super Sneakers "TVIV", // InVincibility "TV1U", // 1Up "TV1P", // 1uP (textless) "TVEG", // EGgman "TVMX", // MiXup "TVMY", // MYstery "TVGV", // GraVity boots "TVRC", // ReCycler "TV1K", // 1,000 points (1 K) "TVTK", // 10,000 points (Ten K) "TVFL", // FLame shield "TVBB", // BuBble shield "TVZP", // Thunder shield (ZaP) // Projectiles "MISL", "LASR", // GFZ3 laser "LASF", // GFZ3 laser flames "TORP", // Torpedo "ENRG", // Energy ball "MINE", // Skim mine "JBUL", // Jetty-Syn Bullet "TRLS", "CBLL", // Cannonball "AROW", // Arrow "CFIR", // Colored fire of various sorts // The letter "LETR", // Greenflower Scenery "FWR1", "FWR2", // GFZ Sunflower "FWR3", // GFZ budding flower "FWR4", "BUS1", // GFZ Bush w/ berries "BUS2", // GFZ Bush w/o berries "BUS3", // GFZ Bush w/ BLUE berries // Trees (both GFZ and misc) "TRE1", // GFZ "TRE2", // Checker "TRE3", // Frozen Hillside "TRE4", // Polygon "TRE5", // Bush tree "TRE6", // Spring tree // Techno Hill Scenery "THZP", // THZ1 Steam Flower "FWR5", // THZ1 Spin flower (red) "FWR6", // THZ1 Spin flower (yellow) "THZT", // Steam Whistle tree/bush "ALRM", // THZ2 Alarm // Deep Sea Scenery "GARG", // Deep Sea Gargoyle "SEWE", // Deep Sea Seaweed "DRIP", // Dripping water "CORL", // Coral "BCRY", // Blue Crystal "KELP", // Kelp "ALGA", // Animated algae top "ALGB", // Animated algae segment "DSTG", // DSZ Stalagmites "LIBE", // DSZ Light beam // Castle Eggman Scenery "CHAN", // CEZ Chain "FLAM", // Flame "ESTA", // Eggman esta una estatua! "SMCH", // Small Mace Chain "BMCH", // Big Mace Chain "SMCE", // Small Mace "BMCE", // Big Mace "YSPB", // Yellow spring on a ball "RSPB", // Red spring on a ball "SFBR", // Small Firebar "BFBR", // Big Firebar "BANR", // Banner "PINE", // Pine Tree "CEZB", // Bush "CNDL", // Candle/pricket "FLMH", // Flame holder "CTRC", // Fire torch "CFLG", // Waving flag/segment "CSTA", // Crawla statue "CBBS", // Facestabber statue "CABR", // Brambles // Arid Canyon Scenery "BTBL", // Big tumbleweed "STBL", // Small tumbleweed "CACT", // Cacti "WWSG", // Caution Sign "WWS2", // Cacti Sign "WWS3", // Sharp Turn Sign "OILL", // Oil lamp "OILF", // Oil lamp flare "BARR", // TNT barrel "REMT", // TNT proximity shell "TAZD", // Dust devil "ADST", // Arid dust "MCRT", // Minecart "MCSP", // Minecart spark "SALD", // Saloon door "TRAE", // Train cameo locomotive "TRAI", // Train cameo wagon "STEA", // Train steam // Red Volcano Scenery "FLME", // Flame jet "DFLM", // Blade's flame "LFAL", // Lavafall "JPLA", // Jungle palm "TFLO", // Torch flower "WVIN", // Wall vines // Dark City Scenery // Egg Rock Scenery // Christmas Scenery "XMS1", // Christmas Pole "XMS2", // Candy Cane "XMS3", // Snowman "XMS4", // Lamppost "XMS5", // Hanging Star "XMS6", // Mistletoe "FHZI", // FHZ ice "ROSY", // Halloween Scenery "PUMK", // Pumpkins "HHPL", // Dr Seuss Trees "SHRM", // Mushroom "HHZM", // Misc // Azure Temple Scenery "BGAR", // ATZ Gargoyles "RCRY", // ATZ Red Crystal (Target) "CFLM", // Green torch flame // Botanic Serenity Scenery "BSZ1", // Tall flowers "BSZ2", // Medium flowers "BSZ3", // Small flowers //"BSZ4", -- Tulips "BST1", // Red tulip "BST2", // Purple tulip "BST3", // Blue tulip "BST4", // Cyan tulip "BST5", // Yellow tulip "BST6", // Orange tulip "BSZ5", // Cluster of Tulips "BSZ6", // Bush "BSZ7", // Vine "BSZ8", // Misc things // Misc Scenery "STLG", // Stalagmites "DBAL", // Disco // Powerup Indicators "ARMA", // Armageddon Shield Orb "ARMF", // Armageddon Shield Ring, Front "ARMB", // Armageddon Shield Ring, Back "WIND", // Whirlwind Shield Orb "MAGN", // Attract Shield Orb "ELEM", // Elemental Shield Orb and Fire "FORC", // Force Shield Orb "PITY", // Pity Shield Orb "FIRS", // Flame Shield Orb "BUBS", // Bubble Shield Orb "ZAPS", // Thunder Shield Orb "IVSP", // invincibility sparkles "SSPK", // Super Sonic Spark "GOAL", // Special Stage goal (here because lol NiGHTS) // Flickies "FBUB", // Flicky-sized bubble "FL01", // Bluebird "FL02", // Rabbit "FL03", // Chicken "FL04", // Seal "FL05", // Pig "FL06", // Chipmunk "FL07", // Penguin "FL08", // Fish "FL09", // Ram "FL10", // Puffin "FL11", // Cow "FL12", // Rat "FL13", // Bear "FL14", // Dove "FL15", // Cat "FL16", // Canary "FS01", // Spider "FS02", // Bat // Springs "FANS", // Fan "STEM", // Steam riser "BUMP", // Bumpers "BLON", // Balloons "SPRY", // Yellow spring "SPRR", // Red spring "SPRB", // Blue spring "YSPR", // Yellow Diagonal Spring "RSPR", // Red Diagonal Spring "BSPR", // Blue Diagonal Spring "SSWY", // Yellow Side Spring "SSWR", // Red Side Spring "SSWB", // Blue Side Spring "BSTY", // Yellow Booster "BSTR", // Red Booster // Environmental Effects "RAIN", // Rain "SNO1", // Snowflake "SPLH", // Water Splish "LSPL", // Lava Splish "SPLA", // Water Splash "SMOK", "BUBL", // Bubble "WZAP", "DUST", // Spindash dust "FPRT", // Spindash dust (flame) "TFOG", // Teleport Fog "SEED", // Sonic CD flower seed "PRTL", // Particle (for fans, etc.) // Game Indicators "SCOR", // Score logo "DRWN", // Drowning Timer "FLII", // Flight indicator "LCKN", // Target "TTAG", // Tag Sign "GFLG", // Got Flag sign "FNSF", // Finish flag "CORK", "LHRT", // Ring Weapons "RRNG", // Red Ring "RNGB", // Bounce Ring "RNGR", // Rail Ring "RNGI", // Infinity Ring "RNGA", // Automatic Ring "RNGE", // Explosion Ring "RNGS", // Scatter Ring "RNGG", // Grenade Ring "PIKB", // Bounce Ring Pickup "PIKR", // Rail Ring Pickup "PIKA", // Automatic Ring Pickup "PIKE", // Explosion Ring Pickup "PIKS", // Scatter Ring Pickup "PIKG", // Grenade Ring Pickup "TAUT", // Thrown Automatic Ring "TGRE", // Thrown Grenade Ring "TSCR", // Thrown Scatter Ring // Mario-specific stuff "COIN", "CPRK", "GOOM", "BGOM", "FFWR", "FBLL", "SHLL", "PUMA", "HAMM", "KOOP", "BFLM", "MAXE", "MUS1", "MUS2", "TOAD", // NiGHTS Stuff "NDRN", // NiGHTS drone "NSPK", // NiGHTS sparkle "NBMP", // NiGHTS Bumper "HOOP", // NiGHTS hoop sprite "NSCR", // NiGHTS score sprite "NPRU", // Nights Powerups "CAPS", // Capsule thingy for NiGHTS "IDYA", // Ideya "NTPN", // Nightopian "SHLP", // Shleep // Secret badniks and hazards, shhhh "PENG", "POPH", "HIVE", "BUMB", "BBUZ", "FMCE", "HMCE", "CACO", "BAL2", "SBOB", "SBFL", "SBSK", "HBAT", // Debris "SPRK", // Sparkle "BOM1", // Robot Explosion "BOM2", // Boss Explosion 1 "BOM3", // Boss Explosion 2 "BOM4", // Underwater Explosion "BMNB", // Mine Explosion // Crumbly rocks "ROIA", "ROIB", "ROIC", "ROID", "ROIE", "ROIF", "ROIG", "ROIH", "ROII", "ROIJ", "ROIK", "ROIL", "ROIM", "ROIN", "ROIO", "ROIP", // Level debris "GFZD", // GFZ debris "BRIC", // Bricks "WDDB", // Wood Debris "BRIR", // CEZ3 colored bricks "BRIB", // CEZ3 colored bricks "BRIY", // CEZ3 colored bricks // Gravity Well Objects "GWLG", "GWLR", }; char spr2names[NUMPLAYERSPRITES][5] = { "STND", "WAIT", "WALK", "SKID", "RUN_", "DASH", "PAIN", "STUN", "DEAD", "DRWN", "ROLL", "GASP", "JUMP", "SPNG", "FALL", "EDGE", "RIDE", "SPIN", "FLY_", "SWIM", "TIRE", "GLID", "LAND", "CLNG", "CLMB", "FLT_", "FRUN", "BNCE", "FIRE", "TWIN", "MLEE", "MLEL", "TRNS", "NSTD", "NFLT", "NFLY", "NDRL", "NSTN", "NPUL", "NATK", "TAL0", "TAL1", "TAL2", "TAL3", "TAL4", "TAL5", "TAL6", "TAL7", "TAL8", "TAL9", "TALA", "TALB", "TALC", "CNT1", "CNT2", "CNT3", "CNT4", "SIGN", "LIFE", "XTRA", }; playersprite_t free_spr2 = SPR2_FIRSTFREESLOT; playersprite_t spr2defaults[NUMPLAYERSPRITES] = { 0, // SPR2_STND, 0, // SPR2_WAIT, 0, // SPR2_WALK, SPR2_WALK, // SPR2_SKID, SPR2_WALK, // SPR2_RUN , SPR2_FRUN, // SPR2_DASH, 0, // SPR2_PAIN, SPR2_PAIN, // SPR2_STUN, SPR2_PAIN, // SPR2_DEAD, SPR2_DEAD, // SPR2_DRWN, 0, // SPR2_ROLL, SPR2_SPNG, // SPR2_GASP, 0, // SPR2_JUMP, (conditional, will never be referenced) SPR2_FALL, // SPR2_SPNG, SPR2_WALK, // SPR2_FALL, 0, // SPR2_EDGE, SPR2_FALL, // SPR2_RIDE, SPR2_ROLL, // SPR2_SPIN, SPR2_SPNG, // SPR2_FLY , SPR2_FLY , // SPR2_SWIM, 0, // SPR2_TIRE, (conditional, will never be referenced) SPR2_FLY , // SPR2_GLID, SPR2_ROLL, // SPR2_LAND, SPR2_CLMB, // SPR2_CLNG, SPR2_ROLL, // SPR2_CLMB, SPR2_WALK, // SPR2_FLT , SPR2_RUN , // SPR2_FRUN, SPR2_FALL, // SPR2_BNCE, 0, // SPR2_FIRE, SPR2_ROLL, // SPR2_TWIN, SPR2_TWIN, // SPR2_MLEE, 0, // SPR2_MLEL, 0, // SPR2_TRNS, FF_SPR2SUPER|SPR2_STND, // SPR2_NSTD, FF_SPR2SUPER|SPR2_FALL, // SPR2_NFLT, 0, // SPR2_NFLY, (will never be referenced unless skin 0 lacks this) SPR2_NFLY, // SPR2_NDRL, FF_SPR2SUPER|SPR2_STUN, // SPR2_NSTN, SPR2_NSTN, // SPR2_NPUL, FF_SPR2SUPER|SPR2_ROLL, // SPR2_NATK, 0, // SPR2_TAL0, (this will look mighty stupid but oh well) SPR2_TAL0, // SPR2_TAL1, SPR2_TAL1, // SPR2_TAL2, SPR2_TAL2, // SPR2_TAL3, SPR2_TAL1, // SPR2_TAL4, SPR2_TAL4, // SPR2_TAL5, SPR2_TAL0, // SPR2_TAL6, SPR2_TAL3, // SPR2_TAL7, SPR2_TAL7, // SPR2_TAL8, SPR2_TAL0, // SPR2_TAL9, SPR2_TAL9, // SPR2_TALA, SPR2_TAL0, // SPR2_TALB, SPR2_TAL6, // SPR2_TALC, SPR2_WAIT, // SPR2_CNT1, SPR2_FALL, // SPR2_CNT2, SPR2_SPNG, // SPR2_CNT3, SPR2_CNT1, // SPR2_CNT4, 0, // SPR2_SIGN, 0, // SPR2_LIFE, 0, // SPR2_XTRA (should never be referenced) }; // Doesn't work with g++, needs actionf_p1 (don't modify this comment) state_t states[NUMSTATES] = { // frame is masked through FF_FRAMEMASK // FF_ANIMATE makes simple state animations (var1 #frames, var2 tic delay) // FF_FULLBRIGHT activates the fullbright colormap // use FF_TRANS10 - FF_TRANS90 for easy translucency // (or tr_trans10<