Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Changelog

## Unreleased - 2026-03-??
- Fixed: Low-Health alarm now plays correctly when using the alternative Health Display.

## 0.12.0 - 2026-02-20
- Changed: The hatch graphics have been changed to be more accessible to color blind people.
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ ifeq ($(BUILD_TYPE), debug)
SYMBOL_DATA_ARMIPS_OPTION := -sym $(BIN_DIR)/$(OUT)-symbols.sym
else
BUILD_SYMBOL = -definelabel DEBUG 0
SYMBOL_DATA_ARMIPS_OPTION :=
SYMBOL_DATA_ARMIPS_OPTION := -sym $(BIN_DIR)/$(OUT)-base-symbols.sym
endif

QOL := true
Expand Down Expand Up @@ -59,7 +59,7 @@ $(OBJ_DIR)/base.gba: $(BIN_DIR)/$(OUT).gba | $(OBJ_DIR)
cp $< $@

$(OBJ_DIR)/%.gba: check | $(OBJ_DIR)
$(AS) $(SYMBOL_DATA_ARMIPS_OPTION) $(ALL_SYMBOLS) -definelabel $* 1 src/main.s
$(AS) -sym $(BIN_DIR)/$(OUT)-$*-symbols.sym $(ALL_SYMBOLS) -definelabel $* 1 src/main.s
mv $(OBJ_DIR)/$(OUT).gba $@

$(BIN_DIR)/%.ips: $(OBJ_DIR)/%.gba $(OBJ_DIR)/base.gba
Expand Down
33 changes: 30 additions & 3 deletions src/nonlinear/hud-edits.s
Original file line number Diff line number Diff line change
Expand Up @@ -302,8 +302,7 @@ ForceExcessHealthDisplay:
@@start_draw_max_digits:
; Check if we need to reload max digits graphics
ldr r0, [sp]
mov r1, #1111b
bic r1, r0
cmp r0, #00h
beq @@skip_drawing_max_digits

; Load "Max" graphics pointers
Expand Down Expand Up @@ -468,6 +467,7 @@ ForceExcessHealthDisplay:
.pool

@@curr_energy:
mov r4, #00h ; Store Bitflag for if current energy changes
ldr r5, =EnergyDigits
ldr r6, =DMA3
ldr r7, =EnergyDigitsGfx
Expand All @@ -492,6 +492,8 @@ ForceExcessHealthDisplay:
ldrb r1, [r5, EnergyDigits_Thousands]
cmp r0, r1
beq @@curr_hundreds ; if thousands digit doesn't change, skip DMA
mov r3, #1 << EnergyDigits_Thousands
orr r4, r3 ; Store flag if digit changes
strb r0, [r5, EnergyDigits_Thousands]
@@load_curr_thousands_gfx:
lsl r0, #05h ; r0 * 20h (length of 8x8 tile)
Expand Down Expand Up @@ -523,6 +525,8 @@ ForceExcessHealthDisplay:
ldrb r1, [r5, EnergyDigits_Hundreds]
cmp r0, r1
beq @@curr_tens ; if hundreds digit doesn't change, skip DMA
mov r3, #1 << EnergyDigits_Hundreds
orr r4, r3 ; Store flag if digit changes
strb r0, [r5, EnergyDigits_Hundreds]
@@load_curr_hundreds_gfx:
lsl r0, #05h ; r0 * 20h (length of 8x8 tile)
Expand Down Expand Up @@ -554,6 +558,8 @@ ForceExcessHealthDisplay:
ldrb r1, [r5, EnergyDigits_Tens]
cmp r0, r1
beq @@curr_ones ; if tens digit doesn't change, skip DMA
mov r3, #1 << EnergyDigits_Tens
orr r4, r3 ; Store flag if digit changes
strb r0, [r5, EnergyDigits_Tens]
@@load_curr_tens_gfx:
lsl r0, #05h ; r0 * 20h (length of 8x8 tile)
Expand All @@ -580,7 +586,9 @@ ForceExcessHealthDisplay:
@@check_curr_ones_digit_is_same:
ldrb r1, [r5, EnergyDigits_Ones]
cmp r0, r1
beq @@return ; if ones digit doesn't change, skip DMA
beq @@update_lowhealth_flag ; if ones digit doesn't change, skip DMA
mov r3, #1 << EnergyDigits_Ones
orr r4, r3 ; Store flag if digit changes
strb r0, [r5, EnergyDigits_Ones]
@@load_curr_ones_gfx:
lsl r0, #05h ; r0 * 20h (length of 8x8 tile)
Expand All @@ -592,6 +600,25 @@ ForceExcessHealthDisplay:
str r2, [r6, DMA_CNT]
ldr r0, [r6, DMA_CNT]

; Check if we had to update graphics
@@update_lowhealth_flag:
cmp r4, #00h
beq @@return

; If graphics updated, set low-health flag
ldr r4, =SamusUpgrades
mov r1, r8
cmp r1, #1Dh
bhi @@clear_lowhealth_flag

@@set_lowhealth_flag:
mov r1, #01h
strb r1, [r4, SamusUpgrades_LowHealthFlag]
b @@return

@@clear_lowhealth_flag:
mov r1, #00h
strb r1, [r4, SamusUpgrades_LowHealthFlag]

@@return:
ldr r0, =ExcessEnergyFlag
Expand Down
20 changes: 8 additions & 12 deletions src/nonlinear/nerf-geron-weakness.s
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
mov r0, ClipdataAction_MakeSolid


; Increases the sideways hitbox of each Geron, so that
; Increases the sideways hitbox of each Geron, so that
; you can shinespark/speedboost through them without bonking against the solid collision
; These are all modified in their respective Init functions.
; FIXME: Instead of increasing hitboxes, create a new speedboostable clipdata type
Expand Down Expand Up @@ -124,12 +124,16 @@
.endarea


; Make Super Missile Geron passable if it hasn't formed yet, but impassable once it has formed.
.org 08041FA0h ; in SuperMissileGeronInit
.area 6, 0
bl @SuperGeronInitHijack
.endarea

; Changes the function in SuperMissileGeronInit, to only set collision if pose is not Spawning_From_X
.autoregion
.align 2
.func @SuperGeronInitHijack
; Make Super Missile Geron passable if it hasn't formed yet, but impassable once it has formed.
; Changes the function in SuperMissileGeronInit, to only set collision if pose is not Spawning_From_X
push { lr }
ldr r1, =CurrentSprite
add r1, Sprite_Pose
Expand All @@ -142,17 +146,9 @@
pop { pc }
.endfunc
.pool
.endautoregion

.org 08041FA0h ; in SuperMissileGeronInit
.area 6, 0
bl @SuperGeronInitHijack
.endarea

; Call GeronSetCollision at the end of SuperMissileGeronIdleInit
.autoregion
.align 2
.func @SuperGeronIdleInitHijack
; Call GeronSetCollision at the end of SuperMissileGeronIdleInit
push { lr }
mov r0, ClipdataAction_MakeSolid
bl GeronSetCollision
Expand Down
Loading