summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Juyung Seo <juyung.seo@samsung.com>2014-11-01 02:41:53 +0900
committerDaniel Juyung Seo <juyung.seo@samsung.com>2014-11-01 02:41:53 +0900
commit6f7a6b3776fac483e5a82e5027e2c2f4728edb03 (patch)
tree568e75ede1785f30096324382d7397eed5588db7
parent2fc15b19ef989def12fed6d5e09f6fc82c27bd84 (diff)
all: Fix formatting.
-rw-r--r--src/main.c2
-rw-r--r--src/tile.c10
-rw-r--r--src/tile_animation.c4
-rw-r--r--src/tile_control.c18
4 files changed, 17 insertions, 17 deletions
diff --git a/src/main.c b/src/main.c
index 0817f7c..383c229 100644
--- a/src/main.c
+++ b/src/main.c
@@ -67,7 +67,7 @@ start_button_clicked_cb(void *data, Evas_Object *obj, void *event_info)
67 ad->seconds = 0; 67 ad->seconds = 0;
68 68
69 edje_object_part_geometry_get(elm_layout_edje_get(ad->layout), "middle_bg", 69 edje_object_part_geometry_get(elm_layout_edje_get(ad->layout), "middle_bg",
70 &x, &y, &w, &h); 70 &x, &y, &w, &h);
71 ad->tile_size = w/TILE_PER_LINE; 71 ad->tile_size = w/TILE_PER_LINE;
72 offset = (h - ad->tile_size * TILE_PER_LINE) / 2; 72 offset = (h - ad->tile_size * TILE_PER_LINE) / 2;
73 ad->start_x = x; 73 ad->start_x = x;
diff --git a/src/tile.c b/src/tile.c
index 3920f4b..dd25ff8 100644
--- a/src/tile.c
+++ b/src/tile.c
@@ -29,17 +29,17 @@ tile_type_reset(tile_info_s *info)
29void 29void
30tile_standby_set(tile_info_s *info, int col, int row) 30tile_standby_set(tile_info_s *info, int col, int row)
31{ 31{
32 info->pos_x = col; 32 info->pos_x = col;
33 info->pos_y = row * -1; 33 info->pos_y = row * -1;
34 34
35 tile_type_reset(info); 35 tile_type_reset(info);
36 evas_object_move(info->obj, info->pos_x * info->size + info->start_x, -info->size + info->start_y); 36 evas_object_move(info->obj, info->pos_x * info->size + info->start_x, -info->size + info->start_y);
37} 37}
38 38
39void 39void
40tile_explosion(tile_info_s *info) 40tile_explosion(tile_info_s *info)
41{ 41{
42 tile_remove(info); 42 tile_remove(info);
43} 43}
44 44
45tile_info_s * 45tile_info_s *
diff --git a/src/tile_animation.c b/src/tile_animation.c
index bd4e64c..caf4df7 100644
--- a/src/tile_animation.c
+++ b/src/tile_animation.c
@@ -45,7 +45,7 @@ move_back_frame(void *data, double pos)
45 } 45 }
46 46
47 double frame = ecore_animator_pos_map(pos2, ECORE_POS_MAP_SINUSOIDAL, 0, 0); 47 double frame = ecore_animator_pos_map(pos2, ECORE_POS_MAP_SINUSOIDAL, 0, 0);
48 evas_object_move(info->obj, start_x + delta_x * frame, start_y + delta_y * frame ); 48 evas_object_move(info->obj, start_x + delta_x * frame, start_y + delta_y * frame );
49 49
50 if (pos >= 1.0) { 50 if (pos >= 1.0) {
51 tile_target_pos_set(info, info->pos_x, info->pos_y); 51 tile_target_pos_set(info, info->pos_x, info->pos_y);
@@ -101,7 +101,7 @@ move_match_frame(void *data, double pos)
101 evas_object_move(info->obj, start_x + delta_x * frame, 101 evas_object_move(info->obj, start_x + delta_x * frame,
102 start_y + delta_y * frame); 102 start_y + delta_y * frame);
103 evas_object_move(target_tile->obj, start_x + delta_x * (1.0 - frame), 103 evas_object_move(target_tile->obj, start_x + delta_x * (1.0 - frame),
104 start_y + delta_y * (1.0 - frame)); 104 start_y + delta_y * (1.0 - frame));
105 105
106 if (pos >= 1.0) { 106 if (pos >= 1.0) {
107 tile_pos_set(info, info->target_x, info->target_y); 107 tile_pos_set(info, info->target_x, info->target_y);
diff --git a/src/tile_control.c b/src/tile_control.c
index 852f091..36d96b3 100644
--- a/src/tile_control.c
+++ b/src/tile_control.c
@@ -82,7 +82,7 @@ tile_info_get_by_dir(tile_info_s* const tile_list[][TILE_PER_LINE], tile_info_s
82static tile_info_s * 82static tile_info_s *
83tile_target_get_by_dir(tile_info_s* tile_list[][TILE_PER_LINE], tile_info_s *info, move_direction_e dir) 83tile_target_get_by_dir(tile_info_s* tile_list[][TILE_PER_LINE], tile_info_s *info, move_direction_e dir)
84{ 84{
85 tile_info_s *swap = tile_info_get_by_dir(tile_list, info, dir); 85 tile_info_s *swap = tile_info_get_by_dir(tile_list, info, dir);
86 86
87 if (swap) { 87 if (swap) {
88 tile_target_pos_set(swap, info->pos_x, info->pos_y); 88 tile_target_pos_set(swap, info->pos_x, info->pos_y);
@@ -102,8 +102,8 @@ tile_triple_match_check_by_dir(tile_info_s* const tile_list[][TILE_PER_LINE], ti
102 tile_info_s *tile = NULL; 102 tile_info_s *tile = NULL;
103 103
104 tile = tile_info_get_by_index(tile_list, 104 tile = tile_info_get_by_index(tile_list,
105 info->target_x + move_dir_x_get(dir), 105 info->target_x + move_dir_x_get(dir),
106 info->target_y + move_dir_y_get(dir)); 106 info->target_y + move_dir_y_get(dir));
107 107
108 if (tile && (tile->type == info->type)) { 108 if (tile && (tile->type == info->type)) {
109 list = eina_list_append(list, tile); 109 list = eina_list_append(list, tile);
@@ -176,7 +176,7 @@ tile_line_down(appdata_s *ad, int x)
176 int start = -1; 176 int start = -1;
177 int cnt = 0 ; 177 int cnt = 0 ;
178 178
179 for (; y >= 0 ; --y) { 179 for (; y >= 0 ; --y) {
180 if (ad->tile_list[x][y] == NULL) { 180 if (ad->tile_list[x][y] == NULL) {
181 if (start == -1) 181 if (start == -1)
182 start = y; 182 start = y;
@@ -257,7 +257,7 @@ move_down_finish_cb(void *data, Evas_Object *obj, const char *emission, const ch
257 if (ad->explosion_list) 257 if (ad->explosion_list)
258 tile_chain_explosion(ad); 258 tile_chain_explosion(ad);
259 else 259 else
260 event_block_set(ad, EINA_FALSE); 260 event_block_set(ad, EINA_FALSE);
261} 261}
262 262
263static void 263static void
@@ -279,8 +279,8 @@ tile_mouse_move_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
279 279
280 Evas_Event_Mouse_Move*ev = event_info; 280 Evas_Event_Mouse_Move*ev = event_info;
281 281
282 ad->mouse_move_x += ev->cur.canvas.x - ev->prev.canvas.x; 282 ad->mouse_move_x += ev->cur.canvas.x - ev->prev.canvas.x;
283 ad->mouse_move_y += ev->cur.canvas.y - ev->prev.canvas.y; 283 ad->mouse_move_y += ev->cur.canvas.y - ev->prev.canvas.y;
284 284
285 move_direction_e dir = get_mouse_direction(ad->mouse_move_x, ad->mouse_move_y); 285 move_direction_e dir = get_mouse_direction(ad->mouse_move_x, ad->mouse_move_y);
286 if (dir == NONE) return; //mouse move distance is not enough to determine the direction of move tile 286 if (dir == NONE) return; //mouse move distance is not enough to determine the direction of move tile
@@ -290,8 +290,8 @@ tile_mouse_move_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
290 290
291 if (target_tile) { 291 if (target_tile) {
292 if (target_tile->type != selected_tile->type) { 292 if (target_tile->type != selected_tile->type) {
293 ad->explosion_list = eina_list_merge(tile_triple_match_get(ad->tile_list, selected_tile), 293 ad->explosion_list = eina_list_merge(tile_triple_match_get(ad->tile_list, selected_tile),
294 tile_triple_match_get(ad->tile_list, target_tile)); 294 tile_triple_match_get(ad->tile_list, target_tile));
295 } 295 }
296 if (ad->explosion_list == NULL) { 296 if (ad->explosion_list == NULL) {
297 ad->tile_list[selected_tile->pos_x][selected_tile->pos_y] = selected_tile; 297 ad->tile_list[selected_tile->pos_x][selected_tile->pos_y] = selected_tile;