News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu

cpctelera : symbolafter?

Started by funkheld, 11:27, 27 July 20

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

funkheld

Hi good afternoon.

is there a way with cpctelera to change the ascii code similar to symbolafter in basic?
would be grateful for a suggestion even if it is only direct via sdcc-asm.

thank you.

SpDizzy

#1
Hi,
Best way to create your own fonts, is treating them as sprites.
That way you only need to convert a font image with image_conversion.mk on /cfg and create your own function for draw each character with 'cpct_drawSprite'.
On the other hand, you can use 'cpct_drawStringM1' (much more slower and byte consuming) for drawing on mode 1 with the system font, located at ROM.
If you want your own font in that case, this is a more difficult approach.
You must edit part of CPCTelera's source code, commenting part of the code from 'cpct_drawStringM1' function to disable read from ROM, and read from RAM instead for the drawing.
Your fonts must be absolutly located on RAM at 0x3980 starting from 'A', and, this is very important, 'cpct_drawStringM1' must be located above 0x4000 to work as needed.
Much more easy, fast and reliable solution: 'cpct_drawSprite'.
As usual, plenty of examples on CPCTelera documentation, CPCTelera's samples folder, both for 'strings' and 'sprites' and on CPCRetroDev games using CPCTelera along these editions.

funkheld


thank you
I've already thought of something like that.
then I'll take the sprites for the text.


thank you.
greeting


Powered by SMFPacks Menu Editor Mod