Skip to content

Commit 8e68dc8

Browse files
committed
Removed all indents from ifdef preprocessor directives
This makes them a lot easier to find, since they get used often.
1 parent 6fc45a3 commit 8e68dc8

File tree

12 files changed

+181
-179
lines changed

12 files changed

+181
-179
lines changed

ttyd-tools/rel/include/global.h

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -802,13 +802,13 @@ struct MemoryCardStruct
802802
{
803803
SettingsFileName = "rel_settings";
804804

805-
#ifdef TTYD_US
805+
#ifdef TTYD_US
806806
SettingsDescription = "Practice Codes Settings (US)";
807-
#elif defined TTYD_JP
807+
#elif defined TTYD_JP
808808
SettingsDescription = "Practice Codes Settings (JP)";
809-
#elif defined TTYD_EU
809+
#elif defined TTYD_EU
810810
SettingsDescription = "Practice Codes Settings (EU)";
811-
#endif
811+
#endif
812812

813813
RelFileName = "rel";
814814
}
@@ -864,11 +864,11 @@ struct WarpByEventInventoryStruct
864864

865865
struct WarpByEventDetailsStruct
866866
{
867-
#ifdef TTYD_JP
867+
#ifdef TTYD_JP
868868
char Stage[8];
869-
#else
869+
#else
870870
const char *Stage;
871-
#endif
871+
#endif
872872

873873
const char *Event;
874874
const char *Partner;
@@ -995,12 +995,14 @@ extern uint8_t OnScreenTimerOptionsSize;
995995
extern uint8_t WarpDestinationsSize;
996996

997997
#ifdef TTYD_JP
998+
extern const char *ButtonInputDisplay[];
998999
extern const char *CheatsEventNames[];
9991000
extern const char *WarpsEventNames[];
1000-
extern const char *ButtonInputDisplay[];
10011001
extern const char *PointerText;
10021002
extern uint16_t WarpsEventNamesSize;
1003-
#else
1003+
#endif
1004+
1005+
#ifndef TTYD_JP
10041006
extern const char ButtonInputDisplay[];
10051007
#endif
10061008

ttyd-tools/rel/include/ttyd/event.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ struct EventStageEventDescription
1515
uint16_t pad_6;
1616
char *textId;
1717
char *nameJp;
18-
#ifndef TTYD_JP
18+
#ifndef TTYD_JP
1919
char *nameEn;
20-
#endif
20+
#endif
2121
char *map;
2222
char *bero;
2323
void (*pfnInit)();
@@ -26,9 +26,9 @@ struct EventStageEventDescription
2626
struct EventStageDescription
2727
{
2828
char *nameJp;
29-
#ifndef TTYD_JP
29+
#ifndef TTYD_JP
3030
char *nameEn;
31-
#endif
31+
#endif
3232
EventStageEventDescription *pEvents;
3333
int32_t eventCount;
3434
} __attribute__((__packed__));

ttyd-tools/rel/include/ttyd/mario.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,9 @@ struct Player
7070
float unk_184;
7171
float unk_188;
7272
float wPlayerEffectiveSpeed;
73-
#ifndef TTYD_JP
73+
#ifndef TTYD_JP
7474
float unk_190;
75-
#endif
75+
#endif
7676
float wControlStickSensitivity;
7777
float wControlStickAngle;
7878
float unk_19c;
@@ -119,11 +119,11 @@ struct Player
119119
uint8_t unk_259;
120120
uint16_t unk_25a;
121121
uint32_t unk_25c;
122-
#ifdef TTYD_JP
122+
#ifdef TTYD_JP
123123
uint8_t gap_260[68];
124-
#else
124+
#else
125125
uint8_t gap_260[88];
126-
#endif
126+
#endif
127127
float wMultiVal1;
128128
float wYoshiHoverHeight;
129129
float wCamVal1;

ttyd-tools/rel/include/ttyd/memory.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ struct HeapEnd
3636
void *pHeap2End;
3737
void *pHeap3End;
3838
void *pHeap4End;
39-
#ifdef TTYD_JP
39+
#ifdef TTYD_JP
4040
void *pHeap5End;
41-
#endif
41+
#endif
4242
} __attribute__((__packed__));
4343

4444
struct HeapStart
@@ -48,9 +48,9 @@ struct HeapStart
4848
void *pHeap2Start;
4949
void *pHeap3Start;
5050
void *pHeap4Start;
51-
#ifdef TTYD_JP
51+
#ifdef TTYD_JP
5252
void *pHeap5Start;
53-
#endif
53+
#endif
5454
} __attribute__((__packed__));
5555

5656
enum SmartAllocationGroup

ttyd-tools/rel/source/codes.cpp

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -110,13 +110,13 @@ void *fallThroughMostObjects(void *ptr)
110110

111111
void Mod::performBattleChecks()
112112
{
113-
#ifdef TTYD_US
113+
#ifdef TTYD_US
114114
const uint32_t DebugBadgeAddressOffset = 0x307;
115-
#elif defined TTYD_JP
115+
#elif defined TTYD_JP
116116
const uint32_t DebugBadgeAddressOffset = 0x303;
117-
#elif defined TTYD_EU
117+
#elif defined TTYD_EU
118118
const uint32_t DebugBadgeAddressOffset = 0x30B;
119-
#endif
119+
#endif
120120

121121
// Make sure Mario is in the battle before making any changes
122122
uint32_t MarioBattlePointer = reinterpret_cast<uint32_t>(getMarioBattlePointer());
@@ -318,13 +318,13 @@ void saveAnywhere()
318318
return;
319319
}
320320

321-
#ifdef TTYD_US
321+
#ifdef TTYD_US
322322
void *SaveScriptEvtCode = reinterpret_cast<void *>(0x803BAC3C);
323-
#elif defined TTYD_JP
323+
#elif defined TTYD_JP
324324
void *SaveScriptEvtCode = reinterpret_cast<void *>(0x803B68BC);
325-
#elif defined TTYD_EU
325+
#elif defined TTYD_EU
326326
void *SaveScriptEvtCode = reinterpret_cast<void *>(0x803C6C4C);
327-
#endif
327+
#endif
328328

329329
// Take away control from the player and start the Save script
330330
ttyd::evtmgr::EvtEntry *SaveScriptEvt = ttyd::evtmgr::evtEntryType(SaveScriptEvtCode, 0, 0, 0);
@@ -1354,9 +1354,9 @@ void displayBlimpTicketSkipDetails()
13541354
double StickAngle = getStickAngle(nullptr);
13551355
double UpRightAngleStart = 25;
13561356

1357-
#ifdef TTYD_JP
1357+
#ifdef TTYD_JP
13581358
UpRightAngleStart += 2;
1359-
#endif
1359+
#endif
13601360

13611361
if (StickAngle >= UpRightAngleStart)
13621362
{
@@ -1421,13 +1421,13 @@ int32_t Mod::displayActionCommandsTimingHook(void *battleUnitPtr, ttyd::battle_u
14211421
uint32_t MarioBattlePointer = reinterpret_cast<uint32_t>(getMarioBattlePointer());
14221422
if (MarioBattlePointer)
14231423
{
1424-
#ifdef TTYD_US
1424+
#ifdef TTYD_US
14251425
const uint32_t DebugBadgeAddressOffset = 0x307;
1426-
#elif defined TTYD_JP
1426+
#elif defined TTYD_JP
14271427
const uint32_t DebugBadgeAddressOffset = 0x303;
1428-
#elif defined TTYD_EU
1428+
#elif defined TTYD_EU
14291429
const uint32_t DebugBadgeAddressOffset = 0x30B;
1430-
#endif
1430+
#endif
14311431

14321432
uint8_t DebugBadgeCheck = *reinterpret_cast<uint8_t *>(MarioBattlePointer + DebugBadgeAddressOffset);
14331433
if (DebugBadgeCheck > 0)

ttyd-tools/rel/source/commonfunctions.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,13 @@ bool checkIfInGame()
6969
return false;
7070
}
7171

72-
#ifdef TTYD_US
72+
#ifdef TTYD_US
7373
const uint32_t DMO = 0x4;
74-
#elif defined TTYD_JP
74+
#elif defined TTYD_JP
7575
const uint32_t DMO = 0x5;
76-
#elif defined TTYD_EU
76+
#elif defined TTYD_EU
7777
const uint32_t DMO = 0x5;
78-
#endif
78+
#endif
7979

8080
return CurrentRelModuleInfo->id != DMO;
8181
}

0 commit comments

Comments
 (0)