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

src/stratagus/script_spell.cpp File Reference

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "stratagus.h"
#include "spells.h"
#include "script_sound.h"
#include "sound.h"
#include "script.h"
#include "missile.h"
#include "unittype.h"
#include "upgrade.h"

Functions

script_spell.cpp - The spell script functions..
static void CclSpellMissileLocation (lua_State *l, SpellActionMissileLocation *location)
static SpellActionTypeCclSpellAction (lua_State *l)
char Ccl2Condition (lua_State *l, const char *value)
 return 0, 1, 2 for true, only, false.
static void CclSpellCondition (lua_State *l, ConditionInfo *condition)
static void CclSpellAutocast (lua_State *l, AutoCastInfo *autocast)
static int CclDefineSpell (lua_State *l)
void SpellCclRegister ()
 register fonction.

Function Documentation

char Ccl2Condition ( lua_State *  l,
const char *  value 
)

return 0, 1, 2 for true, only, false.

Get a condition value from a scm object.

Parameters:
l Lua state.
value scm value to convert.
Returns:
CONDITION_TRUE, CONDITION_FALSE, CONDITION_ONLY or -1 on error.
Note:
This is a helper function to make CclSpellCondition shorter and easier to understand.

static int CclDefineSpell ( lua_State *  l  )  [static]

Parse Spell.

Parameters:
l Lua state.

static SpellActionType* CclSpellAction ( lua_State *  l  )  [static]

Parse the action for spell.

Parameters:
l Lua state.

static void CclSpellAutocast ( lua_State *  l,
AutoCastInfo autocast 
) [static]

Parse the Condition for spell.

Parameters:
l Lua state.
autocast pointer to autocast to fill with data.
Note:
: autocast must be allocated. All data already in is LOST.

static void CclSpellCondition ( lua_State *  l,
ConditionInfo condition 
) [static]

Parse the Condition for spell.

Parameters:
l Lua state.
condition pointer to condition to fill with data.
Note:
Conditions must be allocated. All data already in is LOST.

static void CclSpellMissileLocation ( lua_State *  l,
SpellActionMissileLocation location 
) [static]

Parse the missile location description for a spell action.

Parameters:
l Lua state.
location Pointer to missile location description.
Note:
This is only here to avoid code duplication. You don't have any reason to USE this:)

void SpellCclRegister (  ) 

register fonction.

Register CCL features for Spell.

(C) Copyright 1998-2011 by The Stratagus Project under the GNU General Public License.
All trademarks and copyrights on this page are owned by their respective owners.