X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=blobdiff_plain;f=src%2Fmain.c;h=aa4d14bd74124685ac61702223f0ce6411672eda;hp=2395ec1b708f19e5bacf74727bedb65f6239bee7;hb=c4baa69cc8d5e8398425e67498b49f4b77f8e477;hpb=4b0f1eb4220d2dbe4cffb288f745661b32c96a5b diff --git a/src/main.c b/src/main.c index 2395ec1b..aa4d14bd 100644 --- a/src/main.c +++ b/src/main.c @@ -14,6 +14,7 @@ #include "main.h" #include "init.h" +#include "game.h" #include "events.h" #include "sound.h" #include "joystick.h" @@ -23,17 +24,12 @@ #endif Display *display; +Visual *visual; int screen; Window window; -GC gc, clip_gc[NUM_PIXMAPS]; +GC gc, clip_gc[NUM_PIXMAPS], tile_clip_gc; Pixmap pix[NUM_PIXMAPS]; -Pixmap clipmask[NUM_PIXMAPS]; - - -Pixmap test_pix[NUM_PICTURES]; -Pixmap test_clipmask[NUM_PICTURES]; -int test_picture_count = 0; - +Pixmap clipmask[NUM_PIXMAPS], tile_clipmask[NUM_TILES]; #ifdef XPM_INCLUDE_FILE XpmAttributes xpm_att[NUM_PICTURES]; @@ -49,7 +45,6 @@ int joystick_device = 0; char *joystick_device_name[2] = { DEV_JOYSTICK_0, DEV_JOYSTICK_1 }; char *level_directory = LEVEL_PATH; int width, height; -unsigned long pen_fg, pen_bg; int game_status = MAINMENU; int game_emulation = EMU_NONE; @@ -69,6 +64,7 @@ int fading_on = FALSE; int autorecord_on = FALSE; int joystick_nr = 0; int quick_doors = FALSE; +int cpu_friendly = TRUE; BOOL redraw[MAX_BUF_XSIZE][MAX_BUF_YSIZE]; int redraw_x1 = 0, redraw_y1 = 0; @@ -93,6 +89,7 @@ int level_nr, leveldir_nr, num_leveldirs; int lev_fieldx,lev_fieldy, scroll_x,scroll_y; int FX = SX, FY = SY, ScreenMovPos = 0, ScrollStepSize = TILEX/8; +int GameSpeed = GAME_FRAME_DELAY, MoveSpeed = 8; int BX1 = 0, BY1 = 0, BX2 = SCR_FIELDX-1, BY2 = SCR_FIELDY-1; int JX,JY, lastJX,lastJY, ZX,ZY, ExitX,ExitY; int PlayerMovDir, PlayerMovPos, PlayerPushing;