/programs/games/heliothryx/game/rs/rsplatform_kos.c |
---|
250,7 → 250,7 |
}; |
kol_sleep(wait_time); |
if (draw_dt > 10) { |
if (draw_dt > 19) { |
low_performance_counter++; |
} |
else { |
/programs/games/heliothryx/game/rsgame.c |
---|
204,7 → 204,7 |
void soundbuf_sin(rs_soundbuf_t *snd, float freq) { |
int i; |
int amp = 29000; |
int amp = 19000; |
for (i = 0; i < snd->length_samples; i++) { |
snd->data[i] = ( 1.0 - 1.0*i/snd->length_samples ) * sin(freq*i) * amp; |
}; |
213,7 → 213,7 |
void soundbuf_sin_fade(rs_soundbuf_t *snd, float freq) { |
int i; |
int amp = 29000; |
int amp = 19000; |
for (i = 0; i < snd->length_samples; i++) { |
snd->data[i] = ( 1.0 - 1.0*i/snd->length_samples ) * sin( ( (1.0 - 0.48*i/snd->length_samples) * freq ) *i) * amp; |
}; |
517,10 → 517,33 |
rs_audio_init(RS_AUDIO_FMT_MONO16, RS_AUDIO_FREQ_16000, 2); |
#endif |
soundbuf_init(&game.sound_test1, 2048); |
soundbuf_init(&game.sound_test1, 1536); |
// soundbuf_fill(&game.sound_test1, 2, 50); |
soundbuf_sin_fade(&game.sound_test1, 0.7); |
// soundbuf_sin_fade(&game.sound_test1, 0.7); |
rs_sgen_init(2, game.sound_test1.length_samples); |
rs_sgen_func_pm(1, 2900.0, 1.70, 65.0, 17.0, 1.0); |
rs_sgen_func_normalize(1, 0.6); |
// rs_sgen_func_lowpass(0, 1, 1.0, 0.0, 4.0); |
rs_sgen_func_highpass(0, 1, 1.0, 0.0, 3.0); |
rs_sgen_wave_out(0); |
memcpy(game.sound_test1.data, (unsigned char*) rs_sgen_reg.wave_out, game.sound_test1.length_samples*2 ); |
rs_sgen_term(); |
soundbuf_update(&game.sound_test1); |
soundbuf_init(&game.sound_test2, 1024); |
//soundbuf_fill(&game.sound_test2, 8, 40); |
soundbuf_sin(&game.sound_test2, 0.48); |
549,7 → 572,7 |
rs_sgen_func_normalize(0, 1.0); |
rs_sgen_func_lowpass(2, 0, 0.6, 0.0, 20.0); |
rs_sgen_func_normalize(2, 0.7); |
rs_sgen_func_normalize(2, 0.5); |
rs_sgen_wave_out(2); |
571,7 → 594,7 |
rs_sgen_func_normalize(0, 1.0); |
rs_sgen_func_highpass(2, 0, 1.0, 0.3, 20.0); |
rs_sgen_func_normalize(2, 0.6); |
rs_sgen_func_normalize(2, 0.5); |
rs_sgen_wave_out(2); |
722,16 → 745,17 |
// soundbuf_play( &game.sound_music, SND_MODE_LOOP ); |
// break; |
// #ifdef RS_LINUX |
// |
// case RS_KEY_Z: |
// soundbuf_play( &game.sound_music2, 0 ); |
// break; |
// |
// #endif |
#ifdef RS_LINUX |
case RS_KEY_Z: |
soundbuf_stop( &game.sound_music ); |
soundbuf_play( &game.sound_music2, 0 ); |
break; |
#endif |
}; |
771,7 → 795,13 |
menu_cursor_click(); |
break; |
case RS_KEY_ESCAPE: |
if (game.menu_index != MENU_PAUSE) { |
menu_open(0); |
} |
else { |
game.status = STATUS_PLAYING; |
return; |
}; |
break; |
}; |
782,7 → 812,7 |
case RS_KEY_ESCAPE: |
game.status = STATUS_MENU; |
menu_open(0); |
menu_open(MENU_PAUSE); |
break; |
case RS_KEY_SPACE: |
/programs/games/heliothryx/game/rsgamelogic.c |
---|
95,7 → 95,6 |
if (game.health < 1) { |
game.status = STATUS_MENU; |
soundbuf_play( &game.sound_music, SND_MODE_LOOP ); |
menu_open( MENU_GAME_OVER ); |
}; |
276,7 → 275,6 |
else if (game.stage == 10) { |
game.status = STATUS_MENU; |
soundbuf_play( &game.sound_music, SND_MODE_LOOP ); |
menu_open( MENU_LEVEL_PASSED ); |
level_passed_score_str[1] = '0' + (game.score / 100) % 10; |
419,7 → 417,7 |
game_draw(); |
if (game.status == STATUS_MENU) { |
if ( (game.status == STATUS_MENU) && (game.menu_index != MENU_PAUSE) ) { |
soundbuf_loop_check( &game.sound_music ); |
}; |
/programs/games/heliothryx/game/rsgamemenu.c |
---|
10,7 → 10,7 |
/* a */ &menu_action_start, |
/* b */ &menu_action_exit, |
/* c */ &menu_action_change_window_scale, |
// /* d */ &menu_action_ |
/* d */ &menu_action_resume |
}; |
char window_scale_str[] = "c< 2X >"; |
67,6 → 67,13 |
0 |
}; |
char* menu_pause_titles[] = { |
" "L_PAUSE, |
" ", |
"d"L_RESUME, |
"0"L_EXIT_TO_MAIN_MENU, |
0 |
}; |
char **menu_titles[] = { |
75,6 → 82,7 |
/* 2 */ menu_about_titles, |
/* 3 */ menu_level_passed_titles, |
/* 4 */ menu_game_over_titles, |
/* 5 */ menu_pause_titles, |
0 |
}; |
105,6 → 113,10 |
void menu_open(int i) { |
if ( (game.menu_index == MENU_PAUSE) && (i != MENU_PAUSE) ){ |
soundbuf_play( &game.sound_music, SND_MODE_LOOP ); |
}; |
game.menu_index = i; |
game.menu_item_index = -1; |
176,3 → 188,9 |
void menu_action_change_window_scale() { |
game_change_window_scale(1); |
}; |
void menu_action_resume() { |
game.status = STATUS_PLAYING; |
}; |
/programs/games/heliothryx/game/rsgamemenu.h |
---|
5,7 → 5,7 |
#include "rs/rsplatform.h" |
#define MENUS_COUNT 5 |
#define MENUS_COUNT 6 |
#define MENU_MAIN 0 |
#define MENU_SETTINGS 1 |
12,6 → 12,7 |
#define MENU_ABOUT 2 |
#define MENU_LEVEL_PASSED 3 |
#define MENU_GAME_OVER 4 |
#define MENU_PAUSE 5 |
#define MENU_ITEM_WINDOW_SCALE 1 |
32,5 → 33,6 |
void menu_action_start(); |
void menu_action_exit(); |
void menu_action_change_window_scale(); |
void menu_action_resume(); |
#endif |
/programs/games/heliothryx/game/strings.h |
---|
2,7 → 2,7 |
#define RS_STRINGS_H |
#ifndef RS_KOS |
#include "strings_en.h" |
#include "strings_ru.h" |
#else |
//#include "../lang.h" |
/programs/games/heliothryx/game/strings_en.h |
---|
28,9 → 28,12 |
//#define L_TECHDEMO_LINE1 "THI5 I5 TECHDEM0` " |
#define L_TECHDEMO_LINE1 "U5E ARR0W5 T0 M0VE_ <A> T0 5H00T_ <E5C> T0 EXIT` " |
#define L_GAME_OVER "GAME 0VER" |
#define L_LEVEL_PASSED "DEM0=LEVEL PA55ED" |
#define L_YOUR_SCORE "Y0UR 5C0RE:" |
#define L_GAME_OVER "GAME 0VER" |
#define L_PAUSE "PAU5E" |
#define L_RESUME "RE5UME PLAYING" |
#define L_EXIT_TO_MAIN_MENU "EXIT T0 MAIN MENU" |
#endif |
/programs/games/heliothryx/game/strings_ru.h |
---|
32,4 → 32,8 |
#define L_YOUR_SCORE "04K0B HAbPAH0:" |
#define L_GAME_OVER "igPA 0K0H4EHA" |
#define L_PAUSE "nAY3A" |
#define L_RESUME "nP0d0ljiT]" |
#define L_EXIT_TO_MAIN_MENU "B\\^Ti B glABH0E MEHk" |
#endif |