forked from KolibriOS/kolibrios
auto-build games/xonix
git-svn-id: svn://kolibrios.org@5115 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
d1289fac5e
commit
0f8b75bb05
@ -53,7 +53,6 @@ img_files = {
|
|||||||
{"File Managers/KFM.INI", "common/File Managers/kfm.ini"},
|
{"File Managers/KFM.INI", "common/File Managers/kfm.ini"},
|
||||||
{"GAMES/CHECKERS", build_type .. "/games/checkers"},
|
{"GAMES/CHECKERS", build_type .. "/games/checkers"},
|
||||||
{"GAMES/MEGAMAZE", build_type .. "/games/megamaze"},
|
{"GAMES/MEGAMAZE", build_type .. "/games/megamaze"},
|
||||||
{"GAMES/XONIX", build_type .. "/games/xonix"},
|
|
||||||
{"LIB/PIXLIB.OBJ", "common/lib/pixlib.obj"},
|
{"LIB/PIXLIB.OBJ", "common/lib/pixlib.obj"},
|
||||||
{"LIB/ICONV.OBJ", "common/lib/iconv.obj"},
|
{"LIB/ICONV.OBJ", "common/lib/iconv.obj"},
|
||||||
{"LIB/NETCODE.OBJ", "common/lib/netcode.obj"},
|
{"LIB/NETCODE.OBJ", "common/lib/netcode.obj"},
|
||||||
@ -445,6 +444,7 @@ tup.append_table(img_files, {
|
|||||||
{"MEDIA/AC97SND", PROGS .. "/media/ac97snd/ac97snd.bin"},
|
{"MEDIA/AC97SND", PROGS .. "/media/ac97snd/ac97snd.bin"},
|
||||||
{"GAMES/KOSILKA", PROGS .. "/games/kosilka/kosilka"},
|
{"GAMES/KOSILKA", PROGS .. "/games/kosilka/kosilka"},
|
||||||
{"GAMES/RFORCES", PROGS .. "/games/rforces/trunk/rforces"},
|
{"GAMES/RFORCES", PROGS .. "/games/rforces/trunk/rforces"},
|
||||||
|
{"GAMES/XONIX", PROGS .. "/games/xonix/trunk/xonix"},
|
||||||
})
|
})
|
||||||
tup.append_table(extra_files, {
|
tup.append_table(extra_files, {
|
||||||
{"kolibrios/games/fara/fara", PROGS .. "/games/fara/trunk/fara"},
|
{"kolibrios/games/fara/fara", PROGS .. "/games/fara/trunk/fara"},
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,5 +1,9 @@
|
|||||||
if tup.getconfig("NO_MSVC") ~= "" then return end
|
if tup.getconfig("NO_MSVC") ~= "" then return end
|
||||||
HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("HELPERDIR")
|
HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("HELPERDIR")
|
||||||
tup.include(HELPERDIR .. "/use_msvc.lua")
|
tup.include(HELPERDIR .. "/use_msvc.lua")
|
||||||
|
if tup.getconfig("LANG") == "ru"
|
||||||
|
then CFLAGS = CFLAGS .. " /DLANG=RUS"
|
||||||
|
else CFLAGS = CFLAGS .. " /DLANG=ENG"
|
||||||
|
end
|
||||||
compile_msvc{"*.cpp"}
|
compile_msvc{"*.cpp"}
|
||||||
link_msvc("xonix")
|
link_msvc("xonix")
|
||||||
|
@ -2,11 +2,40 @@
|
|||||||
|
|
||||||
#define atexitBufferSize 32
|
#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 pureCallMessage[] = "PURE function call!";
|
||||||
|
|
||||||
char *kosExePath = NULL;
|
|
||||||
|
|
||||||
//
|
//
|
||||||
void (__cdecl *atExitList[atexitBufferSize])();
|
void (__cdecl *atExitList[atexitBufferSize])();
|
||||||
int atExitFnNum = 0;
|
int atExitFnNum = 0;
|
||||||
@ -809,6 +838,10 @@ __declspec(allocate(".CRT$XCZ")) _PVFV __xc_z[1] = { NULL };
|
|||||||
//
|
//
|
||||||
void crtStartUp()
|
void crtStartUp()
|
||||||
{
|
{
|
||||||
|
#ifdef AUTOBUILD
|
||||||
|
// linker will try to remove unused variables; force header to be included
|
||||||
|
header.header;
|
||||||
|
#endif
|
||||||
// âûçûâàåì èíèöèàëèçàòîðû ïî ñïèñêó, NULL'û èãíîðèðóåì
|
// âûçûâàåì èíèöèàëèçàòîðû ïî ñïèñêó, NULL'û èãíîðèðóåì
|
||||||
for ( _PVFV *pbegin = __xc_a; pbegin < __xc_z; pbegin++ )
|
for ( _PVFV *pbegin = __xc_a; pbegin < __xc_z; pbegin++ )
|
||||||
{
|
{
|
||||||
@ -818,8 +851,10 @@ void crtStartUp()
|
|||||||
}
|
}
|
||||||
// èíèöèàëèçèðóåì ãåíåðàòîð ñëó÷àéíûõ ÷èñåë
|
// èíèöèàëèçèðóåì ãåíåðàòîð ñëó÷àéíûõ ÷èñåë
|
||||||
rtlSrand( kos_GetSystemClock() );
|
rtlSrand( kos_GetSystemClock() );
|
||||||
|
#ifndef AUTOBUILD
|
||||||
// ïóòü ê ôàéëó ïðîöåññà
|
// ïóòü ê ôàéëó ïðîöåññà
|
||||||
kosExePath = *((char **)0x20);
|
kosExePath = *((char **)0x20);
|
||||||
|
#endif
|
||||||
// âûçîâ ãëàâíîé ôóíêöèè ïðèëîæåíèÿ
|
// âûçîâ ãëàâíîé ôóíêöèè ïðèëîæåíèÿ
|
||||||
kos_Main();
|
kos_Main();
|
||||||
// âûõîä
|
// âûõîä
|
||||||
|
@ -95,8 +95,12 @@ struct PRINTK
|
|||||||
Dword args[11];
|
Dword args[11];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifdef AUTOBUILD
|
||||||
|
extern char kosExePath[];
|
||||||
|
#else
|
||||||
//
|
//
|
||||||
extern char *kosExePath;
|
extern char *kosExePath;
|
||||||
|
#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
void crtStartUp();
|
void crtStartUp();
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
#define RUS 1
|
#define RUS 1
|
||||||
#define ENG 2
|
#define ENG 2
|
||||||
#define LANG RUS
|
#ifndef LANG
|
||||||
|
#define LANG RUS
|
||||||
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user