void InitGlobalAnimEventsForCustomElements(void)
{
int m, a, p;
- int control;
// custom element events for global animations only relevant while playing
m = GAME_MODE_PLAYING;
for (a = 0; a < NUM_GLOBAL_ANIMS; a++)
{
int ctrl_id = GLOBAL_ANIM_ID_CONTROL_FIRST + a;
-
- control = global_anim_info[ctrl_id].graphic[GLOBAL_ANIM_ID_PART_BASE][m];
+ int control = global_anim_info[ctrl_id].graphic[GLOBAL_ANIM_ID_PART_BASE][m];
// if no base animation parameters defined, use default values
if (control == IMG_UNDEFINED)
Bitmap *fade_bitmap =
(drawing_target == DRAW_TO_FADE_SOURCE ? gfx.fade_bitmap_source :
drawing_target == DRAW_TO_FADE_TARGET ? gfx.fade_bitmap_target : NULL);
- int alpha = (c->fade_mode & FADE_MODE_FADE ? part->fade_alpha : g->alpha);
+ int alpha = ((c->fade_mode & FADE_MODE_FADE) != 0 ? part->fade_alpha : g->alpha);
int x, y;
for (y = 0; y < c->stacked_yfactor; y++)
boolean before_fading = (global.anim_status == GAME_MODE_PSEUDO_FADING);
boolean after_fading = (anim_status_last == GAME_MODE_PSEUDO_FADING);
int anim_classes_next = game_mode_anim_classes[global.anim_status_next];
- int i;
if (drawing_target == DRAW_TO_FADE_TARGET)
after_fading = TRUE;
void RestartGlobalAnimsByStatus(int status)
{
- int anim_status_last = global.anim_status;
+ int global_anim_status_last = global.anim_status;
global.anim_status = status;
// force restarting global animations by changed global animation status
DrawGlobalAnimationsExt(DRAW_TO_SCREEN, DRAW_GLOBAL_ANIM_STAGE_RESTART);
- global.anim_status = anim_status_last;
+ global.anim_status = global_anim_status_last;
}
void SetAnimStatusBeforeFading(int status)
// fill element list
for (i = 0; editor_elements_info[i].setup_value != NULL; i++)
{
- boolean found_inactive_cascade = FALSE;
-
if (*editor_elements_info[i].setup_value)
{
+ boolean found_inactive_cascade = FALSE;
+
if (setup.editor.el_headlines)
{
// required for correct padding of palette headline buttons
{
int copy_mode_orig = copy_mode;
- if (copy_mode == GADGET_ID_CUSTOM_COPY)
+ if (element_old == -1 || element_new == -1) // special case for copy/paste element
{
- element_new = (IS_CUSTOM_ELEMENT(element_old) ?
- EL_INTERNAL_CLIPBOARD_CUSTOM : EL_INTERNAL_CLIPBOARD_GROUP);
- copy_mode = GADGET_ID_CUSTOM_COPY_TO;
- }
- else if (copy_mode == GADGET_ID_CUSTOM_PASTE)
- {
- element_old = (IS_CUSTOM_ELEMENT(element_new) ?
- EL_INTERNAL_CLIPBOARD_CUSTOM : EL_INTERNAL_CLIPBOARD_GROUP);
- copy_mode = GADGET_ID_CUSTOM_COPY_TO;
+ if (copy_mode == GADGET_ID_CUSTOM_COPY)
+ {
+ element_new = (IS_CUSTOM_ELEMENT(element_old) ?
+ EL_INTERNAL_CLIPBOARD_CUSTOM : EL_INTERNAL_CLIPBOARD_GROUP);
+ copy_mode = GADGET_ID_CUSTOM_COPY_TO;
+ }
+ else if (copy_mode == GADGET_ID_CUSTOM_PASTE)
+ {
+ element_old = (IS_CUSTOM_ELEMENT(element_new) ?
+ EL_INTERNAL_CLIPBOARD_CUSTOM : EL_INTERNAL_CLIPBOARD_GROUP);
+ copy_mode = GADGET_ID_CUSTOM_COPY_TO;
- level.changed = TRUE;
+ level.changed = TRUE;
+ }
}
else if (IS_CUSTOM_ELEMENT(element_old) && !IS_CUSTOM_ELEMENT(element_new))
{
int num_elements_in_level = 0;
int num_similar_in_level = 0;
int num_hires_tiles_in_level = 0;
- int num_standard_properties = 0;
int font1_nr = FONT_TEXT_1;
int font2_nr = FONT_TEXT_2;
int font1_width = getFontWidth(font1_nr);
level.game_engine_type == GAME_ENGINE_TYPE_EM ||
level.game_engine_type == GAME_ENGINE_TYPE_SP)
{
+ int num_standard_properties = 0;
+
DrawTextS(xpos, ypos, font1_nr, properties_text);
ypos += line1_height;