49 lines
1.5 KiB
C
49 lines
1.5 KiB
C
/*
|
|
* xrick/data/dat-sprites.c
|
|
*
|
|
* Copyright (C) 1998-2002 BigOrno (bigorno@bigorno.net). All rights reserved.
|
|
*
|
|
* The use and distribution terms for this software are contained in the file
|
|
* named README, which can be found in the root of this distribution. By
|
|
* using this software in any fashion, you are agreeing to be bound by the
|
|
* terms of this license.
|
|
*
|
|
* You must not remove this notice, or any other, from this software.
|
|
*/
|
|
|
|
#include "config.h"
|
|
|
|
#ifdef GFXF256
|
|
|
|
#define STR2(x) #x
|
|
#define STR(x) STR2(x)
|
|
|
|
//#ifdef _WIN32
|
|
//#define INCBIN_SECTION ".rdata, \"dr\""
|
|
//#else
|
|
//#define INCBIN_SECTION ".rodata"
|
|
//#endif
|
|
|
|
// this aligns start address to 16 and terminates byte array with explict 0
|
|
// which is not really needed, feel free to change it to whatever you want/need
|
|
#define INCBIN(INCBIN_SECTION, name, file) \
|
|
__asm__(".section " INCBIN_SECTION ",\"aR\" \n" \
|
|
".global incbin_" STR(name) "_start\n" \
|
|
".balign 16\n" \
|
|
"incbin_" STR(name) "_start:\n" \
|
|
".incbin \"" file "\"\n" \
|
|
\
|
|
".global incbin_" STR(name) "_end\n" \
|
|
".balign 1\n" \
|
|
"incbin_" STR(name) "_end:\n" \
|
|
".byte 0\n" \
|
|
); \
|
|
extern __attribute__((aligned(16))) const char incbin_ ## name ## _start[]; \
|
|
extern const char incbin_ ## name ## _end[]
|
|
|
|
INCBIN(".binarydata.sprites", sprites_data_256, "data/sprites_data.256");
|
|
|
|
#endif /* GFXF256 */
|
|
|
|
/* eof */
|
|
|