Use C++ style loops.

This commit is contained in:
Savio Sena 2014-10-02 17:34:55 -03:00
parent 08f95c4bfe
commit f097281c9d
55 changed files with 258 additions and 223 deletions

View File

@ -33,7 +33,7 @@ static void _setup(void)
int n = rnd() % 100;
int w = 3 + ((n * (60 - 3)) / 100);
int h = 4 + ((n * (80 - 4)) / 100);
o.file_set(build_path("logo.png"), NULL);
o.file_set(build_path("logo.png"), "");
o.smooth_scale_set(1);
o.evas::object::size_set(w, h);
o.fill_set(0, 0, w, h);

View File

@ -46,8 +46,8 @@ static void _cleanup()
/* loop - do things */
static void _loop(double t, int f)
{
auto itr = images.begin();
for (int i = 0; i < OBNUM; i++, ++itr)
int i = 0;
for (evas::image& img : images)
{
Evas_Coord w0 = 80;
Evas_Coord h0 = 80;
@ -57,9 +57,10 @@ 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);
(*itr).position_set(x, y);
(*itr).evas::object::size_set(w, h);
(*itr).fill_set(0, 0, w, h);
img.position_set(x, y);
img.evas::object::size_set(w, h);
img.fill_set(0, 0, w, h);
++i;
}
FPS_STD(NAME);
}

View File

@ -46,8 +46,8 @@ static void _cleanup()
/* loop - do things */
static void _loop(double t, int f)
{
auto itr = images.begin();
for (int i = 0; i < OBNUM; i++, ++itr)
int i = 0;
for (evas::image& img : images)
{
Evas_Coord w0 = 80;
Evas_Coord h0 = 80;
@ -57,9 +57,10 @@ static void _loop(double t, int f)
Evas_Coord y = (win_h / 2) - (h / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w0 / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h0 / 2);
(*itr).position_set(x, y);
(*itr).evas::object::size_set(w, h);
(*itr).fill_set(0, 0, w, h);
img.position_set(x, y);
img.evas::object::size_set(w, h);
img.fill_set(0, 0, w, h);
++i;
}
FPS_STD(NAME);
}

View File

@ -46,8 +46,8 @@ static void _cleanup()
/* loop - do things */
static void _loop(double t, int f)
{
auto itr = images.begin();
for (int i = 0; i < OBNUM; i++, ++itr)
int i = 0;
for (evas::image& img : images)
{
Evas_Coord w0 = 80;
Evas_Coord h0 = 80;
@ -57,9 +57,10 @@ 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);
(*itr).position_set(x, y);
(*itr).evas::object::size_set(w, h);
(*itr).fill_set(0, 0, w, h);
img.position_set(x, y);
img.evas::object::size_set(w, h);
img.fill_set(0, 0, w, h);
++i;
}
FPS_STD(NAME);
}

View File

@ -46,8 +46,8 @@ static void _cleanup()
/* loop - do things */
static void _loop(double t, int f)
{
auto itr = images.begin();
for (int i = 0; i < OBNUM; i++, ++itr)
int i = 0;
for (evas::image& img : images)
{
Evas_Coord w0 = 80;
Evas_Coord h0 = 80;
@ -57,9 +57,10 @@ 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);
(*itr).position_set(x, y);
(*itr).evas::object::size_set(w, h);
(*itr).fill_set(0, 0, w, h);
img.position_set(x, y);
img.evas::object::size_set(w, h);
img.fill_set(0, 0, w, h);
++i;
}
FPS_STD(NAME);
}

View File

@ -60,8 +60,8 @@ static void _cleanup()
/* loop - do things */
static void _loop(double t, int f)
{
auto itr = images.begin();
for (int i = 0; i < OBNUM; i++, ++itr)
int i = 0; // XXX
for (evas::image& img : images)
{
if (i < (OBNUM / 2))
{
@ -71,8 +71,9 @@ static void _loop(double t, int f)
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
Evas_Coord y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
(*itr).position_set(x, y);
img.position_set(x, y);
}
++i;
}
FPS_STD(NAME);
}

View File

@ -63,8 +63,8 @@ static void _cleanup()
/* loop - do things */
static void _loop(double t, int f)
{
auto itr = images.begin();
for (int i = 0; i < OBNUM; i++, ++itr)
int i = 0; // XXX
for (evas::image& img : images)
{
if (i < (OBNUM / 2))
{
@ -74,8 +74,9 @@ static void _loop(double t, int f)
Evas_Coord y = (win_h / 2) - (h / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
(*itr).position_set(x, y);
img.position_set(x, y);
}
++i;
}
FPS_STD(NAME);
}

View File

@ -41,7 +41,7 @@ static void _setup(void)
Evas_Coord x, y;
x = (win_w / 4) + (((rnd() & 0xff) * ((win_w / 2) - 120)) >> 8);
y = (win_h / 4) + (((rnd() & 0xff) * ((win_h / 2) - 120)) >> 8);
o.file_set(build_path("image.png"), NULL);
o.file_set(build_path("image.png"), "");
o.evas::object::position_set(x, y);
}
o.fill_set(0, 0, 120, 160);
@ -62,8 +62,8 @@ static void _cleanup()
/* loop - do things */
static void _loop(double t, int f)
{
auto itr = images.begin();
for (int i = 0; i < OBNUM; i++, itr++)
int i = 0;
for (evas::image& img : images)
{
if (i < (OBNUM / 2))
{
@ -73,8 +73,9 @@ static void _loop(double t, int f)
Evas_Coord y = (win_h / 2) - (h / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
(*itr).position_set(x, y);
img.position_set(x, y);
}
++i;
}
FPS_STD(NAME);
}

View File

@ -63,8 +63,8 @@ static void _cleanup()
/* loop - do things */
static void _loop(double t, int f)
{
auto itr = images.begin();
for (int i = 0; i < OBNUM; i++, ++itr)
int i = 0;
for (evas::image& img : images)
{
if (i < (OBNUM / 2))
{
@ -74,8 +74,9 @@ static void _loop(double t, int f)
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
Evas_Coord y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
(*itr).position_set(x, y);
img.position_set(x, y);
}
++i;
}
FPS_STD(NAME);
}

View File

@ -62,8 +62,8 @@ static void _cleanup()
/* loop - do things */
static void _loop(double t, int f)
{
auto itr = images.begin();
for (int i = 0; i < OBNUM; i++, ++itr)
int i = 0;
for (evas::image& img : images)
{
if (i & 0x1)
{
@ -73,8 +73,9 @@ static void _loop(double t, int f)
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
Evas_Coord y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
(*itr).position_set(x, y);
img.position_set(x, y);
}
++i;
}
FPS_STD(NAME);
}

View File

@ -63,8 +63,8 @@ static void _cleanup()
/* loop - do things */
static void _loop(double t, int f)
{
auto itr = images.begin();
for (int i = 0; i < OBNUM; i++, ++itr)
int i = 0;
for (evas::image& img : images)
{
if (i & 0x1)
{
@ -74,8 +74,9 @@ static void _loop(double t, int f)
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
Evas_Coord y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
(*itr).position_set(x, y);
img.position_set(x, y);
}
++i;
}
FPS_STD(NAME);
}

View File

@ -65,8 +65,8 @@ static void _cleanup()
/* loop - do things */
static void _loop(double t, int f)
{
auto itr = images.begin();
for (int i = 0; i < OBNUM; i++, ++itr)
int i = 0;
for (evas::image& img : images)
{
if (i & 0x1)
{
@ -76,8 +76,9 @@ static void _loop(double t, int f)
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
Evas_Coord y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
(*itr).position_set(x, y);
img.position_set(x, y);
}
++i;
}
FPS_STD(NAME);
}

View File

@ -63,8 +63,8 @@ static void _cleanup()
/* loop - do things */
static void _loop(double t, int f)
{
auto itr = images.begin();
for (int i = 0; i < OBNUM; i++, ++itr)
int i = 0;
for (evas::image& img : images)
{
if (i & 0x1)
{
@ -74,8 +74,9 @@ static void _loop(double t, int f)
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
Evas_Coord y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
(*itr).position_set(x, y);
img.position_set(x, y);
}
++i;
}
FPS_STD(NAME);
}

View File

@ -62,8 +62,8 @@ static void _cleanup()
/* loop - do things */
static void _loop(double t, int f)
{
auto itr = images.begin();
for (int i = 0; i < OBNUM; i++, ++itr)
int i = 0; // XXX
for (evas::image& img : images)
{
if (i > (OBNUM / 2))
{
@ -73,8 +73,9 @@ static void _loop(double t, int f)
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
Evas_Coord y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
(*itr).position_set(x, y);
img.position_set(x, y);
}
++i;
}
FPS_STD(NAME);
}

View File

@ -65,8 +65,8 @@ static void _cleanup()
/* loop - do things */
static void _loop(double t, int f)
{
auto itr = images.begin();
for (int i = 0; i < OBNUM; i++)
int i = 0;
for (evas::image& img : images)
{
if (i > (OBNUM / 2))
{
@ -76,8 +76,9 @@ static void _loop(double t, int f)
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
Evas_Coord y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
(*itr).position_set(x, y);
img.position_set(x, y);
}
++i;
}
FPS_STD(NAME);
}

View File

@ -61,8 +61,8 @@ static void _cleanup()
/* loop - do things */
static void _loop(double t, int f)
{
auto itr = images.begin();
for (int i = 0; i < OBNUM; i++, ++itr)
int i = 0;
for (evas::image& img : images)
{
if (i > (OBNUM / 2))
{
@ -72,8 +72,9 @@ static void _loop(double t, int f)
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
Evas_Coord y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
(*itr).position_set(x, y);
img.position_set(x, y);
}
++i;
}
FPS_STD(NAME);
}

View File

@ -62,8 +62,8 @@ static void _cleanup()
/* loop - do things */
static void _loop(double t, int f)
{
auto itr = images.begin();
for (int i = 0; i < OBNUM; i++, ++itr)
int i = 0;
for (evas::image& img : images)
{
if (i > (OBNUM / 2))
{
@ -73,8 +73,9 @@ static void _loop(double t, int f)
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
Evas_Coord y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
(*itr).position_set(x, y);
img.position_set(x, y);
}
++i;
}
FPS_STD(NAME);
}

View File

@ -47,8 +47,8 @@ static void _cleanup()
/* loop - do things */
static void _loop(double t, int f)
{
auto itr = images.begin();
for (int i = 0; i < OBNUM; i++, ++itr)
int i = 0;
for (evas::image& img : images)
{
Evas_Coord w0 = 80;
Evas_Coord h0 = 80;
@ -58,9 +58,10 @@ 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);
(*itr).position_set(x, y);
(*itr).evas::object::size_set(w, h);
(*itr).fill_set(0, 0, w, h);
img.position_set(x, y);
img.evas::object::size_set(w, h);
img.fill_set(0, 0, w, h);
++i;
}
FPS_STD(NAME);
}

View File

@ -46,8 +46,8 @@ static void _cleanup()
/* loop - do things */
static void _loop(double t, int f)
{
auto itr = images.begin();
for (int i = 0; i < OBNUM; i++, ++itr)
int i = 0;
for (evas::image& img : images)
{
Evas_Coord w0 = 80;
Evas_Coord h0 = 80;
@ -57,9 +57,10 @@ 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);
(*itr).position_set(x, y);
(*itr).size_set(w, h);
(*itr).fill_set(0, 0, w, h);
img.position_set(x, y);
img.size_set(w, h);
img.fill_set(0, 0, w, h);
++i;
}
FPS_STD(NAME);
}

View File

@ -46,8 +46,8 @@ static void _cleanup()
/* loop - do things */
static void _loop(double t, int f)
{
auto itr = images.begin();
for (int i = 0; i < OBNUM; i++, ++itr)
int i = 0;
for (evas::image& img : images)
{
Evas_Coord w0 = 80;
Evas_Coord h0 = 80;
@ -57,9 +57,10 @@ 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);
(*itr).position_set(x, y);
(*itr).size_set(w, h);
(*itr).fill_set(0, 0, w, h);
img.position_set(x, y);
img.size_set(w, h);
img.fill_set(0, 0, w, h);
++i;
}
FPS_STD(NAME);
}

View File

@ -46,8 +46,8 @@ static void _cleanup()
/* loop - do things */
static void _loop(double t, int f)
{
auto itr = images.begin();
for (int i = 0; i < OBNUM; i++, ++itr)
int i = 0;
for (evas::image& img : images)
{
Evas_Coord w0 = 80;
Evas_Coord h0 = 80;
@ -57,9 +57,10 @@ 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);
(*itr).position_set(x, y);
(*itr).size_set(w, h);
(*itr).fill_set(0, 0, w, h);
img.position_set(x, y);
img.size_set(w, h);
img.fill_set(0, 0, w, h);
++i;
}
FPS_STD(NAME);
}

View File

@ -29,7 +29,7 @@ static void _setup(void)
evas::image o(efl::eo::parent = canvas);
images.push_back(o);
o.file_set(::build_path("image.png"), NULL);
o.file_set(::build_path("image.png"), "");
o.fill_set(0, 0, 120, 160);
o.evas::object::size_set(120, 160);
int a = rnd()&0xff;

View File

@ -47,8 +47,8 @@ static void _cleanup()
/* loop - do things */
static void _loop(double t, int f)
{
auto itr = images.begin();
for (int i = 0; i < OBNUM; i++, ++itr)
int i = 0;
for (evas::image& img : images)
{
Evas_Coord w0 = 80;
Evas_Coord h0 = 80;
@ -58,9 +58,10 @@ 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);
(*itr).position_set(x, y);
(*itr).evas::object::size_set(w, h);
(*itr).fill_set(0, 0, w, h);
img.position_set(x, y);
img.evas::object::size_set(w, h);
img.fill_set(0, 0, w, h);
++i;
}
FPS_STD(NAME);
}

View File

@ -49,8 +49,8 @@ static void _cleanup()
/* loop - do things */
static void _loop(double t, int f)
{
auto itr = images.begin();
for (int i = 0; i < OBNUM; i++, ++itr)
int i = 0;
for (evas::image& img : images)
{
Evas_Coord w = 120;
Evas_Coord h = 160;
@ -58,7 +58,8 @@ static void _loop(double t, int f)
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
Evas_Coord y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
(*itr).position_set(x, y);
img.position_set(x, y);
++i;
}
FPS_STD(NAME);
}

View File

@ -47,8 +47,8 @@ static void _cleanup()
/* loop - do things */
static void _loop(double t, int f)
{
auto itr = images.begin();
for (int i = 0; i < OBNUM; i++, ++itr)
int i = 0;
for (evas::image& img : images)
{
Evas_Coord w = 120;
Evas_Coord h = 160;
@ -56,7 +56,8 @@ static void _loop(double t, int f)
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
Evas_Coord y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
(*itr).position_set(x, y);
img.position_set(x, y);
++i;
}
FPS_STD(NAME);
}

View File

@ -50,19 +50,18 @@ static void _cleanup(void)
static void _loop(double t, int f)
{
int st;
auto itr = images.begin();
for (int i = 0; i < 1; i++, ++itr)
for (evas::image& img : images)
{
unsigned int *data, *p;
Evas_Coord w = 640;
Evas_Coord h = 480;
Evas_Coord x = (win_w / 2) - (w / 2);
Evas_Coord y = (win_h / 2) - (h / 2);
(*itr).position_set(x, y);
(*itr).evas::object::size_set(w, h);
(*itr).fill_set(0, 0, w, h);
data = static_cast<unsigned int*>((*itr).data_get(1));
st = (*itr).stride_get(); // XXX
img.position_set(x, y);
img.evas::object::size_set(w, h);
img.fill_set(0, 0, w, h);
data = static_cast<unsigned int*>(img.data_get(1));
st = img.stride_get(); // XXX
st = st >> 2;
p = data;
for (y = 0; y < h; y++)
@ -74,8 +73,8 @@ static void _loop(double t, int f)
}
p += (st - w);
}
(*itr).data_set(data);
(*itr).data_update_add( 0, 0, w, h);
img.data_set(data);
img.data_update_add( 0, 0, w, h);
}
FPS_STD(NAME);
}

View File

@ -51,18 +51,17 @@ static void _cleanup(void)
/* loop - do things */
static void _loop(double t, int f)
{
auto itr = images.begin();
for (int i = 0; i < 1; i++, ++itr)
for (evas::image& img : images)
{
int a, r, g, b;
Evas_Coord w = 640;
Evas_Coord h = 480;
Evas_Coord x = (win_w / 2) - (w / 2);
Evas_Coord y = (win_h / 2) - (h / 2);
(*itr).evas::object::position_set(x, y);
(*itr).evas::object::size_set(w, h);
(*itr).fill_set(0, 0, w, h);
unsigned int *data = static_cast<unsigned int*>((*itr).data_get(1));
img.evas::object::position_set(x, y);
img.evas::object::size_set(w, h);
img.fill_set(0, 0, w, h);
unsigned int *data = static_cast<unsigned int*>(img.data_get(1));
int st = evas_obj_image_stride_get();
st = st >> 2;
unsigned int *p = data;
@ -86,8 +85,8 @@ static void _loop(double t, int f)
}
p += (st - w);
}
(*itr).data_set(data);
(*itr).data_update_add( 0, 0, w, h);
img.data_set(data);
img.data_update_add( 0, 0, w, h);
}
FPS_STD(NAME);
}

View File

@ -84,17 +84,16 @@ static void _cleanup(void)
/* loop - do things */
static void _loop(double t, int f)
{
auto itr = images.begin();
for (int i = 0; i < 1; i++, ++itr)
for (evas::image& img : images)
{
Evas_Coord w = 640;
Evas_Coord h = 480;
Evas_Coord x = (win_w / 2) - (w / 2);
Evas_Coord y = (win_h / 2) - (h / 2);
(*itr).position_set(x, y);
(*itr).evas::object::size_set(w, h);
(*itr).fill_set(0, 0, w, h);
(*itr).data_update_add( 0, 0, 640, 480);
img.position_set(x, y);
img.evas::object::size_set(w, h);
img.fill_set(0, 0, w, h);
img.data_update_add( 0, 0, 640, 480);
}
FPS_STD(NAME);
}

View File

@ -88,8 +88,7 @@ static void _loop(double t, int f)
static Evas_Map *m = NULL;
if (!m) m = evas_map_new(4);
evas_map_smooth_set(m, 0);
auto itr = images.begin();
for (int i = 0; i < 1; i++, ++itr)
for (evas::image& img : images)
{
Evas_Coord w = 640;
Evas_Coord h = 480;
@ -97,8 +96,8 @@ static void _loop(double t, int f)
Evas_Coord y = (win_h / 2) - (h / 2);
evas_map_util_points_populate_from_geometry(m, x, y, w, h, 0);
evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2));
(*itr).map_enable_set(1);
(*itr).map_set(m);
img.map_enable_set(1);
img.map_set(m);
}
FPS_STD(NAME);
}

View File

@ -86,8 +86,7 @@ static void _loop(double t, int f)
{
static Evas_Map *m = NULL;
if (!m) m = evas_map_new(4);
auto itr = images.begin();
for (int i = 0; i < 1; i++, ++itr)
for (evas::image& img : images)
{
Evas_Coord w = 640;
Evas_Coord h = 480;
@ -97,8 +96,8 @@ static void _loop(double t, int f)
evas_map_util_points_populate_from_geometry(m, x, y, w, h, 0);
evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2));
(*itr).map_enable_set(1);
(*itr).map_set(m);
img.map_enable_set(1);
img.map_set(m);
}
FPS_STD(NAME);
}

View File

@ -88,16 +88,15 @@ static void _cleanup(void)
/* loop - do things */
static void _loop(double t, int f)
{
auto itr = images.begin();
for (int i = 0; i < 1; i++, ++itr)
for (evas::image& img : images)
{
Evas_Coord w = 640;
Evas_Coord h = 480;
Evas_Coord x = (win_w / 2) - (w / 2);
Evas_Coord y = (win_h / 2) - (h / 2);
(*itr).evas::object::position_set(x, y);
(*itr).evas::object::size_set(w, h);
(*itr).fill_set(0, 0, w, h);
img.evas::object::position_set(x, y);
img.evas::object::size_set(w, h);
img.fill_set(0, 0, w, h);
w = 320 - 16 + f;
if (w < 1) w = 1;
@ -105,8 +104,8 @@ static void _loop(double t, int f)
w &= ~0x1;
(*itr).size_set(w, 480);
unsigned char **data = static_cast<unsigned char**>((*itr).data_get(1));
img.size_set(w, 480);
unsigned char **data = static_cast<unsigned char**>(img.data_get(1));
if (data)
{
unsigned char **lp = data;
@ -125,8 +124,8 @@ static void _loop(double t, int f)
*lp = vp + (y * 320);
lp++;
}
(*itr).data_set(data);
(*itr).data_update_add(0, 0, w, 480);
img.data_set(data);
img.data_update_add(0, 0, w, 480);
}
}
FPS_STD(NAME);

View File

@ -52,8 +52,8 @@ static void _loop(double t, int f)
static Evas_Map *m = NULL;
if (!m) m = evas_map_new(4);
evas_map_smooth_set(m, 0);
auto itr = images.begin();
for (int i = 0; i < (OBNUM / 2); i++, ++itr)
int i = 0;
for (evas::image& img : images)
{
Evas_Coord w = 120;
Evas_Coord h = 160;
@ -71,8 +71,9 @@ static void _loop(double t, int f)
evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2));
(*itr).map_enable_set(1);
(*itr).map_set(m);
img.map_enable_set(1);
img.map_set(m);
++i;
}
FPS_STD(NAME);
}

View File

@ -52,8 +52,8 @@ static void _loop(double t, int f)
static Evas_Map *m = NULL;
if (!m) m = evas_map_new(4);
evas_map_smooth_set(m, 0);
auto itr = images.begin();
for (int i = 0; i < (OBNUM / 2); i++, ++itr)
int i = 0;
for (evas::image& img : images)
{
Evas_Coord w = 120;
Evas_Coord h = 160;
@ -71,8 +71,9 @@ static void _loop(double t, int f)
evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2));
(*itr).map_enable_set(1);
(*itr).map_set(m);
img.map_enable_set(1);
img.map_set(m);
++i;
}
FPS_STD(NAME);
}

View File

@ -50,8 +50,8 @@ static void _loop(double t, int f)
{
static Evas_Map *m = NULL;
if (!m) m = evas_map_new(4);
auto itr = images.begin();
for (int i = 0; i < (OBNUM / 2); i++, ++itr)
int i = 0;
for (evas::image& img : images)
{
Evas_Coord w = 120;
Evas_Coord h = 160;
@ -69,8 +69,9 @@ static void _loop(double t, int f)
evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2));
(*itr).map_enable_set(1);
(*itr).map_set(m);
img.map_enable_set(1);
img.map_set(m);
++i;
}
FPS_STD(NAME);
}

View File

@ -50,8 +50,8 @@ static void _loop(double t, int f)
{
static Evas_Map *m = NULL;
if (!m) m = evas_map_new(4);
auto itr = images.begin();
for (int i = 0; i < (OBNUM / 2); i++, ++itr)
int i = 0; // XXX
for (evas::image& img : images)
{
Evas_Coord w = 120;
Evas_Coord h = 160;
@ -68,8 +68,9 @@ static void _loop(double t, int f)
evas_map_point_color_set(m, 3, 0, 0, 0, 0);
evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2));
(*itr).map_enable_set(1);
(*itr).map_set(m);
img.map_enable_set(1);
img.map_set(m);
++i;
}
FPS_STD(NAME);
}

View File

@ -52,8 +52,8 @@ static void _loop(double t, int f)
static Evas_Map *m = NULL;
if (!m) m = evas_map_new(4);
evas_map_smooth_set(m, 0);
auto itr = images.begin();
for (int i = 0; i < (OBNUM / 2); i++, ++itr)
int i = 0;
for (evas::image& img : images)
{
Evas_Coord w = 120;
Evas_Coord h = 160;
@ -73,6 +73,7 @@ static void _loop(double t, int f)
evas_obj_map_enable_set(1);
evas_obj_map_set(m);
++i;
}
FPS_STD(NAME);
}

View File

@ -52,8 +52,8 @@ static void _loop(double t, int f)
static Evas_Map *m = NULL;
if (!m) m = evas_map_new(4);
evas_map_smooth_set(m, 0);
auto itr = images.begin();
for (int i = 0; i < (OBNUM / 2); i++, ++itr)
int i = 0;
for (evas::image& img : images)
{
Evas_Coord w = 120;
Evas_Coord h = 160;
@ -71,8 +71,9 @@ static void _loop(double t, int f)
evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2));
(*itr).map_enable_set(1);
(*itr).map_set(m);
img.map_enable_set(1);
img.map_set(m);
++i;
}
FPS_STD(NAME);
}

View File

@ -50,8 +50,8 @@ static void _loop(double t, int f)
{
static Evas_Map *m = NULL;
if (!m) m = evas_map_new(4);
auto itr = images.begin();
for (int i = 0; i < (OBNUM / 2); i++, ++itr)
int i = 0;
for (evas::image& img : images)
{
Evas_Coord w = 120;
Evas_Coord h = 160;
@ -69,8 +69,9 @@ static void _loop(double t, int f)
evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2));
(*itr).map_enable_set(1);
(*itr).map_set(m);
img.map_enable_set(1);
img.map_set(m);
++i;
}
FPS_STD(NAME);
}

View File

@ -50,8 +50,8 @@ static void _loop(double t, int f)
{
static Evas_Map *m = NULL;
if (!m) m = evas_map_new(4);
auto itr = images.begin();
for (int i = 0; i < (OBNUM / 2); i++, itr++)
int i = 0;
for (evas::image& img : images)
{
Evas_Coord w = 120;
Evas_Coord h = 160;
@ -69,8 +69,9 @@ static void _loop(double t, int f)
evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2));
(*itr).map_enable_set(1);
(*itr).map_set(m);
img.map_enable_set(1);
img.map_set(m);
++i;
}
FPS_STD(NAME);
}

View File

@ -52,8 +52,8 @@ static void _loop(double t, int f)
static Evas_Map *m = NULL;
if (!m) m = evas_map_new(4);
evas_map_smooth_set(m, 0);
auto itr = images.begin();
for (int i = 0; i < (OBNUM / 2); i++, ++itr)
int i = 0;
for (evas::image& img : images)
{
Evas_Coord w = 120;
Evas_Coord h = 160;
@ -66,8 +66,9 @@ static void _loop(double t, int f)
evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2));
(*itr).map_enable_set(1);
(*itr).map_set(m);
img.map_enable_set(1);
img.map_set(m);
++i;
}
FPS_STD(NAME);
}

View File

@ -52,8 +52,8 @@ static void _loop(double t, int f)
static Evas_Map *m = NULL;
if (!m) m = evas_map_new(4);
evas_map_smooth_set(m, 0);
auto itr = images.begin();
for (int i = 0; i < (OBNUM / 2); i++, ++itr)
int i = 0;
for (evas::image& img : images)
{
Evas_Coord w = 120;
Evas_Coord h = 160;
@ -65,8 +65,9 @@ static void _loop(double t, int f)
evas_map_util_points_populate_from_geometry(m, x, y, w, h, 0);
evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2));
(*itr).map_enable_set(1);
(*itr).map_set(m);
img.map_enable_set(1);
img.map_set(m);
++i;
}
FPS_STD(NAME);
}

View File

@ -50,8 +50,8 @@ static void _loop(double t, int f)
{
static Evas_Map *m = NULL;
if (!m) m = evas_map_new(4);
auto itr = images.begin();
for (int i = 0; i < (OBNUM / 2); i++, ++itr)
int i = 0;
for (evas::image& img : images)
{
Evas_Coord w = 120;
Evas_Coord h = 160;
@ -64,8 +64,9 @@ static void _loop(double t, int f)
evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2));
(*itr).map_enable_set(1);
(*itr).map_set(m);
img.map_enable_set(1);
img.map_set(m);
++i;
}
FPS_STD(NAME);
}

View File

@ -50,8 +50,8 @@ static void _loop(double t, int f)
{
static Evas_Map *m = NULL;
if (!m) m = evas_map_new(4);
auto itr = images.begin();
for (int i = 0; i < (OBNUM / 2); i++, ++itr)
int i = 0;
for (evas::image& img : images)
{
Evas_Coord w = 120;
Evas_Coord h = 160;
@ -63,8 +63,9 @@ static void _loop(double t, int f)
evas_map_util_points_populate_from_geometry(m, x, y, w, h, 0);
evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2));
(*itr).map_enable_set(1);
(*itr).map_set(m);
img.map_enable_set(1);
img.map_set(m);
++i;
}
FPS_STD(NAME);
}

View File

@ -48,8 +48,7 @@ static void _cleanup(void)
/* loop - do things */
static void _loop(double t, int f)
{
auto itr = images.begin();
for (int i = 0; i < 1; i++, ++itr)
for (evas::image& img : images)
{
Evas_Coord w = 640;
Evas_Coord h = 480;
@ -57,9 +56,9 @@ static void _loop(double t, int f)
h *= (f / 100.0) * 4.0;
Evas_Coord x = (win_w / 2) - (w / 2);
Evas_Coord y = (win_h / 2) - (h / 2);
(*itr).position_set(x, y);
(*itr).size_set(w, h);
(*itr).fill_set(0, 0, w, h);
img.position_set(x, y);
img.size_set(w, h);
img.fill_set(0, 0, w, h);
}
FPS_STD(NAME);
}

View File

@ -83,13 +83,14 @@ static void _loop(double t, int f)
{
Evas_Coord ox1, oy1, ox2, oy2;
Evas_Object *o;
auto itr = lines.begin();
for (int i = 0; i < OBNUM; i++, ++itr)
int i = 0;
for (evas::image& img : images)
{
(*itr).xy_get(&ox1, &oy1, &ox2, &oy2);
img.xy_get(&ox1, &oy1, &ox2, &oy2);
_rotate_point(&ox1, &oy1, i);
_rotate_point(&ox2, &oy2, i);
(*itr).xy_set(ox1, oy1, ox2, oy2);
img.xy_set(ox1, oy1, ox2, oy2);
++i;
}
FPS_STD(NAME);
}

View File

@ -53,8 +53,8 @@ static void _cleanup()
/* loop - do things */
static void _loop(double t, int f)
{
auto itr = images.begin();
for (int i = 0; i < OBNUM; i++, ++itr)
int i = 0;
for (evas::image& img : images)
{
Evas_Coord w = 120;
Evas_Coord h = 160;
@ -62,7 +62,8 @@ static void _loop(double t, int f)
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
Evas_Coord y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (h / 2);
(*itr).position_set(x, y);
img.position_set(x, y);
++i;
}
FPS_STD(NAME);
}

View File

@ -48,8 +48,7 @@ static void _cleanup()
/* loop - do things */
static void _loop(double t, int f)
{
auto itr = rectangles.begin();
for (int i = 0; i < OBNUM; i++, ++itr)
for (evas::image& img : images)
{
Evas_Coord w0 = 80;
Evas_Coord h0 = 80;
@ -60,8 +59,8 @@ 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);
(*itr).evas::object::position_set(x, y);
(*itr).evas::object::size_set(w, h);
img.evas::object::position_set(x, y);
img.evas::object::size_set(w, h);
}
FPS_STD(NAME);
}

View File

@ -52,8 +52,8 @@ static void _cleanup(void)
/* loop - do things */
static void _loop(double t, int f)
{
auto itr = rectangles.begin();
for (int i = 0; i < OBNUM; i++, ++itr)
int i = 0;
for (evas::rectangle& rec : rectangles)
{
Evas_Coord w0 = 80;
Evas_Coord h0 = 80;
@ -63,8 +63,9 @@ static void _loop(double t, int f)
x += sin((double)(f + (i * 113)) / (36.7 * SLOW)) * (w0 / 2);
Evas_Coord y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 228)) / (43.8 * SLOW)) * (h0 / 2);
(*itr).evas::object::position_set(x, y);
(*itr).evas::object::size_set(w, h);
rec.evas::object::position_set(x, y);
rec.evas::object::size_set(w, h);
++i;
}
FPS_STD(NAME);
}

View File

@ -49,8 +49,8 @@ static void _cleanup(void)
/* loop - do things */
static void _loop(double t, int f)
{
auto itr = rectangles.begin();
for (int i = 0; i < OBNUM; i++, ++itr)
int i = 0;
for (evas::image& img : images)
{
Evas_Coord w0 = 80;
Evas_Coord h0 = 80;
@ -60,8 +60,9 @@ 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);
(*itr).evas::object::position_set(x, y);
(*itr).evas::object::size_set(w, h);
img.evas::object::position_set(x, y);
img.evas::object::size_set(w, h);
++i;
}
FPS_STD(NAME);
}

View File

@ -56,8 +56,8 @@ static void _cleanup(void)
/* loop - do things */
static void _loop(double t, int f)
{
auto itr = images.begin();
for (int i = 0; i < OBNUM; i++, ++itr)
int i = 0;
for (evas::image& img : images)
{
Evas_Coord w0 = 80;
Evas_Coord h0 = 80;
@ -67,8 +67,9 @@ static void _loop(double t, int f)
x += sin((double)(f + (i * 113)) / (36.7 * SLOW)) * (w0 / 2);
Evas_Coord y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 228)) / (43.8 * SLOW)) * (h0 / 2);
(*itr).evas::object::position_set(x, y);
(*itr).evas::object::size_set(w, h);
img.evas::object::position_set(x, y);
img.evas::object::size_set(w, h);
++i;
}
FPS_STD(NAME);
}

View File

@ -50,8 +50,8 @@ static void _cleanup(void)
/* loop - do things */
static void _loop(double t, int f)
{
auto itr = images.begin();
for (int i = 0; i < OBNUM; i++, ++itr)
int i = 0;
for (evas::image& img : images)
{
Evas_Coord w0 = 80;
Evas_Coord h0 = 80;
@ -61,8 +61,9 @@ 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);
(*itr).evas::object::position_set(x, y);
(*itr).evas::object::size_set(w, h);
img.evas::object::position_set(x, y);
img.evas::object::size_set(w, h);
++i;
}
FPS_STD(NAME);
}

View File

@ -53,8 +53,8 @@ static void _cleanup(void)
/* loop - do things */
static void _loop(double t, int f)
{
auto itr = images.begin();
for (int i = 0; i < OBNUM; i++, ++itr)
int i = 0;
for (evas::image& img : images)
{
Evas_Coord w0 = 80;
Evas_Coord h0 = 80;
@ -64,8 +64,9 @@ static void _loop(double t, int f)
x += sin((double)(f + (i * 113)) / (36.7 * SLOW)) * (w0 / 2);
Evas_Coord y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 228)) / (43.8 * SLOW)) * (h0 / 2);
(*itr).evas::object::position_set(x, y);
(*itr).evas::object::size_set(w, h);
img.evas::object::position_set(x, y);
img.evas::object::size_set(w, h);
++i;
}
FPS_STD(NAME);
}

View File

@ -47,16 +47,17 @@ static void _cleanup(void)
/* loop - do things */
static void _loop(double t, int f)
{
auto itr = texts.begin();
for (int i = 0; i < OBNUM; i++, ++itr)
int i = 0;
for (evas::text& text : texts)
{
Evas_Coord w = 0, h = 0;
(*itr).size_get(&w, &h);
text.size_get(&w, &h);
Evas_Coord x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
Evas_Coord y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (w / 2);
(*itr).evas::object::position_set(x, y);
text.evas::object::position_set(x, y);
++i;
}
FPS_STD(NAME);
}

View File

@ -71,15 +71,14 @@ static void _loop(double t, int f)
"Am", "You", "Are", "Erogenous", "We", "Stick", "Wet", "Fishy",
"Fiddly", "Family", "Lair", "Monkeys", "Magazine"
};
auto itr = texts.begin();
for (int i = 0; i < OBNUM; i++, ++itr)
for (evas::text& text : texts)
{
snprintf(buf, sizeof(buf), "%s %s %s %s.",
strs[rnd() % (sizeof(strs) / sizeof(char *))],
strs[rnd() % (sizeof(strs) / sizeof(char *))],
strs[rnd() % (sizeof(strs) / sizeof(char *))],
strs[rnd() % (sizeof(strs) / sizeof(char *))]);
(*itr).text_set(buf);
text.text_set(buf);
}
FPS_STD(NAME);
}

View File

@ -78,16 +78,17 @@ static void _cleanup(void)
/* loop - do things */
static void _loop(double t, int f)
{
auto itr = texts.begin();
for (int i = 0; i < OBNUM; i++, ++itr)
int i = 0;
for (evas::text& text : texts)
{
Evas_Coord w, h;
(*itr).size_get(&w, &h);
text.size_get(&w, &h);
Evas_Coord x = (win_w / 2) - (w / 2);
x += sin((double)(f + (i * 13)) / (36.7 * SLOW)) * (w / 2);
Evas_Coord y = (win_h / 2) - (h / 2);
y += cos((double)(f + (i * 28)) / (43.8 * SLOW)) * (w / 2);
(*itr).evas::object::position_set(x, y);
text.evas::object::position_set(x, y);
++i;
}
FPS_STD(NAME);
}