Cleanup pt1

- Moved Tracks to the end of field effect scripts
- Restored whitespace in scripts to minimize conflicts
- Restored data/maps/map_groups.json
- Proper tab uses in scripts
- Allow SHADOW_SIZE_XL to be used
This commit is contained in:
Eduardo Quezada 2023-06-17 23:22:19 -04:00
parent 621ca115a2
commit 4bbe3278d6
11 changed files with 25 additions and 24 deletions

View File

@ -132,14 +132,6 @@ gFieldEffectScript_SandFootprints::
field_eff_loadfadedpal_callnative gSpritePalette_GeneralFieldEffect0, FldEff_SandFootprints
field_eff_end
gFieldEffectScript_TracksBug::
field_eff_loadfadedpal_callnative gSpritePalette_GeneralFieldEffect0, FldEff_TracksBug
field_eff_end
gFieldEffectScript_TracksSpot::
field_eff_loadfadedpal_callnative gSpritePalette_GeneralFieldEffect0, FldEff_TracksSpot
field_eff_end
gFieldEffectScript_JumpBigSplash::
field_eff_loadfadedpal_callnative gSpritePalette_GeneralFieldEffect0, FldEff_JumpBigSplash
field_eff_end
@ -229,10 +221,6 @@ gFieldEffectScript_BikeTireTracks::
field_eff_loadfadedpal_callnative gSpritePalette_GeneralFieldEffect0, FldEff_BikeTireTracks
field_eff_end
gFieldEffectScript_TracksSlither::
field_eff_loadfadedpal_callnative gSpritePalette_GeneralFieldEffect0, FldEff_TracksSlither
field_eff_end
gFieldEffectScript_SandDisguisePlaceholder::
field_eff_callnative ShowSandDisguiseFieldEffect
field_eff_end
@ -358,3 +346,15 @@ gFieldEffectScript_DestroyDeoxysRock::
gFieldEffectScript_MoveDeoxysRock::
field_eff_callnative FldEff_MoveDeoxysRock
field_eff_end
gFieldEffectScript_TracksBug::
field_eff_loadfadedpal_callnative gSpritePalette_GeneralFieldEffect0, FldEff_TracksBug
field_eff_end
gFieldEffectScript_TracksSpot::
field_eff_loadfadedpal_callnative gSpritePalette_GeneralFieldEffect0, FldEff_TracksSpot
field_eff_end
gFieldEffectScript_TracksSlither::
field_eff_loadfadedpal_callnative gSpritePalette_GeneralFieldEffect0, FldEff_TracksSlither
field_eff_end

View File

@ -83,3 +83,4 @@ AncientTomb_EventScript_RanFromRegisteel::
setvar VAR_0x8004, SPECIES_REGISTEEL
goto Common_EventScript_LegendaryFlewAway
end

View File

@ -83,3 +83,4 @@ DesertRuins_EventScript_RanFromRegirock::
setvar VAR_0x8004, SPECIES_REGIROCK
goto Common_EventScript_LegendaryFlewAway
end

View File

@ -1,5 +1,5 @@
MossdeepCity_Gym_MapScripts::
map_script MAP_SCRIPT_ON_TRANSITION, MossdeepCity_Gym_OnTransition
map_script MAP_SCRIPT_ON_TRANSITION, MossdeepCity_Gym_OnTransition
map_script MAP_SCRIPT_ON_LOAD, MossdeepCity_Gym_OnLoad
.byte 0
@ -7,7 +7,7 @@ MossdeepCity_Gym_MapScripts::
MossdeepCity_Gym_OnTransition:
setflag FLAG_TEMP_HIDE_FOLLOWER @ Hide follower since it can collide with moving statues
end
end
@ All the below checks are leftover from RS. FLAG_MOSSDEEP_GYM_SWITCH_X is never set
MossdeepCity_Gym_OnLoad:

View File

@ -438,3 +438,4 @@ SlateportCity_OceanicMuseum_2F_Text_SSAnneReplica:
.string "“S.S. ANNE\p"
.string "“A replica of the luxury liner that\n"
.string "circles the globe.”$"

View File

@ -495,7 +495,7 @@ SootopolisCity_EventScript_RayquazaSceneFromPokeCenter::
removeobject LOCALID_GROUDON
removeobject LOCALID_KYOGRE
addobject LOCALID_RAYQUAZA
hideobjectat LOCALID_RAYQUAZA, MAP_SOOTOPOLIS_CITY
hideobjectat LOCALID_RAYQUAZA, MAP_SOOTOPOLIS_CITY
setvar VAR_0x8004, TRUE
special Script_DoRayquazaScene
waitstate

View File

@ -1,5 +1,4 @@
{
"layouts_table_label": "gMapLayouts",
"group_order": [
"gMapGroup_TownsAndRoutes",
"gMapGroup_IndoorLittleroot",

View File

@ -133,7 +133,7 @@ BattleFrontier_BattlePikeThreePathRoom_EventScript_NoTurningBack::
lockall
msgbox BattleFrontier_BattlePike_Text_PathBlockedNoTurningBack, MSGBOX_DEFAULT
closemessage
releaseall
releaseall
end
BattleFrontier_BattlePikeRoomNormal_EventScript_SetEnteredRoom::
@ -147,7 +147,7 @@ BattleFrontier_BattlePikeRoomNormal_EventScript_NoTurningBack::
lockall
msgbox BattleFrontier_BattlePike_Text_PathBlockedNoTurningBack, MSGBOX_DEFAULT
closemessage
releaseall
releaseall
end
BattleFrontier_BattlePikeRoomNormal_EventScript_Exit::
@ -216,7 +216,7 @@ BattleFrontier_BattlePikeRoomWildMons_EventScript_NoTurningBack::
lockall
msgbox BattleFrontier_BattlePike_Text_PathBlockedNoTurningBack, MSGBOX_DEFAULT
closemessage
releaseall
releaseall
end
BattleFrontier_BattlePike_EventScript_Retire::

View File

@ -1,5 +1,5 @@
EventScript_UseFlash::
animateflash 1
setflashlevel 1
releaseall
releaseall
end

View File

@ -289,8 +289,7 @@
#define SHADOW_SIZE_S 0
#define SHADOW_SIZE_M 1
#define SHADOW_SIZE_L 2
#define SHADOW_SIZE_XL 3 // unused; repurposed to mean no shadow
#define SHADOW_SIZE_NONE 3
#define SHADOW_NONE 3 // Originally SHADOW_SIZE_XL, which went unused due to shadowSize in ObjectEventGraphicsInfo being only 2 bits.
#define F_INANIMATE (1 << 6)
#define F_DISABLE_REFLECTION_PALETTE_LOAD (1 << 7)

View File

@ -320,8 +320,8 @@ u32 FldEff_Shadow(void)
}
objectEventId = GetObjectEventIdByLocalIdAndMap(gFieldEffectArguments[0], gFieldEffectArguments[1], gFieldEffectArguments[2]);
graphicsInfo = GetObjectEventGraphicsInfo(gObjectEvents[objectEventId].graphicsId);
if (graphicsInfo->shadowSize == SHADOW_SIZE_NONE) // don't create a shadow at all
return 0;
if (graphicsInfo->shadowSize == SHADOW_NONE) // don't create a shadow at all
return 0;
spriteId = CreateSpriteAtEnd(gFieldEffectObjectTemplatePointers[sShadowEffectTemplateIds[graphicsInfo->shadowSize]], 0, 0, 0x94);
if (spriteId != MAX_SPRITES)
{