Skip to content

Commit ca3c535

Browse files
authored
Merge pull request #3483 from jenngra505/patch-1
fix: Negative sprite numbers not accurate to Mugen, compiler error
2 parents 52fb3d8 + 55e0410 commit ca3c535

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ srcFiles=src/resources/defaultConfig.ini \
1515
src/compiler_functions.go \
1616
src/config.go \
1717
src/dllsearch_windows.go \
18+
src/fightscreen.go \
1819
src/font.go \
1920
src/font_gl33.go \
2021
src/font_gles32.go \
@@ -24,7 +25,6 @@ srcFiles=src/resources/defaultConfig.ini \
2425
src/iniutils.go \
2526
src/input.go \
2627
src/input_sdl.go \
27-
src/lifebar.go \
2828
src/main.go \
2929
src/motif.go \
3030
src/music.go \

src/anim.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -603,8 +603,9 @@ func (a *Animation) UpdateSprite() {
603603
group, number = mn[0], mn[1]
604604
}
605605
}
606-
if group >= 0 && number >= 0 {
607-
a.spr = a.sff.GetSprite(uint16(group), uint16(number))
606+
//Mugen only nulls out -1, other negatives wrap around
607+
if group != -1 && number != -1 {
608+
a.spr = a.sff.GetSprite(uint16(group), uint16(number))
608609
if a.spr == nil {
609610
// Log missing sprites
610611
// We will save the history in the SFF itself so that each sprite is only mentioned once

0 commit comments

Comments
 (0)