From 450c0d0012216803f6b9fe2d16ff3bb6d0b524db Mon Sep 17 00:00:00 2001 From: dwsJason Date: Sun, 8 Sep 2019 15:17:29 -0400 Subject: [PATCH] import: credit splash screen, move code over to a different file --- src/scr_credit.c | 27 +++++++++++++++++++++++++++ src/xrick.c | 20 +++++--------------- 2 files changed, 32 insertions(+), 15 deletions(-) create mode 100644 src/scr_credit.c diff --git a/src/scr_credit.c b/src/scr_credit.c new file mode 100644 index 0000000..1671806 --- /dev/null +++ b/src/scr_credit.c @@ -0,0 +1,27 @@ +// +// Early Splash Screen, on the GS Version +// Since it takes a while to initialize +// +#include "system.h" +#include "game.h" + + +#ifdef IIGS +segment "screen"; +#pragma noroot +#endif + +#include + +extern char credits_lz4; + +void scr_credit() +{ + // Keep the Screen on + *VIDEO_REGISTER|=0xC0; + // Blank the screen, so you don't see trash in the Frame Buffer + memset((void*)0xE19E00, (int)0, (size_t)32); + memset((void*)0xE19D00, (int)0, (size_t)200); + // Display the Credits + LZ4_Unpack((char*)(0xE12000), &credits_lz4); +} diff --git a/src/xrick.c b/src/xrick.c index de9ded1..a6cbaed 100644 --- a/src/xrick.c +++ b/src/xrick.c @@ -20,7 +20,8 @@ #include -extern char credits_lz4; + +void scr_credit(); /* * main @@ -28,21 +29,10 @@ extern char credits_lz4; int main(int argc, char *argv[]) { - printf("Hello from xrick IIgs\n"); -// tHandle = (U32*)NewHandle(0x10000, userid(), 0xC014, 0); -// LZ4_Unpack((char*)*tHandle, &samerica_lz4); + // Get the credit screen up ASAP + scr_credit(); -// NTPprepare((void*)*tHandle); -// NTPplay(1); - // Keep the Screen on - *VIDEO_REGISTER|=0xC0; - // Blank the screen, so you don't see trash in the Frame Buffer - memset((void*)0xE19D00, (int)0, (size_t)200); - memset((void*)0xE19E00, (int)0, (size_t)32); - // Display the Credits - LZ4_Unpack((char*)(0xE12000), &credits_lz4); -// printf("%08x\n", &img_splash_lz4 ); -// printf("%08x\n", IMG_SPLASH ); + printf("Hello from xrick IIgs\n"); sys_init(argc, argv); if (sysarg_args_data)