projects
/
rocksndiamonds.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
39d365b
)
fixed sort order for empty elements in dynamic element list in level editor
author
Holger Schemel
<info@artsoft.org>
Thu, 23 Mar 2023 11:43:03 +0000
(12:43 +0100)
committer
Holger Schemel
<info@artsoft.org>
Thu, 23 Mar 2023 11:43:03 +0000
(12:43 +0100)
src/editor.c
patch
|
blob
|
history
diff --git
a/src/editor.c
b/src/editor.c
index 2c46dc655a898b5812915c332ce5bc38d07a93f6..415b54dc9b52bfd68a309eacac0bdd49929963ff 100644
(file)
--- a/
src/editor.c
+++ b/
src/editor.c
@@
-5765,14
+5765,18
@@
static void InitDynamicEditorElementList(int **elements, int *num_elements)
*num_elements = 0;
*num_elements = 0;
- // add all elements used in current level (non-custom/group elements)
+ // add all elements used in current level (non-custom/group
/empty
elements)
for (i = 0; i < NUM_FILE_ELEMENTS; i++)
for (i = 0; i < NUM_FILE_ELEMENTS; i++)
- if (element_found[i] && !(IS_CUSTOM_ELEMENT(i) || IS_GROUP_ELEMENT(i)))
+ if (element_found[i] && !(IS_CUSTOM_ELEMENT(i) ||
+ IS_GROUP_ELEMENT(i) ||
+ IS_EMPTY_ELEMENT(i)))
(*elements)[(*num_elements)++] = i;
(*elements)[(*num_elements)++] = i;
- // add all elements used in current level (custom/group elements)
+ // add all elements used in current level (custom/group
/empty
elements)
for (i = 0; i < NUM_FILE_ELEMENTS; i++)
for (i = 0; i < NUM_FILE_ELEMENTS; i++)
- if (element_found[i] && (IS_CUSTOM_ELEMENT(i) || IS_GROUP_ELEMENT(i)))
+ if (element_found[i] && (IS_CUSTOM_ELEMENT(i) ||
+ IS_GROUP_ELEMENT(i) ||
+ IS_EMPTY_ELEMENT(i)))
(*elements)[(*num_elements)++] = i;
while (*num_elements % 4) // pad with empty elements, if needed
(*elements)[(*num_elements)++] = i;
while (*num_elements % 4) // pad with empty elements, if needed