Merge branch 'main' of git.sr.ht:~rabbits/uxn
This commit is contained in:
commit
cba316cf3a
4
mkfile
4
mkfile
|
@ -1,9 +1,9 @@
|
||||||
</$objtype/mkfile
|
</$objtype/mkfile
|
||||||
|
|
||||||
TARG=bin/uxncli bin/uxnasm bin/uxnemu
|
TARG=bin/uxncli bin/uxnasm bin/uxnemu
|
||||||
USM=`{walk -f projects/ | grep '\.tal$' | grep -v blank.tal}
|
USM=`{walk -f projects/ | grep '\.tal$' | grep -v blank.tal | grep -v /library/}
|
||||||
ROM=${USM:%.tal=%.rom}
|
ROM=${USM:%.tal=%.rom}
|
||||||
CFLAGS=$CFLAGS -D__plan9__ -DNO_PORTMIDI -I/sys/include/npe -I/sys/include/npe/SDL2
|
CFLAGS=$CFLAGS -D__plan9__ -I/sys/include/npe -I/sys/include/npe/SDL2
|
||||||
HFILES=\
|
HFILES=\
|
||||||
/sys/include/npe/stdio.h\
|
/sys/include/npe/stdio.h\
|
||||||
src/devices/apu.h\
|
src/devices/apu.h\
|
||||||
|
|
|
@ -76,7 +76,7 @@ ppu_init(Ppu *p, Uint8 hor, Uint8 ver)
|
||||||
{
|
{
|
||||||
p->width = 8 * hor;
|
p->width = 8 * hor;
|
||||||
p->height = 8 * ver;
|
p->height = 8 * ver;
|
||||||
p->bg = malloc(p->width / 4 * p->height * sizeof(Uint8));
|
p->bg = calloc(1, p->width / 4 * p->height * sizeof(Uint8));
|
||||||
p->fg = malloc(p->width / 4 * p->height * sizeof(Uint8));
|
p->fg = calloc(1, p->width / 4 * p->height * sizeof(Uint8));
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,7 @@ typedef unsigned int Uint32;
|
||||||
|
|
||||||
typedef struct Ppu {
|
typedef struct Ppu {
|
||||||
Uint16 width, height;
|
Uint16 width, height;
|
||||||
Uint8 *pixels, *bg, *fg;
|
Uint8 *bg, *fg;
|
||||||
} Ppu;
|
} Ppu;
|
||||||
|
|
||||||
int ppu_init(Ppu *p, Uint8 hor, Uint8 ver);
|
int ppu_init(Ppu *p, Uint8 hor, Uint8 ver);
|
||||||
|
|
Loading…
Reference in New Issue