projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
changed simple "printf()" debug output to new debug log function
[rocksndiamonds.git]
/
src
/
editor.c
diff --git
a/src/editor.c
b/src/editor.c
index 2aba3638632873b3f022036f8d2e6827b5df00c5..d8b25777f431dd482f328d54da8d4255575c1782 100644
(file)
--- a/
src/editor.c
+++ b/
src/editor.c
@@
-5749,10
+5749,10
@@
static void ReinitializeElementList(void)
int element = (*editor_elements_info[i].element_list)[j];
if (element >= NUM_FILE_ELEMENTS)
int element = (*editor_elements_info[i].element_list)[j];
if (element >= NUM_FILE_ELEMENTS)
-
Error(ERR_WARN,
"editor element %d is runtime element", element);
+
Warn(
"editor element %d is runtime element", element);
if (strEqual(getElementInfoText(element), INFOTEXT_UNKNOWN_ELEMENT))
if (strEqual(getElementInfoText(element), INFOTEXT_UNKNOWN_ELEMENT))
-
Error(ERR_WARN,
"no element description text for element %d", element);
+
Warn(
"no element description text for element %d", element);
}
}
}
}
@@
-7151,7
+7151,7
@@
void CreateLevelEditorGadgets(void)
num_editor_gadgets = NUM_EDITOR_GADGETS;
num_editor_gadgets = NUM_EDITOR_GADGETS;
- //
printf(":::
allocating %d gadgets ...\n", num_editor_gadgets);
+ //
Debug("editor", "
allocating %d gadgets ...\n", num_editor_gadgets);
level_editor_gadget =
checked_calloc(num_editor_gadgets * sizeof(struct GadgetInfo *));
level_editor_gadget =
checked_calloc(num_editor_gadgets * sizeof(struct GadgetInfo *));
@@
-7189,7
+7189,7
@@
void FreeLevelEditorGadgets(void)
{
int i;
{
int i;
- //
printf(":::
freeing %d gadgets ...\n", num_editor_gadgets);
+ //
Debug("editor", "
freeing %d gadgets ...\n", num_editor_gadgets);
for (i = 0; i < num_editor_gadgets; i++)
{
for (i = 0; i < num_editor_gadgets; i++)
{
@@
-8408,8
+8408,7
@@
static void CheckElementDescriptions(void)
for (i = 0; i < NUM_FILE_ELEMENTS; i++)
if (getElementDescriptionFilename(i) == NULL && !IS_OBSOLETE(i))
for (i = 0; i < NUM_FILE_ELEMENTS; i++)
if (getElementDescriptionFilename(i) == NULL && !IS_OBSOLETE(i))
- Error(ERR_WARN, "no element description file for element '%s'",
- EL_NAME(i));
+ Warn("no element description file for element '%s'", EL_NAME(i));
}
#endif
}
#endif
@@
-12072,7
+12071,7
@@
static void CopyBrushExt(int from_x, int from_y, int to_x, int to_y,
mode == CB_BRUSH_TO_CLIPBOARD_SMALL)
SDL_SetClipboardText(text);
else
mode == CB_BRUSH_TO_CLIPBOARD_SMALL)
SDL_SetClipboardText(text);
else
- printf("%s", text);
+ Print("%s", text); // print brush data to console and log file
return;
}
return;
}
@@
-14112,13
+14111,13
@@
static void HandleControlButtons(struct GadgetInfo *gi)
}
#ifdef DEBUG
else if (gi->event.type == GD_EVENT_PRESSED)
}
#ifdef DEBUG
else if (gi->event.type == GD_EVENT_PRESSED)
-
printf("default: HandleControlButtons: GD_EVENT_PRESSED(%d)\n
", id);
+
Debug("editor", "default: HandleControlButtons: GD_EVENT_PRESSED(%d)
", id);
else if (gi->event.type == GD_EVENT_RELEASED)
else if (gi->event.type == GD_EVENT_RELEASED)
-
printf("default: HandleControlButtons: GD_EVENT_RELEASED(%d)\n
", id);
+
Debug("editor", "default: HandleControlButtons: GD_EVENT_RELEASED(%d)
", id);
else if (gi->event.type == GD_EVENT_MOVING)
else if (gi->event.type == GD_EVENT_MOVING)
-
printf("default: HandleControlButtons: GD_EVENT_MOVING(%d)\n
", id);
+
Debug("editor", "default: HandleControlButtons: GD_EVENT_MOVING(%d)
", id);
else
else
-
printf("default: HandleControlButtons: ? (id == %d)\n
", id);
+
Debug("editor", "default: HandleControlButtons: ? (id == %d)
", id);
#endif
break;
}
#endif
break;
}