gbdk-2020 | GameBoy Development Kit |
| download: https://git.y1.nz/archives/gbdk.tar.gz | |
| README | Files | Log | Refs | LICENSE |
commit babfc15aa1ac6cf06ef9773e83683d14378b3710 parent e184ff5c55d16f0a35657278b6437e664ec28da3 Author: Toxa <56631470+untoxa@users.noreply.github.com> Date: Sat, 11 Jun 2022 11:03:34 +0300 Merge pull request #375 from gbdk-2020/NES MSX: force MSX smoke test compile, not work properly though. Diffstat:
| M | gbdk-lib/examples/msxdos/smoke/Makefile | 2 | +- |
| M | gbdk-lib/examples/msxdos/smoke/assets.c | 2 | +- |
| M | gbdk-lib/examples/msxdos/smoke/smoketest.c | 26 | ++++++++++++-------------- |
3 files changed, 14 insertions(+), 16 deletions(-)
diff --git a/gbdk-lib/examples/msxdos/smoke/Makefile b/gbdk-lib/examples/msxdos/smoke/Makefile @@ -26,5 +26,5 @@ $(BINS): $(OBJS) rm -f *.map *.noi *.ihx *.lst clean: - rm -f *.o *.lst *.map *.com *~ *.rel *.cdb *.ihx *.lnk *.sym *.asm *.noi + rm -f *.o *.lst *.map *.com *~ *.rel *.cdb *.ihx *.lnk *.sym *.asm *.noi *.0?? *.rom diff --git a/gbdk-lib/examples/msxdos/smoke/assets.c b/gbdk-lib/examples/msxdos/smoke/assets.c @@ -1,6 +1,6 @@ #pragma bank 2 -#include <sms/sms.h> +#include <gbdk/platform.h> BANKREF(earth_data) const unsigned char earth_data[] = { diff --git a/gbdk-lib/examples/msxdos/smoke/smoketest.c b/gbdk-lib/examples/msxdos/smoke/smoketest.c @@ -16,10 +16,10 @@ int8_t xspd = 0, yspd = 0; uint8_t anim = 0, tick = 0; -joypads_t joy; +uint8_t joy; void main() { - HIDE_LEFT_COLUMN; - SPRITES_8x16; +// HIDE_LEFT_COLUMN; +// SPRITES_8x16; DISPLAY_ON; // vmemcpy(0x4000, earth_data, sizeof(earth_data)); @@ -36,22 +36,20 @@ void main() { set_tile_map(4, 16, 4, 2, tilemapw); - joypad_init(2, &joy); - while(TRUE) { - joypad_ex(&joy); + joy = joypad(); - if (joy.joy0 & J_LEFT) { + if (joy & J_LEFT) { if (xspd > -32) xspd -= 2; - } else if (joy.joy0 & J_RIGHT) { + } else if (joy & J_RIGHT) { if (xspd < 32) xspd += 2; } else { if (xspd < 0) xspd++; else if (xspd > 0) xspd--; } - if (joy.joy0 & J_UP) { + if (joy & J_UP) { if (yspd > -32) yspd -= 2; - } else if (joy.joy0 & J_DOWN) { + } else if (joy & J_DOWN) { if (yspd < 32) yspd += 2; } else { if (yspd < 0) yspd++; else if (yspd > 0) yspd--; @@ -73,18 +71,18 @@ void main() { move_sprite(0, x >> 4, y >> 4); move_sprite(1, (x >> 4) + 8, y >> 4); - - if (joy.joy1 & J_LEFT) { +/* + if (joy & J_LEFT) { scroll_bkg(-1, 0); } else if (joy.joy1 & J_RIGHT) { scroll_bkg(1, 0); } - if (joy.joy1 & J_UP) { + if (joy & J_UP) { scroll_bkg(0, -1); } else if (joy.joy1 & J_DOWN) { scroll_bkg(0, 1); } - +*/ wait_vbl_done(); } }
This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.