mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-24 18:54:15 +01:00
Fix tests breaking on modern (#3319)
* Fix tests breaking on modern * modern tests fix - macro and rodata changes * ld script rodata modern
This commit is contained in:
parent
a073e7bd59
commit
136ea395ac
@ -837,7 +837,8 @@ void SendOut(u32 sourceLine, struct BattlePokemon *, u32 partyIndex);
|
||||
#define ABILITY_POPUP(battler, ...) QueueAbility(__LINE__, battler, (struct AbilityEventContext) { __VA_ARGS__ })
|
||||
#define ANIMATION(type, id, ...) QueueAnimation(__LINE__, type, id, (struct AnimationEventContext) { __VA_ARGS__ })
|
||||
#define HP_BAR(battler, ...) QueueHP(__LINE__, battler, (struct HPEventContext) { APPEND_TRUE(__VA_ARGS__) })
|
||||
#define MESSAGE(pattern) QueueMessage(__LINE__, (const u8 []) _(pattern))
|
||||
// Static const is needed to make the modern compiler put the pattern variable in the .rodata section, instead of putting it on stack(which can break the game).
|
||||
#define MESSAGE(pattern) do {static const u8 msg[] = _(pattern); QueueMessage(__LINE__, msg);} while (0)
|
||||
#define STATUS_ICON(battler, status) QueueStatus(__LINE__, battler, (struct StatusEventContext) { status })
|
||||
|
||||
enum QueueGroupType
|
||||
|
@ -84,9 +84,9 @@ SECTIONS {
|
||||
.rodata :
|
||||
ALIGN(4)
|
||||
{
|
||||
src/*.o(.rodata);
|
||||
gflib/*.o(.rodata);
|
||||
data/*.o(.rodata);
|
||||
src/*.o(.rodata*);
|
||||
gflib/*.o(.rodata*);
|
||||
data/*.o(.rodata*);
|
||||
} =0
|
||||
|
||||
song_data :
|
||||
@ -111,7 +111,7 @@ SECTIONS {
|
||||
test/*.o(.tests);
|
||||
__stop_tests = .;
|
||||
test/*.o(.text);
|
||||
test/*.o(.rodata);
|
||||
test/*.o(.rodata*);
|
||||
} =0
|
||||
|
||||
/* DWARF debug sections.
|
||||
|
@ -250,4 +250,3 @@ DOUBLE_BATTLE_TEST("Stockpile's Def and Sp. Def boost is lost after using Spit U
|
||||
EXPECT_MUL_EQ(results[2].dmgSpecialBefore, UQ_4_12(1.0), results[2].dmgSpecialAfter);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user