mirror of
https://github.com/ondra-novak/gates_of_skeldal.git
synced 2025-07-22 15:14:49 -04:00
walking and turning effect
This commit is contained in:
parent
3b903e2b52
commit
4f9f985918
12 changed files with 286 additions and 98 deletions
|
@ -373,7 +373,7 @@ void load_enemies(short *data,int size,int *grptr,TMOB *template,int32_t tsize)
|
|||
{
|
||||
mobs[i]=b[j];
|
||||
if (~mobs[i].vlajky & MOB_MOBILE) mob_map[data[0]]=i+MOB_START;
|
||||
if (mobs[i].palette>=0)mobs[i].palette=rnd(mobs[i].palette);else mobs[i].palette=abs(mobs[i].palette);
|
||||
if (mobs[i].palette>0)mobs[i].palette=rnd(mobs[i].palette);else mobs[i].palette=abs(mobs[i].palette);
|
||||
mobs[i].sector=data[0];
|
||||
mobs[i].dir=(data[1]>>14)&0x3;
|
||||
mobs[i].home_pos=data[0];
|
||||
|
|
|
@ -456,7 +456,7 @@ static void zooming_forward_backward(word *background,char back)
|
|||
{
|
||||
int32_t tmp=get_timer_value();
|
||||
void *buffer=DxPrepareWalk(SCREEN_OFFLINE);
|
||||
int tpoints[4]={90,31,90+460,31+259};
|
||||
int tpoints[4]={90,31,90+460,31+270};
|
||||
|
||||
int maxtime=5*zoom_speed(-1);
|
||||
int curtime;
|
||||
|
@ -467,7 +467,7 @@ static void zooming_forward_backward(word *background,char back)
|
|||
curtime=get_timer_value()-tmp;
|
||||
phase=(curtime)*(1.0f/(float)maxtime);
|
||||
//phase=(float)sin(3.14159265*0.5f*phase);
|
||||
if (back) phase=1.0-phase;
|
||||
if (back) phase=-phase;
|
||||
DxZoomWalk(buffer, SCREEN_OFFLINE, tpoints,phase, NULL);
|
||||
do_events();
|
||||
}
|
||||
|
@ -532,7 +532,7 @@ static void turn_left_right(char right)
|
|||
curtime=get_timer_value()-tmp;
|
||||
phase=(curtime)*(1.0f/(float)maxtime);
|
||||
//phase=(float)sin(3.14159265*0.5f*phase);
|
||||
DxTurn(buffer,right,SCREEN_OFFLINE,90,phase,NULL);
|
||||
DxTurn(buffer,SCREEN_OFFLINE,90,right?-phase:phase,NULL);
|
||||
do_events();
|
||||
}
|
||||
while (curtime<maxtime);
|
||||
|
|
|
@ -2393,6 +2393,7 @@ static void shop_mouse_event(EVENT_MSG *msg,void **unused)
|
|||
int x,y;
|
||||
char cc=1;
|
||||
static int last_pos=-1;
|
||||
EVENT_MSG msgc = clone_message(msg);
|
||||
|
||||
ms=get_mouse(msg);
|
||||
x=ms->x-(BUYBOX_X+SHP_ICPLCX);
|
||||
|
@ -2422,10 +2423,12 @@ static void shop_mouse_event(EVENT_MSG *msg,void **unused)
|
|||
}
|
||||
if (cc)
|
||||
{
|
||||
inv_item_info_box(msg,unused);
|
||||
inv_item_info_box(&msgc,unused);
|
||||
last_pos=-1;
|
||||
}
|
||||
destroy_message(&msgc);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
static __inline void copy_data(char **src, void *target, int size) {
|
||||
|
|
|
@ -1600,6 +1600,7 @@ void step_zoom(char smer)
|
|||
anim_sipky(0,255);
|
||||
hide_ms_at(385);
|
||||
ukaz_mysku();
|
||||
redraw_ms_cursor_on_screen();
|
||||
if (set_halucination) do_halucinace();
|
||||
if (loadlevel.name[0])
|
||||
{
|
||||
|
@ -1624,17 +1625,12 @@ void step_zoom(char smer)
|
|||
if (!cancel_pass)
|
||||
{
|
||||
render_scene(viewsector,viewdir);
|
||||
if (smer==2)
|
||||
{
|
||||
OutBuffer2nd();
|
||||
if (!nopass) shift_zoom(smer);
|
||||
}
|
||||
else
|
||||
{
|
||||
shift_zoom(smer);
|
||||
OutBuffer2nd();
|
||||
if (nopass) shift_zoom(smer+2);
|
||||
}
|
||||
OutBuffer2nd();
|
||||
sort_groups();
|
||||
bott_draw(0);
|
||||
other_draw();
|
||||
shift_zoom(smer);
|
||||
if (smer==0 && nopass) shift_zoom(smer+2);
|
||||
if (battle || (game_extras & EX_ALWAYS_MINIMAP)) draw_medium_map();
|
||||
sort_groups();
|
||||
bott_draw(0);
|
||||
|
@ -1672,6 +1668,9 @@ void turn_zoom(int smer)
|
|||
viewdir=(viewdir+smer)&3;
|
||||
render_scene(viewsector,viewdir);
|
||||
hide_ms_at(387);
|
||||
OutBuffer2nd();
|
||||
other_draw();
|
||||
bott_draw(0);
|
||||
if (smer==1)
|
||||
{
|
||||
anim_sipky(H_SIPKY_SV,1);
|
||||
|
@ -1685,9 +1684,7 @@ void turn_zoom(int smer)
|
|||
turn_right();
|
||||
}
|
||||
chod_s_postavama(0);
|
||||
OutBuffer2nd();
|
||||
if (battle || (game_extras & EX_ALWAYS_MINIMAP)) draw_medium_map();
|
||||
other_draw();
|
||||
update_mysky();
|
||||
ukaz_mysku();
|
||||
showview(0,0,0,0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue