diff --git a/Makefile b/Makefile index acd5894..bbdf2f4 100644 --- a/Makefile +++ b/Makefile @@ -12,7 +12,7 @@ C_OBJS=$(SRCS:.c=.o) ASM_OBJS=$(ASM:.s=.o) OBJS=$(C_OBJS) $(ASM_OBJS) -PLATFORM=apple2 +PLATFORM=apple2enh PLATFORM_CFG=-C apple2-system.cfg diff --git a/apple2048.c b/apple2048.c index 46dfe25..a9c7b44 100644 --- a/apple2048.c +++ b/apple2048.c @@ -1,3 +1,12 @@ +/* + * File: apple2048.c + * Author: Jeremy Rand + * Date: July 23, 2014 + * + * This file contains the entry point for the 2048 game. + */ + +#include #include #include #include @@ -105,29 +114,29 @@ void handleNextEvent(void) switch (ch) { case 'i': case 'I': - case 11: // Up arrow + case CH_CURS_UP: slideInDirection(DIR_UP); return; case 'j': case 'J': - case 8: // Left arrow + case CH_CURS_LEFT: slideInDirection(DIR_LEFT); return; case 'k': case 'K': - case 21: // Right arrow + case CH_CURS_RIGHT: slideInDirection(DIR_RIGHT); return; case 'm': case 'M': - case 10: // Up arrow + case CH_CURS_DOWN: slideInDirection(DIR_DOWN); return; - case 27: // Escape + case CH_ESC: case 'q': case 'Q': exit(0);