Mortal Kombat Plus
Documentação gerada automaticamente com Doxygen
Carregando...
Procurando...
Nenhuma entrada encontrado
typewriter_printer.c
Ir para a documentação desse arquivo.
1#include "typewriter_printer.h"
2
3void typewriterEffect(const char *text, u16 x, u16 y, u16 delay, VDPPlane plane, u16 numPal)
4{
5 u16 len = strlen(text);
6 for (u16 i = 0; i < len; i++)
7 {
8 VDP_setTileMapXY(plane, TILE_ATTR_FULL(numPal, TRUE, FALSE, FALSE, TILE_FONT_INDEX + text[i] - ' '), x + i, y);
9 SYS_doVBlankProcess(); // Espera o V-Blank
10
11 if (delay != 0)
12 {
13 for (u16 j = 0; j < delay; j++)
14 {
15 SYS_doVBlankProcess(); // Atraso adicional
16 }
17 }
18 }
19}
20
21// Função para escrever todas as linhas de texto de uma vez
22void typewriterWriteAllLines(const TextLine *lines, u16 numLines, VDPPlane plane, u16 numPal)
23{
24 for (u16 i = 0; i < numLines; i++)
25 {
26 const char *text = lines[i].text;
27 u16 x = lines[i].x;
28 u16 y = lines[i].y;
29 u16 len = strlen(text);
30 for (u16 j = 0; j < len; j++)
31 {
32 VDP_setTileMapXY(plane, TILE_ATTR_FULL(numPal, TRUE, FALSE, FALSE, TILE_FONT_INDEX + text[j] - ' '), x + j, y);
33 }
34 }
35}
void typewriterEffect(const char *text, u16 x, u16 y, u16 delay, VDPPlane plane, u16 numPal)
void typewriterWriteAllLines(const TextLine *lines, u16 numLines, VDPPlane plane, u16 numPal)