expedite-cxx: Fix some bugs.
This commit is contained in:
parent
f097281c9d
commit
93c095a3fb
|
@ -56,7 +56,7 @@ static void _loop(double t, int f)
|
|||
{
|
||||
int a = f & 0x1f;
|
||||
a = ((a << 3) | (a >> 2)) & 0xff;
|
||||
images.back().color_set(a, a, a, a);
|
||||
(*images.back()).color_set(a, a, a, a);
|
||||
FPS_STD(NAME);
|
||||
}
|
||||
|
||||
|
|
|
@ -84,12 +84,12 @@ static void _loop(double t, int f)
|
|||
Evas_Coord ox1, oy1, ox2, oy2;
|
||||
Evas_Object *o;
|
||||
int i = 0;
|
||||
for (evas::image& img : images)
|
||||
for (evas::line& line : lines)
|
||||
{
|
||||
img.xy_get(&ox1, &oy1, &ox2, &oy2);
|
||||
line.xy_get(&ox1, &oy1, &ox2, &oy2);
|
||||
_rotate_point(&ox1, &oy1, i);
|
||||
_rotate_point(&ox2, &oy2, i);
|
||||
img.xy_set(ox1, oy1, ox2, oy2);
|
||||
line.xy_set(ox1, oy1, ox2, oy2);
|
||||
++i;
|
||||
}
|
||||
FPS_STD(NAME);
|
||||
|
|
|
@ -48,7 +48,8 @@ static void _cleanup()
|
|||
/* loop - do things */
|
||||
static void _loop(double t, int f)
|
||||
{
|
||||
for (evas::image& img : images)
|
||||
int i = 0;
|
||||
for (evas::rectangle& rec : rectangles)
|
||||
{
|
||||
Evas_Coord w0 = 80;
|
||||
Evas_Coord h0 = 80;
|
||||
|
@ -59,8 +60,9 @@ static void _loop(double t, int f)
|
|||
Evas_Coord y = (win_h / 2) - (h / 2);
|
||||
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
|
||||
|
||||
img.evas::object::position_set(x, y);
|
||||
img.evas::object::size_set(w, h);
|
||||
rec.evas::object::position_set(x, y);
|
||||
rec.evas::object::size_set(w, h);
|
||||
++i;
|
||||
}
|
||||
FPS_STD(NAME);
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@ static void _cleanup(void)
|
|||
static void _loop(double t, int f)
|
||||
{
|
||||
int i = 0;
|
||||
for (evas::image& img : images)
|
||||
for (evas::rectangle& rec : rectangles)
|
||||
{
|
||||
Evas_Coord w0 = 80;
|
||||
Evas_Coord h0 = 80;
|
||||
|
@ -60,8 +60,8 @@ static void _loop(double t, int f)
|
|||
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
|
||||
Evas_Coord y = (win_h / 2) - (h / 2);
|
||||
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
|
||||
img.evas::object::position_set(x, y);
|
||||
img.evas::object::size_set(w, h);
|
||||
rec.evas::object::position_set(x, y);
|
||||
rec.evas::object::size_set(w, h);
|
||||
++i;
|
||||
}
|
||||
FPS_STD(NAME);
|
||||
|
|
Loading…
Reference in New Issue