- [NEW] Afegit lagueirtofile

- [FIX] Renombrat rom.c a rom.h
- [NEW] Afegit mode gràfic especial per a l'editor
This commit is contained in:
2026-05-15 13:33:29 +02:00
parent 699ac3d052
commit 7d513a3d0b
5 changed files with 27 additions and 4 deletions
+18 -2
View File
@@ -2,7 +2,7 @@
#include <stdio.h>
#include <string.h>
#include "lua.h"
#include "rom.c"
#include "rom.h"
#include "play.h"
#include <vector>
@@ -124,6 +124,18 @@ void reinit() {
//SDL_RenderSetLogicalSize(mini_ren, 640, 480);
mini_bak = SDL_CreateTexture(mini_ren, SDL_PIXELFORMAT_ARGB8888, SDL_TEXTUREACCESS_STREAMING, 256, 192);
break;
case 4:
screen_width = 80;
screen_height = 30;
current_color = 0x07;
current_border = 0;
cursor_x = 0;
cursor_y = 0;
char_screen = &mem[0];
color_screen = &mem[0x1200];
//SDL_RenderSetLogicalSize(mini_ren, 640, 480);
mini_bak = SDL_CreateTexture(mini_ren, SDL_PIXELFORMAT_ARGB8888, SDL_TEXTUREACCESS_STREAMING, 640, 240);
break;
}
}
@@ -297,9 +309,13 @@ int main(int argc,char*argv[]) {
case 1:
case 2:
case 3:
case 4:
for (int y=0; y<screen_height; ++y) {
for (int x=0; x<screen_width; ++x) {
const uint8_t chr_color = COLSCR(x,y);
uint8_t chr_color = COLSCR(x,y);
if ((debug_cursor_blink<30)&&(cursor_x==x)&&(cursor_y==y)) {
chr_color = (chr_color>>4)+((chr_color&0x0f)<<4);
}
const uint32_t ink_color = palette[chr_color & 0x0f];
const uint32_t paper_color = palette[chr_color >> 4];
const uint8_t chr = CHRSCR(x,y);