KevKelley Posted April 4, 2021 Share Posted April 4, 2021 (edited) I had seen in a different post where there is a way to call on the score sprite and use it for something else. I was wondering if there was a way to somehow swap out a score sprite and use something else in a part of code. So let's say you wanted to swap out the Number 6 sprite temporarily with something like a dash. Is there a way to do this? Edited April 13, 2021 by KevKelley Quote Link to comment Share on other sites More sharing options...
+Gemintronic Posted April 4, 2021 Share Posted April 4, 2021 You can add extra characters in what would be hex A-F https://atariage.com/forums/topic/126058-defining-a-f-in-score_graphicsasm/ RevEng made it known some extra steps are needed to use such scores in the multi kernel framework https://atariage.com/forums/topic/218090-64k-multikernel-framework/?tab=comments#comment-2856795 2 Quote Link to comment Share on other sites More sharing options...
KevKelley Posted April 4, 2021 Author Share Posted April 4, 2021 Thanks! I will have to try this. Hopefully I don't have any issues trying to implement this. 1 Quote Link to comment Share on other sites More sharing options...
KevKelley Posted April 13, 2021 Author Share Posted April 13, 2021 So after some looking, I don't think I can add ny extra sprites or move enough code around, as my last bank is full. Ideally I would love to either make a block or leave it blank. I didn't know if there was something like player0height for the score sprites. Quote Link to comment Share on other sites More sharing options...
KevKelley Posted April 13, 2021 Author Share Posted April 13, 2021 After looking this up further, it seems I asked a similar question about swapping sprites. The answer was that it was possible but would come at a cost. But I do still wonder about the heights thing... Quote Link to comment Share on other sites More sharing options...
+Karl G Posted April 13, 2021 Share Posted April 13, 2021 Can you describe in more detail what you are trying to do in this case? Maybe one of us will have a useful idea to help. ? As far as the height goes, that's not controlled by a variable, but is hardcoded to be 8 lines, and all of the included score fonts are also 8 lines tall. Do you have room for 8 more bytes in your graphics bank? If you are only adding one symbol or a blank, then that's all it should take, I think. 1 Quote Link to comment Share on other sites More sharing options...
KevKelley Posted April 13, 2021 Author Share Posted April 13, 2021 I guess I was just trying to use the first 2 and last 2 numbers of the score for a mini-game. So in the minigame I was trying to make the 2 middle numbers either blank, a solid color, or as I had it now, I set _sc2 to something like 240 so it is a glitchy blob that kind of keeps the 2 scores separate for now. And part of me liked how it looked but I was trying to give a more symmetrical appearance. I saw the hex score to get another digit, and I suppose I could try that but I think my graphic bank has something like 4 bytes left (if memory serves me correctly). I did wonder how that works. Does that interfere with the score when adding? Or does it just make a couple more sprites available for use? I might be able to free up a few more bytes if I play around a bit. I guess I was looking for different solutions for a minor issue before I proceed. Quote Link to comment Share on other sites More sharing options...
+Karl G Posted April 13, 2021 Share Posted April 13, 2021 If blank works, then you may not have to do anything special at all. I never noticed, but there seems to be a blank area following 9 in the default score_graphics. Try setting _sc2 to $AA instead (each hex digit is 10), and both of the digits should be blank. It worked for me when I tried it, at least: 1 Quote Link to comment Share on other sites More sharing options...
KevKelley Posted April 13, 2021 Author Share Posted April 13, 2021 I will definitely try. And as a side note I feel like this could open up some opportunities in the future, as I had seen some requests in the past for 2 2-digit scores. Looks like you found a really simple solution. Thank you! Quote Link to comment Share on other sites More sharing options...
+Gemintronic Posted April 13, 2021 Share Posted April 13, 2021 30 minutes ago, Karl G said: If blank works, then you may not have to do anything special at all. I never noticed, but there seems to be a blank area following 9 in the default score_graphics. Try setting _sc2 to $AA instead (each hex digit is 10), and both of the digits should be blank. It worked for me when I tried it, at least: If there's no graphic specified for hex value A wouldn't it point to invalid data on a real cartridge? @KevKelly: did you try adding the extra A-F values as documented in the links and you ran out of space? Not bugging or anything. Just curious about these things Quote Link to comment Share on other sites More sharing options...
KevKelley Posted April 13, 2021 Author Share Posted April 13, 2021 8 minutes ago, Gemintronic said: If there's no graphic specified for hex value A wouldn't it point to invalid data on a real cartridge? @KevKelly: did you try adding the extra A-F values as documented in the links and you ran out of space? Not bugging or anything. Just curious about these things I didn't try to add them because I assumed I wouldn't have enough space to execute it. I only have 6 bytes free in the last bank and thought it would be too much so I was looking at other things that I could do in the other banks first. I also was unsure if it would interfere with my score keeping so until I had a chance to mess with I was looking into it some more (I haven't had much opportunity for any serious time on my game). I noticed when I did $AA with my own font it came out with solid blocks and line (which was kind of what I was working with earlier. When I tried a different font it worked! 1 Quote Link to comment Share on other sites More sharing options...
+Karl G Posted April 13, 2021 Share Posted April 13, 2021 37 minutes ago, Gemintronic said: If there's no graphic specified for hex value A wouldn't it point to invalid data on a real cartridge? Take a look at score_graphics.asm in the bB includes directory. After the 9 digit, there's 8 lines of blank (0) defined. That's what is being read 1 Quote Link to comment Share on other sites More sharing options...
+Karl G Posted April 13, 2021 Share Posted April 13, 2021 30 minutes ago, KevKelley said: I noticed when I did $AA with my own font it came out with solid blocks and line (which was kind of what I was working with earlier. When I tried a different font it worked! Maybe your font doesn't have the zeros following the 9 graphic like the others do? It shouldn't take any extra space if you are just matching what's in the other fonts. 1 Quote Link to comment Share on other sites More sharing options...
+Gemintronic Posted April 13, 2021 Share Posted April 13, 2021 If I were really clever I'd find where bB actually draws the score and tell it to skip the middle two digits. That would leave the center score variable free for use UPDATE: Not clever enough. I did realize one could do a "const noscore = 1" and then use the playerscores mini kernel. Not sure if that would increase the bloat though. https://atariage.com/forums/topic/113146-minikernel-player-scores/ 1 Quote Link to comment Share on other sites More sharing options...
KevKelley Posted April 13, 2021 Author Share Posted April 13, 2021 19 minutes ago, Karl G said: Maybe your font doesn't have the zeros following the 9 graphic like the others do? It shouldn't take any extra space if you are just matching what's in the other fonts. I just checked and I do not have any zeros following the 9 graphic. Thanks! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.