|
1
|
function scr_mouse_tile_rotation_stepscr_mouse_tile_rotation_step
function scr_mouse_tile_rotation_step()
{
if (__init == 0)
{
x += __positionx[__currentposition];
__movedx += __positionx[__currentposition];
y += __positiony[__currentposition];
__movedy += __positiony[__currentposition];
__nextposition = __currentposition;
__init = 1;
}
if (__con == 0)
{
if (__move != 0)
{
__nextposition = __currentposition + __move;
if (__nextposition < 0)
__nextposition = __positionmax;
if (__nextposition > __positionmax)
__nextposition = 0;
}
if (__nextposition != __currentposition)
{
__curmovedx = __movedx;
__curmovedy = __movedy;
__nextmovedx = __positionx[__nextposition];
__nextmovedy = __positiony[__nextposition];
__movetimer = 0;
__con = 1;
}
}
if (__con == 1)
{
__movetimer++;
x += ((__nextmovedx - __movedx) / __positionframes);
y += ((__nextmovedy - __movedy) / __positionframes);
if (__movetimer >= __positionframes)
{
__movetimer = 0;
__con = 0;
__movedx = __positionx[__nextposition];
__movedy = __positiony[__nextposition];
__currentposition = __nextposition;
}
}
} ()
|
|
2
|
{
|
|
3
|
if (__init == 0)
|
|
4
|
{
|
|
5
|
x += __positionx[__currentposition];
|
|
6
|
__movedx += __positionx[__currentposition];
|
|
7
|
y += __positiony[__currentposition];
|
|
8
|
__movedy += __positiony[__currentposition];
|
|
9
|
__nextposition = __currentposition;
|
|
10
|
__init = 1;
|
|
11
|
}
|
|
12
|
if (__con == 0)
|
|
13
|
{
|
|
14
|
if (__move != 0)
|
|
15
|
{
|
|
16
|
__nextposition = __currentposition + __move;
|
|
17
|
if (__nextposition < 0)
|
|
18
|
__nextposition = __positionmax;
|
|
19
|
if (__nextposition > __positionmax)
|
|
20
|
__nextposition = 0;
|
|
21
|
}
|
|
22
|
if (__nextposition != __currentposition)
|
|
23
|
{
|
|
24
|
__curmovedx = __movedx;
|
|
25
|
__curmovedy = __movedy;
|
|
26
|
__nextmovedx = __positionx[__nextposition];
|
|
27
|
__nextmovedy = __positiony[__nextposition];
|
|
28
|
__movetimer = 0;
|
|
29
|
__con = 1;
|
|
30
|
}
|
|
31
|
}
|
|
32
|
if (__con == 1)
|
|
33
|
{
|
|
34
|
__movetimer++;
|
|
35
|
x += ((__nextmovedx - __movedx) / __positionframes);
|
|
36
|
y += ((__nextmovedy - __movedy) / __positionframes);
|
|
37
|
if (__movetimer >= __positionframes)
|
|
38
|
{
|
|
39
|
__movetimer = 0;
|
|
40
|
__con = 0;
|
|
41
|
__movedx = __positionx[__nextposition];
|
|
42
|
__movedy = __positiony[__nextposition];
|
|
43
|
__currentposition = __nextposition;
|
|
44
|
}
|
|
45
|
}
|
|
46
|
}
|