hedgewars/uScript.pas
changeset 7072 159616c24bb8
parent 7063 a0326412e96a
child 7135 4d863aadd0b2
--- a/hedgewars/uScript.pas	Sat May 12 16:45:06 2012 -0400
+++ b/hedgewars/uScript.pas	Sun May 13 00:50:45 2012 +0400
@@ -2055,7 +2055,7 @@
 // import some variables
 ScriptSetInteger('LAND_WIDTH', LAND_WIDTH);
 ScriptSetInteger('LAND_HEIGHT', LAND_HEIGHT);
-ScriptSetString('L', cLocale);
+ScriptSetString(_S'L', cLocale);
 
 // import game flags
 ScriptSetInteger('gfForts', gfForts);
@@ -2149,90 +2149,90 @@
 ScriptSetInteger('gstInvisible'      ,$00200000);
 
 // register functions
-lua_register(luaState, 'band', @lc_band);
-lua_register(luaState, 'bor', @lc_bor);
-lua_register(luaState, 'bnot', @lc_bnot);
-lua_register(luaState, 'div', @lc_div);
-lua_register(luaState, 'GetInputMask', @lc_getinputmask);
-lua_register(luaState, 'SetInputMask', @lc_setinputmask);
-lua_register(luaState, 'AddGear', @lc_addgear);
-lua_register(luaState, 'DeleteGear', @lc_deletegear);
-lua_register(luaState, 'AddVisualGear', @lc_addvisualgear);
-lua_register(luaState, 'DeleteVisualGear', @lc_deletevisualgear);
-lua_register(luaState, 'GetVisualGearValues', @lc_getvisualgearvalues);
-lua_register(luaState, 'SetVisualGearValues', @lc_setvisualgearvalues);
-lua_register(luaState, 'SpawnHealthCrate', @lc_spawnhealthcrate);
-lua_register(luaState, 'SpawnAmmoCrate', @lc_spawnammocrate);
-lua_register(luaState, 'SpawnUtilityCrate', @lc_spawnutilitycrate);
-lua_register(luaState, 'SpawnFakeHealthCrate', @lc_spawnfakehealthcrate);
-lua_register(luaState, 'SpawnFakeAmmoCrate', @lc_spawnfakeammocrate);
-lua_register(luaState, 'SpawnFakeUtilityCrate', @lc_spawnfakeutilitycrate);
-lua_register(luaState, 'WriteLnToConsole', @lc_writelntoconsole);
-lua_register(luaState, 'GetGearType', @lc_getgeartype);
-lua_register(luaState, 'EndGame', @lc_endgame);
-lua_register(luaState, 'FindPlace', @lc_findplace);
-lua_register(luaState, 'SetGearPosition', @lc_setgearposition);
-lua_register(luaState, 'GetGearPosition', @lc_getgearposition);
-lua_register(luaState, 'SetGearTarget', @lc_setgeartarget);
-lua_register(luaState, 'GetGearTarget', @lc_getgeartarget);
-lua_register(luaState, 'SetGearVelocity', @lc_setgearvelocity);
-lua_register(luaState, 'GetGearVelocity', @lc_getgearvelocity);
-lua_register(luaState, 'ParseCommand', @lc_parsecommand);
-lua_register(luaState, 'ShowMission', @lc_showmission);
-lua_register(luaState, 'HideMission', @lc_hidemission);
-lua_register(luaState, 'AddCaption', @lc_addcaption);
-lua_register(luaState, 'SetAmmo', @lc_setammo);
-lua_register(luaState, 'SetAmmoStore', @lc_setammostore);
-lua_register(luaState, 'PlaySound', @lc_playsound);
-lua_register(luaState, 'AddTeam', @lc_addteam);
-lua_register(luaState, 'AddHog', @lc_addhog);
-lua_register(luaState, 'AddAmmo', @lc_addammo);
-lua_register(luaState, 'GetAmmoCount', @lc_getammocount);
-lua_register(luaState, 'SetHealth', @lc_sethealth);
-lua_register(luaState, 'GetHealth', @lc_gethealth);
-lua_register(luaState, 'SetEffect', @lc_seteffect);
-lua_register(luaState, 'GetEffect', @lc_geteffect);
-lua_register(luaState, 'GetHogClan', @lc_gethogclan);
-lua_register(luaState, 'GetClanColor', @lc_getclancolor);
-lua_register(luaState, 'SetClanColor', @lc_setclancolor);
-lua_register(luaState, 'GetHogTeamName', @lc_gethogteamname);
-lua_register(luaState, 'GetHogName', @lc_gethogname);
-lua_register(luaState, 'SetHogName', @lc_sethogname);
-lua_register(luaState, 'GetHogLevel', @lc_gethoglevel);
-lua_register(luaState, 'SetHogLevel', @lc_sethoglevel);
-lua_register(luaState, 'GetX', @lc_getx);
-lua_register(luaState, 'GetY', @lc_gety);
-lua_register(luaState, 'CopyPV', @lc_copypv);
-lua_register(luaState, 'FollowGear', @lc_followgear);
-lua_register(luaState, 'GetFollowGear', @lc_getfollowgear);
-lua_register(luaState, 'SetState', @lc_setstate);
-lua_register(luaState, 'GetState', @lc_getstate);
-lua_register(luaState, 'SetTag', @lc_settag);
-lua_register(luaState, 'SetTimer', @lc_settimer);
-lua_register(luaState, 'GetTimer', @lc_gettimer);
-lua_register(luaState, 'SetZoom', @lc_setzoom);
-lua_register(luaState, 'GetZoom', @lc_getzoom);
-lua_register(luaState, 'HogSay', @lc_hogsay);
-lua_register(luaState, 'SwitchHog', @lc_switchhog);
-lua_register(luaState, 'HogTurnLeft', @lc_hogturnleft);
-lua_register(luaState, 'CampaignLock', @lc_campaignlock);
-lua_register(luaState, 'CampaignUnlock', @lc_campaignunlock);
-lua_register(luaState, 'GetGearElasticity', @lc_getgearelasticity);
-lua_register(luaState, 'GetGearRadius', @lc_getgearradius);
-lua_register(luaState, 'GetGearMessage', @lc_getgearmessage);
-lua_register(luaState, 'SetGearMessage', @lc_setgearmessage);
-lua_register(luaState, 'GetGearPos', @lc_getgearpos);
-lua_register(luaState, 'SetGearPos', @lc_setgearpos);
-lua_register(luaState, 'GetRandom', @lc_getrandom);
-lua_register(luaState, 'SetWind', @lc_setwind);
-lua_register(luaState, 'GetDataPath', @lc_getdatapath);
-lua_register(luaState, 'GetUserDataPath', @lc_getuserdatapath);
-lua_register(luaState, 'MapHasBorder', @lc_maphasborder);
-lua_register(luaState, 'GetHogHat', @lc_gethoghat);
-lua_register(luaState, 'SetHogHat', @lc_sethoghat);
-lua_register(luaState, 'PlaceGirder', @lc_placegirder);
-lua_register(luaState, 'GetCurAmmoType', @lc_getcurammotype);
-lua_register(luaState, 'TestRectForObstacle', @lc_testrectforobstacle);
+lua_register(luaState, _P'band', @lc_band);
+lua_register(luaState, _P'bor', @lc_bor);
+lua_register(luaState, _P'bnot', @lc_bnot);
+lua_register(luaState, _P'div', @lc_div);
+lua_register(luaState, _P'GetInputMask', @lc_getinputmask);
+lua_register(luaState, _P'SetInputMask', @lc_setinputmask);
+lua_register(luaState, _P'AddGear', @lc_addgear);
+lua_register(luaState, _P'DeleteGear', @lc_deletegear);
+lua_register(luaState, _P'AddVisualGear', @lc_addvisualgear);
+lua_register(luaState, _P'DeleteVisualGear', @lc_deletevisualgear);
+lua_register(luaState, _P'GetVisualGearValues', @lc_getvisualgearvalues);
+lua_register(luaState, _P'SetVisualGearValues', @lc_setvisualgearvalues);
+lua_register(luaState, _P'SpawnHealthCrate', @lc_spawnhealthcrate);
+lua_register(luaState, _P'SpawnAmmoCrate', @lc_spawnammocrate);
+lua_register(luaState, _P'SpawnUtilityCrate', @lc_spawnutilitycrate);
+lua_register(luaState, _P'SpawnFakeHealthCrate', @lc_spawnfakehealthcrate);
+lua_register(luaState, _P'SpawnFakeAmmoCrate', @lc_spawnfakeammocrate);
+lua_register(luaState, _P'SpawnFakeUtilityCrate', @lc_spawnfakeutilitycrate);
+lua_register(luaState, _P'WriteLnToConsole', @lc_writelntoconsole);
+lua_register(luaState, _P'GetGearType', @lc_getgeartype);
+lua_register(luaState, _P'EndGame', @lc_endgame);
+lua_register(luaState, _P'FindPlace', @lc_findplace);
+lua_register(luaState, _P'SetGearPosition', @lc_setgearposition);
+lua_register(luaState, _P'GetGearPosition', @lc_getgearposition);
+lua_register(luaState, _P'SetGearTarget', @lc_setgeartarget);
+lua_register(luaState, _P'GetGearTarget', @lc_getgeartarget);
+lua_register(luaState, _P'SetGearVelocity', @lc_setgearvelocity);
+lua_register(luaState, _P'GetGearVelocity', @lc_getgearvelocity);
+lua_register(luaState, _P'ParseCommand', @lc_parsecommand);
+lua_register(luaState, _P'ShowMission', @lc_showmission);
+lua_register(luaState, _P'HideMission', @lc_hidemission);
+lua_register(luaState, _P'AddCaption', @lc_addcaption);
+lua_register(luaState, _P'SetAmmo', @lc_setammo);
+lua_register(luaState, _P'SetAmmoStore', @lc_setammostore);
+lua_register(luaState, _P'PlaySound', @lc_playsound);
+lua_register(luaState, _P'AddTeam', @lc_addteam);
+lua_register(luaState, _P'AddHog', @lc_addhog);
+lua_register(luaState, _P'AddAmmo', @lc_addammo);
+lua_register(luaState, _P'GetAmmoCount', @lc_getammocount);
+lua_register(luaState, _P'SetHealth', @lc_sethealth);
+lua_register(luaState, _P'GetHealth', @lc_gethealth);
+lua_register(luaState, _P'SetEffect', @lc_seteffect);
+lua_register(luaState, _P'GetEffect', @lc_geteffect);
+lua_register(luaState, _P'GetHogClan', @lc_gethogclan);
+lua_register(luaState, _P'GetClanColor', @lc_getclancolor);
+lua_register(luaState, _P'SetClanColor', @lc_setclancolor);
+lua_register(luaState, _P'GetHogTeamName', @lc_gethogteamname);
+lua_register(luaState, _P'GetHogName', @lc_gethogname);
+lua_register(luaState, _P'SetHogName', @lc_sethogname);
+lua_register(luaState, _P'GetHogLevel', @lc_gethoglevel);
+lua_register(luaState, _P'SetHogLevel', @lc_sethoglevel);
+lua_register(luaState, _P'GetX', @lc_getx);
+lua_register(luaState, _P'GetY', @lc_gety);
+lua_register(luaState, _P'CopyPV', @lc_copypv);
+lua_register(luaState, _P'FollowGear', @lc_followgear);
+lua_register(luaState, _P'GetFollowGear', @lc_getfollowgear);
+lua_register(luaState, _P'SetState', @lc_setstate);
+lua_register(luaState, _P'GetState', @lc_getstate);
+lua_register(luaState, _P'SetTag', @lc_settag);
+lua_register(luaState, _P'SetTimer', @lc_settimer);
+lua_register(luaState, _P'GetTimer', @lc_gettimer);
+lua_register(luaState, _P'SetZoom', @lc_setzoom);
+lua_register(luaState, _P'GetZoom', @lc_getzoom);
+lua_register(luaState, _P'HogSay', @lc_hogsay);
+lua_register(luaState, _P'SwitchHog', @lc_switchhog);
+lua_register(luaState, _P'HogTurnLeft', @lc_hogturnleft);
+lua_register(luaState, _P'CampaignLock', @lc_campaignlock);
+lua_register(luaState, _P'CampaignUnlock', @lc_campaignunlock);
+lua_register(luaState, _P'GetGearElasticity', @lc_getgearelasticity);
+lua_register(luaState, _P'GetGearRadius', @lc_getgearradius);
+lua_register(luaState, _P'GetGearMessage', @lc_getgearmessage);
+lua_register(luaState, _P'SetGearMessage', @lc_setgearmessage);
+lua_register(luaState, _P'GetGearPos', @lc_getgearpos);
+lua_register(luaState, _P'SetGearPos', @lc_setgearpos);
+lua_register(luaState, _P'GetRandom', @lc_getrandom);
+lua_register(luaState, _P'SetWind', @lc_setwind);
+lua_register(luaState, _P'GetDataPath', @lc_getdatapath);
+lua_register(luaState, _P'GetUserDataPath', @lc_getuserdatapath);
+lua_register(luaState, _P'MapHasBorder', @lc_maphasborder);
+lua_register(luaState, _P'GetHogHat', @lc_gethoghat);
+lua_register(luaState, _P'SetHogHat', @lc_sethoghat);
+lua_register(luaState, _P'PlaceGirder', @lc_placegirder);
+lua_register(luaState, _P'GetCurAmmoType', @lc_getcurammotype);
+lua_register(luaState, _P'TestRectForObstacle', @lc_testrectforobstacle);
 
 
 ScriptClearStack; // just to be sure stack is empty