From a91074d470413dacd121da036f84ec76c03f5ed3 Mon Sep 17 00:00:00 2001 From: Juliano Leal Goncalves Date: Mon, 6 Sep 2021 01:10:26 -0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=9A=20Rename=20'LightStruct'=20struct?= =?UTF-8?q?=20to=20'Light'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Source/diablo.cpp | 2 +- Source/lighting.cpp | 4 ++-- Source/lighting.h | 6 +++--- Source/loadsave.cpp | 4 ++-- Source/player.cpp | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Source/diablo.cpp b/Source/diablo.cpp index 47236d4e1..bfd6e85b5 100644 --- a/Source/diablo.cpp +++ b/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); } diff --git a/Source/lighting.cpp b/Source/lighting.cpp index 05b07a642..221b2a8a2 100644 --- a/Source/lighting.cpp +++ b/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; diff --git a/Source/lighting.h b/Source/lighting.h index a2d0bb6a8..cc859752a 100644 --- a/Source/lighting.h +++ b/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; diff --git a/Source/loadsave.cpp b/Source/loadsave.cpp index 9bedb9e48..1fd1218bb 100644 --- a/Source/loadsave.cpp +++ b/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(); pLight->position.tile.y = file->NextLE(); @@ -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(pLight->position.tile.x); file->WriteLE(pLight->position.tile.y); diff --git a/Source/player.cpp b/Source/player.cpp index 171a1a5cb..ca7fd8e2c 100644 --- a/Source/player.cpp +++ b/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;