New main() feature and fixes.
This commit is contained in:
parent
5260fa3b7c
commit
8a200f220e
2 changed files with 34 additions and 4 deletions
|
@ -165,3 +165,15 @@ void FAR_POKEW(uint32_t address, uint16_t value) {
|
|||
|
||||
SWAP_IO_SHUTDOWN();
|
||||
}
|
||||
|
||||
|
||||
#ifndef WITHOUT_MAIN
|
||||
#ifdef main
|
||||
#undef main
|
||||
#endif
|
||||
int f256main(int argc, char *argv[]);
|
||||
int main(void) {
|
||||
f256Init();
|
||||
return f256main(kernelArgs->common.extlen / 2, (char **)kernelArgs->common.ext);
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -154,7 +154,7 @@ typedef struct colorS {
|
|||
#define SET_BIT(x, pos) (x |= (1U << pos))
|
||||
|
||||
|
||||
// Work out configuration DEFINEs.
|
||||
// Verify configuration DEFINEs.
|
||||
#ifdef WITHOUT_GRAPHICS
|
||||
#define WITHOUT_BITMAP
|
||||
#define WITHOUT_TILE
|
||||
|
@ -162,16 +162,29 @@ typedef struct colorS {
|
|||
#endif
|
||||
|
||||
#ifndef WITHOUT_FILE // File requires Kernel
|
||||
#undef WITHOUT_KERNEL
|
||||
#ifdef WITHOUT_KERNEL
|
||||
#error "FILE requires KERNEL."
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef WITHOUT_TEXT // Text requries Math
|
||||
#undef WITHOUT_MATH
|
||||
#ifdef WITHOUT_MATH
|
||||
#error "TEXT requires MATH."
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef WITHOUT_BITMAP // Bitmap requries Math
|
||||
#undef WITHOUT_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
|
||||
|
||||
|
||||
#ifndef WITHOUT_KERNEL
|
||||
#include "kernel.h"
|
||||
|
@ -215,6 +228,11 @@ void FAR_POKE(uint32_t address, byte value);
|
|||
void FAR_POKEW(uint32_t address, uint16_t value);
|
||||
|
||||
|
||||
#ifndef WITHOUT_MAIN
|
||||
#define main f256main
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Reference in a new issue