0
0
Fork 0
mirror of https://git.sr.ht/~rabbits/uxn synced 2024-11-30 01:33:01 +00:00

Invert y scroll

This commit is contained in:
neauoire 2021-12-28 10:56:53 -08:00
parent a1dc75a2bc
commit 69f72485c7
3 changed files with 9 additions and 9 deletions

View file

@ -24,7 +24,7 @@
|00 @System &vector $2 &wst $1 &rst $1 &pad $4 &r $2 &g $2 &b $2 &debug $1 &halt $1
|10 @Console &vector $2 &read $1 &pad $5 &write $1 &error $1
|20 @Screen &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &pixel $1 &sprite $1
|20 @Screen &vector $2 &width $2 &height $2 &auto $1 &pad $1 &x $2 &y $2 &addr $2 &pixel $1 &sprite $1
|30 @Audio0 &vector $2 &position $2 &output $1 &pad $3 &adsr $2 &length $2 &addr $2 &volume $1 &pitch $1
|40 @Audio1 &vector $2 &position $2 &output $1 &pad $3 &adsr $2 &length $2 &addr $2 &volume $1 &pitch $1
|50 @Audio2 &vector $2 &position $2 &output $1 &pad $3 &adsr $2 &length $2 &addr $2 &volume $1 &pitch $1

View file

@ -22,7 +22,7 @@ WITH REGARD TO THIS SOFTWARE.
#include <unistd.h>
static FILE *f;
static DIR *d;
static DIR *dir;
static char *current_filename = "";
static struct dirent *de;
@ -38,9 +38,9 @@ reset(void)
fclose(f);
f = NULL;
}
if(d != NULL) {
closedir(d);
d = NULL;
if(dir != NULL) {
closedir(dir);
dir = NULL;
}
de = NULL;
state = IDLE;
@ -67,8 +67,8 @@ file_read_dir(char *dest, Uint16 len)
{
static char pathname[4096];
char *p = dest;
if(de == NULL) de = readdir(d);
for(; de != NULL; de = readdir(d)) {
if(de == NULL) de = readdir(dir);
for(; de != NULL; de = readdir(dir)) {
Uint16 n;
if(de->d_name[0] == '.' && de->d_name[1] == '\0')
continue;
@ -94,7 +94,7 @@ file_read(void *dest, Uint16 len)
{
if(state != FILE_READ && state != DIR_READ) {
reset();
if((d = opendir(current_filename)) != NULL)
if((dir = opendir(current_filename)) != NULL)
state = DIR_READ;
else if((f = fopen(current_filename, "rb")) != NULL)
state = FILE_READ;

View file

@ -39,7 +39,7 @@ void
mouse_mod(Device *d, Uint16 x, Uint16 y)
{
poke16(d->dat, 0xa, x);
poke16(d->dat, 0xc, y);
poke16(d->dat, 0xc, -y);
uxn_eval(d->u, d->vector);
poke16(d->dat, 0xa, 0);
poke16(d->dat, 0xc, 0);