forked from KolibriOS/kolibrios
sdlquake: newlib
git-svn-id: svn://kolibrios.org@8520 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
62a646eb18
commit
41c3cb567f
@ -5,11 +5,14 @@ then
|
|||||||
HELPERDIR = "../../../programs"
|
HELPERDIR = "../../../programs"
|
||||||
end
|
end
|
||||||
tup.include(HELPERDIR .. "/use_gcc.lua")
|
tup.include(HELPERDIR .. "/use_gcc.lua")
|
||||||
tup.include(HELPERDIR .. "/use_menuetlibc.lua")
|
tup.include(HELPERDIR .. "/use_newlib.lua")
|
||||||
use_dynamic_stack() -- default 64K are not sufficient
|
--use_dynamic_stack() -- default 64K are not sufficient
|
||||||
tup.include(HELPERDIR .. "/use_sdl.lua")
|
tup.include(HELPERDIR .. "/use_sdl_newlib.lua")
|
||||||
CFLAGS = CFLAGS .. " -DSDL -UWIN32 -U_WIN32 -U__WIN32__ -D_KOLIBRI"
|
CFLAGS = CFLAGS .. " -DSDL -UWIN32 -U_WIN32 -U__WIN32__ -D_KOLIBRI"
|
||||||
CFLAGS = CFLAGS .. " -DUSE_ASM"
|
CFLAGS = CFLAGS .. " -DUSE_ASM"
|
||||||
|
|
||||||
|
LDFLAGS = LDFLAGS .. " --subsystem native --stack 0x200000"
|
||||||
|
|
||||||
-- CFLAGS = CFLAGS:gsub("-Os", "-O2")
|
-- CFLAGS = CFLAGS:gsub("-Os", "-O2")
|
||||||
compile_gcc{
|
compile_gcc{
|
||||||
"chase.c", "cl_demo.c", "cl_input.c", "cl_main.c", "cl_parse.c", "cl_tent.c",
|
"chase.c", "cl_demo.c", "cl_input.c", "cl_main.c", "cl_parse.c", "cl_tent.c",
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
#include <kos32sys.h>
|
||||||
#if !defined(__WIN32__) && !defined(_KOLIBRI)
|
#if !defined(__WIN32__) && !defined(_KOLIBRI)
|
||||||
#include <sys/ipc.h>
|
#include <sys/ipc.h>
|
||||||
#include <sys/shm.h>
|
#include <sys/shm.h>
|
||||||
@ -46,11 +47,8 @@ void Sys_Printf (char *fmt, ...)
|
|||||||
va_start (argptr,fmt);
|
va_start (argptr,fmt);
|
||||||
vsprintf (text,fmt,argptr);
|
vsprintf (text,fmt,argptr);
|
||||||
va_end (argptr);
|
va_end (argptr);
|
||||||
#ifdef _KOLIBRI
|
|
||||||
__menuet__debug_out(text);
|
|
||||||
#else
|
|
||||||
fprintf(stderr, "%s", text);
|
fprintf(stderr, "%s", text);
|
||||||
#endif
|
|
||||||
|
|
||||||
//Con_Print (text);
|
//Con_Print (text);
|
||||||
}
|
}
|
||||||
@ -102,17 +100,11 @@ void Sys_Error (char *error, ...)
|
|||||||
va_start (argptr,error);
|
va_start (argptr,error);
|
||||||
vsprintf (string,error,argptr);
|
vsprintf (string,error,argptr);
|
||||||
va_end (argptr);
|
va_end (argptr);
|
||||||
#ifdef _KOLIBRI
|
|
||||||
__menuet__debug_out("Error: ");
|
|
||||||
__menuet__debug_out(string);
|
|
||||||
__menuet__debug_out("\n");
|
|
||||||
#else
|
|
||||||
fprintf(stderr, "Error: %s\n", string);
|
fprintf(stderr, "Error: %s\n", string);
|
||||||
#endif
|
|
||||||
|
|
||||||
Host_Shutdown ();
|
Host_Shutdown ();
|
||||||
exit (1);
|
exit (1);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Sys_Warn (char *warning, ...)
|
void Sys_Warn (char *warning, ...)
|
||||||
@ -123,12 +115,8 @@ void Sys_Warn (char *warning, ...)
|
|||||||
va_start (argptr,warning);
|
va_start (argptr,warning);
|
||||||
vsprintf (string,warning,argptr);
|
vsprintf (string,warning,argptr);
|
||||||
va_end (argptr);
|
va_end (argptr);
|
||||||
#ifdef _KOLIBRI
|
|
||||||
__menuet__debug_out("Warning: ");
|
|
||||||
__menuet__debug_out(string);
|
|
||||||
#else
|
|
||||||
fprintf(stderr, "Warning: %s", string);
|
fprintf(stderr, "Warning: %s", string);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -282,7 +270,7 @@ void Sys_mkdir (char *path)
|
|||||||
#ifdef __WIN32__
|
#ifdef __WIN32__
|
||||||
mkdir (path);
|
mkdir (path);
|
||||||
#else
|
#else
|
||||||
mkdir (path, 0777);
|
//mkdir (path, 0777);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -376,7 +364,7 @@ void Sys_LineRefresh(void)
|
|||||||
void Sys_Sleep(void)
|
void Sys_Sleep(void)
|
||||||
{
|
{
|
||||||
#ifdef _KOLIBRI
|
#ifdef _KOLIBRI
|
||||||
__menuet__delay100(1);
|
delay(1);
|
||||||
#else
|
#else
|
||||||
SDL_Delay(1);
|
SDL_Delay(1);
|
||||||
#endif
|
#endif
|
||||||
@ -437,7 +425,7 @@ int main (int c, char **v)
|
|||||||
if (time < sys_ticrate.value && (vcrFile == -1 || recording) )
|
if (time < sys_ticrate.value && (vcrFile == -1 || recording) )
|
||||||
{
|
{
|
||||||
#ifdef _KOLIBRI
|
#ifdef _KOLIBRI
|
||||||
__menuet__delay100(1);
|
delay(1);
|
||||||
#else
|
#else
|
||||||
SDL_Delay (1);
|
SDL_Delay (1);
|
||||||
#endif
|
#endif
|
||||||
|
8
programs/use_sdl_newlib.lua
Executable file
8
programs/use_sdl_newlib.lua
Executable file
@ -0,0 +1,8 @@
|
|||||||
|
SDL_INCLUDE = tup.getcwd() .. "/../contrib/sdk/sources/SDL-1.2.2_newlib/include"
|
||||||
|
SDL_LIB = tup.getcwd() .. "/../contrib/sdk/lib"
|
||||||
|
|
||||||
|
tup.include("use_sound.lua")
|
||||||
|
|
||||||
|
INCLUDES = INCLUDES .. " -I" .. SDL_INCLUDE
|
||||||
|
table.insert(LIBDEPS, SDL_LIB .. "/<libSDLn>")
|
||||||
|
LIBS = "-lSDLn " .. LIBS
|
Loading…
Reference in New Issue
Block a user