mirror of
https://github.com/jeremysrand/a2sudoku.git
synced 2024-06-06 12:29:29 +00:00
Fix issues related to support for cc65 2.17. It only compiles now under 2.17.
This commit is contained in:
parent
8339c67440
commit
beb9d2666f
Binary file not shown.
|
@ -39,7 +39,7 @@ PROJECT_TYPE = cc65
|
||||||
|
|
||||||
# Uncomment and set this to your starting address in Apple II memory
|
# Uncomment and set this to your starting address in Apple II memory
|
||||||
# if necessary:
|
# if necessary:
|
||||||
START_ADDR = 4000
|
# START_ADDR = 4000
|
||||||
|
|
||||||
# Set the default CPU to assemble for. You can change this in the
|
# Set the default CPU to assemble for. You can change this in the
|
||||||
# body of a .s file using control commands like ".PC02". Uncomment
|
# body of a .s file using control commands like ".PC02". Uncomment
|
||||||
|
@ -70,7 +70,7 @@ SRCDIRS+=
|
||||||
|
|
||||||
# If you want to add arguments to the compile commandline, add them
|
# If you want to add arguments to the compile commandline, add them
|
||||||
# to this variable:
|
# to this variable:
|
||||||
# CFLAGS += -Os
|
CFLAGS += -Os
|
||||||
|
|
||||||
# If you want to add arguments to the assembly commandline, add them
|
# If you want to add arguments to the assembly commandline, add them
|
||||||
# to this variable:
|
# to this variable:
|
||||||
|
|
Binary file not shown.
|
@ -59,7 +59,7 @@ ifeq ($(BUILD_TYPE),cc65)
|
||||||
MACHCONFIG += -C $(BASE_MACHINE)-asm.cfg
|
MACHCONFIG += -C $(BASE_MACHINE)-asm.cfg
|
||||||
LDFLAGS += -u __EXEHDR__
|
LDFLAGS += -u __EXEHDR__
|
||||||
else
|
else
|
||||||
MACHCONFIG += -C $(BASE_MACHINE).cfg
|
MACHCONFIG += -C apple2-hgr.cfg
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -12,13 +12,13 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <tgi.h>
|
#include <tgi.h>
|
||||||
#include <tgi/tgi-mode.h>
|
|
||||||
|
|
||||||
#include "game.h"
|
#include "game.h"
|
||||||
#include "ui.h"
|
#include "ui.h"
|
||||||
#include "mouseWrapper.h"
|
#include "mouseWrapper.h"
|
||||||
#include "drivers/a2_hires_drv.h"
|
#include "drivers/a2_hires_drv.h"
|
||||||
|
|
||||||
|
#pragma code-name ("LOWCODE")
|
||||||
|
|
||||||
// Macros and defines
|
// Macros and defines
|
||||||
#define SQUARE_WIDTH 28
|
#define SQUARE_WIDTH 28
|
||||||
|
@ -29,10 +29,10 @@
|
||||||
#define THICK_LINE_HEIGHT 3
|
#define THICK_LINE_HEIGHT 3
|
||||||
#define THIN_LINE_HEIGHT 1
|
#define THIN_LINE_HEIGHT 1
|
||||||
|
|
||||||
#define TEXT_OFFSET_X 12
|
#define TEXT_OFFSET_X 19
|
||||||
#define TEXT_OFFSET_Y 6
|
#define TEXT_OFFSET_Y 6
|
||||||
|
|
||||||
#define TEXT_UNDERLINE_OFFSET_X -2
|
#define TEXT_UNDERLINE_OFFSET_X -9
|
||||||
#define TEXT_UNDERLINE_OFFSET_Y 9
|
#define TEXT_UNDERLINE_OFFSET_Y 9
|
||||||
#define TEXT_UNDERLINE_WIDTH 8
|
#define TEXT_UNDERLINE_WIDTH 8
|
||||||
|
|
||||||
|
@ -92,7 +92,7 @@ void drawGrid(void)
|
||||||
|
|
||||||
tgi_clear();
|
tgi_clear();
|
||||||
|
|
||||||
tgi_setcolor(COLOR_WHITE);
|
tgi_setcolor(TGI_COLOR_WHITE);
|
||||||
for (pos = 0; pos <= BOARD_SIZE; pos++) {
|
for (pos = 0; pos <= BOARD_SIZE; pos++) {
|
||||||
if ((pos % SUBSQUARE_SIZE) == 0) {
|
if ((pos % SUBSQUARE_SIZE) == 0) {
|
||||||
tgi_bar(xPos, 0, xPos + THICK_LINE_WIDTH - 1, TOTAL_HEIGHT - 1);
|
tgi_bar(xPos, 0, xPos + THICK_LINE_WIDTH - 1, TOTAL_HEIGHT - 1);
|
||||||
|
@ -469,7 +469,7 @@ void drawScratch(tPos x, tPos y, tScratchValues scratch)
|
||||||
drawNine(screenX, screenY);
|
drawNine(screenX, screenY);
|
||||||
}
|
}
|
||||||
|
|
||||||
tgi_setcolor(COLOR_WHITE);
|
tgi_setcolor(TGI_COLOR_WHITE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -481,10 +481,10 @@ void updatePos(tPos x, tPos y, tSquareVal val, tScratchValues scratch, bool corr
|
||||||
int edgeY = screenY + SQUARE_HEIGHT - 1;
|
int edgeY = screenY + SQUARE_HEIGHT - 1;
|
||||||
char buffer[2];
|
char buffer[2];
|
||||||
|
|
||||||
tgi_setcolor(COLOR_BLACK);
|
tgi_setcolor(TGI_COLOR_BLACK);
|
||||||
tgi_bar(screenX, screenY, edgeX, edgeY);
|
tgi_bar(screenX, screenY, edgeX, edgeY);
|
||||||
|
|
||||||
tgi_setcolor(COLOR_WHITE);
|
tgi_setcolor(TGI_COLOR_WHITE);
|
||||||
if (val != EMPTY_SQUARE) {
|
if (val != EMPTY_SQUARE) {
|
||||||
buffer[0] = '0' + val;
|
buffer[0] = '0' + val;
|
||||||
buffer[1] = '\0';
|
buffer[1] = '\0';
|
||||||
|
@ -530,7 +530,7 @@ void youWon(void)
|
||||||
static char line1[80];
|
static char line1[80];
|
||||||
char *line2 = "Press any key";
|
char *line2 = "Press any key";
|
||||||
time_t solutionTime = timeToSolve();
|
time_t solutionTime = timeToSolve();
|
||||||
int textHeight = tgi_textheight(line1);
|
int textHeight = 7;
|
||||||
|
|
||||||
if (solutionTime == 0xffffffff) {
|
if (solutionTime == 0xffffffff) {
|
||||||
snprintf(line1, sizeof(line1), "You solved it!");
|
snprintf(line1, sizeof(line1), "You solved it!");
|
||||||
|
@ -550,10 +550,10 @@ void youWon(void)
|
||||||
wonX = (TOTAL_WIDTH - wonWidth) / 2;
|
wonX = (TOTAL_WIDTH - wonWidth) / 2;
|
||||||
wonY = (TOTAL_HEIGHT - wonHeight) / 2;
|
wonY = (TOTAL_HEIGHT - wonHeight) / 2;
|
||||||
|
|
||||||
tgi_setcolor(COLOR_BLACK);
|
tgi_setcolor(TGI_COLOR_BLACK);
|
||||||
tgi_bar(wonX, wonY, wonX + wonWidth, wonY + wonHeight);
|
tgi_bar(wonX, wonY, wonX + wonWidth, wonY + wonHeight);
|
||||||
|
|
||||||
tgi_setcolor(COLOR_WHITE);
|
tgi_setcolor(TGI_COLOR_WHITE);
|
||||||
tgi_outtextxy((TOTAL_WIDTH - line1Width) / 2, wonY + (textHeight * 2), line1);
|
tgi_outtextxy((TOTAL_WIDTH - line1Width) / 2, wonY + (textHeight * 2), line1);
|
||||||
tgi_outtextxy((TOTAL_WIDTH - line2Width) / 2, wonY + (textHeight * 4), line2);
|
tgi_outtextxy((TOTAL_WIDTH - line2Width) / 2, wonY + (textHeight * 4), line2);
|
||||||
|
|
||||||
|
@ -794,7 +794,6 @@ bool playGame(void)
|
||||||
youWon();
|
youWon();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user