Permalink
Browse files

renamed some of engine functions

also got rid of that diversionist ampersand in stateman.c
  • Loading branch information...
1 parent 8b6912d commit 2a03f8e76d8a9fb6f3fff5fec3bb445cf5bca0af @niksaak committed Feb 2, 2013
Showing with 20 additions and 17 deletions.
  1. +3 −3 src/engine/stateman.c
  2. +2 −4 src/engine/stateman.h
  3. +5 −5 src/engine/system.c
  4. +10 −5 src/engine/system.h
View
@@ -5,12 +5,12 @@
state_t* CurrentState = NULL;
-state_t* get_current_state()
+state_t* curstate()
{
- return &CurrentState;
+ return CurrentState;
}
-void switch_state(state_t* state)
+void swstate(state_t* state)
{
CurrentState = state;
}
View
@@ -15,9 +15,7 @@ typedef struct state {
void (*deinit)();
} state_t;
-extern state_t* CurrentState;
+extern state_t* curstate();
-extern state_t* get_current_state();
-
-extern void switch_state(state_t* other_state);
+extern void swstate(state_t* other_state);
View
@@ -7,7 +7,7 @@
static bool ScreenOn = false;
static bool UsingOGL = false;
-void start_screen(const char* title, int width, int height, bool ogl)
+void scrstart(const char* title, int width, int height, bool ogl)
{
SDL_Surface* screen = NULL;
Uint32 scrflags;
@@ -42,7 +42,7 @@ void start_screen(const char* title, int width, int height, bool ogl)
ScreenOn = true;
}
-void stop_screen()
+void scrstop()
{
if(!ScreenOn) {
WARN("Attempt to deinit screen whilst it was not initialized");
@@ -52,17 +52,17 @@ void stop_screen()
}
}
-SDL_Surface* get_screen()
+SDL_Surface* scrget()
{
return SDL_GetVideoSurface();
}
-bool screen_on()
+bool scronp()
{
return ScreenOn;
}
-bool using_ogl()
+bool using_ogl_p()
{
return UsingOGL;
}
View
@@ -4,8 +4,13 @@
#define INITFLAGS SDL_INIT_EVERYTHING
#endif
-extern void start_screen(const char* title, int width, int height, bool ogl);
-extern void stop_screen();
-extern SDL_Surface* get_screen();
-extern bool screen_on();
-extern bool using_ogl();
+extern void scrstart(const char* title, int width, int height, bool ogl);
+
+extern void scrstop();
+
+extern SDL_Surface* scrget();
+
+extern bool scronp();
+
+extern bool using_ogl_p();
+

0 comments on commit 2a03f8e

Please sign in to comment.