diff --git a/source/games/sw/src/draw.cpp b/source/games/sw/src/draw.cpp index 43de61fe1..44f0908a6 100644 --- a/source/games/sw/src/draw.cpp +++ b/source/games/sw/src/draw.cpp @@ -69,7 +69,7 @@ extern bool Voxel; bool DrawScreen; extern int f_c; -extern ParentalStruct aVoxelArray[MAXTILES]; +extern TILE_INFO_TYPE aVoxelArray[MAXTILES]; void PreDrawStackedWater(void); diff --git a/source/games/sw/src/jsector.cpp b/source/games/sw/src/jsector.cpp index 0353497f5..32126321a 100644 --- a/source/games/sw/src/jsector.cpp +++ b/source/games/sw/src/jsector.cpp @@ -70,7 +70,7 @@ bool bAutoSize = true; // Autosizing on/off extern AMB_INFO ambarray[]; extern short NormalVisibility; -extern ParentalStruct aVoxelArray[MAXTILES]; +extern TILE_INFO_TYPE aVoxelArray[MAXTILES]; // F U N C T I O N S ////////////////////////////////////////////////////////////////////////////// diff --git a/source/games/sw/src/parent.h b/source/games/sw/src/parent.h index 7dfae7be1..bec9af688 100644 --- a/source/games/sw/src/parent.h +++ b/source/games/sw/src/parent.h @@ -29,13 +29,11 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms BEGIN_SW_NS -#define INVISTILE 6145 - -typedef struct TILE_INFO_TYPE +struct TILE_INFO_TYPE { short Voxel; // Voxel Number to replace sprites with // 0 = Invisible -} ParentalStruct; +}; END_SW_NS diff --git a/source/games/sw/src/predict.cpp b/source/games/sw/src/predict.cpp index 194d7c4cf..122bcbbfd 100644 --- a/source/games/sw/src/predict.cpp +++ b/source/games/sw/src/predict.cpp @@ -42,13 +42,13 @@ PLAYER PredictPlayer; //USER PredictUser; PLAYERp ppp = &PredictPlayer; -typedef struct +struct PREDICT { int x,y,z; binangle ang; fixedhoriz horiz; short filler; -} PREDICT, *PREDICTp; +}; PREDICT Predict[/*MOVEFIFOSIZ*/256]; int predictmovefifoplc; @@ -123,7 +123,7 @@ void DoPrediction(PLAYERp ppp) void CorrectPrediction(int actualfifoplc) { #if 0 - PREDICTp predict = &Predict[actualfifoplc & (MOVEFIFOSIZ-1)]; + PREDICT* predict = &Predict[actualfifoplc & (MOVEFIFOSIZ-1)]; if (!PredictionOn) return; diff --git a/source/games/sw/src/rooms.cpp b/source/games/sw/src/rooms.cpp index bc89fd14f..d2b35dfa6 100644 --- a/source/games/sw/src/rooms.cpp +++ b/source/games/sw/src/rooms.cpp @@ -44,15 +44,15 @@ void SW_FloorPortalHack(DSWActor* actor, int z, int match); void SW_CeilingPortalHack(DSWActor* actor, int z, int match); -#define ZMAX 400 -typedef struct +enum { ZMAX = 400 }; +struct SAVE { sectortype* sect[ZMAX]; int32_t zval[ZMAX]; int16_t pic[ZMAX]; int16_t zcount; int16_t slope[ZMAX]; -} SAVE, *SAVEp; +}; SAVE save; diff --git a/source/games/sw/src/saveable.h b/source/games/sw/src/saveable.h index 24bc94150..73bc8ec28 100644 --- a/source/games/sw/src/saveable.h +++ b/source/games/sw/src/saveable.h @@ -38,14 +38,14 @@ struct saveable_data unsigned int size; }; -typedef struct +struct saveable_module { saveable_code *code; unsigned int numcode; saveable_data *data; unsigned int numdata; -} saveable_module; +}; template constexpr std::enable_if_t::value, size_t> SAVE_SIZEOF(T const & obj) noexcept @@ -58,16 +58,16 @@ constexpr std::enable_if_t::value, size_t> SAVE_SIZEOF(T con #define NUM_SAVEABLE_ITEMS(x) countof(x) -typedef struct +struct savedcodesym { FString name; -} savedcodesym; +}; -typedef struct +struct saveddatasym { FString name; unsigned int offset; -} saveddatasym; +}; void Saveable_Init(void); diff --git a/source/games/sw/src/scrip2.cpp b/source/games/sw/src/scrip2.cpp index c602a017a..b3ba1f86c 100644 --- a/source/games/sw/src/scrip2.cpp +++ b/source/games/sw/src/scrip2.cpp @@ -44,7 +44,7 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms BEGIN_SW_NS -ParentalStruct aVoxelArray[MAXTILES]; +TILE_INFO_TYPE aVoxelArray[MAXTILES]; /* diff --git a/source/games/sw/src/sector.cpp b/source/games/sw/src/sector.cpp index 4016cc096..591d53e67 100644 --- a/source/games/sw/src/sector.cpp +++ b/source/games/sw/src/sector.cpp @@ -2009,7 +2009,7 @@ bool NearThings(PLAYERp pp) short nti_cnt; -void NearTagList(NEAR_TAG_INFOp ntip, PLAYERp pp, int z, int dist, int type, int count) +void NearTagList(NEAR_TAG_INFO* ntip, PLAYERp pp, int z, int dist, int type, int count) { short save_lotag, save_hitag; HitInfo near; @@ -2111,7 +2111,7 @@ void NearTagList(NEAR_TAG_INFOp ntip, PLAYERp pp, int z, int dist, int type, int } } -void BuildNearTagList(NEAR_TAG_INFOp ntip, int size, PLAYERp pp, int z, int dist, int type, int count) +void BuildNearTagList(NEAR_TAG_INFO* ntip, int size, PLAYERp pp, int z, int dist, int type, int count) { memset(ntip, -1, size); nti_cnt = 0; diff --git a/source/games/sw/src/sector.h b/source/games/sw/src/sector.h index 898b6aec3..d666d1f23 100644 --- a/source/games/sw/src/sector.h +++ b/source/games/sw/src/sector.h @@ -56,13 +56,13 @@ enum SO_SCALE_TYPE #define SCALE_POINT_SPEED (4 + RandomRange(8)) -typedef struct +struct NEAR_TAG_INFO { int dist; sectortype* sectp; walltype* wallp; DSWActor* actor; -} NEAR_TAG_INFO, *NEAR_TAG_INFOp; +}; extern short nti_cnt; void DoSpawnSpotsForKill(short match);