allow to leave PC in other map

This commit is contained in:
Ondřej Novák 2025-02-04 15:08:35 +01:00
parent 5c4cfaf314
commit 33fa026576
23 changed files with 515 additions and 319 deletions

View file

@ -96,6 +96,7 @@ void showview32(word x,word y,word xs,word ys);
void showview256(word x,word y,word xs,word ys);
void showview_lo(word x,word y,word xs,word ys);
void outtext(const char *text);
void outtext_w_nl(const char *text);
int initmode(const INI_CONFIG_SECTION *, const char *app_name);
int initmode32(void);
int initmode32b(void);

View file

@ -72,6 +72,41 @@ void outtext(const char *text)
}
}
void outtext_w_nl(const char *text)
{
byte pos;
int savewriteposx = writeposx;
if (fontdsize)
while (*text)
{
if (*text == '\n') {
writepos -= writeposx - savewriteposx - GetScreenPitch() * (charsize(curfont, 'X') >> 8);
writeposx = savewriteposx;
} else {
char2_32(writepos,curfont,*text);
pos=(charsize(curfont,*text) & 0xff)<<1;
writepos+=pos;
writeposx+=pos;
}
text++;
}
else
while (*text)
{
if (*text == '\n') {
writepos -= writeposx - savewriteposx - GetScreenPitch() * (charsize(curfont, 'X') >> 8);
writeposx = savewriteposx;
} else {
char_32(writepos,curfont,*text);
pos=charsize(curfont,*text) & 0xff;
writepos+=pos;
writeposx+=pos;
}
text++;
}
}
/*MODEinfo vesadata[3];
SVGAinfo svgadata[3];
int lastbank=0;