1
Discussion - EVE / Resetting handles
« on: January 13, 2020, 04:38:31 PM »
Hello,
Using the BT815, I am trying to dynamically allocate bitmap and font handles for a given display list. I would like to have many more graphics stored in flash than the 32 handles that are available. My plan is that before starting a new display list, I will allocate all the handles I need for that display list to the bitmaps and fonts used.
However, I'm running into an issue. For example -
1.) In one display list:
Use CMD_SETFONT2 to assign a custom font to handle 0.
Result: Font is accessed and displayed as expected
2.) In the next display list:
Select bitmap handle 0 with BITMAP_HANDLE
Use CMD_SETBITMAP to set the source, format, etc. of a single bitmap in flash - I no longer need the font from step 1.
Result: Bitmap is not properly displayed (The color is not correct).
If the handle is first used for a bitmap and then a font, the bitmap and font are both displayed correctly.
This leads me to believe that SETFONT2 has permanently assigned handle 0 to a font.
Is it possible to "undo" the setfont2 command? Or to reset all handles? Maybe I'm missing something else... Thank you for any hints you can provide!
Using the BT815, I am trying to dynamically allocate bitmap and font handles for a given display list. I would like to have many more graphics stored in flash than the 32 handles that are available. My plan is that before starting a new display list, I will allocate all the handles I need for that display list to the bitmaps and fonts used.
However, I'm running into an issue. For example -
1.) In one display list:
Use CMD_SETFONT2 to assign a custom font to handle 0.
Result: Font is accessed and displayed as expected
2.) In the next display list:
Select bitmap handle 0 with BITMAP_HANDLE
Use CMD_SETBITMAP to set the source, format, etc. of a single bitmap in flash - I no longer need the font from step 1.
Result: Bitmap is not properly displayed (The color is not correct).
If the handle is first used for a bitmap and then a font, the bitmap and font are both displayed correctly.
This leads me to believe that SETFONT2 has permanently assigned handle 0 to a font.
Is it possible to "undo" the setfont2 command? Or to reset all handles? Maybe I'm missing something else... Thank you for any hints you can provide!