# HG changeset patch # User koda # Date 1336384749 -7200 # Node ID 09984acadeceebb8a310738a0406d35eb5a21591 # Parent efbe6400fc24ba8dcd8e864bc11faa697a9c85ed invert LUA symbol meaning and avoid hints when compiling without it diff -r efbe6400fc24 -r 09984acadece CMakeLists.txt --- 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}") diff -r efbe6400fc24 -r 09984acadece hedgewars/options.inc --- 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} diff -r efbe6400fc24 -r 09984acadece hedgewars/uScript.pas --- 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;