src/supertux/tile.cpp File Reference

#include "supertux/tile.hpp"
#include "supertux/constants.hpp"
#include "supertux/tile_set.hpp"
#include "math/aatriangle.hpp"
#include "video/drawing_context.hpp"

Go to the source code of this file.

Functions

bool is_above_line (float l_x, float l_y, float m, float p_x, float p_y)
bool is_below_line (float l_x, float l_y, float m, float p_x, float p_y)


Function Documentation

bool is_above_line ( float  l_x,
float  l_y,
float  m,
float  p_x,
float  p_y 
)

Definition at line 249 of file tile.cpp.

Referenced by Tile::check_position_unisolid(), and is_below_line().

00251 {
00252   float interp_y = (l_y + (m * (p_x - l_x)));
00253   return (interp_y >= p_y);
00254 }

bool is_below_line ( float  l_x,
float  l_y,
float  m,
float  p_x,
float  p_y 
)

Definition at line 256 of file tile.cpp.

References is_above_line().

Referenced by Tile::check_position_unisolid().

00258 {
00259   return !is_above_line (l_x, l_y, m, p_x, p_y);
00260 }


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