Lines 125-131
Link Here
|
125 |
wxStaticBoxSizer* launchbox = new wxStaticBoxSizer(wxVERTICAL, this, _T("LaunchPUI v1.00")); |
125 |
wxStaticBoxSizer* launchbox = new wxStaticBoxSizer(wxVERTICAL, this, _T("LaunchPUI v1.00")); |
126 |
wxStaticText* infoteksti = new wxStaticText(this, -1, _T("Another visitor! Stay a while.\nPlease enter your name to the field below to apply, any special needs can be set with the switches next to the field.\nThe default curriculum should be already loaded, but to create a custom curriculum, you can press the editor buttons at the top\nto open the curriculum editor. The curriculum must have at least 240 credits worth of courses to be launchable.\nThe sufficient credit total is indicated by Setaekamu launch button at the bottom of the screen. If the total is less than 240,\nthe button will be greyed out.\n\nSetaekamu wishes you good luck in your battle for credits and the quest for the ultimate elusive engineering degree!"), wxDefaultPosition, wxDefaultSize, 0, _T("staticText")); |
126 |
wxStaticText* infoteksti = new wxStaticText(this, -1, _T("Another visitor! Stay a while.\nPlease enter your name to the field below to apply, any special needs can be set with the switches next to the field.\nThe default curriculum should be already loaded, but to create a custom curriculum, you can press the editor buttons at the top\nto open the curriculum editor. The curriculum must have at least 240 credits worth of courses to be launchable.\nThe sufficient credit total is indicated by Setaekamu launch button at the bottom of the screen. If the total is less than 240,\nthe button will be greyed out.\n\nSetaekamu wishes you good luck in your battle for credits and the quest for the ultimate elusive engineering degree!"), wxDefaultPosition, wxDefaultSize, 0, _T("staticText")); |
127 |
wxBitmap bitmap; // a bitmap to hold the launch button "texture" |
127 |
wxBitmap bitmap; // a bitmap to hold the launch button "texture" |
128 |
bitmap.LoadFile(_T("gfx/launch.bmp"), wxBITMAP_TYPE_BMP); //loading the bitmap |
128 |
bitmap.LoadFile(_T("/usr/share/games/laadun/gfx/launch.bmp"), wxBITMAP_TYPE_BMP); //loading the bitmap |
129 |
//the buttons on the gui |
129 |
//the buttons on the gui |
130 |
LaunchGame = new wxBitmapButton(this, BUTTON_Launch, bitmap, wxDefaultPosition, wxSize(-1,-1)); |
130 |
LaunchGame = new wxBitmapButton(this, BUTTON_Launch, bitmap, wxDefaultPosition, wxSize(-1,-1)); |
131 |
CopyBox = new wxButton(this, BUTTON_Copy, _T("Insert edited data into structure"), wxDefaultPosition, wxDefaultSize, 0); |
131 |
CopyBox = new wxButton(this, BUTTON_Copy, _T("Insert edited data into structure"), wxDefaultPosition, wxDefaultSize, 0); |
Lines 278-284
Link Here
|
278 |
Layout(); |
278 |
Layout(); |
279 |
Save->Disable(); |
279 |
Save->Disable(); |
280 |
Layout(); |
280 |
Layout(); |
281 |
datafilename = _T("txt/default.cur"); //load default filename |
281 |
datafilename = _T("/usr/share/games/laadun/txt/default.cur"); //load default filename |
282 |
InitialLoadData(datafilename); //load the default curriculum |
282 |
InitialLoadData(datafilename); //load the default curriculum |
283 |
|
283 |
|
284 |
FileMenu->Append(ID_MAINWIN_QUIT, _("&Quit")); |
284 |
FileMenu->Append(ID_MAINWIN_QUIT, _("&Quit")); |
Lines 829-835
Link Here
|
829 |
glEnable(GL_COLOR_MATERIAL); |
829 |
glEnable(GL_COLOR_MATERIAL); |
830 |
glMaterialfv(GL_FRONT,GL_SPECULAR,MaterialSpecular); |
830 |
glMaterialfv(GL_FRONT,GL_SPECULAR,MaterialSpecular); |
831 |
glMaterialfv(GL_FRONT,GL_EMISSION,MaterialEmission); |
831 |
glMaterialfv(GL_FRONT,GL_EMISSION,MaterialEmission); |
832 |
GLuint loading_texture = load_texture("gfx/lording.png", 1); |
832 |
GLuint loading_texture = load_texture("/usr/share/games/laadun/gfx/lording.png", 1); |
833 |
|
833 |
|
834 |
for(int del=0;del<5;del++) |
834 |
for(int del=0;del<5;del++) |
835 |
{ |
835 |
{ |
Lines 866-884
Link Here
|
866 |
} |
866 |
} |
867 |
|
867 |
|
868 |
//loading actual audio, maybe should be spread a bit, dunno |
868 |
//loading actual audio, maybe should be spread a bit, dunno |
869 |
bullet_sound = Mix_LoadWAV( "snd/bullet.wav" ); |
869 |
bullet_sound = Mix_LoadWAV( "/usr/share/games/laadun/snd/bullet.wav" ); |
870 |
player_shoots_sound = Mix_LoadWAV( "snd/player_shoots.wav" ); |
870 |
player_shoots_sound = Mix_LoadWAV( "/usr/share/games/laadun/snd/player_shoots.wav" ); |
871 |
enemy_gets_hit_sound = Mix_LoadWAV( "snd/enemy_gets_hit.wav" ); |
871 |
enemy_gets_hit_sound = Mix_LoadWAV( "/usr/share/games/laadun/snd/enemy_gets_hit.wav" ); |
872 |
player_explodes_sound = Mix_LoadWAV( "snd/player_explodes.wav" ); |
872 |
player_explodes_sound = Mix_LoadWAV( "/usr/share/games/laadun/snd/player_explodes.wav" ); |
873 |
alarm_sound = Mix_LoadWAV( "snd/alarm.wav" ); |
873 |
alarm_sound = Mix_LoadWAV( "/usr/share/games/laadun/snd/alarm.wav" ); |
874 |
explosion_sound = Mix_LoadWAV( "snd/bomb.wav" ); |
874 |
explosion_sound = Mix_LoadWAV( "/usr/share/games/laadun/snd/bomb.wav" ); |
875 |
game_over_sound = Mix_LoadWAV( "snd/game_over.wav" ); |
875 |
game_over_sound = Mix_LoadWAV( "/usr/share/games/laadun/snd/game_over.wav" ); |
876 |
copypaste_overdrive_sound = Mix_LoadWAV( "snd/copypaste_overdrive.wav" ); |
876 |
copypaste_overdrive_sound = Mix_LoadWAV( "/usr/share/games/laadun/snd/copypaste_overdrive.wav" ); |
877 |
overdrive_get_sound = Mix_LoadWAV( "snd/overdrive_get.wav" ); |
877 |
overdrive_get_sound = Mix_LoadWAV( "/usr/share/games/laadun/snd/overdrive_get.wav" ); |
878 |
pause_game_sound = Mix_LoadWAV( "snd/pause_game.wav" ); |
878 |
pause_game_sound = Mix_LoadWAV( "/usr/share/games/laadun/snd/pause_game.wav" ); |
879 |
select_sound = Mix_LoadWAV( "snd/select.wav" ); |
879 |
select_sound = Mix_LoadWAV( "/usr/share/games/laadun/snd/select.wav" ); |
880 |
player_graze_sound = Mix_LoadWAV( "snd/player_graze.wav" ); |
880 |
player_graze_sound = Mix_LoadWAV( "/usr/share/games/laadun/snd/player_graze.wav" ); |
881 |
time_runs_out_sound = Mix_LoadWAV( "snd/time_runs_out.wav" ); |
881 |
time_runs_out_sound = Mix_LoadWAV( "/usr/share/games/laadun/snd/time_runs_out.wav" ); |
882 |
//setting respective volumes for the sounds |
882 |
//setting respective volumes for the sounds |
883 |
Mix_VolumeChunk(bullet_sound,(int)(0.92*sound_vol_Box->GetValue())); |
883 |
Mix_VolumeChunk(bullet_sound,(int)(0.92*sound_vol_Box->GetValue())); |
884 |
Mix_VolumeChunk(player_shoots_sound,(int)(0.3*sound_vol_Box->GetValue())); |
884 |
Mix_VolumeChunk(player_shoots_sound,(int)(0.3*sound_vol_Box->GetValue())); |
Lines 1104-1121
Link Here
|
1104 |
gluPerspective(45.0f,(GLfloat)res_x/(GLfloat)res_y,0.1f,100.0f); |
1104 |
gluPerspective(45.0f,(GLfloat)res_x/(GLfloat)res_y,0.1f,100.0f); |
1105 |
glMatrixMode(GL_MODELVIEW); |
1105 |
glMatrixMode(GL_MODELVIEW); |
1106 |
//loading the textures |
1106 |
//loading the textures |
1107 |
GLuint cloud_texture = load_texture("gfx/cloud2.jpg", texture_filtering_option); |
1107 |
GLuint cloud_texture = load_texture("/usr/share/games/laadun/gfx/cloud2.jpg", texture_filtering_option); |
1108 |
GLuint line_texture = load_texture("gfx/line.png", texture_filtering_option); |
1108 |
GLuint line_texture = load_texture("/usr/share/games/laadun/gfx/line.png", texture_filtering_option); |
1109 |
GLuint katto_texture = load_texture("gfx/katto.jpg", texture_filtering_option); |
1109 |
GLuint katto_texture = load_texture("/usr/share/games/laadun/gfx/katto.jpg", texture_filtering_option); |
1110 |
GLuint overdrive1_texture = load_texture("gfx/overdrive1.png", texture_filtering_option); |
1110 |
GLuint overdrive1_texture = load_texture("/usr/share/games/laadun/gfx/overdrive1.png", texture_filtering_option); |
1111 |
GLuint overdrive2_texture = load_texture("gfx/overdrive2.png", texture_filtering_option); |
1111 |
GLuint overdrive2_texture = load_texture("/usr/share/games/laadun/gfx/overdrive2.png", texture_filtering_option); |
1112 |
GLuint overdrive3_texture = load_texture("gfx/overdrive3.png", texture_filtering_option); |
1112 |
GLuint overdrive3_texture = load_texture("/usr/share/games/laadun/gfx/overdrive3.png", texture_filtering_option); |
1113 |
GLuint bar_texture = load_texture("gfx/stadiabar.png", texture_filtering_option); |
1113 |
GLuint bar_texture = load_texture("/usr/share/games/laadun/gfx/stadiabar.png", texture_filtering_option); |
1114 |
GLuint bullets_texture = load_texture("gfx/bullets.png", texture_filtering_option); |
1114 |
GLuint bullets_texture = load_texture("/usr/share/games/laadun/gfx/bullets.png", texture_filtering_option); |
1115 |
GLuint bucket_texture = load_texture("gfx/bucket.png", texture_filtering_option); |
1115 |
GLuint bucket_texture = load_texture("/usr/share/games/laadun/gfx/bucket.png", texture_filtering_option); |
1116 |
//building fonts |
1116 |
//building fonts |
1117 |
Font tekstit; |
1117 |
Font tekstit; |
1118 |
GLuint font_texture = load_texture("gfx/loosefont.png", texture_filtering_option); |
1118 |
GLuint font_texture = load_texture("/usr/share/games/laadun/gfx/loosefont.png", texture_filtering_option); |
1119 |
tekstit.BuildFont(font_texture, 24, res_x, res_y); |
1119 |
tekstit.BuildFont(font_texture, 24, res_x, res_y); |
1120 |
string timeleft="0"; //playtime left display |
1120 |
string timeleft="0"; //playtime left display |
1121 |
int year_counter=1; //game level/year |
1121 |
int year_counter=1; //game level/year |
Lines 1651-1657
Link Here
|
1651 |
vihu.setboss_mode(0); |
1651 |
vihu.setboss_mode(0); |
1652 |
year_counter=4; |
1652 |
year_counter=4; |
1653 |
glDeleteTextures(1, &cloud_texture); |
1653 |
glDeleteTextures(1, &cloud_texture); |
1654 |
cloud_texture = load_texture("gfx/map.jpg", texture_filtering_option); |
1654 |
cloud_texture = load_texture("/usr/share/games/laadun/gfx/map.jpg", texture_filtering_option); |
1655 |
tausta.settexture(0,&cloud_texture); |
1655 |
tausta.settexture(0,&cloud_texture); |
1656 |
tausta.settexture(1,&line_texture); |
1656 |
tausta.settexture(1,&line_texture); |
1657 |
tausta.settexture(2,&katto_texture); |
1657 |
tausta.settexture(2,&katto_texture); |
Lines 1825-1837
Link Here
|
1825 |
if(boss_approaching_counter==10) |
1825 |
if(boss_approaching_counter==10) |
1826 |
{ |
1826 |
{ |
1827 |
if(year_counter==1) |
1827 |
if(year_counter==1) |
1828 |
music = Mix_LoadMUS( "snd/boss_1.ogg" ); |
1828 |
music = Mix_LoadMUS( "/usr/share/games/laadun/snd/boss_1.ogg" ); |
1829 |
if(year_counter==2) |
1829 |
if(year_counter==2) |
1830 |
music = Mix_LoadMUS( "snd/boss_1.ogg" ); |
1830 |
music = Mix_LoadMUS( "/usr/share/games/laadun/snd/boss_1.ogg" ); |
1831 |
if(year_counter==3) |
1831 |
if(year_counter==3) |
1832 |
music = Mix_LoadMUS( "snd/boss_1.ogg" ); |
1832 |
music = Mix_LoadMUS( "/usr/share/games/laadun/snd/boss_1.ogg" ); |
1833 |
if(year_counter==4) |
1833 |
if(year_counter==4) |
1834 |
music = Mix_LoadMUS( "snd/boss_1.ogg" ); |
1834 |
music = Mix_LoadMUS( "/usr/share/games/laadun/snd/boss_1.ogg" ); |
1835 |
} |
1835 |
} |
1836 |
if(boss_approaching_counter==1) |
1836 |
if(boss_approaching_counter==1) |
1837 |
{ |
1837 |
{ |
Lines 1952-1966
Link Here
|
1952 |
time_left+=365; |
1952 |
time_left+=365; |
1953 |
} |
1953 |
} |
1954 |
if(year_counter==1) |
1954 |
if(year_counter==1) |
1955 |
music = Mix_LoadMUS( "snd/level_1.ogg" ); |
1955 |
music = Mix_LoadMUS( "/usr/share/games/laadun/snd/level_1.ogg" ); |
1956 |
else if(year_counter==2) |
1956 |
else if(year_counter==2) |
1957 |
music = Mix_LoadMUS( "snd/level_2.ogg" ); |
1957 |
music = Mix_LoadMUS( "/usr/share/games/laadun/snd/level_2.ogg" ); |
1958 |
else if(year_counter==3) |
1958 |
else if(year_counter==3) |
1959 |
music = Mix_LoadMUS( "snd/level_3.ogg" ); |
1959 |
music = Mix_LoadMUS( "/usr/share/games/laadun/snd/level_3.ogg" ); |
1960 |
else if(year_counter==4) |
1960 |
else if(year_counter==4) |
1961 |
music = Mix_LoadMUS( "snd/level_4.ogg" ); |
1961 |
music = Mix_LoadMUS( "/usr/share/games/laadun/snd/level_4.ogg" ); |
1962 |
else if(year_counter==5) |
1962 |
else if(year_counter==5) |
1963 |
music = Mix_LoadMUS( "snd/final.ogg" ); |
1963 |
music = Mix_LoadMUS( "/usr/share/games/laadun/snd/final.ogg" ); |
1964 |
} |
1964 |
} |
1965 |
|
1965 |
|
1966 |
if(entering_level==120) |
1966 |
if(entering_level==120) |
Lines 2239-2245
Link Here
|
2239 |
} |
2239 |
} |
2240 |
Mix_HaltMusic(); |
2240 |
Mix_HaltMusic(); |
2241 |
Mix_FreeMusic(music); |
2241 |
Mix_FreeMusic(music); |
2242 |
music = Mix_LoadMUS( "snd/ending.ogg" ); |
2242 |
music = Mix_LoadMUS( "/usr/share/games/laadun/snd/ending.ogg" ); |
2243 |
if( Mix_PlayingMusic() == 0 ) |
2243 |
if( Mix_PlayingMusic() == 0 ) |
2244 |
{ |
2244 |
{ |
2245 |
Mix_PlayMusic( music, -1 ); |
2245 |
Mix_PlayMusic( music, -1 ); |
Lines 2261-2270
Link Here
|
2261 |
score = "[ "+scorepadding+score+" ]"; |
2261 |
score = "[ "+scorepadding+score+" ]"; |
2262 |
string playername = ""; |
2262 |
string playername = ""; |
2263 |
playername = (StudentNameField->GetValue()).mb_str(wxConvUTF8); |
2263 |
playername = (StudentNameField->GetValue()).mb_str(wxConvUTF8); |
2264 |
GLuint ending_texture1 = load_texture("gfx/ending1.png", texture_filtering_option); |
2264 |
GLuint ending_texture1 = load_texture("/usr/share/games/laadun/gfx/ending1.png", texture_filtering_option); |
2265 |
GLuint ending_texture2 = load_texture("gfx/ending2.png", texture_filtering_option); |
2265 |
GLuint ending_texture2 = load_texture("/usr/share/games/laadun/gfx/ending2.png", texture_filtering_option); |
2266 |
GLuint ending_texture3 = load_texture("gfx/ending3.png", texture_filtering_option); |
2266 |
GLuint ending_texture3 = load_texture("/usr/share/games/laadun/gfx/ending3.png", texture_filtering_option); |
2267 |
GLuint ending_texture4 = load_texture("gfx/ending4.png", texture_filtering_option); |
2267 |
GLuint ending_texture4 = load_texture("/usr/share/games/laadun/gfx/ending4.png", texture_filtering_option); |
2268 |
|
2268 |
|
2269 |
for(float jep=0;jep<1800;jep+=0.4) |
2269 |
for(float jep=0;jep<1800;jep+=0.4) |
2270 |
{ |
2270 |
{ |
Lines 2617-2623
Link Here
|
2617 |
int texture_filtering_option = 2; |
2617 |
int texture_filtering_option = 2; |
2618 |
texture_filtering_option = mipmapping_RadioBox->GetSelection(); |
2618 |
texture_filtering_option = mipmapping_RadioBox->GetSelection(); |
2619 |
// glDisable(GL_FOG); |
2619 |
// glDisable(GL_FOG); |
2620 |
music = Mix_LoadMUS( "snd/menumusic.ogg" ); |
2620 |
music = Mix_LoadMUS( "/usr/share/games/laadun/snd/menumusic.ogg" ); |
2621 |
Timer fps; |
2621 |
Timer fps; |
2622 |
Timer fraps; |
2622 |
Timer fraps; |
2623 |
Timer updates; |
2623 |
Timer updates; |
Lines 2652-2661
Link Here
|
2652 |
gluPerspective(45.0f,(GLfloat)res_x/(GLfloat)res_y,0.1f,100.0f); |
2652 |
gluPerspective(45.0f,(GLfloat)res_x/(GLfloat)res_y,0.1f,100.0f); |
2653 |
glMatrixMode(GL_MODELVIEW); |
2653 |
glMatrixMode(GL_MODELVIEW); |
2654 |
|
2654 |
|
2655 |
GLuint stadia_textur=load_texture("gfx/stadialogo.png", texture_filtering_option); |
2655 |
GLuint stadia_textur=load_texture("/usr/share/games/laadun/gfx/stadialogo.png", texture_filtering_option); |
2656 |
GLuint StartQuitTexture=load_texture("gfx/quitstart.png", texture_filtering_option); |
2656 |
GLuint StartQuitTexture=load_texture("/usr/share/games/laadun/gfx/quitstart.png", texture_filtering_option); |
2657 |
GLuint ArrowTexture=load_texture("gfx/arrow.png", texture_filtering_option); |
2657 |
GLuint ArrowTexture=load_texture("/usr/share/games/laadun/gfx/arrow.png", texture_filtering_option); |
2658 |
GLuint mfont_texture=load_texture("gfx/loosefont.png", texture_filtering_option); |
2658 |
GLuint mfont_texture=load_texture("/usr/share/games/laadun/gfx/loosefont.png", texture_filtering_option); |
2659 |
Font font; |
2659 |
Font font; |
2660 |
font.BuildFont(mfont_texture, 24, res_x, res_y); |
2660 |
font.BuildFont(mfont_texture, 24, res_x, res_y); |
2661 |
float modifier=0; |
2661 |
float modifier=0; |
Lines 2676-2682
Link Here
|
2676 |
//loading an "empty" texture, a silly workaround to getting a buffer |
2676 |
//loading an "empty" texture, a silly workaround to getting a buffer |
2677 |
//texture for the transition |
2677 |
//texture for the transition |
2678 |
//really, really should not be done like this ;3 |
2678 |
//really, really should not be done like this ;3 |
2679 |
GLuint TransitionTexture=load_texture("gfx/empty.png", 1); |
2679 |
GLuint TransitionTexture=load_texture("/usr/share/games/laadun/gfx/empty.png", 1); |
2680 |
//entering the actual loop |
2680 |
//entering the actual loop |
2681 |
for(modifier = 0; modifier<3.0f;) |
2681 |
for(modifier = 0; modifier<3.0f;) |
2682 |
{ |
2682 |
{ |
Lines 3039-3045
Link Here
|
3039 |
int texture_filtering_option = 2; |
3039 |
int texture_filtering_option = 2; |
3040 |
texture_filtering_option = mipmapping_RadioBox->GetSelection(); |
3040 |
texture_filtering_option = mipmapping_RadioBox->GetSelection(); |
3041 |
// glDisable(GL_FOG); |
3041 |
// glDisable(GL_FOG); |
3042 |
music = Mix_LoadMUS( "snd/menumusic.ogg" ); |
3042 |
music = Mix_LoadMUS( "/usr/share/games/laadun/snd/menumusic.ogg" ); |
3043 |
Timer fps; |
3043 |
Timer fps; |
3044 |
Timer fraps; |
3044 |
Timer fraps; |
3045 |
Timer updates; |
3045 |
Timer updates; |
Lines 3074-3083
Link Here
|
3074 |
gluPerspective(45.0f,(GLfloat)res_x/(GLfloat)res_y,0.1f,100.0f); |
3074 |
gluPerspective(45.0f,(GLfloat)res_x/(GLfloat)res_y,0.1f,100.0f); |
3075 |
glMatrixMode(GL_MODELVIEW); |
3075 |
glMatrixMode(GL_MODELVIEW); |
3076 |
|
3076 |
|
3077 |
GLuint stadia_textur=load_texture("gfx/stadialogo.png", texture_filtering_option); |
3077 |
GLuint stadia_textur=load_texture("/usr/share/games/laadun/gfx/stadialogo.png", texture_filtering_option); |
3078 |
GLuint StartQuitTexture=load_texture("gfx/quitstart.png", texture_filtering_option); |
3078 |
GLuint StartQuitTexture=load_texture("/usr/share/games/laadun/gfx/quitstart.png", texture_filtering_option); |
3079 |
GLuint ArrowTexture=load_texture("gfx/arrow.png", texture_filtering_option); |
3079 |
GLuint ArrowTexture=load_texture("/usr/share/games/laadun/gfx/arrow.png", texture_filtering_option); |
3080 |
GLuint mfont_texture=load_texture("gfx/loosefont.png", texture_filtering_option); |
3080 |
GLuint mfont_texture=load_texture("/usr/share/games/laadun/gfx/loosefont.png", texture_filtering_option); |
3081 |
Font font; |
3081 |
Font font; |
3082 |
font.BuildFont(mfont_texture, 24, res_x, res_y); |
3082 |
font.BuildFont(mfont_texture, 24, res_x, res_y); |
3083 |
float modifier=0; |
3083 |
float modifier=0; |