/* needed if last screen was the playing screen, invoked from level editor */
if (level_editor_test_game)
/* needed if last screen was the playing screen, invoked from level editor */
if (level_editor_test_game)
DelayReached(&level_delay, 0); /* reset delay counter */
}
else if (x == 1 && y >= 3 && y <= 10)
DelayReached(&level_delay, 0); /* reset delay counter */
}
else if (x == 1 && y >= 3 && y <= 10)
setup.player_name, FS_BIG, FC_YELLOW);
DrawGraphic(xpos + 6, ypos, GFX_KUGEL_ROT);
}
setup.player_name, FS_BIG, FC_YELLOW);
DrawGraphic(xpos + 6, ypos, GFX_KUGEL_ROT);
}
{
xpos--;
setup.player_name[xpos] = 0;
DrawGraphic(xpos + 6, ypos, GFX_KUGEL_ROT);
DrawGraphic(xpos + 7, ypos, GFX_LEERRAUM);
}
{
xpos--;
setup.player_name[xpos] = 0;
DrawGraphic(xpos + 6, ypos, GFX_KUGEL_ROT);
DrawGraphic(xpos + 7, ypos, GFX_LEERRAUM);
}
{
DrawText(SX + 6*32, SY + ypos*32, setup.player_name, FS_BIG, FC_RED);
DrawGraphic(xpos + 6, ypos, GFX_LEERRAUM);
{
DrawText(SX + 6*32, SY + ypos*32, setup.player_name, FS_BIG, FC_RED);
DrawGraphic(xpos + 6, ypos, GFX_LEERRAUM);
int max_buffer_len = (SCR_FIELDX - 2) * 2;
int num_leveldirs = numLevelDirInfoInGroup(leveldir_current);
int max_buffer_len = (SCR_FIELDX - 2) * 2;
int num_leveldirs = numLevelDirInfoInGroup(leveldir_current);
- XFillRectangle(display, backbuffer, gc, SX, SY, SXSIZE - 32, SYSIZE);
+ ClearRectangle(backbuffer, SX, SY, SXSIZE - 32, SYSIZE);
redraw_mask |= REDRAW_FIELD;
DrawText(SX, SY, "Level Directories", FS_BIG, FC_GREEN);
redraw_mask |= REDRAW_FIELD;
DrawText(SX, SY, "Level Directories", FS_BIG, FC_GREEN);
node_first = getLevelDirInfoFirstGroupEntry(leveldir_current);
node = getLevelDirInfoFromPos(node_first, leveldir_pos);
node_first = getLevelDirInfoFirstGroupEntry(leveldir_current);
node = getLevelDirInfoFromPos(node_first, leveldir_pos);
- XFillRectangle(display, drawto, gc, SX + 32, SY + 32, SXSIZE - 64, 32);
+ ClearRectangle(drawto, SX + 32, SY + 32, SXSIZE - 64, 32);
if (node->parent_link)
DrawTextFCentered(40, FC_RED, "leave group \"%s\"", node->class_desc);
if (node->parent_link)
DrawTextFCentered(40, FC_RED, "leave group \"%s\"", node->class_desc);
DrawText(SX + 3*32, SY + ypos*32,
(setup.input[player_nr].use_joystick ?
custom[i].text :
DrawText(SX + 3*32, SY + ypos*32,
(setup.input[player_nr].use_joystick ?
custom[i].text :
DrawText(SX, SY + (2+2*step_nr+1)*32,
"Key:", FS_BIG, FC_RED);
DrawText(SX + 4*32, SY + (2+2*step_nr+1)*32,
DrawText(SX, SY + (2+2*step_nr+1)*32,
"Key:", FS_BIG, FC_RED);
DrawText(SX + 4*32, SY + (2+2*step_nr+1)*32,
DrawText(SX + 4*32, SY + (2+2*step_nr+1)*32,
" ", FS_BIG, FC_YELLOW);
DrawText(SX + 4*32, SY + (2+2*step_nr+1)*32,
DrawText(SX + 4*32, SY + (2+2*step_nr+1)*32,
" ", FS_BIG, FC_YELLOW);
DrawText(SX + 4*32, SY + (2+2*step_nr+1)*32,
DrawText(SX, SY+(2+2*step_nr+1)*32,
"Key:", FS_BIG, FC_RED);
DrawText(SX + 4*32, SY+(2+2*step_nr+1)*32,
DrawText(SX, SY+(2+2*step_nr+1)*32,
"Key:", FS_BIG, FC_RED);
DrawText(SX + 4*32, SY+(2+2*step_nr+1)*32,
if (read(joystick_fd, &joy_ctrl, sizeof(joy_ctrl)) != sizeof(joy_ctrl))
{
joystick_status = JOYSTICK_OFF;
goto error_out;
}
if (read(joystick_fd, &joy_ctrl, sizeof(joy_ctrl)) != sizeof(joy_ctrl))
{
joystick_status = JOYSTICK_OFF;
goto error_out;
}
new_joystick_xleft = MIN(new_joystick_xleft, joy_ctrl.x);
new_joystick_xright = MAX(new_joystick_xright, joy_ctrl.x);
new_joystick_xleft = MIN(new_joystick_xleft, joy_ctrl.x);
new_joystick_xright = MAX(new_joystick_xright, joy_ctrl.x);
- while(Joystick(player_nr) & JOY_BUTTON);
+
+ /* wait until the last pressed button was released */
+ while(Joystick(player_nr) & JOY_BUTTON)
+ {
+ if (PendingEvent()) /* got event */
+ {
+ Event event;
+
+ NextEvent(&event);
+ HandleOtherEvents(&event);
+ }
+ }
GDI_HEIGHT, height,
GDI_TYPE, GD_TYPE_NORMAL_BUTTON,
GDI_STATE, GD_BUTTON_UNPRESSED,
GDI_HEIGHT, height,
GDI_TYPE, GD_TYPE_NORMAL_BUTTON,
GDI_STATE, GD_BUTTON_UNPRESSED,
- GDI_DESIGN_UNPRESSED, gd_pixmap, gd_x1, gd_y1,
- GDI_DESIGN_PRESSED, gd_pixmap, gd_x2, gd_y2,
+ GDI_DESIGN_UNPRESSED, gd_bitmap, gd_x1, gd_y1,
+ GDI_DESIGN_PRESSED, gd_bitmap, gd_x2, gd_y2,
GDI_EVENT_MASK, event_mask,
GDI_CALLBACK_ACTION, HandleScreenGadgets,
GDI_END);
GDI_EVENT_MASK, event_mask,
GDI_CALLBACK_ACTION, HandleScreenGadgets,
GDI_END);
int gd_x1, gd_x2, gd_y1, gd_y2;
struct GadgetInfo *gi;
int items_max, items_visible, item_position;
int gd_x1, gd_x2, gd_y1, gd_y2;
struct GadgetInfo *gi;
int items_max, items_visible, item_position;
GDI_SCROLLBAR_ITEMS_VISIBLE, items_visible,
GDI_SCROLLBAR_ITEM_POSITION, item_position,
GDI_STATE, GD_BUTTON_UNPRESSED,
GDI_SCROLLBAR_ITEMS_VISIBLE, items_visible,
GDI_SCROLLBAR_ITEM_POSITION, item_position,
GDI_STATE, GD_BUTTON_UNPRESSED,
- GDI_DESIGN_UNPRESSED, gd_pixmap, gd_x1, gd_y1,
- GDI_DESIGN_PRESSED, gd_pixmap, gd_x2, gd_y2,
+ GDI_DESIGN_UNPRESSED, gd_bitmap, gd_x1, gd_y1,
+ GDI_DESIGN_PRESSED, gd_bitmap, gd_x2, gd_y2,
GDI_BORDER_SIZE, SC_BORDER_SIZE,
GDI_EVENT_MASK, event_mask,
GDI_CALLBACK_ACTION, HandleScreenGadgets,
GDI_BORDER_SIZE, SC_BORDER_SIZE,
GDI_EVENT_MASK, event_mask,
GDI_CALLBACK_ACTION, HandleScreenGadgets,