caresources.h

00001 #ifndef CARESOURCES_H
00002 #define CARESOURCES_H
00003 
00004 #include <ClanLib/core.h>
00005 #include <ClanLib/display.h>
00006 #include <ClanLib/sound.h>
00007 
00008 #include "casoundeffect.h"
00009 #include "camath.h"
00010 
00011 #define CA_RES CAResources::getResources()
00012 
00013 
00018 class CAResources {
00019 
00020 protected:
00021     CAResources();
00022     void load();
00023 
00024 private:
00025     static CAResources* theOneAndOnlyResource;
00026 
00027 public:
00028     enum AnimationMode { Forward, Backward, Revolving };
00029 
00030     static CAResources* getResources();
00031     ~CAResources();
00032 
00033     static bool advanceAnimation( float* frameCounter,
00034                                   CL_Surface* surface,
00035                                   float fps,
00036                                   AnimationMode mode = Forward );
00037     static bool advanceAnimation( float* frameCounter,
00038                                   int numFrames,
00039                                   float fps,
00040                                   AnimationMode mode = Forward );
00041 
00042 public:
00043     CL_ResourceManager* resources;
00044 
00045     CL_Surface* gui_loading;
00046     CL_Surface* gui_progressbar;
00047 
00048     CL_Font* font_normal_11_white;
00049     CL_Font* font_normal_14_white;
00050     CL_Font* font_normal_22_white;
00051     CL_Font* font_normal_22_gray;
00052     CL_Font* font_lcd_13_green;
00053 
00054     CL_Surface* misc_cross;
00055     CL_Surface* misc_light;
00056     CL_Surface* misc_hitpoint;
00057     CL_Surface* misc_gunfire;
00058     CL_Surface* misc_carfire;
00059     CL_Surface* misc_checkflag;
00060     CL_Surface* misc_fog;
00061     CL_Surface* misc_dust;
00062     CL_Surface* misc_info;
00063     CL_Surface* misc_caution;
00064 
00065     CL_Surface* goody_turbo;
00066     CL_Surface* goody_life;
00067     CL_Surface* goody_money;
00068     CL_Surface* goody_bullets;
00069     CL_Surface* goody_fogbomb;
00070 
00072     CL_Surface* dust[CA_FPR];
00073 
00074     CL_Surface* menu_bg;
00075     CL_Surface* menu_cursorani;
00076     CL_Surface* menu_bar;
00077 
00078     CL_Surface* panel_label;
00079     CL_Surface* panel_button;
00080     CL_Surface* panel_life;
00081     CL_Surface* panel_infoview;
00082     CL_Surface* panel_speed;
00083     CL_Surface* panel_turbo;
00084     CL_Surface* panel_turbolabel;
00085     CL_Surface* panel_death;
00086 
00087     CL_Surface* gui_edge1;
00088     CL_Surface* gui_edge2;
00089     CL_Surface* gui_edge3;
00090     CL_Surface* gui_edge4;
00091     CL_Surface* gui_border1;
00092     CL_Surface* gui_border2;
00093     CL_Surface* gui_border3;
00094     CL_Surface* gui_border4;
00095     CL_Surface* gui_button;
00096     CL_Surface* gui_arrow_l;
00097     CL_Surface* gui_arrow_r;
00098     CL_Surface* gui_arrow_t;
00099     CL_Surface* gui_arrow_b;
00100 
00101     CL_SoundBuffer* sound_horn;
00102     CL_SoundBuffer* sound_menu;
00103     CL_SoundBuffer* sound_selector;
00104     CL_SoundBuffer* sound_slide;
00105     CL_SoundBuffer* sound_crash;
00106     CL_SoundBuffer* sound_engine;
00107     CL_SoundBuffer* sound_light;
00108     CL_SoundBuffer* sound_goody_money;
00109     CL_SoundBuffer* sound_goody_bullets;
00110     CL_SoundBuffer* sound_goody_turbo;
00111     CL_SoundBuffer* sound_goody_fogbomb;
00112     CL_SoundBuffer* sound_goody_life;
00113     CL_SoundBuffer* sound_shoot;
00114     CL_SoundBuffer* sound_fogbomb;
00115     CL_SoundBuffer* sound_fire;
00116     CL_SoundBuffer* sound_background01;
00117 
00118     CASoundEffect* effectCrash;
00119     CASoundEffect* effectSlide;
00120     CASoundEffect* effectEngine;
00121     CASoundEffect* effectHorn;
00122     CASoundEffect* effectLight;
00123     CASoundEffect* effectMenu;
00124     CASoundEffect* effectSelector;
00125     CASoundEffect* effectGoodyMoney;
00126     CASoundEffect* effectGoodyBullets;
00127     CASoundEffect* effectGoodyTurbo;
00128     CASoundEffect* effectGoodyFogbomb;
00129     CASoundEffect* effectGoodyLife;
00130     CASoundEffect* effectShoot;
00131     CASoundEffect* effectFogBomb;
00132     CASoundEffect* effectFire;
00133     CASoundEffect* effectBackground01;
00134 
00135 };
00136 
00137 #endif

Generated on Tue Nov 28 06:48:28 2006 by  doxygen 1.5.0