- renamed more disasm stuff.

This commit is contained in:
Christoph Oelckers 2020-11-21 20:10:45 +01:00
parent 27dfefef6c
commit f73ca55c79
14 changed files with 56 additions and 56 deletions

View file

@ -5937,7 +5937,7 @@ void actProcessSprites(void)
{
PLAYER *pPlayer = &gPlayer[pSprite->type-kDudePlayer1];
if (pPlayer->voodooTargets)
sub_41250(pPlayer);
voodooTarget(pPlayer);
if (pPlayer->hand && Chance(0x8000))
actDamageSprite(nSprite, pSprite, DAMAGE_TYPE_4, 12);
if (pPlayer->isUnderwater)

View file

@ -44,26 +44,26 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
BEGIN_BLD_NS
static void sub_7034C(spritetype *, XSPRITE *);
static void sub_70380(spritetype *, XSPRITE *);
static void sub_704D8(spritetype *, XSPRITE *);
static void aiPodSearch(spritetype *, XSPRITE *);
static void aiPodMove(spritetype *, XSPRITE *);
static void aiPodChase(spritetype *, XSPRITE *);
AISTATE podIdle = { kAiStateIdle, 0, -1, 0, NULL, NULL, aiThinkTarget, NULL };
AISTATE pod13A600 = { kAiStateMove, 7, -1, 3600, NULL, aiMoveTurn, sub_70380, &podSearch };
AISTATE podSearch = { kAiStateSearch, 0, -1, 3600, NULL, aiMoveTurn, sub_7034C, &podSearch };
AISTATE pod13A638 = { kAiStateChase, 8, dword_279B34, 600, NULL, NULL, NULL, &podChase };
AISTATE podMove = { kAiStateMove, 7, -1, 3600, NULL, aiMoveTurn, aiPodMove, &podSearch };
AISTATE podSearch = { kAiStateSearch, 0, -1, 3600, NULL, aiMoveTurn, aiPodSearch, &podSearch };
AISTATE podStartChase = { kAiStateChase, 8, dword_279B34, 600, NULL, NULL, NULL, &podChase };
AISTATE podRecoil = { kAiStateRecoil, 5, -1, 0, NULL, NULL, NULL, &podChase };
AISTATE podChase = { kAiStateChase, 6, -1, 0, NULL, aiMoveTurn, sub_704D8, NULL };
AISTATE podChase = { kAiStateChase, 6, -1, 0, NULL, aiMoveTurn, aiPodChase, NULL };
AISTATE tentacleIdle = { kAiStateIdle, 0, -1, 0, NULL, NULL, aiThinkTarget, NULL };
AISTATE tentacle13A6A8 = { kAiStateOther, 7, dword_279B3C, 0, NULL, NULL, NULL, &tentacle13A6C4 };
AISTATE tentacle13A6C4 = { kAiStateOther, -1, -1, 0, NULL, NULL, NULL, &tentacleChase };
AISTATE tentacle13A6E0 = { kAiStateOther, 8, dword_279B40, 0, NULL, NULL, NULL, &tentacle13A6FC };
AISTATE tentacle13A6FC = { kAiStateOther, -1, -1, 0, NULL, NULL, NULL, &tentacleIdle };
AISTATE tentacle13A718 = { kAiStateOther, 8, -1, 3600, NULL, aiMoveTurn, sub_70380, &tentacleSearch };
AISTATE tentacleSearch = { kAiStateOther, 0, -1, 3600, NULL, aiMoveTurn, sub_7034C, NULL };
AISTATE tentacle13A750 = { kAiStateOther, 6, dword_279B38, 120, NULL, NULL, NULL, &tentacleChase };
AISTATE tentacleMove = { kAiStateOther, 8, -1, 3600, NULL, aiMoveTurn, aiPodMove, &tentacleSearch };
AISTATE tentacleSearch = { kAiStateOther, 0, -1, 3600, NULL, aiMoveTurn, aiPodSearch, NULL };
AISTATE tentacleStartChase = { kAiStateOther, 6, dword_279B38, 120, NULL, NULL, NULL, &tentacleChase };
AISTATE tentacleRecoil = { kAiStateRecoil, 5, -1, 0, NULL, NULL, NULL, &tentacleChase };
AISTATE tentacleChase = { kAiStateChase, 6, -1, 0, NULL, aiMoveTurn, sub_704D8, NULL };
AISTATE tentacleChase = { kAiStateChase, 6, -1, 0, NULL, aiMoveTurn, aiPodChase, NULL };
void sub_6FF08(int, int nXSprite)
{
@ -79,7 +79,7 @@ void sub_6FF54(int, int nXSprite)
sfxPlay3DSound(&sprite[nSprite], 2500, -1, 0);
}
void sub_6FFA0(int, int nXSprite)
void podAttack(int, int nXSprite)
{
XSPRITE *pXSprite = &xsprite[nXSprite];
int nSprite = pXSprite->reference;
@ -160,13 +160,13 @@ void sub_70284(int, int nXSprite)
sub_2A620(nSprite, pSprite->x, pSprite->y, pSprite->z, pSprite->sectnum, nDist, 1, 5*(1+gGameOptions.nDifficulty), dmgType, 2, nBurn, 0, 0);
}
static void sub_7034C(spritetype *pSprite, XSPRITE *pXSprite)
static void aiPodSearch(spritetype *pSprite, XSPRITE *pXSprite)
{
aiChooseDirection(pSprite, pXSprite, pXSprite->goalAng);
aiThinkTarget(pSprite, pXSprite);
}
static void sub_70380(spritetype *pSprite, XSPRITE *pXSprite)
static void aiPodMove(spritetype *pSprite, XSPRITE *pXSprite)
{
///assert(pSprite->type >= kDudeBase && pSprite->type < kDudeMax);
if (!(pSprite->type >= kDudeBase && pSprite->type < kDudeMax)) {
@ -195,17 +195,17 @@ static void sub_70380(spritetype *pSprite, XSPRITE *pXSprite)
aiThinkTarget(pSprite, pXSprite);
}
static void sub_704D8(spritetype *pSprite, XSPRITE *pXSprite)
static void aiPodChase(spritetype *pSprite, XSPRITE *pXSprite)
{
if (pXSprite->target == -1) {
switch (pSprite->type) {
case kDudePodGreen:
case kDudePodFire:
aiNewState(pSprite, pXSprite, &pod13A600);
aiNewState(pSprite, pXSprite, &podMove);
break;
case kDudeTentacleGreen:
case kDudeTentacleFire:
aiNewState(pSprite, pXSprite, &tentacle13A718);
aiNewState(pSprite, pXSprite, &tentacleMove);
break;
}
return;
@ -254,11 +254,11 @@ static void sub_704D8(spritetype *pSprite, XSPRITE *pXSprite)
switch (pSprite->type) {
case kDudePodGreen:
case kDudePodFire:
aiNewState(pSprite, pXSprite, &pod13A638);
aiNewState(pSprite, pXSprite, &podStartChase);
break;
case kDudeTentacleGreen:
case kDudeTentacleFire:
aiNewState(pSprite, pXSprite, &tentacle13A750);
aiNewState(pSprite, pXSprite, &tentacleStartChase);
break;
}
}
@ -270,11 +270,11 @@ static void sub_704D8(spritetype *pSprite, XSPRITE *pXSprite)
switch (pSprite->type) {
case kDudePodGreen:
case kDudePodFire:
aiNewState(pSprite, pXSprite, &pod13A600);
aiNewState(pSprite, pXSprite, &podMove);
break;
case kDudeTentacleGreen:
case kDudeTentacleFire:
aiNewState(pSprite, pXSprite, &tentacle13A718);
aiNewState(pSprite, pXSprite, &tentacleMove);
break;
}
pXSprite->target = -1;

View file

@ -282,9 +282,9 @@ extern AISTATE innocentTeslaRecoil;
extern AISTATE innocentGoto;
extern AISTATE podIdle;
extern AISTATE pod13A600;
extern AISTATE podMove;
extern AISTATE podSearch;
extern AISTATE pod13A638;
extern AISTATE podStartChase;
extern AISTATE podRecoil;
extern AISTATE podChase;
extern AISTATE tentacleIdle;
@ -292,9 +292,9 @@ extern AISTATE tentacle13A6A8;
extern AISTATE tentacle13A6C4;
extern AISTATE tentacle13A6E0;
extern AISTATE tentacle13A6FC;
extern AISTATE tentacle13A718;
extern AISTATE tentacleMove;
extern AISTATE tentacleSearch;
extern AISTATE tentacle13A750;
extern AISTATE tentacleStartChase;
extern AISTATE tentacleRecoil;
extern AISTATE tentacleChase;

View file

@ -518,7 +518,7 @@ void GameInterface::app_init()
sndInit();
registerosdcommands();
gChoke.init(518, sub_84230);
gChoke.init(518, chokeCallback);
UpdateDacs(0, true);
enginecompatibility_mode = ENGINECOMPATIBILITY_19960925;

View file

@ -415,7 +415,7 @@ void fxBloodBits(int nSprite) // 14
if (pFX)
pFX->ang = nAngle;
}
gFX.sub_73FFC(nSprite);
gFX.remove(nSprite);
}
@ -569,7 +569,7 @@ void fxPodBloodSplat(int nSprite) // 19
if (pFX)
pFX->ang = nAngle;
}
gFX.sub_73FFC(nSprite);
gFX.remove(nSprite);
}

View file

@ -72,7 +72,7 @@ void CChoke::animateChoke(int x, int y, int smoothratio)
}
void sub_84230(PLAYER* pPlayer)
void chokeCallback(PLAYER* pPlayer)
{
int t = gGameOptions.nDifficulty + 2;
if (pPlayer->handTime < 64)

View file

@ -53,7 +53,7 @@ public:
void(*callback)(PLAYER*);
};
void sub_84230(PLAYER*);
void chokeCallback(PLAYER*);
extern CChoke gChoke;

View file

@ -118,7 +118,7 @@ FXDATA gFXData[] = {
{ kCallbackNone, 1, 70, 1, -13981, 5120, 0, 0, 0, 0, 0, 0, 0 }
};
void CFX::sub_73FB0(int nSprite)
void CFX::destroy(int nSprite)
{
if (nSprite < 0 || nSprite >= kMaxSprites)
return;
@ -128,7 +128,7 @@ void CFX::sub_73FB0(int nSprite)
DeleteSprite(nSprite);
}
void CFX::sub_73FFC(int nSprite)
void CFX::remove(int nSprite)
{
if (nSprite < 0 || nSprite >= kMaxSprites)
return;
@ -174,7 +174,7 @@ spritetype * CFX::fxSpawn(FX_ID nFx, int nSector, int x, int y, int z, unsigned
nSprite = it.NextIndex();
if (nSprite == -1)
return NULL;
sub_73FB0(nSprite);
destroy(nSprite);
}
spritetype *pSprite = actSpawnSprite(nSector, x, y, z, 1, 0);
pSprite->type = nFx;
@ -228,14 +228,14 @@ void CFX::fxProcess(void)
updatesector(pSprite->x, pSprite->y, &nSector);
if (nSector == -1)
{
sub_73FFC(nSprite);
remove(nSprite);
continue;
}
if (getflorzofslope(pSprite->sectnum, pSprite->x, pSprite->y) <= pSprite->z)
{
if (pFXData->funcID < 0 || pFXData->funcID >= kCallbackMax)
{
sub_73FFC(nSprite);
remove(nSprite);
continue;
}
assert(gCallback[pFXData->funcID] != NULL);
@ -254,14 +254,14 @@ void CFX::fxProcess(void)
getzsofslope(nSector, pSprite->x, pSprite->y, &ceilZ, &floorZ);
if (ceilZ > pSprite->z && !(sector[nSector].ceilingstat&1))
{
sub_73FFC(nSprite);
remove(nSprite);
continue;
}
if (floorZ < pSprite->z)
{
if (pFXData->funcID < 0 || pFXData->funcID >= kCallbackMax)
{
sub_73FFC(nSprite);
remove(nSprite);
continue;
}
assert(gCallback[pFXData->funcID] != NULL);

View file

@ -91,8 +91,8 @@ enum FX_ID {
class CFX {
public:
void sub_73FB0(int);
void sub_73FFC(int);
void destroy(int);
void remove(int);
spritetype * fxSpawn(FX_ID, int, int, int, int, unsigned int);
void fxProcess(void);
};

View file

@ -301,9 +301,9 @@ static AISTATE* allAIStates[] =
&innocentTeslaRecoil,
&innocentGoto,
&podIdle,
&pod13A600,
&podMove,
&podSearch,
&pod13A638,
&podStartChase,
&podRecoil,
&podChase,
&tentacleIdle,
@ -311,9 +311,9 @@ static AISTATE* allAIStates[] =
&tentacle13A6C4,
&tentacle13A6E0,
&tentacle13A6FC,
&tentacle13A718,
&tentacleMove,
&tentacleSearch,
&tentacle13A750,
&tentacleStartChase,
&tentacleRecoil,
&tentacleChase,
&ratIdle,

View file

@ -885,7 +885,7 @@ void playerInit(int nPlayer, unsigned int a2)
playerReset(pPlayer);
}
char sub_3A158(PLAYER *a1, spritetype *a2)
char findDroppedLeech(PLAYER *a1, spritetype *a2)
{
int nSprite;
StatIterator it(kStatThing);
@ -1114,7 +1114,7 @@ char PickupWeapon(PLAYER *pPlayer, spritetype *pWeapon) {
int nWeaponType = pWeaponItemData->type;
int nAmmoType = pWeaponItemData->ammoType;
if (!pPlayer->hasWeapon[nWeaponType] || gGameOptions.nWeaponSettings == 2 || gGameOptions.nWeaponSettings == 3) {
if (pWeapon->type == kItemWeaponLifeLeech && gGameOptions.nGameType > 1 && sub_3A158(pPlayer, NULL))
if (pWeapon->type == kItemWeaponLifeLeech && gGameOptions.nGameType > 1 && findDroppedLeech(pPlayer, NULL))
return 0;
pPlayer->hasWeapon[nWeaponType] = 1;
if (nAmmoType == -1) return 0;
@ -1255,7 +1255,7 @@ int ActionScan(PLAYER *pPlayer, int *a2, int *a3)
XSPRITE *pXSprite = &xsprite[*a3];
if (pSprite->type == kThingDroppedLifeLeech)
{
if (gGameOptions.nGameType > 1 && sub_3A158(pPlayer, pSprite))
if (gGameOptions.nGameType > 1 && findDroppedLeech(pPlayer, pSprite))
return -1;
pXSprite->data4 = pPlayer->nPlayer;
pXSprite->isTriggered = 0;
@ -1893,7 +1893,7 @@ int playerDamageArmor(PLAYER *pPlayer, DAMAGE_TYPE nType, int nDamage)
return nDamage;
}
spritetype *sub_40A94(PLAYER *pPlayer, int a2)
spritetype *flagDropped(PLAYER *pPlayer, int a2)
{
char buffer[80];
spritetype *pSprite = NULL;
@ -1998,8 +1998,8 @@ int playerDamageSprite(int nSource, PLAYER *pPlayer, DAMAGE_TYPE nDamageType, in
}
sfxKill3DSound(pPlayer->pSprite, -1, 441);
if (gGameOptions.nGameType == 3 && pPlayer->hasFlag) {
if (pPlayer->hasFlag&1) sub_40A94(pPlayer, kItemFlagA);
if (pPlayer->hasFlag&2) sub_40A94(pPlayer, kItemFlagB);
if (pPlayer->hasFlag&1) flagDropped(pPlayer, kItemFlagA);
if (pPlayer->hasFlag&2) flagDropped(pPlayer, kItemFlagB);
}
pPlayer->deathTime = 0;
pPlayer->qavLoop = 0;
@ -2074,7 +2074,7 @@ int UseAmmo(PLAYER *pPlayer, int nAmmoType, int nDec)
return pPlayer->ammoCount[nAmmoType];
}
void sub_41250(PLAYER *pPlayer)
void voodooTarget(PLAYER *pPlayer)
{
int v4 = pPlayer->aim.dz;
int dz = pPlayer->zWeapon-pPlayer->pSprite->z;

View file

@ -272,7 +272,7 @@ void playerCorrectInertia(PLAYER *pPlayer, vec3_t const *oldpos);
void playerStart(int nPlayer, int bNewLevel = 0);
void playerReset(PLAYER *pPlayer);
void playerInit(int nPlayer, unsigned int a2);
char sub_3A158(PLAYER *a1, spritetype *a2);
char findDroppedLeech(PLAYER *a1, spritetype *a2);
char PickupItem(PLAYER *pPlayer, spritetype *pItem);
char PickupAmmo(PLAYER *pPlayer, spritetype *pAmmo);
char PickupWeapon(PLAYER *pPlayer, spritetype *pWeapon);
@ -286,10 +286,10 @@ spritetype *playerFireThing(PLAYER *pPlayer, int a2, int a3, int thingType, int
void playerFrag(PLAYER *pKiller, PLAYER *pVictim);
void FragPlayer(PLAYER *pPlayer, int nSprite);
int playerDamageArmor(PLAYER *pPlayer, DAMAGE_TYPE nType, int nDamage);
spritetype *sub_40A94(PLAYER *pPlayer, int a2);
spritetype *flagDropped(PLAYER *pPlayer, int a2);
int playerDamageSprite(int nSource, PLAYER *pPlayer, DAMAGE_TYPE nDamageType, int nDamage);
int UseAmmo(PLAYER *pPlayer, int nAmmoType, int nDec);
void sub_41250(PLAYER *pPlayer);
void voodooTarget(PLAYER *pPlayer);
void playerLandingSound(PLAYER *pPlayer);
void PlayerSurvive(int, int nXSprite);
void PlayerKneelsOver(int, int nXSprite);

View file

@ -84,7 +84,7 @@ static void (*seqClientCallback[])(int, int) = {
HandJumpSeqCallback,
houndBiteSeqCallback,
houndBurnSeqCallback,
sub_6FFA0,
podAttack,
sub_70284,
sub_6FF08,
sub_6FF54,

View file

@ -37,7 +37,7 @@ void houndBiteSeqCallback(int, int);
void houndBurnSeqCallback(int, int);
void sub_6FF08(int, int);
void sub_6FF54(int, int);
void sub_6FFA0(int, int);
void podAttack(int, int);
void sub_70284(int, int);
void ratBiteSeqCallback(int, int);
void SpidBiteSeqCallback(int, int);