From 4f4dc405474099410e4b4649b29b1eb655f20b8c Mon Sep 17 00:00:00 2001 From: Danan Date: Tue, 7 Jul 2009 17:06:04 +0200 Subject: [PATCH] First attempt of defining the main arch. --- SoftCat/SCLoader.cpp | 17 +++++++++++++++++ SoftCat/SCLoader.h | 13 +++++++++++++ SoftCat/SoftCat.cbp | 10 ++++++++-- SoftCat/SoftCat.depend | 11 +++++++++++ SoftCat/SoftCat.layout | 7 +++++++ SoftCat/Window.h | 31 +++++++++++++++++++++++++++++++ SoftCat/bin/Debug/SoftCat | Bin 0 -> 11645 bytes SoftCat/main.cpp | 3 +-- SoftCat/obj/Debug/SCLoader.o | Bin 0 -> 4192 bytes SoftCat/obj/Debug/main.o | Bin 0 -> 2504 bytes SoftCat/obj/Release/main.o | Bin 0 -> 1284 bytes 11 files changed, 88 insertions(+), 4 deletions(-) create mode 100644 SoftCat/SCLoader.cpp create mode 100644 SoftCat/SCLoader.h create mode 100644 SoftCat/SoftCat.depend create mode 100644 SoftCat/SoftCat.layout create mode 100644 SoftCat/Window.h create mode 100755 SoftCat/bin/Debug/SoftCat create mode 100644 SoftCat/obj/Debug/SCLoader.o create mode 100644 SoftCat/obj/Debug/main.o create mode 100644 SoftCat/obj/Release/main.o diff --git a/SoftCat/SCLoader.cpp b/SoftCat/SCLoader.cpp new file mode 100644 index 0000000..d96f485 --- /dev/null +++ b/SoftCat/SCLoader.cpp @@ -0,0 +1,17 @@ +#include "SCLoader.h" + +namespace SC { + SCLoader::SCLoader() { + // initialize the video subsystem + if ( SDL_Init( SDL_INIT_VIDEO ) < 0 ) { + //TODO: BETTER ERROR HANDLING? + printf("Unable to initialize SDL: %s\n", SDL_GetError()); + exit(EXIT_FAILURE); + } + } + + SCLoader::~SCLoader() { + SDL_Quit(); + } +}; + diff --git a/SoftCat/SCLoader.h b/SoftCat/SCLoader.h new file mode 100644 index 0000000..5bb331e --- /dev/null +++ b/SoftCat/SCLoader.h @@ -0,0 +1,13 @@ +#include +/* +* OpenGL wrapper header, it provides portability. +*/ +#include + +namespace SC { + class SCLoader { + public: + SCLoader(); + ~SCLoader(); + }; +}; diff --git a/SoftCat/SoftCat.cbp b/SoftCat/SoftCat.cbp index 61464f8..b13100d 100644 --- a/SoftCat/SoftCat.cbp +++ b/SoftCat/SoftCat.cbp @@ -14,6 +14,12 @@ + + + + + +