Arkanoid Remake  1.0
Classes | Enumerations

Implementation of an application using SDL. More...

Classes

struct  sdltk::Coords
 Coordinates at which the event occurred (see EventData) More...
 
struct  sdltk::EventData
 Event data structure. More...
 
class  sdltk::EventFunctor
 Functor class for events handling. More...
 
class  sdltk::Timer
 Utility timer (e.g. for dynamics calculations) More...
 
struct  sdltk::ColorRGBA
 Color data structure (red, green, blue, alpha=opacity) More...
 
class  sdltk::SdlApp
 SDL application manager. More...
 

Enumerations

enum  sdltk::EventType { sdltk::UNDEFINED, sdltk::APP, sdltk::MOUSE, sdltk::KEY }
 Event type (see EventData) More...
 
enum  sdltk::EventAction {
  sdltk::NONE, sdltk::DOWN, sdltk::UP, sdltk::MOVE,
  sdltk::QUIT
}
 Event action type (see EventData) More...
 
enum  sdltk::Button {
  sdltk::LEFT =0, sdltk::MIDDLE =1, sdltk::RIGHT =2, sdltk::ESC =27,
  sdltk::ENTER =13, sdltk::DEL =127, sdltk::BACK =8, sdltk::TAB =9
}
 Mouse/keyboard button (see EventData) More...
 

Detailed Description

Implementation of an application using SDL.

SDLTK: (SDL toolkit) implements graphics and sound, manages the keyboard and mouse input. This library is definitely neither complete nor optimized, and anyone with a bit of programming experience with SDL could do better (for the author this was the first programming experience with SDL). This simple library was built with the intention of hiding all implementation details, including internal data structures of SDL, to allow focusing on the operating logic while exploring the code of the application, without having to learn SDL (or any other library that could take its place). This approach would allow to use the interface implemented here with SDL to create a new version based on a different library, ideally without changes to the code of the other modules. In this module a sdltk namespace is defined, with the definition of the main SdlApp class and some auxiliary classes and definitions.

Author
Giovanni Paolo Vigano'

Enumeration Type Documentation

Mouse/keyboard button (see EventData)

Enumerator
LEFT 

Mouse left button.

MIDDLE 

Mouse middle button.

RIGHT 

Mouse right button.

ESC 

Escape key (ASCII code)

ENTER 

Enter key (ASCII code)

DEL 

Delete key (ASCII code)

BACK 

Backspace key (ASCII code)

TAB 

Tabulation key (ASCII code)

Event action type (see EventData)

Enumerator
NONE 

No action.

DOWN 

Button/key down.

UP 

Button/key up.

MOVE 

Mouse move.

QUIT 

Application quit.

Event type (see EventData)

Enumerator
UNDEFINED 

Event not defined.

APP 

Application event.

MOUSE 

Mouse event.

KEY 

Keyboard event.