mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-18 14:41:55 +00:00
- replaced PANEL_SPRITEp
This commit is contained in:
parent
699bf9c4f5
commit
74593feab1
8 changed files with 393 additions and 395 deletions
|
@ -380,15 +380,13 @@ struct SECTOR_OBJECTstruct;
|
|||
typedef struct SECTOR_OBJECTstruct SECTOR_OBJECT, *SECTOR_OBJECTp;
|
||||
|
||||
struct PANEL_SPRITE;
|
||||
typedef struct PANEL_SPRITE *PANEL_SPRITEp;
|
||||
|
||||
struct ANIM;
|
||||
|
||||
class DSWActor;
|
||||
typedef int ANIMATOR (DSWActor* actor);
|
||||
typedef ANIMATOR *ANIMATORp;
|
||||
|
||||
typedef void pANIMATOR (PANEL_SPRITEp);
|
||||
typedef void pANIMATOR (PANEL_SPRITE*);
|
||||
typedef void (*soANIMATORp) (SECTOR_OBJECTp);
|
||||
|
||||
struct STATE
|
||||
|
@ -675,15 +673,15 @@ struct PLAYERstruct
|
|||
|
||||
struct
|
||||
{
|
||||
PANEL_SPRITEp Next, Prev;
|
||||
PANEL_SPRITE* Next, *Prev;
|
||||
} PanelSpriteList;
|
||||
|
||||
// hack stuff to get a working pointer to this list element without running into type punning warnings with GCC.
|
||||
// The list uses itself as sentinel element despite the type mismatch.
|
||||
PANEL_SPRITEp GetPanelSpriteList()
|
||||
PANEL_SPRITE* GetPanelSpriteList()
|
||||
{
|
||||
void* p = &PanelSpriteList;
|
||||
return reinterpret_cast<PANEL_SPRITEp>(p);
|
||||
return reinterpret_cast<PANEL_SPRITE*>(p);
|
||||
}
|
||||
|
||||
// Key stuff
|
||||
|
@ -695,9 +693,9 @@ struct PLAYERstruct
|
|||
int WpnFlags;
|
||||
int16_t WpnAmmo[MAX_WEAPONS];
|
||||
int16_t WpnNum;
|
||||
PANEL_SPRITEp CurWpn;
|
||||
PANEL_SPRITEp Wpn[MAX_WEAPONS];
|
||||
PANEL_SPRITEp Chops;
|
||||
PANEL_SPRITE* CurWpn;
|
||||
PANEL_SPRITE* Wpn[MAX_WEAPONS];
|
||||
PANEL_SPRITE* Chops;
|
||||
uint8_t WpnRocketType; // rocket type
|
||||
uint8_t WpnRocketHeat; // 5 to 0 range
|
||||
uint8_t WpnRocketNuke; // 1, you have it, or you don't
|
||||
|
|
|
@ -82,7 +82,7 @@ INVENTORY_DATA InventoryData[MAX_INVENTORY+1] =
|
|||
{nullptr, nullptr, nullptr, 0, 0, 0, 0}
|
||||
};
|
||||
|
||||
void PanelInvTestSuicide(PANEL_SPRITEp psp)
|
||||
void PanelInvTestSuicide(PANEL_SPRITE* psp)
|
||||
{
|
||||
if (psp->flags & (PANF_SUICIDE))
|
||||
{
|
||||
|
|
|
@ -54,7 +54,7 @@ inline void INSERT(void* listp, void* nodepp)
|
|||
nodep->Next->Prev = nodep;
|
||||
}
|
||||
|
||||
inline void REMOVE(PANEL_SPRITEp nodep)
|
||||
inline void REMOVE(PANEL_SPRITE* nodep)
|
||||
{
|
||||
nodep->Prev->Next = nodep->Next;
|
||||
nodep->Next->Prev = nodep->Prev;
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -59,7 +59,7 @@ struct PANEL_STATE
|
|||
{
|
||||
short picndx; // for pip stuff in conpic.h
|
||||
int tics;
|
||||
void (*Animator)(PANEL_SPRITEp); // JBF: return type was long
|
||||
void (*Animator)(PANEL_SPRITE*); // JBF: return type was long
|
||||
PANEL_STATE* NextState;
|
||||
uint32_t flags;
|
||||
uint8_t xvel;
|
||||
|
@ -92,7 +92,7 @@ enum
|
|||
PANF_DRAW_BEFORE_VIEW = (BIT(30)), // draw before drawrooms
|
||||
};
|
||||
|
||||
typedef void (*PANEL_SPRITE_FUNCp)(PANEL_SPRITEp);
|
||||
typedef void (*PANEL_SPRITE_FUNCp)(PANEL_SPRITE*);
|
||||
|
||||
struct PANEL_SPRITE_OVERLAY
|
||||
{
|
||||
|
@ -190,14 +190,14 @@ enum
|
|||
};
|
||||
|
||||
|
||||
PANEL_SPRITEp pSpawnSprite(PLAYERp pp, PANEL_STATE* state, uint8_t priority, double x, double y);
|
||||
void pSetSuicide(PANEL_SPRITEp psp);
|
||||
PANEL_SPRITE* pSpawnSprite(PLAYERp pp, PANEL_STATE* state, uint8_t priority, double x, double y);
|
||||
void pSetSuicide(PANEL_SPRITE* psp);
|
||||
bool pKillScreenSpiteIDs(PLAYERp pp, short id);
|
||||
void PreUpdatePanel(double smoothratio);
|
||||
void UpdatePanel(double smoothratio);
|
||||
void PlayerUpdateArmor(PLAYERp pp,short value);
|
||||
void pToggleCrosshair(void);
|
||||
void pKillSprite(PANEL_SPRITEp psp);
|
||||
void pKillSprite(PANEL_SPRITE* psp);
|
||||
void InitChops(PLAYERp pp);
|
||||
void ChopsSetRetract(PLAYERp pp);
|
||||
|
||||
|
|
|
@ -1103,7 +1103,7 @@ int SetVisNorm(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
void pSetVisNorm(PANEL_SPRITEp psp)
|
||||
void pSetVisNorm(PANEL_SPRITE* psp)
|
||||
{
|
||||
// SetVisNorm();
|
||||
}
|
||||
|
|
|
@ -204,9 +204,9 @@ FSerializer& Serialize(FSerializer& arc, const char* keyname, ATTRIBUTE*& w, ATT
|
|||
//---------------------------------------------------------------------------
|
||||
|
||||
// Temporary array to serialize the panel sprites.
|
||||
static TArray<PANEL_SPRITEp> pspAsArray;
|
||||
static TArray<PANEL_SPRITE*> pspAsArray;
|
||||
|
||||
FSerializer& Serialize(FSerializer& arc, const char* keyname, PANEL_SPRITEp& w, PANEL_SPRITEp* def)
|
||||
FSerializer& Serialize(FSerializer& arc, const char* keyname, PANEL_SPRITE*& w, PANEL_SPRITE** def)
|
||||
{
|
||||
unsigned idx = ~0u;
|
||||
if (arc.isWriting())
|
||||
|
@ -237,7 +237,7 @@ FSerializer& Serialize(FSerializer& arc, const char* keyname, PANEL_SPRITEp& w,
|
|||
arc(keyname, ndx);
|
||||
|
||||
if (ndx == ~0u) w = nullptr;
|
||||
else if (ndx >= 1000'0000) w = (PANEL_SPRITEp)&Player[ndx - 1000'0000].PanelSpriteList;
|
||||
else if (ndx >= 1000'0000) w = (PANEL_SPRITE*)&Player[ndx - 1000'0000].PanelSpriteList;
|
||||
else if ((unsigned)ndx >= pspAsArray.Size())
|
||||
I_Error("Bad panel sprite index in savegame");
|
||||
else w = pspAsArray[ndx];
|
||||
|
@ -260,7 +260,7 @@ void preSerializePanelSprites(FSerializer& arc)
|
|||
pspAsArray.Resize(siz);
|
||||
for (unsigned i = 0; i < siz; i++)
|
||||
{
|
||||
pspAsArray[i] = (PANEL_SPRITEp)CallocMem(sizeof(PANEL_SPRITE), 1);
|
||||
pspAsArray[i] = (PANEL_SPRITE*)CallocMem(sizeof(PANEL_SPRITE), 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2079,7 +2079,7 @@ void MoveZ(SECTOR_OBJECTp sop)
|
|||
}
|
||||
}
|
||||
|
||||
void CallbackSOsink(ANIMp ap, void *data)
|
||||
void CallbackSOsink(ANIM* ap, void *data)
|
||||
{
|
||||
SECTOR_OBJECTp sop;
|
||||
int i, ndx;
|
||||
|
|
Loading…
Reference in a new issue