You've already forked HackerSM64
mirror of
https://github.com/HackerN64/HackerSM64.git
synced 2026-01-21 10:35:32 -08:00
Compare commits
26 Commits
develop/2.
...
develop/2.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
32035cfb7f | ||
|
|
e100979877 | ||
|
|
64225b7a19 | ||
|
|
735c0ba438 | ||
|
|
f04a3ab624 | ||
|
|
d028d6ea7d | ||
|
|
22b3c9ba08 | ||
|
|
1098ea95ea | ||
|
|
86841a3385 | ||
|
|
12b91fe73c | ||
|
|
a42bd9bc2e | ||
|
|
a784c180a8 | ||
|
|
987f76190f | ||
|
|
088dbbdd2b | ||
|
|
ab94fd7f63 | ||
|
|
d7d0364682 | ||
|
|
38d3c82860 | ||
|
|
a7a637eb10 | ||
|
|
fc6a6055d9 | ||
|
|
6291c77a18 | ||
|
|
68f09d34ea | ||
|
|
0dd3ef7f50 | ||
|
|
da4b4db7ae | ||
|
|
8c56afddba | ||
|
|
4ae3a431bc | ||
|
|
93fd414035 |
2
.vscode/c_cpp_properties.json
vendored
2
.vscode/c_cpp_properties.json
vendored
@@ -31,7 +31,7 @@
|
||||
"compilerPath": "/usr/bin/mips-linux-gnu-gcc",
|
||||
"cStandard": "gnu17",
|
||||
"cppStandard": "gnu++14",
|
||||
"intelliSenseMode": "linux-gcc-x64"
|
||||
"intelliSenseMode": "linux-gcc-x86"
|
||||
}
|
||||
],
|
||||
"version": 4
|
||||
|
||||
61
Makefile
61
Makefile
@@ -119,20 +119,10 @@ else ifeq ($(GRUCODE),super3d) # Super3D
|
||||
DEFINES += SUPER3D_GBI=1 F3D_NEW=1
|
||||
endif
|
||||
|
||||
LIBRARIES := nustd hvqm2 z goddard
|
||||
|
||||
# TEXT ENGINES
|
||||
# s2dex_text_engine - Text Engine by someone2639
|
||||
TEXT_ENGINE := none
|
||||
ifeq ($(TEXT_ENGINE), s2dex_text_engine)
|
||||
DEFINES += S2DEX_GBI_2=1 S2DEX_TEXT_ENGINE=1
|
||||
LIBRARIES += s2d_engine
|
||||
DUMMY != make -C src/s2d_engine COPY_DIR=$(shell pwd)/lib/
|
||||
endif
|
||||
# add more text engines here
|
||||
|
||||
LINK_LIBRARIES = $(foreach i,$(LIBRARIES),-l$(i))
|
||||
|
||||
$(eval $(call validate-option,TEXT_ENGINE,none s2dex_text_engine))
|
||||
|
||||
#==============================================================================#
|
||||
# Optimization flags #
|
||||
@@ -210,6 +200,12 @@ endif
|
||||
# 0 - does not
|
||||
UNF ?= 0
|
||||
$(eval $(call validate-option,UNF,0 1))
|
||||
|
||||
# if `unf` is a target, make sure that UNF is set
|
||||
ifneq ($(filter unf,$(MAKECMDGOALS)),)
|
||||
UNF = 1
|
||||
endif
|
||||
|
||||
ifeq ($(UNF),1)
|
||||
DEFINES += UNF=1
|
||||
SRC_DIRS += src/usb
|
||||
@@ -411,6 +407,18 @@ else
|
||||
$(error Unable to detect a suitable MIPS toolchain installed)
|
||||
endif
|
||||
|
||||
LIBRARIES := nustd hvqm2 z goddard
|
||||
|
||||
# Text engine
|
||||
ifeq ($(TEXT_ENGINE), s2dex_text_engine)
|
||||
DEFINES += S2DEX_GBI_2=1 S2DEX_TEXT_ENGINE=1
|
||||
LIBRARIES += s2d_engine
|
||||
DUMMY != $(MAKE) -C src/s2d_engine COPY_DIR=$(shell pwd)/lib/ CROSS=$(CROSS)
|
||||
endif
|
||||
# add more text engines here
|
||||
|
||||
LINK_LIBRARIES = $(foreach i,$(LIBRARIES),-l$(i))
|
||||
|
||||
export LD_LIBRARY_PATH=./tools
|
||||
|
||||
AS := $(CROSS)as
|
||||
@@ -502,8 +510,13 @@ endif
|
||||
ENDIAN_BITWIDTH := $(BUILD_DIR)/endian-and-bitwidth
|
||||
EMULATOR = mupen64plus
|
||||
EMU_FLAGS =
|
||||
LOADER = loader64
|
||||
LOADER_FLAGS = -vwf
|
||||
|
||||
ifneq (,$(call find-command,wslview))
|
||||
LOADER = ./$(TOOLS_DIR)/UNFLoader.exe
|
||||
else
|
||||
LOADER = ./$(TOOLS_DIR)/UNFLoader
|
||||
endif
|
||||
|
||||
SHA1SUM = sha1sum
|
||||
PRINT = printf
|
||||
|
||||
@@ -553,8 +566,18 @@ test-pj64: $(ROM)
|
||||
wine ~/Desktop/new64/Project64.exe $<
|
||||
# someone2639
|
||||
|
||||
load: $(ROM)
|
||||
$(LOADER) $(LOADER_FLAGS) $<
|
||||
# download and extract most recent unfloader build if needed
|
||||
$(LOADER):
|
||||
ifeq (,$(wildcard $(LOADER)))
|
||||
@$(PRINT) "Downloading latest UNFLoader...$(NO_COL)\n"
|
||||
$(PYTHON) $(TOOLS_DIR)/get_latest_unfloader.py $(TOOLS_DIR)
|
||||
endif
|
||||
|
||||
load: $(ROM) $(LOADER)
|
||||
$(LOADER) -r $<
|
||||
|
||||
unf: $(ROM) $(LOADER)
|
||||
$(LOADER) -d -r $<
|
||||
|
||||
libultra: $(BUILD_DIR)/libultra.a
|
||||
|
||||
@@ -850,8 +873,16 @@ $(ELF): $(BUILD_DIR)/sm64_prelim.elf $(BUILD_DIR)/asm/debug/map.o $(O_FILES) $(Y
|
||||
$(V)$(LD) --gc-sections -L $(BUILD_DIR) -T undefined_syms.txt -T $(BUILD_DIR)/$(LD_SCRIPT) -T goddard.txt -Map $(BUILD_DIR)/sm64.$(VERSION).map --no-check-sections $(addprefix -R ,$(SEG_FILES)) -o $@ $(O_FILES) -L$(LIBS_DIR) -l$(ULTRALIB) -Llib $(LINK_LIBRARIES) -u sprintf -u osMapTLB -Llib/gcclib/$(LIBGCCDIR) -lgcc -lrtc
|
||||
|
||||
# Build ROM
|
||||
ifeq (n,$(findstring n,$(firstword -$(MAKEFLAGS))))
|
||||
# run with -n / --dry-run
|
||||
$(ROM):
|
||||
@$(PRINT) "$(BLUE)DRY RUNS ARE DISABLED$(NO_COL)\n"
|
||||
else
|
||||
# not running with -n / --dry-run
|
||||
$(ROM): $(ELF)
|
||||
$(call print,Building ROM:,$<,$@)
|
||||
endif
|
||||
|
||||
ifeq ($(CONSOLE),n64)
|
||||
$(V)$(OBJCOPY) --pad-to=0x101000 --gap-fill=0xFF $< $@ -O binary
|
||||
else ifeq ($(CONSOLE),bb)
|
||||
|
||||
@@ -14,7 +14,7 @@ This is a fork of the ultrasm64 repo by CrashOveride which includes the followin
|
||||
- **ArcticJaguar725**: Most audio configuration and layout changes, colored ia4 text, floombas, various bugfixes, and more
|
||||
- **CowQuack**: Adjustable skybox sizes, area-specific skybox function
|
||||
- **thecozies**: Water surface types, general maintenance, and time
|
||||
- **MrComit**: General use object defines, JUMP_KICK_FIX, LEDGE_GRABS_CHECK_SLOPE_ANGLE
|
||||
- **MrComit**: General use object defines, JUMP_KICK_FIX
|
||||
- **aglab2**: Bugfixes (particularly puppycam), refactor stuff
|
||||
- **someone2639**: math.s and crash screen disam, stack trace, map packing, shiftable segments 2, S2DEX engine
|
||||
- **Arthurtilly**: Platform Displacement 2
|
||||
@@ -61,7 +61,6 @@ Thanks to Frame#5375 and AloXado320 for also helping with silhouette stuff
|
||||
- Toggle to disable fall damage and the fall damage sound *
|
||||
- Nonstop stars *
|
||||
- Removed course-specific camera processing *
|
||||
- You can increase the number of frames that you have to perform a firsty *
|
||||
- Ability to set Mario's movement speed when hanging from a ceiling *
|
||||
- Tighter hanging controls (Mario will face the direction of the analog stick directly while hanging from a ceiling) *
|
||||
- reonucam3: custom camera by Reonu. This is included as a .patch file in the enhancements folder, you need to apply it if you want this camera.
|
||||
|
||||
@@ -1 +1 @@
|
||||
v2.0.3
|
||||
v2.0.5
|
||||
|
||||
@@ -15,9 +15,14 @@
|
||||
.word 0x00000000 /* Unknown */
|
||||
.word 0x00000000 /* Unknown */
|
||||
.ascii INTERNAL_ROM_NAME /* Internal ROM name */
|
||||
#if defined(USE_GAMECUBE_CONTROLLER)
|
||||
/* Advanced homebrew ROM header bytes: https://n64brew.dev/wiki/ROM_Header#Advanced_Homebrew_ROM_Header */
|
||||
.word 0x82000000
|
||||
#else
|
||||
.word 0x00000000 /* Unknown */
|
||||
#endif
|
||||
.word 0x0000004E /* Cartridge */
|
||||
#if defined(EEP4K)
|
||||
#if defined(EEP4K) && !defined(USE_GAMECUBE_CONTROLLER)
|
||||
.ascii "SM" /* Cartridge ID */
|
||||
#else
|
||||
.ascii "ED" /* Cartridge ID */
|
||||
|
||||
@@ -1679,9 +1679,9 @@ const BehaviorScript bhvWfSolidTowerPlatform[] = {
|
||||
BEGIN(OBJ_LIST_SURFACE),
|
||||
OR_INT(oFlags, (OBJ_FLAG_SET_FACE_YAW_TO_MOVE_YAW | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)),
|
||||
LOAD_COLLISION_DATA(wf_seg7_collision_platform),
|
||||
CALL_NATIVE(load_object_static_model),
|
||||
BEGIN_LOOP(),
|
||||
CALL_NATIVE(bhv_wf_solid_tower_platform_loop),
|
||||
CALL_NATIVE(load_object_collision_model),
|
||||
END_LOOP(),
|
||||
};
|
||||
|
||||
@@ -2626,6 +2626,7 @@ const BehaviorScript bhvExclamationBox[] = {
|
||||
OR_INT(oFlags, OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE),
|
||||
SET_FLOAT(oCollisionDistance, 300),
|
||||
SET_HOME(),
|
||||
CALL_NATIVE(bhv_init_room),
|
||||
BEGIN_LOOP(),
|
||||
CALL_NATIVE(bhv_exclamation_box_loop),
|
||||
END_LOOP(),
|
||||
@@ -3772,6 +3773,7 @@ const BehaviorScript bhvMessagePanel[] = {
|
||||
DROP_TO_FLOOR(),
|
||||
SET_HITBOX(/*Radius*/ 150, /*Height*/ 80),
|
||||
SET_INT(oWoodenPostTotalMarioAngle, 0),
|
||||
CALL_NATIVE(bhv_init_room),
|
||||
CALL_NATIVE(load_object_static_model),
|
||||
BEGIN_LOOP(),
|
||||
SET_INT(oIntangibleTimer, 0),
|
||||
@@ -5600,6 +5602,7 @@ const BehaviorScript bhvActivatedBackAndForthPlatform[] = {
|
||||
const BehaviorScript bhvRecoveryHeart[] = {
|
||||
BEGIN(OBJ_LIST_LEVEL),
|
||||
OR_INT(oFlags, (OBJ_FLAG_COMPUTE_ANGLE_TO_MARIO | OBJ_FLAG_COMPUTE_DIST_TO_MARIO | OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE)),
|
||||
CALL_NATIVE(bhv_init_room),
|
||||
BEGIN_LOOP(),
|
||||
CALL_NATIVE(bhv_recovery_heart_loop),
|
||||
END_LOOP(),
|
||||
|
||||
@@ -14,6 +14,13 @@
|
||||
*/
|
||||
// #define JP_RED_COIN_SOUND
|
||||
|
||||
/**
|
||||
* In vanilla, Mario's sounds are pitch shifted in real time in order to maintain a sense of consistency. This can be annoying when replacing Mario's sounds.
|
||||
* This define will disable this behavior, making sound replacements easier to manage. Use of this is not recommended unless you're actually replacing Mario's sounds.
|
||||
* When toggling this define, you will need to run `make clean` for it to apply.
|
||||
*/
|
||||
// #define DISABLE_MARIO_PITCH_SHIFTING
|
||||
|
||||
/**
|
||||
* Increase audio heap size to allow for larger/more custom sequences/banks/sfx to be imported without causing issues (not supported for SH).
|
||||
* Note that this is REQUIRED in order to use the extended 0C audio bank. Do not disable this if you're planning on using it.
|
||||
|
||||
@@ -44,6 +44,16 @@
|
||||
*/
|
||||
#define PARALLEL_LAKITU_CAM
|
||||
|
||||
/**
|
||||
* These defines decide whether the turning, error and zoom out/zoom in out sounds are enabled, and which sounds to play if enabled.
|
||||
* The turning, zooming out and zooming in sounds have been replaced with less annoying ones.
|
||||
* If you want the vanilla ones back, set them to SOUND_MENU_CAMERA_TURN, SOUND_MENU_CAMERA_ZOOM_OUT and SOUND_MENU_CAMERA_ZOOM_IN respectively.
|
||||
*/
|
||||
#define CAMERA_TURN_SOUND SOUND_MENU_MESSAGE_NEXT_PAGE
|
||||
#define CAMERA_ZOOM_OUT_SOUND SOUND_MENU_MESSAGE_DISAPPEAR
|
||||
#define CAMERA_ZOOM_IN_SOUND SOUND_MENU_MESSAGE_APPEAR
|
||||
// #define CAMERA_ERROR_SOUND SOUND_MENU_CAMERA_BUZZ
|
||||
|
||||
/**
|
||||
* Enables Puppy Camera 2, a rewritten camera that can be freely configured and modified.
|
||||
*/
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
|
||||
/**
|
||||
* Allows all surfaces types to have force, (doesn't require setting force, just allows it to be optional).
|
||||
* Also allows you to pass a warp node to warp floors (SURFACE_WARP, SURFACE_DEATH_PLANE, SURFACE_VERTICAL_WIND) via the second byte of the force parameter.
|
||||
*/
|
||||
#define ALL_SURFACES_HAVE_FORCE
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
/**
|
||||
* Disables all debug options (except PUPPYPRINT).
|
||||
*/
|
||||
#define DISABLE_ALL
|
||||
// #define DISABLE_ALL
|
||||
|
||||
/**
|
||||
* Enables a comprehensive standalone profiler. Automatically enabled by PUPPYPRINT_DEBUG.
|
||||
|
||||
@@ -108,20 +108,15 @@
|
||||
*/
|
||||
#define HANGING_FIX
|
||||
|
||||
/**
|
||||
* The last frame after hitting a wall that will be considered a firsty when wallkicking.
|
||||
*/
|
||||
#define FIRSTY_LAST_FRAME 1
|
||||
|
||||
/**
|
||||
* The maximum angle the player can wall kick, in degrees. 0..90. To allow 45 degree wall kicks, you must supply `46` to allow 45 and under.
|
||||
*/
|
||||
#define WALL_KICK_DEGREES 45
|
||||
|
||||
/**
|
||||
* This is vanilla behavior, disable it to allow ledge grabbing regardless of floor pitch.
|
||||
* Makes Mario unable to ledge grab steep slopes to prevent false ledge grabs.
|
||||
*/
|
||||
// #define LEDGE_GRABS_CHECK_SLOPE_ANGLE
|
||||
// #define DONT_LEDGE_GRAB_STEEP_SLOPES
|
||||
|
||||
/**
|
||||
* Disables BLJs and crushes SimpleFlips's dreams.
|
||||
|
||||
@@ -28,3 +28,8 @@
|
||||
*/
|
||||
#define BORDER_HEIGHT_CONSOLE 0
|
||||
#define BORDER_HEIGHT_EMULATOR 0
|
||||
|
||||
/**
|
||||
* Informs supported emulators to default to gamecube controller inputs.
|
||||
*/
|
||||
// #define USE_GAMECUBE_CONTROLLER
|
||||
|
||||
@@ -82,7 +82,7 @@ enum LevelActs {
|
||||
ACT_4 = (1 << 3),
|
||||
ACT_5 = (1 << 4),
|
||||
ACT_6 = (1 << 5),
|
||||
ALL_ACTS = (ACT_1 | ACT_2 | ACT_3 | ACT_4 | ACT_5 | ACT_6)
|
||||
ALL_ACTS = (ACT_1 | ACT_2 | ACT_3 | ACT_4 | ACT_5 | ACT_6),
|
||||
};
|
||||
|
||||
enum LevelCommandEvalOperation {
|
||||
@@ -114,13 +114,6 @@ enum WarpCheckpointFlags {
|
||||
WARP_CHECKPOINT = (1 << 7), // 0x80
|
||||
};
|
||||
|
||||
enum LevelCommandCreateWhirlpoolCondition {
|
||||
WHIRLPOOL_COND_ALWAYS,
|
||||
WHIRLPOOL_COND_BOWSER2_NOT_BEATEN,
|
||||
WHIRLPOOL_COND_BOWSER2_BEATEN,
|
||||
WHIRLPOOL_COND_AT_LEAST_SECOND_STAR
|
||||
};
|
||||
|
||||
// Head defines
|
||||
enum GoddardScene {
|
||||
REGULAR_FACE = 0x2,
|
||||
@@ -361,7 +354,7 @@ enum GoddardScene {
|
||||
CMD_W(model)
|
||||
|
||||
#define OBJECT(model, posX, posY, posZ, angleX, angleY, angleZ, behParam, beh) \
|
||||
OBJECT_WITH_ACTS(model, posX, posY, posZ, angleX, angleY, angleZ, behParam, beh, 0x1F)
|
||||
OBJECT_WITH_ACTS(model, posX, posY, posZ, angleX, angleY, angleZ, behParam, beh, ALL_ACTS)
|
||||
|
||||
#define MARIO(model, behArg, beh) \
|
||||
CMD_BBH(LEVEL_CMD_INIT_MARIO, 0x0C, model), \
|
||||
@@ -377,9 +370,10 @@ enum GoddardScene {
|
||||
CMD_BBBB(destArea, destNode, flags, 0x00)
|
||||
|
||||
#define INSTANT_WARP(index, destArea, displaceX, displaceY, displaceZ) \
|
||||
CMD_BBBB(LEVEL_CMD_CREATE_INSTANT_WARP, 0x0C, index, destArea), \
|
||||
CMD_HH(displaceX, displaceY), \
|
||||
CMD_HH(displaceZ, 0x0000)
|
||||
CMD_BBBB(LEVEL_CMD_CREATE_INSTANT_WARP, 0x10, index, destArea), \
|
||||
CMD_W(displaceX), \
|
||||
CMD_W(displaceY), \
|
||||
CMD_W(displaceZ)
|
||||
|
||||
#define LOAD_AREA(area) \
|
||||
CMD_BBBB(LEVEL_CMD_LOAD_AREA, 0x04, area, 0x00)
|
||||
@@ -446,8 +440,8 @@ enum GoddardScene {
|
||||
CMD_HH(unk6, unk8), \
|
||||
CMD_HH(unk10, 0x0000)
|
||||
|
||||
#define WHIRLPOOL(index, condition, posX, posY, posZ, strength) \
|
||||
CMD_BBBB(LEVEL_CMD_CREATE_WHIRLPOOL, 0x0C, index, condition), \
|
||||
#define WHIRLPOOL(index, acts, posX, posY, posZ, strength) \
|
||||
CMD_BBBB(LEVEL_CMD_CREATE_WHIRLPOOL, 0x0C, index, acts), \
|
||||
CMD_HH(posX, posY), \
|
||||
CMD_HH(posZ, strength)
|
||||
|
||||
|
||||
@@ -63,6 +63,18 @@ typedef struct {
|
||||
u8 error;
|
||||
} OSContPad;
|
||||
|
||||
// Custom extended controller pad struct that contains fields for gamecube controllers
|
||||
typedef struct {
|
||||
u16 button;
|
||||
s8 stick_x; /* -80 <= stick_x <= 80 */
|
||||
s8 stick_y; /* -80 <= stick_y <= 80 */
|
||||
s8 c_stick_x;
|
||||
s8 c_stick_y;
|
||||
u8 l_trig;
|
||||
u8 r_trig;
|
||||
u8 errno;
|
||||
} OSContPadEx;
|
||||
|
||||
typedef struct {
|
||||
void *address; /* Ram pad Address: 11 bits */
|
||||
u8 databuffer[32]; /* address of the data buffer */
|
||||
@@ -103,6 +115,7 @@ typedef struct {
|
||||
#define CONT_ABSOLUTE 0x0001
|
||||
#define CONT_RELATIVE 0x0002
|
||||
#define CONT_JOYPORT 0x0004
|
||||
#define CONT_GCN 0x0008
|
||||
#define CONT_EEPROM 0x8000
|
||||
#define CONT_EEP16K 0x4000
|
||||
#define CONT_TYPE_MASK 0x1f07
|
||||
@@ -150,6 +163,25 @@ typedef struct {
|
||||
#define L_CBUTTONS CONT_C
|
||||
#define R_CBUTTONS CONT_F
|
||||
#define D_CBUTTONS CONT_D
|
||||
#define GCN_X_BUTTON 0x0040
|
||||
#define GCN_Y_BUTTON 0x0080
|
||||
|
||||
/* Gamecube controller buttons */
|
||||
|
||||
#define CONT_GCN_GET_ORIGIN 0x2000
|
||||
#define CONT_GCN_START 0x1000
|
||||
#define CONT_GCN_Y 0x0800
|
||||
#define CONT_GCN_X 0x0400
|
||||
#define CONT_GCN_B 0x0200
|
||||
#define CONT_GCN_A 0x0100
|
||||
#define CONT_GCN_USE_ORIGIN 0x0080
|
||||
#define CONT_GCN_L 0x0040
|
||||
#define CONT_GCN_R 0x0020
|
||||
#define CONT_GCN_Z 0x0010
|
||||
#define CONT_GCN_UP 0x0008
|
||||
#define CONT_GCN_DOWN 0x0004
|
||||
#define CONT_GCN_RIGHT 0x0002
|
||||
#define CONT_GCN_LEFT 0x0001
|
||||
|
||||
/* Controller error number */
|
||||
|
||||
@@ -162,6 +194,9 @@ typedef struct {
|
||||
#define CONT_ERR_VOICE_WORD 14
|
||||
#define CONT_ERR_VOICE_NO_RESPONSE 15
|
||||
|
||||
#define CONT_TYPE_N64 0
|
||||
#define CONT_TYPE_GCN 1
|
||||
|
||||
|
||||
#if defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS)
|
||||
|
||||
@@ -178,6 +213,7 @@ typedef struct {
|
||||
*
|
||||
*/
|
||||
|
||||
extern u8 __osControllerTypes[MAXCONTROLLERS];
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
@@ -191,11 +227,13 @@ extern s32 osContInit( OSMesgQueue *mq, u8 *bitpattern, OSContStatus *s
|
||||
extern s32 osContReset( OSMesgQueue *mq, OSContStatus *status);
|
||||
extern s32 osContStartQuery( OSMesgQueue *mq);
|
||||
extern s32 osContStartReadData(OSMesgQueue *mq);
|
||||
extern s32 osContStartReadDataEx(OSMesgQueue *mq);
|
||||
#ifndef _HW_VERSION_1
|
||||
extern s32 osContSetCh(u8 ch);
|
||||
#endif
|
||||
extern void osContGetQuery(OSContStatus *status);
|
||||
extern void osContGetReadData(OSContPad *pad);
|
||||
extern void osContGetReadDataEx(OSContPadEx *pad);
|
||||
|
||||
|
||||
#endif /* defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS) */
|
||||
|
||||
@@ -62,12 +62,14 @@ extern "C" {
|
||||
/* Rumble PAK interface */
|
||||
|
||||
extern s32 osMotorInit(OSMesgQueue *mq, OSPfs *pfs, int controller_no);
|
||||
extern s32 osMotorInitEx(OSMesgQueue *mq, OSPfs *pfs, int controller_no);
|
||||
#if 1
|
||||
#define MOTOR_START 1
|
||||
#define MOTOR_STOP 0
|
||||
#define osMotorStart(x) __osMotorAccess((x), MOTOR_START)
|
||||
#define osMotorStop(x) __osMotorAccess((x), MOTOR_STOP)
|
||||
#define osMotorStart(x) __osMotorAccessEx((x), MOTOR_START)
|
||||
#define osMotorStop(x) __osMotorAccessEx((x), MOTOR_STOP)
|
||||
extern s32 __osMotorAccess(OSPfs *pfs, s32 flag);
|
||||
extern s32 __osMotorAccessEx(OSPfs *pfs, s32 flag);
|
||||
#else
|
||||
extern s32 osMotorStop( OSPfs *pfs);
|
||||
extern s32 osMotorStart(OSPfs *pfs);
|
||||
|
||||
@@ -55,6 +55,7 @@ enum ObjFlags {
|
||||
OBJ_FLAG_OCCLUDE_SILHOUETTE = (1 << 20), // 0x00100000
|
||||
OBJ_FLAG_OPACITY_FROM_CAMERA_DIST = (1 << 21), // 0x00200000
|
||||
OBJ_FLAG_EMIT_LIGHT = (1 << 22), // 0x00400000
|
||||
OBJ_FLAG_PROCESS_OUTSIDE_ROOM = (1 << 23), // 0x00800000
|
||||
OBJ_FLAG_HITBOX_WAS_SET = (1 << 30), // 0x40000000
|
||||
};
|
||||
|
||||
|
||||
@@ -153,7 +153,7 @@
|
||||
#define /*0x17C*/ oOpacity OBJECT_FIELD_S32(0x3D)
|
||||
#define /*0x180*/ oDamageOrCoinValue OBJECT_FIELD_S32(0x3E)
|
||||
#define /*0x184*/ oHealth OBJECT_FIELD_S32(0x3F)
|
||||
#define /*0x188*/ oBehParams OBJECT_FIELD_S32(0x40)
|
||||
#define /*0x188*/ oBehParams OBJECT_FIELD_U32(0x40)
|
||||
#define /*0x18C*/ oPrevAction OBJECT_FIELD_S32(0x41)
|
||||
#define /*0x190*/ oInteractionSubtype OBJECT_FIELD_U32(0x42)
|
||||
#define /*0x194*/ oCollisionDistance OBJECT_FIELD_F32(0x43)
|
||||
@@ -606,7 +606,7 @@
|
||||
#define /*0x110*/ oIsFloomba OBJECT_FIELD_S32(0x22)
|
||||
|
||||
#ifdef INTRO_FLOOMBAS
|
||||
#define /*0x1AC*/ oZoomCounter OBJECT_FIELD_S32(0x49)
|
||||
#define /*0x1AC*/ oZoomCounter OBJECT_FIELD_U32(0x49)
|
||||
#define /*0x1B0*/ oZoomPosZ OBJECT_FIELD_F32(0x4A)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -1,71 +0,0 @@
|
||||
/*---------------------------------------------------------------------
|
||||
Copyright (C) 1997, 1998 Nintendo.
|
||||
|
||||
File rtc.h
|
||||
Coded by Shigeo Kimura. Oct 14, 1997.
|
||||
Modified by Koji Mitsunari. Jan 22, 2001.
|
||||
Comments Real Time Clock Library
|
||||
---------------------------------------------------------------------*/
|
||||
#ifndef _rtc_h_
|
||||
#define _rtc_h_
|
||||
|
||||
/*-----------------------------------------------------------------------
|
||||
* Macro & constant definitions
|
||||
*-----------------------------------------------------------------------*/
|
||||
/* Controller type */
|
||||
#define CONT_TYPE_RTC 0x1000 /* from os.h */
|
||||
#define RTC_WAIT 300
|
||||
|
||||
/* RTC status signed 32bits */
|
||||
#define RTC_NG_NOTHING 0x8000
|
||||
#define RTC_NG_WRITE 0x0100
|
||||
#define RTC_NG_ADDR 0x0200
|
||||
#define RTC_STATUS_BUSY 0x0080
|
||||
#define RTC_STATUS_DDOWN 0x0002
|
||||
#define RTC_STATUS_BDOWN 0x0001
|
||||
|
||||
/* RTC Error Code */
|
||||
#define CONT_ERR_RTC_BUSY 16
|
||||
#define CONT_ERR_RTC_BDOWN 17
|
||||
#define CONT_ERR_RTC_DDOWN 18
|
||||
#define CONT_ERR_RTC_BDDOWN 19
|
||||
|
||||
/* RTC bit status */
|
||||
#define RTC_EALM 0x80
|
||||
#define RTC_ALM 0x20
|
||||
#define RTC_WPB1 0x02
|
||||
#define RTC_WPB0 0x01
|
||||
#define RTC_MOD 0x04
|
||||
#define RTC_CHLD 0x02
|
||||
#define RTC_ADJ 0x01
|
||||
|
||||
#define RTC_ADDR_FLAG 0
|
||||
#define RTC_ADDR_RAM 1
|
||||
#define RTC_ADDR_TIME 2
|
||||
|
||||
typedef struct{
|
||||
u8 sec; /* second 0-59 */
|
||||
u8 min; /* minute 0-59 */
|
||||
u8 hour; /* hour 0-23 */
|
||||
u8 day; /* day 1-31 */
|
||||
u8 week; /* week 0-6(sun,mon,..,sat) */
|
||||
u8 month; /* month 1-12 */
|
||||
u16 year; /* year 1901-2099 */
|
||||
} OSRTCTime;
|
||||
|
||||
/*-----------------------------------------------------------------------
|
||||
* externs
|
||||
*-----------------------------------------------------------------------*/
|
||||
|
||||
extern s32 osRTCInit( OSMesgQueue *mq);
|
||||
extern s32 osRTCReadData( OSMesgQueue *mq, u8 *);
|
||||
extern s32 osRTCWriteData( OSMesgQueue *mq, u8 *);
|
||||
extern s32 osRTCGetTime( OSMesgQueue *mq, OSRTCTime *);
|
||||
extern s32 osRTCSetTime( OSMesgQueue *mq, OSRTCTime *);
|
||||
extern u32 osRTCGetIntervalTime(OSRTCTime *, OSRTCTime *);
|
||||
extern s32 osRTCGetLaterTime(OSMesgQueue *mq, u32, OSRTCTime *);
|
||||
extern s32 osRTCSetAlarm( OSMesgQueue *mq, u8, u8);
|
||||
extern s32 osRTCGetAlarmStat(OSMesgQueue *mq, u8 *, u8 *, int *);
|
||||
extern s32 osRTCProbe( OSMesgQueue *mq);
|
||||
|
||||
#endif /* _rtc_h_ */
|
||||
@@ -1,3 +1,5 @@
|
||||
#include "config/config_audio.h"
|
||||
|
||||
// Macros for disassembled sequence files. This file was automatically generated by seq_decoder.py.
|
||||
// To regenerate it, run: ./tools/seq_decoder.py --emit-asm-macros > include/seq_macros.inc
|
||||
|
||||
@@ -448,15 +450,6 @@
|
||||
writeseq\@:
|
||||
.endm
|
||||
|
||||
.macro layer_portamento a, b, c
|
||||
.byte 0xc7, \a, \b
|
||||
.if ((\a & 0x80) == 0)
|
||||
var \c
|
||||
.else
|
||||
.byte \c
|
||||
.endif
|
||||
.endm
|
||||
|
||||
.macro chan_delay_long a
|
||||
.byte 0xfd
|
||||
var_long \a
|
||||
@@ -564,6 +557,14 @@
|
||||
.byte \c
|
||||
.endm
|
||||
|
||||
.macro layer_note1_mario a, b, c
|
||||
#ifndef DISABLE_MARIO_PITCH_SHIFTING
|
||||
layer_note1 \a, \b, \c
|
||||
#else
|
||||
layer_note1 39, \b, \c
|
||||
#endif
|
||||
.endm
|
||||
|
||||
.macro layer_note2 a, b, c
|
||||
.byte 0x80 + \a
|
||||
.byte \b
|
||||
@@ -585,6 +586,12 @@
|
||||
.byte \a
|
||||
.endm
|
||||
|
||||
.macro layer_transpose_mario a
|
||||
#ifndef DISABLE_MARIO_PITCH_SHIFTING
|
||||
layer_transpose \a
|
||||
#endif
|
||||
.endm
|
||||
|
||||
.macro layer_setshortnotedefaultplaypercentage a
|
||||
.byte 0xc3
|
||||
var \a
|
||||
@@ -603,6 +610,21 @@
|
||||
.byte \a
|
||||
.endm
|
||||
|
||||
.macro layer_portamento a, b, c
|
||||
.byte 0xc7, \a, \b
|
||||
.if ((\a & 0x80) == 0)
|
||||
var \c
|
||||
.else
|
||||
.byte \c
|
||||
.endif
|
||||
.endm
|
||||
|
||||
.macro layer_portamento_mario a, b, c
|
||||
#ifndef DISABLE_MARIO_PITCH_SHIFTING
|
||||
layer_portamento \a, \b, \c
|
||||
#endif
|
||||
.endm
|
||||
|
||||
.macro layer_disableportamento
|
||||
.byte 0xc8
|
||||
.endm
|
||||
|
||||
@@ -717,7 +717,8 @@ enum MarioActionFlags {
|
||||
#define VALID_BUTTONS (A_BUTTON | B_BUTTON | Z_TRIG | START_BUTTON | \
|
||||
U_JPAD | D_JPAD | L_JPAD | R_JPAD | \
|
||||
L_TRIG | R_TRIG | \
|
||||
U_CBUTTONS | D_CBUTTONS | L_CBUTTONS | R_CBUTTONS )
|
||||
U_CBUTTONS | D_CBUTTONS | L_CBUTTONS | R_CBUTTONS | \
|
||||
GCN_X_BUTTON | GCN_Y_BUTTON)
|
||||
|
||||
#define C_BUTTONS (U_CBUTTONS | D_CBUTTONS | L_CBUTTONS | R_CBUTTONS )
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user