Browse Source

🚚 Rename 'LightStruct' struct to 'Light'

pull/2812/head
Juliano Leal Goncalves 5 years ago committed by Anders Jenbo
parent
commit
a91074d470
  1. 2
      Source/diablo.cpp
  2. 4
      Source/lighting.cpp
  3. 6
      Source/lighting.h
  4. 4
      Source/loadsave.cpp
  5. 2
      Source/player.cpp

2
Source/diablo.cpp

@ -1138,7 +1138,7 @@ void UpdateMonsterLights()
continue;
}
LightStruct *lid = &Lights[monster.mlid];
Light *lid = &Lights[monster.mlid];
if (monster.position.tile != lid->position.tile) {
ChangeLightXY(monster.mlid, monster.position.tile);
}

4
Source/lighting.cpp

@ -14,10 +14,10 @@
namespace devilution {
LightStruct VisionList[MAXVISION];
Light VisionList[MAXVISION];
int VisionCount;
int VisionId;
LightStruct Lights[MAXLIGHTS];
Light Lights[MAXLIGHTS];
uint8_t ActiveLights[MAXLIGHTS];
int ActiveLightCount;
char LightsMax;

6
Source/lighting.h

@ -26,7 +26,7 @@ struct LightPosition {
Point old;
};
struct LightStruct {
struct Light {
LightPosition position;
int _lradius;
int _lid;
@ -36,10 +36,10 @@ struct LightStruct {
bool _lflags;
};
extern LightStruct VisionList[MAXVISION];
extern Light VisionList[MAXVISION];
extern int VisionCount;
extern int VisionId;
extern LightStruct Lights[MAXLIGHTS];
extern Light Lights[MAXLIGHTS];
extern uint8_t ActiveLights[MAXLIGHTS];
extern int ActiveLightCount;
extern char LightsMax;

4
Source/loadsave.cpp

@ -764,7 +764,7 @@ void LoadQuest(LoadHelper *file, int i)
file->Skip(sizeof(int32_t)); // Skip DoomQuestState
}
void LoadLighting(LoadHelper *file, LightStruct *pLight)
void LoadLighting(LoadHelper *file, Light *pLight)
{
pLight->position.tile.x = file->NextLE<int32_t>();
pLight->position.tile.y = file->NextLE<int32_t>();
@ -1404,7 +1404,7 @@ void SaveQuest(SaveHelper *file, int i)
file->Skip(sizeof(int32_t)); // Skip DoomQuestState
}
void SaveLighting(SaveHelper *file, LightStruct *pLight)
void SaveLighting(SaveHelper *file, Light *pLight)
{
file->WriteLE<int32_t>(pLight->position.tile.x);
file->WriteLE<int32_t>(pLight->position.tile.y);

2
Source/player.cpp

@ -225,7 +225,7 @@ void PmChangeLightOff(Player &player)
if (player._plid == NO_LIGHT)
return;
const LightStruct *l = &Lights[player._plid];
const Light *l = &Lights[player._plid];
int x = 2 * player.position.offset.deltaY + player.position.offset.deltaX;
int y = 2 * player.position.offset.deltaY - player.position.offset.deltaX;

Loading…
Cancel
Save