Skip to content

Commit

Permalink
Fixed an issue where the last frame in an animation sequence would be…
Browse files Browse the repository at this point in the history
… skipped
  • Loading branch information
smnjameson committed Jul 27, 2022
1 parent 02d087f commit bfca0ab
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
10 changes: 9 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,12 @@ build/m65debugger/node_modules/
bin/main.prg
bin/main.vs
bin/sdcard/
splash/

docs/logodraft.png
splash/logo.png
splash/make.bat
splash/splash.s
splash/bin/logo_chars.bin
splash/bin/logo_ncm.bin
splash/bin/logo_palette.bin
splash/bin/splash.vs
9 changes: 4 additions & 5 deletions includes/s65/layer/Layer_Macros.s
Original file line number Diff line number Diff line change
Expand Up @@ -605,21 +605,20 @@

//Animations


.eval Anim_SequenceData = *
.print ("Anim_SequenceData: $" + toHexString(Anim_SequenceData))
.for(var i=1; i<Anim_SeqList.size(); i++){
.eval Anim_SeqList.get(i).address = *
.for(var j=0; j<Anim_SeqList.get(i).endFrame - Anim_SeqList.get(i).startFrame; j++) {
.for(var j=0; j<Anim_SeqList.get(i).endFrame - Anim_SeqList.get(i).startFrame + 1; j++) {
.var frame = Anim_SeqList.get(i).startFrame + j
.var spriteset = Asset_SpriteList.get(Anim_SeqList.get(i).spriteSet.id)
.word spriteset.indices.get(frame)
}
.word $201
// .word $201
// .word $201
}
.eval Anim_FrameCounts = *
.for(var i=1; i<Anim_SeqList.size(); i++){
.byte [Anim_SeqList.get(i).endFrame - Anim_SeqList.get(i).startFrame]
.byte [Anim_SeqList.get(i).endFrame - Anim_SeqList.get(i).startFrame] + 1
}
.eval Anim_SequenceAddrTable = *
.lohifill Anim_SeqList.size() - 1, Anim_SeqList.get(i + 1).address
Expand Down

0 comments on commit bfca0ab

Please sign in to comment.