src/util/reader.hpp File Reference

#include "lisp/lisp.hpp"

Go to the source code of this file.

Typedefs

typedef lisp::Lisp Reader

Functions

int reader_get_layer (const Reader &reader, int def)


Typedef Documentation

typedef lisp::Lisp Reader

Definition at line 22 of file reader.hpp.


Function Documentation

int reader_get_layer ( const Reader reader,
int  def 
)

Definition at line 26 of file reader.cpp.

References lisp::Lisp::get(), and LAYER_GUI.

Referenced by Background::Background(), Decal::Decal(), Gradient::Gradient(), CloudParticleSystem::parse(), CometParticleSystem::parse(), GhostParticleSystem::parse(), RainParticleSystem::parse(), SnowParticleSystem::parse(), ScriptedObject::ScriptedObject(), Thunderstorm::Thunderstorm(), and TileMap::TileMap().

00027 {
00028   int tmp = 0;
00029   bool status;
00030 
00031   status = reader.get ("z-pos", tmp);
00032 
00033   if (!status)
00034     status = reader.get ("layer", tmp);
00035 
00036   if (!status)
00037     tmp = def;
00038 
00039   if (tmp > (LAYER_GUI - 100))
00040     tmp = LAYER_GUI - 100;
00041 
00042   return (tmp);
00043 } /* int reader_get_layer */


Generated on Mon Jun 9 03:38:27 2014 for SuperTux by  doxygen 1.5.1