mirror of
https://github.com/SAT-R/sa2.git
synced 2026-10-28 09:43:38 +00:00
more changes for sa1 sa2 merge
- Migrate specific game headers into their own folders - Remove headers from sa1 codebase which can be referenced from sa2
This commit is contained in:
1 parent
eca97cd122
commit
d355f290fe
525 files changed
+9511
-23180
No files matched your search
Vendored
+2
-2
@@ -5,7 +5,7 @@
|
||||
"includePath": [
|
||||
"${workspaceFolder}/include/**"
|
||||
],
|
||||
"defines": ["PLATFORM_GBA=1"],
|
||||
"defines": ["PLATFORM_GBA=1", "GAME=GAME_SA2"],
|
||||
"compilerPath": "/usr/bin/gcc",
|
||||
"cStandard": "gnu17",
|
||||
"cppStandard": "gnu++17",
|
||||
@@ -17,7 +17,7 @@
|
||||
"includePath": [
|
||||
"${workspaceFolder}/sa1/include/**"
|
||||
],
|
||||
"defines": ["PLATFORM_GBA=1", "GAME=1"],
|
||||
"defines": ["PLATFORM_GBA=1", "GAME=GAME_SA1"],
|
||||
"compilerPath": "/usr/bin/gcc",
|
||||
"cStandard": "gnu17",
|
||||
"cppStandard": "gnu++17",
|
||||
|
||||
@@ -229,7 +229,7 @@ FORMAT_H_PATHS := $(shell find . -name "*.h" ! -path '*/build/*' ! -path '*/ex
|
||||
# -P disables line markers (don't EVER use this, if you want proper debug info!)
|
||||
# -I sets an include path
|
||||
# -D defines a symbol
|
||||
CPPFLAGS ?= $(INCLUDE_CPP_ARGS) -D $(GAME_REGION)
|
||||
CPPFLAGS ?= $(INCLUDE_CPP_ARGS) -D $(GAME_REGION) -D GAME=$(GAME)
|
||||
CC1FLAGS ?= -Wimplicit -Wparentheses -Werror
|
||||
|
||||
ifneq ($(GAME_VARIANT), DEFAULT)
|
||||
@@ -497,13 +497,13 @@ data/sa2/mb_chao_garden_japan.gba.lz: data/sa2/mb_chao_garden_japan.gba
|
||||
$(GFX) $< $@ -search 1
|
||||
|
||||
%interactables.bin: %interactables.csv
|
||||
$(ENT_POS) $< $@ -entities INTERACTABLES -header "./include/constants/interactables.h"
|
||||
$(ENT_POS) $< $@ -entities INTERACTABLES -header "./include/constants/sa2/interactables.h"
|
||||
|
||||
%itemboxes.bin: %itemboxes.csv
|
||||
$(ENT_POS) $< $@ -entities ITEMS -header "./include/constants/items.h"
|
||||
$(ENT_POS) $< $@ -entities ITEMS -header "./include/constants/sa2/items.h"
|
||||
|
||||
%enemies.bin: %enemies.csv
|
||||
$(ENT_POS) $< $@ -entities ENEMIES -header "./include/constants/enemies.h"
|
||||
$(ENT_POS) $< $@ -entities ENEMIES -header "./include/constants/sa2/enemies.h"
|
||||
|
||||
%rings.bin: %rings.csv
|
||||
$(ENT_POS) $< $@ -entities RINGS
|
||||
|
||||
@@ -54,6 +54,7 @@ endif
|
||||
GAME_REVISION ?= 0
|
||||
GAME_REGION ?= USA
|
||||
GAME_VARIANT ?= DEFAULT
|
||||
GAME ?= GAME_SA2
|
||||
DEBUG ?= 0
|
||||
|
||||
# For gbafix
|
||||
@@ -63,8 +64,8 @@ MAKER_CODE := 78
|
||||
BUILD_NAME := sa2
|
||||
TITLE := SONICADVANC2
|
||||
GAME_CODE := A2N
|
||||
PS2_GAME_CODE := SLUS_054.02
|
||||
|
||||
PS2_GAME_CODE := SLUS_054.02
|
||||
|
||||
# Revision
|
||||
ifeq ($(GAME_REVISION), 0)
|
||||
|
||||
+3
-2
@@ -13,8 +13,9 @@
|
||||
#define ENGINE_3 3
|
||||
#define ENGINE_4 4
|
||||
|
||||
// TODO: Define this in Makefile through a compiler macro?
|
||||
#define GAME GAME_SA2
|
||||
#ifndef GAME
|
||||
#error GAME must be defined to compile
|
||||
#endif
|
||||
|
||||
// TODO: Do SA1 and SA2 use the same engine ver?
|
||||
// TODO: Do SA3 and KATAM use the same engine ver?
|
||||
|
||||
File renamed without changes.
File renamed without changes.
@@ -4,7 +4,7 @@
|
||||
/* Collection of animation indices for Sonic Advance 1.
|
||||
* - By JaceCear
|
||||
*/
|
||||
#include "constants/anim_sizes.h"
|
||||
#include "constants/sa1/anim_sizes.h"
|
||||
|
||||
/**************************** SA1 ****************************/
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -4,7 +4,7 @@
|
||||
/* Collection of animation indices for Sonic Advance 1.
|
||||
* - By JaceCear
|
||||
*/
|
||||
#include "constants/anim_sizes.h"
|
||||
#include "constants/sa2/anim_sizes.h"
|
||||
|
||||
/**************************** SA1 ****************************/
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,24 @@
|
||||
#ifndef GUARD_CONSTANTS_MP_MAP_INTERACTABLES_H
|
||||
#define GUARD_CONSTANTS_MP_MAP_INTERACTABLES_H
|
||||
|
||||
// Used for the Single Pak, "Collect Rings" stage
|
||||
#define IA__MP_IA000 0 // => IA001
|
||||
#define IA__MP_IA001 1 // => IA002
|
||||
#define IA__MP_IA002 2 // => IA003
|
||||
#define IA__MP_IA003 3 // => IA003
|
||||
#define IA__MP_IA004 4 // => IA001
|
||||
#define IA__MP_IA005 5 // => IA002
|
||||
#define IA__MP_IA006 6 // => IA008
|
||||
#define IA__MP_IA007 7 // => IA009
|
||||
#define IA__MP_IA008 8 // => IA010
|
||||
#define IA__MP_IA009 9 // => IA010
|
||||
#define IA__MP_IA010 10 // => IA012
|
||||
#define IA__MP_IA011 11 // => IA012
|
||||
#define IA__MP_TOGGLE_PLAYER_LAYER__FRONT 12
|
||||
#define IA__MP_TOGGLE_PLAYER_LAYER__BACK 13
|
||||
#define IA__MP_IA014 14 // => IA021
|
||||
#define IA__MP_IA015 15 // => IA022
|
||||
#define IA__MP_IA016 16 // => IA040
|
||||
#define IA__MP_IA017 17 // => IA115
|
||||
|
||||
#endif // GUARD_CONSTANTS_MP_MAP_INTERACTABLES_H
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,134 @@
|
||||
#ifndef GUARD_SA1_UI_GRAPHICS_H
|
||||
#define GUARD_SA1_UI_GRAPHICS_H
|
||||
|
||||
#define UIGFX_ASCII_CHARS 0
|
||||
#define UIGFX_UI_ICON_SONIC 1
|
||||
#define UIGFX_UI_ICON_TAILS 2
|
||||
#define UIGFX_UI_ICON_KNUCKLES 3
|
||||
#define UIGFX_UI_ICON_AMY 4
|
||||
#define UIGFX_UI_ICON_RING 5
|
||||
#define UIGFX_STGINTRO_ZIGZAG_SONIC 6
|
||||
#define UIGFX_STGINTRO_ZIGZAG_TAILS 7
|
||||
#define UIGFX_STGINTRO_ZIGZAG_KNUCKLES 8
|
||||
#define UIGFX_STGINTRO_ZIGZAG_AMY 9
|
||||
#define UIGFX_STGINTRO_CHAR_NAMES 10
|
||||
#define UIGFX_STGRESULT_SONIC 11
|
||||
#define UIGFX_STGRESULT_TAILS 12
|
||||
#define UIGFX_STGRESULT_KNUCKLES 13
|
||||
#define UIGFX_STGRESULT_AMY 14
|
||||
#define UIGFX_STGRESULT_ACT12 15
|
||||
#define UIGFX_STGRESULT_HEADLINE_BACK 16
|
||||
#define UIGFX_STGNAMES_JP_0 17
|
||||
#define UIGFX_18 18
|
||||
#define UIGFX_STGNAME_1 19
|
||||
#define UIGFX_STGNAME_2 20
|
||||
#define UIGFX_STGNAME_3 21
|
||||
#define UIGFX_STGNAME_4 22
|
||||
#define UIGFX_STGNAME_5 23
|
||||
#define UIGFX_STGNAME_6 24
|
||||
#define UIGFX_STGNAME_7 25
|
||||
#define UIGFX_26 26
|
||||
#define UIGFX_27 27
|
||||
#define UIGFX_28 28
|
||||
#define UIGFX_29 29
|
||||
#define UIGFX_30 30
|
||||
#define UIGFX_31 31
|
||||
#define UIGFX_TIMER_DIGITS 32
|
||||
#define UIGFX_OK 33
|
||||
#define UIGFX_34 34
|
||||
#define UIGFX_35 35
|
||||
#define UIGFX_36 36
|
||||
#define UIGFX_37 37
|
||||
#define UIGFX_38 38
|
||||
#define UIGFX_39 39
|
||||
#define UIGFX_40 40
|
||||
#define UIGFX_41 41
|
||||
#define UIGFX_42 42
|
||||
#define UIGFX_43 43
|
||||
#define UIGFX_CHAR_SELECT_OK 44
|
||||
#define UIGFX_CHAR_SELECT_BLACK_BOX_2 45
|
||||
#define UIGFX_CHAR_SP_STAGE_RINGS_BG 46
|
||||
#define UIGFX_47 47
|
||||
#define UIGFX_48 48
|
||||
#define UIGFX_49 49
|
||||
#define UIGFX_50 50
|
||||
#define UIGFX_51 51
|
||||
#define UIGFX_52 52
|
||||
#define UIGFX_53 53
|
||||
#define UIGFX_54 54
|
||||
#define UIGFX_55 55
|
||||
#define UIGFX_56 56
|
||||
#define UIGFX_57 57
|
||||
#define UIGFX_58 58
|
||||
#define UIGFX_59 59
|
||||
#define UIGFX_60 60
|
||||
#define UIGFX_61 61
|
||||
#define UIGFX_62 62
|
||||
#define UIGFX_63 63
|
||||
#define UIGFX_64 64
|
||||
#define UIGFX_65 65
|
||||
#define UIGFX_66 66
|
||||
#define UIGFX_67 67
|
||||
#define UIGFX_68 68
|
||||
#define UIGFX_69 69
|
||||
#define UIGFX_70 70
|
||||
#define UIGFX_71 71
|
||||
#define UIGFX_72 72
|
||||
#define UIGFX_73 73
|
||||
#define UIGFX_74 74
|
||||
#define UIGFX_75 75
|
||||
#define UIGFX_76 76
|
||||
#define UIGFX_77 77
|
||||
#define UIGFX_78 78
|
||||
#define UIGFX_79 79
|
||||
#define UIGFX_80 80
|
||||
#define UIGFX_81 81
|
||||
#define UIGFX_82 82
|
||||
#define UIGFX_83 83
|
||||
#define UIGFX_84 84
|
||||
#define UIGFX_85 85
|
||||
#define UIGFX_86 86
|
||||
#define UIGFX_87 87
|
||||
#define UIGFX_88 88
|
||||
#define UIGFX_89 89
|
||||
#define UIGFX_90 90
|
||||
#define UIGFX_91 91
|
||||
#define UIGFX_92 92
|
||||
#define UIGFX_93 93
|
||||
#define UIGFX_94 94
|
||||
#define UIGFX_95 95
|
||||
#define UIGFX_96 96
|
||||
#define UIGFX_97 97
|
||||
#define UIGFX_98 98
|
||||
#define UIGFX_99 99
|
||||
#define UIGFX_100 100
|
||||
#define UIGFX_101 101
|
||||
#define UIGFX_102 102
|
||||
#define UIGFX_103 103
|
||||
#define UIGFX_104 104
|
||||
#define UIGFX_105 105
|
||||
#define UIGFX_106 106
|
||||
#define UIGFX_107 107
|
||||
#define UIGFX_108 108
|
||||
#define UIGFX_109 109
|
||||
#define UIGFX_110 110
|
||||
#define UIGFX_111 111
|
||||
#define UIGFX_112 112
|
||||
#define UIGFX_113 113
|
||||
#define UIGFX_114 114
|
||||
#define UIGFX_115 115
|
||||
#define UIGFX_116 116
|
||||
#define UIGFX_117 117
|
||||
#define UIGFX_118 118
|
||||
#define UIGFX_119 119
|
||||
#define UIGFX_120 120
|
||||
#define UIGFX_121 121
|
||||
#define UIGFX_122 122
|
||||
#define UIGFX_123 123
|
||||
#define UIGFX_124 124
|
||||
#define UIGFX_125 125
|
||||
#define UIGFX_126 126
|
||||
#define UIGFX_127 127
|
||||
#define UIGFX_OPTIONS 128
|
||||
|
||||
#endif // GUARD_SA1_UI_GRAPHICS_H
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -2,7 +2,7 @@
|
||||
#define SA1_UI_GRAPHICS_H
|
||||
#include "global.h"
|
||||
|
||||
#include "constants/ui_graphics.h"
|
||||
#include "constants/sa1/ui_graphics.h"
|
||||
|
||||
/* This file was created using './scripts/extract_ui_graphics_data.py'.
|
||||
If you want to change a name or some other property,
|
||||
@@ -2,7 +2,7 @@
|
||||
#define GUARD_SA2_DATA_INPUT_COMBOS
|
||||
|
||||
#include "types.h"
|
||||
#include "constants/characters.h"
|
||||
#include "constants/sa2/characters.h"
|
||||
|
||||
extern const u8 *const *const gUnknown_08C871D4[NUM_CHARACTERS];
|
||||
|
||||
|
||||
+29
-13
@@ -19,15 +19,7 @@
|
||||
#define GAME_MODE_MULTI_PLAYER_COLLECT_RINGS 5
|
||||
#endif
|
||||
|
||||
// TODO: not verfied yet but all instances of this condition
|
||||
// seem to be compiled out in collect rings
|
||||
#ifndef COLLECT_RINGS_ROM
|
||||
#define IS_COLLECT_RINGS_MINIGAME (gGameMode == GAME_MODE_MULTI_PLAYER_COLLECT_RINGS)
|
||||
#else
|
||||
#define IS_COLLECT_RINGS_MINIGAME TRUE
|
||||
#endif
|
||||
|
||||
// TODO: Improve this name; SA1 only?
|
||||
// TODO: Improve this name
|
||||
#define IS_MP_OR_TEAM_PLAY ((gGameMode == GAME_MODE_MULTI_PLAYER) || (gGameMode == GAME_MODE_TEAM_PLAY))
|
||||
|
||||
#if (GAME == GAME_SA1)
|
||||
@@ -106,16 +98,26 @@ typedef struct {
|
||||
|
||||
// Incomplete
|
||||
extern u8 gDemoPlayCounter;
|
||||
|
||||
#if (GAME == GAME_SA1)
|
||||
extern u16 ALIGNED(4) gSpecialStageReturnX;
|
||||
#endif
|
||||
|
||||
extern u8 gGameMode;
|
||||
|
||||
extern s8 gCurrentLevel;
|
||||
extern s8 gSelectedCharacter;
|
||||
#if (GAME == GAME_SA1)
|
||||
extern bool8 gTailsEnabled;
|
||||
// NOTE: Treat gTailsEnabled as bool8, it just does not match unsigned
|
||||
extern s8 gTailsEnabled;
|
||||
extern s8 gNumSingleplayerCharacters;
|
||||
#define NUM_SINGLEPLAYER_CHARS_MAX 2
|
||||
#elif (GAME == GAME_SA2)
|
||||
extern u8 gNumSingleplayerCharacters;
|
||||
#endif
|
||||
|
||||
extern u8 gMultiplayerLanguage;
|
||||
extern s8 gMultiplayerCurrentLevel;
|
||||
|
||||
// Sometimes loaded as s16, but as u16 most of the time.
|
||||
// If you encounter it being loaded as s16, please cast it.
|
||||
@@ -131,14 +133,20 @@ extern u8 gSpecialRingCount;
|
||||
|
||||
// TODO: Types not checked yet!
|
||||
extern s32 gWorldSpeedY;
|
||||
#if (GAME == GAME_SA2)
|
||||
extern s32 gWorldSpeedX;
|
||||
#endif
|
||||
|
||||
extern u16 gBossCameraClampYLower;
|
||||
extern u16 gBossCameraClampYUpper;
|
||||
extern u8 gRandomItemBox;
|
||||
#if (GAME == GAME_SA1)
|
||||
extern u16 gSpecialStageCollectedRings;
|
||||
extern u16 gUnknown_0300507C;
|
||||
#endif
|
||||
extern u8 gSpikesUnknownTimer;
|
||||
|
||||
extern s8 gUnknown_0300543C;
|
||||
extern s8 SA2_LABEL(gUnknown_0300543C);
|
||||
extern struct Task *gEntitiesManagerTask;
|
||||
|
||||
extern u8 gDestroySpotlights;
|
||||
@@ -154,8 +162,7 @@ extern u8 gDifficultyLevel;
|
||||
|
||||
extern s8 gTrappedAnimalVariant;
|
||||
|
||||
extern u8 gBossIndex; // TODO: Boss ID in XX-Stage? But it's used in checkpointc.c ...
|
||||
extern u8 gNumSingleplayerCharacters;
|
||||
extern u8 gBossIndex; // TODO: Rename to gLastCheckpointIndex? (SA1 AND SA2!)
|
||||
|
||||
// Incremented by 1 every frame if the game is not paused.
|
||||
// Starts before the stage-timer that is used for scores does.
|
||||
@@ -179,7 +186,13 @@ extern u8 gMultiplayerMissingHeartbeats[4];
|
||||
extern u8 gActiveCollectRingEffectCount;
|
||||
|
||||
extern u8 gMultiplayerUnlockedCharacters;
|
||||
|
||||
#if (GAME == GAME_SA1)
|
||||
extern u16 gSpecialStageReturnY;
|
||||
#elif (GAME == GAME_SA2)
|
||||
extern u8 gMultiplayerUnlockedLevels;
|
||||
#endif
|
||||
|
||||
extern u32 gMultiplayerIds[MULTI_SIO_PLAYERS_MAX];
|
||||
extern u16 gMultiplayerNames[MULTI_SIO_PLAYERS_MAX][MAX_PLAYER_NAME_LENGTH];
|
||||
|
||||
@@ -244,6 +257,9 @@ void LinkCommunicationError(void);
|
||||
})
|
||||
|
||||
#if (GAME == GAME_SA1) && !defined(BUG_FIX)
|
||||
// NOTE: gNumLives is u8, so without the bounds-check,
|
||||
// which SA1 did not have, 255 would overflow to 0.
|
||||
// During regular gameplay you would not get that many 1UPs, though.
|
||||
#define LIVES_BOUND_CHECK_A(lives) (lives)
|
||||
#define LIVES_BOUND_CHECK_B(lives) (lives)
|
||||
#define NEW_LIVE_COUNT(_type, _varname, _inc) (gNumLives += 1)
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+1
-1
@@ -6,7 +6,7 @@
|
||||
#include "game/sa1/ui/game_over.h"
|
||||
#include "game/sa1/save.h"
|
||||
#include "sprite.h"
|
||||
#include "constants/text.h"
|
||||
#include "constants/sa1/text.h"
|
||||
|
||||
#define NUM_LANGSCRN_SPRITES_TYPE_1 6
|
||||
#define NUM_LANGSCRN_SPRITES_TYPE_2 3
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -4,8 +4,8 @@
|
||||
#include "global.h"
|
||||
#include "game/globals.h"
|
||||
|
||||
#include "constants/zones.h"
|
||||
#include "constants/characters.h"
|
||||
#include "constants/sa1/zones.h"
|
||||
#include "constants/sa1/characters.h"
|
||||
|
||||
#define PLAYER_NAME_END_CHAR 0xFFFF
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+1
-1
@@ -2,7 +2,7 @@
|
||||
#define GUARD_STAGE_DATA_H
|
||||
|
||||
#include "global.h"
|
||||
#include "constants/zones.h"
|
||||
#include "constants/sa1/zones.h"
|
||||
|
||||
extern const s16 gSpawnPositions[NUM_LEVEL_IDS_SP][2];
|
||||
extern const s16 gSpawnPositions_Modes_4_and_5[NUM_LEVEL_IDS_MP][MULTI_SIO_PLAYERS_MAX][2];
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -5,7 +5,7 @@
|
||||
#include "game/sa2/save.h"
|
||||
#include "sprite.h"
|
||||
#include "game/sa2/stage/screen_fade.h"
|
||||
#include "constants/text.h"
|
||||
#include "constants/sa2/text.h"
|
||||
#include "game/sa2/stage/player_controls.h"
|
||||
|
||||
#define RENDER_TARGET_SCREEN 0
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
#include "game/globals.h"
|
||||
|
||||
#include "game/sa2/stage/player_controls.h"
|
||||
#include "constants/zones.h"
|
||||
#include "constants/characters.h"
|
||||
#include "constants/sa2/zones.h"
|
||||
#include "constants/sa2/characters.h"
|
||||
|
||||
#define PLAYER_NAME_END_CHAR 0xFFFF
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#include "global.h"
|
||||
#include "sprite.h" // for the 'AnimId' type
|
||||
#include "constants/zones.h"
|
||||
#include "constants/sa2/zones.h"
|
||||
|
||||
#define SPRITE_ARRAY_END \
|
||||
{ \
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define GUARD_SPECIAL_STAGE_TABLES_H
|
||||
|
||||
#include "global.h"
|
||||
#include "constants/zones.h"
|
||||
#include "constants/sa2/zones.h"
|
||||
|
||||
extern const s16 gUnknown_080DF9D8[][3];
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#include "global.h"
|
||||
#include "sprite.h"
|
||||
#include "constants/characters.h"
|
||||
#include "constants/sa2/characters.h"
|
||||
|
||||
void sub_801561C(void);
|
||||
void sub_8015750(void);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef GUARD_PLAYER_SUPER_SONIC_H
|
||||
#define GUARD_PLAYER_SUPER_SONIC_H
|
||||
|
||||
#include "constants/zones.h"
|
||||
#include "constants/sa2/zones.h"
|
||||
|
||||
struct SuperSonic;
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef GUARD_PARAMETERS_CHARACTERS_H
|
||||
#define GUARD_PARAMETERS_CHARACTERS_H
|
||||
|
||||
#include "constants/zones.h"
|
||||
#include "constants/sa2/zones.h"
|
||||
|
||||
/* NOTE: Copied from SA2! */
|
||||
|
||||
|
||||
@@ -27,13 +27,40 @@ typedef void (*BgUpdate)(s32, s32);
|
||||
// NOTE: This was copy-pasted from SA2.
|
||||
// There are type differences for members
|
||||
typedef struct Camera {
|
||||
/* 0x00|0x04 */ CamCoord x;
|
||||
/* 0x02|0x04 */ CamCoord y;
|
||||
/* 0x00|0x04 */ CamCoord x; // TODO: might this be unsigned actually?
|
||||
/* 0x02|0x04 */ CamCoord y; // TODO: might this be unsigned actually?
|
||||
#if (GAME == GAME_SA1)
|
||||
u8 filler4[0x2C];
|
||||
/* 0x04 */ s16 SA2_LABEL(unk8);
|
||||
/* 0x06 */ s16 SA2_LABEL(unkC);
|
||||
/* 0x08 */ CamCoord SA2_LABEL(unk10);
|
||||
/* 0x0A */ CamCoord SA2_LABEL(unk14);
|
||||
/* 0x0C */ s16 shiftX;
|
||||
/* 0x0E */ s16 shiftY;
|
||||
/* 0x10 */ s16 SA2_LABEL(unk20);
|
||||
/* 0x12 */ s16 SA2_LABEL(unk24);
|
||||
|
||||
// TODO: Why are X/Y swapped?
|
||||
// Did they make this a matrix or sth.?
|
||||
// (Used to calc min/max cam pos in UpdateCamera())
|
||||
/* 0x14 */ s16 minY;
|
||||
/* 0x16 */ s16 maxY;
|
||||
/* 0x18 */ s16 minX;
|
||||
/* 0x1A */ s16 maxX;
|
||||
/* 0x1C */ s16 SA2_LABEL(unk40);
|
||||
/* 0x1E */ s16 SA2_LABEL(unk44);
|
||||
/* 0x20 */ s16 SA2_LABEL(unk48);
|
||||
/* 0x22 */ s16 SA2_LABEL(unk4C);
|
||||
/* 0x24 */ u16 unk24;
|
||||
/* 0x26 */ u16 SA2_LABEL(unk50);
|
||||
/* 0x28 */ u16 SA2_LABEL(unk52);
|
||||
/* 0x2A */ u16 SA2_LABEL(unk54);
|
||||
/* 0x2C */ BgUpdate fnBgUpdate;
|
||||
/* 0x30 */ struct Task *movementTask;
|
||||
/* 0x34 */ s16 shakeOffsetX;
|
||||
/* 0x36 */ s16 shakeOffsetY;
|
||||
/* 0x38 */ s16 SA2_LABEL(unk64);
|
||||
/* 0x3A */ u8 spectatorTarget;
|
||||
/* 0x3B */ u8 filler3B[0x2];
|
||||
#elif (GAME == GAME_SA2)
|
||||
/* 0x08 */ s32 unk8;
|
||||
/* 0x0C */ s32 unkC;
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
#define GUARD_STAGE_PLAYER_H
|
||||
|
||||
#include "core.h"
|
||||
#include "constants/move_states.h"
|
||||
#include "constants/sa2/move_states.h"
|
||||
|
||||
// TODO: merge these
|
||||
#include "constants/characters.h"
|
||||
#include "constants/sa2/characters.h"
|
||||
#include "game/shared/parameters/characters.h"
|
||||
|
||||
#define PLAYER_IS_ALIVE (!(gPlayer.moveState & MOVESTATE_DEAD))
|
||||
@@ -217,6 +217,11 @@ typedef struct Player_ {
|
||||
|
||||
extern Player gPlayer;
|
||||
|
||||
#if (GAME == GAME_SA1)
|
||||
// "Cheat Code" Tails
|
||||
extern Player gPartner;
|
||||
#endif
|
||||
|
||||
// In SA2 tricks stop all characters when the buttons are pressed.
|
||||
// Set this to TRUE to behave more like SA3.
|
||||
#define DISABLE_TRICK_AIR_WAIT !TRUE
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#include "global.h"
|
||||
#include "rect.h"
|
||||
#include "constants/zones.h"
|
||||
#include "constants/sa2/zones.h"
|
||||
|
||||
#define MP_COLLECT_RINGS_COMPRESSED_POS_DATA ((u8 **)(EWRAM_START + 0x33008))
|
||||
#define MP_COLLECT_RINGS_COMPRESSED_SIZE (u8 **)(EWRAM_START + 0x3300C)
|
||||
|
||||
Loaded 100 of 525 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user