D:/Documenti/Sviluppo/libraries/SDL/prj/libmsdl/src/libmsdl/mSDL.hpp File Reference


Classes

class  mSDL::GFX
 A graphic object. It handles surfaces manipulation and animation. More...
class  mSDL::ScreenObject
 A screen object. It handles objects positioning and drawing on screen. More...
class  mSDL::Sprite
 Sprite objects handling module. More...
class  mSDL::BG
 BackGround layers handling module. More...
class  mSDL::Banner
 Text banners handling module. More...
struct  mSDL::ButtonStatus
struct  mSDL::KeyHandler
struct  mSDL::MouseHandler
class  mSDL::Music
 Music playback handling module. More...
class  mSDL::Sound
 Sound playback and mixing handling module. More...

Namespaces

namespace  mSDL

Defines

#define _MSDL   "0.9"

Typedefs

typedef Sint8 mSDL::s8
 8-bit signed integer
typedef Uint8 mSDL::u8
 8-bit unsigned integer
typedef Sint16 mSDL::s16
 16-bit signed integer
typedef Uint16 mSDL::u16
 16-bit unsigned integer
typedef Sint32 mSDL::s32
 32-bit signed integer
typedef Uint32 mSDL::u32
 32-bit unsigned integer
typedef SDL_Rect mSDL::Rect
 see http://www.libsdl.org/cgi/docwiki.cgi/SDL_Rect
typedef SDL_Rect mSDL::Point
typedef SDL_Surface mSDL::Surface
 see http://www.libsdl.org/cgi/docwiki.cgi/SDL_Surface
typedef SDL_Color mSDL::Color
 see http://www.libsdl.org/cgi/docwiki.cgi/SDL_Color

Functions

void mSDL::Init (const u16 LogicalScreenWidth=DEFAULT_SCREEN_WIDTH, const u16 LogicalScreenHeight=DEFAULT_SCREEN_HEIGHT)
 Initialize (m)SDL. Need to be invoked before using any mSDL module. Initialize SDL subsystems used by mSDL (video, audio,...). Abort execution if it fails. If the logical screen size is not equal to the real screen the surface is automatically scaled appropriately (this is useful for cross-platform porting).
void mSDL::Screenshot (const std::string Filename)
 Save a screenshot into a BMP file.
u8 mSDL::GetFPS (void)
 get rendered Frames-Per-Second.
void mSDL::DrawScreen ()
 draw ALL registered screen objects (sprites, BGs and banners). Normally you won't invoke this function directly, WaitForVBL() will invoke it for you.
u16 mSDL::Distance (const ScreenObject &First, const ScreenObject &Second)
 Compute the distance (in pixels) between the centers of two screen objects (function version).
s16 mSDL::Angle (const ScreenObject &First, const ScreenObject &Second)
 Compute the angle (in degrees) between the centers of two screen objects (function version).
bool mSDL::CollisionRect (const ScreenObject &First, const ScreenObject &Second, u16 Range=0)
 Rectangular collision checker (function version).
bool mSDL::CollisionCirc (const ScreenObject &First, const ScreenObject &Second, u16 Range=0)
 Circular collision checker (function version).
void mSDL::HideAllSprites ()
void mSDL::ShowAllSprites ()
void mSDL::Sleep (const u32 ms)
 sleep for the specified number of milliseconds.
void mSDL::WaitForVBL (void)
 Very important function: it draws the screen and read user input. Must be invoked only once for every program cycle. (Similar to PA_WaitForVBL.).

Variables

const u16 mSDL::DEFAULT_BANNER_PRIO = 50
const u16 mSDL::DEFAULT_SPRITE_PRIO = 100
const u16 mSDL::DEFAULT_BG_PRIO = 200
const std::string mSDL::DEFAULT_FONT_FILE = "FreeSans.ttf"
const int mSDL::DEFAULT_FONT_SIZE = 32
const int mSDL::DEFAULT_SCREEN_WIDTH = 640
const int mSDL::DEFAULT_SCREEN_HEIGHT = 480
const Uint32 mSDL::DEFAULT_SCREEN_FLAGS = (SDL_HWSURFACE | SDL_HWPALETTE | SDL_DOUBLEBUF)
const int mSDL::DEFAULT_SCREEN_BPP = 0
const u32 mSDL::MAX_FPS = 60
const int mSDL::MIX_CHUNKSIZE = 4096
const int mSDL::MIX_CHANNELS = 16
const SDL_Color mSDL::NONE = { 1, 1, 1, 1 }
const SDL_Color mSDL::BLACK = { 0, 0, 0, 0 }
const SDL_Color mSDL::WHITE = { 255, 255, 255, 0 }
const SDL_Color mSDL::RED = { 255, 0, 0, 0 }
const SDL_Color mSDL::GREEN = { 0, 255, 0, 0 }
const SDL_Color mSDL::BLUE = { 0, 0, 255, 0 }
const SDL_Color mSDL::YELLOW = { 255, 255, 0, 0 }
const SDL_Color mSDL::CYAN = { 0, 255, 255, 0 }
const SDL_Color mSDL::MAGENTA = { 255, 0, 255, 0 }
const SDL_Color mSDL::AZURE = { 0, 127, 255, 0 }
const SDL_Color mSDL::VIOLET = { 127, 0, 255, 0 }
const SDL_Color mSDL::ROSE = { 255, 0, 127, 0 }
const SDL_Color mSDL::ORANGE = { 255, 127, 0, 0 }
const SDL_Color mSDL::CHARTREUSE = { 127, 225, 0, 0 }
const SDL_Color mSDL::SPRING_GREEN = { 0, 225, 127, 0 }
const SDL_Color mSDL::GRAY = { 127, 127, 127, 0 }
const SDL_Color mSDL::GREY = { 127, 127, 127, 0 }
const SDL_Color mSDL::SILVER = { 191, 191, 191, 0 }
const SDL_Color mSDL::MAROON = { 127, 0, 0, 0 }
const SDL_Color mSDL::PINK = { 255, 192, 203, 0 }
SDL_Surface * mSDL::Screen
 The logical screen surface. User blits should be done to this surface instead of the one returned by SDL_GetVideoSurface.
KeyHandler mSDL::Key
 default instance from which to read keyboard buttons state
MouseHandler mSDL::Mouse
 default instance from which to read mouse position and buttons state
MouseHandlermSDL::Stylus

Define Documentation

#define _MSDL   "0.9"


Generated on Tue May 12 09:01:35 2009 for libmSDL by  doxygen 1.5.9