summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsongwon0.lee <songwon0.lee@samsung.com>2014-10-31 18:38:50 +0900
committersongwon0.lee <songwon0.lee@samsung.com>2014-10-31 18:38:50 +0900
commit4f480b58f32585fd5091fe1f7ab03da186997d71 (patch)
tree1c6db03d4b1bd3fe0fc8044d09323374d4c5ed6d
parentb4978e5fb1c80c5d2ab6182de576537fda97ab0d (diff)
config.h : added config.h file
-rw-r--r--inc/config.h45
1 files changed, 45 insertions, 0 deletions
diff --git a/inc/config.h b/inc/config.h
new file mode 100644
index 0000000..5c7681f
--- /dev/null
+++ b/inc/config.h
@@ -0,0 +1,45 @@
1#ifndef __CONFIG_H__
2#define __CONFIG_H__
3
4#include <app.h>
5#include <Elementary.h>
6#include <runtime_info.h>
7#include <efl_extension.h>
8#include <dlog.h>
9
10#ifdef LOG_TAG
11#undef LOG_TAG
12#endif
13#define LOG_TAG "tile-matching-game"
14
15#if !defined(PACKAGE)
16#define PACKAGE "org.tizen.tile-matching-game"
17#endif
18
19#define EDJ_FILE_MAIN "edje/main.edj"
20#define EDJ_FILE_TILE "edje/tile.edj"
21#define GRP_MAIN "main"
22#define GRP_TILE "tile"
23#define TYPE_MAX 6
24#define TILE_PER_LINE 7
25#define TILE_MOVE_TIME 0.15
26#define GAME_TIME_SEC 40.0
27
28#define LIST_SAFE_FREE(list) { if(list) { eina_list_free(list); list = NULL; } }
29
30#define move_dir_x_get(dir) dir % 2
31#define move_dir_y_get(dir) dir / 2
32
33static const char *score_format = "Score : %04d";
34
35static inline void
36app_get_resource(const char *edj_file_in, char *edj_path_out, int edj_path_max)
37{
38 char *res_path = app_get_resource_path();
39 if (res_path) {
40 snprintf(edj_path_out, edj_path_max, "%s%s", res_path, edj_file_in);
41 free(res_path);
42 }
43}
44
45#endif /* __CONFIG_H__ */