X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fmain.c;h=2a8af5d08dce96805db896728142e65738cdedcc;hb=5e8d9d0308f76bb35e7578a8859d6f01977d0f69;hp=9028fb6bfd6ce40980ed4c0034aa3e872c95492a;hpb=3367ba5eaec57086e3c1013708967e8a995ef2e3;p=rocksndiamonds.git diff --git a/src/main.c b/src/main.c index 9028fb6b..2a8af5d0 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" @@ -26,9 +27,9 @@ 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 clipmask[NUM_PIXMAPS], tile_clipmask[NUM_TILES]; #ifdef XPM_INCLUDE_FILE XpmAttributes xpm_att[NUM_PICTURES]; @@ -44,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; @@ -77,6 +77,7 @@ int MovDir[MAX_LEV_FIELDX][MAX_LEV_FIELDY]; int MovDelay[MAX_LEV_FIELDX][MAX_LEV_FIELDY]; int Store[MAX_LEV_FIELDX][MAX_LEV_FIELDY]; int Store2[MAX_LEV_FIELDX][MAX_LEV_FIELDY]; +int StorePlayer[MAX_LEV_FIELDX][MAX_LEV_FIELDY]; int Frame[MAX_LEV_FIELDX][MAX_LEV_FIELDY]; int Stop[MAX_LEV_FIELDX][MAX_LEV_FIELDY]; int JustHit[MAX_LEV_FIELDX][MAX_LEV_FIELDY]; @@ -88,20 +89,17 @@ 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 GameFrameDelay = 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; -int PlayerFrame, PlayerGfxPos; int PlayerGone, LevelSolved, GameOver; -int FrameCounter, TimeFrames, TimeLeft, Score; -int Gems, SokobanFields, Lights, Friends; -int Dynamite, Key[4], MampferNr; -int DynaBombCount, DynaBombSize, DynaBombsLeft, DynaBombXL; -int SiebAktiv; +int FrameCounter, TimeFrames, TimeLeft; +int MampferNr, SiebAktiv; struct LevelDirInfo leveldir[MAX_LEVDIR_ENTRIES]; struct LevelInfo level; -struct PlayerInfo player; +struct PlayerInfo stored_player[MAX_PLAYERS+1]; +struct PlayerInfo *local_player, *player; struct HiScore highscore[MAX_SCORE_ENTRIES]; struct SoundInfo Sound[NUM_SOUNDS]; struct RecordingInfo tape;