summaryrefslogtreecommitdiff
path: root/src/examples
diff options
context:
space:
mode:
authorStefan Schmidt <stefan@osg.samsung.com>2015-07-23 17:11:23 +0200
committerStefan Schmidt <stefan@osg.samsung.com>2015-07-23 17:11:23 +0200
commit4ab46f0d1fd4c42a3ea68a38f696571e6b439455 (patch)
tree76329e2e283d07c32e994c4c717455e5c08a893c /src/examples
parent02a3ace1ae403d3847aa38ff90ff453f016b89a6 (diff)
examples/evas/shooter: Move image path into file that uses them.
The evas-3d-shooter-header.h is used by two binaries. One is using these image path and the other not. Which means that we get a bunch of warnings thrown at us during the compile of the binary which does not use them as unused variables. Solve this by having them only in the place where they are actually used.
Diffstat (limited to 'src/examples')
-rw-r--r--src/examples/evas/shooter/evas-3d-shooter-header.h26
-rw-r--r--src/examples/evas/shooter/evas-3d-shooter.c27
2 files changed, 27 insertions, 26 deletions
diff --git a/src/examples/evas/shooter/evas-3d-shooter-header.h b/src/examples/evas/shooter/evas-3d-shooter-header.h
index 99ab24c26a..1a84f07f75 100644
--- a/src/examples/evas/shooter/evas-3d-shooter-header.h
+++ b/src/examples/evas/shooter/evas-3d-shooter-header.h
@@ -18,9 +18,6 @@
18#include "evas-3d-shooter-macros.h" 18#include "evas-3d-shooter-macros.h"
19#include "../evas-common.h" 19#include "../evas-common.h"
20 20
21#define LOCAL_IMAGE_FOLDER PACKAGE_EXAMPLES_DIR "" EVAS_PROJECT_IMAGE_FOLDER
22#define LOCAL_MODEL_FOLDER PACKAGE_EXAMPLES_DIR "" EVAS_PROJECT_MODEL_FOLDER
23
24typedef struct _Scene_Data 21typedef struct _Scene_Data
25{ 22{
26 Eo *cube_primitive; 23 Eo *cube_primitive;
@@ -122,29 +119,6 @@ static Eo *background = NULL;
122static Eo *image = NULL; 119static Eo *image = NULL;
123 120
124static const vec2 tex_scale = {1, 1}; 121static const vec2 tex_scale = {1, 1};
125static const char *gray_brick_n_path = LOCAL_IMAGE_FOLDER "/brick-stone_n.jpg";
126static const char *gray_brick_path = LOCAL_IMAGE_FOLDER "/brick-stone.jpg";
127static const char *red_brick_n_path = LOCAL_IMAGE_FOLDER "/bricks_n.jpg";
128static const char *red_brick_path = LOCAL_IMAGE_FOLDER "/bricks.jpg";
129static const char *eagle_tex_path = LOCAL_IMAGE_FOLDER "/eagle.png";
130static const char *snake_tex_path = LOCAL_IMAGE_FOLDER "/snake.png";
131static const char *snake_tex_n_path = LOCAL_IMAGE_FOLDER "/snake_n.png";
132static const char *soldier_tex_path = LOCAL_IMAGE_FOLDER "/soldier.png";
133static const char *gazebo_b_path = LOCAL_IMAGE_FOLDER "/gazebo.png";
134static const char *gazebo_t_path = LOCAL_IMAGE_FOLDER "/gazebo_t.png";
135static const char *gazebo_t_trans_path = LOCAL_IMAGE_FOLDER "/gazebo_t_t.png";
136static const char *gazebo_t_n_path = LOCAL_IMAGE_FOLDER "/gazebo_t_n.png";
137static const char *gazebo_b_n_path = LOCAL_IMAGE_FOLDER "/gazebo_b_n.png";
138static const char *warrior_tex_path = LOCAL_IMAGE_FOLDER "/warrior.png";
139
140static const char *warrior_path = LOCAL_MODEL_FOLDER "/warrior.md2";
141static const char *gazebo_bot_path = LOCAL_MODEL_FOLDER "/gazebo_b.md2";
142static const char *gazebo_top_path = LOCAL_MODEL_FOLDER "/gazebo_t.md2";
143static const char *eagle_path = LOCAL_MODEL_FOLDER "/eagle.md2";
144static const char *snake_path = LOCAL_MODEL_FOLDER "/snake.md2";
145static const char *soldier_jump_path = LOCAL_MODEL_FOLDER "/soldier_jump.md2";
146static const char *soldier_path = LOCAL_MODEL_FOLDER "/soldier.md2";
147static const char *gun_path = LOCAL_MODEL_FOLDER "/tommy.ply";
148 122
149static const Ecore_Getopt optdesc = { 123static const Ecore_Getopt optdesc = {
150 "ecore_thread_example", 124 "ecore_thread_example",
diff --git a/src/examples/evas/shooter/evas-3d-shooter.c b/src/examples/evas/shooter/evas-3d-shooter.c
index cf4f33c7db..2e53ef8232 100644
--- a/src/examples/evas/shooter/evas-3d-shooter.c
+++ b/src/examples/evas/shooter/evas-3d-shooter.c
@@ -16,6 +16,33 @@
16 16
17#include "evas-3d-shooter-header.h" 17#include "evas-3d-shooter-header.h"
18 18
19#define LOCAL_IMAGE_FOLDER PACKAGE_EXAMPLES_DIR "" EVAS_PROJECT_IMAGE_FOLDER
20#define LOCAL_MODEL_FOLDER PACKAGE_EXAMPLES_DIR "" EVAS_PROJECT_MODEL_FOLDER
21
22static const char *gray_brick_n_path = LOCAL_IMAGE_FOLDER "/brick-stone_n.jpg";
23static const char *gray_brick_path = LOCAL_IMAGE_FOLDER "/brick-stone.jpg";
24static const char *red_brick_n_path = LOCAL_IMAGE_FOLDER "/bricks_n.jpg";
25static const char *red_brick_path = LOCAL_IMAGE_FOLDER "/bricks.jpg";
26static const char *eagle_tex_path = LOCAL_IMAGE_FOLDER "/eagle.png";
27static const char *snake_tex_path = LOCAL_IMAGE_FOLDER "/snake.png";
28static const char *snake_tex_n_path = LOCAL_IMAGE_FOLDER "/snake_n.png";
29static const char *soldier_tex_path = LOCAL_IMAGE_FOLDER "/soldier.png";
30static const char *gazebo_b_path = LOCAL_IMAGE_FOLDER "/gazebo.png";
31static const char *gazebo_t_path = LOCAL_IMAGE_FOLDER "/gazebo_t.png";
32static const char *gazebo_t_trans_path = LOCAL_IMAGE_FOLDER "/gazebo_t_t.png";
33static const char *gazebo_t_n_path = LOCAL_IMAGE_FOLDER "/gazebo_t_n.png";
34static const char *gazebo_b_n_path = LOCAL_IMAGE_FOLDER "/gazebo_b_n.png";
35static const char *warrior_tex_path = LOCAL_IMAGE_FOLDER "/warrior.png";
36
37static const char *warrior_path = LOCAL_MODEL_FOLDER "/warrior.md2";
38static const char *gazebo_bot_path = LOCAL_MODEL_FOLDER "/gazebo_b.md2";
39static const char *gazebo_top_path = LOCAL_MODEL_FOLDER "/gazebo_t.md2";
40static const char *eagle_path = LOCAL_MODEL_FOLDER "/eagle.md2";
41static const char *snake_path = LOCAL_MODEL_FOLDER "/snake.md2";
42static const char *soldier_jump_path = LOCAL_MODEL_FOLDER "/soldier_jump.md2";
43static const char *soldier_path = LOCAL_MODEL_FOLDER "/soldier.md2";
44static const char *gun_path = LOCAL_MODEL_FOLDER "/tommy.ply";
45
19Evas_Canvas3D_Scene *global_scene = NULL; 46Evas_Canvas3D_Scene *global_scene = NULL;
20Ecore_Evas *ecore_evas = NULL; 47Ecore_Evas *ecore_evas = NULL;
21static float angle_camera = 0.0f; 48static float angle_camera = 0.0f;