Browse Source

🚚 Rename 'PortalStruct' struct to 'Portal'

pull/2815/head
Juliano Leal Goncalves 5 years ago committed by Anders Jenbo
parent
commit
4ea9cd539e
  1. 4
      Source/loadsave.cpp
  2. 2
      Source/portal.cpp
  3. 4
      Source/portal.h

4
Source/loadsave.cpp

@ -783,7 +783,7 @@ void LoadLighting(LoadHelper *file, Light *pLight)
void LoadPortal(LoadHelper *file, int i) void LoadPortal(LoadHelper *file, int i)
{ {
PortalStruct *pPortal = &Portals[i]; Portal *pPortal = &Portals[i];
pPortal->open = file->NextBool32(); pPortal->open = file->NextBool32();
pPortal->position.x = file->NextLE<int32_t>(); pPortal->position.x = file->NextLE<int32_t>();
@ -1423,7 +1423,7 @@ void SaveLighting(SaveHelper *file, Light *pLight)
void SavePortal(SaveHelper *file, int i) void SavePortal(SaveHelper *file, int i)
{ {
PortalStruct *pPortal = &Portals[i]; Portal *pPortal = &Portals[i];
file->WriteLE<uint32_t>(pPortal->open ? 1 : 0); file->WriteLE<uint32_t>(pPortal->open ? 1 : 0);
file->WriteLE<int32_t>(pPortal->position.x); file->WriteLE<int32_t>(pPortal->position.x);

2
Source/portal.cpp

@ -14,7 +14,7 @@
namespace devilution { namespace devilution {
/** In-game state of portals. */ /** In-game state of portals. */
PortalStruct Portals[MAXPORTAL]; Portal Portals[MAXPORTAL];
namespace { namespace {

4
Source/portal.h

@ -12,7 +12,7 @@ namespace devilution {
#define MAXPORTAL 4 #define MAXPORTAL 4
struct PortalStruct { struct Portal {
bool open; bool open;
Point position; Point position;
int level; int level;
@ -20,7 +20,7 @@ struct PortalStruct {
bool setlvl; bool setlvl;
}; };
extern PortalStruct Portals[MAXPORTAL]; extern Portal Portals[MAXPORTAL];
void InitPortals(); void InitPortals();
void SetPortalStats(int i, bool o, int x, int y, int lvl, dungeon_type lvltype); void SetPortalStats(int i, bool o, int x, int y, int lvl, dungeon_type lvltype);

Loading…
Cancel
Save