Browse code

Merge branch 'main' of git.sr.ht:~rabbits/uxn

neauoire authored on 17/09/2021 18:25:31
Showing 3 changed files
... ...
@@ -1,9 +1,9 @@
1 1
 </$objtype/mkfile
2 2
 
3 3
 TARG=bin/uxncli bin/uxnasm bin/uxnemu
4
-USM=`{walk -f projects/ | grep '\.tal$' | grep -v blank.tal}
4
+USM=`{walk -f projects/ | grep '\.tal$' | grep -v blank.tal | grep -v /library/}
5 5
 ROM=${USM:%.tal=%.rom}
6
-CFLAGS=$CFLAGS -D__plan9__ -DNO_PORTMIDI -I/sys/include/npe -I/sys/include/npe/SDL2
6
+CFLAGS=$CFLAGS -D__plan9__ -I/sys/include/npe -I/sys/include/npe/SDL2
7 7
 HFILES=\
8 8
 	/sys/include/npe/stdio.h\
9 9
 	src/devices/apu.h\
... ...
@@ -76,7 +76,7 @@ ppu_init(Ppu *p, Uint8 hor, Uint8 ver)
76 76
 {
77 77
 	p->width = 8 * hor;
78 78
 	p->height = 8 * ver;
79
-	p->bg = malloc(p->width / 4 * p->height * sizeof(Uint8));
80
-	p->fg = malloc(p->width / 4 * p->height * sizeof(Uint8));
79
+	p->bg = calloc(1, p->width / 4 * p->height * sizeof(Uint8));
80
+	p->fg = calloc(1, p->width / 4 * p->height * sizeof(Uint8));
81 81
 	return 1;
82 82
 }
... ...
@@ -19,7 +19,7 @@ typedef unsigned int Uint32;
19 19
 
20 20
 typedef struct Ppu {
21 21
 	Uint16 width, height;
22
-	Uint8 *pixels, *bg, *fg;
22
+	Uint8 *bg, *fg;
23 23
 } Ppu;
24 24
 
25 25
 int ppu_init(Ppu *p, Uint8 hor, Uint8 ver);