_________ __                 __
        /   _____//  |_____________ _/  |______     ____  __ __  ______
        \_____  \\   __\_  __ \__  \\   __\__  \   / ___\|  |  \/  ___/
        /        \|  |  |  | \// __ \|  |  / __ \_/ /_/  >  |  /\___ \
       /_______  /|__|  |__|  (____  /__| (____  /\___  /|____//____  >
               \/                  \/          \//_____/            \/
    ______________________                           ______________________
                          T H E   W A R   B E G I N S
                   Stratagus - A free fantasy real time strategy game engine

spell_luacallback.h
Go to the documentation of this file.
1 // _________ __ __
2 // / _____// |_____________ _/ |______ ____ __ __ ______
3 // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/
4 // / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ |
5 // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ >
6 // \/ \/ \//_____/ \/
7 // ______________________ ______________________
8 // T H E W A R B E G I N S
9 // Stratagus - A free fantasy real time strategy game engine
10 //
11 //
12 // (c) Copyright 2014 by cybermind
13 //
14 // This program is free software; you can redistribute it and/or modify
15 // it under the terms of the GNU General Public License as published by
16 // the Free Software Foundation; only version 2 of the License.
17 //
18 // This program is distributed in the hope that it will be useful,
19 // but WITHOUT ANY WARRANTY; without even the implied warranty of
20 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 // GNU General Public License for more details.
22 //
23 // You should have received a copy of the GNU General Public License
24 // along with this program; if not, write to the Free Software
25 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
26 // 02111-1307, USA.
27 //
28 
29 #ifndef SPELL_LUACALLBACK_H
30 #define SPELL_LUACALLBACK_H
31 
33 
34 /*----------------------------------------------------------------------------
35 -- Includes
36 ----------------------------------------------------------------------------*/
37 
38 #include "luacallback.h"
39 #include "spells.h"
40 
41 
43 {
44 public:
45  Spell_LuaCallback() : Func(NULL) {};
46  ~Spell_LuaCallback() { delete Func; };
47  virtual int Cast(CUnit &caster, const SpellType &spell,
48  CUnit *&target, const Vec2i &goalPos);
49  virtual void Parse(lua_State *l, int startIndex, int endIndex);
50 
51 private:
52  LuaCallback *Func;
53 };
54 
56 
57 #endif // SPELL_LUACALLBACK_H
Spell_LuaCallback
Definition: spell_luacallback.h:42
Spell_LuaCallback::Parse
virtual void Parse(lua_State *l, int startIndex, int endIndex)
Definition: spell_luacallback.cpp:40
Vec2T
Definition: vec2i.h:36
SpellActionType
Definition: spells.h:63
Spell_LuaCallback::~Spell_LuaCallback
~Spell_LuaCallback()
Definition: spell_luacallback.h:46
spells.h
LuaCallback
Definition: luacallback.h:41
luacallback.h
Spell_LuaCallback::Cast
virtual int Cast(CUnit &caster, const SpellType &spell, CUnit *&target, const Vec2i &goalPos)
Definition: spell_luacallback.cpp:59
Spell_LuaCallback::Spell_LuaCallback
Spell_LuaCallback()
Definition: spell_luacallback.h:45
SpellType
Definition: spells.h:205
CUnit
The big unit structure.
Definition: unit.h:135
(C) Copyright 1998-2012 by The Stratagus Project under the GNU General Public License.
All trademarks and copyrights on this page are owned by their respective owners.