auto-build /kolibrios/games/fara

git-svn-id: svn://kolibrios.org@5107 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
CleverMouse 2014-09-12 17:13:28 +00:00
parent 8c70e0dc6d
commit 8422dc1a90
8 changed files with 42 additions and 3 deletions

View File

@ -135,7 +135,7 @@ extra_files = {
{"kolibrios/emul/", "common/emul/scummvm"},
{"kolibrios/emul/", "common/emul/zsnes"},
{"kolibrios/games/doom/", "common/games/doom/*"},
{"kolibrios/games/fara/fara", build_type .. "/games/fara"},
{"kolibrios/games/fara/fara", PROGS .. "/games/fara/trunk/fara"},
{"kolibrios/games/fara/fara.gfx", "common/games/fara.gfx"},
{"kolibrios/games/jumpbump/", "common/games/jumpbump/*"},
{"kolibrios/games/quake/", "common/games/quake/*"},

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -3,11 +3,40 @@
#define atexitBufferSize 32
// Autobuild uses FASM method for exe->kos,
// MENUET01 header should be present in EXE.
#ifdef AUTOBUILD
char kosExePath[1024];
char exeStack[16384];
// must be alphabetically first in the image
#pragma data_seg(".1seg")
extern "C" struct
{
char header[8];
int headerver;
void* entry;
void* i_end;
void* memsize;
void* stack;
void* params;
void* icon;
} header = {
{'M', 'E', 'N', 'U', 'E', 'T', '0', '1'},
1,
&crtStartUp,
0, // filled by doexe2.asm
0, // filled by doexe2.asm
exeStack + sizeof(exeStack),
NULL,
kosExePath
};
#pragma data_seg()
#else
char *kosExePath = NULL;
#endif
char pureCallMessage[] = "PURE function call!";
char *kosExePath = NULL;
//
void (__cdecl *atExitList[atexitBufferSize])();
int atExitFnNum = 0;
@ -843,6 +872,10 @@ __declspec(allocate(".CRT$XCZ")) _PVFV __xc_z[1] = { NULL };
//
void crtStartUp()
{
#ifdef AUTOBUILD
// linker will try to remove unused variables; force header to be included
header.header;
#endif
// èíèöèàëèçèðóåì êó÷ó
__asm
{
@ -859,8 +892,10 @@ void crtStartUp()
}
// èíèöèàëèçèðóåì ãåíåðàòîð ñëó÷àéíûõ ÷èñåë
rtlSrand( kos_GetSystemClock() );
#ifndef AUTOBUILD
// ïóòü ê ôàéëó ïðîöåññà
kosExePath = *((char **)0x20);
#endif
// âûçîâ ãëàâíîé ôóíêöèè ïðèëîæåíèÿ
kos_Main();
// âûõîä

View File

@ -89,8 +89,12 @@ union sProcessInfo
} processInfo;
};
#ifdef AUTOBUILD
extern char kosExePath[];
#else
//
extern char *kosExePath;
#endif
//
void crtStartUp();