Skip to content

Commit

Permalink
Provide support for C23 standard
Browse files Browse the repository at this point in the history
  • Loading branch information
JNechaevsky committed Jan 18, 2025
1 parent 926ccf0 commit d2e135e
Show file tree
Hide file tree
Showing 5 changed files with 574 additions and 578 deletions.
2 changes: 1 addition & 1 deletion src/doom/am_map.c
Original file line number Diff line number Diff line change
Expand Up @@ -2337,7 +2337,7 @@ static void AM_drawThings (void)
else
{
// [JN] CRL - ReMooD-inspired monsters coloring.
if (t->target && t->state && t->state->action.acv != A_Look)
if (t->target && t->state && t->state->action.acv != (actionf_v)A_Look)
{
color = iddt_reds_active;
}
Expand Down
5 changes: 1 addition & 4 deletions src/doom/d_think.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,7 @@
// we will need to handle the various
// action functions cleanly.
//
#ifdef __clang__ // [JN] Shut up Clang warning:
#pragma clang diagnostic ignored "-Wstrict-prototypes"
#endif
typedef void (*actionf_v)();
typedef void (*actionf_v)(void);
typedef void (*actionf_p1)( void* );
typedef void (*actionf_p2)( void*, void* );
typedef void (*actionf_p3)( void*, void*, void* ); // [crispy] let pspr action pointers get called from mobj states
Expand Down
174 changes: 87 additions & 87 deletions src/doom/deh_bexptr.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,95 +35,95 @@ typedef struct {
} bex_codeptr_t;

static const bex_codeptr_t bex_codeptrtable[] = {
{"Light0", {A_Light0}},
{"WeaponReady", {A_WeaponReady}},
{"Lower", {A_Lower}},
{"Raise", {A_Raise}},
{"Punch", {A_Punch}},
{"ReFire", {A_ReFire}},
{"FirePistol", {A_FirePistol}},
{"Light1", {A_Light1}},
{"FireShotgun", {A_FireShotgun}},
{"Light2", {A_Light2}},
{"FireShotgun2", {A_FireShotgun2}},
{"CheckReload", {A_CheckReload}},
{"OpenShotgun2", {A_OpenShotgun2}},
{"LoadShotgun2", {A_LoadShotgun2}},
{"CloseShotgun2", {A_CloseShotgun2}},
{"FireCGun", {A_FireCGun}},
{"GunFlash", {A_GunFlash}},
{"FireMissile", {A_FireMissile}},
{"Saw", {A_Saw}},
{"FirePlasma", {A_FirePlasma}},
{"BFGsound", {A_BFGsound}},
{"FireBFG", {A_FireBFG}},
{"BFGSpray", {A_BFGSpray}},
{"Explode", {A_Explode}},
{"Pain", {A_Pain}},
{"PlayerScream", {A_PlayerScream}},
{"Fall", {A_Fall}},
{"XScream", {A_XScream}},
{"Look", {A_Look}},
{"Chase", {A_Chase}},
{"FaceTarget", {A_FaceTarget}},
{"PosAttack", {A_PosAttack}},
{"Scream", {A_Scream}},
{"SPosAttack", {A_SPosAttack}},
{"VileChase", {A_VileChase}},
{"VileStart", {A_VileStart}},
{"VileTarget", {A_VileTarget}},
{"VileAttack", {A_VileAttack}},
{"StartFire", {A_StartFire}},
{"Fire", {A_Fire}},
{"FireCrackle", {A_FireCrackle}},
{"Tracer", {A_Tracer}},
{"SkelWhoosh", {A_SkelWhoosh}},
{"SkelFist", {A_SkelFist}},
{"SkelMissile", {A_SkelMissile}},
{"FatRaise", {A_FatRaise}},
{"FatAttack1", {A_FatAttack1}},
{"FatAttack2", {A_FatAttack2}},
{"FatAttack3", {A_FatAttack3}},
{"BossDeath", {A_BossDeath}},
{"CPosAttack", {A_CPosAttack}},
{"CPosRefire", {A_CPosRefire}},
{"TroopAttack", {A_TroopAttack}},
{"SargAttack", {A_SargAttack}},
{"HeadAttack", {A_HeadAttack}},
{"BruisAttack", {A_BruisAttack}},
{"SkullAttack", {A_SkullAttack}},
{"Metal", {A_Metal}},
{"SpidRefire", {A_SpidRefire}},
{"BabyMetal", {A_BabyMetal}},
{"BspiAttack", {A_BspiAttack}},
{"Hoof", {A_Hoof}},
{"CyberAttack", {A_CyberAttack}},
{"PainAttack", {A_PainAttack}},
{"PainDie", {A_PainDie}},
{"KeenDie", {A_KeenDie}},
{"BrainPain", {A_BrainPain}},
{"BrainScream", {A_BrainScream}},
{"BrainDie", {A_BrainDie}},
{"BrainAwake", {A_BrainAwake}},
{"BrainSpit", {A_BrainSpit}},
{"SpawnSound", {A_SpawnSound}},
{"SpawnFly", {A_SpawnFly}},
{"BrainExplode", {A_BrainExplode}},
{"Light0", {.acp3 = (actionf_p3)A_Light0}},
{"WeaponReady", {.acp3 = (actionf_p3)A_WeaponReady}},
{"Lower", {.acp3 = (actionf_p3)A_Lower}},
{"Raise", {.acp3 = (actionf_p3)A_Raise}},
{"Punch", {.acp3 = (actionf_p3)A_Punch}},
{"ReFire", {.acp3 = (actionf_p3)A_ReFire}},
{"FirePistol", {.acp3 = (actionf_p3)A_FirePistol}},
{"Light1", {.acp3 = (actionf_p3)A_Light1}},
{"FireShotgun", {.acp3 = (actionf_p3)A_FireShotgun}},
{"Light2", {.acp3 = (actionf_p3)A_Light2}},
{"FireShotgun2", {.acp3 = (actionf_p3)A_FireShotgun2}},
{"CheckReload", {.acp3 = (actionf_p3)A_CheckReload}},
{"OpenShotgun2", {.acp3 = (actionf_p3)A_OpenShotgun2}},
{"LoadShotgun2", {.acp3 = (actionf_p3)A_LoadShotgun2}},
{"CloseShotgun2", {.acp3 = (actionf_p3)A_CloseShotgun2}},
{"FireCGun", {.acp3 = (actionf_p3)A_FireCGun}},
{"GunFlash", {.acp3 = (actionf_p3)A_GunFlash}},
{"FireMissile", {.acp3 = (actionf_p3)A_FireMissile}},
{"Saw", {.acp3 = (actionf_p3)A_Saw}},
{"FirePlasma", {.acp3 = (actionf_p3)A_FirePlasma}},
{"BFGsound", {.acp3 = (actionf_p3)A_BFGsound}},
{"FireBFG", {.acp3 = (actionf_p3)A_FireBFG}},
{"BFGSpray", {.acp1 = (actionf_p1)A_BFGSpray}},
{"Explode", {.acp1 = (actionf_p1)A_Explode}},
{"Pain", {.acp1 = (actionf_p1)A_Pain}},
{"PlayerScream", {.acp1 = (actionf_p1)A_PlayerScream}},
{"Fall", {.acp1 = (actionf_p1)A_Fall}},
{"XScream", {.acp1 = (actionf_p1)A_XScream}},
{"Look", {.acp1 = (actionf_p1)A_Look}},
{"Chase", {.acp1 = (actionf_p1)A_Chase}},
{"FaceTarget", {.acp1 = (actionf_p1)A_FaceTarget}},
{"PosAttack", {.acp1 = (actionf_p1)A_PosAttack}},
{"Scream", {.acp1 = (actionf_p1)A_Scream}},
{"SPosAttack", {.acp1 = (actionf_p1)A_SPosAttack}},
{"VileChase", {.acp1 = (actionf_p1)A_VileChase}},
{"VileStart", {.acp1 = (actionf_p1)A_VileStart}},
{"VileTarget", {.acp1 = (actionf_p1)A_VileTarget}},
{"VileAttack", {.acp1 = (actionf_p1)A_VileAttack}},
{"StartFire", {.acp1 = (actionf_p1)A_StartFire}},
{"Fire", {.acp1 = (actionf_p1)A_Fire}},
{"FireCrackle", {.acp1 = (actionf_p1)A_FireCrackle}},
{"Tracer", {.acp1 = (actionf_p1)A_Tracer}},
{"SkelWhoosh", {.acp1 = (actionf_p1)A_SkelWhoosh}},
{"SkelFist", {.acp1 = (actionf_p1)A_SkelFist}},
{"SkelMissile", {.acp1 = (actionf_p1)A_SkelMissile}},
{"FatRaise", {.acp1 = (actionf_p1)A_FatRaise}},
{"FatAttack1", {.acp1 = (actionf_p1)A_FatAttack1}},
{"FatAttack2", {.acp1 = (actionf_p1)A_FatAttack2}},
{"FatAttack3", {.acp1 = (actionf_p1)A_FatAttack3}},
{"BossDeath", {.acp1 = (actionf_p1)A_BossDeath}},
{"CPosAttack", {.acp1 = (actionf_p1)A_CPosAttack}},
{"CPosRefire", {.acp1 = (actionf_p1)A_CPosRefire}},
{"TroopAttack", {.acp1 = (actionf_p1)A_TroopAttack}},
{"SargAttack", {.acp1 = (actionf_p1)A_SargAttack}},
{"HeadAttack", {.acp1 = (actionf_p1)A_HeadAttack}},
{"BruisAttack", {.acp1 = (actionf_p1)A_BruisAttack}},
{"SkullAttack", {.acp1 = (actionf_p1)A_SkullAttack}},
{"Metal", {.acp1 = (actionf_p1)A_Metal}},
{"SpidRefire", {.acp1 = (actionf_p1)A_SpidRefire}},
{"BabyMetal", {.acp1 = (actionf_p1)A_BabyMetal}},
{"BspiAttack", {.acp1 = (actionf_p1)A_BspiAttack}},
{"Hoof", {.acp1 = (actionf_p1)A_Hoof}},
{"CyberAttack", {.acp1 = (actionf_p1)A_CyberAttack}},
{"PainAttack", {.acp1 = (actionf_p1)A_PainAttack}},
{"PainDie", {.acp1 = (actionf_p1)A_PainDie}},
{"KeenDie", {.acp1 = (actionf_p1)A_KeenDie}},
{"BrainPain", {.acp1 = (actionf_p1)A_BrainPain}},
{"BrainScream", {.acp1 = (actionf_p1)A_BrainScream}},
{"BrainDie", {.acp1 = (actionf_p1)A_BrainDie}},
{"BrainAwake", {.acp1 = (actionf_p1)A_BrainAwake}},
{"BrainSpit", {.acp1 = (actionf_p1)A_BrainSpit}},
{"SpawnSound", {.acp1 = (actionf_p1)A_SpawnSound}},
{"SpawnFly", {.acp1 = (actionf_p1)A_SpawnFly}},
{"BrainExplode", {.acp1 = (actionf_p1)A_BrainExplode}},
// [crispy] additional BOOM and MBF states, sprites and code pointers
{"Stop", {A_Stop}},
{"Die", {A_Die}},
{"FireOldBFG", {A_FireOldBFG}},
{"Detonate", {A_Detonate}},
{"Mushroom", {A_Mushroom}},
{"BetaSkullAttack", {A_BetaSkullAttack}},
{"Stop", {.acp1 = (actionf_p1)A_Stop}},
{"Die", {.acp1 = (actionf_p1)A_Die}},
{"FireOldBFG", {.acp3 = (actionf_p3)A_FireOldBFG}},
{"Detonate", {.acp1 = (actionf_p1)A_Detonate}},
{"Mushroom", {.acp1 = (actionf_p1)A_Mushroom}},
{"BetaSkullAttack", {.acp1 = (actionf_p1)A_BetaSkullAttack}},
// [crispy] more MBF code pointers
{"Spawn", {A_Spawn}},
{"Turn", {A_Turn}},
{"Face", {A_Face}},
{"Scratch", {A_Scratch}},
{"PlaySound", {A_PlaySound}},
{"RandomJump", {A_RandomJump}},
{"LineEffect", {A_LineEffect}},
{"Spawn", {.acp1 = (actionf_p1)A_Spawn}},
{"Turn", {.acp1 = (actionf_p1)A_Turn}},
{"Face", {.acp1 = (actionf_p1)A_Face}},
{"Scratch", {.acp1 = (actionf_p1)A_Scratch}},
{"PlaySound", {.acp1 = (actionf_p1)A_PlaySound}},
{"RandomJump", {.acp3 = (actionf_p3)A_RandomJump}},
{"LineEffect", {.acp1 = (actionf_p1)A_LineEffect}},
{"NULL", {NULL}},
};

Expand Down
Loading

0 comments on commit d2e135e

Please sign in to comment.