Browse Source

sethealing

SBird1337 7 years ago
parent
commit
17078dbee7

+ 12
- 1
patches/game_engine/quick_hacks.asm View File

@@ -81,4 +81,15 @@ PLAYER_S_M EQU 0
81 81
 .byte 0x5
82 82
 
83 83
 .org 0x08054A06
84
-.byte 0x0
84
+.byte 0x0
85
+
86
+.org 0x0807F5EC
87
+.word scr_whiteout_mom
88
+
89
+.org 0x0807F5CC
90
+.word scr_whiteout_center
91
+
92
+.org 0x080BFD54
93
+ldr r0, =whiteout_hook|1
94
+bx r0
95
+.pool

+ 1
- 1
sots-private

@@ -1 +1 @@
1
-Subproject commit 2e7288290d8843a9323c3cf7c1742809eb5b44ad
1
+Subproject commit 40bfd538e204a662376e4e708e90e2cc5673b6e4

+ 33
- 0
src/game_engine/whiteout_hook.s View File

@@ -0,0 +1,33 @@
1
+#include <config.h>
2
+
3
+.align 2
4
+.thumb
5
+.text
6
+
7
+.global whiteout_hook
8
+whiteout_hook:
9
+ldr r0, =HEALING_BANK_MAP_VAR
10
+bl var_get_rekt
11
+lsl r1, r0, #0x18
12
+lsr r0, r0, #8
13
+lsr r1, r1, #0x18
14
+strb r1, [r4]
15
+strb r0, [r4,#1]
16
+mov r0, #0xFF
17
+strb r0, [r4, #2]
18
+ldr r0, =HEALING_X_VAR
19
+bl var_get_rekt
20
+lsl r0, #0x10
21
+lsr r0, #0x10
22
+strh r0, [r4, #4]
23
+ldr r0, =HEALING_Y_VAR
24
+bl var_get_rekt
25
+lsl r0, #0x10
26
+lsr r0, #0x10
27
+strh r0, [r4,#6]
28
+ldr r0, =0x080BFDF5
29
+bx r0
30
+
31
+var_get_rekt:
32
+ldr r1, =var_get
33
+bx r1

+ 4
- 0
src/include/config.h View File

@@ -39,6 +39,10 @@
39 39
 /*Variable for controlling evolutions*/
40 40
 #define EVO_VAR 0x500D
41 41
 
42
+#define HEALING_BANK_MAP_VAR 0x500E
43
+#define HEALING_X_VAR 0x500F
44
+#define HEALING_Y_VAR 0x5010
45
+
42 46
 /*Variables to control the music overrides*/
43 47
 #define VAR_FROM_1 0x51FA
44 48
 #define VAR_FROM_2 0x51FB

+ 4
- 3
src/include/script_language.h View File

@@ -826,9 +826,10 @@ clearflag FLAG_ENABLE_MUSIC_OVERRIDES
826 826
 .hword \checkanimation_animation
827 827
 .endm
828 828
 
829
-.macro sethealingplace sethealingplace_flightspot:req
830
-.byte 0x9F
831
-.hword \sethealingplace_flightspot
829
+.macro sethealingplace shp_bank:req shp_map:req shp_x:req shp_y:req
830
+    setvar HEALING_BANK_MAP_VAR \shp_map << 8 | \shp_bank
831
+    setvar HEALING_X_VAR \shp_x
832
+    setvar HEALING_Y_VAR \shp_y
832 833
 .endm
833 834
 
834 835
 .macro checkgender