foxygit / doom Log in
commit 664c35903202a2e7c56479eff1786e952718e4df
Merge: ebc83786 144849ee
Author:     Simon Howard <fraggle@gmail.com>
AuthorDate: Thu May 14 19:45:22 2009 +0000
Commit:     Simon Howard <fraggle@gmail.com>
CommitDate: Thu May 14 19:45:22 2009 +0000

    Merge from trunk. Note that src/i_sdlsound.c has not yet been merged as
    it contains too many conflicts at present.

    Subversion-branch: /branches/raven-branch
    Subversion-revision: 1522

 pcsound/pcsound_sdl.c            |    7 +-
 src/i_main.c                     |   23 +-
 src/setup/multiplayer.c          |   42 +-
 textscreen/Makefile.am           |    3 +-
 textscreen/examples/calculator.c |   25 +
 textscreen/examples/guitest.c    |   29 +
 textscreen/txt_desktop.c         |   11 +-
 textscreen/txt_font.h            |    9 +-
 textscreen/txt_inputbox.c        |    2 +
 textscreen/txt_sdl.c             |   80 +-
 textscreen/txt_smallfont.h       | 2884 ++++++++++++++++++++++++++++++++++++++
 11 files changed, 3080 insertions(+), 35 deletions(-)

diff --cc src/i_main.c
index a0b0bfd5,3a9ec696..c1a9cb98
--- a/src/i_main.c
+++ b/src/i_main.c
@@@ -28,29 -29,10 +28,17 @@@

  #include "SDL.h"

- #include <signal.h>
-
- #ifdef _WIN32
- #define WIN32_LEAN_AND_MEAN
- #include <windows.h>
- #endif
-
- #ifdef HAVE_SCHED_SETAFFINITY
- #include <unistd.h>
- #include <sched.h>
- #endif
-
 -#include "doomdef.h"
 +#include "doomtype.h"
  #include "i_system.h"
  #include "m_argv.h"
 -#include "d_main.h"
 +
 +//
 +// D_DoomMain()
 +// Not a globally visible function, just included for source reference,
 +// calls all startup code, parses command line options.
 +//
 +
 +void D_DoomMain (void);

  #if defined(_WIN32)

diff --cc src/setup/multiplayer.c
index 2157b43c,ee46c3f1..6756e53c
--- a/src/setup/multiplayer.c
+++ b/src/setup/multiplayer.c
@@@ -37,16 -35,34 +37,22 @@@
  #define NUM_WADS 10
  #define NUM_EXTRA_PARAMS 10

 -typedef struct
 -{
 -    char *filename;
 -    char *description;
 -    int mask;
 -} iwad_t;
 -
  typedef enum
  {
 -    WARP_DOOM1,
 -    WARP_DOOM2,
 +    WARP_ExMy,
 +    WARP_MAPxy,
  } warptype_t;

+ typedef enum
+ {
+     JOIN_AUTO_LAN,
+     JOIN_ADDRESS,
+ } jointype_t;
+
 -static iwad_t iwads[] =
 -{
 -    { "doom.wad",     "Doom",                                IWAD_DOOM },
 -    { "doom2.wad",    "Doom 2",                              IWAD_DOOM2 },
 -    { "tnt.wad",      "Final Doom: TNT: Evilution",          IWAD_TNT },
 -    { "plutonia.wad", "Final Doom: The Plutonia Experiment", IWAD_PLUTONIA },
 -    { "doom1.wad",    "Doom shareware",                      IWAD_DOOM1 },
 -    { "chex.wad",     "Chex Quest",                          IWAD_CHEX },
 -};
 +// Fallback IWAD if none are found to be installed
 +
 +static iwad_t fallback_iwad = { "doom2.wad", doom2, commercial, "Doom II" };
 +static iwad_t *fallback_iwad_list[2] = { &fallback_iwad, NULL };

  // Array of IWADs found to be installed

@@@ -115,9 -101,11 +121,11 @@@ static char *gamemodes[]
      "Deathmatch 2.0",
  };

 -char *net_player_name;
 -char *chat_macros[10];
 +static char *net_player_name;
 +static char *chat_macros[10];

+ static int jointype = JOIN_ADDRESS;
+
  static char *wads[NUM_WADS];
  static char *extra_params[NUM_EXTRA_PARAMS];
  static int skill = 2;
diff --cc textscreen/txt_sdl.c
index d695c898,1bc42d7c..ea2280d0
--- a/textscreen/txt_sdl.c
+++ b/textscreen/txt_sdl.c
@@@ -115,15 -166,12 +166,16 @@@ static void ChooseFont(void

  int TXT_Init(void)
  {
 +    int flags;
 +
      SDL_InitSubSystem(SDL_INIT_VIDEO);

 +    flags = SDL_SWSURFACE | SDL_HWPALETTE | SDL_DOUBLEBUF;
 +
-     screen = SDL_SetVideoMode(TXT_SCREEN_W * CHAR_W,
-                               TXT_SCREEN_H * CHAR_H,
-                               8, flags);
+     ChooseFont();
+
+     screen = SDL_SetVideoMode(TXT_SCREEN_W * font->w,
 -                              TXT_SCREEN_H * font->h, 8, 0);
++                              TXT_SCREEN_H * font->h, 8, flags);

      if (screen == NULL)
          return 0;