summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSlawter666 <38655737+Slawter666@users.noreply.github.com>2018-09-11 02:04:03 +0100
committerSlawter666 <38655737+Slawter666@users.noreply.github.com>2018-09-11 02:04:03 +0100
commitb6ee8823f021a7da98cf84d5fc8a6b8609d1630f (patch)
tree805d6da90d33914270e333adbfb9c2d1a46b5f7c
parentbcea321494f3cab1284325e73cca7f796961d963 (diff)
Move field_special_scene data to C
-rw-r--r--data/field_special_scene.s15
-rw-r--r--ld_script.txt2
-rw-r--r--src/field_special_scene.c24
3 files changed, 13 insertions, 28 deletions
diff --git a/data/field_special_scene.s b/data/field_special_scene.s
deleted file mode 100644
index 16e5a366d..000000000
--- a/data/field_special_scene.s
+++ /dev/null
@@ -1,15 +0,0 @@
- .include "asm/macros.inc"
- .include "constants/constants.inc"
-
- .section .rodata
-
- .align 2, 0
-
-gTruckCamera_HorizontalTable:: @ 858E898
- .byte 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 2, 2, 2, 2, 2, -1, -1, -1, 0
-
-gUnknown_0858E8AB:: @ 858E8AB
- .byte 0x18, 0xFE
-
-gUnknown_0858E8AD:: @ 858E8AD
- .byte 0x17, 0xFE
diff --git a/ld_script.txt b/ld_script.txt
index e9f59350e..678939e64 100644
--- a/ld_script.txt
+++ b/ld_script.txt
@@ -454,7 +454,7 @@ SECTIONS {
data/script_pokemon_util_80F87D8.o(.rodata);
src/pokemon_size_record.o(.rodata)
data/field_effect_misc.o(.rodata);
- data/field_special_scene.o(.rodata);
+ src/field_special_scene.o(.rodata);
src/rotating_gate.o(.rodata);
data/item_use.o(.rodata);
data/battle_anim_80FE840.o(.rodata);
diff --git a/src/field_special_scene.c b/src/field_special_scene.c
index c6cb0741d..1cabf63d6 100644
--- a/src/field_special_scene.c
+++ b/src/field_special_scene.c
@@ -1,22 +1,21 @@
#include "global.h"
-#include "task.h"
-#include "sprite.h"
+#include "event_data.h"
#include "event_object_movement.h"
-#include "constants/songs.h"
-#include "sound.h"
+#include "main.h"
#include "palette.h"
#include "script.h"
+#include "script_movement.h"
+#include "sound.h"
+#include "sprite.h"
+#include "task.h"
+#include "constants/songs.h"
#include "constants/vars.h"
-#include "event_data.h"
-#include "main.h"
#define SECONDS(value) ((signed) (60.0 * value + 0.5))
extern u8 GetSSTidalLocation(s8 *, s8 *, s16 *, s16 *); // should be in field_specials.h
extern void Overworld_SetWarpDestination(s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y);
-extern bool8 ScriptMovement_IsObjectMovementFinished(u8, u8, u8);
extern bool32 CountSSTidalStep(u16);
-extern bool8 ScriptMovement_StartObjectMovementScript(u8, u8, u8, u8 *);
extern void copy_saved_warp2_bank_and_enter_x_to_warp1(u8 unused);
extern void sp13E_warp_to_last_warp(void);
extern void saved_warp2_set(int unused, s8 mapGroup, s8 mapNum, s8 warpId);
@@ -38,11 +37,12 @@ extern void pal_fill_black(void);
extern void MapGridSetMetatileIdAt(s32 x, s32 y, u16 metatileId);
extern void DrawWholeMapView();
-extern s8 gTruckCamera_HorizontalTable[];
-
-extern u8 gUnknown_0858E8AB[];
-extern u8 gUnknown_0858E8AD[];
+//. rodata
+static const s8 gTruckCamera_HorizontalTable[] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 2, 2, 2, 2, 2, -1, -1, -1, 0};
+const u8 gUnknown_0858E8AB[] = {0x18, 0xFE};
+const u8 gUnknown_0858E8AD[] = {0x17, 0xFE};
+// .text
void Task_Truck3(u8);
s16 GetTruckCameraBobbingY(int a1)