1 /* 2 * Copyright (C) 2004 Tom Bradley 3 * tojabr@shiftygames.com 4 * 5 * file: ShiftyEngine.h 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation; either version 2, or (at your option) 10 * any later version. 11 * 12 * This program is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with this program; if not, write to the Free Software Foundation, 19 * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 20 * 21 */ 22 23 #ifndef __SHIFTYENGINE__H__ 24 #define __SHIFTYENGINE__H__ 25 26 #define SE_VERSION 0.1 27 28 #include <stdlib.h> 29 #include <string.h> 30 #include <stdio.h> 31 #include <ctype.h> 32 33 //#include "SDL_rotozoom.h" 34 #include "SDL_image.h" 35 #include "SDL_mixer.h" 36 #include "SDL_ttf.h" 37 #include "SDL.h" 38 39 #include "pointer.h" 40 #include "sound.h" 41 #include "logo.h" 42 #include "gfx.h" 43 44 #define WIDTH 800 45 #define HEIGHT 600 46 47 extern SDL_Surface * screen; 48 extern SDL_Surface * background; 49 50 struct SE_Button { 51 char name[16]; 52 int x, y, w, h; 53 void (*handle)(); 54 char over; 55 int * cond; 56 struct SE_Button * next; 57 }; 58 59 extern struct SE_Button * se_buttonList; 60 extern int se_true; 61 extern int volume; 62 extern int SOUND_X; 63 extern int SOUND_Y; 64 65 int SE_Init (); 66 void SE_SetBackground (char * filename); 67 //void SE_CheckEvents (); 68 void SE_GameLoop (); 69 void SE_SetFont (char * filename, int size); 70 void SE_SetName (char * name); 71 //void SE_Print (int x, int y, char * text, SDL_Color color, TTF_Font * font); 72 void SE_RegisterButton (char * name, int x, int y, int w, int h, int * cond, void (*handler)()); 73 //void SE_UnregisterButton (char * name); 74 void SE_Quit (); 75 void SE_Error (char * fmt, ...); 76 void SE_AdjustSoundLevel (); 77 void SE_ShowSoundIcon (); 78 79 #endif 80 81 82