screenCtrl.cpp

00001 /*
00002   画面制御
00003   Satofumi KAMIMURA
00004   $Id$
00005 */
00006 
00007 #include "screenCtrl.h"
00008 #include <stdio.h>
00009 #include <stdlib.h>
00010 
00011 
00012 SDL_Surface *ScreenCtrl::screen = NULL;
00013 
00014 
00015 ScreenCtrl::ScreenCtrl(void) {
00016   if (SDL_Init(SDL_INIT_VIDEO) < 0) {
00017     fprintf(stderr, "SDL_Init: %s\n", SDL_GetError());
00018     exit(1);
00019   }
00020 }
00021 
00022 
00023 ScreenCtrl::~ScreenCtrl(void) {
00024   SDL_Quit();
00025   screen = NULL;
00026 }
00027 
00028 
00029 void ScreenCtrl::create(void) {
00030   screen = SDL_SetVideoMode(640, 480, 8, SDL_SWSURFACE);
00031   if (!screen) {
00032     fprintf(stderr, "SDL_SetVideoMode: %s\n", SDL_GetError());
00033     exit(1);
00034   }
00035 }
00036 
00037 
00038 void ScreenCtrl::setFramerate(int msec) {
00039 }
00040 
00041 
00042 void ScreenCtrl::waitFramerate(void) {
00043 }
00044 
00045 
00046 int ScreenCtrl::getTicks(void) {
00047   return -1;
00048 }
00049 

Generated on Mon Apr 13 22:52:01 2009 by  doxygen 1.5.7.1