projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
moved variables to higher position in scope
[rocksndiamonds.git]
/
src
/
editor.c
diff --git
a/src/editor.c
b/src/editor.c
index 7c9020702bf6c9aa3d99ca61f41b597a45aa983d..25edbb4b764a0735aacb4fa98ffa4c97d9b361e1 100644
(file)
--- a/
src/editor.c
+++ b/
src/editor.c
@@
-4713,7
+4713,12
@@
static int editor_el_deflektor[] =
EL_DF_STEEL_WALL,
EL_DF_WOODEN_WALL,
EL_DF_REFRACTOR,
EL_DF_STEEL_WALL,
EL_DF_WOODEN_WALL,
EL_DF_REFRACTOR,
- EL_DF_MINE
+ EL_DF_MINE,
+
+ EL_DF_SLOPE_1,
+ EL_DF_SLOPE_2,
+ EL_DF_SLOPE_3,
+ EL_DF_SLOPE_4
};
static int *editor_hl_deflektor_ptr = editor_hl_deflektor;
static int *editor_el_deflektor_ptr = editor_el_deflektor;
};
static int *editor_hl_deflektor_ptr = editor_hl_deflektor;
static int *editor_el_deflektor_ptr = editor_el_deflektor;
@@
-11702,6
+11707,12
@@
static void SetElementIntelliDraw(int x, int y, int dx, int dy, int new_element,
EL_DF_RECEIVER_DOWN,
EL_DF_RECEIVER_LEFT
},
EL_DF_RECEIVER_DOWN,
EL_DF_RECEIVER_LEFT
},
+ {
+ EL_DF_SLOPE_1,
+ EL_DF_SLOPE_4,
+ EL_DF_SLOPE_3,
+ EL_DF_SLOPE_2
+ },
{
-1,
{
-1,
@@
-12043,19
+12054,10
@@
static boolean isHiresDrawElement(int element)
static int numHiresTiles(int element)
{
static int numHiresTiles(int element)
{
- if (!IS_MM_WALL(element))
- return 1;
-
- int bits = MM_WALL_BITS(element);
- int num_bits = 0;
-
- while (bits)
- {
- bits &= bits - 1;
- num_bits++;
- }
+ if (IS_MM_WALL(element))
+ return get_number_of_bits(MM_WALL_BITS(element));
- return
num_bits
;
+ return
1
;
}
static void SetDrawModeHiRes(int element)
}
static void SetDrawModeHiRes(int element)