Jump to content
IGNORED

Change score font on the fly


Maurice Den Braber

Recommended Posts

I've looked around but am unable to find it;

 

Is there any way to access the memory locations for the current 6 characters shown in the score and change those fonts on the fly?

 

What I'm trying to figure out is if there is anyway to flip the score between a score and an inventory system or something else like text.

 

What I've created now is a custom score font in which each number is a sprite of an inventory item.

This way I've created an inventory system by simply changing the score to a number which represents each item in inventory.

 

That made me wonder is there is any way to access these fonts directly through bB or if a small piece of custom asm is needed for that.

 

I've looked at the text kernel but that's not really what I'm looking for, I'd like to change the fonts on the fly, preferable by defining the font-characters inline in code.

 

Link to comment
Share on other sites

The short answer is no.  The longer answer is that only one font gets compiled into your project to save ROM space. Being able to switch would require defining the inventory graphics elsewhere, and modifying bB internals where the pointers for the score are set each frame (in std_overscan.asm, I believe).  Maybe someone more clever will have a better solution.

 

I do have an alternate suggestion which should work if your game will have six or less inventory items: get a copy of RevEng's enhanced score_graphics.asm, put it in your project directory.  Choose which font you want as normal, and make use of the 6 hex digits for that font by editing the A-F graphics to be your inventory items. In this case, you will be able to switch between normal digits and your custom graphics freely.

Link to comment
Share on other sites

1 hour ago, Karl G said:

The short answer is no.  The longer answer is that only one font gets compiled into your project to save ROM space. Being able to switch would require defining the inventory graphics elsewhere, and modifying bB internals where the pointers for the score are set each frame (in std_overscan.asm, I believe).  Maybe someone more clever will have a better solution.

 

I do have an alternate suggestion which should work if your game will have six or less inventory items: get a copy of RevEng's enhanced score_graphics.asm, put it in your project directory.  Choose which font you want as normal, and make use of the 6 hex digits for that font by editing the A-F graphics to be your inventory items. In this case, you will be able to switch between normal digits and your custom graphics freely.

That seems a lot like what I'm looking for, I'll check it out, thanks!

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...