Added toggle for debugger

This commit is contained in:
neauoire 2021-02-18 18:34:26 -08:00
parent ac08f08a4d
commit bd041ea2a0
3 changed files with 5 additions and 3 deletions

View File

@ -85,7 +85,7 @@ BRK
### Controller(dev/ctrl)
A device that works like a NES controller, each button is a bit from a single byte.
A device that works like a NES controller, each button is a bit from a single byte. Press `h` to toggle debugger.
- `0x01` Ctrl
- `0x02` Alt

View File

@ -258,6 +258,8 @@ void
doctrl(SDL_Event *event, int z)
{
Uint8 flag = 0x00;
if(z && event->key.keysym.sym == SDLK_h)
GUIDES = !GUIDES;
if(SDL_GetModState() & KMOD_LCTRL || SDL_GetModState() & KMOD_RCTRL)
flag = 0x01;
if(SDL_GetModState() & KMOD_LALT || SDL_GetModState() & KMOD_RALT)
@ -394,7 +396,7 @@ main(int argc, char **argv)
devconsole = portuxn(&u, "console", defaultrw, consolew);
devscreen = portuxn(&u, "screen", screenr, screenw);
devsprite = portuxn(&u, "sprite", defaultrw, spritew);
devsprite = portuxn(&u, "sprite", screenr, spritew);
devcontroller = portuxn(&u, "controller", defaultrw, defaultrw);
devkey = portuxn(&u, "key", defaultrw, consolew);
devmouse = portuxn(&u, "mouse", defaultrw, defaultrw);

View File

@ -29,7 +29,7 @@ BRK
( check paint )
#04 IOR #00 EQU ,skip ROT JMP? POP2
#05 ,brush_large ~mousex #0004 SUB2 ~mousey #0004 SUB2 ,drawsprite JSR
#05 ,brush_large ~mousex #0004 SUB2 ~mousey #0004 SUB2 ,drawsprite JSR
@skip
~mousex =lastx ~mousey =lasty