stefan pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=4ab46f0d1fd4c42a3ea68a38f696571e6b439455

commit 4ab46f0d1fd4c42a3ea68a38f696571e6b439455
Author: Stefan Schmidt <ste...@osg.samsung.com>
Date:   Thu Jul 23 17:11:23 2015 +0200

    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.
---
 src/examples/evas/shooter/evas-3d-shooter-header.h | 26 ---------------------
 src/examples/evas/shooter/evas-3d-shooter.c        | 27 ++++++++++++++++++++++
 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 99ab24c..1a84f07 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 @@
 #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",
diff --git a/src/examples/evas/shooter/evas-3d-shooter.c 
b/src/examples/evas/shooter/evas-3d-shooter.c
index cf4f33c..2e53ef8 100644
--- a/src/examples/evas/shooter/evas-3d-shooter.c
+++ b/src/examples/evas/shooter/evas-3d-shooter.c
@@ -16,6 +16,33 @@
 
 #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;

-- 


Reply via email to