Start of F256lib amalgamated build.

This commit is contained in:
Scott Duensing 2024-03-27 19:54:24 -05:00
parent d64a68da17
commit 72a6812c1a
29 changed files with 335 additions and 108 deletions

1
.gitignore vendored
View file

@ -44,6 +44,7 @@ include/
generated/ generated/
overlay overlay
overlayhelper overlayhelper
f256lib.h
# Dumb QtCreator junk # Dumb QtCreator junk
build-*/ build-*/

76
build-f256lib.sh Executable file
View file

@ -0,0 +1,76 @@
#!/bin/bash -ex
#
# Copyright (c) 2024 Scott Duensing, scott@kangaroopunch.com
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#
TARGET=f256lib.h
cat f256lib/stddclmr.h > ${TARGET}
echo "#define F256LIB_AMALGAMATED_BUILD" >> ${TARGET}
cat f256lib/f_api.h >> ${TARGET}
cat include/f256_dma.h >> ${TARGET}
cat include/f256_intmath.h >> ${TARGET}
cat include/f256_irq.h >> ${TARGET}
cat include/f256jr.h >> ${TARGET}
cat include/f256_rtc.h >> ${TARGET}
cat include/f256_sprites.h >> ${TARGET}
cat include/f256_tiles.h >> ${TARGET}
cat include/f256_timers.h >> ${TARGET}
cat include/f256_via.h >> ${TARGET}
cat include/f256_xymath.h >> ${TARGET}
cat f256lib/f256.h >> ${TARGET}
cat f256lib/f_kernel.h >> ${TARGET}
cat f256lib/f_dma.h >> ${TARGET}
cat f256lib/f_math.h >> ${TARGET}
cat f256lib/f_random.h >> ${TARGET}
cat f256lib/f_text.h >> ${TARGET}
cat f256lib/f_bitmap.h >> ${TARGET}
cat f256lib/f_tile.h >> ${TARGET}
cat f256lib/f_graphics.h >> ${TARGET}
cat f256lib/f_sprite.h >> ${TARGET}
cat f256lib/f_file.h >> ${TARGET}
cat f256lib/f_platform.h >> ${TARGET}
echo "#ifdef F256LIB_IMPLEMENTATION" >> ${TARGET}
cat f256lib/f256.c >> ${TARGET}
cat f256lib/f_kernel.c >> ${TARGET}
cat f256lib/f_dma.c >> ${TARGET}
cat f256lib/f_math.c >> ${TARGET}
cat f256lib/f_random.c >> ${TARGET}
cat f256lib/f_text.c >> ${TARGET}
cat f256lib/f_bitmap.c >> ${TARGET}
cat f256lib/f_tile.c >> ${TARGET}
cat f256lib/f_graphics.c >> ${TARGET}
cat f256lib/f_sprite.c >> ${TARGET}
cat f256lib/f_file.c >> ${TARGET}
cat f256lib/f_platform.c >> ${TARGET}
echo "#endif" >> ${TARGET}

View file

@ -33,11 +33,10 @@ PATH=${LLVM}/bin:${PATH}
echo "__f256_start = ${START};" > ${SETTINGS} echo "__f256_start = ${START};" > ${SETTINGS}
CLANG="mos-f256k-clang -I${F256}/include -I${F256}/f256lib -Wall -O3" CLANG="mos-f256k-clang -I${F256}/include -I${F256}/f256lib -Wall -Os"
${CLANG} -c ${F256}/f256lib/f256.c
${CLANG} -c ${PROJECT}.c ${CLANG} -c ${PROJECT}.c
${CLANG} -o ${PROJECT} ${PROJECT}.o f256.o ${CLANG} -o ${PROJECT} ${PROJECT}.o
mv -f ${PROJECT} ${PROJECT}.bin mv -f ${PROJECT} ${PROJECT}.bin

View file

@ -21,7 +21,8 @@
*/ */
#include "f256.h" #define F256LIB_IMPLEMENTATION
#include "../../f256lib.h"
void dirtest(void) { void dirtest(void) {
@ -67,11 +68,9 @@ void dirtest(void) {
} }
int main(void) { int main(int argc, char *argv[]) {
struct time_t clock; struct time_t clock;
f256Init();
//dirtest(); //dirtest();
while (true) { while (true) {

View file

@ -21,41 +21,19 @@
*/ */
#ifndef F256LIB_AMALGAMATED_BUILD
#include "f256.h" #include "f256.h"
#include "f_kernel.c"
#include "f_dma.c"
#ifndef WITHOUT_KERNEL #include "f_math.c"
#include "kernel.c" #include "f_random.c"
#endif #include "f_text.c"
#ifndef WITHOUT_DMA #include "f_bitmap.c"
#include "dma.c" #include "f_tile.c"
#endif #include "f_graphics.c"
#ifndef WITHOUT_MATH #include "f_sprite.c"
#include "math.c" #include "f_file.c"
#endif #include "f_platform.c"
#ifndef WITHOUT_RANDOM
#include "random.c"
#endif
#ifndef WITHOUT_TEXT
#include "text.c"
#endif
#ifndef WITHOUT_BITMAP
#include "bitmap.c"
#endif
#ifndef WITHOUT_TILE
#include "tile.c"
#endif
#if !(defined WITHOUT_BITMAP || defined WITHOUT_TILE || defined WITHOUT_SPRITE)
#include "graphics.c"
#endif
#ifndef WITHOUT_SPRITE
#include "sprite.c"
#endif
#ifndef WITHOUT_FILE
#include "file.c"
#endif
#ifndef WITHOUT_PLATFORM
#include "platform.c"
#endif #endif

View file

@ -21,6 +21,70 @@
*/ */
/*
* Configuration DEFINEs
*
* Before including this file, you may define one or more of the following
* to customize the library for your application:
*
* SWAP_RESTORE
*
* When using functions such as FAR_PEEK or bitmap features, return the
* swap slot back to it's original memory location before returning. By
* default, the swap slot is left in whatever state the last function that
* used it switched it to.
*
* WITHOUT_GRAPHICS
*
* Shortcut for WITHOUT_BITMAP, WITHOUT_TILE, and WITHOUT_SPRITE.
*
* WITHOUT_BITMAP
*
* Disables bitmap functions.
*
* WITHOUT_TILE
*
* Disables tilemap functions.
*
* WITHOUT_SPRITE
*
* Disables sprite functions.
*
* WITHOUT_FILE
*
* Disables file handling support.
*
* WITHOUT_KERNEL
*
* Disables microkernel support. Also disables FILE, PLATFORM, and MAIN.
*
* WITHOUT_TEXT
*
* Disables text functions. Also disables PLATFORM.
*
* WITHOUT_MATH
*
* Disables math coprocessor support. Also disables TEXT, PLATFORM and
* BITMAP.
*
* WITHOUT_MAIN
*
* Removes support for the standardized "int main(int argc, char *argv[])"
* function and replaces it with "int main(void)". You must also manually
* call "f256Init()" at the start of your program.
*
* WITHOUT_PLATFORM
*
* Removes basic C library I/O support for "getchar()" and "__putchar()".
* This removes printf().
*
* WITHOUT_DMA
*
* Removes DMA support. In the future, will also disable BITMAP.
*
*/
#ifndef F256_H #ifndef F256_H
#define F256_H #define F256_H
@ -34,10 +98,10 @@ extern "C"
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#ifndef F256LIB_AMALGAMATED_BUILD
#include "stddclmr.h" #include "stddclmr.h"
#include "f_api.h"
#include "api.h"
#include "f256_dma.h" #include "f256_dma.h"
#include "f256_intmath.h" #include "f256_intmath.h"
#include "f256_irq.h" #include "f256_irq.h"
@ -48,6 +112,7 @@ extern "C"
#include "f256_timers.h" #include "f256_timers.h"
#include "f256_via.h" #include "f256_via.h"
#include "f256_xymath.h" #include "f256_xymath.h"
#endif
typedef unsigned char byte; typedef unsigned char byte;
@ -165,69 +230,44 @@ typedef struct colorS {
// Verify configuration DEFINEs. // Verify configuration DEFINEs.
#if (defined WITHOUT_BITMAP && defined WITHOUT_TILE && defined WITHOUT_SPRITE)
#define WITHOUT_GRAPHICS
#endif
#ifdef WITHOUT_GRAPHICS #ifdef WITHOUT_GRAPHICS
#define WITHOUT_BITMAP #define WITHOUT_BITMAP
#define WITHOUT_TILE #define WITHOUT_TILE
#define WITHOUT_SPRITE #define WITHOUT_SPRITE
#endif #endif
#ifndef WITHOUT_FILE // File requires Kernel
#ifdef WITHOUT_KERNEL #ifdef WITHOUT_KERNEL
#error "FILE requires KERNEL." #define WITHOUT_FILE
#endif #define WITHOUT_MAIN
#define WITHOUT_PLATFORM
#endif
#ifdef WITHOUT_TEXT
#define WITHOUT_PLATFORM
#endif #endif
#ifndef WITHOUT_TEXT // Text requries Math
#ifdef WITHOUT_MATH #ifdef WITHOUT_MATH
#error "TEXT requires MATH." #define WITHOUT_TEXT
#endif #define WITHOUT_PLATFORM
#endif
#ifndef WITHOUT_BITMAP // Bitmap requries Math
#ifdef WITHOUT_MATH
#error "BITMAP requires MATH."
#endif
#endif
#ifndef WITHOUT_MAIN // Main requries Kernel
#ifdef WITHOUT_KERNEL
#error "MAIN requires KERNEL."
#endif
#endif #endif
#ifndef WITHOUT_KERNEL #ifndef F256LIB_AMALGAMATED_BUILD
#include "kernel.h" #include "f_kernel.h"
#endif #include "f_dma.h"
#ifndef WITHOUT_DMA #include "f_math.h"
#include "dma.h" #include "f_random.h"
#endif #include "f_text.h"
#ifndef WITHOUT_MATH #include "f_bitmap.h"
#include "math.h" #include "f_tile.h"
#endif #include "f_graphics.h"
#ifndef WITHOUT_RANDOM #include "f_sprite.h"
#include "random.h" #include "f_file.h"
#endif #include "f_platform.h"
#ifndef WITHOUT_TEXT
#include "text.h"
#endif
#ifndef WITHOUT_BITMAP
#include "bitmap.h"
#endif
#ifndef WITHOUT_TILE
#include "tile.h"
#endif
#if !(defined WITHOUT_BITMAP || defined WITHOUT_TILE || defined WITHOUT_SPRITE)
#include "graphics.h"
#endif
#ifndef WITHOUT_SPRITE
#include "sprite.h"
#endif
#ifndef WITHOUT_FILE
#include "file.h"
#endif
#ifndef WITHOUT_PLATFORM
#include "platform.h"
#endif #endif
@ -250,4 +290,11 @@ void FAR_POKEW(uint32_t address, uint16_t value);
#endif #endif
#ifndef F256LIB_AMALGAMATED_BUILD
#ifdef F256LIB_IMPLEMENTATION
#include "f256.c"
#endif
#endif
#endif // F256_H #endif // F256_H

View file

@ -21,8 +21,13 @@
*/ */
#include "bitmap.h" #ifndef WITHOUT_BITMAP
#include "dma.h"
#ifndef F256LIB_AMALGAMATED_BUILD
#include "f_bitmap.h"
#include "f_dma.h"
#endif
static uint16_t _MAX_X; static uint16_t _MAX_X;
@ -246,3 +251,6 @@ void bitmapSetVisible(byte p, bool v) {
break; break;
} }
} }
#endif

View file

@ -23,6 +23,7 @@
#ifndef BITMAP_H #ifndef BITMAP_H
#define BITMAP_H #define BITMAP_H
#ifndef WITHOUT_BITMAP
#ifdef __cplusplus #ifdef __cplusplus
@ -31,7 +32,9 @@ extern "C"
#endif #endif
#ifndef F256LIB_AMALGAMATED_BUILD
#include "f256.h" #include "f256.h"
#endif
void bitmapClear(void); void bitmapClear(void);
@ -51,4 +54,5 @@ void bitmapSetVisible(byte p, bool v);
#endif #endif
#endif
#endif // BITMAP_H #endif // BITMAP_H

View file

@ -21,7 +21,12 @@
*/ */
#include "dma.h" #ifndef WITHOUT_DMA
#ifndef F256LIB_AMALGAMATED_BUILD
#include "f_dma.h"
#endif
static void dmaWait(void); static void dmaWait(void);
@ -66,3 +71,6 @@ static void dmaWait(void) {
// Then wait for a VBL because two DMAs per frame will crash. // Then wait for a VBL because two DMAs per frame will crash.
//graphicsWaitVerticalBlank(); //graphicsWaitVerticalBlank();
} }
#endif

View file

@ -23,6 +23,7 @@
#ifndef DMA_H #ifndef DMA_H
#define DMA_H #define DMA_H
#ifndef WITHOUT_DMA
#ifdef __cplusplus #ifdef __cplusplus
@ -31,7 +32,9 @@ extern "C"
#endif #endif
#ifndef F256LIB_AMALGAMATED_BUILD
#include "f256.h" #include "f256.h"
#endif
void dmaFill(uint32_t start, uint32_t length, byte value); void dmaFill(uint32_t start, uint32_t length, byte value);
@ -43,4 +46,5 @@ void dma2dFill(uint32_t start, uint16_t width, uint16_t height, uint16_t stride,
#endif #endif
#endif
#endif // DMA_H #endif // DMA_H

View file

@ -21,9 +21,14 @@
*/ */
#ifndef WITHOUT_FILE
#include <string.h> #include <string.h>
#include "file.h" #ifndef F256LIB_AMALGAMATED_BUILD
#include "f_file.h"
#endif
#define MAX_DRIVES 8 #define MAX_DRIVES 8
@ -484,3 +489,4 @@ static char *pathWithoutDrive(char *path, byte *drive) {
} }
#endif

View file

@ -23,6 +23,7 @@
#ifndef FILE_H #ifndef FILE_H
#define FILE_H #define FILE_H
#ifndef WITHOUT_FILE
#ifdef __cplusplus #ifdef __cplusplus
@ -31,7 +32,9 @@ extern "C"
#endif #endif
#ifndef F256LIB_AMALGAMATED_BUILD
#include "f256.h" #include "f256.h"
#endif
typedef struct fileDirEntS { typedef struct fileDirEntS {
@ -91,4 +94,5 @@ int16_t fileWrite(void *buf, uint16_t nbytes, uint16_t nmemb, uint8_t *fd);
#endif #endif
#endif
#endif // FILE_H #endif // FILE_H

View file

@ -21,7 +21,12 @@
*/ */
#include "graphics.h" #ifndef WITHOUT_GRAPHICS
#ifndef F256LIB_AMALGAMATED_BUILD
#include "f_graphics.h"
#endif
void graphicsDefineColor(byte clut, byte slot, byte r, byte g, byte b) { void graphicsDefineColor(byte clut, byte slot, byte r, byte g, byte b) {
@ -102,3 +107,6 @@ void graphicsWaitVerticalBlank(void) {
// Spin our wheels. // Spin our wheels.
; ;
} }
#endif

View file

@ -23,6 +23,7 @@
#ifndef GRAPHICS_H #ifndef GRAPHICS_H
#define GRAPHICS_H #define GRAPHICS_H
#ifndef WITHOUT_GRAPHICS
#ifdef __cplusplus #ifdef __cplusplus
@ -31,7 +32,9 @@ extern "C"
#endif #endif
#ifndef F256LIB_AMALGAMATED_BUILD
#include "f256.h" #include "f256.h"
#endif
void graphicsDefineColor(byte clut, byte slot, byte r, byte g, byte b); void graphicsDefineColor(byte clut, byte slot, byte r, byte g, byte b);
@ -46,4 +49,5 @@ void graphicsWaitVerticalBlank(void);
#endif #endif
#endif
#endif // GRAPHICS_H #endif // GRAPHICS_H

View file

@ -21,7 +21,12 @@
*/ */
#include "kernel.h" #ifndef WITHOUT_KERNEL
#ifndef F256LIB_AMALGAMATED_BUILD
#include "f_kernel.h"
#endif
kernelEventT kernelEventData; // Allocate some RAM to hold event data. kernelEventT kernelEventData; // Allocate some RAM to hold event data.
@ -132,3 +137,6 @@ void kernelReset(void) {
// ***TODO*** Network // ***TODO*** Network
*/ */
#endif

View file

@ -23,6 +23,7 @@
#ifndef KERNEL_H #ifndef KERNEL_H
#define KERNEL_H #define KERNEL_H
#ifndef WITHOUT_KERNEL
#ifdef __cplusplus #ifdef __cplusplus
@ -31,7 +32,9 @@ extern "C"
#endif #endif
#ifndef F256LIB_AMALGAMATED_BUILD
#include "f256.h" #include "f256.h"
#endif
#define kernelNextEvent() ({ kernelEventData.type = 0; kernelCall(NextEvent); }) #define kernelNextEvent() ({ kernelEventData.type = 0; kernelCall(NextEvent); })
@ -70,4 +73,5 @@ void kernelReset(void);
#endif #endif
#endif
#endif // KERNEL_H #endif // KERNEL_H

View file

@ -21,7 +21,12 @@
*/ */
#include "math.h" #ifndef WITHOUT_MATH
#ifndef F256LIB_AMALGAMATED_BUILD
#include "f_math.h"
#endif
int16_t mathSignedDivision(int16_t a, int16_t b) { int16_t mathSignedDivision(int16_t a, int16_t b) {
@ -124,3 +129,6 @@ uint32_t mathUnsignedMultiply(uint16_t a, uint16_t b) {
POKEW(MULU_B_L, b); POKEW(MULU_B_L, b);
return PEEKD(MULU_LL); return PEEKD(MULU_LL);
} }
#endif

View file

@ -23,6 +23,7 @@
#ifndef MATH_H #ifndef MATH_H
#define MATH_H #define MATH_H
#ifndef WITHOUT_MATH
#ifdef __cplusplus #ifdef __cplusplus
@ -31,7 +32,9 @@ extern "C"
#endif #endif
#ifndef F256LIB_AMALGAMATED_BUILD
#include "f256.h" #include "f256.h"
#endif
int16_t mathSignedDivision(int16_t a, int16_t b); int16_t mathSignedDivision(int16_t a, int16_t b);
@ -48,4 +51,5 @@ uint32_t mathUnsignedMultiply(uint16_t a, uint16_t b);
#endif #endif
#endif
#endif // MATH_H #endif // MATH_H

View file

@ -21,7 +21,12 @@
*/ */
#include "platform.h" #ifndef WITHOUT_PLATFORM
#ifndef F256LIB_AMALGAMATED_BUILD
#include "f_platform.h"
#endif
// printf() support. // printf() support.
@ -48,3 +53,4 @@ int getchar(void) {
} }
#endif

View file

@ -23,6 +23,7 @@
#ifndef PLATFORM_H #ifndef PLATFORM_H
#define PLATFORM_H #define PLATFORM_H
#ifndef WITHOUT_PLATFORM
#ifdef __cplusplus #ifdef __cplusplus
@ -31,7 +32,9 @@ extern "C"
#endif #endif
#ifndef F256LIB_AMALGAMATED_BUILD
#include "f256.h" #include "f256.h"
#endif
void __putchar(char c); void __putchar(char c);
@ -43,4 +46,5 @@ int getchar(void); // This is an int so llvm-mos finds it.
#endif #endif
#endif
#endif // PLATFORM_H #endif // PLATFORM_H

View file

@ -21,7 +21,12 @@
*/ */
#include "random.h" #ifndef WITHOUT_RANDOM
#ifndef F256LIB_AMALGAMATED_BUILD
#include "f_random.h"
#endif
uint16_t randomRead(void) { uint16_t randomRead(void) {
@ -50,3 +55,5 @@ void randomSeed(uint16_t seed) {
POKE(VKY_RND_CTRL, 3); // Enable, load seed. POKE(VKY_RND_CTRL, 3); // Enable, load seed.
} }
#endif

View file

@ -23,6 +23,7 @@
#ifndef RANDOM_H #ifndef RANDOM_H
#define RANDOM_H #define RANDOM_H
#ifndef WITHOUT_RANDOM
#ifdef __cplusplus #ifdef __cplusplus
@ -31,7 +32,9 @@ extern "C"
#endif #endif
#ifndef F256LIB_AMALGAMATED_BUILD
#include "f256.h" #include "f256.h"
#endif
uint16_t randomRead(void); uint16_t randomRead(void);
@ -44,4 +47,5 @@ void randomSeed(uint16_t seed);
#endif #endif
#endif
#endif // RANDOM_H #endif // RANDOM_H

View file

@ -21,7 +21,12 @@
*/ */
#include "sprite.h" #ifndef WITHOUT_SPRITE
#ifndef F256LIB_AMALGAMATED_BUILD
#include "f_sprite.h"
#endif
#define OFF_SPR_ADL_L 1 #define OFF_SPR_ADL_L 1
@ -77,3 +82,6 @@ void spriteReset(void) {
// Hide all sprites. // Hide all sprites.
for (x=0; x<64; x++) spriteSetVisible(x, false); for (x=0; x<64; x++) spriteSetVisible(x, false);
} }
#endif

View file

@ -23,6 +23,7 @@
#ifndef SPRITE_H #ifndef SPRITE_H
#define SPRITE_H #define SPRITE_H
#ifndef WITHOUT_SPRITE
#ifdef __cplusplus #ifdef __cplusplus
@ -31,7 +32,9 @@ extern "C"
#endif #endif
#ifndef F256LIB_AMALGAMATED_BUILD
#include "f256.h" #include "f256.h"
#endif
void spriteDefine(byte s, uint32_t address, byte size, byte CLUT, byte layer); void spriteDefine(byte s, uint32_t address, byte size, byte CLUT, byte layer);
@ -45,4 +48,5 @@ void spriteReset(void);
#endif #endif
#endif
#endif // SPRITE_H #endif // SPRITE_H

View file

@ -21,8 +21,13 @@
*/ */
#include "text.h" #ifndef WITHOUT_TEXT
#include "math.h"
#ifndef F256LIB_AMALGAMATED_BUILD
#include "f_text.h"
#include "f_math.h"
#endif
colorT textColors[16] = { colorT textColors[16] = {
@ -251,3 +256,6 @@ void textSetDouble(bool x, bool y) {
_MAX_COL = x ? 40 : 80; _MAX_COL = x ? 40 : 80;
_MAX_ROW = y ? 30 : 60; _MAX_ROW = y ? 30 : 60;
} }
#endif

View file

@ -23,6 +23,7 @@
#ifndef TEXT_H #ifndef TEXT_H
#define TEXT_H #define TEXT_H
#ifndef WITHOUT_TEXT
#ifdef __cplusplus #ifdef __cplusplus
@ -31,7 +32,9 @@ extern "C"
#endif #endif
#ifndef F256LIB_AMALGAMATED_BUILD
#include "f256.h" #include "f256.h"
#endif
// Apple IIgs Colors, because that's how we roll. // Apple IIgs Colors, because that's how we roll.
@ -81,4 +84,5 @@ void textSetDouble(bool x, bool y);
#endif #endif
#endif
#endif // TEXT_H #endif // TEXT_H

View file

@ -21,7 +21,12 @@
*/ */
#include "tile.h" #ifndef WITHOUT_TILE
#ifndef F256LIB_AMALGAMATED_BUILD
#include "f_tile.h"
#endif
static byte _tileSize[3]; static byte _tileSize[3];
@ -136,3 +141,6 @@ void tileReset(void) {
tileSetVisible(1, false); tileSetVisible(1, false);
tileSetVisible(2, false); tileSetVisible(2, false);
} }
#endif

View file

@ -23,6 +23,7 @@
#ifndef TILE_H #ifndef TILE_H
#define TILE_H #define TILE_H
#ifndef WITHOUT_TILE
#ifdef __cplusplus #ifdef __cplusplus
@ -31,7 +32,9 @@ extern "C"
#endif #endif
#ifndef F256LIB_AMALGAMATED_BUILD
#include "f256.h" #include "f256.h"
#endif
void tileDefineTileMap(byte t, uint32_t address, byte tileSize, uint16_t mapSizeX, uint16_t mapSizeY); void tileDefineTileMap(byte t, uint32_t address, byte tileSize, uint16_t mapSizeX, uint16_t mapSizeY);
@ -46,4 +49,5 @@ void tileReset(void);
#endif #endif
#endif
#endif // TILE_H #endif // TILE_H