-- $LastChangedDate: 2009-11-22 22:39:11 -0500 (Sun, 22 Nov 2009) $
-- Macros written in Lua to expand C++ code for bindings between C++/Lua.
-- Avoid lua_/LUA_ which is reserved by Lua.

bindTable = {

class = "GameHud",
typesig = nil,
luaCanInstantiate = false,

headers =
[[
#include "base/module.hh"
using namespace base;
#include "object/module.hh"
using namespace object;
#include "game/module.hh"
#include "game/hud.hh"
using namespace game;
]],

func_AttachTarget = {
    comments = "GameHud:AttachTarget(object,text)",
    code = [[
        const string text = POP_STRING( L );
        shptr<Object> object = POP_USERDATA_AS_SHPTR<Object>( L );
        CHECK_TYPESIG(object,TYPESIG_OBJECT);
        GET_GAME_HUD().AttachTarget( object, text );
    ]]
},

func_DetachTarget = {
    comments = "GameHud:DetachTarget(object)",
    code = [[
        shptr<Object> object = POP_USERDATA_AS_SHPTR<Object>( L );
        CHECK_TYPESIG(object,TYPESIG_OBJECT);
        GET_GAME_HUD().DetachTarget( object );
    ]]
},

func_SelectTarget = {
    comments = "GameHud:SelectTarget(object,radarLock)",
    code = [[
        const bool radarLock = POP_BOOL( L );
        shptr<Object> object = POP_USERDATA_AS_SHPTR<Object>( L );
        CHECK_TYPESIG(object,TYPESIG_OBJECT);
        GET_GAME_HUD().SelectTarget( object, radarLock );
    ]]
},

func_DeselectTarget = {
    comments = "GameHud:DeselectTarget()",
    code = [[
        GET_GAME_HUD().RemoveRadarLock();
    ]]
},

func_RemoveRadarLock = {
    comments = "GameHud:RemoveRadarLock()",
    code = [[
        GET_GAME_HUD().RemoveRadarLock();
    ]]
},

}
