summaryrefslogtreecommitdiff
path: root/event
diff options
context:
space:
mode:
authorRemy Oukaour <remy.oukaour@gmail.com>2017-12-16 19:00:50 -0500
committerRemy Oukaour <remy.oukaour@gmail.com>2017-12-16 19:00:50 -0500
commit25a3960646548c40af70f9f59bed544f4ce8d472 (patch)
tree8b0bade10dbb09b2d4221a00f9bbbae7ed78dd7c /event
parent05d49f7d752b03cbccb2fdcca2781a8a5de85425 (diff)
Move some more main.asm routines into individual files
Diffstat (limited to 'event')
-rwxr-xr-xevent/misc_scripts.asm (renamed from event/itemball.asm)8
-rw-r--r--event/misc_scripts_2.asm (renamed from event/hidden_items.asm)0
-rw-r--r--event/std_collision.asm29
3 files changed, 37 insertions, 0 deletions
diff --git a/event/itemball.asm b/event/misc_scripts.asm
index ed0c6a9e0..97372a57a 100755
--- a/event/itemball.asm
+++ b/event/misc_scripts.asm
@@ -1,3 +1,11 @@
+Script_AbortBugContest: ; 0x122c1
+ checkflag ENGINE_BUG_CONTEST_TIMER
+ iffalse .finish
+ setflag ENGINE_DAILY_BUG_CONTEST
+ special ContestReturnMons
+.finish
+ end
+
FindItemInBallScript:: ; 0x122ce
callasm .TryReceiveItem
iffalse .no_room
diff --git a/event/hidden_items.asm b/event/misc_scripts_2.asm
index c4c51d5e6..c4c51d5e6 100644
--- a/event/hidden_items.asm
+++ b/event/misc_scripts_2.asm
diff --git a/event/std_collision.asm b/event/std_collision.asm
new file mode 100644
index 000000000..17b1e49b2
--- /dev/null
+++ b/event/std_collision.asm
@@ -0,0 +1,29 @@
+CheckFacingTileForStd:: ; 1365b
+; Checks to see if the tile you're facing has a std script associated with it. If so, executes the script and returns carry.
+ ld a, c
+ ld de, 3
+ ld hl, TileCollisionStdScripts
+ call IsInArray
+ jr nc, .notintable
+
+ ld a, jumpstd_command
+ ld [wJumpStdScriptBuffer], a
+ inc hl
+ ld a, [hli]
+ ld [wJumpStdScriptBuffer + 1], a
+ ld a, [hli]
+ ld [wJumpStdScriptBuffer + 2], a
+ ld a, BANK(Script_JumpStdFromRAM)
+ ld hl, Script_JumpStdFromRAM
+ call CallScript
+ scf
+ ret
+
+.notintable
+ xor a
+ ret
+
+INCLUDE "data/collision_stdscripts.asm"
+
+Script_JumpStdFromRAM: ; 0x1369a
+ jump wJumpStdScriptBuffer