Merge branch 'romhack' into lighting

This commit is contained in:
Ariel A 2022-06-28 00:07:23 -04:00
commit 090dc6b294
7 changed files with 11 additions and 5 deletions

View File

@ -12,10 +12,10 @@
"allow_running": true, "allow_running": true,
"show_map_name": true, "show_map_name": true,
"battle_scene": "MAP_BATTLE_SCENE_NORMAL", "battle_scene": "MAP_BATTLE_SCENE_NORMAL",
"connections": null, "connections": 0,
"object_events": [ "object_events": [
{ {
"graphics_id": "OBJ_EVENT_GFX_REGISTEEL", "graphics_id": "OBJ_EVENT_GFX_OW_MON",
"x": 8, "x": 8,
"y": 7, "y": 7,
"elevation": 3, "elevation": 3,
@ -51,7 +51,9 @@
"dest_warp_id": 1 "dest_warp_id": 1
} }
], ],
"coord_events": [], "coord_events": [
],
"bg_events": [ "bg_events": [
{ {
"type": "sign", "type": "sign",

View File

@ -25,6 +25,7 @@ EventScript_UseCut::
end end
EventScript_CutTreeDown:: EventScript_CutTreeDown::
setflag FLAG_SAFE_FOLLOWER_MOVEMENT
applymovement VAR_LAST_TALKED, Movement_CutTreeDown applymovement VAR_LAST_TALKED, Movement_CutTreeDown
waitmovement 0 waitmovement 0
removeobject VAR_LAST_TALKED removeobject VAR_LAST_TALKED

Binary file not shown.

Before

Width:  |  Height:  |  Size: 546 B

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 418 B

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 488 B

After

Width:  |  Height:  |  Size: 7.1 KiB

View File

@ -1,5 +1,6 @@
#include "global.h" #include "global.h"
#include "event_data.h" #include "event_data.h"
#include "event_object_movement.h"
#include "field_camera.h" #include "field_camera.h"
#include "field_effect.h" #include "field_effect.h"
#include "script.h" #include "script.h"
@ -214,6 +215,7 @@ static void DoBrailleRegirockEffect(void)
PlaySE(SE_BANG); PlaySE(SE_BANG);
FlagSet(FLAG_SYS_REGIROCK_PUZZLE_COMPLETED); FlagSet(FLAG_SYS_REGIROCK_PUZZLE_COMPLETED);
ScriptContext2_Disable(); ScriptContext2_Disable();
UnfreezeObjectEvents();
} }
bool8 ShouldDoBrailleRegisteelEffect(void) bool8 ShouldDoBrailleRegisteelEffect(void)
@ -253,6 +255,7 @@ static void DoBrailleRegisteelEffect(void)
PlaySE(SE_BANG); PlaySE(SE_BANG);
FlagSet(FLAG_SYS_REGISTEEL_PUZZLE_COMPLETED); FlagSet(FLAG_SYS_REGISTEEL_PUZZLE_COMPLETED);
ScriptContext2_Disable(); ScriptContext2_Disable();
UnfreezeObjectEvents();
} }
// theory: another commented out DoBrailleWait and Task_BrailleWait. // theory: another commented out DoBrailleWait and Task_BrailleWait.

View File

@ -105,6 +105,7 @@ bool8 ScrCmd_nop1(struct ScriptContext *ctx)
bool8 ScrCmd_end(struct ScriptContext *ctx) bool8 ScrCmd_end(struct ScriptContext *ctx)
{ {
FlagClear(FLAG_SAFE_FOLLOWER_MOVEMENT);
StopScript(ctx); StopScript(ctx);
return FALSE; return FALSE;
} }
@ -295,6 +296,7 @@ bool8 ScrCmd_returnram(struct ScriptContext *ctx)
bool8 ScrCmd_endram(struct ScriptContext *ctx) bool8 ScrCmd_endram(struct ScriptContext *ctx)
{ {
FlagClear(FLAG_SAFE_FOLLOWER_MOVEMENT);
ClearRamScript(); ClearRamScript();
StopScript(ctx); StopScript(ctx);
return TRUE; return TRUE;
@ -1270,7 +1272,6 @@ bool8 ScrCmd_releaseall(struct ScriptContext *ctx)
{ {
u8 playerObjectId; u8 playerObjectId;
struct ObjectEvent *followerObject = GetFollowerObject(); struct ObjectEvent *followerObject = GetFollowerObject();
FlagClear(FLAG_SAFE_FOLLOWER_MOVEMENT);
// Release follower from movement iff it exists and is in the shadowing state // Release follower from movement iff it exists and is in the shadowing state
if (followerObject && gSprites[followerObject->spriteId].data[1] == 0) if (followerObject && gSprites[followerObject->spriteId].data[1] == 0)
ClearObjectEventMovement(followerObject, &gSprites[followerObject->spriteId]); ClearObjectEventMovement(followerObject, &gSprites[followerObject->spriteId]);
@ -1287,7 +1288,6 @@ bool8 ScrCmd_release(struct ScriptContext *ctx)
{ {
u8 playerObjectId; u8 playerObjectId;
struct ObjectEvent *followerObject = GetFollowerObject(); struct ObjectEvent *followerObject = GetFollowerObject();
FlagClear(FLAG_SAFE_FOLLOWER_MOVEMENT);
// Release follower from movement iff it exists and is in the shadowing state // Release follower from movement iff it exists and is in the shadowing state
if (followerObject && gSprites[followerObject->spriteId].data[1] == 0) if (followerObject && gSprites[followerObject->spriteId].data[1] == 0)
ClearObjectEventMovement(followerObject, &gSprites[followerObject->spriteId]); ClearObjectEventMovement(followerObject, &gSprites[followerObject->spriteId]);