From 00b21e4b964f2584a846c8a5813205f612d3f8ba Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Wed, 17 Sep 2008 20:24:08 +0000 Subject: [PATCH] - Apparently, YASM is not a suitable substitute for NASM when doing Win32 builds. - Removed extraneous printf parameter for Texman.Init startup message. - Added newlines to the ends of a few headers that were missing them. - Fixed more GCC errors/warnings. SVN r1232 (trunk) --- src/CMakeLists.txt | 26 +++++++++++++------------- src/basictypes.h | 2 +- src/d_main.cpp | 2 +- src/g_shared/a_randomspawner.cpp | 2 +- src/m_png.h | 4 +--- src/p_user.cpp | 2 +- src/s_advsound.cpp | 5 ++++- src/sound/fmodsound.cpp | 1 + src/sound/i_soundinternal.h | 2 +- src/sound/music_mus_midiout.cpp | 1 + src/st_stuff.cpp | 2 +- src/textures/warptexture.cpp | 2 +- src/thingdef/thingdef.cpp | 3 ++- src/v_font.cpp | 2 +- src/v_video.h | 7 ------- 15 files changed, 30 insertions(+), 33 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 1dea1836b..be38b4fea 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -181,21 +181,21 @@ if( NOT NO_ASM ) find_program( NASM_PATH NAMES ${NASM_NAMES} ) find_program( YASM_PATH yasm ) - if( YASM_PATH ) - set( ASSEMBLER ${YASM_PATH} ) - else( YASM_PATH ) - if( X64 ) + if( X64 ) + if( YASM_PATH ) + set( ASSEMBLER ${YASM_PATH} ) + else( YASM_PATH ) message( STATUS "Could not find YASM. Disabling assembly code." ) set( NO_ASM ON ) - else( X64 ) - if( NOT NASM_PATH ) - message( STATUS "Could not find YASM or NASM. Disabling assembly code." ) - set( NO_ASM ON ) - else( NOT NASM_PATH ) - set( ASSEMBLER ${NASM_PATH} ) - endif( NOT NASM_PATH ) - endif( X64 ) - endif( YASM_PATH ) + endif( YASM_PATH ) + else( X64 ) + if( NASM_PATH ) + set( ASSEMBLER ${NASM_PATH} ) + else( NASM_PATH ) + message( STATUS "Could not find NASM. Disabling assembly code." ) + set( NO_ASM ON ) + endif( NASM_PATH ) + endif( X64 ) endif( UNIX AND X64 ) # I think the only reason there was a version requirement was because the diff --git a/src/basictypes.h b/src/basictypes.h index 317878e11..98b44c9d6 100644 --- a/src/basictypes.h +++ b/src/basictypes.h @@ -95,4 +95,4 @@ typedef DWORD dsfixed_t; // fixedpt used by span drawer #endif -#endif \ No newline at end of file +#endif diff --git a/src/d_main.cpp b/src/d_main.cpp index 214d20460..4be27e69b 100644 --- a/src/d_main.cpp +++ b/src/d_main.cpp @@ -2481,7 +2481,7 @@ void D_DoomMain (void) StartScreen->AppendStatusLine(temp); } - Printf ("Texman.Init: Init texture manager.\n", GameNames[gameinfo.gametype]); + Printf ("Texman.Init: Init texture manager.\n"); TexMan.Init(); // [RH] Parse through all loaded mapinfo lumps diff --git a/src/g_shared/a_randomspawner.cpp b/src/g_shared/a_randomspawner.cpp index 4581b9c99..0c520fc6c 100644 --- a/src/g_shared/a_randomspawner.cpp +++ b/src/g_shared/a_randomspawner.cpp @@ -23,7 +23,7 @@ class ARandomSpawner : public AActor void PostBeginPlay() { - AActor *newmobj; + AActor *newmobj = NULL; FDropItem *di; // di will be our drop item list iterator FDropItem *drop; // while drop stays as the reference point. int n=0; diff --git a/src/m_png.h b/src/m_png.h index 8dd7c01a5..aabcc978f 100644 --- a/src/m_png.h +++ b/src/m_png.h @@ -36,8 +36,6 @@ #include #include "doomtype.h" -enum ESSType; - // PNG Writing -------------------------------------------------------------- // Start writing an 8-bit palettized PNG file. @@ -116,4 +114,4 @@ class FTexture; FTexture *PNGTexture_CreateFromFile(PNGHandle *png, const FString &filename); -#endif \ No newline at end of file +#endif diff --git a/src/p_user.cpp b/src/p_user.cpp index 7a573baef..36c002a73 100644 --- a/src/p_user.cpp +++ b/src/p_user.cpp @@ -221,8 +221,8 @@ player_t::player_t() momy(0), centering(0), turnticks(0), - oldbuttons(0), attackdown(0), + oldbuttons(0), health(0), inventorytics(0), CurrentPlayerClass(0), diff --git a/src/s_advsound.cpp b/src/s_advsound.cpp index 3bc4e993b..4117930b8 100644 --- a/src/s_advsound.cpp +++ b/src/s_advsound.cpp @@ -342,7 +342,10 @@ int S_PickReplacement (int refid) unsigned int S_GetMSLength(FSoundID sound) { - if (sound < 0 || sound >= S_sfx.Size()) return 0; + if ((unsigned int)sound >= S_sfx.Size()) + { + return 0; + } sfxinfo_t *sfx = &S_sfx[sound]; diff --git a/src/sound/fmodsound.cpp b/src/sound/fmodsound.cpp index dc29295e1..6179b7beb 100644 --- a/src/sound/fmodsound.cpp +++ b/src/sound/fmodsound.cpp @@ -44,6 +44,7 @@ extern HWND Window; #define FALSE 0 #define TRUE 1 #endif +#include #include "templates.h" #include "fmodsound.h" diff --git a/src/sound/i_soundinternal.h b/src/sound/i_soundinternal.h index 47f5d1812..9f6fe6d87 100644 --- a/src/sound/i_soundinternal.h +++ b/src/sound/i_soundinternal.h @@ -101,4 +101,4 @@ struct FISoundChannel -#endif \ No newline at end of file +#endif diff --git a/src/sound/music_mus_midiout.cpp b/src/sound/music_mus_midiout.cpp index d38729326..fd46dcdfe 100644 --- a/src/sound/music_mus_midiout.cpp +++ b/src/sound/music_mus_midiout.cpp @@ -33,6 +33,7 @@ // HEADER FILES ------------------------------------------------------------ +#include #include "i_musicinterns.h" #include "templates.h" #include "doomdef.h" diff --git a/src/st_stuff.cpp b/src/st_stuff.cpp index af7287879..f0ee5ba8f 100644 --- a/src/st_stuff.cpp +++ b/src/st_stuff.cpp @@ -346,7 +346,7 @@ bool ST_Responder (event_t *ev) static int counts[] = { countof(DoomCheats), countof(HereticCheats), countof(HexenCheats), countof(StrifeCheats), countof(ChexCheats), countof(SpecialCheats) }; - for (int i=0; ibNoDecals; diff --git a/src/thingdef/thingdef.cpp b/src/thingdef/thingdef.cpp index 42b82c100..c9abe1daf 100644 --- a/src/thingdef/thingdef.cpp +++ b/src/thingdef/thingdef.cpp @@ -409,7 +409,8 @@ static void ParseActionDef (FScanner &sc, PClass *cls) if (hasdefaults) { sym->defaultparameterindex = StateParameters.Size(); - for(int i = 0; i < DefaultParams.Size(); i++) StateParameters.Push(DefaultParams[i]); + for(unsigned int i = 0; i < DefaultParams.Size(); i++) + StateParameters.Push(DefaultParams[i]); } else { diff --git a/src/v_font.cpp b/src/v_font.cpp index 3e3490310..2388e025d 100644 --- a/src/v_font.cpp +++ b/src/v_font.cpp @@ -1768,7 +1768,7 @@ void V_InitCustomFonts() return; wrong: - sc.ScriptError ("Invalid combination of properties in font '%s'", namebuffer); + sc.ScriptError ("Invalid combination of properties in font '%s'", namebuffer.GetChars()); } //========================================================================== diff --git a/src/v_video.h b/src/v_video.h index b02e4ea18..788b31902 100644 --- a/src/v_video.h +++ b/src/v_video.h @@ -114,13 +114,6 @@ enum HUD_HorizCenter }; -// Screenshot buffer image data types -enum ESSType -{ - SS_PAL, - SS_RGB, - SS_BGRA -}; class FFont; struct FRemapTable;