mirror of
https://github.com/ondra-novak/gates_of_skeldal.git
synced 2025-07-04 13:46:58 -04:00
options->speed up battles, game speed, #1 fix volume
This commit is contained in:
parent
3cc7c14064
commit
54247b5720
8 changed files with 42 additions and 17 deletions
|
@ -327,14 +327,14 @@ static const void *bott_draw_normal(const void *pp, int32_t *s)
|
|||
{
|
||||
char c[]=" ";int z,lv,llv;
|
||||
put_picture(x,0,ablock(H_OKNO));lv=p->lives;llv=p->vlastnosti[VLS_MAXHIT];
|
||||
if (lv || p->used & 0x80 || p->kondice > 0)
|
||||
if (lv || p->used & 0x80)
|
||||
{
|
||||
z=3-((lv-1)*4/llv);if (lv==llv) z=0;
|
||||
z*=75;
|
||||
if (p->xicht>=0)put_8bit_clipped(ablock(H_XICHTY+i),bott_scr+PIC_X+x+PIC_Y*scr_linelen2,z,54,75);
|
||||
if (!lv && !(p->used & 0x80) && p->kondice>0) {
|
||||
/* if (!lv && !(p->used & 0x80) && p->kondice>0) {
|
||||
greyscale_rectangle(PIC_X+x,PIC_Y, 54, 75);
|
||||
}
|
||||
}*/
|
||||
if (p->bonus) draw_small_icone(0,PIC_X+x+1,PIC_Y+1);
|
||||
if (p->spell) draw_small_icone(1,PIC_X+x+1,PIC_Y+1);
|
||||
if (!p->voda) draw_small_icone(2,PIC_X+x+1,PIC_Y+1);
|
||||
|
|
|
@ -30,6 +30,9 @@
|
|||
#define SLOTS_MAX 10
|
||||
|
||||
#define GM_MAPENABLE 0x1
|
||||
#define GM_FASTBATTLES 0x2
|
||||
#define GM_GAMESPEED_SHIFT 2
|
||||
#define GM_GAMESPEED_MASK 0x1F
|
||||
|
||||
#define SAVE_SLOT_S 34
|
||||
#define LOAD_SLOT_S (372+34)
|
||||
|
@ -618,7 +621,14 @@ int save_basic_info()
|
|||
s.swapchans=MIN(get_snd_effect(SND_SWAP),255);
|
||||
s.out_filter=MIN(get_snd_effect(SND_OUTFILTER),255);
|
||||
s.autosave=autosave_enabled;
|
||||
s.game_flags=(enable_glmap!=0);
|
||||
s.game_flags=0;
|
||||
|
||||
if (enable_glmap!=0) s.game_flags |= GM_MAPENABLE;
|
||||
if (gamespeedbattle<gamespeed) s.game_flags |= GM_FASTBATTLES;
|
||||
if (timerspeed_val <= GM_GAMESPEED_MASK) {
|
||||
s.game_flags |= (timerspeed_val & GM_GAMESPEED_MASK) << GM_GAMESPEED_SHIFT;
|
||||
}
|
||||
|
||||
strcopy_n(s.level_name,level_fname,sizeof(s.level_name));
|
||||
for(i=0;i<5;i++) s.runes[i]=runes[i];
|
||||
if (picked_item!=NULL)
|
||||
|
@ -654,6 +664,9 @@ int load_basic_info()
|
|||
if (f==NULL) return 1;
|
||||
res|=(temp_storage_read(&s,1*sizeof(s),f)!=sizeof(s));
|
||||
if (s.game_flags & GM_MAPENABLE) enable_glmap=1;else enable_glmap=0;
|
||||
gamespeedbattle =s.game_flags & GM_FASTBATTLES? GAMESPEED_FASTBATTLE:gamespeed;
|
||||
int tmsp = (s.game_flags >> GM_GAMESPEED_SHIFT) & GM_GAMESPEED_MASK;
|
||||
if (tmsp) timerspeed_val = tmsp;
|
||||
i=s.picks;
|
||||
if (picked_item!=NULL) free(picked_item);
|
||||
if (i)
|
||||
|
|
|
@ -12,6 +12,10 @@
|
|||
#define POCET_POSTAV 6
|
||||
#define HODINA 360
|
||||
|
||||
#define GAMESPEED 5
|
||||
#define GAMESPEED_FASTBATTLE 2
|
||||
|
||||
|
||||
#define MAX_FILESYSTEM_PATH 256
|
||||
|
||||
#define A_SIDEMAP 0x8001
|
||||
|
@ -581,8 +585,8 @@ extern word minimap[VIEW3D_Z+1][VIEW3D_X*2+1]; //minimalizovana mapa s informace
|
|||
extern char norefresh; //vypina refresh obrazovky
|
||||
extern char cancel_pass; //okamzite zrusi plynuly prechod
|
||||
extern char reverse_draw ; //kresba odpredu dozadu
|
||||
extern char gamespeed; //rychlost hry
|
||||
extern char gamespeedbattle; //akcelerace rychlosti pro bitvy
|
||||
extern uint8_t gamespeed; //rychlost hry
|
||||
extern uint8_t gamespeedbattle; //akcelerace rychlosti pro bitvy
|
||||
extern int num_ofsets[]; //tabulka offsetu pro steny
|
||||
extern int back_color; //cislo barvy pozadi
|
||||
extern uint8_t cur_group; //cislo aktualni skupiny
|
||||
|
|
10
game/setup.c
10
game/setup.c
|
@ -44,7 +44,7 @@ static void checkbox_animator(THE_TIMER *t)
|
|||
animate_checkbox(10,130,10);
|
||||
}
|
||||
|
||||
static int effects[]={SND_GVOLUME,SND_MUSIC,SND_GFX,SND_TREBL,SND_BASS,SND_XBASS};
|
||||
static int effects[]={SND_GVOLUME,SND_MUSIC,SND_GFX,SND_TREBL,SND_BASS};
|
||||
|
||||
static void do_setup_change(void)
|
||||
{
|
||||
|
@ -55,6 +55,7 @@ static void do_setup_change(void)
|
|||
{
|
||||
case 10:set_snd_effect(SND_SWAP,c & 1);break;
|
||||
case 20:set_snd_effect(SND_OUTFILTER,c & 1);break;
|
||||
case 250:timerspeed_val = TIMERSPEED- c;break;
|
||||
default:set_snd_effect(effects[o_aktual->id/10-20],c);break;
|
||||
}
|
||||
}
|
||||
|
@ -111,7 +112,7 @@ static void unwire_setup(void)
|
|||
enable_sort=f_get_value(0,100) & 1;
|
||||
autoattack=f_get_value(0,110) & 1;
|
||||
autosave_enabled=f_get_value(0,120) & 1;
|
||||
level_preload=f_get_value(0,130) & 1;
|
||||
gamespeedbattle=(f_get_value(0,130) & 1)?GAMESPEED_FASTBATTLE:gamespeed;
|
||||
delete_from_timer(TM_CHECKBOX);
|
||||
mix_back_sound(32768);
|
||||
close_current();
|
||||
|
@ -188,7 +189,7 @@ void new_setup()
|
|||
case 1:c_default(enable_sort);break;
|
||||
case 2:c_default(autoattack);break;
|
||||
case 3:c_default(autosave_enabled);break;
|
||||
case 4:c_default(level_preload);break;
|
||||
case 4:c_default(gamespeedbattle < gamespeed);break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -201,6 +202,9 @@ void new_setup()
|
|||
define(200+i*10,50+i*60,30,30,200,0,skeldal_soupak,effects[i]==SND_MUSIC?127:255);c_default(get_snd_effect(effects[i]));
|
||||
on_control_change(do_setup_change);
|
||||
}
|
||||
define(200+5*10,50+5*60,30,30,200,0,skeldal_soupak,TIMERSPEED-1);c_default(timerspeed_val >TIMERSPEED?0:TIMERSPEED - timerspeed_val);
|
||||
on_control_change(do_setup_change);
|
||||
|
||||
define(300,559,336,81,21,0,setup_ok_button,texty[174]);on_control_change(exit_setup_action);
|
||||
property(NULL,ablock(H_FTINY),&color_topbar,0);
|
||||
redraw_window();
|
||||
|
|
|
@ -75,12 +75,13 @@ typedef struct inis
|
|||
THE_TIMER timer_tree;
|
||||
|
||||
|
||||
|
||||
int hl_ptr=H_FIRST_FREE;
|
||||
int debug_enabled=0;
|
||||
char sound_detection=1;
|
||||
int snd_devnum,snd_parm1,snd_parm2,snd_parm3,snd_mixing=22000;
|
||||
char gamespeed=5;
|
||||
char gamespeedbattle=0;
|
||||
uint8_t gamespeed=GAMESPEED;
|
||||
uint8_t gamespeedbattle=GAMESPEED;
|
||||
char level_preload=1;
|
||||
char *level_fname=NULL;
|
||||
int game_extras=0;
|
||||
|
@ -823,6 +824,8 @@ void cti_texty(void)
|
|||
//patch stringtable
|
||||
if (!texty[98]) str_replace(&texty,98,"Ulo\x91it hru jako");
|
||||
if (!texty[99]) str_replace(&texty,99,"CRT Filter (>720p)");
|
||||
str_replace(&texty, 144, "Zrychlit souboje");
|
||||
str_replace(&texty, 51, "Celkov\x88 Hudba Efekty V\x98\xA8ky Basy Rychlost");
|
||||
str_replace(&texty,0,"Byl nalezen p\xA9ipojen\x98 ovlada\x87\nPro aktivaci ovlada\x87""e stiskn\x88te kter\x82koliv tla\x87\xA1tko na ovlada\x87i");
|
||||
lang_patch_stringtable(&texty, "ui.csv", "");
|
||||
}
|
||||
|
|
|
@ -879,7 +879,7 @@ char JePozdrzeno()
|
|||
|
||||
void pozdrz_akci()
|
||||
{
|
||||
int battlespeed=gamespeed-gamespeed*gamespeedbattle/5;
|
||||
int battlespeed=gamespeedbattle;
|
||||
SPozdrzeno=get_game_tick_count()+battlespeed*2000/6;
|
||||
}
|
||||
|
||||
|
@ -1146,7 +1146,7 @@ static void pouzij_svitek(THUMAN *p,int ruka)
|
|||
static void play_weapon_anim(int anim_num,int hitpos)
|
||||
{
|
||||
char count_save=global_anim_counter;
|
||||
int battlespeed=gamespeed-gamespeed*gamespeedbattle/5;
|
||||
int battlespeed=gamespeedbattle;
|
||||
|
||||
if (anim_num==0) return;
|
||||
hold_timer(TM_SCENE,1);
|
||||
|
@ -1453,7 +1453,7 @@ void jadro_souboje(EVENT_MSG *msg,void **unused) //!!!! Jadro souboje
|
|||
|
||||
void wire_jadro_souboje(void)
|
||||
{
|
||||
int battlespeed=gamespeed-gamespeed*gamespeedbattle/5;
|
||||
int battlespeed=gamespeedbattle;
|
||||
recalc_volumes(viewsector,viewdir);
|
||||
if (battlespeed<1) battlespeed=1;
|
||||
add_to_timer(TM_SCENE,battlespeed,-1,hrat_souboj);
|
||||
|
|
|
@ -45,7 +45,7 @@ To activate the controller, press any button on the controller"
|
|||
48,Start
|
||||
49,Throw
|
||||
50,Combat in Progress
|
||||
51,Overall Music Sounds Treble Bass
|
||||
51,Overall Music Sounds Treble Bass Speed
|
||||
52,Stereo Settings (Ultrasound)
|
||||
53,Swap Sides
|
||||
54,Output Filter (SBPro)
|
||||
|
@ -117,7 +117,7 @@ To activate the controller, press any button on the controller"
|
|||
141,Rearrange Portraits
|
||||
142,Auto Attack
|
||||
143,Auto Save
|
||||
144,Load All Into Memory
|
||||
144,Speed up battles
|
||||
145,Adventure Length:
|
||||
146,%d day and
|
||||
147,%d days and
|
||||
|
|
|
|
@ -299,7 +299,8 @@ static void update_music_volume(){
|
|||
float v = music_volume * master_volume;
|
||||
for (int i = 0; i <2; i++)
|
||||
sound_mixer.visit_track(music_track_id_base+i,[&](WaveMixer<2> &m){
|
||||
m.set_channel_volume(v, v);
|
||||
m.set_channel_volume(0, v);
|
||||
m.set_channel_volume(1, v);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue