fix screen2_puts() parameter order

This commit is contained in:
nino-porcino 2021-12-17 09:12:39 +01:00
parent 545096f224
commit 41db613f06
4 changed files with 10 additions and 10 deletions

View File

@ -104,7 +104,7 @@ byte col = FB_BG(COLOR_DARK_RED,COLOR_LIGH_YELLOW);
screen2_putc('A', 31, 23, col);
// writes a string
screen2_puts(16, 12, col, "HELLO");
screen2_puts("HELLO", 16, 12, col);
// note: screen2_putc() and screen2_puts() are fast but they
// can only print characters aligned within the 8x8 grid

View File

@ -158,12 +158,12 @@ void demo_amiga_hand() {
tms_init_regs(SCREEN2_TABLE);
screen2_init_bitmap(FG_BG(COLOR_BLACK,COLOR_WHITE));
screen2_puts(0, 0, FG_BG(COLOR_BLACK,COLOR_WHITE), "*** P-LAB VIDEO CARD SYSTEM ***");
screen2_puts(0, 2, FG_BG(COLOR_BLACK,COLOR_WHITE), "16K VRAM BYTES FREE");
screen2_puts(0, 4, FG_BG(COLOR_BLACK,COLOR_WHITE), "READY.");
screen2_puts("*** P-LAB VIDEO CARD SYSTEM ***", 0, 0, FG_BG(COLOR_BLACK,COLOR_WHITE));
screen2_puts("16K VRAM BYTES FREE" , 0, 2, FG_BG(COLOR_BLACK,COLOR_WHITE));
screen2_puts("READY." , 0, 4, FG_BG(COLOR_BLACK,COLOR_WHITE));
for(word p=0;p<612;p+=4) {
screen2_line(amiga_data[p],amiga_data[p+1],amiga_data[p+2],amiga_data[p+3]);
}
screen2_puts(18, 12, FG_BG(COLOR_DARK_BLUE, COLOR_WHITE), "APPLE1");
screen2_puts("APPLE1", 18, 12, FG_BG(COLOR_DARK_BLUE, COLOR_WHITE));
}

View File

@ -4,13 +4,13 @@ void demo_screen2() {
byte text_color = FG_BG(COLOR_BLACK,COLOR_WHITE);
screen2_init_bitmap(text_color);
screen2_puts(0, 0, text_color, "*** P-LAB VIDEO CARD SYSTEM ***");
screen2_puts(0, 2, text_color, "16K VRAM BYTES FREE");
screen2_puts(0, 4, text_color, "READY.");
screen2_puts("*** P-LAB VIDEO CARD SYSTEM ***", 0, 0, text_color);
screen2_puts("16K VRAM BYTES FREE" , 0, 2, text_color);
screen2_puts("READY." , 0, 4, text_color);
// display all colors in the palette
for(byte i=0;i<16;i++) {
screen2_puts(5,(byte)(6+i),(byte)(((15-i)<<4)+i)," SCREEN 2 ");
screen2_puts(" SCREEN 2 ",5,(byte)(6+i),(byte)(((15-i)<<4)+i));
}
screen2_line(18, 45,232,187);

View File

@ -48,7 +48,7 @@ void screen2_putc(byte ch, byte x, byte y, byte col) {
tms_set_vram_write_addr(TMS_COLOR_TABLE + addr); for(byte i=0;i<8;i++) TMS_WRITE_DATA_PORT(col);
}
void screen2_puts(byte x, byte y, byte col, char *s) {
void screen2_puts(char *s, byte x, byte y, byte col) {
byte c;
while(c=*s++) {
screen2_putc(c, x++, y, col);