From a039292c62e4e87e92def93efab53b5161395a4d Mon Sep 17 00:00:00 2001 From: danij Date: Sat, 10 Mar 2012 03:05:28 +0000 Subject: [PATCH] Refactor: Renamed plane_t as Plane --- doomsday/engine/api/dd_share.h | 2 +- doomsday/engine/api/doomsday.h | 2 +- doomsday/engine/portable/include/linedef.h | 8 ++-- doomsday/engine/portable/include/mapdata.hs | 6 +-- doomsday/engine/portable/include/p_maptypes.h | 6 +-- doomsday/engine/portable/include/p_particle.h | 4 +- doomsday/engine/portable/include/p_plane.h | 6 +-- doomsday/engine/portable/include/r_shadow.h | 2 +- doomsday/engine/portable/include/r_world.h | 16 ++++---- doomsday/engine/portable/src/cl_world.c | 4 +- doomsday/engine/portable/src/dam_file.c | 4 +- doomsday/engine/portable/src/edit_map.c | 10 ++--- doomsday/engine/portable/src/linedef.c | 8 ++-- doomsday/engine/portable/src/p_dmu.c | 12 +++--- doomsday/engine/portable/src/p_particle.c | 10 ++--- doomsday/engine/portable/src/p_plane.c | 6 +-- doomsday/engine/portable/src/p_surface.c | 4 +- doomsday/engine/portable/src/r_lumobjs.c | 2 +- doomsday/engine/portable/src/r_shadow.c | 8 ++-- doomsday/engine/portable/src/r_world.c | 34 ++++++++--------- doomsday/engine/portable/src/rend_decor.c | 8 ++-- doomsday/engine/portable/src/rend_fakeradio.c | 4 +- doomsday/engine/portable/src/rend_main.c | 38 +++++++++---------- doomsday/engine/portable/src/rend_shadow.c | 2 +- 24 files changed, 103 insertions(+), 103 deletions(-) diff --git a/doomsday/engine/api/dd_share.h b/doomsday/engine/api/dd_share.h index 86eb9bba34..1f9a4499fe 100644 --- a/doomsday/engine/api/dd_share.h +++ b/doomsday/engine/api/dd_share.h @@ -781,7 +781,7 @@ enum { /* Do NOT change the numerical values of the constants. */ /** * All map think-able objects must use this as a base. Also used for sound - * origin purposes for all of: mobj_t, Polyobj, Sector/plane_t + * origin purposes for all of: mobj_t, Polyobj, Sector/Plane * @ingroup mobj */ typedef struct ddmobj_base_s { diff --git a/doomsday/engine/api/doomsday.h b/doomsday/engine/api/doomsday.h index 7424b28772..5fde089fd4 100644 --- a/doomsday/engine/api/doomsday.h +++ b/doomsday/engine/api/doomsday.h @@ -72,7 +72,7 @@ extern "C" { typedef struct hedge_s { int type; } HEdge; typedef struct bspleaf_s { int type; } BspLeaf; typedef struct sector_s { int type; } Sector; - typedef struct plane_s { int type; } plane_t; + typedef struct plane_s { int type; } Plane; typedef struct material_s { int type; } material_t; #endif diff --git a/doomsday/engine/portable/include/linedef.h b/doomsday/engine/portable/include/linedef.h index 5459646af9..fef5476aea 100644 --- a/doomsday/engine/portable/include/linedef.h +++ b/doomsday/engine/portable/include/linedef.h @@ -53,28 +53,28 @@ void LineDef_UpdateAABox(LineDef* lineDef); * If both front and back floor Plane interfaces exist and are equal, * the front Plane is returned. May return @c NULL if no interfaces. */ -plane_t* LineDef_FloorMin(const LineDef* lineDef); +Plane* LineDef_FloorMin(const LineDef* lineDef); /** * @return Maximal floor Plane which interfaces with this LineDef's face. * If both front and back floor Plane interfaces exist and are equal, * the front Plane is returned. May return @c NULL if no interfaces. */ -plane_t* LineDef_FloorMax(const LineDef* lineDef); +Plane* LineDef_FloorMax(const LineDef* lineDef); /** * @return Minimal ceiling Plane which interfaces with this LineDef's face. * If both front and back ceiling Plane interfaces exist and are equal, * the front Plane is returned. May return @c NULL if no interfaces. */ -plane_t* LineDef_CeilingMin(const LineDef* lineDef); +Plane* LineDef_CeilingMin(const LineDef* lineDef); /** * @return Maximal ceiling Plane which interfaces with this LineDef's face. * If both front and back ceiling Plane interfaces exist and are equal, * the front Plane is returned. May return @c NULL if no interfaces. */ -plane_t* LineDef_CeilingMax(const LineDef* lineDef); +Plane* LineDef_CeilingMax(const LineDef* lineDef); /** * @param ignoreOpacity @c true= do not consider Material opacity. diff --git a/doomsday/engine/portable/include/mapdata.hs b/doomsday/engine/portable/include/mapdata.hs index aa6c3a5770..de55d0bb14 100644 --- a/doomsday/engine/portable/include/mapdata.hs +++ b/doomsday/engine/portable/include/mapdata.hs @@ -75,10 +75,10 @@ internal #define HEDGE_SIDEDEF(he) ((he)->lineDef->sideDefs[(he)->side]) -// Seg flags +// HEdge flags #define HEDGEF_POLYOBJ 0x1 /// < Half-edge is part of a poly object. -// Seg frame flags +// HEdge frame flags #define HEDGEINF_FACINGFRONT 0x0001 end @@ -224,7 +224,7 @@ internal #define PS_inflags surface.inFlags end -struct plane +struct Plane PTR ddmobj_base_t soundOrg // Sound origin for plane PTR sector_s* sector // Owner of the plane (temp) - surface_t surface diff --git a/doomsday/engine/portable/include/p_maptypes.h b/doomsday/engine/portable/include/p_maptypes.h index 12fbbc3b08..1c630ab9c9 100644 --- a/doomsday/engine/portable/include/p_maptypes.h +++ b/doomsday/engine/portable/include/p_maptypes.h @@ -202,8 +202,8 @@ typedef enum { #define PS_offset surface.offset #define PS_visoffset surface.visOffset #define PS_rgba surface.rgba -#define PS_flags surface.flags -#define PS_inflags surface.inFlags +#define PS_flags surface.flags +#define PS_inflags surface.inFlags typedef struct plane_s { runtime_mapdata_header_t header; @@ -218,7 +218,7 @@ typedef struct plane_s { float visHeightDelta; planetype_t type; // PLN_* type. int planeID; -} plane_t; +} Plane; // Helper macros for accessing sector floor/ceiling plane data elements. #define SP_plane(n) planes[(n)] diff --git a/doomsday/engine/portable/include/p_particle.h b/doomsday/engine/portable/include/p_particle.h index dadc186018..c5a25d69a7 100644 --- a/doomsday/engine/portable/include/p_particle.h +++ b/doomsday/engine/portable/include/p_particle.h @@ -109,7 +109,7 @@ typedef struct { // Particle Generator typedef struct ptcgen_s { thinker_t thinker; // Func = P_PtcGenThinker - plane_t* plane; // Flat-triggered. + Plane* plane; // Flat-triggered. const struct ded_ptcgen_s* def; // The definition of this generator. struct mobj_s* source; // If mobj-triggered. int srcid; // Source mobj ID. @@ -167,7 +167,7 @@ void P_SpawnDamageParticleGen(struct mobj_s* mo, struct mobj_s* inflictor, int a * Creates a new flat-triggered particle generator based on the given * definition. The generator is added to the list of active ptcgens. */ -void P_SpawnPlaneParticleGen(const struct ded_ptcgen_s* def, plane_t* plane); +void P_SpawnPlaneParticleGen(const struct ded_ptcgen_s* def, Plane* plane); /** * Called after a reset once the definitions have been re-read. diff --git a/doomsday/engine/portable/include/p_plane.h b/doomsday/engine/portable/include/p_plane.h index d35662e883..3e12d829cd 100644 --- a/doomsday/engine/portable/include/p_plane.h +++ b/doomsday/engine/portable/include/p_plane.h @@ -1,4 +1,4 @@ -/**\file p_plane.h +/**\file plane.h *\section License * License: GPL * Online License Link: http://www.gnu.org/licenses/gpl.html @@ -38,11 +38,11 @@ /** * Get the value of a plane property, selected by DMU_* name. */ -int Plane_GetProperty(const plane_t* plane, setargs_t* args); +int Plane_GetProperty(const Plane* plane, setargs_t* args); /** * Update the plane, property is selected by DMU_* name. */ -int Plane_SetProperty(plane_t* plane, const setargs_t* args); +int Plane_SetProperty(Plane* plane, const setargs_t* args); #endif /* LIBDENG_MAP_PLANE_H */ diff --git a/doomsday/engine/portable/include/r_shadow.h b/doomsday/engine/portable/include/r_shadow.h index fef6c9d76b..1a4c3d7b63 100644 --- a/doomsday/engine/portable/include/r_shadow.h +++ b/doomsday/engine/portable/include/r_shadow.h @@ -93,6 +93,6 @@ int R_IterateShadowProjections(uint listIdx, int (*callback) (const shadowprojec * * @return Found plane else @c NULL if @a mobj is not presently sector-linked. */ -plane_t* R_FindShadowPlane(struct mobj_s* mobj); +Plane* R_FindShadowPlane(struct mobj_s* mobj); #endif /* LIBDENG_REFRESH_SHADOW_H */ diff --git a/doomsday/engine/portable/include/r_world.h b/doomsday/engine/portable/include/r_world.h index 8803837dc3..9a86e3a266 100644 --- a/doomsday/engine/portable/include/r_world.h +++ b/doomsday/engine/portable/include/r_world.h @@ -109,12 +109,12 @@ void R_OrderVertices(const LineDef* line, const Sector* sector, Vertex* verts[2]); boolean R_FindBottomTop(LineDef* lineDef, int side, sidedefsection_t section, float matOffsetX, float matOffsetY, - const plane_t* ffloor, const plane_t* fceil, - const plane_t* bfloor, const plane_t* bceil, + const Plane* ffloor, const Plane* fceil, + const Plane* bfloor, const Plane* bceil, boolean unpegBottom, boolean unpegTop, boolean stretchMiddle, boolean isSelfRef, float* bottom, float* top, float texOffset[2]); -plane_t* R_NewPlaneForSector(Sector* sec); +Plane* R_NewPlaneForSector(Sector* sec); void R_DestroyPlaneOfSector(uint id, Sector* sec); surfacedecor_t* R_CreateSurfaceDecoration(surface_t* suf); @@ -123,8 +123,8 @@ void R_ClearSurfaceDecorations(surface_t* suf); void R_UpdateTrackedPlanes(void); void R_InterpolateTrackedPlanes(boolean resetNextViewer); -void R_AddTrackedPlane(planelist_t* plist, plane_t* pln); -boolean R_RemoveTrackedPlane(planelist_t* plist, const plane_t* pln); +void R_AddTrackedPlane(planelist_t* plist, Plane* pln); +boolean R_RemoveTrackedPlane(planelist_t* plist, const Plane* pln); void R_UpdateSurfaceScroll(void); void R_InterpolateSurfaceScroll(boolean resetNextViewer); @@ -148,7 +148,7 @@ void R_SurfaceListClear(surfacelist_t* sl); */ boolean R_SurfaceListIterate(surfacelist_t* sl, boolean (*callback) (surface_t* suf, void*), void* context); -void R_MarkDependantSurfacesForDecorationUpdate(plane_t* pln); +void R_MarkDependantSurfacesForDecorationUpdate(Plane* pln); /** * To be called in response to a Material property changing which may @@ -157,9 +157,9 @@ void R_MarkDependantSurfacesForDecorationUpdate(plane_t* pln); void R_UpdateMapSurfacesOnMaterialChange(material_t* material); /// @return @c true= @a plane is non-glowing (i.e. not glowing or a sky). -boolean R_IsGlowingPlane(const plane_t* plane); +boolean R_IsGlowingPlane(const Plane* plane); -float R_GlowStrength(const plane_t* pln); +float R_GlowStrength(const Plane* pln); lineowner_t* R_GetVtxLineOwner(const Vertex* vtx, const LineDef* line); LineDef* R_FindLineNeighbor(const Sector* sector, diff --git a/doomsday/engine/portable/src/cl_world.c b/doomsday/engine/portable/src/cl_world.c index 43e6ad49be..a9390a421a 100644 --- a/doomsday/engine/portable/src/cl_world.c +++ b/doomsday/engine/portable/src/cl_world.c @@ -611,8 +611,8 @@ void Cl_ReadSectorDelta2(int deltaType, boolean skip) { /// @todo Skipping is never done nowadays... static Sector dummy; // Used when skipping. - static plane_t* dummyPlaneArray[2]; - static plane_t dummyPlanes[2]; + static Plane* dummyPlaneArray[2]; + static Plane dummyPlanes[2]; GameMap* map = theMap; /// @fixme Do not assume the CURRENT map. unsigned short num; diff --git a/doomsday/engine/portable/src/dam_file.c b/doomsday/engine/portable/src/dam_file.c index e8e6cfec6e..1358fcde39 100644 --- a/doomsday/engine/portable/src/dam_file.c +++ b/doomsday/engine/portable/src/dam_file.c @@ -430,7 +430,7 @@ static void writeSector(const GameMap *map, uint idx) writeLong(s->planeCount); for(i = 0; i < s->planeCount; ++i) { - plane_t *p = s->planes[i]; + Plane *p = s->planes[i]; writeFloat(p->height); writeFloat(p->target); @@ -504,7 +504,7 @@ static void readSector(const GameMap *map, uint idx) numPlanes = (uint) readLong(); for(i = 0; i < numPlanes; ++i) { - plane_t *p = R_NewPlaneForSector(s); + Plane *p = R_NewPlaneForSector(s); p->height = readFloat(); p->target = readFloat(); diff --git a/doomsday/engine/portable/src/edit_map.c b/doomsday/engine/portable/src/edit_map.c index 5b633e6926..15f8ed3eaf 100644 --- a/doomsday/engine/portable/src/edit_map.c +++ b/doomsday/engine/portable/src/edit_map.c @@ -1359,8 +1359,8 @@ static void hardenPlanes(GameMap* dest, editmap_t* src) for(j = 0; j < srcS->planeCount; ++j) { - plane_t* destP = R_NewPlaneForSector(destS); - plane_t* srcP = srcS->planes[j]; + Plane* destP = R_NewPlaneForSector(destS); + Plane* srcP = srcS->planes[j]; destP->height = destP->oldHeight[0] = destP->oldHeight[1] = destP->visHeight = srcP->height; @@ -2212,7 +2212,7 @@ uint MPE_PlaneCreate(uint sector, float height, materialid_t material, { uint i; Sector* s; - plane_t** newList, *pln; + Plane** newList, *pln; if(!editMapInited) return 0; @@ -2222,7 +2222,7 @@ uint MPE_PlaneCreate(uint sector, float height, materialid_t material, s = map->sectors[sector - 1]; - pln = M_Calloc(sizeof(plane_t)); + pln = M_Calloc(sizeof(Plane)); pln->surface.owner = (void*) pln; pln->height = height; Surface_SetMaterial(&pln->surface, Materials_ToMaterial(material)); @@ -2235,7 +2235,7 @@ uint MPE_PlaneCreate(uint sector, float height, materialid_t material, pln->type = (pln->PS_normal[VZ] < 0? PLN_CEILING : PLN_FLOOR); pln->sector = s; - newList = M_Malloc(sizeof(plane_t*) * (++s->planeCount + 1)); + newList = M_Malloc(sizeof(Plane*) * (++s->planeCount + 1)); for(i = 0; i < s->planeCount - 1; ++i) { newList[i] = s->planes[i]; diff --git a/doomsday/engine/portable/src/linedef.c b/doomsday/engine/portable/src/linedef.c index e624781566..f01c479413 100644 --- a/doomsday/engine/portable/src/linedef.c +++ b/doomsday/engine/portable/src/linedef.c @@ -296,7 +296,7 @@ boolean LineDef_MiddleMaterialCoversOpening(const LineDef *line, int side, return false; } -plane_t* LineDef_FloorMin(const LineDef* lineDef) +Plane* LineDef_FloorMin(const LineDef* lineDef) { assert(lineDef); if(!lineDef->L_frontsector) return NULL; // No interfaces. @@ -306,7 +306,7 @@ plane_t* LineDef_FloorMin(const LineDef* lineDef) lineDef->L_backsector->SP_plane(PLN_FLOOR) : lineDef->L_frontsector->SP_plane(PLN_FLOOR); } -plane_t* LineDef_FloorMax(const LineDef* lineDef) +Plane* LineDef_FloorMax(const LineDef* lineDef) { assert(lineDef); if(!lineDef->L_frontsector) return NULL; // No interfaces. @@ -316,7 +316,7 @@ plane_t* LineDef_FloorMax(const LineDef* lineDef) lineDef->L_backsector->SP_plane(PLN_FLOOR) : lineDef->L_frontsector->SP_plane(PLN_FLOOR); } -plane_t* LineDef_CeilingMin(const LineDef* lineDef) +Plane* LineDef_CeilingMin(const LineDef* lineDef) { assert(lineDef); if(!lineDef->L_frontsector) return NULL; // No interfaces. @@ -326,7 +326,7 @@ plane_t* LineDef_CeilingMin(const LineDef* lineDef) lineDef->L_backsector->SP_plane(PLN_CEILING) : lineDef->L_frontsector->SP_plane(PLN_CEILING); } -plane_t* LineDef_CeilingMax(const LineDef* lineDef) +Plane* LineDef_CeilingMax(const LineDef* lineDef) { assert(lineDef); if(!lineDef->L_frontsector) return NULL; // No interfaces. diff --git a/doomsday/engine/portable/src/p_dmu.c b/doomsday/engine/portable/src/p_dmu.c index dce7cf4811..50ba0a41ed 100644 --- a/doomsday/engine/portable/src/p_dmu.c +++ b/doomsday/engine/portable/src/p_dmu.c @@ -443,7 +443,7 @@ uint P_ToIndex(const void* ptr) return GET_BSPNODE_IDX((BspNode*) ptr); case DMU_PLANE: - return GET_PLANE_IDX((plane_t*) ptr); + return GET_PLANE_IDX((Plane*) ptr); case DMU_MATERIAL: return Materials_Id((material_t*) ptr); @@ -525,7 +525,7 @@ int P_Iteratep(void *ptr, uint prop, void* context, int (*callback) (void* p, vo if(sec->planes) { - plane_t** planePtr = sec->planes; + Plane** planePtr = sec->planes; while(*planePtr && !(result = callback(*planePtr, context))) planePtr++; } @@ -913,7 +913,7 @@ static int setProperty(void* obj, void* context) { setargs_t* args = (setargs_t*) context; Sector* updateSector1 = NULL, *updateSector2 = NULL; - plane_t* updatePlane = NULL; + Plane* updatePlane = NULL; LineDef* updateLinedef = NULL; SideDef* updateSidedef = NULL; surface_t* updateSurface = NULL; @@ -1014,7 +1014,7 @@ static int setProperty(void* obj, void* context) if(args->type == DMU_PLANE) { - updatePlane = (plane_t*) obj; + updatePlane = (Plane*) obj; switch(args->prop) { @@ -1041,7 +1041,7 @@ static int setProperty(void* obj, void* context) case DMU_ALPHA: case DMU_BLENDMODE: case DMU_FLAGS: - obj = &((plane_t*) obj)->surface; + obj = &((Plane*) obj)->surface; args->type = DMU_SURFACE; break; @@ -1494,7 +1494,7 @@ static int getProperty(void* obj, void* context) case DMU_ALPHA: case DMU_BLENDMODE: case DMU_FLAGS: - obj = &((plane_t*) obj)->surface; + obj = &((Plane*) obj)->surface; args->type = DMU_SURFACE; break; diff --git a/doomsday/engine/portable/src/p_particle.c b/doomsday/engine/portable/src/p_particle.c index cfa59a4884..99d5ee1471 100644 --- a/doomsday/engine/portable/src/p_particle.c +++ b/doomsday/engine/portable/src/p_particle.c @@ -183,7 +183,7 @@ void P_MapSpawnPlaneParticleGens(void) for(j = 0; j < 2; ++j) { - plane_t* plane = sector->SP_plane(j); + Plane* plane = sector->SP_plane(j); const ded_ptcgen_t* def = Materials_PtcGenDef(plane->PS_material); P_SpawnPlaneParticleGen(def, plane); } @@ -332,19 +332,19 @@ void P_SpawnMobjParticleGen(const ded_ptcgen_t* def, mobj_t* source) static int findGeneratorForPlane(ptcgen_t* gen, void* parameters) { - plane_t* plane = (plane_t*)parameters; + Plane* plane = (Plane*)parameters; if(gen->plane == plane) return true; // Stop iteration. return false; // Continue iteration. } /// @return @c true iff there is an active ptcgen for the given plane. -static boolean GameMap_HasGeneratorForPlane(GameMap* map, plane_t* plane) +static boolean GameMap_HasGeneratorForPlane(GameMap* map, Plane* plane) { assert(map); return 0 != Generators_Iterate(GameMap_Generators(map), findGeneratorForPlane, (void*)plane); } -void P_SpawnPlaneParticleGen(const ded_ptcgen_t* def, plane_t* plane) +void P_SpawnPlaneParticleGen(const ded_ptcgen_t* def, Plane* plane) { GameMap* map = theMap; /// @fixme Do not assume plane is from the CURRENT map. planetype_t relPlane; @@ -604,7 +604,7 @@ static void P_NewParticle(ptcgen_t* gen) else if(gen->plane) { fixed_t radius = gen->stages[pt->stage].radius; - const plane_t* plane = gen->plane; + const Plane* plane = gen->plane; const Sector* sector = gen->plane->sector; const float* bbox = sector->bBox; diff --git a/doomsday/engine/portable/src/p_plane.c b/doomsday/engine/portable/src/p_plane.c index 4f8cf42029..37b09bd72e 100644 --- a/doomsday/engine/portable/src/p_plane.c +++ b/doomsday/engine/portable/src/p_plane.c @@ -1,4 +1,4 @@ -/**\file p_plane.c +/**\file plane.c *\section License * License: GPL * Online License Link: http://www.gnu.org/licenses/gpl.html @@ -27,7 +27,7 @@ #include "de_refresh.h" #include "de_play.h" -int Plane_SetProperty(plane_t* pln, const setargs_t* args) +int Plane_SetProperty(Plane* pln, const setargs_t* args) { switch(args->prop) { @@ -52,7 +52,7 @@ int Plane_SetProperty(plane_t* pln, const setargs_t* args) return false; // Continue iteration. } -int Plane_GetProperty(const plane_t* pln, setargs_t* args) +int Plane_GetProperty(const Plane* pln, setargs_t* args) { switch(args->prop) { diff --git a/doomsday/engine/portable/src/p_surface.c b/doomsday/engine/portable/src/p_surface.c index a3ab7b6084..94db7b831f 100644 --- a/doomsday/engine/portable/src/p_surface.c +++ b/doomsday/engine/portable/src/p_surface.c @@ -40,7 +40,7 @@ boolean Surface_AttachedToMap(surface_t* suf) if(!suf->owner) return false; if(DMU_GetType(suf->owner) == DMU_PLANE) { - Sector* sec = ((plane_t*)suf->owner)->sector; + Sector* sec = ((Plane*)suf->owner)->sector; if(0 == sec->bspLeafCount) return false; } @@ -77,7 +77,7 @@ boolean Surface_SetMaterial(surface_t* suf, material_t* mat) if(DMU_GetType(suf->owner) == DMU_PLANE) { const ded_ptcgen_t* def = Materials_PtcGenDef(mat); - P_SpawnPlaneParticleGen(def, (plane_t*)suf->owner); + P_SpawnPlaneParticleGen(def, (Plane*)suf->owner); } } } diff --git a/doomsday/engine/portable/src/r_lumobjs.c b/doomsday/engine/portable/src/r_lumobjs.c index 1d8dae3213..38426ec896 100644 --- a/doomsday/engine/portable/src/r_lumobjs.c +++ b/doomsday/engine/portable/src/r_lumobjs.c @@ -963,7 +963,7 @@ static boolean createGlowLightForSurface(surface_t* suf, void* paramaters) switch(DMU_GetType(suf->owner)) { case DMU_PLANE: { - plane_t* pln = (plane_t*)suf->owner; + Plane* pln = (Plane*)suf->owner; Sector* sec = pln->sector; const averagecolor_analysis_t* avgColorAmplified; const materialvariantspecification_t* spec; diff --git a/doomsday/engine/portable/src/r_shadow.c b/doomsday/engine/portable/src/r_shadow.c index 1dd7d00237..04f1b65e65 100644 --- a/doomsday/engine/portable/src/r_shadow.c +++ b/doomsday/engine/portable/src/r_shadow.c @@ -353,16 +353,16 @@ int R_IterateShadowProjections(uint listIdx, int (*callback) (const shadowprojec int RIT_FindShadowPlaneIterator(Sector* sector, void* paramaters) { - plane_t** highest = (plane_t**)paramaters; - plane_t* compare = sector->SP_plane(PLN_FLOOR); + Plane** highest = (Plane**)paramaters; + Plane* compare = sector->SP_plane(PLN_FLOOR); if(compare->visHeight > (*highest)->visHeight) *highest = compare; return false; // Continue iteration. } -plane_t* R_FindShadowPlane(mobj_t* mo) +Plane* R_FindShadowPlane(mobj_t* mo) { - plane_t* plane = NULL; + Plane* plane = NULL; assert(mo); if(mo->bspLeaf) { diff --git a/doomsday/engine/portable/src/r_world.c b/doomsday/engine/portable/src/r_world.c index 97b505d629..381e38d76e 100644 --- a/doomsday/engine/portable/src/r_world.c +++ b/doomsday/engine/portable/src/r_world.c @@ -333,7 +333,7 @@ void R_InterpolateSurfaceScroll(boolean resetNextViewer) } } -void R_AddTrackedPlane(planelist_t* plist, plane_t *pln) +void R_AddTrackedPlane(planelist_t* plist, Plane *pln) { uint i; @@ -357,7 +357,7 @@ void R_AddTrackedPlane(planelist_t* plist, plane_t *pln) if(!plist->maxNum) plist->maxNum = 8; - plist->array = Z_Realloc(plist->array, sizeof(plane_t*) * (plist->maxNum + 1), PU_MAP); + plist->array = Z_Realloc(plist->array, sizeof(Plane*) * (plist->maxNum + 1), PU_MAP); } // Add the plane to the list. @@ -365,7 +365,7 @@ void R_AddTrackedPlane(planelist_t* plist, plane_t *pln) plist->array[plist->num] = NULL; // Terminate. } -boolean R_RemoveTrackedPlane(planelist_t *plist, const plane_t *pln) +boolean R_RemoveTrackedPlane(planelist_t *plist, const Plane *pln) { uint i; @@ -380,7 +380,7 @@ boolean R_RemoveTrackedPlane(planelist_t *plist, const plane_t *pln) plist->array[i] = NULL; else memmove(&plist->array[i], &plist->array[i+1], - sizeof(plane_t*) * (plist->num - 1 - i)); + sizeof(Plane*) * (plist->num - 1 - i)); plist->num--; return true; } @@ -403,7 +403,7 @@ void R_UpdateTrackedPlanes(void) for(i = 0; i < plist->num; ++i) { - plane_t* pln = plist->array[i]; + Plane* pln = plist->array[i]; pln->oldHeight[0] = pln->oldHeight[1]; pln->oldHeight[1] = pln->height; @@ -424,7 +424,7 @@ void R_UpdateTrackedPlanes(void) void R_InterpolateTrackedPlanes(boolean resetNextViewer) { planelist_t* plist; - plane_t* pln; + Plane* pln; uint i; if(!theMap) return; @@ -486,7 +486,7 @@ void R_InterpolateTrackedPlanes(boolean resetNextViewer) * decoration origins for surfaces whose material offset is dependant upon * the given plane. */ -void R_MarkDependantSurfacesForDecorationUpdate(plane_t* pln) +void R_MarkDependantSurfacesForDecorationUpdate(Plane* pln) { LineDef** linep; @@ -557,19 +557,19 @@ void R_UpdateMapSurfacesOnMaterialChange(material_t* material) * * @return Ptr to the newly created plane. */ -plane_t* R_NewPlaneForSector(Sector* sec) +Plane* R_NewPlaneForSector(Sector* sec) { surface_t* suf; - plane_t* plane; + Plane* plane; if(!sec) return NULL; // Do wha? // Allocate the new plane. - plane = Z_Malloc(sizeof(plane_t), PU_MAP, 0); + plane = Z_Malloc(sizeof(Plane), PU_MAP, 0); // Resize this sector's plane list. - sec->planes = Z_Realloc(sec->planes, sizeof(plane_t*) * (++sec->planeCount + 1), PU_MAP); + sec->planes = Z_Realloc(sec->planes, sizeof(Plane*) * (++sec->planeCount + 1), PU_MAP); // Add the new plane to the end of the list. sec->planes[sec->planeCount-1] = plane; sec->planes[sec->planeCount] = NULL; // Terminate. @@ -663,7 +663,7 @@ plane_t* R_NewPlaneForSector(Sector* sec) */ void R_DestroyPlaneOfSector(uint id, Sector* sec) { - plane_t* plane, **newList = NULL; + Plane* plane, **newList = NULL; BspLeaf** ssecIter; surfacelist_t* slist; planelist_t* plist; @@ -682,7 +682,7 @@ void R_DestroyPlaneOfSector(uint id, Sector* sec) { uint n; - newList = Z_Malloc(sizeof(plane_t**) * sec->planeCount, PU_MAP, 0); + newList = Z_Malloc(sizeof(Plane**) * sec->planeCount, PU_MAP, 0); // Copy ptrs to the planes. n = 0; @@ -1312,7 +1312,7 @@ void R_MapInitSurfaces(boolean forceUpdate) R_UpdateSector(sec, forceUpdate); for(j = 0; j < sec->planeCount; ++j) { - plane_t* pln = sec->SP_plane(j); + Plane* pln = sec->SP_plane(j); pln->visHeight = pln->oldHeight[0] = pln->oldHeight[1] = pln->height; initSurfaceMaterialOffset(&pln->surface); @@ -1525,7 +1525,7 @@ void R_ClearSectorFlags(void) } } -boolean R_IsGlowingPlane(const plane_t* pln) +boolean R_IsGlowingPlane(const Plane* pln) { /// \fixme We should not need to prepare to determine this. material_t* mat = pln->surface.material; @@ -1536,7 +1536,7 @@ boolean R_IsGlowingPlane(const plane_t* pln) return ((mat && !Material_IsDrawable(mat)) || ms->glowing > 0 || R_IsSkySurface(&pln->surface)); } -float R_GlowStrength(const plane_t* pln) +float R_GlowStrength(const Plane* pln) { material_t* mat = pln->surface.material; if(mat) @@ -1676,7 +1676,7 @@ void R_UpdateLinedefsOfSector(Sector* sec) } } -boolean R_UpdatePlane(plane_t* pln, boolean forceUpdate) +boolean R_UpdatePlane(Plane* pln, boolean forceUpdate) { Sector* sec = pln->sector; boolean changed = false; diff --git a/doomsday/engine/portable/src/rend_decor.c b/doomsday/engine/portable/src/rend_decor.c index 7c6be3d628..5af65c121e 100644 --- a/doomsday/engine/portable/src/rend_decor.c +++ b/doomsday/engine/portable/src/rend_decor.c @@ -73,7 +73,7 @@ typedef struct decorsource_s { // PRIVATE FUNCTION PROTOTYPES --------------------------------------------- static void updateSideSectionDecorations(SideDef* side, sidedefsection_t section); -static void updatePlaneDecorations(plane_t* pln); +static void updatePlaneDecorations(Plane* pln); // EXTERNAL DATA DECLARATIONS ---------------------------------------------- @@ -394,7 +394,7 @@ boolean R_ProjectSurfaceDecorations(surface_t* suf, void* context) break; } case DMU_PLANE: - updatePlaneDecorations((plane_t*)suf->owner); + updatePlaneDecorations((Plane*)suf->owner); break; default: Con_Error("R_ProjectSurfaceDecorations: Internal Error, unknown type %s.", DMU_Str(DMU_GetType(suf->owner))); @@ -545,7 +545,7 @@ static void updateSurfaceDecorations2(surface_t* suf, float offsetS, float offse /** * Generate decorations for a plane. */ -static void updatePlaneDecorations(plane_t* pln) +static void updatePlaneDecorations(Plane* pln) { Sector* sec = pln->sector; surface_t* suf = &pln->surface; @@ -577,7 +577,7 @@ static void updateSideSectionDecorations(SideDef* side, sidedefsection_t section int sid; float offsetS = 0, offsetT = 0; boolean visible = false; - const plane_t* frontCeil, *frontFloor, *backCeil = NULL, *backFloor = NULL; + const Plane* frontCeil, *frontFloor, *backCeil = NULL, *backFloor = NULL; float bottom, top; if(!side->hedges || !side->hedges[0]) diff --git a/doomsday/engine/portable/src/rend_fakeradio.c b/doomsday/engine/portable/src/rend_fakeradio.c index 036c1627e2..a287559b0c 100644 --- a/doomsday/engine/portable/src/rend_fakeradio.c +++ b/doomsday/engine/portable/src/rend_fakeradio.c @@ -1309,7 +1309,7 @@ static void processEdgeShadow(const BspLeaf* bspLeaf, const LineDef* lineDef, uint side, uint planeId, float shadowDark) { const SideDef* sideDef = lineDef->L_side(side? BACK : FRONT); - const plane_t* pln = sideDef->sector->SP_plane(planeId); + const Plane* pln = sideDef->sector->SP_plane(planeId); vec2_t inner[2], outer[2], edgeOpen, sideOpen; const materialvariantspecification_t* spec; const materialsnapshot_t* ms; @@ -1504,7 +1504,7 @@ static void radioBspLeafEdges(const BspLeaf* bspLeaf) { uint pln; for(pln = 0; pln < bspLeaf->sector->planeCount; ++pln) { - const plane_t* plane = bspLeaf->sector->planes[pln]; + const Plane* plane = bspLeaf->sector->planes[pln]; vec[VZ] = vy - plane->visHeight; diff --git a/doomsday/engine/portable/src/rend_main.c b/doomsday/engine/portable/src/rend_main.c index 5a2c729771..a8ade65bc0 100644 --- a/doomsday/engine/portable/src/rend_main.c +++ b/doomsday/engine/portable/src/rend_main.c @@ -378,7 +378,7 @@ void Rend_PreparePlane(rvertex_t* rvertices, size_t numVertices, static void markSideDefSectionsPVisible(HEdge* hedge) { - const plane_t* fceil, *bceil, *ffloor, *bfloor; + const Plane* fceil, *bceil, *ffloor, *bfloor; SideDef* side; uint i; @@ -488,7 +488,7 @@ static void doCalcSegDivisions(walldiv_t* div, const LineDef* line, { for(j = 0; j < scanSec->planeCount && !stopScan; ++j) { - plane_t* pln = scanSec->SP_plane(j); + Plane* pln = scanSec->SP_plane(j); if(pln->visHeight > bottomZ && pln->visHeight < topZ) { @@ -2028,8 +2028,8 @@ static boolean Rend_RenderSeg(BspLeaf* bspLeaf, HEdge* hedge) boolean R_FindBottomTop(LineDef* lineDef, int side, sidedefsection_t section, float matOffsetX, float matOffsetY, - const plane_t* ffloor, const plane_t* fceil, - const plane_t* bfloor, const plane_t* bceil, + const Plane* ffloor, const Plane* fceil, + const Plane* bfloor, const Plane* bceil, boolean unpegBottom, boolean unpegTop, boolean stretchMiddle, boolean isSelfRef, float* bottom, float* top, float texOffset[2]) @@ -2149,7 +2149,7 @@ static boolean Rend_RenderSegTwosided(BspLeaf* bspLeaf, HEdge* hedge) float bottom, top, texOffset[2]; Sector* frontSec, *backSec; SideDef* frontSide, *backSide; - plane_t* ffloor, *fceil, *bfloor, *bceil; + Plane* ffloor, *fceil, *bfloor, *bceil; LineDef* line; int solidSeg = false; @@ -2412,14 +2412,14 @@ static __inline float skyCapZ(BspLeaf* bspLeaf, int skyCap) return bspLeaf->sector->SP_planevisheight(plane); } -static __inline float skyFixFloorZ(const plane_t* frontFloor, const plane_t* backFloor) +static __inline float skyFixFloorZ(const Plane* frontFloor, const Plane* backFloor) { if(P_IsInVoid(viewPlayer)) return frontFloor->visHeight; return skyFix[PLN_FLOOR].height; } -static __inline float skyFixCeilZ(const plane_t* frontCeil, const plane_t* backCeil) +static __inline float skyFixCeilZ(const Plane* frontCeil, const Plane* backCeil) { if(P_IsInVoid(viewPlayer)) return frontCeil->visHeight; @@ -2451,13 +2451,13 @@ static int segSkyFixes(HEdge* hedge) // Lower fix? if(hasSkyFloor) { - const plane_t* ffloor = frontSec->SP_plane(PLN_FLOOR); - const plane_t* bfloor = backSec? backSec->SP_plane(PLN_FLOOR) : NULL; + const Plane* ffloor = frontSec->SP_plane(PLN_FLOOR); + const Plane* bfloor = backSec? backSec->SP_plane(PLN_FLOOR) : NULL; const float skyZ = skyFixFloorZ(ffloor, bfloor); if(hasClosedBack || (!R_IsSkySurface(&bfloor->surface) || P_IsInVoid(viewPlayer))) { - const plane_t* floor = (bfloor && R_IsSkySurface(&bfloor->surface)? bfloor : ffloor); + const Plane* floor = (bfloor && R_IsSkySurface(&bfloor->surface)? bfloor : ffloor); if(floor->visHeight > skyZ) fixes |= SKYCAP_LOWER; } @@ -2466,13 +2466,13 @@ static int segSkyFixes(HEdge* hedge) // Upper fix? if(hasSkyCeiling) { - const plane_t* fceil = frontSec->SP_plane(PLN_CEILING); - const plane_t* bceil = backSec? backSec->SP_plane(PLN_CEILING) : NULL; + const Plane* fceil = frontSec->SP_plane(PLN_CEILING); + const Plane* bceil = backSec? backSec->SP_plane(PLN_CEILING) : NULL; const float skyZ = skyFixCeilZ(fceil, bceil); if(hasClosedBack || (!R_IsSkySurface(&bceil->surface) || P_IsInVoid(viewPlayer))) { - const plane_t* ceil = (bceil && R_IsSkySurface(&bceil->surface)? bceil : fceil); + const Plane* ceil = (bceil && R_IsSkySurface(&bceil->surface)? bceil : fceil); if(ceil->visHeight < skyZ) fixes |= SKYCAP_UPPER; } @@ -2493,10 +2493,10 @@ static void skyFixZCoords(HEdge* hedge, int skyCap, float* bottom, float* top) { const Sector* frontSec = hedge->HE_frontsector; const Sector* backSec = hedge->HE_backsector; - const plane_t* ffloor = frontSec->SP_plane(PLN_FLOOR); - const plane_t* fceil = frontSec->SP_plane(PLN_CEILING); - const plane_t* bceil = backSec? backSec->SP_plane(PLN_CEILING) : NULL; - const plane_t* bfloor = backSec? backSec->SP_plane(PLN_FLOOR) : NULL; + const Plane* ffloor = frontSec->SP_plane(PLN_FLOOR); + const Plane* fceil = frontSec->SP_plane(PLN_CEILING); + const Plane* bceil = backSec? backSec->SP_plane(PLN_CEILING) : NULL; + const Plane* bfloor = backSec? backSec->SP_plane(PLN_FLOOR) : NULL; if(!bottom && !top) return; if(bottom) *bottom = 0; @@ -2841,7 +2841,7 @@ static void Rend_RenderBspLeaf(uint bspLeafIdx) // Render all planes of this sector. for(i = 0; i < sect->planeCount; ++i) { - const plane_t* plane = sect->planes[i]; + const Plane* plane = sect->planes[i]; const surface_t* suf = &plane->surface; boolean isSkyMasked = false; boolean addDLights = true; @@ -3046,7 +3046,7 @@ void Rend_RenderSurfaceVectors(void) for(j = 0; j < bspLeaf->sector->planeCount; ++j) { - plane_t* pln = bspLeaf->sector->SP_plane(j); + Plane* pln = bspLeaf->sector->SP_plane(j); vec3_t origin; V3_Set(origin, bspLeaf->midPoint.pos[VX], bspLeaf->midPoint.pos[VY], pln->visHeight); diff --git a/doomsday/engine/portable/src/rend_shadow.c b/doomsday/engine/portable/src/rend_shadow.c index c6a64715f5..728957e5a4 100644 --- a/doomsday/engine/portable/src/rend_shadow.c +++ b/doomsday/engine/portable/src/rend_shadow.c @@ -80,7 +80,7 @@ static void processMobjShadow(mobj_t* mo) { float moz, moh, halfmoh, heightFromSurface, distanceFromViewer = 0; float mobjOrigin[3], shadowRadius, shadowStrength; - plane_t* plane; + Plane* plane; Mobj_OriginSmoothed(mo, mobjOrigin);