}
// apply special settings to pointer-style animations
- if (part->control_info.class == get_hash_from_string("pointer"))
+ if (isClass(part->control_info.class, "pointer"))
{
// force pointer-style animations to be checked for clicks first
part->control_info.draw_order = 1000000;
boolean changed = FALSE;
if (part->last_anim_status == global.anim_status &&
- part->control_info.class != get_hash_from_string("pointer"))
+ !isClass(part->control_info.class, "pointer"))
return FALSE;
part->last_anim_status = global.anim_status;
part->class_playfield_or_door = FALSE;
- if (part->control_info.class == get_hash_from_string("window") ||
- part->control_info.class == get_hash_from_string("border"))
+ if (isClass(part->control_info.class, "window") ||
+ isClass(part->control_info.class, "border"))
{
viewport_x = 0;
viewport_y = 0;
part->drawing_stage = DRAW_GLOBAL_ANIM_STAGE_2;
}
- else if (part->control_info.class == get_hash_from_string("pointer"))
+ else if (isClass(part->control_info.class, "pointer"))
{
int mx = MIN(MAX(0, gfx.mouse_x), WIN_XSIZE - 1);
int my = MIN(MAX(0, gfx.mouse_y), WIN_YSIZE - 1);
if (global.anim_status != GAME_MODE_LOADING)
gfx.cursor_mode_override = CURSOR_NONE;
}
- else if (part->control_info.class == get_hash_from_string("door_1"))
+ else if (isClass(part->control_info.class, "door_1"))
{
viewport_x = DX;
viewport_y = DY;
part->class_playfield_or_door = TRUE;
}
- else if (part->control_info.class == get_hash_from_string("door_2"))
+ else if (isClass(part->control_info.class, "door_2"))
{
if (part->mode_nr == GAME_MODE_EDITOR)
{
part->viewport_width = viewport_width;
part->viewport_height = viewport_height;
- if (part->control_info.class != get_hash_from_string("pointer"))
+ if (!isClass(part->control_info.class, "pointer"))
changed = TRUE;
}
part->step_yoffset = 0;
}
- if (part->control_info.class != get_hash_from_string("pointer"))
+ if (!isClass(part->control_info.class, "pointer"))
{
if (c->x != ARG_UNDEFINED_VALUE)
part->x = c->x;
// if request dialog is active, only handle pointer-style animations
if (game.request_active &&
- part->control_info.class != get_hash_from_string("pointer"))
+ !isClass(part->control_info.class, "pointer"))
continue;
if (clicked_event == ANIM_CLICKED_RESET)
if (PANEL_DEACTIVATED(pos))
continue;
- if (pos->class == get_hash_from_string("extra_panel_items") &&
+ if (isClass(pos->class, "extra_panel_items") &&
!setup.prefer_extra_panel_items)
continue;
- if (pos->class == get_hash_from_string("bd_pre_hatching") &&
+ if (isClass(pos->class, "bd_pre_hatching") &&
(level.game_engine_type != GAME_ENGINE_TYPE_BD || game_bd.game->cave->hatched))
continue;
- if (pos->class == get_hash_from_string("bd_post_hatching") &&
+ if (isClass(pos->class, "bd_post_hatching") &&
(level.game_engine_type == GAME_ENGINE_TYPE_BD && !game_bd.game->cave->hatched))
continue;
int width, height;
int dst_x = PANEL_XPOS(pos);
int dst_y = PANEL_YPOS(pos);
- boolean skip = (pos->class == get_hash_from_string("mm_engine_only") &&
+ boolean skip = (isClass(pos->class, "mm_engine_only") &&
level.game_engine_type != GAME_ENGINE_TYPE_MM);
if (graphic != IMG_UNDEFINED && !skip)