Steam Fort 0.5
Functions | Variables

src/magic.cpp File Reference

#include "main.hpp"
#include "ui.hpp"
#include "adventure.hpp"
#include <stdio.h>
#include <iostream>
#include "game.hpp"

Functions

void buildSpellsUI ()
 Create spells menu.
void cast_spells ()
 Cast all waiting spells.
void magic_target (int sindex)
 Set target for spell.
void magicClb (Widget *w, void *data)
 Cast or select target for selected spell.
void setVisibleSpells (bool visible)
 Show/hide spells menu.
int find_spell (std::string name)
 Find selected spell.

Variables

Container * spellsmenu = new Container(0, 0, SCREENWIDTH, SCREENHEIGHT)

Function Documentation

void buildSpellsUI ( )

Create spells menu.

void cast_spells ( )

Cast all waiting spells.

int find_spell ( std::string  name)

Find selected spell.

Parameters:
nameName of spell to find.
Returns:
Index of spell or -1 if spell not found.
void magic_target ( int  sindex)

Set target for spell.

Parameters:
sindexIndex of spell.
void magicClb ( Widget *  w,
void *  data 
)

Cast or select target for selected spell.

Parameters:
wUnused.
dataIndex of spell to cast
void setVisibleSpells ( bool  visible)

Show/hide spells menu.

Parameters:
visibleDid menu will be visible or not.

Variable Documentation

Container* spellsmenu = new Container(0, 0, SCREENWIDTH, SCREENHEIGHT)
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines