invert LUA symbol meaning and avoid hints when compiling without it
authorkoda
Mon, 07 May 2012 11:59:09 +0200
changeset 7030 09984acadece
parent 7029 efbe6400fc24
child 7031 d5ea24399a48
invert LUA symbol meaning and avoid hints when compiling without it
CMakeLists.txt
hedgewars/options.inc
hedgewars/uScript.pas
--- a/CMakeLists.txt	Mon May 07 10:51:32 2012 +0200
+++ b/CMakeLists.txt	Mon May 07 11:59:09 2012 +0200
@@ -146,7 +146,7 @@
 endif()
 
 
-#set default flags values for all the project
+#set default flags values for all projects
 set(CMAKE_C_FLAGS "-pipe ${CMAKE_C_FLAGS}")
 set(CMAKE_C_FLAGS_RELEASE "-w -Os -fomit-frame-pointer ${CMAKE_C_FLAGS_RELEASE}")
 set(CMAKE_C_FLAGS_DEBUG "-Wall -O0 -g -DDEBUG ${CMAKE_C_FLAGS_DEBUG}")
--- a/hedgewars/options.inc	Mon May 07 10:51:32 2012 +0200
+++ b/hedgewars/options.inc	Mon May 07 11:59:09 2012 +0200
@@ -68,4 +68,4 @@
     {$DEFINE USE_AM_NUMCOLUMN}
 {$ENDIF}
 
-//also available LUA_DISABLED
+{$DEFINE USE_LUA_SCRIPT}
--- a/hedgewars/uScript.pas	Mon May 07 10:51:32 2012 +0200
+++ b/hedgewars/uScript.pas	Mon May 07 11:59:09 2012 +0200
@@ -36,7 +36,7 @@
 
 procedure ScriptLoad(name : shortstring);
 procedure ScriptOnGameInit;
-procedure ScriptOnScreenResize();
+procedure ScriptOnScreenResize;
 
 procedure ScriptCall(fname : shortstring);
 function ScriptCall(fname : shortstring; par1: LongInt) : LongInt;
@@ -52,7 +52,7 @@
 procedure freeModule;
 
 implementation
-{$IFNDEF LUA_DISABLED}
+{$IFDEF USE_LUA_SCRIPT}
 uses LuaPas,
     uConsole,
     uConsts,
@@ -2255,6 +2255,7 @@
 
 procedure ScriptLoad(name : shortstring);
 begin
+    name:= name; // avoid hint
 end;
 
 procedure ScriptOnGameInit;
@@ -2263,36 +2264,59 @@
 
 procedure ScriptCall(fname : shortstring);
 begin
+    fname:= fname; // avoid hint
 end;
 
 function ScriptCall(fname : shortstring; par1, par2, par3, par4 : LongInt) : LongInt;
 begin
-ScriptCall:= 0
+    // avoid hints
+    fname:= fname;
+    par1:= par1;
+    par2:= par2;
+    par3:= par3;
+    par4:= par4;
+    ScriptCall:= 0
 end;
 
 function ScriptCall(fname : shortstring; par1: LongInt) : LongInt;
 begin
-ScriptCall:= 0
+    // avoid hints
+    fname:= fname;
+    par1:= par1;
+    ScriptCall:= 0
 end;
 
 function ScriptCall(fname : shortstring; par1, par2: LongInt) : LongInt;
 begin
-ScriptCall:= 0
+    // avoid hints
+    fname:= fname;
+    par1:= par1;
+    par2:= par2;
+    ScriptCall:= 0
 end;
 
 function ScriptCall(fname : shortstring; par1, par2, par3: LongInt) : LongInt;
 begin
-ScriptCall:= 0
+    // avoid hints
+    fname:= fname;
+    par1:= par1;
+    par2:= par2;
+    par3:= par3;
+    ScriptCall:= 0
 end;
 
 function ScriptExists(fname : shortstring) : boolean;
 begin
-ScriptExists:= false
+    fname:= fname; // avoid hint
+    ScriptExists:= false
 end;
 
 function ParseCommandOverride(key, value : shortstring) : shortstring;
 begin
-ParseCommandOverride:= value
+    // avoid hints
+    key:= key;
+    value:= value;
+    ParseCommandOverride:= ''
 end;
 
 procedure ScriptOnScreenResize;