commit 5c10572

chld  ·  2026-10-27 23:19:17 +0000 UTC
parent 351578b
fix makefile, 8bpp mode
7 files changed,  +11, -7
M uxn.c
M uxn.o
+2, -2
 1@@ -8,7 +8,7 @@ GENZEHN = genzehn
 2 
 3 GCCFLAGS = -Wall -W -marm -Wno-int-conversion
 4 LDFLAGS = -lSDL
 5-ZEHNFLAGS = --name "uxn2"
 6+ZEHNFLAGS = --name "uxn39"
 7 
 8 ifeq ($(DEBUG),FALSE)
 9 	GCCFLAGS += -Os
10@@ -19,7 +19,7 @@ endif
11 OBJS = $(patsubst %.c, %.o, $(shell find . -name \*.c))
12 OBJS += $(patsubst %.cpp, %.o, $(shell find . -name \*.cpp))
13 OBJS += $(patsubst %.S, %.o, $(shell find . -name \*.S))
14-EXE = uxn2
15+EXE = uxn39
16 DISTDIR = .
17 vpath %.tns $(DISTDIR)
18 vpath %.elf $(DISTDIR)
M uxn.c
+9, -5
 1@@ -772,9 +772,7 @@ static void set_screen_mode(int w,int h) {
 2   scr_w=w;
 3   scr_h=h;
 4   
 5-  int bpp = has_colors ? 16 : 8;
 6-  //  screen=SDL_SetVideoMode(w*zoom,h*zoom,8,scrflags);
 7-  screen = SDL_SetVideoMode(w * zoom, h * zoom, bpp, SDL_SWSURFACE);
 8+  screen=SDL_SetVideoMode(w*zoom,h*zoom,8,SDL_SWSURFACE);
 9   if(!screen) { show_msgbox("Error", "Cannot set screen mode"); exit(1); }
10   SDL_SetColors(screen,colors+palet*8,0,8);
11   bglayer=calloc(w*h,2);
12@@ -1245,6 +1243,7 @@ static void redraw(void) {
13   static Uint8*s=0;
14   int a,r,u,v,x,y;
15   Uint8*p;
16+  
17   if(debugger) {
18     if(!s) s=calloc(80,26);
19     if(!s) err(1,"Allocation failed");
20@@ -1256,6 +1255,8 @@ static void redraw(void) {
21   a=0;
22   p=screen->pixels;
23   r=screen->pitch;
24+  
25+  /*
26   if(debugger) {
27     for(y=0;y<scr_h*zoom;y++) {
28       for(x=0;x<scr_w*zoom;x++) {
29@@ -1271,7 +1272,7 @@ static void redraw(void) {
30         p+=r;
31       }
32     }
33-  } else if(layers) {
34+  } else */ if(layers) {
35     for(y=0;y<scr_h;y++) {
36       for(x=0;x<scr_w;x++) {
37         u=(layers==1?fglayer:bglayer)[a];
38@@ -1305,6 +1306,8 @@ static inline int select_joystick(Uint8 n) {
39 static int run_screen(void) {
40   SDL_Event e;
41   int i,j,k;
42+
43+  
44   while(SDL_WaitEvent(&e)) {
45     switch(e.type) {
46       case SDL_QUIT: return 0;
47@@ -1615,8 +1618,9 @@ static void set_full_screen_size(void) {
48   SDL_Rect**m=SDL_ListModes(0,scrflags);
49   int i;
50   if(!m || m==(SDL_Rect**)(-1) || !*m) err(1,"Cannot determine size to use for full screen mode");
51-  default_width=m[0]->w/zoom;
52+  /* default_width=m[0]->w/zoom;
53   default_height=m[0]->h/zoom;
54+  */
55 }
56 
57 int main(int argc, char **argv)
M uxn.o
+0, -0
+0, -0
+0, -0
+0, -0
+0, -0