X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fmain.c;h=b52761b3722d9f63801da2c622c14f98edcdfec6;hb=34b9fd6b89ffe8fa0637840118b43e4d36bb1798;hp=4f178700577979f0f3bc013c16d2954cb02c9a52;hpb=19e3dfa321d39a822bda8fa489fb76f25f9f9165;p=rocksndiamonds.git diff --git a/src/main.c b/src/main.c index 4f178700..b52761b3 100644 --- a/src/main.c +++ b/src/main.c @@ -14,16 +14,22 @@ #include "main.h" #include "init.h" +#include "game.h" #include "events.h" #include "sound.h" #include "joystick.h" +#ifdef MSDOS +#include +#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 clipmask[NUM_PIXMAPS], tile_clipmask[NUM_TILES]; #ifdef XPM_INCLUDE_FILE XpmAttributes xpm_att[NUM_PICTURES]; @@ -39,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; @@ -82,21 +87,20 @@ long Elementeigenschaften[MAX_ELEMENTS]; int level_nr, leveldir_nr, num_leveldirs; int lev_fieldx,lev_fieldy, scroll_x,scroll_y; -int FX = SX, FY = SY, ScreenMovPos = 0, ScrollSteps = TILEX/4; +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, *actual_player; struct HiScore highscore[MAX_SCORE_ENTRIES]; struct SoundInfo Sound[NUM_SOUNDS]; struct RecordingInfo tape; @@ -188,6 +192,10 @@ int main(int argc, char *argv[]) if (argc>1) level_directory = argv[1]; +#ifdef MSDOS + _fmode = O_BINARY; +#endif + OpenAll(argc,argv); EventLoop(); CloseAll();