mirror of
https://github.com/ZDoom/qzdoom.git
synced 2025-02-17 17:41:23 +00:00
- Fixed: All clang 5.0 warnings.
- Renamed autostart/autozend since Xcode’s build process links in strictly alphabetical order.
This commit is contained in:
parent
cd3f5db16a
commit
d8ff4ec281
31 changed files with 57 additions and 81 deletions
|
@ -3,7 +3,7 @@ cmake_minimum_required( VERSION 2.4 )
|
||||||
make_release_only()
|
make_release_only()
|
||||||
|
|
||||||
if( "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" )
|
if( "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" )
|
||||||
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -fomit-frame-pointer" )
|
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wno-unused-parameter -fomit-frame-pointer" )
|
||||||
endif( "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" )
|
endif( "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" )
|
||||||
|
|
||||||
add_library( jpeg
|
add_library( jpeg
|
||||||
|
|
|
@ -412,7 +412,7 @@ if( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STRE
|
||||||
set( CMAKE_CXX_FLAGS_MINSIZEREL "${REL_CXX_FLAGS} ${CMAKE_CXX_FLAGS_MINSIZEREL}" )
|
set( CMAKE_CXX_FLAGS_MINSIZEREL "${REL_CXX_FLAGS} ${CMAKE_CXX_FLAGS_MINSIZEREL}" )
|
||||||
set( CMAKE_CXX_FLAGS_RELWITHDEBINFO "${REL_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELWITHDEBINFO}" )
|
set( CMAKE_CXX_FLAGS_RELWITHDEBINFO "${REL_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELWITHDEBINFO}" )
|
||||||
|
|
||||||
set( CMAKE_CXX_FLAGS "-Wall -Wno-unused -Wextra -Wno-missing-field-initializers ${CMAKE_CXX_FLAGS}" )
|
set( CMAKE_CXX_FLAGS "-Wall -Wextra -Wno-unused -Wno-unused-parameter -Wno-missing-field-initializers ${CMAKE_CXX_FLAGS}" )
|
||||||
|
|
||||||
# Remove extra warnings when using the official DirectX headers.
|
# Remove extra warnings when using the official DirectX headers.
|
||||||
# Also, TDM-GCC 4.4.0 no longer accepts glibc-style printf formats as valid,
|
# Also, TDM-GCC 4.4.0 no longer accepts glibc-style printf formats as valid,
|
||||||
|
@ -748,7 +748,7 @@ set( NOT_COMPILED_SOURCE_FILES
|
||||||
add_executable( zdoom WIN32
|
add_executable( zdoom WIN32
|
||||||
${HEADER_FILES}
|
${HEADER_FILES}
|
||||||
${NOT_COMPILED_SOURCE_FILES}
|
${NOT_COMPILED_SOURCE_FILES}
|
||||||
autostart.cpp
|
__autostart.cpp
|
||||||
${ASM_SOURCES}
|
${ASM_SOURCES}
|
||||||
${SYSTEM_SOURCES}
|
${SYSTEM_SOURCES}
|
||||||
${X86_SOURCES}
|
${X86_SOURCES}
|
||||||
|
@ -1052,7 +1052,7 @@ add_executable( zdoom WIN32
|
||||||
r_data/renderstyle.cpp
|
r_data/renderstyle.cpp
|
||||||
r_data/r_interpolate.cpp
|
r_data/r_interpolate.cpp
|
||||||
r_data/r_translate.cpp
|
r_data/r_translate.cpp
|
||||||
autozend.cpp
|
zzautozend.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
set_source_files_properties( xlat/parse_xlat.cpp PROPERTIES OBJECT_DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/xlat_parser.c" )
|
set_source_files_properties( xlat/parse_xlat.cpp PROPERTIES OBJECT_DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/xlat_parser.c" )
|
||||||
|
@ -1160,7 +1160,7 @@ source_group("Render Data\\Textures" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE
|
||||||
source_group("Render Interface" FILES r_defs.h r_renderer.h r_sky.cpp r_sky.h r_state.h r_utility.cpp r_utility.h)
|
source_group("Render Interface" FILES r_defs.h r_renderer.h r_sky.cpp r_sky.h r_state.h r_utility.cpp r_utility.h)
|
||||||
source_group("Resource Files" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/resourcefiles/.+")
|
source_group("Resource Files" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/resourcefiles/.+")
|
||||||
source_group("SDL Files" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/sdl/.+")
|
source_group("SDL Files" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/sdl/.+")
|
||||||
source_group("SFML" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/sfmt/.+")
|
source_group("SFMT" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/sfmt/.+")
|
||||||
source_group("Shared Game" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/g_shared/.+")
|
source_group("Shared Game" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/g_shared/.+")
|
||||||
source_group("Versioning" FILES version.h win32/zdoom.rc)
|
source_group("Versioning" FILES version.h win32/zdoom.rc)
|
||||||
source_group("Win32 Files" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/win32/.+")
|
source_group("Win32 Files" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/win32/.+")
|
||||||
|
|
|
@ -610,8 +610,6 @@ static int FlushLines (const char *start, const char *stop)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (i != TopLine)
|
|
||||||
i = i;
|
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -370,8 +370,8 @@ extern "C" void bz_internal_error (int errcode)
|
||||||
//
|
//
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
|
||||||
static void *SzAlloc(void *p, size_t size) { p = p; return malloc(size); }
|
static void *SzAlloc(void *, size_t size) { return malloc(size); }
|
||||||
static void SzFree(void *p, void *address) { p = p; free(address); }
|
static void SzFree(void *, void *address) { free(address); }
|
||||||
ISzAlloc g_Alloc = { SzAlloc, SzFree };
|
ISzAlloc g_Alloc = { SzAlloc, SzFree };
|
||||||
|
|
||||||
FileReaderLZMA::FileReaderLZMA (FileReader &file, size_t uncompressed_size, bool zip)
|
FileReaderLZMA::FileReaderLZMA (FileReader &file, size_t uncompressed_size, bool zip)
|
||||||
|
|
|
@ -73,6 +73,7 @@ public:
|
||||||
~DHUDPicManager() {}
|
~DHUDPicManager() {}
|
||||||
void Serialize(FArchive & ar);
|
void Serialize(FArchive & ar);
|
||||||
virtual void DoDraw (int linenum, int x, int y, int hudheight, float translucent);
|
virtual void DoDraw (int linenum, int x, int y, int hudheight, float translucent);
|
||||||
|
void DoDraw (int, int, int, bool, int) { assert(false); }
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
IMPLEMENT_CLASS(DHUDPicManager)
|
IMPLEMENT_CLASS(DHUDPicManager)
|
||||||
|
|
|
@ -303,6 +303,8 @@ class SBarInfoMainBlock : public SBarInfoCommandFlowControl
|
||||||
int Alpha() const { return currentAlpha; }
|
int Alpha() const { return currentAlpha; }
|
||||||
// Same as Draw but takes into account ForceScaled and temporarily sets the scaling if needed.
|
// Same as Draw but takes into account ForceScaled and temporarily sets the scaling if needed.
|
||||||
void DrawAux(const SBarInfoMainBlock *block, DSBarInfo *statusBar, int xOffset, int yOffset, int alpha);
|
void DrawAux(const SBarInfoMainBlock *block, DSBarInfo *statusBar, int xOffset, int yOffset, int alpha);
|
||||||
|
// Silence hidden overload warning since this is a special use class.
|
||||||
|
using SBarInfoCommandFlowControl::Draw;
|
||||||
void Draw(const SBarInfoMainBlock *block, const DSBarInfo *statusBar, int xOffset, int yOffset, int alpha)
|
void Draw(const SBarInfoMainBlock *block, const DSBarInfo *statusBar, int xOffset, int yOffset, int alpha)
|
||||||
{
|
{
|
||||||
this->xOffset = xOffset;
|
this->xOffset = xOffset;
|
||||||
|
|
|
@ -74,12 +74,12 @@ public:
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
double GetValue()
|
double GetSliderValue()
|
||||||
{
|
{
|
||||||
return SELECTED_JOYSTICK->GetSensitivity();
|
return SELECTED_JOYSTICK->GetSensitivity();
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetValue(double val)
|
void SetSliderValue(double val)
|
||||||
{
|
{
|
||||||
SELECTED_JOYSTICK->SetSensitivity(float(val));
|
SELECTED_JOYSTICK->SetSensitivity(float(val));
|
||||||
}
|
}
|
||||||
|
@ -104,14 +104,14 @@ public:
|
||||||
mNeg = 1;
|
mNeg = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
double GetValue()
|
double GetSliderValue()
|
||||||
{
|
{
|
||||||
double d = SELECTED_JOYSTICK->GetAxisScale(mAxis);
|
double d = SELECTED_JOYSTICK->GetAxisScale(mAxis);
|
||||||
mNeg = d < 0? -1:1;
|
mNeg = d < 0? -1:1;
|
||||||
return d;
|
return d;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetValue(double val)
|
void SetSliderValue(double val)
|
||||||
{
|
{
|
||||||
SELECTED_JOYSTICK->SetAxisScale(mAxis, float(val * mNeg));
|
SELECTED_JOYSTICK->SetAxisScale(mAxis, float(val * mNeg));
|
||||||
}
|
}
|
||||||
|
@ -136,14 +136,14 @@ public:
|
||||||
mNeg = 1;
|
mNeg = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
double GetValue()
|
double GetSliderValue()
|
||||||
{
|
{
|
||||||
double d = SELECTED_JOYSTICK->GetAxisDeadZone(mAxis);
|
double d = SELECTED_JOYSTICK->GetAxisDeadZone(mAxis);
|
||||||
mNeg = d < 0? -1:1;
|
mNeg = d < 0? -1:1;
|
||||||
return d;
|
return d;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetValue(double val)
|
void SetSliderValue(double val)
|
||||||
{
|
{
|
||||||
SELECTED_JOYSTICK->SetAxisDeadZone(mAxis, float(val * mNeg));
|
SELECTED_JOYSTICK->SetAxisDeadZone(mAxis, float(val * mNeg));
|
||||||
}
|
}
|
||||||
|
|
|
@ -553,7 +553,6 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
~FOptionMenuItem();
|
~FOptionMenuItem();
|
||||||
virtual bool CheckCoordinate(FOptionMenuDescriptor *desc, int x, int y);
|
|
||||||
virtual int Draw(FOptionMenuDescriptor *desc, int y, int indent, bool selected);
|
virtual int Draw(FOptionMenuDescriptor *desc, int y, int indent, bool selected);
|
||||||
virtual bool Selectable();
|
virtual bool Selectable();
|
||||||
virtual int GetIndent();
|
virtual int GetIndent();
|
||||||
|
|
|
@ -468,11 +468,6 @@ FOptionMenuItem::~FOptionMenuItem()
|
||||||
if (mLabel != NULL) delete [] mLabel;
|
if (mLabel != NULL) delete [] mLabel;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool FOptionMenuItem::CheckCoordinate(FOptionMenuDescriptor *desc, int x, int y)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
int FOptionMenuItem::Draw(FOptionMenuDescriptor *desc, int y, int indent, bool selected)
|
int FOptionMenuItem::Draw(FOptionMenuDescriptor *desc, int y, int indent, bool selected)
|
||||||
{
|
{
|
||||||
return indent;
|
return indent;
|
||||||
|
|
|
@ -560,8 +560,8 @@ public:
|
||||||
mSliderShort = 0;
|
mSliderShort = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual double GetValue() = 0;
|
virtual double GetSliderValue() = 0;
|
||||||
virtual void SetValue(double val) = 0;
|
virtual void SetSliderValue(double val) = 0;
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
//
|
//
|
||||||
|
@ -614,14 +614,14 @@ public:
|
||||||
{
|
{
|
||||||
drawLabel(indent, y, selected? OptionSettings.mFontColorSelection : OptionSettings.mFontColor);
|
drawLabel(indent, y, selected? OptionSettings.mFontColorSelection : OptionSettings.mFontColor);
|
||||||
mDrawX = indent + CURSORSPACE;
|
mDrawX = indent + CURSORSPACE;
|
||||||
DrawSlider (mDrawX, y, mMin, mMax, GetValue(), mShowValue, indent);
|
DrawSlider (mDrawX, y, mMin, mMax, GetSliderValue(), mShowValue, indent);
|
||||||
return indent;
|
return indent;
|
||||||
}
|
}
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
bool MenuEvent (int mkey, bool fromcontroller)
|
bool MenuEvent (int mkey, bool fromcontroller)
|
||||||
{
|
{
|
||||||
double value = GetValue();
|
double value = GetSliderValue();
|
||||||
|
|
||||||
if (mkey == MKEY_Left)
|
if (mkey == MKEY_Left)
|
||||||
{
|
{
|
||||||
|
@ -635,7 +635,7 @@ public:
|
||||||
{
|
{
|
||||||
return FOptionMenuItem::MenuEvent(mkey, fromcontroller);
|
return FOptionMenuItem::MenuEvent(mkey, fromcontroller);
|
||||||
}
|
}
|
||||||
SetValue(clamp(value, mMin, mMax));
|
SetSliderValue(clamp(value, mMin, mMax));
|
||||||
S_Sound (CHAN_VOICE | CHAN_UI, "menu/change", snd_menuvolume, ATTN_NONE);
|
S_Sound (CHAN_VOICE | CHAN_UI, "menu/change", snd_menuvolume, ATTN_NONE);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -662,9 +662,9 @@ public:
|
||||||
|
|
||||||
x = clamp(x, slide_left, slide_right);
|
x = clamp(x, slide_left, slide_right);
|
||||||
double v = mMin + ((x - slide_left) * (mMax - mMin)) / (slide_right - slide_left);
|
double v = mMin + ((x - slide_left) * (mMax - mMin)) / (slide_right - slide_left);
|
||||||
if (v != GetValue())
|
if (v != GetSliderValue())
|
||||||
{
|
{
|
||||||
SetValue(v);
|
SetSliderValue(v);
|
||||||
//S_Sound (CHAN_VOICE | CHAN_UI, "menu/change", snd_menuvolume, ATTN_NONE);
|
//S_Sound (CHAN_VOICE | CHAN_UI, "menu/change", snd_menuvolume, ATTN_NONE);
|
||||||
}
|
}
|
||||||
if (type == DMenu::MOUSE_Click)
|
if (type == DMenu::MOUSE_Click)
|
||||||
|
@ -692,7 +692,7 @@ public:
|
||||||
mCVar = FindCVar(menu, NULL);
|
mCVar = FindCVar(menu, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
double GetValue()
|
double GetSliderValue()
|
||||||
{
|
{
|
||||||
if (mCVar != NULL)
|
if (mCVar != NULL)
|
||||||
{
|
{
|
||||||
|
@ -704,7 +704,7 @@ public:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetValue(double val)
|
void SetSliderValue(double val)
|
||||||
{
|
{
|
||||||
if (mCVar != NULL)
|
if (mCVar != NULL)
|
||||||
{
|
{
|
||||||
|
@ -732,12 +732,12 @@ public:
|
||||||
mPVal = pVal;
|
mPVal = pVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
double GetValue()
|
double GetSliderValue()
|
||||||
{
|
{
|
||||||
return *mPVal;
|
return *mPVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetValue(double val)
|
void SetSliderValue(double val)
|
||||||
{
|
{
|
||||||
*mPVal = (float)val;
|
*mPVal = (float)val;
|
||||||
}
|
}
|
||||||
|
|
|
@ -504,10 +504,6 @@ int FNodeBuilder::SelectSplitter (DWORD set, node_t &node, DWORD &splitseg, int
|
||||||
nosplitters = true;
|
nosplitters = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
pseg = pseg;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
seg = pseg->next;
|
seg = pseg->next;
|
||||||
|
|
|
@ -139,7 +139,7 @@ DiskWriterIO::~DiskWriterIO()
|
||||||
//
|
//
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
|
||||||
int DiskWriterIO::OPLinit(uint numchips, bool dontcare)
|
int DiskWriterIO::OPLinit(uint numchips, bool, bool)
|
||||||
{
|
{
|
||||||
// If the file extension is unknown or not present, the default format
|
// If the file extension is unknown or not present, the default format
|
||||||
// is RAW. Otherwise, you can use DRO.
|
// is RAW. Otherwise, you can use DRO.
|
||||||
|
|
|
@ -195,7 +195,7 @@ struct DiskWriterIO : public OPLio
|
||||||
DiskWriterIO(const char *filename);
|
DiskWriterIO(const char *filename);
|
||||||
~DiskWriterIO();
|
~DiskWriterIO();
|
||||||
|
|
||||||
int OPLinit(uint numchips, bool notused=false);
|
int OPLinit(uint numchips, bool notused=false, bool notused2=false);
|
||||||
void OPLdeinit();
|
void OPLdeinit();
|
||||||
void OPLwriteReg(int which, uint reg, uchar data);
|
void OPLwriteReg(int which, uint reg, uchar data);
|
||||||
void SetClockRate(double samples_per_tick);
|
void SetClockRate(double samples_per_tick);
|
||||||
|
|
|
@ -15,7 +15,6 @@ public:
|
||||||
virtual void WriteReg(int reg, int v) = 0;
|
virtual void WriteReg(int reg, int v) = 0;
|
||||||
virtual void Update(float *buffer, int length) = 0;
|
virtual void Update(float *buffer, int length) = 0;
|
||||||
virtual void SetPanning(int c, float left, float right) = 0;
|
virtual void SetPanning(int c, float left, float right) = 0;
|
||||||
virtual FString GetVoiceString() { return FString(); }
|
|
||||||
};
|
};
|
||||||
|
|
||||||
OPLEmul *YM3812Create(bool stereo);
|
OPLEmul *YM3812Create(bool stereo);
|
||||||
|
|
|
@ -6807,12 +6807,16 @@ scriptwait:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PCD_PRINTBINARY:
|
case PCD_PRINTBINARY:
|
||||||
#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && (__GNUC_MINOR__ >= 6)))
|
#if (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && (__GNUC_MINOR__ >= 6)))) || defined(__clang__)
|
||||||
#define HAS_DIAGNOSTIC_PRAGMA
|
#define HAS_DIAGNOSTIC_PRAGMA
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAS_DIAGNOSTIC_PRAGMA
|
#ifdef HAS_DIAGNOSTIC_PRAGMA
|
||||||
#pragma GCC diagnostic push
|
#pragma GCC diagnostic push
|
||||||
|
#ifdef __clang__
|
||||||
|
#pragma GCC diagnostic ignored "-Wformat-invalid-specifier"
|
||||||
|
#else
|
||||||
#pragma GCC diagnostic ignored "-Wformat="
|
#pragma GCC diagnostic ignored "-Wformat="
|
||||||
|
#endif
|
||||||
#pragma GCC diagnostic ignored "-Wformat-extra-args"
|
#pragma GCC diagnostic ignored "-Wformat-extra-args"
|
||||||
#endif
|
#endif
|
||||||
work.AppendFormat ("%B", STACK(1));
|
work.AppendFormat ("%B", STACK(1));
|
||||||
|
|
|
@ -364,8 +364,6 @@ void AActor::Die (AActor *source, AActor *inflictor, int dmgflags)
|
||||||
{
|
{
|
||||||
static int dieticks[MAXPLAYERS];
|
static int dieticks[MAXPLAYERS];
|
||||||
int pnum = int(this->player-players);
|
int pnum = int(this->player-players);
|
||||||
if (dieticks[pnum] == gametic)
|
|
||||||
gametic=gametic;
|
|
||||||
dieticks[pnum] = gametic;
|
dieticks[pnum] = gametic;
|
||||||
fprintf (debugfile, "died (%d) on tic %d (%s)\n", pnum, gametic,
|
fprintf (debugfile, "died (%d) on tic %d (%s)\n", pnum, gametic,
|
||||||
this->player->cheats&CF_PREDICTING?"predicting":"real");
|
this->player->cheats&CF_PREDICTING?"predicting":"real");
|
||||||
|
|
|
@ -230,8 +230,6 @@ fixed_t sector_t::FindNextLowestFloor (vertex_t **v) const
|
||||||
check = lines[i];
|
check = lines[i];
|
||||||
if (NULL != (other = getNextSector (check, this)))
|
if (NULL != (other = getNextSector (check, this)))
|
||||||
{
|
{
|
||||||
if (other - sectors == 6)
|
|
||||||
other = other;
|
|
||||||
ofloor = other->floorplane.ZatPoint (check->v1);
|
ofloor = other->floorplane.ZatPoint (check->v1);
|
||||||
floor = floorplane.ZatPoint (check->v1);
|
floor = floorplane.ZatPoint (check->v1);
|
||||||
if (ofloor < floor && floor - ofloor < heightdiff && !IsLinked(other, false))
|
if (ofloor < floor && floor - ofloor < heightdiff && !IsLinked(other, false))
|
||||||
|
|
|
@ -706,10 +706,6 @@ void R_EnterMirror (drawseg_t *ds, int depth)
|
||||||
R_EnterMirror (drawsegs + WallMirrors[mirrorsAtStart], depth + 1);
|
R_EnterMirror (drawsegs + WallMirrors[mirrorsAtStart], depth + 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
depth = depth;
|
|
||||||
}
|
|
||||||
|
|
||||||
viewangle = startang;
|
viewangle = startang;
|
||||||
viewx = startx;
|
viewx = startx;
|
||||||
|
|
|
@ -560,7 +560,7 @@ static visplane_t *new_visplane (unsigned hash)
|
||||||
{
|
{
|
||||||
check = (visplane_t *)M_Malloc (sizeof(*check) + sizeof(*check->top)*(MAXWIDTH*2));
|
check = (visplane_t *)M_Malloc (sizeof(*check) + sizeof(*check->top)*(MAXWIDTH*2));
|
||||||
memset(check, 0, sizeof(*check) + sizeof(*check->top)*(MAXWIDTH*2));
|
memset(check, 0, sizeof(*check) + sizeof(*check->top)*(MAXWIDTH*2));
|
||||||
check->bottom = &check->top[MAXWIDTH+2];
|
check->bottom = check->top + MAXWIDTH+2;
|
||||||
}
|
}
|
||||||
else if (NULL == (freetail = freetail->next))
|
else if (NULL == (freetail = freetail->next))
|
||||||
{
|
{
|
||||||
|
|
|
@ -192,7 +192,7 @@ static size_t safe_write(int fd, const void *buf, size_t len)
|
||||||
|
|
||||||
static void crash_catcher(int signum, siginfo_t *siginfo, void *context)
|
static void crash_catcher(int signum, siginfo_t *siginfo, void *context)
|
||||||
{
|
{
|
||||||
ucontext_t *ucontext = (ucontext_t*)context;
|
//ucontext_t *ucontext = (ucontext_t*)context;
|
||||||
pid_t dbg_pid;
|
pid_t dbg_pid;
|
||||||
int fd[2];
|
int fd[2];
|
||||||
|
|
||||||
|
|
|
@ -719,7 +719,7 @@ bool I_WriteIniFailed ()
|
||||||
|
|
||||||
static const char *pattern;
|
static const char *pattern;
|
||||||
|
|
||||||
#if defined(__APPLE__) && !defined(__llvm__)
|
#if defined(__APPLE__) && !defined(__MAC_10_8)
|
||||||
static int matchfile (struct dirent *ent)
|
static int matchfile (struct dirent *ent)
|
||||||
#else
|
#else
|
||||||
static int matchfile (const struct dirent *ent)
|
static int matchfile (const struct dirent *ent)
|
||||||
|
|
|
@ -48,13 +48,16 @@ enum
|
||||||
static const char* const tableHeaders[NUM_COLUMNS] = { "IWAD", "Game" };
|
static const char* const tableHeaders[NUM_COLUMNS] = { "IWAD", "Game" };
|
||||||
|
|
||||||
// Class to convert the IWAD data into a form that Cocoa can use.
|
// Class to convert the IWAD data into a form that Cocoa can use.
|
||||||
@interface IWADTableData : NSObject// <NSTableViewDataSource>
|
@interface IWADTableData : NSObject
|
||||||
|
#ifdef __MAC_10_6
|
||||||
|
<NSTableViewDataSource>
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
NSMutableArray *data;
|
NSMutableArray *data;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)dealloc;
|
- (void)dealloc;
|
||||||
- (IWADTableData *)init:(WadStuff *) wads:(int) numwads;
|
- (IWADTableData *)init:(WadStuff *) wads num:(int) numwads;
|
||||||
|
|
||||||
- (int)numberOfRowsInTableView:(NSTableView *)aTableView;
|
- (int)numberOfRowsInTableView:(NSTableView *)aTableView;
|
||||||
- (id)tableView:(NSTableView *)aTableView objectValueForTableColumn:(NSTableColumn *)aTableColumn row:(int)rowIndex;
|
- (id)tableView:(NSTableView *)aTableView objectValueForTableColumn:(NSTableColumn *)aTableColumn row:(int)rowIndex;
|
||||||
|
@ -69,7 +72,7 @@ static const char* const tableHeaders[NUM_COLUMNS] = { "IWAD", "Game" };
|
||||||
[super dealloc];
|
[super dealloc];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (IWADTableData *)init:(WadStuff *) wads:(int) numwads
|
- (IWADTableData *)init:(WadStuff *) wads num:(int) numwads
|
||||||
{
|
{
|
||||||
data = [[NSMutableArray alloc] initWithCapacity:numwads];
|
data = [[NSMutableArray alloc] initWithCapacity:numwads];
|
||||||
|
|
||||||
|
@ -116,13 +119,13 @@ static const char* const tableHeaders[NUM_COLUMNS] = { "IWAD", "Game" };
|
||||||
|
|
||||||
- (void)buttonPressed:(id) sender;
|
- (void)buttonPressed:(id) sender;
|
||||||
- (void)doubleClicked:(id) sender;
|
- (void)doubleClicked:(id) sender;
|
||||||
- (void)makeLabel:(NSTextField *)label:(const char*) str;
|
- (void)makeLabel:(NSTextField *)label withString:(const char*) str;
|
||||||
- (int)pickIWad:(WadStuff *)wads:(int) numwads:(bool) showwin:(int) defaultiwad;
|
- (int)pickIWad:(WadStuff *)wads num:(int) numwads showWindow:(bool) showwin defaultWad:(int) defaultiwad;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@implementation IWADPicker
|
@implementation IWADPicker
|
||||||
|
|
||||||
- (void)buttonPressed:(id) sender;
|
- (void)buttonPressed:(id) sender
|
||||||
{
|
{
|
||||||
if(sender == cancelButton)
|
if(sender == cancelButton)
|
||||||
cancelled = true;
|
cancelled = true;
|
||||||
|
@ -131,7 +134,7 @@ static const char* const tableHeaders[NUM_COLUMNS] = { "IWAD", "Game" };
|
||||||
[app stopModal];
|
[app stopModal];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)doubleClicked:(id) sender;
|
- (void)doubleClicked:(id) sender
|
||||||
{
|
{
|
||||||
if ([sender clickedRow] >= 0)
|
if ([sender clickedRow] >= 0)
|
||||||
{
|
{
|
||||||
|
@ -142,7 +145,7 @@ static const char* const tableHeaders[NUM_COLUMNS] = { "IWAD", "Game" };
|
||||||
|
|
||||||
// Apparently labels in Cocoa are uneditable text fields, so lets make this a
|
// Apparently labels in Cocoa are uneditable text fields, so lets make this a
|
||||||
// little more automated.
|
// little more automated.
|
||||||
- (void)makeLabel:(NSTextField *)label:(const char*) str
|
- (void)makeLabel:(NSTextField *)label withString:(const char*) str
|
||||||
{
|
{
|
||||||
[label setStringValue:[NSString stringWithUTF8String:str]];
|
[label setStringValue:[NSString stringWithUTF8String:str]];
|
||||||
[label setBezeled:NO];
|
[label setBezeled:NO];
|
||||||
|
@ -151,7 +154,7 @@ static const char* const tableHeaders[NUM_COLUMNS] = { "IWAD", "Game" };
|
||||||
[label setSelectable:NO];
|
[label setSelectable:NO];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int)pickIWad:(WadStuff *)wads:(int) numwads:(bool) showwin:(int) defaultiwad
|
- (int)pickIWad:(WadStuff *)wads num:(int) numwads showWindow:(bool) showwin defaultWad:(int) defaultiwad
|
||||||
{
|
{
|
||||||
cancelled = false;
|
cancelled = false;
|
||||||
|
|
||||||
|
@ -163,7 +166,7 @@ static const char* const tableHeaders[NUM_COLUMNS] = { "IWAD", "Game" };
|
||||||
[window setTitle:windowTitle];
|
[window setTitle:windowTitle];
|
||||||
|
|
||||||
NSTextField *description = [[NSTextField alloc] initWithFrame:NSMakeRect(22, 379, 412, 50)];
|
NSTextField *description = [[NSTextField alloc] initWithFrame:NSMakeRect(22, 379, 412, 50)];
|
||||||
[self makeLabel:description:"ZDoom found more than one IWAD\nSelect from the list below to determine which one to use:"];
|
[self makeLabel:description withString:"ZDoom found more than one IWAD\nSelect from the list below to determine which one to use:"];
|
||||||
[[window contentView] addSubview:description];
|
[[window contentView] addSubview:description];
|
||||||
[description release];
|
[description release];
|
||||||
|
|
||||||
|
@ -171,7 +174,7 @@ static const char* const tableHeaders[NUM_COLUMNS] = { "IWAD", "Game" };
|
||||||
//NSScrollView *iwadScroller = [[NSScrollView alloc] initWithFrame:NSMakeRect(20, 103, 412, 288)];
|
//NSScrollView *iwadScroller = [[NSScrollView alloc] initWithFrame:NSMakeRect(20, 103, 412, 288)];
|
||||||
NSScrollView *iwadScroller = [[NSScrollView alloc] initWithFrame:NSMakeRect(20, 50, 412, 341)];
|
NSScrollView *iwadScroller = [[NSScrollView alloc] initWithFrame:NSMakeRect(20, 50, 412, 341)];
|
||||||
NSTableView *iwadTable = [[NSTableView alloc] initWithFrame:[iwadScroller bounds]];
|
NSTableView *iwadTable = [[NSTableView alloc] initWithFrame:[iwadScroller bounds]];
|
||||||
IWADTableData *tableData = [[IWADTableData alloc] init:wads:numwads];
|
IWADTableData *tableData = [[IWADTableData alloc] init:wads num:numwads];
|
||||||
for(int i = 0;i < NUM_COLUMNS;i++)
|
for(int i = 0;i < NUM_COLUMNS;i++)
|
||||||
{
|
{
|
||||||
NSTableColumn *column = [[NSTableColumn alloc] initWithIdentifier:[NSString stringWithUTF8String:tableHeaders[i]]];
|
NSTableColumn *column = [[NSTableColumn alloc] initWithIdentifier:[NSString stringWithUTF8String:tableHeaders[i]]];
|
||||||
|
@ -242,7 +245,7 @@ static const char* const tableHeaders[NUM_COLUMNS] = { "IWAD", "Game" };
|
||||||
int I_PickIWad_Cocoa (WadStuff *wads, int numwads, bool showwin, int defaultiwad)
|
int I_PickIWad_Cocoa (WadStuff *wads, int numwads, bool showwin, int defaultiwad)
|
||||||
{
|
{
|
||||||
IWADPicker *picker = [IWADPicker alloc];
|
IWADPicker *picker = [IWADPicker alloc];
|
||||||
int ret = [picker pickIWad:wads:numwads:showwin:defaultiwad];
|
int ret = [picker pickIWad:wads num:numwads showWindow:showwin defaultWad:defaultiwad];
|
||||||
[picker release];
|
[picker release];
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
|
@ -709,7 +709,7 @@ class OPLMUSDumper : public OPLMUSSong
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
OPLMUSDumper(const OPLMUSSong *original, const char *filename);
|
OPLMUSDumper(const OPLMUSSong *original, const char *filename);
|
||||||
void Play(bool looping);
|
void Play(bool looping, int);
|
||||||
};
|
};
|
||||||
|
|
||||||
// CD track/disk played through the multimedia system -----------------------
|
// CD track/disk played through the multimedia system -----------------------
|
||||||
|
|
|
@ -100,7 +100,7 @@ OPLMUSDumper::OPLMUSDumper(const OPLMUSSong *original, const char *filename)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void OPLMUSDumper::Play(bool looping)
|
void OPLMUSDumper::Play(bool looping, int)
|
||||||
{
|
{
|
||||||
Music->Dump();
|
Music->Dump();
|
||||||
}
|
}
|
||||||
|
|
|
@ -795,7 +795,7 @@ bool DSimpleCanvas::IsValid ()
|
||||||
//
|
//
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
|
||||||
bool DSimpleCanvas::Lock ()
|
bool DSimpleCanvas::Lock (bool)
|
||||||
{
|
{
|
||||||
if (LockCount == 0)
|
if (LockCount == 0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -157,8 +157,7 @@ public:
|
||||||
virtual bool IsValid ();
|
virtual bool IsValid ();
|
||||||
|
|
||||||
// Access control
|
// Access control
|
||||||
virtual bool Lock () = 0; // Returns true if the surface was lost since last time
|
virtual bool Lock (bool buffered=true) = 0; // Returns true if the surface was lost since last time
|
||||||
virtual bool Lock (bool usesimplecanvas) { return Lock(); }
|
|
||||||
virtual void Unlock () = 0;
|
virtual void Unlock () = 0;
|
||||||
virtual bool IsLocked () { return Buffer != NULL; } // Returns true if the surface is locked
|
virtual bool IsLocked () { return Buffer != NULL; } // Returns true if the surface is locked
|
||||||
|
|
||||||
|
@ -287,7 +286,7 @@ public:
|
||||||
~DSimpleCanvas ();
|
~DSimpleCanvas ();
|
||||||
|
|
||||||
bool IsValid ();
|
bool IsValid ();
|
||||||
bool Lock ();
|
bool Lock (bool buffered=true);
|
||||||
void Unlock ();
|
void Unlock ();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
|
@ -1033,11 +1033,6 @@ bool D3DFB::IsFullscreen ()
|
||||||
//
|
//
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
|
||||||
bool D3DFB::Lock ()
|
|
||||||
{
|
|
||||||
return Lock(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool D3DFB::Lock (bool buffered)
|
bool D3DFB::Lock (bool buffered)
|
||||||
{
|
{
|
||||||
if (LockCount++ > 0)
|
if (LockCount++ > 0)
|
||||||
|
|
|
@ -815,11 +815,6 @@ HRESULT DDrawFB::GetHR ()
|
||||||
return LastHR;
|
return LastHR;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DDrawFB::Lock ()
|
|
||||||
{
|
|
||||||
return Lock (false);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool DDrawFB::Lock (bool useSimpleCanvas)
|
bool DDrawFB::Lock (bool useSimpleCanvas)
|
||||||
{
|
{
|
||||||
static int lock_num;
|
static int lock_num;
|
||||||
|
|
|
@ -148,7 +148,6 @@ public:
|
||||||
~DDrawFB ();
|
~DDrawFB ();
|
||||||
|
|
||||||
bool IsValid ();
|
bool IsValid ();
|
||||||
bool Lock ();
|
|
||||||
bool Lock (bool buffer);
|
bool Lock (bool buffer);
|
||||||
void Unlock ();
|
void Unlock ();
|
||||||
void ForceBuffering (bool force);
|
void ForceBuffering (bool force);
|
||||||
|
@ -231,7 +230,6 @@ public:
|
||||||
~D3DFB ();
|
~D3DFB ();
|
||||||
|
|
||||||
bool IsValid ();
|
bool IsValid ();
|
||||||
bool Lock ();
|
|
||||||
bool Lock (bool buffered);
|
bool Lock (bool buffered);
|
||||||
void Unlock ();
|
void Unlock ();
|
||||||
void Update ();
|
void Update ();
|
||||||
|
|
Loading…
Reference in a new issue