mirror of
https://github.com/jeremysrand/apple2048.git
synced 2025-04-07 08:40:53 +00:00
Use the Apple //e enhanced target and use some features from that .h file
This commit is contained in:
parent
16b96a515c
commit
0342f9a18c
2
Makefile
2
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
|
||||
|
||||
|
||||
|
19
apple2048.c
19
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 <apple2enh.h>
|
||||
#include <conio.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user