Skip to content

Commit

Permalink
- names2.h cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
coelckers committed Nov 12, 2023
1 parent 4396d41 commit 7c727ef
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 110 deletions.
127 changes: 35 additions & 92 deletions source/games/sw/src/names2.h
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ enum ETimers
FLY_INVENTORY_TIME = 30,
CLOAK_INVENTORY_TIME = 30,
ENVIRON_SUIT_INVENTORY_TIME = 30,
FIRE_FLY_RATE = 50,

DAMAGE_TIME = (1 * TICS_PER_SEC),
};
Expand Down Expand Up @@ -235,10 +236,18 @@ enum EPicnums
Red_COIN = 2440,
Yellow_COIN = 2450,
Green_COIN = 2460,


LAVA_BOULDER = 2196,
EXP = 3100, // Use new digitized explosion for big stuff
BOLT_EXP = EXP,
FIREBALL_EXP = EXP+1,
BASIC_EXP = EXP+2,
SECTOR_EXP = EXP+3,
MICRO_EXP = EXP+5,
TRACER_EXP = EXP+6,
TANK_SHELL_EXP = EXP+7,

RADIATION_CLOUD = 3258,

MUSHROOM_CLOUD = 3280,
CHEMBOMB_R0 = 3038,
CALTROPSR = CALTROPS - 1,
Expand All @@ -252,121 +261,55 @@ enum EPicnums
SKULL_SERP = (SKULL_R0 + 2),
BETTY_R0 = 817,
PUFF = 1748,





SWITCH_OFF = 561,

TRACK_SPRITE = 1900, //start of track sprites
ST1 = 2307,
ST2 = 2308,
ST_QUICK_JUMP = 2309,
ST_QUICK_JUMP_DOWN = 2310,
ST_QUICK_SUPER_JUMP = 2311,
ST_QUICK_SCAN = 2312,
ST_QUICK_EXIT = 2313,
ST_QUICK_OPERATE = 2314,
ST_QUICK_DUCK = 2315,
ST_QUICK_DEFEND = 2316,

//////////////////////
//
// WEAPON RELATED
//
//////////////////////

CROSSBOLT = 2230,

STAR = 2039,
ELECTRO = 2025,

UZI_SMOKE = 2146,
UZI_SPARK = 2140,
SPIKES = 2092,
GRENADE = 2019,
BLANK = 2200,


BODY = 1002,
BODY_BURN = 1003,
BODY_SIZZLE = 1011,


DART_R0 = 2130,
DART_R1 = 2131,
DART_R2 = 2132,
DART_R3 = 2133,
DART_R4 = 2134,
DART_R5 = 2135,
DART_R6 = 2136,
DART_R7 = 2137,

GRENADE_R0 = 2110,
BOLT_THINMAN_R0 = 2018,
BOLT_THINMAN_R1 = 2019,
BOLT_THINMAN_R2 = 2020,
BOLT_THINMAN_R3 = 2021,
BOLT_THINMAN_R4 = 2022,

SPEAR_R0 = 2030,
EMP = 2058,

EXP2 = 2160, // My old explosion is still used for goro head
BREAK_BARREL = 453,
BREAK_PEDISTAL = 463,
BREAK_BOTTLE1 = 468,
BREAK_BOTTLE2 = 475,
FIRE_FLY0 = 630,
SPLASH = 772,
FIREBALL = 2035,
FIREBALL_FLAMES = 3212,
SPLASH = 772,
BUBBLE = 716,
SPEAR_R0 = 2030,
EMP = 2058,
FLOORBLOOD1 = 389,

//////////////////////
//
// MISC
//
//////////////////////

WATER_BEGIN = 320,
WATER_END = 320+8,

WATER_BOIL = 2305,
// above are rotated/multi-frame but used as spawn ids

FIRE_FLY0 = 630,
FIRE_FLY1 = 631,
FIRE_FLY2 = 632,
FIRE_FLY3 = 633,
FIRE_FLY4 = 634,

FIRE_FLY_RATE = 50,

BREAK_BARREL = 453,
BREAK_PEDISTAL = 463,
BREAK_BOTTLE1 = 468,
BREAK_BOTTLE2 = 475,


LAVA_BOULDER = 2196,
TRACK_SPRITE = 1900, //start of track sprites
ST1 = 2307,
ST2 = 2308,
ST_QUICK_JUMP = 2309,
ST_QUICK_JUMP_DOWN = 2310,
ST_QUICK_SUPER_JUMP = 2311,
ST_QUICK_SCAN = 2312,
ST_QUICK_EXIT = 2313,
ST_QUICK_OPERATE = 2314,
ST_QUICK_DUCK = 2315,
ST_QUICK_DEFEND = 2316,

};


//////////////////////
//
// FIREBALL
//
//////////////////////

#define FIREBALL_FRAMES 4
#define FIREBALL_R0 3192
#define FIREBALL_R1 FIREBALL_R0 + (FIREBALL_FRAMES * 1)
#define FIREBALL_R2 FIREBALL_R0 + (FIREBALL_FRAMES * 2)
#define FIREBALL_R3 FIREBALL_R0 + (FIREBALL_FRAMES * 3)
#define FIREBALL_R4 FIREBALL_R0 + (FIREBALL_FRAMES * 4)
};


////////////////////////////////////

#define SCROLL 516
#define SCROLL_FIRE 524

#define FLOORBLOOD1 389

END_SW_NS

Expand Down
20 changes: 2 additions & 18 deletions source/games/sw/src/weapon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -420,8 +420,6 @@ FState s_CrossBolt[] =
{SPR_CROSSBOLT, 'A', CROSSBOLT_RATE, &AF(DoCrossBolt), &s_CrossBolt[0]},
};

#undef STAR
#define STAR 2102
#define STAR_RATE 6
FState s_Star[] =
{
Expand Down Expand Up @@ -501,12 +499,6 @@ FState s_VulcanBoulder[] =
//
//////////////////////

#if 0
#else
#define GRENADE_R0 2110

#undef GRENADE
#define GRENADE GRENADE_R0
#define GRENADE_RATE 8

FState s_Grenade[] =
Expand All @@ -515,7 +507,6 @@ FState s_Grenade[] =
};


#endif

//////////////////////
//
Expand Down Expand Up @@ -1028,13 +1019,6 @@ FState s_MineExp[] =
};

#define EXP_RATE_W 7
#define BOLT_EXP EXP
#define FIREBALL_EXP EXP+1
#define BASIC_EXP EXP+2
#define SECTOR_EXP EXP+3
#define MICRO_EXP EXP+5
#define TRACER_EXP EXP+6
#define TANK_SHELL_EXP EXP+7

FState s_BasicExp[] =
{
Expand Down Expand Up @@ -15964,7 +15948,7 @@ int InitGrenade(DSWPlayer* pp)
// Spawn a shot
// Inserting and setting up variables

auto actorNew = SpawnActor(STAT_MISSILE, GRENADE, &s_Grenade[0], pp->cursector, pos, pp->GetActor()->spr.Angles.Yaw, GRENADE_VELOCITY);
auto actorNew = SpawnActor(STAT_MISSILE, GRENADE_R0, &s_Grenade[0], pp->cursector, pos, pp->actor->spr.Angles.Yaw, GRENADE_VELOCITY);

// don't throw it as far if crawling
if (pp->Flags & (PF_CRAWLING))
Expand Down Expand Up @@ -16040,7 +16024,7 @@ int InitSpriteGrenade(DSWActor* actor)

// Spawn a shot
// Inserting and setting up variables
auto actorNew = SpawnActor(STAT_MISSILE, GRENADE, &s_Grenade[0], actor->sector(),
auto actorNew = SpawnActor(STAT_MISSILE, GRENADE_R0, &s_Grenade[0], actor->sector(),
actor->spr.pos.plusZ(-40), actor->spr.Angles.Yaw, GRENADE_VELOCITY);


Expand Down

0 comments on commit 7c727ef

Please sign in to comment.