Basic layout of frontlib, some more sdl bindings qmlfrontend
authorunc0rr
Tue, 16 Sep 2014 12:47:39 +0400
branchqmlfrontend
changeset 10406 b5fd52ac760f
parent 10404 1baaab44a0b2
child 10408 5fdc42ef5bcc
Basic layout of frontlib, some more sdl bindings
hedgewars/SDLh.pas
hedgewars/hwLibrary.pas
hedgewars/uFLGameConfig.pas
hedgewars/uFLIPC.pas
hedgewars/uFLTypes.pas
--- a/hedgewars/SDLh.pas	Sat Sep 13 00:27:10 2014 +0400
+++ b/hedgewars/SDLh.pas	Tue Sep 16 12:47:39 2014 +0400
@@ -842,6 +842,7 @@
 
     PSDL_Thread = Pointer;
     PSDL_mutex = Pointer;
+    PSDL_sem = Pointer;
 
     TSDL_GLattr = (
         SDL_GL_RED_SIZE,
@@ -1064,6 +1065,16 @@
 function  SDL_LockMutex(mutex: PSDL_mutex): LongInt; cdecl; external SDLLibName {$IFNDEF SDL2}name 'SDL_mutexP'{$ENDIF};
 function  SDL_UnlockMutex(mutex: PSDL_mutex): LongInt; cdecl; external SDLLibName {$IFNDEF SDL2}name 'SDL_mutexV'{$ENDIF};
 
+
+function SDL_CreateSemaphore(initial_value: Longword): PSDL_sem; cdecl; external SDLLibName;
+procedure SDL_DestroySemaphore(sem: PSDL_sem); cdecl; external SDLLibName;
+function SDL_SemWait(sem: PSDL_sem): LongInt; cdecl; external SDLLibName;
+function SDL_SemTryWait(sem: PSDL_sem): LongInt; cdecl; external SDLLibName;
+function SDL_SemWaitTimeout(sem: PSDL_sem; ms: Longword): LongInt; cdecl; external SDLLibName;
+function SDL_SemPost(sem: PSDL_sem): LongInt; cdecl; external SDLLibName;
+function SDL_SemValue(sem: PSDL_sem): Longword; cdecl; external SDLLibName;
+
+
 function  SDL_GL_SetAttribute(attr: TSDL_GLattr; value: LongInt): LongInt; cdecl; external SDLLibName;
 procedure SDL_GL_SwapBuffers; cdecl; external SDLLibName;
 
--- a/hedgewars/hwLibrary.pas	Sat Sep 13 00:27:10 2014 +0400
+++ b/hedgewars/hwLibrary.pas	Tue Sep 16 12:47:39 2014 +0400
@@ -30,7 +30,9 @@
 Library hwLibrary;
 
 uses hwengine, uTypes, uConsts, uVariables, uSound, uCommands, uUtils,
-     uLocale{$IFDEF ANDROID}, jni{$ENDIF};
+    uLocale{$IFDEF ANDROID}, jni{$ENDIF}
+    , uFLTypes
+    , uFLGameConfig;
 
 {$INCLUDE "config.inc"}
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hedgewars/uFLGameConfig.pas	Tue Sep 16 12:47:39 2014 +0400
@@ -0,0 +1,13 @@
+unit uFLGameConfig;
+
+interface
+
+procedure ResetGameConfig; cdecl; export;
+
+implementation
+
+procedure ResetGameConfig; cdecl;
+begin
+end;
+
+end.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hedgewars/uFLIPC.pas	Tue Sep 16 12:47:39 2014 +0400
@@ -0,0 +1,7 @@
+unit uFLIPC;
+
+interface
+
+implementation
+
+end.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hedgewars/uFLTypes.pas	Tue Sep 16 12:47:39 2014 +0400
@@ -0,0 +1,7 @@
+unit uFLTypes;
+
+interface
+
+implementation
+
+end.