examples/evas/shooter: Move image path into file that uses them.
authorStefan Schmidt <stefan@osg.samsung.com>
Thu, 23 Jul 2015 15:11:23 +0000 (17:11 +0200)
committerStefan Schmidt <stefan@osg.samsung.com>
Thu, 23 Jul 2015 15:11:23 +0000 (17:11 +0200)
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.

src/examples/evas/shooter/evas-3d-shooter-header.h
src/examples/evas/shooter/evas-3d-shooter.c

index 99ab24c..1a84f07 100644 (file)
@@ -18,9 +18,6 @@
 #include "evas-3d-shooter-macros.h"
 #include "../evas-common.h"
 
-#define LOCAL_IMAGE_FOLDER PACKAGE_EXAMPLES_DIR "" EVAS_PROJECT_IMAGE_FOLDER
-#define LOCAL_MODEL_FOLDER PACKAGE_EXAMPLES_DIR "" EVAS_PROJECT_MODEL_FOLDER
-
 typedef struct _Scene_Data
 {
    Eo      *cube_primitive;
@@ -122,29 +119,6 @@ static Eo               *background        = NULL;
 static Eo               *image             = NULL;
 
 static const vec2 tex_scale = {1, 1};
-static const char *gray_brick_n_path = LOCAL_IMAGE_FOLDER "/brick-stone_n.jpg";
-static const char *gray_brick_path = LOCAL_IMAGE_FOLDER "/brick-stone.jpg";
-static const char *red_brick_n_path = LOCAL_IMAGE_FOLDER "/bricks_n.jpg";
-static const char *red_brick_path = LOCAL_IMAGE_FOLDER "/bricks.jpg";
-static const char *eagle_tex_path = LOCAL_IMAGE_FOLDER "/eagle.png";
-static const char *snake_tex_path = LOCAL_IMAGE_FOLDER "/snake.png";
-static const char *snake_tex_n_path = LOCAL_IMAGE_FOLDER "/snake_n.png";
-static const char *soldier_tex_path = LOCAL_IMAGE_FOLDER "/soldier.png";
-static const char *gazebo_b_path = LOCAL_IMAGE_FOLDER "/gazebo.png";
-static const char *gazebo_t_path = LOCAL_IMAGE_FOLDER "/gazebo_t.png";
-static const char *gazebo_t_trans_path = LOCAL_IMAGE_FOLDER "/gazebo_t_t.png";
-static const char *gazebo_t_n_path = LOCAL_IMAGE_FOLDER "/gazebo_t_n.png";
-static const char *gazebo_b_n_path = LOCAL_IMAGE_FOLDER "/gazebo_b_n.png";
-static const char *warrior_tex_path = LOCAL_IMAGE_FOLDER "/warrior.png";
-
-static const char *warrior_path = LOCAL_MODEL_FOLDER "/warrior.md2";
-static const char *gazebo_bot_path = LOCAL_MODEL_FOLDER "/gazebo_b.md2";
-static const char *gazebo_top_path = LOCAL_MODEL_FOLDER "/gazebo_t.md2";
-static const char *eagle_path = LOCAL_MODEL_FOLDER "/eagle.md2";
-static const char *snake_path = LOCAL_MODEL_FOLDER "/snake.md2";
-static const char *soldier_jump_path = LOCAL_MODEL_FOLDER "/soldier_jump.md2";
-static const char *soldier_path = LOCAL_MODEL_FOLDER "/soldier.md2";
-static const char *gun_path = LOCAL_MODEL_FOLDER "/tommy.ply";
 
 static const Ecore_Getopt optdesc = {
    "ecore_thread_example",
index cf4f33c..2e53ef8 100644 (file)
 
 #include "evas-3d-shooter-header.h"
 
+#define LOCAL_IMAGE_FOLDER PACKAGE_EXAMPLES_DIR "" EVAS_PROJECT_IMAGE_FOLDER
+#define LOCAL_MODEL_FOLDER PACKAGE_EXAMPLES_DIR "" EVAS_PROJECT_MODEL_FOLDER
+
+static const char *gray_brick_n_path = LOCAL_IMAGE_FOLDER "/brick-stone_n.jpg";
+static const char *gray_brick_path = LOCAL_IMAGE_FOLDER "/brick-stone.jpg";
+static const char *red_brick_n_path = LOCAL_IMAGE_FOLDER "/bricks_n.jpg";
+static const char *red_brick_path = LOCAL_IMAGE_FOLDER "/bricks.jpg";
+static const char *eagle_tex_path = LOCAL_IMAGE_FOLDER "/eagle.png";
+static const char *snake_tex_path = LOCAL_IMAGE_FOLDER "/snake.png";
+static const char *snake_tex_n_path = LOCAL_IMAGE_FOLDER "/snake_n.png";
+static const char *soldier_tex_path = LOCAL_IMAGE_FOLDER "/soldier.png";
+static const char *gazebo_b_path = LOCAL_IMAGE_FOLDER "/gazebo.png";
+static const char *gazebo_t_path = LOCAL_IMAGE_FOLDER "/gazebo_t.png";
+static const char *gazebo_t_trans_path = LOCAL_IMAGE_FOLDER "/gazebo_t_t.png";
+static const char *gazebo_t_n_path = LOCAL_IMAGE_FOLDER "/gazebo_t_n.png";
+static const char *gazebo_b_n_path = LOCAL_IMAGE_FOLDER "/gazebo_b_n.png";
+static const char *warrior_tex_path = LOCAL_IMAGE_FOLDER "/warrior.png";
+
+static const char *warrior_path = LOCAL_MODEL_FOLDER "/warrior.md2";
+static const char *gazebo_bot_path = LOCAL_MODEL_FOLDER "/gazebo_b.md2";
+static const char *gazebo_top_path = LOCAL_MODEL_FOLDER "/gazebo_t.md2";
+static const char *eagle_path = LOCAL_MODEL_FOLDER "/eagle.md2";
+static const char *snake_path = LOCAL_MODEL_FOLDER "/snake.md2";
+static const char *soldier_jump_path = LOCAL_MODEL_FOLDER "/soldier_jump.md2";
+static const char *soldier_path = LOCAL_MODEL_FOLDER "/soldier.md2";
+static const char *gun_path = LOCAL_MODEL_FOLDER "/tommy.ply";
+
 Evas_Canvas3D_Scene    *global_scene      = NULL;
 Ecore_Evas       *ecore_evas        = NULL;
 static float     angle_camera       = 0.0f;