diff --git a/AUTHORS.md b/AUTHORS.md index c3992ed69..2372e5f9a 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -3,20 +3,20 @@ ### Raze special thanks: * sinisterseed, Rachael, dpJudas, Enjay, Nash Muhandes - + ### EDuke32 engine: * TerminX, Hendricks266, pogokeen, Plagman * Helixhorned - + ### JFDuke3D by: * JonoF - + ### Uses BUILD Engine technology by: * Ken Silverman - + ### NBlood programming: * Nuke.YKT, NoOne, sirlemonhead - + ### NBlood special thanks: * NY00123, MetHy, Striker, oasiz, Mblackwell, Zombie, Marphy Black, SAmik37, meleemario @@ -34,7 +34,7 @@ ### Widescreen graphics: * James Manning, fgsfds, Dzierzan, Phredreeke, MaxED, Kinsie, Maxi Clouds - + ### Exhumed BigFont * Dynamo diff --git a/CMakeLists.txt b/CMakeLists.txt index a5d02b9ad..c7c133c67 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -237,11 +237,11 @@ if( MSVC ) # Disable warnings for unsecure CRT functions from VC8+ set( ALL_C_FLAGS "${ALL_C_FLAGS} /DUNICODE /D_UNICODE /D_WIN32_WINNT=0x0600 /D_CRT_SECURE_NO_DEPRECATE /D_CRT_SECURE_NO_WARNINGS /D_CRT_NONSTDC_NO_WARNINGS" ) - + # These must be silenced because the code is full of them. Expect some of undefined behavior hidden in this mess. :( #set( ALL_C_FLAGS "${ALL_C_FLAGS} /wd4244 /wd4018 /wd4267" ) - - + + # Most of these need to be cleaned out. The source is currently infested with far too much conditional compilation which is a constant source of problems. set( ALL_C_FLAGS "${ALL_C_FLAGS} /DUSE_OPENGL=1 /DNOASM=1 /DWIN32" ) diff --git a/bin/windows/zmusic/include/zmusic.h b/bin/windows/zmusic/include/zmusic.h index 7422b58da..06c7ee39b 100644 --- a/bin/windows/zmusic/include/zmusic.h +++ b/bin/windows/zmusic/include/zmusic.h @@ -148,7 +148,7 @@ typedef enum EIntConfigKey_ zmusic_mod_autochip_scan_threshold, zmusic_snd_streambuffersize, - + zmusic_snd_mididevice, zmusic_snd_outputrate, @@ -226,7 +226,7 @@ typedef struct ZMusicCallbacks_ { // Callbacks the client can install to capture messages from the backends // or to provide sound font data. - + void (*MessageFunc)(int severity, const char* msg); // The message callbacks are optional, without them the output goes to stdout. diff --git a/cmake/precompiled_headers.cmake b/cmake/precompiled_headers.cmake index ed1f62521..991207fad 100644 --- a/cmake/precompiled_headers.cmake +++ b/cmake/precompiled_headers.cmake @@ -9,7 +9,7 @@ function(enable_precompiled_headers PRECOMPILED_HEADER SOURCE_VARIABLE_NAME) if(MSVC) set(files ${${SOURCE_VARIABLE_NAME}}) - + # Generate precompiled header translation unit get_filename_component(pch_basename ${PRECOMPILED_HEADER} NAME_WE) set(pch_abs ${CMAKE_CURRENT_SOURCE_DIR}/${PRECOMPILED_HEADER}) @@ -28,7 +28,7 @@ function(enable_precompiled_headers PRECOMPILED_HEADER SOURCE_VARIABLE_NAME) FILE(WRITE ${pch_unity} "${pch_content}") endif() set_source_files_properties(${pch_unity} PROPERTIES COMPILE_FLAGS "/Yc\"${pch_abs}\"") - + # Update properties of source files to use the precompiled header. # Additionally, force the inclusion of the precompiled header at beginning of each source file. foreach(source_file ${files} ) @@ -38,7 +38,7 @@ function(enable_precompiled_headers PRECOMPILED_HEADER SOURCE_VARIABLE_NAME) "/Yu\"${pch_abs}\" /FI\"${pch_abs}\"" ) endforeach(source_file) - + # Finally, update the source file collection to contain the precompiled header translation unit set(${SOURCE_VARIABLE_NAME} ${${SOURCE_VARIABLE_NAME}} ${pch_unity} PARENT_SCOPE) endif(MSVC) diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt index f9484aef5..27ae7f6b9 100644 --- a/source/CMakeLists.txt +++ b/source/CMakeLists.txt @@ -313,7 +313,7 @@ if( DEM_CMAKE_COMPILER_IS_GNUCXX_COMPATIBLE ) set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC" ) set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC" ) endif() - + if(${CMAKE_SYSTEM_NAME} MATCHES "NetBSD") set( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -ljemalloc") endif() @@ -473,7 +473,7 @@ set( PLAT_WIN32_SOURCES if (HAVE_VULKAN) set (PLAT_WIN32_SOURCES ${PLAT_WIN32_SOURCES} common/platform/win32/win32vulkanvideo.cpp ) endif() - + # todo: implement an actual crash catcher for ARM # for now this is purely experimental if (NOT ${TARGET_ARCHITECTURE} MATCHES "arm" ) @@ -609,7 +609,7 @@ file( GLOB HEADER_FILES core/input/*.h core/rendering/*.h core/rendering/scene/*.h - + common/audio/sound/thirdparty/*.h common/audio/sound/*.h common/audio/music/*.h* @@ -757,7 +757,7 @@ set( NOT_COMPILED_SOURCE_FILES games/blood/src/view.cpp games/blood/src/warp.cpp games/blood/src/weapon.cpp - + # Duke games/duke/src/actors.cpp games/duke/src/actors_d.cpp @@ -801,7 +801,7 @@ set( NOT_COMPILED_SOURCE_FILES games/duke/src/spawn.cpp games/duke/src/spawn_d.cpp games/duke/src/spawn_r.cpp - + # Shadow Warrior games/sw/src/actor.cpp games/sw/src/ai.cpp @@ -864,7 +864,7 @@ set( NOT_COMPILED_SOURCE_FILES games/sw/src/weapon.cpp games/sw/src/zilla.cpp games/sw/src/zombie.cpp - + # Exhumed games/exhumed/src/2d.cpp games/exhumed/src/anims.cpp @@ -915,8 +915,8 @@ set( NOT_COMPILED_SOURCE_FILES games/exhumed/src/trigdat.cpp games/exhumed/src/view.cpp games/exhumed/src/wasp.cpp - - + + ) set( VM_JIT_SOURCES @@ -946,7 +946,7 @@ set( FASTMATH_SOURCES gitinfo.cpp ) - + #Vulkan stuff must go into a separate list because it needs to be disabled for some platforms set (VULKAN_SOURCES common/rendering/vulkan/system/vk_device.cpp @@ -1216,7 +1216,7 @@ set (PCH_SOURCES common/menu/menudef.cpp common/menu/savegamemanager.cpp common/statusbar/base_sbar.cpp - + common/rendering/v_framebuffer.cpp common/rendering/v_video.cpp common/rendering/r_thread.cpp @@ -1276,7 +1276,7 @@ set (PCH_SOURCES core/menu/loadsavemenu.cpp core/menu/usermap.cpp core/menu/razemenu.cpp - + #Duke is split because Duke and RR need different constants. games/duke/all.cpp games/duke/all_d.cpp @@ -1284,7 +1284,7 @@ set (PCH_SOURCES games/exhumed/all.cpp games/blood/all.cpp games/sw/all.cpp - + ) if( ${HAVE_VM_JIT} ) diff --git a/source/build/include/mdsprite.h b/source/build/include/mdsprite.h index a7d69f334..d816a0049 100644 --- a/source/build/include/mdsprite.h +++ b/source/build/include/mdsprite.h @@ -19,11 +19,11 @@ class FGameTexture; struct mdmodel_t { - + int32_t mdnum, shadeoff; float scale, bscale, zadd, yoffset; FGameTexture *texture; - + int32_t flags; }; diff --git a/source/build/src/clip.cpp b/source/build/src/clip.cpp index 0f60aaee4..718fa03af 100644 --- a/source/build/src/clip.cpp +++ b/source/build/src/clip.cpp @@ -789,7 +789,7 @@ CollisionBase clipmove_(vec3_t * const pos, int * const sectnum, int32_t xvect, } vec2_t vec = goal; - + if ((hitwall = cliptrace(pos->vec2, &vec)) >= 0) { vec2_t const clipr = { clipit[hitwall].x2 - clipit[hitwall].x1, clipit[hitwall].y2 - clipit[hitwall].y1 }; @@ -984,7 +984,7 @@ int pushmove_(vec3_t *const vect, int *const sectnum, closest = { dax, day }; } - + j = cliptestsector(clipsectorlist[clipsectcnt], wal->nextsector, flordist, ceildist, closest, vect->Z); } diff --git a/source/build/src/mdsprite.cpp b/source/build/src/mdsprite.cpp index e38722045..5f79584c1 100644 --- a/source/build/src/mdsprite.cpp +++ b/source/build/src/mdsprite.cpp @@ -1089,7 +1089,7 @@ void md3_vox_calcmat_common(tspriteptr_t tspr, const FVector3 *a0, float f, floa mat[0] = k4*k6 + k5*k7; mat[4] = 0; mat[ 8] = k4*k7 - k5*k6; mat[12] = k2*k6 + k3*k7; mat[1] = 0; mat[5] = 1; mat[ 9] = 0; mat[13] = 0; - + k6 = gcosang2; k7 = gsinang2; mat[2] = k4*k6 + k5*k7; @@ -1347,7 +1347,7 @@ static int32_t polymost_md3draw(md3model_t *m, tspriteptr_t tspr) auto tex = mdloadskin((md2model_t *)m,tile2model[Ptile2tile(tspr->picnum,lpal)].skinnum,globalpal,surfi, &exact); if (!tex) continue; - + int palid = TRANSLATION(Translation_Remap + curbasepal, globalpal); GLInterface.SetFade(tspr->sector()->floorpal); GLInterface.SetTexture(tex, palid, CLAMP_XY); @@ -1414,7 +1414,7 @@ static int32_t polymost_md3draw(md3model_t *m, tspriteptr_t tspr) GLInterface.SetCull(Cull_None); GLInterface.SetIdentityMatrix(Matrix_Model); - + globalnoeffect=0; return 1; } @@ -1449,7 +1449,7 @@ static void md3free(md3model_t *m) } M_Free(m->head.tags); M_Free(m->head.frames); - + M_Free(m->muladdframes); M_Free(m->indexes); @@ -1540,7 +1540,7 @@ void updateModelInterpolation() // sigh... omdtims = mdtims; mdtims = I_msTime(); - + TSpriteIterator it; while (auto actor = it.Next()) { diff --git a/source/build/src/polymost.cpp b/source/build/src/polymost.cpp index 09c5bc763..ed997f9b2 100644 --- a/source/build/src/polymost.cpp +++ b/source/build/src/polymost.cpp @@ -350,7 +350,7 @@ static void polymost_drawpoly(FVector2 const * const dpxy, int32_t const n, int3 } static int32_t skyzbufferhack_pass = 0; - + if (flatskyrender && skyzbufferhack_pass == 0) { polymost_flatskyrender(dpxy, n, method|DAMETH_SKY, tilesize); @@ -709,7 +709,7 @@ static void polymost_domost(float x0, float y0, float x1, float y1, float y0top firstnode = i; continue; } - + if (n0.X >= dm1.X) break; @@ -1281,7 +1281,7 @@ static void polymost_flatskyrender(FVector2 const* const dpxy, int32_t const n, xys[i].X = v.x * r + ghalfx; xys[i].Y = v.y * r + ghalfy; } - + float const fglobalang = FixedToFloat(qglobalang); int32_t dapyscale, dapskybits, dapyoffs, daptileyscale; int16_t const * dapskyoff = getpsky(globalpicnum, &dapyscale, &dapskybits, &dapyoffs, &daptileyscale); @@ -1575,7 +1575,7 @@ static void polymost_drawalls(int32_t const bunch) xtex.d = (ryp0-ryp1)*gxyaspect / (x0-x1); ytex.d = 0; otex.d = ryp0*gxyaspect - xtex.d*x0; - + xtex.u = ytex.u = otex.u = 0; xtex.v = ytex.v = otex.v = 0; polymost_domost(x0, fy0, x1, fy1); @@ -1622,13 +1622,13 @@ static void polymost_drawalls(int32_t const bunch) global_cf_ypanning = sec->ceilingypan_, global_cf_heinum = sec->ceilingheinum; global_getzofslope_func = &fgetceilzofslope; - + if (globalpicnum >= r_rortexture && globalpicnum < r_rortexture + r_rortexturerange && r_rorphase == 0) { xtex.d = (ryp0-ryp1)*gxyaspect / (x0-x1); ytex.d = 0; otex.d = ryp0*gxyaspect - xtex.d*x0; - + xtex.u = ytex.u = otex.u = 0; xtex.v = ytex.v = otex.v = 0; polymost_domost(x1, cy1, x0, cy0); diff --git a/source/common/2d/v_2ddrawer.cpp b/source/common/2d/v_2ddrawer.cpp index 443acb293..69ab0d530 100644 --- a/source/common/2d/v_2ddrawer.cpp +++ b/source/common/2d/v_2ddrawer.cpp @@ -993,7 +993,7 @@ void F2DDrawer::AddLine(double x1, double y1, double x2, double y2, int clipx1, dg.mScissor[3] = clipy2 + 1 + int(offset.Y); dg.mFlags |= DTF_Scissor; } - + dg.mType = DrawTypeLines; dg.mRenderStyle = LegacyRenderStyles[STYLE_Translucent]; dg.mVertCount = 2; diff --git a/source/common/2d/v_2ddrawer.h b/source/common/2d/v_2ddrawer.h index ab87085f5..623559978 100644 --- a/source/common/2d/v_2ddrawer.h +++ b/source/common/2d/v_2ddrawer.h @@ -101,7 +101,7 @@ public: } }; - + struct RenderCommand { EDrawType mType; @@ -175,7 +175,7 @@ public: public: int fullscreenautoaspect = 3; int cliptop = -1, clipleft = -1, clipwidth = -1, clipheight = -1; - + int AddCommand(RenderCommand *data); void AddIndices(int firstvert, int count, ...); private: @@ -200,8 +200,8 @@ public: void ClearScreen(PalEntry color = 0xff000000); void AddDim(PalEntry color, float damount, int x1, int y1, int w, int h); void AddClear(int left, int top, int right, int bottom, int palcolor, uint32_t color); - - + + void AddLine(double x1, double y1, double x2, double y2, int cx, int cy, int cx2, int cy2, uint32_t color, uint8_t alpha = 255); void AddThickLine(int x1, int y1, int x2, int y2, double thickness, uint32_t color, uint8_t alpha = 255); void AddPixel(int x1, int y1, uint32_t color); diff --git a/source/common/2d/v_draw.cpp b/source/common/2d/v_draw.cpp index a7d213cb4..1ff348bc7 100644 --- a/source/common/2d/v_draw.cpp +++ b/source/common/2d/v_draw.cpp @@ -857,7 +857,7 @@ bool ParseDrawTextureTags(F2DDrawer *drawer, FGameTexture *img, double x, double parms->cleanmode = DTA_Base; parms->virtHeight = ListGetDouble(tags); break; - + case DTA_FullscreenScale: intval = ListGetInt(tags); if (intval >= FSMode_None && intval < FSMode_Max) diff --git a/source/common/2d/v_draw.h b/source/common/2d/v_draw.h index a0407179e..0d25d5999 100644 --- a/source/common/2d/v_draw.h +++ b/source/common/2d/v_draw.h @@ -36,7 +36,7 @@ enum FSMode_Max, - + // These all use ScaleToFit43, their purpose is to cut down on verbosity because they imply the virtual screen size. FSMode_Predefined = 1000, FSMode_Fit320x200 = 1000, diff --git a/source/common/audio/music/i_music.cpp b/source/common/audio/music/i_music.cpp index 26989992d..bc05d4da5 100644 --- a/source/common/audio/music/i_music.cpp +++ b/source/common/audio/music/i_music.cpp @@ -226,7 +226,7 @@ void I_InitMusic(void) nomusic = !!Args->CheckParm("-nomusic") || !!Args->CheckParm("-nosound"); snd_mididevice.Callback(); - + ZMusicCallbacks callbacks{}; callbacks.MessageFunc = zmusic_printfunc; diff --git a/source/common/audio/music/i_soundfont.cpp b/source/common/audio/music/i_soundfont.cpp index a8b4e9fdf..8d928a42c 100644 --- a/source/common/audio/music/i_soundfont.cpp +++ b/source/common/audio/music/i_soundfont.cpp @@ -140,7 +140,7 @@ FileReader FSoundFontReader::Open(const char *name, std::string& filename) ZMusicCustomReader* FSoundFontReader::open_interface(const char* name) { std::string filename; - + FileReader fr = Open(name, filename); if (!fr.isOpen()) return nullptr; auto fri = GetMusicReader(fr); @@ -336,7 +336,7 @@ void FSoundFontManager::ProcessOneFile(const FString &fn) // We already got a soundfont with this name. Do not add again. if (!sfi.mName.CompareNoCase(fb)) return; } - + FileReader fr; if (fr.OpenFile(fn)) { diff --git a/source/common/audio/music/i_soundfont.h b/source/common/audio/music/i_soundfont.h index 9f07b8cc4..ef0295071 100644 --- a/source/common/audio/music/i_soundfont.h +++ b/source/common/audio/music/i_soundfont.h @@ -29,13 +29,13 @@ protected: // When reading from an archive it will always be case insensitive, just like the lump manager. bool mCaseSensitivePaths = false; TArray mPaths; - - + + int pathcmp(const char *p1, const char *p2); - - + + public: - + virtual ~FSoundFontReader() {} virtual FileReader OpenMainConfigFile() = 0; // this is special because it needs to be synthesized for .sf files and set some restrictions for patch sets virtual FString MainConfigFileName() @@ -147,15 +147,15 @@ public: class FSoundFontManager { TArray soundfonts; - + void ProcessOneFile(const FString & fn); - + public: void CollectSoundfonts(); const FSoundFontInfo *FindSoundFont(const char *name, int allowedtypes) const; FSoundFontReader *OpenSoundFont(const char *name, int allowedtypes); const auto &GetList() const { return soundfonts; } // This is for the menu - + }; diff --git a/source/common/audio/music/music.cpp b/source/common/audio/music/music.cpp index d8766ae90..d125bf36d 100644 --- a/source/common/audio/music/music.cpp +++ b/source/common/audio/music/music.cpp @@ -180,7 +180,7 @@ static bool FillStream(SoundStream* stream, void* buff, int len, void* userdata) fbuf[i] = convert[i] * mus_playing.replayGainFactor * (1.f/32768.f); } } - + if (!written) { memset((char*)buff, 0, len); @@ -298,7 +298,7 @@ void S_UpdateMusic () if (mus_playing.handle != nullptr) { ZMusic_Update(mus_playing.handle); - + // [RH] Update music and/or playlist. IsPlaying() must be called // to attempt to reconnect to broken net streams and to advance the // playlist when the current song finishes. diff --git a/source/common/audio/sound/i_sound.h b/source/common/audio/sound/i_sound.h index 060838edf..da11e9bde 100644 --- a/source/common/audio/sound/i_sound.h +++ b/source/common/audio/sound/i_sound.h @@ -107,7 +107,7 @@ public: // Streaming sounds. virtual SoundStream *CreateStream (SoundStreamCallback callback, int buffbytes, int flags, int samplerate, void *userdata) = 0; - + // Starts a sound. virtual FISoundChannel *StartSound (SoundHandle sfx, float vol, int pitch, int chanflags, FISoundChannel *reuse_chan, float startTime = 0.f) = 0; virtual FISoundChannel *StartSound3D (SoundHandle sfx, SoundListener *listener, float vol, FRolloffInfo *rolloff, float distscale, int pitch, int priority, const FVector3 &pos, const FVector3 &vel, int channum, int chanflags, FISoundChannel *reuse_chan, float startTime = 0.f) = 0; diff --git a/source/common/audio/sound/oalsound.cpp b/source/common/audio/sound/oalsound.cpp index f3c46746d..240b4c8ab 100644 --- a/source/common/audio/sound/oalsound.cpp +++ b/source/common/audio/sound/oalsound.cpp @@ -1675,7 +1675,7 @@ void OpenALSoundRenderer::UpdateListener(SoundListener *listener) const_cast(env)->Modified = false; } - + // NOTE: Moving into and out of water will undo pitch variations on sounds. if(listener->underwater || env->SoftwareWater) { @@ -1721,7 +1721,7 @@ void OpenALSoundRenderer::UpdateListener(SoundListener *listener) } else if(WasInWater) { - + WasInWater = false; if(EnvSlot != 0) diff --git a/source/common/audio/sound/s_sound.cpp b/source/common/audio/sound/s_sound.cpp index 5201891c0..74393dfdd 100644 --- a/source/common/audio/sound/s_sound.cpp +++ b/source/common/audio/sound/s_sound.cpp @@ -402,7 +402,7 @@ FSoundChan *SoundEngine::StartSound(int type, const void *source, { return nullptr; } - + sfx = &S_sfx[sound_id]; // Scale volume according to SNDINFO data. @@ -611,7 +611,7 @@ FSoundChan *SoundEngine::StartSound(int type, const void *source, { chan->Source = source; } - + if (spitch > 0.0) // A_StartSound has top priority over all others. SetPitch(chan, spitch); else if (defpitch > 0.0) // $PitchSet overrides $PitchShift @@ -726,7 +726,7 @@ sfxinfo_t *SoundEngine::LoadSound(sfxinfo_t *sfx) { return sfx; } - + // See if there is another sound already initialized with this lump. If so, // then set this one up as a link, and don't load the sound again. for (i = 0; i < S_sfx.Size(); i++) @@ -830,7 +830,7 @@ bool SoundEngine::CheckSoundLimit(sfxinfo_t *sfx, const FVector3 &pos, int near_ { FSoundChan *chan; int count; - + for (chan = Channels, count = 0; chan != NULL && count < near_limit; chan = chan->NextChan) { if (chan->ChanFlags & CHANF_FORGETTABLE) continue; diff --git a/source/common/audio/sound/s_soundinternal.h b/source/common/audio/sound/s_soundinternal.h index 13ca33e7a..f15c994dc 100644 --- a/source/common/audio/sound/s_soundinternal.h +++ b/source/common/audio/sound/s_soundinternal.h @@ -73,7 +73,7 @@ class FSoundID { public: FSoundID() = default; - + static FSoundID byResId(int ndx) { return FSoundID(S_FindSoundByResID(ndx)); @@ -120,7 +120,7 @@ protected: enum EDummy { NoInit }; FSoundID(EDummy) {} }; - + class FSoundIDNoInit : public FSoundID { public: @@ -196,7 +196,7 @@ void S_SetEnvironment (const ReverbContainer *settings); ReverbContainer *S_FindEnvironment (const char *name); ReverbContainer *S_FindEnvironment (int id); void S_AddEnvironment (ReverbContainer *settings); - + class SoundEngine { protected: diff --git a/source/common/console/c_bind.cpp b/source/common/console/c_bind.cpp index 1bca5072c..d131cb6ed 100644 --- a/source/common/console/c_bind.cpp +++ b/source/common/console/c_bind.cpp @@ -393,7 +393,7 @@ void FKeyBindings::PerformBind(FCommandLine &argv, const char *msg) else { Printf ("%s:\n", msg); - + for (i = 0; i < NUM_KEYS; i++) { if (!Binds[i].IsEmpty()) @@ -696,7 +696,7 @@ void ReadBindings(int lump, bool override) } continue; } - + // bind destination is optional and is the same as the console command if (sc.Compare("bind")) { diff --git a/source/common/console/c_buttons.cpp b/source/common/console/c_buttons.cpp index 860824ca5..3464553e3 100644 --- a/source/common/console/c_buttons.cpp +++ b/source/common/console/c_buttons.cpp @@ -101,13 +101,13 @@ int ButtonMap::ListActionCommands (const char *pattern) int ButtonMap::FindButtonIndex (const char *key, int funclen) const { if (!key) return -1; - + FName name = funclen == -1? FName(key, true) : FName(key, funclen, true); if (name == NAME_None) return -1; - + auto res = NameToNum.CheckKey(name); if (!res) return -1; - + return *res; } diff --git a/source/common/console/c_commandbuffer.cpp b/source/common/console/c_commandbuffer.cpp index b079d7f76..0c570da14 100644 --- a/source/common/console/c_commandbuffer.cpp +++ b/source/common/console/c_commandbuffer.cpp @@ -299,7 +299,7 @@ void FCommandBuffer::AddString(FString clip) } auto strp = (const uint8_t*)clip.GetChars(); while (auto chr = GetCharFromString(strp)) build += chr; - + if (Text.length() == 0) { Text = build; diff --git a/source/common/console/c_console.cpp b/source/common/console/c_console.cpp index 8d4f8b44a..483f9a378 100644 --- a/source/common/console/c_console.cpp +++ b/source/common/console/c_console.cpp @@ -1027,7 +1027,7 @@ static bool C_HandleKey (event_t *ev, FCommandBuffer &buffer) TabbedList = false; break; } - + case '`': // Check to see if we have ` bound to the console before accepting // it as a way to close the console. diff --git a/source/common/console/c_consolebuffer.cpp b/source/common/console/c_consolebuffer.cpp index a75a0588c..ea6be80e2 100644 --- a/source/common/console/c_consolebuffer.cpp +++ b/source/common/console/c_consolebuffer.cpp @@ -72,7 +72,7 @@ FConsoleBuffer::FConsoleBuffer() void FConsoleBuffer::AddText(int printlevel, const char *text) { FString build = TEXTCOLOR_TAN; - + if (mAddType == REPLACELINE) { // Just wondering: Do we actually need this case? If so, it may need some work. @@ -85,15 +85,15 @@ void FConsoleBuffer::AddText(int printlevel, const char *text) printlevel = -1; mLastLineNeedsUpdate = true; } - + if (printlevel >= 0 && printlevel != PRINT_HIGH) { if (printlevel == 200) build = TEXTCOLOR_GREEN; else if (printlevel < PRINTLEVELS) build.Format("%c%c", TEXTCOLOR_ESCAPE, PrintColors[printlevel]+'A'); } - + size_t textsize = strlen(text); - + if (text[textsize-1] == '\r') { textsize--; diff --git a/source/common/console/c_consolebuffer.h b/source/common/console/c_consolebuffer.h index 98a42b42e..58bc0edea 100644 --- a/source/common/console/c_consolebuffer.h +++ b/source/common/console/c_consolebuffer.h @@ -56,12 +56,12 @@ class FConsoleBuffer EAddType mAddType; int mTextLines; bool mBufferWasCleared; - + FFont *mLastFont; int mLastDisplayWidth; bool mLastLineNeedsUpdate; - + public: FConsoleBuffer(); void AddText(int printlevel, const char *string); diff --git a/source/common/console/c_cvars.h b/source/common/console/c_cvars.h index abbe31a4b..7d5201a1d 100644 --- a/source/common/console/c_cvars.h +++ b/source/common/console/c_cvars.h @@ -175,7 +175,7 @@ public: static void ResetColors (); // recalc color cvars' indices after screen change static void ListVars (const char *filter, bool plain); - + const FString &GetDescription() const { return Description; }; const FString& GetToggleMessage(int which) { return ToggleMessages[which]; } void SetToggleMessages(const char* on, const char* off) @@ -398,7 +398,7 @@ public: protected: virtual void DoSet (UCVarValue value, ECVarType type); - + static UCVarValue FromInt2 (int value, ECVarType type); static int ToInt2 (UCVarValue value, ECVarType type); }; diff --git a/source/common/console/c_dispatch.cpp b/source/common/console/c_dispatch.cpp index 76e0f19e2..7de13e2ea 100644 --- a/source/common/console/c_dispatch.cpp +++ b/source/common/console/c_dispatch.cpp @@ -253,7 +253,7 @@ void C_DoCommand (const char *cmd, int keynum) return; } } - + // Parse it as a normal command // Checking for matching commands follows this search order: // 1. Check the Commands[] hash table diff --git a/source/common/console/c_expr.cpp b/source/common/console/c_expr.cpp index d203c8cd5..4a48439b7 100644 --- a/source/common/console/c_expr.cpp +++ b/source/common/console/c_expr.cpp @@ -248,7 +248,7 @@ done: bool IsFloat (const char *str) { const char *pt; - + if (*str == '+' || *str == '-') str++; @@ -367,7 +367,7 @@ static FStringProd *DoubleToString (FProduction *prod) static FDoubleProd *StringToDouble (FProduction *prod) { FDoubleProd *newprod; - + newprod = NewDoubleProd (atof (static_cast(prod)->Value)); M_Free (prod); return newprod; diff --git a/source/common/console/c_notifybufferbase.cpp b/source/common/console/c_notifybufferbase.cpp index e31a8f07c..11be81dd3 100644 --- a/source/common/console/c_notifybufferbase.cpp +++ b/source/common/console/c_notifybufferbase.cpp @@ -126,7 +126,7 @@ void FNotifyBufferBase::Tick() { Text[i].Ticker++; } - + for (i = 0; i < Text.Size(); ++i) { if (Text[i].TimeOut != 0 && Text[i].TimeOut > Text[i].Ticker) diff --git a/source/common/cutscenes/movieplayer.cpp b/source/common/cutscenes/movieplayer.cpp index 3788f7b20..3d32d872c 100644 --- a/source/common/cutscenes/movieplayer.cpp +++ b/source/common/cutscenes/movieplayer.cpp @@ -174,7 +174,7 @@ class MvePlayer : public MoviePlayer { InterplayDecoder decoder; bool failed = false; - + public: bool isvalid() { return !failed; } diff --git a/source/common/cutscenes/playmve.cpp b/source/common/cutscenes/playmve.cpp index 999dcf03b..26165de0e 100644 --- a/source/common/cutscenes/playmve.cpp +++ b/source/common/cutscenes/playmve.cpp @@ -464,7 +464,7 @@ bool InterplayDecoder::RunFrame(uint64_t clock) if (decodeMap.nSize) { int i = 0; - + for (uint32_t y = 0; y < nHeight; y += 8) { for (uint32_t x = 0; x < nWidth; x += 8) diff --git a/source/common/cutscenes/playmve.h b/source/common/cutscenes/playmve.h index 77e89a10b..ebee8fd29 100644 --- a/source/common/cutscenes/playmve.h +++ b/source/common/cutscenes/playmve.h @@ -58,7 +58,7 @@ public: { CHUNK_PREAMBLE_SIZE = 4, OPCODE_PREAMBLE_SIZE = 4, - + CHUNK_INIT_AUDIO = 0x0000, CHUNK_AUDIO_ONLY = 0x0001, CHUNK_INIT_VIDEO = 0x0002, @@ -70,7 +70,7 @@ public: CHUNK_NOMEM = 0xFFFD, CHUNK_EOF = 0xFFFE, CHUNK_BAD = 0xFFFF, - + OPCODE_END_OF_STREAM = 0x00, OPCODE_END_OF_CHUNK = 0x01, OPCODE_CREATE_TIMER = 0x02, @@ -93,7 +93,7 @@ public: OPCODE_UNKNOWN_13 = 0x13, OPCODE_UNKNOWN_14 = 0x14, OPCODE_UNKNOWN_15 = 0x15, - + PALETTE_COUNT = 256, kAudioBlocks = 20 // alloc a lot of blocks - need to store lots of audio data before video frames start. }; diff --git a/source/common/engine/cycler.cpp b/source/common/engine/cycler.cpp index 1d0d28486..1dbf1fce0 100644 --- a/source/common/engine/cycler.cpp +++ b/source/common/engine/cycler.cpp @@ -97,20 +97,20 @@ void FCycler::Update(double diff) { double mult, angle; double step = m_end - m_start; - + if (!m_shouldCycle) { return; } - + m_time += diff; if (m_time >= m_cycle) { m_time = m_cycle; } - + mult = m_time / m_cycle; - + switch (m_cycleType) { case CYCLE_Linear: @@ -149,7 +149,7 @@ void FCycler::Update(double diff) } break; } - + if (m_time == m_cycle) { m_time = 0.; diff --git a/source/common/engine/cycler.h b/source/common/engine/cycler.h index 0b49e644d..a2789f9ca 100644 --- a/source/common/engine/cycler.h +++ b/source/common/engine/cycler.h @@ -23,7 +23,7 @@ public: FCycler() = default; FCycler(const FCycler &other) = default; FCycler &operator=(const FCycler &other) = default; - + void Update(double diff); void SetParams(double start, double end, double cycle, bool update = false); void ShouldCycle(bool sc) { m_shouldCycle = sc; } diff --git a/source/common/engine/d_event.cpp b/source/common/engine/d_event.cpp index 7a51d054a..dd23c6e0d 100644 --- a/source/common/engine/d_event.cpp +++ b/source/common/engine/d_event.cpp @@ -138,7 +138,7 @@ void D_RemoveNextCharEvent() } } } - + //========================================================================== // diff --git a/source/common/engine/i_net.cpp b/source/common/engine/i_net.cpp index 40bedd562..cf5773b0c 100644 --- a/source/common/engine/i_net.cpp +++ b/source/common/engine/i_net.cpp @@ -172,7 +172,7 @@ FString GetPlayerName(int num) SOCKET UDPsocket (void) { SOCKET s; - + // allocate a socket s = socket (PF_INET, SOCK_DGRAM, IPPROTO_UDP); if (s == INVALID_SOCKET) @@ -193,7 +193,7 @@ void BindToLocalPort (SOCKET s, u_short port) address.sin_family = AF_INET; address.sin_addr.s_addr = INADDR_ANY; address.sin_port = htons(port); - + v = bind (s, (sockaddr *)&address, sizeof(address)); if (v == SOCKET_ERROR) I_FatalError ("BindToPort: %s", neterror ()); @@ -459,7 +459,7 @@ void StartNetwork (bool autoPort) netgame = true; multiplayer = true; - + // create communication socket mysocket = UDPsocket (); BindToLocalPort (mysocket, autoPort ? 0 : DOOMPORT); @@ -892,7 +892,7 @@ bool JoinGame (int i) SendAbort(); return false; } - + StartScreen->NetMessage ("Total players: %d", doomcom.numnodes); doomcom.id = DOOMCOM_ID; diff --git a/source/common/engine/i_net.h b/source/common/engine/i_net.h index 87d720014..f608f662a 100644 --- a/source/common/engine/i_net.h +++ b/source/common/engine/i_net.h @@ -76,7 +76,7 @@ struct doomcom_t // packet data to be sent uint8_t data[MAX_MSGLEN]; - + }; extern doomcom_t doomcom; diff --git a/source/common/engine/m_joy.h b/source/common/engine/m_joy.h index 016aa78d6..fc99379b0 100644 --- a/source/common/engine/m_joy.h +++ b/source/common/engine/m_joy.h @@ -21,7 +21,7 @@ enum EJoyAxis struct NOVTABLE IJoystickConfig { virtual ~IJoystickConfig() = 0; - + virtual FString GetName() = 0; virtual float GetSensitivity() = 0; virtual void SetSensitivity(float scale) = 0; diff --git a/source/common/engine/sc_man.cpp b/source/common/engine/sc_man.cpp index 68bc8542d..bbc209b14 100644 --- a/source/common/engine/sc_man.cpp +++ b/source/common/engine/sc_man.cpp @@ -857,7 +857,7 @@ bool FScanner::CheckFloat (bool evaluate) UnGet(); return false; } - + Float = strtod (String, &stopper); if (*stopper != 0) { diff --git a/source/common/engine/sc_man.h b/source/common/engine/sc_man.h index 1caa177a2..a39b8f5c3 100644 --- a/source/common/engine/sc_man.h +++ b/source/common/engine/sc_man.h @@ -159,7 +159,7 @@ public: { return constants.CheckKey(name); } - + // Token based variant bool CheckValue(bool allowfloat, bool evaluate = true); void MustGetValue(bool allowfloat, bool evaluate = true); diff --git a/source/common/engine/sc_man_scanner.re b/source/common/engine/sc_man_scanner.re index b10f48081..145abea41 100644 --- a/source/common/engine/sc_man_scanner.re +++ b/source/common/engine/sc_man_scanner.re @@ -102,14 +102,14 @@ std2: ":" { RET(':'); } ";" { RET(';'); } "}" { StateMode = 0; StateOptions = false; RET('}'); } - + WSP+ { goto std1; } "\n" { goto newline; } - + TOKS = (NWS\[/":;}]); TOKS* ([/] (TOKS\[*]) TOKS*)* { RET(TK_NonWhitespace); } - + */ } else if (tokens) // A well-defined scanner, based on the c.re example. @@ -222,7 +222,7 @@ std2: 'canraise' { RET(StateOptions ? TK_CanRaise : TK_Identifier); } 'offset' { RET(StateOptions ? TK_Offset : TK_Identifier); } 'light' { RET(StateOptions ? TK_Light : TK_Identifier); } - + /* other DECORATE top level keywords */ '#include' { RET(TK_Include); } diff --git a/source/common/engine/serializer.cpp b/source/common/engine/serializer.cpp index f123fb42d..f42289573 100644 --- a/source/common/engine/serializer.cpp +++ b/source/common/engine/serializer.cpp @@ -623,7 +623,7 @@ void FSerializer::WriteObjects() void FSerializer::ReadObjects(bool hubtravel) { bool founderrors = false; - + if (isReading() && BeginArray("objects")) { // Do not link any thinker that's being created here. This will be done by deserializing the thinker list later. diff --git a/source/common/engine/serializer.h b/source/common/engine/serializer.h index 4797ca20d..b114923df 100644 --- a/source/common/engine/serializer.h +++ b/source/common/engine/serializer.h @@ -111,7 +111,7 @@ public: { return w != nullptr; } - + bool canSkip() const; template diff --git a/source/common/engine/serializer_internal.h b/source/common/engine/serializer_internal.h index e05d5785c..31cf76c1a 100644 --- a/source/common/engine/serializer_internal.h +++ b/source/common/engine/serializer_internal.h @@ -42,7 +42,7 @@ struct FWriter rapidjson::StringBuffer mOutString; TArray mDObjects; TMap mObjectMap; - + FWriter(bool pretty) { if (!pretty) @@ -193,7 +193,7 @@ struct FReader rapidjson::Value *FindKey(const char *key) { FJSONObject &obj = mObjects.Last(); - + if (obj.mObject->IsObject()) { if (key == nullptr) diff --git a/source/common/engine/st_start.h b/source/common/engine/st_start.h index 1456e051c..09eb6ae67 100644 --- a/source/common/engine/st_start.h +++ b/source/common/engine/st_start.h @@ -47,7 +47,7 @@ public: CurPos = 0; NotchPos = 0; } - + virtual ~FStartupScreen() = default; virtual void Progress() {} @@ -98,7 +98,7 @@ public: void AppendStatusLine(const char *status); protected: void SetWindowSize(); - + int ThermX, ThermY, ThermWidth, ThermHeight; int HMsgY, SMsgX; }; diff --git a/source/common/engine/stats.h b/source/common/engine/stats.h index 3e048ac16..735931cb5 100644 --- a/source/common/engine/stats.h +++ b/source/common/engine/stats.h @@ -61,28 +61,28 @@ public: { Sec = 0; } - + void Clock() { timespec ts; - + clock_gettime(CLOCK_MONOTONIC, &ts); Sec -= ts.tv_sec + ts.tv_nsec * 1e-9; } - + void Unclock() { timespec ts; - + clock_gettime(CLOCK_MONOTONIC, &ts); Sec += ts.tv_sec + ts.tv_nsec * 1e-9; } - + double Time() { return Sec; } - + double TimeMS() { return Sec * 1e3; @@ -159,24 +159,24 @@ public: { Counter = 0; } - + void Clock() { int64_t time = rdtsc(); Counter -= time; } - + void Unclock(bool checkvar = true) { int64_t time = rdtsc(); Counter += time; } - + double Time() { return Counter * PerfToSec; } - + double TimeMS() { return Counter * PerfToMillisec; diff --git a/source/common/engine/stringtable.cpp b/source/common/engine/stringtable.cpp index b36e6e409..92819c144 100644 --- a/source/common/engine/stringtable.cpp +++ b/source/common/engine/stringtable.cpp @@ -639,7 +639,7 @@ bool FStringTable::MatchDefaultString(const char *name, const char *content) con // This only compares the first line to avoid problems with bad linefeeds. For the few cases where this feature is needed it is sufficient. auto c = GetLanguageString(name, FStringTable::default_table); if (!c) return false; - + // Check a secondary key, in case the text comparison cannot be done due to needed orthographic fixes (see Harmony's exit text) FStringf checkkey("%s_CHECK", name); auto cc = GetLanguageString(checkkey, FStringTable::default_table); diff --git a/source/common/engine/stringtable.h b/source/common/engine/stringtable.h index 0467b27ed..d75864303 100644 --- a/source/common/engine/stringtable.h +++ b/source/common/engine/stringtable.h @@ -91,7 +91,7 @@ public: allStrings.Insert(override_table, map); UpdateLanguage(nullptr); } - + const char *GetLanguageString(const char *name, uint32_t langtable, int gender = -1) const; bool MatchDefaultString(const char *name, const char *content) const; const char *GetString(const char *name, uint32_t *langtable, int gender = -1) const; @@ -110,7 +110,7 @@ private: StringMacroMap allMacros; LangMap allStrings; TArray> currentLanguageSet; - + void LoadLanguage (int lumpnum, const TArray &buffer); TArray> parseCSV(const TArray &buffer); bool ParseLanguageCSV(int lumpnum, const TArray &buffer); @@ -127,7 +127,7 @@ public: if (*str == '$') return str; return FString("$") + str; } - + static FString MakeMacro(const char *str, size_t len) { if (*str == '$') return FString(str, len); diff --git a/source/common/engine/v_colortables.cpp b/source/common/engine/v_colortables.cpp index 36849862b..b891ff142 100644 --- a/source/common/engine/v_colortables.cpp +++ b/source/common/engine/v_colortables.cpp @@ -57,7 +57,7 @@ ColorTable256k RGB256k; void BuildTransTable (const PalEntry *palette) { int r, g, b; - + // create the RGB555 lookup table for (r = 0; r < 32; r++) for (g = 0; g < 32; g++) @@ -68,16 +68,16 @@ void BuildTransTable (const PalEntry *palette) for (g = 0; g < 64; g++) for (b = 0; b < 64; b++) RGB256k.RGB[r][g][b] = ColorMatcher.Pick ((r<<2)|(r>>4), (g<<2)|(g>>4), (b<<2)|(b>>4)); - + int x, y; - + // create the swizzled palette for (x = 0; x < 65; x++) for (y = 0; y < 256; y++) Col2RGB8[x][y] = (((palette[y].r*x)>>4)<<20) | ((palette[y].g*x)>>4) | (((palette[y].b*x)>>4)<<10); - + // create the swizzled palette with the lsb of red and blue forced to 0 // (for green, a 1 is okay since it never gets added into) for (x = 1; x < 64; x++) @@ -90,7 +90,7 @@ void BuildTransTable (const PalEntry *palette) } Col2RGB8_LessPrecision[0] = Col2RGB8[0]; Col2RGB8_LessPrecision[64] = Col2RGB8[64]; - + // create the inverse swizzled palette for (x = 0; x < 65; x++) for (y = 0; y < 256; y++) diff --git a/source/common/filesystem/file_directory.cpp b/source/common/filesystem/file_directory.cpp index 9d215784d..80b9f6e57 100644 --- a/source/common/filesystem/file_directory.cpp +++ b/source/common/filesystem/file_directory.cpp @@ -118,7 +118,7 @@ int FDirectory::AddDirectory(const char *dirpath) FString dirmatch = dirpath; findstate_t find; dirmatch += '*'; - + handle = I_FindFirst(dirmatch.GetChars(), &find); if (handle == ((void *)(-1))) { diff --git a/source/common/filesystem/file_grp.cpp b/source/common/filesystem/file_grp.cpp index 97f17f17f..7128c1307 100644 --- a/source/common/filesystem/file_grp.cpp +++ b/source/common/filesystem/file_grp.cpp @@ -99,7 +99,7 @@ bool FGrpFile::Open(bool quiet, LumpFilterInfo*) Reader.Read(&header, sizeof(header)); NumLumps = LittleLong(header.NumLumps); - + GrpLump *fileinfo = new GrpLump[NumLumps]; Reader.Read (fileinfo, NumLumps * sizeof(GrpLump)); diff --git a/source/common/filesystem/file_pak.cpp b/source/common/filesystem/file_pak.cpp index 13aafa985..3a868766c 100644 --- a/source/common/filesystem/file_pak.cpp +++ b/source/common/filesystem/file_pak.cpp @@ -95,7 +95,7 @@ bool FPakFile::Open(bool quiet, LumpFilterInfo* filter) Reader.Read(&header, sizeof(header)); NumLumps = LittleLong(header.dirlen) / sizeof(dpackfile_t); header.dirofs = LittleLong(header.dirofs); - + TArray fileinfo(NumLumps, true); Reader.Seek (header.dirofs, FileReader::SeekSet); Reader.Read (fileinfo.Data(), NumLumps * sizeof(dpackfile_t)); diff --git a/source/common/filesystem/file_rff.cpp b/source/common/filesystem/file_rff.cpp index e8c4fce81..3e512b62d 100644 --- a/source/common/filesystem/file_rff.cpp +++ b/source/common/filesystem/file_rff.cpp @@ -221,7 +221,7 @@ int FRFFLump::FillCache() { int cryptlen = min (LumpSize, 256); uint8_t *data = (uint8_t *)Cache; - + for (int i = 0; i < cryptlen; ++i) { data[i] ^= i >> 1; diff --git a/source/common/filesystem/file_wad.cpp b/source/common/filesystem/file_wad.cpp index 216fab58b..8af39b5f8 100644 --- a/source/common/filesystem/file_wad.cpp +++ b/source/common/filesystem/file_wad.cpp @@ -206,7 +206,7 @@ bool FWadFile::Open(bool quiet, LumpFilterInfo*) Lumps[i].LumpSize = isBigEndian ? BigLong(fileinfo[i].Size) : LittleLong(fileinfo[i].Size); Lumps[i].Namespace = ns_global; Lumps[i].Flags = Lumps[i].Compressed ? LUMPF_COMPRESSED | LUMPF_SHORTNAME : LUMPF_SHORTNAME; - + // Check if the lump is within the WAD file and print a warning if not. if (Lumps[i].Position + Lumps[i].LumpSize > wadSize || Lumps[i].Position < 0 || Lumps[i].LumpSize < 0) { @@ -279,7 +279,7 @@ void FWadFile::SetNamespace(const char *startmarker, const char *endmarker, name int numstartmarkers = 0, numendmarkers = 0; unsigned int i; TArray markers; - + for(i = 0; i < NumLumps; i++) { if (IsMarker(i, startmarker)) @@ -302,7 +302,7 @@ void FWadFile::SetNamespace(const char *startmarker, const char *endmarker, name Printf(TEXTCOLOR_YELLOW"WARNING: %s marker without corresponding %s found.\n", endmarker, startmarker); - + if (flathack) { // We have found no F_START but one or more F_END markers. diff --git a/source/common/filesystem/file_whres.cpp b/source/common/filesystem/file_whres.cpp index 1c573ad38..969aaafab 100644 --- a/source/common/filesystem/file_whres.cpp +++ b/source/common/filesystem/file_whres.cpp @@ -95,10 +95,10 @@ FWHResFile::FWHResFile(const char *filename, FileReader &file) bool FWHResFile::Open(bool quiet, LumpFilterInfo*) { int directory[1024]; - + Reader.Seek(-4096, FileReader::SeekEnd); Reader.Read(directory, 4096); - + int nl =1024/3; Lumps.Resize(nl); @@ -135,10 +135,10 @@ FResourceFile *CheckWHRes(const char *filename, FileReader &file, bool quiet, Lu { int directory[1024]; int nl =1024/3; - + file.Seek(-4096, FileReader::SeekEnd); file.Read(directory, 4096); - + int checkpos = 0; for(int k = 0; k < nl; k++) { diff --git a/source/common/filesystem/filesystem.cpp b/source/common/filesystem/filesystem.cpp index 6151925a0..6e3bea388 100644 --- a/source/common/filesystem/filesystem.cpp +++ b/source/common/filesystem/filesystem.cpp @@ -219,12 +219,12 @@ void FileSystem::InitMultipleFiles (TArray &filenames, bool quiet, Lump for(unsigned i=0;iGetHash().GetChars()); MoveLumpsInFolder(path); } - + NumEntries = FileInfo.Size(); if (NumEntries == 0) { @@ -283,7 +283,7 @@ int FileSystem::AddFromBuffer(const char* name, const char* type, char* data, in FileInfo.Last().resourceId = id; return FileInfo.Size()-1; } - + //========================================================================== // // AddFile @@ -332,7 +332,7 @@ void FileSystem::AddFile (const char *filename, FileReader *filer, bool quiet, L startlump = NumEntries; FResourceFile *resfile; - + if (!isdir) resfile = FResourceFile::OpenResourceFile(filename, filereader, quiet, false, filter); else @@ -945,10 +945,10 @@ void FileSystem::MoveLumpsInFolder(const char *path) { return; } - + auto len = strlen(path); auto rfnum = FileInfo.Last().rfnum; - + unsigned i; for (i = 0; i < FileInfo.Size(); i++) { @@ -1021,7 +1021,7 @@ int FileSystem::FindLumpMulti (const char **names, int *lastlump, bool anyns, in { if (anyns || lump_p->Namespace == ns_global) { - + for(const char **name = names; *name != NULL; name++) { if (!strnicmp(*name, lump_p->shortName.String, 8)) @@ -1511,7 +1511,7 @@ int FileSystem::GetEntryCount (int rfnum) const noexcept { return 0; } - + return Files[rfnum]->LumpCount(); } diff --git a/source/common/filesystem/resourcefile.cpp b/source/common/filesystem/resourcefile.cpp index 154b3a0bd..3b8e39915 100644 --- a/source/common/filesystem/resourcefile.cpp +++ b/source/common/filesystem/resourcefile.cpp @@ -306,11 +306,11 @@ int lumpcmp(const void * a, const void * b) void FResourceFile::GenerateHash() { // hash the lump directory after sorting - + Hash.Format(("%08X-%04X-"), (unsigned)Reader.GetLength(), NumLumps); - + MD5Context md5; - + uint8_t digest[16]; for(uint32_t i = 0; i < NumLumps; i++) { @@ -382,9 +382,9 @@ int FResourceFile::FilterLumps(FString filtername, void *lumps, size_t lumpsize, return 0; } filter << "filter/" << filtername << '/'; - + bool found = FindPrefixRange(filter, lumps, lumpsize, max, start, end); - + // Workaround for old Doom filter names. if (!found && filtername.IndexOf("doom.id.doom") == 0) { diff --git a/source/common/fonts/font.cpp b/source/common/fonts/font.cpp index 5ae353e4b..e554f6366 100644 --- a/source/common/fonts/font.cpp +++ b/source/common/fonts/font.cpp @@ -86,10 +86,10 @@ FFont::FFont (const char *name, const char *nametemplate, const char *filetempla TMap charMap; int minchar = INT_MAX; int maxchar = INT_MIN; - + // Read the font's configuration. // This will not be done for the default fonts, because they are not atomic and the default content does not need it. - + TArray folderdata; if (filetemplate != nullptr) { @@ -97,16 +97,16 @@ FFont::FFont (const char *name, const char *nametemplate, const char *filetempla // If a name template is given, collect data from all resource files. // For anything else, each folder is being treated as an atomic, self-contained unit and mixing from different glyph sets is blocked. fileSystem.GetFilesInFolder(path, folderdata, nametemplate == nullptr); - + //if (nametemplate == nullptr) { FStringf infpath("fonts/%s/font.inf", filetemplate); - + unsigned index = folderdata.FindEx([=](const FolderEntry &entry) { return infpath.CompareNoCase(entry.name) == 0; }); - + if (index < folderdata.Size()) { FScanner sc; @@ -182,7 +182,7 @@ FFont::FFont (const char *name, const char *nametemplate, const char *filetempla } } } - + if (FixedWidth > 0) { ReadSheetFont(folderdata, FixedWidth, FontHeight, Scale); @@ -559,10 +559,10 @@ FFont *FFont::FindFont (FName name) void RecordTextureColors (FImageSource *pic, uint32_t *usedcolors) { int x; - + auto pixels = pic->GetPalettedPixels(false); auto size = pic->GetWidth() * pic->GetHeight(); - + for(x = 0;x < size; x++) { usedcolors[pixels[x]]++; @@ -727,7 +727,7 @@ int FFont::GetCharCode(int code, bool needpic) const { return code; } - + // Use different substitution logic based on the fonts content: // In a font which has both upper and lower case, prefer unaccented small characters over capital ones. // In a pure upper-case font, do not check for lower case replacements. @@ -805,7 +805,7 @@ FGameTexture *FFont::GetChar (int code, int translation, int *const width) const code -= FirstChar; xmove = Chars[code].XMove; } - + if (width != nullptr) { *width = xmove; diff --git a/source/common/fonts/hexfont.cpp b/source/common/fonts/hexfont.cpp index 612d3d326..3b985619e 100644 --- a/source/common/fonts/hexfont.cpp +++ b/source/common/fonts/hexfont.cpp @@ -266,7 +266,7 @@ int FHexFontChar2::CopyPixels(FBitmap* bmp, int conversion) class FHexFont : public FFont { - + public: //========================================================================== // @@ -283,14 +283,14 @@ public: assert(lump >= 0); FontName = fontname; - + FirstChar = hexdata.FirstChar; LastChar = hexdata.LastChar; FontHeight = 16; SpaceWidth = 9; GlobalKerning = 0; - + Chars.Resize(LastChar - FirstChar + 1); for (int i = FirstChar; i <= LastChar; i++) { @@ -325,7 +325,7 @@ public: else Translations[i] = LuminosityTranslation(i * 2 + 1, minlum, maxlum); } } - + }; diff --git a/source/common/fonts/singlelumpfont.cpp b/source/common/fonts/singlelumpfont.cpp index 6da14b0d0..d3bee25a3 100644 --- a/source/common/fonts/singlelumpfont.cpp +++ b/source/common/fonts/singlelumpfont.cpp @@ -96,7 +96,7 @@ protected: void LoadFON1 (int lump, const uint8_t *data); void LoadFON2 (int lump, const uint8_t *data); void LoadBMF (int lump, const uint8_t *data); - + enum { FONT1, @@ -259,7 +259,7 @@ void FSingleLumpFont::LoadFON2 (int lump, const uint8_t *data) LastChar = data[7]; ActiveColors = data[10]+1; RescalePalette = data[9] == 0; - + count = LastChar - FirstChar + 1; Chars.Resize(count); TArray widths2(count, true); diff --git a/source/common/fonts/v_font.cpp b/source/common/fonts/v_font.cpp index 20aa502bd..28af85202 100644 --- a/source/common/fonts/v_font.cpp +++ b/source/common/fonts/v_font.cpp @@ -106,10 +106,10 @@ FFont *V_GetFont(const char *name, const char *fontlumpname) int lump = -1; int folderfile = -1; - + TArray folderdata; FStringf path("fonts/%s/", name); - + // Use a folder-based font only if it comes from a later file than the single lump version. if (fileSystem.GetFilesInFolder(path, folderdata, true)) { @@ -119,7 +119,7 @@ FFont *V_GetFont(const char *name, const char *fontlumpname) lump = fileSystem.CheckNumForFullName(fontlumpname? fontlumpname : name, true); - + if (lump != -1 && fileSystem.GetFileContainer(lump) >= folderfile) { uint32_t head; @@ -769,7 +769,7 @@ static void CalcDefaultTranslation(FFont* base, int index) lowindex = highindex++; } } - + } //========================================================================== diff --git a/source/common/menu/menu.cpp b/source/common/menu/menu.cpp index bbfe2f4a5..89017d67b 100644 --- a/source/common/menu/menu.cpp +++ b/source/common/menu/menu.cpp @@ -271,7 +271,7 @@ DMenu::DMenu(DMenu *parent) DontDim = false; GC::WriteBarrier(this, parent); } - + //============================================================================= // // diff --git a/source/common/models/model_kvx.h b/source/common/models/model_kvx.h index 36db774c7..8d456d52c 100644 --- a/source/common/models/model_kvx.h +++ b/source/common/models/model_kvx.h @@ -48,7 +48,7 @@ protected: unsigned int mNumIndices; TArray mVertices; TArray mIndices; - + void MakeSlabPolys(int x, int y, kvxslab_t *voxptr, FVoxelMap &check); void AddFace(int x1, int y1, int z1, int x2, int y2, int z2, int x3, int y3, int z3, int x4, int y4, int z4, uint8_t color, FVoxelMap &check); unsigned int AddVertex(FModelVertex &vert, FVoxelMap &check); diff --git a/source/common/models/models_md2.cpp b/source/common/models/models_md2.cpp index 17cde4548..8924392a4 100644 --- a/source/common/models/models_md2.cpp +++ b/source/common/models/models_md2.cpp @@ -536,7 +536,7 @@ void FMD2Model::LoadGeometry() } lods[0].triangles = new FTriangle[lodInfo[0].numTriangles]; - + int cnt = lodInfo[0].numTriangles; memcpy(lods[0].triangles, buffer + lodInfo[0].offsetTriangles, sizeof(FTriangle) * cnt); for (int j = 0; j < cnt; j++) diff --git a/source/common/models/models_md3.cpp b/source/common/models/models_md3.cpp index 202ccf8d1..0ec4d700f 100644 --- a/source/common/models/models_md3.cpp +++ b/source/common/models/models_md3.cpp @@ -133,7 +133,7 @@ bool FMD3Model::Load(const char * path, int lumpnum, const char * buffer, int le auto numFrames = LittleLong(hdr->Num_Frames); auto numSurfaces = LittleLong(hdr->Num_Surfaces); - + numTags = LittleLong(hdr->Num_Tags); md3_frame_t * frm = (md3_frame_t*)(buffer + LittleLong(hdr->Ofs_Frames)); diff --git a/source/common/models/models_voxel.cpp b/source/common/models/models_voxel.cpp index e0036d6da..50fc4df09 100644 --- a/source/common/models/models_voxel.cpp +++ b/source/common/models/models_voxel.cpp @@ -100,7 +100,7 @@ TArray FVoxelTexture::CreatePalettedPixels(int conversion) pe.b = (pp[2] << 2) | (pp[2] >> 4); // Alphatexture handling is just for completeness, but rather unlikely to be used ever. Pixels[i] = conversion == luminance ? pe.r : ColorMatcher.Pick(pe); - + } } else diff --git a/source/common/objects/dobject.cpp b/source/common/objects/dobject.cpp index 8516229de..34e2f4cc7 100644 --- a/source/common/objects/dobject.cpp +++ b/source/common/objects/dobject.cpp @@ -267,7 +267,7 @@ DObject::~DObject () Release(); } } - + if (nullptr != type) { type->DestroySpecials(this); diff --git a/source/common/platform/posix/cocoa/i_input.mm b/source/common/platform/posix/cocoa/i_input.mm index ebda85a2e..f53ae8ebc 100644 --- a/source/common/platform/posix/cocoa/i_input.mm +++ b/source/common/platform/posix/cocoa/i_input.mm @@ -429,7 +429,7 @@ void ProcessKeyboardEventInMenu(NSEvent* theEvent) event.subtype = EV_GUI_Char; event.data1 = realchar; event.data2 = event.data3 & GKM_ALT; - + D_PostEvent(&event); } } @@ -667,9 +667,9 @@ void ProcessMouseWheelEvent(NSEvent* theEvent) { return; } - + event_t event = {}; - + if (GUICapture) { event.type = EV_GUI_Event; @@ -681,7 +681,7 @@ void ProcessMouseWheelEvent(NSEvent* theEvent) event.type = isZeroDelta ? EV_KeyUp : EV_KeyDown; event.data1 = delta > 0.0f ? KEY_MWHEELUP : KEY_MWHEELDOWN; } - + D_PostEvent(&event); } diff --git a/source/common/platform/posix/cocoa/i_joystick.cpp b/source/common/platform/posix/cocoa/i_joystick.cpp index 2bbfedb1d..733380366 100644 --- a/source/common/platform/posix/cocoa/i_joystick.cpp +++ b/source/common/platform/posix/cocoa/i_joystick.cpp @@ -1127,7 +1127,7 @@ void IOKitJoystickManager::AddDevices(const IONotificationPortRef notificationPo } IOObjectRelease(device); - + PostDeviceChangeEvent(); } } diff --git a/source/common/platform/posix/cocoa/i_main.mm b/source/common/platform/posix/cocoa/i_main.mm index 727edef78..09c1daf56 100644 --- a/source/common/platform/posix/cocoa/i_main.mm +++ b/source/common/platform/posix/cocoa/i_main.mm @@ -90,10 +90,10 @@ static bool ReadSystemVersionFromPlist(NSOperatingSystemVersion& version) if (stat(plistPath, &dummy) != 0) return false; - + char commandLine[1024] = {}; snprintf(commandLine, sizeof commandLine, "defaults read %s ProductVersion", plistPath); - + FILE *const versionFile = popen(commandLine, "r"); if (versionFile == nullptr) @@ -146,7 +146,7 @@ void I_DetectOS() } const char* name = "Unknown version"; - + switch (version.majorVersion) { case 10: @@ -183,7 +183,7 @@ void I_DetectOS() #else "Unknown"; #endif - + Printf("%s running %s %d.%d.%d (%s) %s\n", model, name, int(version.majorVersion), int(version.minorVersion), int(version.patchVersion), release, architecture); @@ -266,14 +266,14 @@ ApplicationController* appCtrl; - (void)keyDown:(NSEvent*)theEvent { // Empty but present to avoid playing of 'beep' alert sound - + ZD_UNUSED(theEvent); } - (void)keyUp:(NSEvent*)theEvent { // Empty but present to avoid playing of 'beep' alert sound - + ZD_UNUSED(theEvent); } @@ -283,7 +283,7 @@ extern bool AppActive; - (void)applicationDidBecomeActive:(NSNotification*)aNotification { ZD_UNUSED(aNotification); - + S_SetSoundPaused(1); AppActive = true; @@ -292,7 +292,7 @@ extern bool AppActive; - (void)applicationWillResignActive:(NSNotification*)aNotification { ZD_UNUSED(aNotification); - + S_SetSoundPaused(i_soundinbackground); AppActive = false; diff --git a/source/common/platform/posix/cocoa/i_video.mm b/source/common/platform/posix/cocoa/i_video.mm index 8f730e488..2350ca954 100644 --- a/source/common/platform/posix/cocoa/i_video.mm +++ b/source/common/platform/posix/cocoa/i_video.mm @@ -449,7 +449,7 @@ public: } else #endif - + #ifdef HAVE_SOFTPOLY if (vid_preferbackend == 2) { @@ -832,7 +832,7 @@ bool I_SetCursor(FGameTexture *cursorpic) if (NULL != cursorpic && cursorpic->isValid()) { // Create bitmap image representation - + auto sbuffer = cursorpic->GetTexture()->CreateTexBuffer(0); const NSInteger imageWidth = sbuffer.mWidth; @@ -873,11 +873,11 @@ bool I_SetCursor(FGameTexture *cursorpic) cursor = [[NSCursor alloc] initWithImage:cursorImage hotSpot:NSMakePoint(0.0f, 0.0f)]; } - + SystemBaseFrameBuffer::SetCursor(cursor); - + [pool release]; - + return true; } diff --git a/source/common/platform/posix/osx/i_specialpaths.mm b/source/common/platform/posix/osx/i_specialpaths.mm index ff435b769..d51bd4ca5 100644 --- a/source/common/platform/posix/osx/i_specialpaths.mm +++ b/source/common/platform/posix/osx/i_specialpaths.mm @@ -256,7 +256,7 @@ FString M_GetDocumentsPath() FString M_GetDemoPath() { FString path = GetSpecialPath(NSDocumentDirectory); - + if (path.IsNotEmpty()) { path += "/" GAME_DIR "/Demos/"; diff --git a/source/common/platform/posix/osx/iwadpicker_cocoa.mm b/source/common/platform/posix/osx/iwadpicker_cocoa.mm index 4ff7d737b..e72aa5aad 100644 --- a/source/common/platform/posix/osx/iwadpicker_cocoa.mm +++ b/source/common/platform/posix/osx/iwadpicker_cocoa.mm @@ -446,7 +446,7 @@ int I_PickIWad_Cocoa (WadStuff *wads, int numwads, bool showwin, int defaultiwad if (ret >= 0) { NSString* parametersToAppend = [picker commandLineParameters]; - + if (0 != [parametersToAppend length]) { RestartWithParameters(wads[ret], parametersToAppend); diff --git a/source/common/platform/posix/sdl/hardware.cpp b/source/common/platform/posix/sdl/hardware.cpp index ce877e943..46daca4f9 100644 --- a/source/common/platform/posix/sdl/hardware.cpp +++ b/source/common/platform/posix/sdl/hardware.cpp @@ -79,7 +79,7 @@ void I_InitGraphics () extern IVideo *gl_CreateVideo(); Video = gl_CreateVideo(); - + if (Video == NULL) I_FatalError ("Failed to initialize display"); } diff --git a/source/common/platform/posix/sdl/i_input.cpp b/source/common/platform/posix/sdl/i_input.cpp index a102b38a8..300e22370 100644 --- a/source/common/platform/posix/sdl/i_input.cpp +++ b/source/common/platform/posix/sdl/i_input.cpp @@ -205,7 +205,7 @@ static void MouseRead () static void I_CheckNativeMouse () { bool focus = SDL_GetKeyboardFocus() != NULL; - + bool captureModeInGame = sysCallbacks.CaptureModeInGame && sysCallbacks.CaptureModeInGame(); bool wantNative = !focus || (!use_mouse || GUICapture || !captureModeInGame); @@ -228,7 +228,7 @@ void MessagePump (const SDL_Event &sev) static int lastx = 0, lasty = 0; int x, y; event_t event = { 0,0,0,0,0,0,0 }; - + switch (sev.type) { case SDL_QUIT: @@ -369,7 +369,7 @@ void MessagePump (const SDL_Event &sev) { break; } - + event.type = sev.type == SDL_KEYDOWN ? EV_KeyDown : EV_KeyUp; // Try to look up our key mapped key for conversion to DirectInput. @@ -448,7 +448,7 @@ void MessagePump (const SDL_Event &sev) if (GUICapture) { int size; - + int unichar = utf8_decode((const uint8_t*)sev.text.text, &size); if (size != 4) { @@ -474,7 +474,7 @@ void MessagePump (const SDL_Event &sev) void I_GetEvent () { SDL_Event sev; - + while (SDL_PollEvent (&sev)) { MessagePump (sev); diff --git a/source/common/platform/posix/sdl/i_main.cpp b/source/common/platform/posix/sdl/i_main.cpp index b52561fdf..a28b90f01 100644 --- a/source/common/platform/posix/sdl/i_main.cpp +++ b/source/common/platform/posix/sdl/i_main.cpp @@ -171,7 +171,7 @@ int main (int argc, char **argv) } printf("\n"); - + Args = new FArgs(argc, argv); // Should we even be doing anything with progdir on Unix systems? @@ -188,7 +188,7 @@ int main (int argc, char **argv) { progdir = "./"; } - + I_StartupJoysticks(); const int result = GameMain(); diff --git a/source/common/platform/posix/sdl/i_system.cpp b/source/common/platform/posix/sdl/i_system.cpp index e370780ca..0bca72304 100644 --- a/source/common/platform/posix/sdl/i_system.cpp +++ b/source/common/platform/posix/sdl/i_system.cpp @@ -159,7 +159,7 @@ void RedrawProgressBar(int CurPos, int MaxPos) memset(progressBuffer,'.',512); progressBuffer[sizeOfWindow.ws_col - 1] = 0; int lengthOfStr = 0; - + while (curProgVal-- > 0) { progressBuffer[lengthOfStr++] = '='; @@ -208,7 +208,7 @@ void I_PrintStr(const char *cp) else if (v < 0.90) attrib = 0x7; else attrib = 0xF; } - + printData.AppendFormat("\033[%um",((attrib & 0x8) ? 90 : 30) + (attrib & 0x7)); } else printData.AppendFormat("\033[38;2;%u;%u;%um",color.r,color.g,color.b); @@ -224,7 +224,7 @@ void I_PrintStr(const char *cp) else break; } } - + if (StartScreen) CleanProgressBar(); fputs(printData.GetChars(),stdout); if (terminal) fputs("\033[0m",stdout); @@ -303,7 +303,7 @@ int I_PickIWad (WadStuff *wads, int numwads, bool showwin, int defaultiwad) #ifdef __APPLE__ return I_PickIWad_Cocoa (wads, numwads, showwin, defaultiwad); #endif - + if (!isatty(fileno(stdin))) { return defaultiwad; diff --git a/source/common/platform/posix/sdl/i_system.mm b/source/common/platform/posix/sdl/i_system.mm index 50faf94a8..f9212f08c 100644 --- a/source/common/platform/posix/sdl/i_system.mm +++ b/source/common/platform/posix/sdl/i_system.mm @@ -5,13 +5,13 @@ void Mac_I_FatalError(const char* errortext) { // Close window or exit fullscreen and release mouse capture SDL_Quit(); - + const CFStringRef errorString = CFStringCreateWithCStringNoCopy( kCFAllocatorDefault, errortext, kCFStringEncodingASCII, kCFAllocatorNull ); if ( NULL != errorString ) { CFOptionFlags dummy; - + CFUserNotificationDisplayAlert( 0, kCFUserNotificationStopAlertLevel, NULL, NULL, NULL, CFSTR( "Fatal Error" ), errorString, CFSTR( "Exit" ), NULL, NULL, &dummy ); CFRelease( errorString ); diff --git a/source/common/platform/posix/sdl/sdlglvideo.cpp b/source/common/platform/posix/sdl/sdlglvideo.cpp index 73ca00b99..9b4aa6cd6 100644 --- a/source/common/platform/posix/sdl/sdlglvideo.cpp +++ b/source/common/platform/posix/sdl/sdlglvideo.cpp @@ -53,7 +53,7 @@ #ifdef HAVE_GLES2 #include "gles_framebuffer.h" #endif - + #ifdef HAVE_VULKAN #include "vulkan/system/vk_framebuffer.h" #endif @@ -517,7 +517,7 @@ int SystemBaseFrameBuffer::GetClientWidth() return width; } #endif - + #ifdef HAVE_VULKAN assert(Priv::vulkanEnabled); SDL_Vulkan_GetDrawableSize(Priv::window, &width, nullptr); diff --git a/source/common/platform/posix/sdl/st_start.cpp b/source/common/platform/posix/sdl/st_start.cpp index 6d41fa629..4c434bba9 100644 --- a/source/common/platform/posix/sdl/st_start.cpp +++ b/source/common/platform/posix/sdl/st_start.cpp @@ -228,7 +228,7 @@ void FTTYStartupScreen::NetMessage(const char *format, ...) { FString str; va_list argptr; - + va_start (argptr, format); str.VFormat (format, argptr); va_end (argptr); diff --git a/source/common/platform/win32/hardware.cpp b/source/common/platform/win32/hardware.cpp index 13e799594..a5e67604f 100644 --- a/source/common/platform/win32/hardware.cpp +++ b/source/common/platform/win32/hardware.cpp @@ -165,5 +165,5 @@ void I_InitGraphics () // we somehow STILL don't have a display!! if (Video == NULL) I_FatalError ("Failed to initialize display"); - + } diff --git a/source/common/platform/win32/i_crash.cpp b/source/common/platform/win32/i_crash.cpp index a8d7b5c54..94ca7d6c2 100644 --- a/source/common/platform/win32/i_crash.cpp +++ b/source/common/platform/win32/i_crash.cpp @@ -1581,7 +1581,7 @@ static void AddZipFile (HANDLE ziphandle, TarFile *whichfile, short dosdate, sho local.ModDate = dosdate; local.UncompressedSize = LittleLong(whichfile->UncompressedSize); local.NameLength = LittleShort((uint16_t)strlen(whichfile->Filename)); - + whichfile->ZipOffset = SetFilePointer (ziphandle, 0, NULL, FILE_CURRENT); WriteFile (ziphandle, &local, sizeof(local), &wrote, NULL); WriteFile (ziphandle, whichfile->Filename, (DWORD)strlen(whichfile->Filename), &wrote, NULL); diff --git a/source/common/platform/win32/i_keyboard.cpp b/source/common/platform/win32/i_keyboard.cpp index ce204f71c..00f910949 100644 --- a/source/common/platform/win32/i_keyboard.cpp +++ b/source/common/platform/win32/i_keyboard.cpp @@ -58,7 +58,7 @@ class FDInputKeyboard : public FKeyboard public: FDInputKeyboard(); ~FDInputKeyboard(); - + bool GetDevice(); void ProcessInput(); diff --git a/source/common/platform/win32/i_main.cpp b/source/common/platform/win32/i_main.cpp index acdfd2eb5..68cd06a00 100644 --- a/source/common/platform/win32/i_main.cpp +++ b/source/common/platform/win32/i_main.cpp @@ -777,7 +777,7 @@ int DoMain (HINSTANCE hInstance) RECT cRect; TIMECAPS tc; DEVMODE displaysettings; - + // Do not use the multibyte __argv here because we want UTF-8 arguments // and those can only be done by converting the Unicode variants. Args = new FArgs(); @@ -787,17 +787,17 @@ int DoMain (HINSTANCE hInstance) { Args->AppendArg(FString(wargv[i])); } - + // Load Win32 modules Kernel32Module.Load({"kernel32.dll"}); Shell32Module.Load({"shell32.dll"}); User32Module.Load({"user32.dll"}); - + // Under XP, get our session ID so we can know when the user changes/locks sessions. // Since we need to remain binary compatible with older versions of Windows, we // need to extract the ProcessIdToSessionId function from kernel32.dll manually. HMODULE kernel = GetModuleHandleA ("kernel32.dll"); - + if (Args->CheckParm("-stdout")) { // As a GUI application, we don't normally get a console when we start. @@ -805,7 +805,7 @@ int DoMain (HINSTANCE hInstance) // console. Otherwise, we can create a new one. If we already have a // stdout handle, then we have been redirected and should just use that // handle instead of creating a console window. - + StdOut = GetStdHandle(STD_OUTPUT_HANDLE); if (StdOut != NULL) { @@ -832,18 +832,18 @@ int DoMain (HINSTANCE hInstance) { StdOut = GetStdHandle(STD_OUTPUT_HANDLE); } - + // These two functions do not exist in Windows XP. BOOL (WINAPI* p_GetCurrentConsoleFontEx)(HANDLE hConsoleOutput, BOOL bMaximumWindow, PCONSOLE_FONT_INFOEX lpConsoleCurrentFontEx); BOOL (WINAPI* p_SetCurrentConsoleFontEx)(HANDLE hConsoleOutput, BOOL bMaximumWindow, PCONSOLE_FONT_INFOEX lpConsoleCurrentFontEx); - + p_SetCurrentConsoleFontEx = (decltype(p_SetCurrentConsoleFontEx))GetProcAddress(kernel, "SetCurrentConsoleFontEx"); p_GetCurrentConsoleFontEx = (decltype(p_GetCurrentConsoleFontEx))GetProcAddress(kernel, "GetCurrentConsoleFontEx"); if (p_SetCurrentConsoleFontEx && p_GetCurrentConsoleFontEx) { CONSOLE_FONT_INFOEX cfi; cfi.cbSize = sizeof(cfi); - + if (p_GetCurrentConsoleFontEx(StdOut, false, &cfi)) { if (*cfi.FaceName == 0) // If the face name is empty, the default (useless) raster font is actoive. @@ -858,16 +858,16 @@ int DoMain (HINSTANCE hInstance) FancyStdOut = true; } } - + // Set the timer to be as accurate as possible if (timeGetDevCaps (&tc, sizeof(tc)) != TIMERR_NOERROR) TimerPeriod = 1; // Assume minimum resolution of 1 ms else TimerPeriod = tc.wPeriodMin; - + timeBeginPeriod (TimerPeriod); atexit(UnTbp); - + // Figure out what directory the program resides in. WCHAR progbuff[1024]; if (GetModuleFileNameW(nullptr, progbuff, sizeof progbuff) == 0) @@ -875,22 +875,22 @@ int DoMain (HINSTANCE hInstance) MessageBoxA(nullptr, "Fatal", "Could not determine program location.", MB_ICONEXCLAMATION|MB_OK); exit(-1); } - + progbuff[1023] = '\0'; if (auto lastsep = wcsrchr(progbuff, '\\')) { lastsep[1] = '\0'; } - + progdir = progbuff; FixPathSeperator(progdir); - + HDC screenDC = GetDC(0); int dpi = GetDeviceCaps(screenDC, LOGPIXELSX); ReleaseDC(0, screenDC); width = (512 * dpi + 96 / 2) / 96; height = (384 * dpi + 96 / 2) / 96; - + // Many Windows structures that specify their size do so with the first // element. DEVMODE is not one of those structures. memset (&displaysettings, 0, sizeof(displaysettings)); @@ -898,12 +898,12 @@ int DoMain (HINSTANCE hInstance) EnumDisplaySettings (NULL, ENUM_CURRENT_SETTINGS, &displaysettings); x = (displaysettings.dmPelsWidth - width) / 2; y = (displaysettings.dmPelsHeight - height) / 2; - + if (Args->CheckParm ("-0")) { x = y = 0; } - + WNDCLASS WndClass; WndClass.style = 0; WndClass.lpfnWndProc = LConProc; @@ -915,14 +915,14 @@ int DoMain (HINSTANCE hInstance) WndClass.hbrBackground = NULL; WndClass.lpszMenuName = NULL; WndClass.lpszClassName = WinClassName; - + /* register this new class with Windows */ if (!RegisterClass((LPWNDCLASS)&WndClass)) { MessageBoxA(nullptr, "Could not register window class", "Fatal", MB_ICONEXCLAMATION|MB_OK); exit(-1); } - + /* create window */ FStringf caption("" GAMENAME " %s " X64 " (%s)", GetVersionString(), GetGitTime()); std::wstring wcaption = caption.WideString(); @@ -936,13 +936,13 @@ int DoMain (HINSTANCE hInstance) (HMENU) NULL, hInstance, NULL); - + if (!Window) { MessageBoxA(nullptr, "Unable to create main window", "Fatal", MB_ICONEXCLAMATION|MB_OK); exit(-1); } - + if (kernel != NULL) { typedef BOOL (WINAPI *pts)(DWORD, DWORD *); @@ -969,15 +969,15 @@ int DoMain (HINSTANCE hInstance) } } } - + GetClientRect (Window, &cRect); - + WinWidth = cRect.right; WinHeight = cRect.bottom; - + CoInitialize (NULL); atexit (UnCOM); - + int ret = GameMain (); CheckForRestart(); @@ -990,7 +990,7 @@ int DoMain (HINSTANCE hInstance) { // Outputting to a new console window: Wait for a keypress before quitting. DWORD bytes; HANDLE stdinput = GetStdHandle(STD_INPUT_HANDLE); - + ShowWindow(Window, SW_HIDE); WriteFile(StdOut, "Press any key to exit...", 24, &bytes, NULL); FlushConsoleInputBuffer(stdinput); @@ -1017,7 +1017,7 @@ void I_ShowFatalError(const char *msg) { Printf("%s", CVMAbortException::stacktrace.GetChars()); } - + if (!batchrun) { ShowErrorPane(msg); diff --git a/source/common/platform/win32/i_mouse.cpp b/source/common/platform/win32/i_mouse.cpp index 102b1fbab..4c2673e35 100644 --- a/source/common/platform/win32/i_mouse.cpp +++ b/source/common/platform/win32/i_mouse.cpp @@ -86,7 +86,7 @@ class FDInputMouse : public FMouse public: FDInputMouse(); ~FDInputMouse(); - + bool GetDevice(); void ProcessInput(); bool WndProcHook(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam, LRESULT *result); @@ -103,7 +103,7 @@ class FWin32Mouse : public FMouse public: FWin32Mouse(); ~FWin32Mouse(); - + bool GetDevice(); void ProcessInput(); bool WndProcHook(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam, LRESULT *result); @@ -697,7 +697,7 @@ bool FDInputMouse::GetDevice() { return false; } - + // How many buttons does this mouse have? DIDEVCAPS_DX3 caps = { sizeof(caps) }; hr = Device->GetCapabilities((DIDEVCAPS *)&caps); diff --git a/source/common/platform/win32/i_rawps2.cpp b/source/common/platform/win32/i_rawps2.cpp index 90e575a71..f418872e8 100644 --- a/source/common/platform/win32/i_rawps2.cpp +++ b/source/common/platform/win32/i_rawps2.cpp @@ -503,7 +503,7 @@ bool FRawPS2Controller::ProcessInput(RAWHID *raw, int code) // Generate events for buttons that have changed. int buttons = 0; - + // If we know we are digital, ignore the D-Pad. if (!digital) { @@ -538,7 +538,7 @@ void FRawPS2Controller::ProcessThumbstick(int value1, AxisInfo *axis1, int value { uint8_t buttonstate; double axisval1, axisval2; - + axisval1 = value1 * (2.0 / 255) - 1.0; axisval2 = value2 * (2.0 / 255) - 1.0; axisval1 = Joy_RemoveDeadZone(axisval1, axis1->DeadZone, NULL); diff --git a/source/common/platform/win32/i_system.cpp b/source/common/platform/win32/i_system.cpp index 07d00b59b..9a3f4a795 100644 --- a/source/common/platform/win32/i_system.cpp +++ b/source/common/platform/win32/i_system.cpp @@ -868,7 +868,7 @@ static HCURSOR CreateBitmapCursor(int xhot, int yhot, HBITMAP and_mask, HBITMAP // Delete the bitmaps. DeleteObject(and_mask); DeleteObject(color_mask); - + return cursor; } diff --git a/source/common/platform/win32/i_xinput.cpp b/source/common/platform/win32/i_xinput.cpp index 2e8b79dc3..ba4605dd0 100644 --- a/source/common/platform/win32/i_xinput.cpp +++ b/source/common/platform/win32/i_xinput.cpp @@ -310,7 +310,7 @@ void FXInputController::ProcessThumbstick(int value1, AxisInfo *axis1, { uint8_t buttonstate; double axisval1, axisval2; - + axisval1 = (value1 - SHRT_MIN) * 2.0 / 65536 - 1.0; axisval2 = (value2 - SHRT_MIN) * 2.0 / 65536 - 1.0; axisval1 = Joy_RemoveDeadZone(axisval1, axis1->DeadZone, NULL); @@ -337,7 +337,7 @@ void FXInputController::ProcessTrigger(int value, AxisInfo *axis, int base) { uint8_t buttonstate; double axisval; - + axisval = Joy_RemoveDeadZone(value / 256.0, axis->DeadZone, &buttonstate); Joy_GenerateButtonEvents(axis->ButtonValue, buttonstate, 1, base); axis->ButtonValue = buttonstate; diff --git a/source/common/platform/win32/st_start.cpp b/source/common/platform/win32/st_start.cpp index 43e113a1b..3e67c795c 100644 --- a/source/common/platform/win32/st_start.cpp +++ b/source/common/platform/win32/st_start.cpp @@ -310,7 +310,7 @@ void FBasicStartupScreen::NetMessage(const char *format, ...) { FString str; va_list argptr; - + va_start (argptr, format); str.VFormat (format, argptr); va_end (argptr); diff --git a/source/common/platform/win32/win32vulkanvideo.cpp b/source/common/platform/win32/win32vulkanvideo.cpp index d2c2e7b40..4c8f887c0 100644 --- a/source/common/platform/win32/win32vulkanvideo.cpp +++ b/source/common/platform/win32/win32vulkanvideo.cpp @@ -17,7 +17,7 @@ void I_GetVulkanDrawableSize(int *width, int *height) RECT clientRect = { 0 }; GetClientRect(Window, &clientRect); - + if (width != nullptr) { *width = clientRect.right; diff --git a/source/common/platform/win32/win32vulkanvideo.h b/source/common/platform/win32/win32vulkanvideo.h index 2654597c7..0e77d18a7 100644 --- a/source/common/platform/win32/win32vulkanvideo.h +++ b/source/common/platform/win32/win32vulkanvideo.h @@ -21,7 +21,7 @@ public: { device = new VulkanDevice(); } - + ~Win32VulkanVideo() { delete device; diff --git a/source/common/rendering/gl/gl_buffers.cpp b/source/common/rendering/gl/gl_buffers.cpp index 9338fee98..5439319a9 100644 --- a/source/common/rendering/gl/gl_buffers.cpp +++ b/source/common/rendering/gl/gl_buffers.cpp @@ -192,12 +192,12 @@ void GLBuffer::GPUDropSync() void GLBuffer::GPUWaitSync() { GLenum status = glClientWaitSync(mGLSync, GL_SYNC_FLUSH_COMMANDS_BIT, 1000 * 1000 * 50); // Wait for a max of 50ms... - + if (status != GL_ALREADY_SIGNALED && status != GL_CONDITION_SATISFIED) { //Printf("Error on glClientWaitSync: %d\n", status); } - + glDeleteSync(mGLSync); mGLSync = NULL; @@ -213,10 +213,10 @@ void GLVertexBuffer::SetFormat(int numBindingPoints, int numAttributes, size_t s { static int VFmtToGLFmt[] = { GL_FLOAT, GL_FLOAT, GL_FLOAT, GL_FLOAT, GL_UNSIGNED_BYTE, GL_INT_2_10_10_10_REV }; static uint8_t VFmtToSize[] = {4, 3, 2, 1, 4, 4}; - + mStride = stride; mNumBindingPoints = numBindingPoints; - + for(int i = 0; i < numAttributes; i++) { if (attrs[i].location >= 0 && attrs[i].location < VATTR_MAX) diff --git a/source/common/rendering/gl/gl_framebuffer.h b/source/common/rendering/gl/gl_framebuffer.h index 8f8a139b6..37da64ba4 100644 --- a/source/common/rendering/gl/gl_framebuffer.h +++ b/source/common/rendering/gl/gl_framebuffer.h @@ -65,7 +65,7 @@ public: bool HWGammaActive = false; // Are we using hardware or software gamma? std::shared_ptr mDebug; // Debug API - + FTexture *WipeStartScreen() override; FTexture *WipeEndScreen() override; diff --git a/source/common/rendering/gl/gl_hwtexture.cpp b/source/common/rendering/gl/gl_hwtexture.cpp index e2a7074bf..37b066155 100644 --- a/source/common/rendering/gl/gl_hwtexture.cpp +++ b/source/common/rendering/gl/gl_hwtexture.cpp @@ -148,7 +148,7 @@ unsigned int FHardwareTexture::CreateTexture(unsigned char * buffer, int w, int { sourcetype = GL_BGRA; } - + if (!firstCall && glBufferID > 0) glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, rw, rh, sourcetype, GL_UNSIGNED_BYTE, buffer); else @@ -315,7 +315,7 @@ bool FHardwareTexture::BindOrCreate(FTexture *tex, int texunit, int clampmode, i int w = 0, h = 0; // Create this texture - + FTextureBuffer texbuffer; if (!tex->isHardwareCanvas()) diff --git a/source/common/rendering/gl/gl_renderer.h b/source/common/rendering/gl/gl_renderer.h index 3a4c55a70..71da1bf65 100644 --- a/source/common/rendering/gl/gl_renderer.h +++ b/source/common/rendering/gl/gl_renderer.h @@ -80,7 +80,7 @@ public: void DrawPresentTexture(const IntRect &box, bool applyGamma); void Flush(); void BeginFrame(); - + bool StartOffscreen(); void EndOffscreen(); diff --git a/source/common/rendering/gl/gl_renderstate.cpp b/source/common/rendering/gl/gl_renderstate.cpp index 04fe15ae2..688e46904 100644 --- a/source/common/rendering/gl/gl_renderstate.cpp +++ b/source/common/rendering/gl/gl_renderstate.cpp @@ -311,7 +311,7 @@ void FGLRenderState::ApplyMaterial(FMaterial *mat, int clampmode, int translatio if (tex->isHardwareCanvas()) static_cast(tex->GetTexture())->NeedUpdate(); clampmode = tex->GetClampMode(clampmode); - + // avoid rebinding the same texture multiple times. if (mat == lastMaterial && lastClamp == clampmode && translation == lastTranslation) return; lastMaterial = mat; diff --git a/source/common/rendering/gl/gl_samplers.cpp b/source/common/rendering/gl/gl_samplers.cpp index ca3426e7a..5ed7cbc19 100644 --- a/source/common/rendering/gl/gl_samplers.cpp +++ b/source/common/rendering/gl/gl_samplers.cpp @@ -98,7 +98,7 @@ void FSamplerManager::UnbindAll() glBindSampler(i, 0); } } - + uint8_t FSamplerManager::Bind(int texunit, int num, int lastval) { unsigned int samp = mSamplers[num]; @@ -106,11 +106,11 @@ uint8_t FSamplerManager::Bind(int texunit, int num, int lastval) return 255; } - + void FSamplerManager::SetTextureFilterMode() { GLint bounds[IHardwareTexture::MAX_TEXTURES]; - + // Unbind all for(int i = IHardwareTexture::MAX_TEXTURES-1; i >= 0; i--) { diff --git a/source/common/rendering/gl/gl_shader.cpp b/source/common/rendering/gl/gl_shader.cpp index 9ebaf8711..f8287a499 100644 --- a/source/common/rendering/gl/gl_shader.cpp +++ b/source/common/rendering/gl/gl_shader.cpp @@ -336,7 +336,7 @@ bool FShader::Load(const char * name, const char * vert_prog_lump, const char * #endif )"; - + #ifdef __APPLE__ // The noise functions are completely broken in macOS OpenGL drivers diff --git a/source/common/rendering/gl/gl_shader.h b/source/common/rendering/gl/gl_shader.h index b42e144ef..ec2289833 100644 --- a/source/common/rendering/gl/gl_shader.h +++ b/source/common/rendering/gl/gl_shader.h @@ -325,7 +325,7 @@ class FShaderCollection void Clean(); void CompileShaders(EPassType passType); - + public: FShaderCollection(EPassType passType); ~FShaderCollection(); diff --git a/source/common/rendering/gl_load/gl_interface.cpp b/source/common/rendering/gl_load/gl_interface.cpp index 3b5309e8c..344a3d4fa 100644 --- a/source/common/rendering/gl_load/gl_interface.cpp +++ b/source/common/rendering/gl_load/gl_interface.cpp @@ -230,7 +230,7 @@ void gl_PrintStartupLog() Printf ("Max. texture units: %d\n", v); glGetIntegerv(GL_MAX_VARYING_FLOATS, &v); Printf ("Max. varying: %d\n", v); - + if (gl.flags & RFL_SHADER_STORAGE_BUFFER) { glGetIntegerv(GL_MAX_COMBINED_SHADER_STORAGE_BLOCKS, &v); diff --git a/source/common/rendering/gl_load/gl_load.c b/source/common/rendering/gl_load/gl_load.c index bf563afe0..e29207f4a 100644 --- a/source/common/rendering/gl_load/gl_load.c +++ b/source/common/rendering/gl_load/gl_load.c @@ -9,7 +9,7 @@ static void* AppleGLGetProcAddress (const char *name) { static void* image = NULL; - + if (NULL == image) image = dlopen("/System/Library/Frameworks/OpenGL.framework/Versions/Current/OpenGL", RTLD_LAZY); @@ -61,9 +61,9 @@ static int TestPointer(const PROC pTest) ptrdiff_t iTest; if(!pTest) return 0; iTest = (ptrdiff_t)pTest; - + if(iTest == 1 || iTest == 2 || iTest == 3 || iTest == -1) return 0; - + return 1; } @@ -119,7 +119,7 @@ static PROC WinGetProcAddress(const char *name) glMod = GetModuleHandleA("OpenGL32.dll"); return (PROC)GetProcAddress(glMod, (LPCSTR)name); } - + #define IntGetProcAddress(name) WinGetProcAddress(name) #else #if defined(__APPLE__) @@ -3363,7 +3363,7 @@ static ogl_StrToExtMap *FindExtEntry(const char *extensionName) if(strcmp(extensionName, currLoc->extensionName) == 0) return currLoc; } - + return NULL; } @@ -3465,7 +3465,7 @@ int ogl_LoadFunctions() { int numFailed = 0; ClearExtensionVars(); - + _ptrc_glGetIntegerv = (void (CODEGEN_FUNCPTR *)(GLenum, GLint *))IntGetProcAddress("glGetIntegerv"); if(!_ptrc_glGetIntegerv) return ogl_LOAD_FAILED; _ptrc_glGetStringi = (const GLubyte * (CODEGEN_FUNCPTR *)(GLenum, GLuint))IntGetProcAddress("glGetStringi"); @@ -3479,7 +3479,7 @@ int ogl_LoadFunctions() } numFailed = Load_Version_4_5(); - + if(numFailed == 0) return ogl_LOAD_SUCCEEDED; else @@ -3515,7 +3515,7 @@ int ogl_IsVersionGEQ(int majorVersion, int minorVersion) { if(g_major_version == 0) GetGLVersion(); - + if(majorVersion < g_major_version) return 1; if(majorVersion > g_major_version) return 0; if(minorVersion <= g_minor_version) return 1; diff --git a/source/common/rendering/gles/glad/include/glad/glad.h b/source/common/rendering/gles/glad/include/glad/glad.h index 5a7c1505e..212864bc1 100644 --- a/source/common/rendering/gles/glad/include/glad/glad.h +++ b/source/common/rendering/gles/glad/include/glad/glad.h @@ -7,7 +7,7 @@ APIs: gles2=2.0 Profile: compatibility Extensions: - + Loader: True Local files: False Omit khrplatform: False diff --git a/source/common/rendering/gles/glad/include/glad/glad_egl.h b/source/common/rendering/gles/glad/include/glad/glad_egl.h index fbc5b8630..1c47f7ced 100644 --- a/source/common/rendering/gles/glad/include/glad/glad_egl.h +++ b/source/common/rendering/gles/glad/include/glad/glad_egl.h @@ -7,7 +7,7 @@ APIs: egl=1.4 Profile: - Extensions: - + Loader: True Local files: False Omit khrplatform: False diff --git a/source/common/rendering/gles/glad/src/glad.c b/source/common/rendering/gles/glad/src/glad.c index 9da9f0ed1..6653cc3f6 100644 --- a/source/common/rendering/gles/glad/src/glad.c +++ b/source/common/rendering/gles/glad/src/glad.c @@ -7,7 +7,7 @@ APIs: gles2=2.0 Profile: compatibility Extensions: - + Loader: True Local files: False Omit khrplatform: False diff --git a/source/common/rendering/gles/glad/src/glad_egl.c b/source/common/rendering/gles/glad/src/glad_egl.c index 3c939401c..8d0744041 100644 --- a/source/common/rendering/gles/glad/src/glad_egl.c +++ b/source/common/rendering/gles/glad/src/glad_egl.c @@ -7,7 +7,7 @@ APIs: egl=1.4 Profile: - Extensions: - + Loader: True Local files: False Omit khrplatform: False diff --git a/source/common/rendering/gles/gles_buffers.cpp b/source/common/rendering/gles/gles_buffers.cpp index de815ea34..0b5f18024 100644 --- a/source/common/rendering/gles/gles_buffers.cpp +++ b/source/common/rendering/gles/gles_buffers.cpp @@ -79,7 +79,7 @@ GLBuffer::~GLBuffer() glBindBuffer(mUseType, 0); glDeleteBuffers(1, &mBufferId); } - + if (memory) delete[] memory; } @@ -129,9 +129,9 @@ void GLBuffer::SetData(size_t size, const void* data, BufferUsageType usage) void GLBuffer::SetSubData(size_t offset, size_t size, const void *data) { Bind(); - + memcpy(memory + offset, data, size); - + if (!isData) { glBufferSubData(mUseType, offset, size, data); @@ -143,7 +143,7 @@ void GLBuffer::Upload(size_t start, size_t size) if (!gles.useMappedBuffers) { Bind(); - + if(size) glBufferSubData(mUseType, start, size, memory + start); } @@ -278,10 +278,10 @@ void GLVertexBuffer::SetFormat(int numBindingPoints, int numAttributes, size_t s { static int VFmtToGLFmt[] = { GL_FLOAT, GL_FLOAT, GL_FLOAT, GL_FLOAT, GL_UNSIGNED_BYTE, GL_FLOAT }; // TODO Fix last entry GL_INT_2_10_10_10_REV, normals for models will be broken static uint8_t VFmtToSize[] = {4, 3, 2, 1, 4, 4}; - + mStride = stride; mNumBindingPoints = numBindingPoints; - + for(int i = 0; i < numAttributes; i++) { if (attrs[i].location >= 0 && attrs[i].location < VATTR_MAX) diff --git a/source/common/rendering/gles/gles_framebuffer.cpp b/source/common/rendering/gles/gles_framebuffer.cpp index 3d44dd4d9..f3806f132 100644 --- a/source/common/rendering/gles/gles_framebuffer.cpp +++ b/source/common/rendering/gles/gles_framebuffer.cpp @@ -136,7 +136,7 @@ void OpenGLFrameBuffer::InitializeState() glEnable(GL_DITHER); glDisable(GL_CULL_FACE); glDisable(GL_POLYGON_OFFSET_FILL); - + glEnable(GL_BLEND); if (gles.depthClampAvailable) glEnable(GL_DEPTH_CLAMP); @@ -237,7 +237,7 @@ const char* OpenGLFrameBuffer::DeviceName() const void OpenGLFrameBuffer::Swap() { - + Finish.Reset(); Finish.Clock(); @@ -245,7 +245,7 @@ void OpenGLFrameBuffer::Swap() FPSLimit(); SwapBuffers(); - + mVertexData->NextPipelineBuffer(); mVertexData->WaitSync(); diff --git a/source/common/rendering/gles/gles_framebuffer.h b/source/common/rendering/gles/gles_framebuffer.h index 25626c659..d550b8f10 100644 --- a/source/common/rendering/gles/gles_framebuffer.h +++ b/source/common/rendering/gles/gles_framebuffer.h @@ -61,7 +61,7 @@ public: bool HWGammaActive = false; // Are we using hardware or software gamma? std::shared_ptr mDebug; // Debug API - + FTexture *WipeStartScreen() override; FTexture *WipeEndScreen() override; diff --git a/source/common/rendering/gles/gles_hwtexture.cpp b/source/common/rendering/gles/gles_hwtexture.cpp index 3bf889087..43425ce7d 100644 --- a/source/common/rendering/gles/gles_hwtexture.cpp +++ b/source/common/rendering/gles/gles_hwtexture.cpp @@ -176,7 +176,7 @@ unsigned int FHardwareTexture::CreateTexture(unsigned char * buffer, int w, int glGenerateMipmap(GL_TEXTURE_2D); mipmapped = true; } - + if (texunit > 0) glActiveTexture(GL_TEXTURE0); else if (texunit == -1) glBindTexture(GL_TEXTURE_2D, textureBinding); return glTexID; @@ -317,7 +317,7 @@ bool FHardwareTexture::BindOrCreate(FTexture *tex, int texunit, int clampmode, i int w = 0, h = 0; // Create this texture - + FTextureBuffer texbuffer; if (!tex->isHardwareCanvas()) diff --git a/source/common/rendering/gles/gles_postprocess.cpp b/source/common/rendering/gles/gles_postprocess.cpp index caf147240..1bedaf9cc 100644 --- a/source/common/rendering/gles/gles_postprocess.cpp +++ b/source/common/rendering/gles/gles_postprocess.cpp @@ -158,7 +158,7 @@ void FGLRenderer::DrawPresentTexture(const IntRect &box, bool applyGamma) mPresentShader->Uniforms->Offset = { 0.0f, 0.0f }; mPresentShader->Uniforms.SetData(); - + for (size_t n = 0; n < mPresentShader->Uniforms.mFields.size(); n++) { UniformFieldDesc desc = mPresentShader->Uniforms.mFields[n]; @@ -178,7 +178,7 @@ void FGLRenderer::DrawPresentTexture(const IntRect &box, bool applyGamma) break; } } - + RenderScreenQuad(); } diff --git a/source/common/rendering/gles/gles_renderbuffers.cpp b/source/common/rendering/gles/gles_renderbuffers.cpp index 4d587aa87..002734b99 100644 --- a/source/common/rendering/gles/gles_renderbuffers.cpp +++ b/source/common/rendering/gles/gles_renderbuffers.cpp @@ -44,7 +44,7 @@ namespace OpenGLESRenderer FGLRenderBuffers::FGLRenderBuffers() { - + } //========================================================================== @@ -56,7 +56,7 @@ namespace OpenGLESRenderer FGLRenderBuffers::~FGLRenderBuffers() { ClearScene(); - + DeleteTexture(mDitherTexture); } @@ -163,7 +163,7 @@ namespace OpenGLESRenderer mSceneTex = Create2DTexture("PipelineTexture", GL_RGBA, width, height); } - + //========================================================================== // @@ -178,7 +178,7 @@ namespace OpenGLESRenderer tex.Height = height; glGenTextures(1, &tex.handle); glBindTexture(GL_TEXTURE_2D, tex.handle); - + GLenum dataformat = 0, datatype = 0; /* switch (format) @@ -224,7 +224,7 @@ namespace OpenGLESRenderer PPGLRenderBuffer buf; glGenRenderbuffers(1, &buf.handle); glBindRenderbuffer(GL_RENDERBUFFER, buf.handle); - + glRenderbufferStorage(GL_RENDERBUFFER, format, width, height); return buf; } @@ -240,7 +240,7 @@ namespace OpenGLESRenderer PPGLFrameBuffer fb; glGenFramebuffers(1, &fb.handle); glBindFramebuffer(GL_FRAMEBUFFER, fb.handle); - + glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, colorbuffer.handle, 0); if (CheckFrameBufferCompleteness()) ClearFrameBuffer(false, false); @@ -252,7 +252,7 @@ namespace OpenGLESRenderer PPGLFrameBuffer fb; glGenFramebuffers(1, &fb.handle); glBindFramebuffer(GL_FRAMEBUFFER, fb.handle); - + glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, colorbuffer.handle, 0); glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, depthstencil.handle); glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, GL_RENDERBUFFER, gles.depthStencilAvailable ? depthstencil.handle : stencil.handle); @@ -266,7 +266,7 @@ namespace OpenGLESRenderer PPGLFrameBuffer fb; glGenFramebuffers(1, &fb.handle); glBindFramebuffer(GL_FRAMEBUFFER, fb.handle); - + glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, colorbuffer.handle); glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, depthstencil.handle); glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, GL_RENDERBUFFER, gles.depthStencilAvailable ? depthstencil.handle : stencil.handle); @@ -284,7 +284,7 @@ namespace OpenGLESRenderer glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, colorbuffer0.handle, 0); glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, depthstencil.handle); glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, GL_RENDERBUFFER, gles.depthStencilAvailable ? depthstencil.handle : stencil.handle); - + if (CheckFrameBufferCompleteness()) ClearFrameBuffer(true, true); return fb; @@ -311,7 +311,7 @@ namespace OpenGLESRenderer case GL_FRAMEBUFFER_UNSUPPORTED: error << "GL_FRAMEBUFFER_UNSUPPORTED"; break; } Printf("%s\n", error.GetChars()); - + return false; } @@ -369,7 +369,7 @@ namespace OpenGLESRenderer mDitherTexture.Bind(1, GL_NEAREST, GL_REPEAT); } - + //========================================================================== // // Makes the scene frame buffer active (multisample, depth, stecil, etc.) diff --git a/source/common/rendering/gles/gles_renderbuffers.h b/source/common/rendering/gles/gles_renderbuffers.h index ce052e26f..3369a864f 100644 --- a/source/common/rendering/gles/gles_renderbuffers.h +++ b/source/common/rendering/gles/gles_renderbuffers.h @@ -113,7 +113,7 @@ public: private: void ClearScene(); - + void CreateScene(int width, int height); void CreatePipeline(int width, int height); diff --git a/source/common/rendering/gles/gles_renderer.cpp b/source/common/rendering/gles/gles_renderer.cpp index 0cd4d8e5e..1a33b3bd7 100644 --- a/source/common/rendering/gles/gles_renderer.cpp +++ b/source/common/rendering/gles/gles_renderer.cpp @@ -83,7 +83,7 @@ void FGLRenderer::Initialize(int width, int height) mScreenBuffers = new FGLRenderBuffers(); mBuffers = mScreenBuffers; mPresentShader = new FPresentShader(); - + mFBID = 0; mOldFBID = 0; @@ -97,7 +97,7 @@ FGLRenderer::~FGLRenderer() TexMan.FlushAll(); if (mShaderManager != nullptr) delete mShaderManager; if (mFBID != 0) glDeleteFramebuffers(1, &mFBID); - + if (mBuffers) delete mBuffers; if (mPresentShader) delete mPresentShader; } diff --git a/source/common/rendering/gles/gles_renderer.h b/source/common/rendering/gles/gles_renderer.h index a19690029..3322e06bf 100644 --- a/source/common/rendering/gles/gles_renderer.h +++ b/source/common/rendering/gles/gles_renderer.h @@ -67,12 +67,12 @@ public: void PresentStereo(); void RenderScreenQuad(); void PostProcessScene(int fixedcm, float flash, const std::function &afterBloomDrawEndScene2D); - + void CopyToBackbuffer(const IntRect *bounds, bool applyGamma); void DrawPresentTexture(const IntRect &box, bool applyGamma); void Flush(); void BeginFrame(); - + bool StartOffscreen(); void EndOffscreen(); diff --git a/source/common/rendering/gles/gles_renderstate.cpp b/source/common/rendering/gles/gles_renderstate.cpp index d585795fe..76718f649 100644 --- a/source/common/rendering/gles/gles_renderstate.cpp +++ b/source/common/rendering/gles/gles_renderstate.cpp @@ -94,7 +94,7 @@ void FGLRenderState::Reset() bool FGLRenderState::ApplyShader() { static const float nulvec[] = { 0.f, 0.f, 0.f, 0.f }; - + ShaderFlavourData flavour; // Need to calc light data now in order to select correct shader @@ -127,7 +127,7 @@ bool FGLRenderState::ApplyShader() if (modLights + subLights + addLights > (int)gles.maxlights) addLights = gles.maxlights - modLights - subLights; - + totalLights = modLights + subLights + addLights; // Skip passed the first 4 floats so the upload below only contains light data @@ -152,7 +152,7 @@ bool FGLRenderState::ApplyShader() flavour.texFlags = tm >> 16; //Move flags to start of word if (mTextureClamp && flavour.textureMode == TM_NORMAL) flavour.textureMode = TM_CLAMPY; // fixme. Clamp can now be combined with all modes. - + if (flavour.textureMode == -1) flavour.textureMode = 0; @@ -166,7 +166,7 @@ bool FGLRenderState::ApplyShader() flavour.colouredFog = false; flavour.fogEquationRadial = (gl_fogmode == 2); - + flavour.twoDFog = false; flavour.fogEnabled = false; flavour.colouredFog = false; @@ -197,7 +197,7 @@ bool FGLRenderState::ApplyShader() flavour.useObjectColor2 = (mStreamData.uObjectColor2.a > 0); flavour.useGlowTopColor = mGlowEnabled && (mStreamData.uGlowTopColor[3] > 0); flavour.useGlowBottomColor = mGlowEnabled && (mStreamData.uGlowBottomColor[3] > 0); - + flavour.useColorMap = (mColorMapSpecial >= CM_FIRSTSPECIALCOLORMAP) || (mColorMapFlash != 1); flavour.buildLighting = (mHwUniforms->mPalLightLevels >> 16) == 5; // Build engine mode @@ -218,7 +218,7 @@ bool FGLRenderState::ApplyShader() activeShader->Bind(flavour); } - + if (mHwUniforms) { activeShader->cur->muProjectionMatrix.Set(&mHwUniforms->mProjectionMatrix); @@ -335,7 +335,7 @@ bool FGLRenderState::ApplyShader() { // Calculate the total number of vec4s we need int totalVectors = totalLights * LIGHT_VEC4_NUM; - + if (totalVectors > (int)gles.numlightvectors) totalVectors = gles.numlightvectors; @@ -348,7 +348,7 @@ bool FGLRenderState::ApplyShader() activeShader->cur->muLightRange.Set(range); } - + return true; } @@ -450,7 +450,7 @@ void FGLRenderState::ApplyMaterial(FMaterial *mat, int clampmode, int translatio if (tex->isHardwareCanvas()) static_cast(tex->GetTexture())->NeedUpdate(); clampmode = tex->GetClampMode(clampmode); - + // avoid rebinding the same texture multiple times. if (mat == lastMaterial && lastClamp == clampmode && translation == lastTranslation) return; lastMaterial = mat; diff --git a/source/common/rendering/gles/gles_samplers.cpp b/source/common/rendering/gles/gles_samplers.cpp index c088657c7..8d9ddecdf 100644 --- a/source/common/rendering/gles/gles_samplers.cpp +++ b/source/common/rendering/gles/gles_samplers.cpp @@ -60,9 +60,9 @@ FSamplerManager::~FSamplerManager() void FSamplerManager::UnbindAll() { - + } - + uint8_t FSamplerManager::Bind(int texunit, int num, int lastval) { @@ -157,14 +157,14 @@ uint8_t FSamplerManager::Bind(int texunit, int num, int lastval) return 255; } - + void FSamplerManager::SetTextureFilterMode() { /* GLRenderer->FlushTextures(); GLint bounds[IHardwareTexture::MAX_TEXTURES]; - + // Unbind all for(int i = IHardwareTexture::MAX_TEXTURES-1; i >= 0; i--) { diff --git a/source/common/rendering/gles/gles_shader.cpp b/source/common/rendering/gles/gles_shader.cpp index 25f274051..f67aa375e 100644 --- a/source/common/rendering/gles/gles_shader.cpp +++ b/source/common/rendering/gles/gles_shader.cpp @@ -266,7 +266,7 @@ bool FShader::Load(const char * name, const char * vert_prog_lump_, const char * // light buffers uniform vec4 lights[MAXIMUM_LIGHT_VECTORS]; - + uniform mat4 ProjectionMatrix; uniform mat4 ViewMatrix; uniform mat4 NormalViewMatrix; @@ -370,7 +370,7 @@ bool FShader::Load(const char * name, const char * vert_prog_lump_, const char * #define glowtexture texture4 #endif )"; - + #ifdef NPOT_EMULATION i_data += "#define NPOT_EMULATION\nuniform vec2 uNpotEmulation;\n"; #endif @@ -494,7 +494,7 @@ bool FShader::Load(const char * name, const char * vert_prog_lump_, const char * } shaderData->hShader = glCreateProgram(); - + uint32_t binaryFormat = 0; TArray binary; if (IsShaderCacheActive()) @@ -694,7 +694,7 @@ bool FShader::Bind(ShaderFlavourData& flavour) variantConfig.AppendFormat("#define DEF_USE_U_LIGHT_LEVEL %d\n", flavour.useULightLevel); variantConfig.AppendFormat("#define DEF_DO_DESATURATE %d\n", flavour.doDesaturate); - + variantConfig.AppendFormat("#define DEF_DYNAMIC_LIGHTS_MOD %d\n", flavour.dynLightsMod); variantConfig.AppendFormat("#define DEF_DYNAMIC_LIGHTS_SUB %d\n", flavour.dynLightsSub); variantConfig.AppendFormat("#define DEF_DYNAMIC_LIGHTS_ADD %d\n", flavour.dynLightsAdd); @@ -702,7 +702,7 @@ bool FShader::Bind(ShaderFlavourData& flavour) variantConfig.AppendFormat("#define DEF_USE_OBJECT_COLOR_2 %d\n", flavour.useObjectColor2); variantConfig.AppendFormat("#define DEF_USE_GLOW_TOP_COLOR %d\n", flavour.useGlowTopColor); variantConfig.AppendFormat("#define DEF_USE_GLOW_BOTTOM_COLOR %d\n", flavour.useGlowBottomColor); - + variantConfig.AppendFormat("#define DEF_USE_COLOR_MAP %d\n", flavour.useColorMap); variantConfig.AppendFormat("#define DEF_BUILD_LIGHTING %d\n", flavour.buildLighting); variantConfig.AppendFormat("#define DEF_BANDED_SW_LIGHTING %d\n", flavour.bandedSwLight); diff --git a/source/common/rendering/gles/gles_shader.h b/source/common/rendering/gles/gles_shader.h index 88e94dc26..72a242c1b 100644 --- a/source/common/rendering/gles/gles_shader.h +++ b/source/common/rendering/gles/gles_shader.h @@ -284,7 +284,7 @@ class FShader { friend class FShaderCollection; friend class FGLRenderState; - + FName mName; FString mVertProg; @@ -379,7 +379,7 @@ public: FShader(const char *name) : mName(name) { - + } ~FShader(); @@ -394,9 +394,9 @@ public: { uint32_t tag = 0; tag |= (flavour.textureMode & 0x7); - + tag |= (flavour.texFlags & 7) << 3; - + tag |= (flavour.blendFlags & 7) << 6; tag |= (flavour.twoDFog & 1) << 7; @@ -428,7 +428,7 @@ public: bool Bind(ShaderFlavourData& flavour); - + }; //========================================================================== @@ -462,7 +462,7 @@ class FShaderCollection void Clean(); void CompileShaders(EPassType passType); - + public: FShaderCollection(EPassType passType); ~FShaderCollection(); diff --git a/source/common/rendering/gles/gles_shaderprogram.cpp b/source/common/rendering/gles/gles_shaderprogram.cpp index 5070303a9..784c85c30 100644 --- a/source/common/rendering/gles/gles_shaderprogram.cpp +++ b/source/common/rendering/gles/gles_shaderprogram.cpp @@ -104,7 +104,7 @@ void FShaderProgram::CompileShader(ShaderType type) const auto &handle = mShaders[type]; - + const FString &patchedCode = mShaderSources[type]; int lengths[1] = { (int)patchedCode.Len() }; const char *sources[1] = { patchedCode.GetChars() }; diff --git a/source/common/rendering/gles/gles_system.cpp b/source/common/rendering/gles/gles_system.cpp index 79f6e0a48..51f8ee6a2 100644 --- a/source/common/rendering/gles/gles_system.cpp +++ b/source/common/rendering/gles/gles_system.cpp @@ -63,7 +63,7 @@ static PROC(WINAPI* getprocaddress)(LPCSTR name); static void* LoadGLES2Proc(const char* name) { HINSTANCE hGetProcIDDLL = LoadLibraryA("libGLESv2.dll"); - + int error = GetLastError(); void* addr = GetProcAddress(hGetProcIDDLL, name); @@ -169,14 +169,14 @@ namespace OpenGLESRenderer gles.modelstring = (char*)glGetString(GL_RENDERER); gles.vendorstring = (char*)glGetString(GL_VENDOR); - + gl_customshader = false; GLint maxTextureSize[1]; glGetIntegerv(GL_MAX_TEXTURE_SIZE, maxTextureSize); gles.max_texturesize = maxTextureSize[0]; - + Printf("GL_MAX_TEXTURE_SIZE: %d\n", gles.max_texturesize); #if USE_GLES2 @@ -189,7 +189,7 @@ namespace OpenGLESRenderer gles.useMappedBuffers = true; gles.depthClampAvailable = true; #endif - + gles.numlightvectors = (gles.maxlights * LIGHT_VEC4_NUM); } } diff --git a/source/common/rendering/hwrenderer/data/buffers.h b/source/common/rendering/hwrenderer/data/buffers.h index 980adde5e..021040de0 100644 --- a/source/common/rendering/hwrenderer/data/buffers.h +++ b/source/common/rendering/hwrenderer/data/buffers.h @@ -24,7 +24,7 @@ enum VATTR_VERTEX2, VATTR_NORMAL, VATTR_NORMAL2, - + VATTR_MAX }; diff --git a/source/common/rendering/hwrenderer/data/flatvertices.h b/source/common/rendering/hwrenderer/data/flatvertices.h index 619128a33..b6f5b7eb1 100644 --- a/source/common/rendering/hwrenderer/data/flatvertices.h +++ b/source/common/rendering/hwrenderer/data/flatvertices.h @@ -52,7 +52,7 @@ public: IVertexBuffer *mVertexBufferPipeline[HW_MAX_PIPELINE_BUFFERS]; IIndexBuffer *mIndexBuffer; - + unsigned int mIndex; std::atomic mCurIndex; diff --git a/source/common/rendering/hwrenderer/data/hw_clock.cpp b/source/common/rendering/hwrenderer/data/hw_clock.cpp index e9affdbe6..a9209d236 100644 --- a/source/common/rendering/hwrenderer/data/hw_clock.cpp +++ b/source/common/rendering/hwrenderer/data/hw_clock.cpp @@ -167,7 +167,7 @@ void CheckBench() FString compose; if (sysCallbacks.GetLocationDescription) compose = sysCallbacks.GetLocationDescription(); - + AppendRenderStats(compose); AppendRenderTimes(compose); AppendLightStats(compose); diff --git a/source/common/rendering/hwrenderer/data/hw_dynlightdata.h b/source/common/rendering/hwrenderer/data/hw_dynlightdata.h index 4631fd434..d54b7427e 100644 --- a/source/common/rendering/hwrenderer/data/hw_dynlightdata.h +++ b/source/common/rendering/hwrenderer/data/hw_dynlightdata.h @@ -51,7 +51,7 @@ struct FDynLightData if (siz[1] > max) siz[1] = max; if (siz[2] > max) siz[2] = max; } - + }; diff --git a/source/common/rendering/hwrenderer/data/hw_lightbuffer.cpp b/source/common/rendering/hwrenderer/data/hw_lightbuffer.cpp index 9f7bb66c2..9b81ef932 100644 --- a/source/common/rendering/hwrenderer/data/hw_lightbuffer.cpp +++ b/source/common/rendering/hwrenderer/data/hw_lightbuffer.cpp @@ -37,10 +37,10 @@ FLightBuffer::FLightBuffer(int pipelineNbr): mPipelineNbr(pipelineNbr) { int maxNumberOfLights = 80000; - + mBufferSize = maxNumberOfLights * ELEMENTS_PER_LIGHT; mByteSize = mBufferSize * ELEMENT_SIZE; - + // Hack alert: On Intel's GL driver SSBO's perform quite worse than UBOs. // We only want to disable using SSBOs for lights but not disable the feature entirely. // Note that using an uniform buffer here will limit the number of lights per surface so it isn't done for NVidia and AMD. @@ -57,7 +57,7 @@ FLightBuffer::FLightBuffer(int pipelineNbr): mBlockSize = screen->maxuniformblock / ELEMENT_SIZE; mBlockAlign = screen->uniformblockalignment / ELEMENT_SIZE; mMaxUploadSize = (mBlockSize - mBlockAlign); - + //mByteSize += screen->maxuniformblock; // to avoid mapping beyond the end of the buffer. REMOVED this...This can try to allocate 100's of MB.. } @@ -96,7 +96,7 @@ int FLightBuffer::UploadLights(FDynLightData &data) if (totalsize > (int)mMaxUploadSize) { int diff = totalsize - (int)mMaxUploadSize; - + size2 -= diff; if (size2 < 0) { @@ -115,14 +115,14 @@ int FLightBuffer::UploadLights(FDynLightData &data) assert(mBufferPointer != nullptr); if (mBufferPointer == nullptr) return -1; if (totalsize <= 1) return -1; // there are no lights - + unsigned thisindex = mIndex.fetch_add(totalsize); float parmcnt[] = { 0, float(size0), float(size0 + size1), float(size0 + size1 + size2) }; if (thisindex + totalsize <= mBufferSize) { float *copyptr = mBufferPointer + thisindex*4; - + memcpy(©ptr[0], parmcnt, ELEMENT_SIZE); memcpy(©ptr[4], &data.arrays[0][0], size0 * ELEMENT_SIZE); memcpy(©ptr[4 + 4*size0], &data.arrays[1][0], size1 * ELEMENT_SIZE); diff --git a/source/common/rendering/hwrenderer/data/hw_lightbuffer.h b/source/common/rendering/hwrenderer/data/hw_lightbuffer.h index 441dc55ff..ad266bd94 100644 --- a/source/common/rendering/hwrenderer/data/hw_lightbuffer.h +++ b/source/common/rendering/hwrenderer/data/hw_lightbuffer.h @@ -23,7 +23,7 @@ class FLightBuffer unsigned int mBufferSize; unsigned int mByteSize; unsigned int mMaxUploadSize; - + void CheckSize(); public: diff --git a/source/common/rendering/hwrenderer/data/hw_shadowmap.cpp b/source/common/rendering/hwrenderer/data/hw_shadowmap.cpp index 26eaa2d2c..18f23e1d5 100644 --- a/source/common/rendering/hwrenderer/data/hw_shadowmap.cpp +++ b/source/common/rendering/hwrenderer/data/hw_shadowmap.cpp @@ -38,13 +38,13 @@ but then only in 2D where this reduces itself to a square. When main.fp samples from the shadow map it first decides in which direction the fragment is (relative to the light), like cubemap sampling does for 3D, but once again just for the 2D case. - + Texels 0-255 is Y positive, 256-511 is X positive, 512-767 is Y negative and 768-1023 is X negative. Generating the shadow map itself is done by FShadowMap::Update(). The shadow map texture's FBO is bound and then a screen quad is drawn to make a fragment shader cover all texels. For each fragment it shoots a ray and collects the distance to what it hit. - + The shadowmap.fp shader knows which light and texel it is processing by mapping gl_FragCoord.y back to the light index, and it knows which direction to ray trace by looking at gl_FragCoord.x. For example, if gl_FragCoord.y is 20.5, then it knows its processing light 20, and if gl_FragCoord.x is diff --git a/source/common/rendering/hwrenderer/data/hw_viewpointbuffer.cpp b/source/common/rendering/hwrenderer/data/hw_viewpointbuffer.cpp index 89a5a8436..e637ea725 100644 --- a/source/common/rendering/hwrenderer/data/hw_viewpointbuffer.cpp +++ b/source/common/rendering/hwrenderer/data/hw_viewpointbuffer.cpp @@ -98,7 +98,7 @@ void HWViewpointBuffer::Set2D(FRenderState &di, int width, int height, int pll) matrices.mProjectionMatrix.ortho(0, (float)width, (float)height, 0, -1.0f, 1.0f); matrices.CalcDependencies(); - + for (int n = 0; n < mPipelineNbr; n++) { mBufferPipeline[n]->Map(); diff --git a/source/common/rendering/hwrenderer/data/hw_viewpointbuffer.h b/source/common/rendering/hwrenderer/data/hw_viewpointbuffer.h index 0fbd46dfa..90c64ca7f 100644 --- a/source/common/rendering/hwrenderer/data/hw_viewpointbuffer.h +++ b/source/common/rendering/hwrenderer/data/hw_viewpointbuffer.h @@ -18,7 +18,7 @@ class HWViewpointBuffer unsigned int mLastMappedIndex; unsigned int mByteSize; TArray mClipPlaneInfo; - + int m2DWidth = -1, m2DHeight = -1; unsigned int mBlockSize; diff --git a/source/common/rendering/polyrenderer/drawers/poly_thread.cpp b/source/common/rendering/polyrenderer/drawers/poly_thread.cpp index 502705ca5..35566138b 100644 --- a/source/common/rendering/polyrenderer/drawers/poly_thread.cpp +++ b/source/common/rendering/polyrenderer/drawers/poly_thread.cpp @@ -679,7 +679,7 @@ int PolyTriangleThreadData::ClipEdge(const ShadedTriVertex *const* verts) // -v.w <= v.x <= v.w // -v.w <= v.y <= v.w // -v.w <= v.z <= v.w - + // halfspace clip distances static const int numclipdistances = 9; #ifdef NO_SSE @@ -799,7 +799,7 @@ int PolyTriangleThreadData::ClipEdge(const ShadedTriVertex *const* verts) for (int k = 0; k < 3; k++) output[outputverts * 3 + k] = input[i * 3 + k] * (1.0f - t1) + input[j * 3 + k] * t1; outputverts++; - + if (t2 != 1.0f && t2 > t1) { // add t2 vertex diff --git a/source/common/rendering/polyrenderer/drawers/screen_shader.cpp b/source/common/rendering/polyrenderer/drawers/screen_shader.cpp index 7403a9336..66c4e6ffb 100644 --- a/source/common/rendering/polyrenderer/drawers/screen_shader.cpp +++ b/source/common/rendering/polyrenderer/drawers/screen_shader.cpp @@ -456,7 +456,7 @@ static void GetLightColor(int x0, int x1, PolyTriangleThreadData* thread) uint32_t fogG = (int)((thread->mainVertexShader.Data.uFogColor.g) * 255.0f); uint32_t fogB = (int)((thread->mainVertexShader.Data.uFogColor.b) * 255.0f); float uFogDensity = thread->PushConstants->uFogDensity; - + float* w = thread->scanline.W; for (int x = x0; x < x1; x++) { diff --git a/source/common/rendering/r_thread.cpp b/source/common/rendering/r_thread.cpp index 09ecde78b..552418605 100644 --- a/source/common/rendering/r_thread.cpp +++ b/source/common/rendering/r_thread.cpp @@ -60,7 +60,7 @@ void DrawerThreads::Execute(DrawerCommandQueuePtr commands) { if (!commands || commands->commands.empty()) return; - + auto queue = Instance(); queue->StartThreads(); diff --git a/source/common/rendering/r_thread.h b/source/common/rendering/r_thread.h index f1e49d416..f8db730cd 100644 --- a/source/common/rendering/r_thread.h +++ b/source/common/rendering/r_thread.h @@ -156,17 +156,17 @@ public: static void WaitForWorkers(); static void ResetDebugDrawPos(); - + private: DrawerThreads(); ~DrawerThreads(); - + void StartThreads(); void StopThreads(); void WorkerMain(DrawerThread *thread); static DrawerThreads *Instance(); - + std::mutex threads_mutex; std::vector threads; @@ -182,7 +182,7 @@ private: size_t debug_draw_end = 0; DrawerThread single_core_thread; - + friend class DrawerCommandQueue; }; @@ -192,9 +192,9 @@ class DrawerCommandQueue { public: DrawerCommandQueue(RenderMemory *memoryAllocator); - + void Clear() { commands.clear(); } - + // Queue command to be executed by drawer worker threads template void Push(Types &&... args) @@ -212,13 +212,13 @@ public: command.Execute(&threads->single_core_thread); } } - + private: // Allocate memory valid for the duration of a command execution void *AllocMemory(size_t size); - + std::vector commands; RenderMemory *FrameMemory; - + friend class DrawerThreads; }; diff --git a/source/common/rendering/r_videoscale.cpp b/source/common/rendering/r_videoscale.cpp index c135a129b..705fe905f 100644 --- a/source/common/rendering/r_videoscale.cpp +++ b/source/common/rendering/r_videoscale.cpp @@ -125,7 +125,7 @@ namespace min_height = VID_MIN_UI_HEIGHT; } } - + // the odd formatting of this struct definition is meant to resemble a table header. set your tab stops to 4 when editing this file. struct v_ScaleTable { bool isValid; uint32_t(*GetScaledWidth)(uint32_t Width, uint32_t Height); uint32_t(*GetScaledHeight)(uint32_t Width, uint32_t Height); float pixelAspect; bool isCustom; }; @@ -178,7 +178,7 @@ bool ViewportLinearScale() aspectmult = 1.f / aspectmult; if ((ViewportScaledWidth(x,y) > (x * aspectmult)) || (ViewportScaledHeight(x,y) > (y * aspectmult))) return true; - + return vid_scale_linear; } diff --git a/source/common/rendering/v_video.cpp b/source/common/rendering/v_video.cpp index 7d8075c4f..9476bf6ab 100644 --- a/source/common/rendering/v_video.cpp +++ b/source/common/rendering/v_video.cpp @@ -219,13 +219,13 @@ void DCanvas::Resize(int width, int height, bool optimizepitch) { Width = width; Height = height; - + // Making the pitch a power of 2 is very bad for performance // Try to maximize the number of cache lines that can be filled // for each column drawing operation by making the pitch slightly // longer than the width. The values used here are all based on // empirical evidence. - + if (width <= 640 || !optimizepitch) { // For low resolutions, just keep the pitch the same as the width. @@ -337,15 +337,15 @@ void V_InitScreenSize () { const char *i; int width, height, bits; - + width = height = bits = 0; - + if ( (i = Args->CheckValue ("-width")) ) width = atoi (i); - + if ( (i = Args->CheckValue ("-height")) ) height = atoi (i); - + if (width == 0) { if (height == 0) diff --git a/source/common/rendering/v_video.h b/source/common/rendering/v_video.h index b78afd4b0..e5d79d881 100644 --- a/source/common/rendering/v_video.h +++ b/source/common/rendering/v_video.h @@ -151,7 +151,7 @@ public: int mPipelineNbr = 1; // Number of HW buffers to pipeline int mPipelineType = 0; - + public: DFrameBuffer (int width=1, int height=1); virtual ~DFrameBuffer(); @@ -219,7 +219,7 @@ public: virtual int GetClientWidth() = 0; virtual int GetClientHeight() = 0; virtual void BlurScene(float amount) {} - + // Interface to hardware rendering resources virtual IVertexBuffer *CreateVertexBuffer() { return nullptr; } virtual IIndexBuffer *CreateIndexBuffer() { return nullptr; } diff --git a/source/common/rendering/vulkan/shaders/vk_shader.cpp b/source/common/rendering/vulkan/shaders/vk_shader.cpp index df065e1ce..b1994eb2d 100644 --- a/source/common/rendering/vulkan/shaders/vk_shader.cpp +++ b/source/common/rendering/vulkan/shaders/vk_shader.cpp @@ -150,7 +150,7 @@ static const char *shaderBindings = R"( int useVertexData; vec4 uVertexColor; vec4 uVertexNormal; - + vec4 uGlowTopPlane; vec4 uGlowTopColor; vec4 uGlowBottomPlane; diff --git a/source/common/rendering/vulkan/textures/vk_samplers.cpp b/source/common/rendering/vulkan/textures/vk_samplers.cpp index adc6dd2b4..06e105aed 100644 --- a/source/common/rendering/vulkan/textures/vk_samplers.cpp +++ b/source/common/rendering/vulkan/textures/vk_samplers.cpp @@ -82,7 +82,7 @@ void VkSamplerManager::SetTextureFilterMode() void VkSamplerManager::Create() { int filter = sysCallbacks.DisableTextureFilter && sysCallbacks.DisableTextureFilter()? 0 : gl_texture_filter; - + for (int i = CLAMP_NONE; i <= CLAMP_XY; i++) { SamplerBuilder builder; diff --git a/source/common/scripting/backend/codegen.cpp b/source/common/scripting/backend/codegen.cpp index 1bcd1fa41..a35ceea27 100644 --- a/source/common/scripting/backend/codegen.cpp +++ b/source/common/scripting/backend/codegen.cpp @@ -1964,7 +1964,7 @@ ExpEmit FxUnaryNotBitwise::Emit(VMFunctionBuilder *build) from.Free(build); ExpEmit to(build, REGT_INT); assert(!from.Konst); - + build->Emit(OP_NOT, to.RegNum, from.RegNum, 0); return to; } @@ -2746,7 +2746,7 @@ FxExpression *FxAddSub::Resolve(FCompileContext& ctx) delete this; return nullptr; } - + if (compileEnvironment.CheckForCustomAddition) { auto result = compileEnvironment.CheckForCustomAddition(this, ctx); @@ -2756,7 +2756,7 @@ FxExpression *FxAddSub::Resolve(FCompileContext& ctx) goto goon; } } - + if (left->ValueType == TypeTextureID && right->IsInteger()) { ValueType = TypeTextureID; @@ -5125,10 +5125,10 @@ ExpEmit FxNew::Emit(VMFunctionBuilder *build) // Call DecoRandom to generate a random number. VMFunction *callfunc; auto sym = FindBuiltinFunction(compileEnvironment.CustomBuiltinNew != NAME_None? compileEnvironment.CustomBuiltinNew : NAME_BuiltinNew); - + assert(sym); callfunc = sym->Variants[0].Implementation; - + FunctionCallEmitter emitters(callfunc); int outerside = -1; @@ -5886,7 +5886,7 @@ FxExpression *FxIdentifier::Resolve(FCompileContext& ctx) { PSymbol * sym; FxExpression *newex = nullptr; - + CHECKRESOLVED(); // Local variables have highest priority. @@ -6038,7 +6038,7 @@ FxExpression *FxIdentifier::Resolve(FCompileContext& ctx) deprecationMessage.IsEmpty() ? "" : ", ", deprecationMessage.GetChars()); } } - + newex = new FxGlobalVariable(static_cast(sym), ScriptPosition); goto foundit; @@ -6068,7 +6068,7 @@ FxExpression *FxIdentifier::Resolve(FCompileContext& ctx) newex = new FxCVar(cvar, ScriptPosition); goto foundit; } - + ScriptPosition.Message(MSG_ERROR, "Unknown identifier '%s'", Identifier.GetChars()); delete this; return nullptr; @@ -6406,7 +6406,7 @@ bool FxLocalVariable::RequestAddress(FCompileContext &ctx, bool *writable) if (writable != nullptr) *writable = !ctx.CheckWritable(Variable->VarFlags); return true; } - + ExpEmit FxLocalVariable::Emit(VMFunctionBuilder *build) { // 'Out' variables are actually pointers but this fact must be hidden to the script. @@ -6771,7 +6771,7 @@ FxExpression *FxStackVariable::Resolve(FCompileContext &ctx) ExpEmit FxStackVariable::Emit(VMFunctionBuilder *build) { int offsetreg = -1; - + if (membervar->Offset != 0) offsetreg = build->GetConstantInt((int)membervar->Offset); if (AddressRequested) @@ -6963,7 +6963,7 @@ FxExpression *FxStructMember::Resolve(FCompileContext &ctx) { locvar->RegOffset = int(membervar->Offset); } - + locvar->ValueType = membervar->Type; classx = nullptr; delete this; @@ -7245,7 +7245,7 @@ FxExpression *FxArrayElement::Resolve(FCompileContext &ctx) ExpEmit FxArrayElement::Emit(VMFunctionBuilder *build) { PArray *arraytype; - + if (arrayispointer) { auto ptr = Array->ValueType->toPointer(); @@ -7267,7 +7267,7 @@ ExpEmit FxArrayElement::Emit(VMFunctionBuilder *build) ExpEmit start; ExpEmit bound; bool nestedarray = false; - + if (SizeAddr != ~0u) { bool ismeta = Array->ExprType == EFX_ClassMember && static_cast(Array)->membervar->Flags & VARF_Meta; @@ -7669,7 +7669,7 @@ FxExpression *FxFunctionCall::Resolve(FCompileContext& ctx) return x->Resolve(ctx); } } - + if (compileEnvironment.CheckCustomGlobalFunctions) { auto result = compileEnvironment.CheckCustomGlobalFunctions(this, ctx); @@ -8508,7 +8508,7 @@ VMFunction *FxVMFunctionCall::GetDirectFunction(PFunction *callingfunc, const Ve if (Function->Variants[0].ArgFlags.Size() > imp && !(Function->Variants[0].ArgFlags[imp] & VARF_Optional)) return nullptr; return Function->Variants[0].Implementation; } - + return nullptr; } @@ -8567,7 +8567,7 @@ FxExpression *FxVMFunctionCall::Resolve(FCompileContext& ctx) delete this; return nullptr; } - + bool foundvarargs = false; PType * type = nullptr; int flag = 0; @@ -10509,7 +10509,7 @@ FxExpression *FxClassTypeCast::Resolve(FCompileContext &ctx) delete this; return nullptr; } - + if (basex->ValueType != TypeName && basex->ValueType != TypeString) { ScriptPosition.Message(MSG_ERROR, "Cannot convert %s to class type", basex->ValueType->DescriptiveName()); @@ -10526,7 +10526,7 @@ FxExpression *FxClassTypeCast::Resolve(FCompileContext &ctx) { if (Explicit) cls = FindClassType(clsname, ctx); else cls = PClass::FindClass(clsname); - + if (cls == nullptr || cls->VMType == nullptr) { /* lax */ @@ -10761,7 +10761,7 @@ FxExpression *FxLocalVariableDeclaration::Resolve(FCompileContext &ctx) { auto sfunc = static_cast(ctx.Function->Variants[0].Implementation); StackOffset = sfunc->AllocExtraStack(ValueType); - + if (Init != nullptr) { ScriptPosition.Message(MSG_ERROR, "Cannot initialize non-scalar variable %s here", Name.GetChars()); @@ -11203,7 +11203,7 @@ ExpEmit FxLocalArrayDeclaration::Emit(VMFunctionBuilder *build) break; } build->Registers[regtype].Return(regNum, 1); - + emitval.Free(build); } else diff --git a/source/common/scripting/backend/codegen.h b/source/common/scripting/backend/codegen.h index ac5f058ab..43fb7f061 100644 --- a/source/common/scripting/backend/codegen.h +++ b/source/common/scripting/backend/codegen.h @@ -206,7 +206,7 @@ struct ExpVal int regtype = Type->GetRegType(); return regtype == REGT_INT ? !!Int : regtype == REGT_FLOAT ? Float!=0. : false; } - + FName GetName() const { if (Type == TypeString) @@ -325,7 +325,7 @@ protected: public: virtual ~FxExpression() {} virtual FxExpression *Resolve(FCompileContext &ctx); - + virtual bool isConstant() const; virtual bool RequestAddress(FCompileContext &ctx, bool *writable); virtual PPrototype *ReturnProto(); @@ -525,7 +525,7 @@ public: } ValueType = value.Type = type; } - + static FxExpression *MakeConstant(PSymbol *sym, const FScriptPosition &pos); bool isConstant() const @@ -1864,7 +1864,7 @@ protected: : FxExpression(etype, pos) { } - + void Backpatch(VMFunctionBuilder *build, size_t loopstart, size_t loopend); FxExpression *Resolve(FCompileContext&) final; virtual FxExpression *DoResolve(FCompileContext&) = 0; diff --git a/source/common/scripting/backend/vmbuilder.cpp b/source/common/scripting/backend/vmbuilder.cpp index 4c1401e8e..1624aa42f 100644 --- a/source/common/scripting/backend/vmbuilder.cpp +++ b/source/common/scripting/backend/vmbuilder.cpp @@ -398,7 +398,7 @@ int VMFunctionBuilder::RegAvailability::Get(int count) { return -1; } - + mask = count == 32 ? ~0u : (1 << count) - 1; for (i = 0; i < 256 / 32; ++i) diff --git a/source/common/scripting/core/dynarrays.cpp b/source/common/scripting/core/dynarrays.cpp index 583bbd647..8c51daa94 100644 --- a/source/common/scripting/core/dynarrays.cpp +++ b/source/common/scripting/core/dynarrays.cpp @@ -130,7 +130,7 @@ template<> unsigned int ArrayReserve(TArray *self, int amount) if (fillCount > 0) memset(&(*self)[oldSize], 0, sizeof(DObject*) * fillCount); - + return oldSize; } diff --git a/source/common/scripting/core/scopebarrier.h b/source/common/scripting/core/scopebarrier.h index fb931d223..b5eeae78f 100644 --- a/source/common/scripting/core/scopebarrier.h +++ b/source/common/scripting/core/scopebarrier.h @@ -46,7 +46,7 @@ struct FScopeBarrier // static int FlagsFromSide(int side); static EScopeFlags ObjectFlagsFromSide(int side); - + // used for errors static const char* StringFromSide(int side); diff --git a/source/common/scripting/core/types.cpp b/source/common/scripting/core/types.cpp index 3fb97cb32..c98cc7435 100644 --- a/source/common/scripting/core/types.cpp +++ b/source/common/scripting/core/types.cpp @@ -410,7 +410,7 @@ bool PContainerType::IsMatch(intptr_t id1, intptr_t id2) const { const PTypeBase *outer = (const PTypeBase *)id1; FName name = (ENamedName)(intptr_t)id2; - + return Outer == outer && TypeName == name; } diff --git a/source/common/scripting/frontend/zcc_compile.cpp b/source/common/scripting/frontend/zcc_compile.cpp index c34039e12..8fc0bbe24 100644 --- a/source/common/scripting/frontend/zcc_compile.cpp +++ b/source/common/scripting/frontend/zcc_compile.cpp @@ -1069,7 +1069,7 @@ void ZCCCompiler::AddConstant(ZCC_ConstantWork &constant) auto def = constant.node; auto val = def->Value; ExpVal &c = constant.constval; - + // This is for literal constants. if (val->NodeType == AST_ExprConstant) { @@ -1364,7 +1364,7 @@ void ZCCCompiler::CompileAllFields() for (unsigned i = 0; i < Classes.Size(); i++) { auto type = Classes[i]->ClassType(); - + if (type->Size == TentativeClass) { if (type->ParentClass->Size == TentativeClass) @@ -1528,7 +1528,7 @@ bool ZCCCompiler::CompileFields(PContainerType *type, TArrayFindSymbol(type->UserType->Id, true); if (sym == nullptr) sym = OutNamespace->Symbols.FindSymbol(type->UserType->Id, true); @@ -2244,7 +2244,7 @@ void ZCCCompiler::CompileFunction(ZCC_StructWork *c, ZCC_FuncDeclarator *f, bool flags |= VARF_Optional; hasoptionals = true; - + if ((varflags & VARF_Override) && !overridemsg) { // This is illegal, but in older compilers wasn't checked, so there it has to be demoted to a warning. @@ -2465,11 +2465,11 @@ void ZCCCompiler::CompileFunction(ZCC_StructWork *c, ZCC_FuncDeclarator *f, bool sym->Variants[0].Flags |= VARF_ReadOnly; if (oldfunc->VarFlags & VARF_Protected) sym->Variants[0].Flags |= VARF_Protected; - + clstype->Virtuals[virtindex] = sym->Variants[0].Implementation; sym->Variants[0].Implementation->VirtualIndex = virtindex; sym->Variants[0].Implementation->VarFlags = sym->Variants[0].Flags; - + // Defaults must be identical to parent class if (parentfunc->Variants[0].Implementation->DefaultArgs.Size() > 0) { @@ -3112,7 +3112,7 @@ FxExpression *ZCCCompiler::ConvertImplicitScopeNode(ZCC_TreeNode *node, ZCC_Stat { return nullptr; } - + FxExpression *nestedExpr = ConvertNode(nested); assert(nullptr != nestedExpr); diff --git a/source/common/scripting/frontend/zcc_compile.h b/source/common/scripting/frontend/zcc_compile.h index ca19d8aff..ca1beb3f2 100644 --- a/source/common/scripting/frontend/zcc_compile.h +++ b/source/common/scripting/frontend/zcc_compile.h @@ -140,7 +140,7 @@ protected: void InitFunctions(); virtual void InitDefaults(); - + TArray Constants; TArray Structs; TArray Classes; diff --git a/source/common/scripting/frontend/zcc_parser.cpp b/source/common/scripting/frontend/zcc_parser.cpp index 0d1928653..1ac9342aa 100644 --- a/source/common/scripting/frontend/zcc_parser.cpp +++ b/source/common/scripting/frontend/zcc_parser.cpp @@ -1267,7 +1267,7 @@ ZCC_TreeNode *TreeNodeDeepCopy_Internal(ZCC_AST *ast, ZCC_TreeNode *orig, bool c break; } - + case AST_ClassCast: { TreeNodeDeepCopy_Start(ClassCast); diff --git a/source/common/scripting/jit/jit_call.cpp b/source/common/scripting/jit/jit_call.cpp index ee35fc139..83808c0ed 100644 --- a/source/common/scripting/jit/jit_call.cpp +++ b/source/common/scripting/jit/jit_call.cpp @@ -340,7 +340,7 @@ void JitCompiler::EmitNativeCall(VMNativeFunction *target) I_Error("Unexpected register type for self pointer\n"); break; } - + cc.test(*reg, *reg); cc.jz(label); } diff --git a/source/common/scripting/jit/jit_flow.cpp b/source/common/scripting/jit/jit_flow.cpp index 8439481cf..6157bf340 100644 --- a/source/common/scripting/jit/jit_flow.cpp +++ b/source/common/scripting/jit/jit_flow.cpp @@ -7,7 +7,7 @@ void JitCompiler::EmitTEST() cc.cmp(regD[A], BC); cc.jne(GetLabel(i + 2)); } - + void JitCompiler::EmitTESTN() { int bc = BC; diff --git a/source/common/scripting/jit/jit_math.cpp b/source/common/scripting/jit/jit_math.cpp index d2fb45c7d..ea9402594 100644 --- a/source/common/scripting/jit/jit_math.cpp +++ b/source/common/scripting/jit/jit_math.cpp @@ -902,7 +902,7 @@ void JitCompiler::EmitMINF_RK() cc.movsd(regF[A], asmjit::x86::qword_ptr(tmp)); cc.minpd(regF[A], rb); // minsd requires SSE 4.1 } - + void JitCompiler::EmitMAXF_RR() { auto rc = CheckRegF(C, A); @@ -919,7 +919,7 @@ void JitCompiler::EmitMAXF_RK() cc.movsd(regF[A], asmjit::x86::qword_ptr(tmp)); cc.maxpd(regF[A], rb); // maxsd requires SSE 4.1 } - + void JitCompiler::EmitATAN2() { auto result = newResultXmmSd(); @@ -1441,7 +1441,7 @@ void JitCompiler::EmitEQV3_R() EmitVectorComparison<3> (check, fail, success); }); } - + void JitCompiler::EmitEQV3_K() { I_Error("EQV3_K is not used."); diff --git a/source/common/scripting/jit/jit_runtime.cpp b/source/common/scripting/jit/jit_runtime.cpp index 73dd40702..647647442 100644 --- a/source/common/scripting/jit/jit_runtime.cpp +++ b/source/common/scripting/jit/jit_runtime.cpp @@ -403,7 +403,7 @@ static void WriteCIE(TArray &stream, const TArray &cieInstruct unsigned int lengthPos = stream.Size(); WriteUInt32(stream, 0); // Length WriteUInt32(stream, 0); // CIE ID - + WriteUInt8(stream, 1); // CIE Version WriteUInt8(stream, 'z'); WriteUInt8(stream, 'R'); // fde encoding @@ -428,7 +428,7 @@ static void WriteFDE(TArray &stream, const TArray &fdeInstruct WriteUInt32(stream, 0); // Length uint32_t offsetToCIE = stream.Size() - cieLocation; WriteUInt32(stream, offsetToCIE); - + functionStart = stream.Size(); WriteUInt64(stream, 0); // func start WriteUInt64(stream, 0); // func size @@ -499,7 +499,7 @@ static TArray CreateUnwindInfoUnix(asmjit::CCFunc *func, unsigned int & // // The CFI_Parser::decodeFDE parser on the other side.. // https://github.com/llvm-mirror/libunwind/blob/master/src/DwarfParser.hpp - + // Asmjit -> DWARF register id int dwarfRegId[16]; dwarfRegId[X86Gp::kIdAx] = 0; @@ -520,7 +520,7 @@ static TArray CreateUnwindInfoUnix(asmjit::CCFunc *func, unsigned int & dwarfRegId[X86Gp::kIdR15] = 15; int dwarfRegRAId = 16; int dwarfRegXmmId = 17; - + TArray cieInstructions; TArray fdeInstructions; @@ -529,7 +529,7 @@ static TArray CreateUnwindInfoUnix(asmjit::CCFunc *func, unsigned int & WriteDefineCFA(cieInstructions, dwarfRegId[X86Gp::kIdSp], stackOffset); WriteRegisterStackLocation(cieInstructions, returnAddressReg, stackOffset); - + FuncFrameLayout layout; Error error = layout.init(func->getDetail(), func->getFrameInfo()); if (error != kErrorOk) @@ -702,7 +702,7 @@ void *AddJitFunction(asmjit::CodeHolder* code, JitCompiler *compiler) uint64_t length64 = *((uint64_t *)(entry + 4)); if (length64 == 0) break; - + uint64_t offset = *((uint64_t *)(entry + 12)); if (offset != 0) { diff --git a/source/common/scripting/vm/vmexec.h b/source/common/scripting/vm/vmexec.h index baff63b8c..a4d666dcc 100644 --- a/source/common/scripting/vm/vmexec.h +++ b/source/common/scripting/vm/vmexec.h @@ -515,7 +515,7 @@ static int ExecScriptFunc(VMFrameStack *stack, VMReturn *ret, int numret) DoCast(reg, f, a, B, C); } NEXTOP; - + OP(CASTB): if (C == CASTB_I) { @@ -538,7 +538,7 @@ static int ExecScriptFunc(VMFrameStack *stack, VMReturn *ret, int numret) reg.d[a] = reg.s[B].Len() > 0; } NEXTOP; - + OP(TEST): ASSERTD(a); if (reg.d[a] != BC) @@ -852,7 +852,7 @@ static int ExecScriptFunc(VMFrameStack *stack, VMReturn *ret, int numret) ASSERTD(a); ASSERTS(B); reg.d[a] = (int)reg.s[B].Len(); NEXTOP; - + OP(CMPS): // String comparison is a fairly expensive operation, so I've // chosen to conserve a few opcodes by condensing all the @@ -1347,7 +1347,7 @@ static int ExecScriptFunc(VMFrameStack *stack, VMReturn *ret, int numret) fb = reg.f[B]; reg.f[a] = (C == FLOP_ABS) ? fabs(fb) : (C == FLOP_NEG) ? -fb : DoFLOP(C, fb); NEXTOP; - + OP(EQF_R): ASSERTF(B); ASSERTF(C); if (a & CMP_APPROX) diff --git a/source/common/statusbar/base_sbar.h b/source/common/statusbar/base_sbar.h index 9b1204412..972cbf0df 100644 --- a/source/common/statusbar/base_sbar.h +++ b/source/common/statusbar/base_sbar.h @@ -131,7 +131,7 @@ class DStatusBarCore : public DObject DECLARE_CLASS(DStatusBarCore, DObject) protected: - + public: diff --git a/source/common/textures/bitmap.cpp b/source/common/textures/bitmap.cpp index 8c433d855..bfe79dbb4 100644 --- a/source/common/textures/bitmap.cpp +++ b/source/common/textures/bitmap.cpp @@ -97,7 +97,7 @@ void iCopyColors(uint8_t *pout, const uint8_t *pin, int count, int step, FCopyIn if (TBlend::ProcessAlpha0() || a) { int gray = TSrc::Gray(pin)>>4; - + TBlend::OpC(pout[TDest::RED], IcePalette[gray][0], a, inf); TBlend::OpC(pout[TDest::GREEN], IcePalette[gray][1], a, inf); TBlend::OpC(pout[TDest::BLUE], IcePalette[gray][2], a, inf); @@ -331,7 +331,7 @@ bool ClipCopyPixelRect(const FClipRect *cr, int &originx, int &originy, srcwidth = cr->x + cr->width - originx; if (srcwidth<=0) return false; } - + if (originy < cr->y) { int skip = cr->y - originy; diff --git a/source/common/textures/bitmap.h b/source/common/textures/bitmap.h index 88df40307..34fff5516 100644 --- a/source/common/textures/bitmap.h +++ b/source/common/textures/bitmap.h @@ -156,7 +156,7 @@ public: } } - + ~FBitmap() { Destroy(); diff --git a/source/common/textures/formats/anmtexture.cpp b/source/common/textures/formats/anmtexture.cpp index aa65dc693..3845bdc67 100644 --- a/source/common/textures/formats/anmtexture.cpp +++ b/source/common/textures/formats/anmtexture.cpp @@ -81,7 +81,7 @@ FImageSource *AnmImage_TryCreate(FileReader & file, int lumpnum) { return new FAnmTexture(lumpnum, 320, 200); } - + return nullptr; } @@ -132,7 +132,7 @@ TArray FAnmTexture::CreatePalettedPixels(int conversion) uint8_t buffer[64000]; uint8_t palette[768]; uint8_t remap[256]; - + ReadFrame(buffer, palette); for(int i=0;i<256;i++) { @@ -153,7 +153,7 @@ int FAnmTexture::CopyPixels(FBitmap *bmp, int conversion) uint8_t buffer[64000]; uint8_t palette[768]; ReadFrame(buffer, palette); - + auto dpix = bmp->GetPixels(); for (int i = 0; i < Width * Height; i++) { diff --git a/source/common/textures/formats/md5check.cpp b/source/common/textures/formats/md5check.cpp index 96e14b2f3..120371a8e 100644 --- a/source/common/textures/formats/md5check.cpp +++ b/source/common/textures/formats/md5check.cpp @@ -219,10 +219,10 @@ void makeMD5(const void *buffer, unsigned length, char *md5out) bool checkPatchForAlpha(const void *buffer, uint32_t length) { if (length > 10164) return false; // shortcut for anything too large - + char md5[33]; bool done = false; - + for(int i=0; alphapatches[i].length > 0; i++) { if (alphapatches[i].length == (int)length) // length check diff --git a/source/common/textures/formats/patchtexture.cpp b/source/common/textures/formats/patchtexture.cpp index f1f65291d..e680bf38a 100644 --- a/source/common/textures/formats/patchtexture.cpp +++ b/source/common/textures/formats/patchtexture.cpp @@ -76,15 +76,15 @@ public: static bool CheckIfPatch(FileReader & file, bool &isalpha) { if (file.GetLength() < 13) return false; // minimum length of a valid Doom patch - + file.Seek(0, FileReader::SeekSet); auto data = file.Read(file.GetLength()); - + const patch_t *foo = (const patch_t *)data.Data(); - + int height = LittleShort(foo->height); int width = LittleShort(foo->width); - + if (height > 0 && height <= 2048 && width > 0 && width <= 2048 && width < file.GetLength()/4) { // The dimensions seem like they might be valid for a patch, so @@ -93,7 +93,7 @@ static bool CheckIfPatch(FileReader & file, bool &isalpha) // and none of them must point past the end of the patch. bool gapAtStart = true; int x; - + for (x = 0; x < width; ++x) { uint32_t ofs = LittleLong(foo->columnofs[x]); diff --git a/source/common/textures/formats/pngtexture.cpp b/source/common/textures/formats/pngtexture.cpp index dd0976a8e..c91723b95 100644 --- a/source/common/textures/formats/pngtexture.cpp +++ b/source/common/textures/formats/pngtexture.cpp @@ -684,7 +684,7 @@ public: virtual FBitmap GetBgraBitmap(const PalEntry *remap, int *trans) override; protected: - + FileReader fr; uint8_t ColorType; int PaletteSize; @@ -703,7 +703,7 @@ FGameTexture *PNGTexture_CreateFromFile(PNGHandle *png, const FString &filename) { return nullptr; } - + // Savegame images can only be either 8 bit paletted or 24 bit RGB auto &data = png->File; int width = data.ReadInt32BE(); @@ -713,7 +713,7 @@ FGameTexture *PNGTexture_CreateFromFile(PNGHandle *png, const FString &filename) uint8_t compression = data.ReadUInt8(); uint8_t filter = data.ReadUInt8(); uint8_t interlace = data.ReadUInt8(); - + // Reject anything that cannot be put into a savegame picture by GZDoom itself. if (compression != 0 || filter != 0 || interlace > 0 || bitdepth != 8 || (colortype != 2 && colortype != 3)) return nullptr; else return MakeGameTexture(new FPNGFileTexture (png->File, width, height, colortype), nullptr, ETextureType::Override); @@ -748,9 +748,9 @@ FBitmap FPNGFileTexture::GetBgraBitmap(const PalEntry *remap, int *trans) PalEntry pe[256]; uint32_t len, id; int pixwidth = Width * (ColorType == 2? 3:1); - + FileReader *lump = &fr; - + bmp.Create(Width, Height); lump->Seek(33, FileReader::SeekSet); lump->Read(&len, 4); @@ -779,12 +779,12 @@ FBitmap FPNGFileTexture::GetBgraBitmap(const PalEntry *remap, int *trans) auto StartOfIDAT = (uint32_t)lump->Tell() - 8; TArray Pixels(pixwidth * Height); - + lump->Seek (StartOfIDAT, FileReader::SeekSet); lump->Read(&len, 4); lump->Read(&id, 4); M_ReadIDAT (*lump, Pixels.Data(), Width, Height, pixwidth, 8, ColorType, 0, BigLong((unsigned int)len)); - + if (ColorType == 3) { bmp.CopyPixelData(0, 0, Pixels.Data(), Width, Height, 1, Width, 0, pe); diff --git a/source/common/textures/formats/stb_image.h b/source/common/textures/formats/stb_image.h index 196dfd5cc..44117802a 100644 --- a/source/common/textures/formats/stb_image.h +++ b/source/common/textures/formats/stb_image.h @@ -1198,7 +1198,7 @@ static FILE *stbi__fopen(char const *filename, char const *mode) wchar_t wFilename[1024]; if (0 == MultiByteToWideChar(65001 /* UTF8 */, 0, filename, -1, wFilename, sizeof(wFilename))) return 0; - + if (0 == MultiByteToWideChar(65001 /* UTF8 */, 0, mode, -1, wMode, sizeof(wMode))) return 0; @@ -1302,7 +1302,7 @@ STBIDEF stbi_uc *stbi_load_gif_from_memory(stbi_uc const *buffer, int len, int * unsigned char *result; stbi__context s; stbi__start_mem(&s,buffer,len); - + result = (unsigned char*) stbi__load_gif_main(&s, delays, x, y, z, comp, req_comp); if (stbi__vertically_flip_on_load) { stbi__vertical_flip_slices( result, *x, *y, *z, *comp ); @@ -6522,7 +6522,7 @@ static stbi_uc *stbi__gif_load_next(stbi__context *s, stbi__gif *g, int *comp, i g->color_table = (stbi_uc *) g->pal; } else return stbi__errpuc("missing color table", "Corrupt GIF"); - + o = stbi__process_gif_raster(s, g); if (!o) return NULL; @@ -6608,7 +6608,7 @@ static void *stbi__load_gif_main(stbi__context *s, int **delays, int *x, int *y, *y = g.h; ++layers; stride = g.w * g.h * 4; - + if (out) { out = (stbi_uc*) STBI_REALLOC( out, layers * stride ); if (delays) { diff --git a/source/common/textures/formats/stbtexture.cpp b/source/common/textures/formats/stbtexture.cpp index bce080c62..7ffb6f01d 100644 --- a/source/common/textures/formats/stbtexture.cpp +++ b/source/common/textures/formats/stbtexture.cpp @@ -43,7 +43,7 @@ #define STBI_NO_HDR #define STBI_NO_PNM #include "stb_image.h" - + #include "files.h" #include "filesystem.h" @@ -92,7 +92,7 @@ FImageSource *StbImage_TryCreate(FileReader & file, int lumpnum) { return new FStbTexture(lumpnum, x, y); } - + return nullptr; } diff --git a/source/common/textures/formats/tgatexture.cpp b/source/common/textures/formats/tgatexture.cpp index d2e12e1aa..690c2bc29 100644 --- a/source/common/textures/formats/tgatexture.cpp +++ b/source/common/textures/formats/tgatexture.cpp @@ -57,7 +57,7 @@ struct TGAHeader int16_t cm_first; int16_t cm_length; uint8_t cm_size; - + int16_t x_origin; int16_t y_origin; int16_t width; @@ -97,12 +97,12 @@ FImageSource *TGAImage_TryCreate(FileReader & file, int lumpnum) TGAHeader hdr; if (file.GetLength() < (long)sizeof(hdr)) return NULL; - + file.Seek(0, FileReader::SeekSet); file.Read(&hdr, sizeof(hdr)); hdr.width = LittleShort(hdr.width); hdr.height = LittleShort(hdr.height); - + // Not much that can be done here because TGA does not have a proper // header to be identified with. if (hdr.has_cm != 0 && hdr.has_cm != 1) return NULL; @@ -145,7 +145,7 @@ void FTGATexture::ReadCompressed(FileReader &lump, uint8_t * buffer, int bytespe { uint8_t data[4]; int Size = Width * Height; - + while (Size > 0) { uint8_t b = lump.ReadUInt8(); @@ -188,7 +188,7 @@ TArray FTGATexture::CreatePalettedPixels(int conversion) TArray Pixels(Width*Height, true); lump.Read(&hdr, sizeof(hdr)); lump.Seek(hdr.id_len, FileReader::SeekCur); - + hdr.width = LittleShort(hdr.width); hdr.height = LittleShort(hdr.height); hdr.cm_first = LittleShort(hdr.cm_first); @@ -209,14 +209,14 @@ TArray FTGATexture::CreatePalettedPixels(int conversion) b = (w & 0x7C00) >> 7; a = 255; break; - + case 24: b = lump.ReadUInt8(); g = lump.ReadUInt8(); r = lump.ReadUInt8(); a=255; break; - + case 32: b = lump.ReadUInt8(); g = lump.ReadUInt8(); @@ -224,7 +224,7 @@ TArray FTGATexture::CreatePalettedPixels(int conversion) a = lump.ReadUInt8(); if ((hdr.img_desc&15)!=8) a=255; break; - + default: // should never happen r=g=b=a=0; break; @@ -232,10 +232,10 @@ TArray FTGATexture::CreatePalettedPixels(int conversion) PaletteMap[i] = ImageHelpers::RGBToPalettePrecise(conversion == luminance, r, g, b, a); } } - + int Size = Width * Height * (hdr.bpp>>3); TArray buffer(Size, true); - + if (hdr.img_type < 4) // uncompressed { lump.Read(buffer.Data(), Size); @@ -244,7 +244,7 @@ TArray FTGATexture::CreatePalettedPixels(int conversion) { ReadCompressed(lump, buffer.Data(), hdr.bpp>>3); } - + uint8_t * ptr = buffer.Data(); int step_x = (hdr.bpp>>3); int Pitch = Width * step_x; @@ -293,7 +293,7 @@ TArray FTGATexture::CreatePalettedPixels(int conversion) } } break; - + case 24: for(int y=0;y FTGATexture::CreatePalettedPixels(int conversion) } } break; - + case 32: if ((hdr.img_desc&15)!=8) // 32 bits without a valid alpha channel { @@ -332,12 +332,12 @@ TArray FTGATexture::CreatePalettedPixels(int conversion) } } break; - + default: break; } break; - + case 3: // Grayscale { auto remap = ImageHelpers::GetRemap(conversion == luminance, true); @@ -395,7 +395,7 @@ int FTGATexture::CopyPixels(FBitmap *bmp, int conversion) lump.Read(&hdr, sizeof(hdr)); lump.Seek(hdr.id_len, FileReader::SeekCur); - + hdr.width = LittleShort(hdr.width); hdr.height = LittleShort(hdr.height); hdr.cm_first = LittleShort(hdr.cm_first); @@ -440,10 +440,10 @@ int FTGATexture::CopyPixels(FBitmap *bmp, int conversion) pe[i] = PalEntry(a, r, g, b); } } - + int Size = Width * Height * (hdr.bpp>>3); TArray sbuffer(Size); - + if (hdr.img_type < 4) // uncompressed { lump.Read(sbuffer.Data(), Size); @@ -452,7 +452,7 @@ int FTGATexture::CopyPixels(FBitmap *bmp, int conversion) { ReadCompressed(lump, sbuffer.Data(), hdr.bpp>>3); } - + uint8_t * ptr = sbuffer.Data(); int step_x = (hdr.bpp>>3); int Pitch = Width * step_x; @@ -483,11 +483,11 @@ int FTGATexture::CopyPixels(FBitmap *bmp, int conversion) case 16: bmp->CopyPixelDataRGB(0, 0, ptr, Width, Height, step_x, Pitch, 0, CF_RGB555); break; - + case 24: bmp->CopyPixelDataRGB(0, 0, ptr, Width, Height, step_x, Pitch, 0, CF_BGR); break; - + case 32: if ((hdr.img_desc&15)!=8) // 32 bits without a valid alpha channel { @@ -499,12 +499,12 @@ int FTGATexture::CopyPixels(FBitmap *bmp, int conversion) transval = -1; } break; - + default: break; } break; - + case 3: // Grayscale switch (hdr.bpp) { @@ -512,11 +512,11 @@ int FTGATexture::CopyPixels(FBitmap *bmp, int conversion) for(int i=0;i<256;i++) pe[i]=PalEntry(255,i,i,i); // gray map bmp->CopyPixelData(0, 0, ptr, Width, Height, step_x, Pitch, 0, pe); break; - + case 16: bmp->CopyPixelDataRGB(0, 0, ptr, Width, Height, step_x, Pitch, 0, CF_I16); break; - + default: break; } diff --git a/source/common/textures/hires/hqnx_asm/hq4x_asm.cpp b/source/common/textures/hires/hqnx_asm/hq4x_asm.cpp index 7ce8a1621..5d22e1348 100644 --- a/source/common/textures/hires/hqnx_asm/hq4x_asm.cpp +++ b/source/common/textures/hires/hqnx_asm/hq4x_asm.cpp @@ -272,9 +272,9 @@ bool Diff(const unsigned int rgb1, const unsigned int rgb2) { return false; } - + static const hq_vec THRESHOLD = 0x00300706; - + const hq_vec yuv1 = RGBtoYUV[rgb1]; const hq_vec yuv2 = RGBtoYUV[rgb2]; diff --git a/source/common/textures/hires/hqresize.cpp b/source/common/textures/hires/hqresize.cpp index 16b2b4b13..9a6c42aa2 100644 --- a/source/common/textures/hires/hqresize.cpp +++ b/source/common/textures/hires/hqresize.cpp @@ -375,7 +375,7 @@ static unsigned char *xbrzHelper( void (*xbrzFunction) ( size_t, const uint32_t* outHeight = N *inHeight; unsigned char * newBuffer = new unsigned char[outWidth*outHeight*4]; - + const int thresholdWidth = gl_texture_hqresize_mt_width; const int thresholdHeight = gl_texture_hqresize_mt_height; diff --git a/source/common/textures/hires/xbr/xbrz_old.h b/source/common/textures/hires/xbr/xbrz_old.h index 9a46f2a97..10e60dcfc 100644 --- a/source/common/textures/hires/xbr/xbrz_old.h +++ b/source/common/textures/hires/xbr/xbrz_old.h @@ -47,7 +47,7 @@ http://board.byuu.org/viewtopic.php?f=10&t=2248 THREAD-SAFETY: - parts of the same image may be scaled by multiple threads as long as the [yFirst, yLast) ranges do not overlap! - there is a minor inefficiency for the first row of a slice, so avoid processing single rows only - + */ void scale(size_t factor, //valid range: 2 - 5 const uint32_t* src, uint32_t* trg, int srcWidth, int srcHeight, diff --git a/source/common/textures/hw_texcontainer.h b/source/common/textures/hw_texcontainer.h index 91afa526f..a4ff33f93 100644 --- a/source/common/textures/hw_texcontainer.h +++ b/source/common/textures/hw_texcontainer.h @@ -58,7 +58,7 @@ private: TranslatedTexture hwDefTex[4]; TArray hwTex_Translated; - + TranslatedTexture * GetTexID(int translation, int scaleflags) { // Allow negative indices to pass through unchanged. @@ -108,13 +108,13 @@ public: hwDefTex[1].Delete(); hwTex_Translated.Clear(); } - + IHardwareTexture * GetHardwareTexture(int translation, int scaleflags) { auto tt = GetTexID(translation, scaleflags); return tt->hwTexture; } - + void AddHardwareTexture(int translation, int scaleflags, IHardwareTexture *tex) { auto tt = GetTexID(translation, scaleflags); @@ -170,6 +170,6 @@ public: for (auto & t : hwTex_Translated) if (t.hwTexture) callback(t.hwTexture); } - + }; diff --git a/source/common/textures/image.cpp b/source/common/textures/image.cpp index df48a79f1..f8f480671 100644 --- a/source/common/textures/image.cpp +++ b/source/common/textures/image.cpp @@ -195,13 +195,13 @@ int FImageSource::CopyTranslatedPixels(FBitmap *bmp, const PalEntry *remap) FBitmap FImageSource::GetCachedBitmap(const PalEntry *remap, int conversion, int *ptrans) { FBitmap ret; - + FString name; int trans = -1; fileSystem.GetFileShortName(name, SourceLump); - + auto imageID = ImageID; - + if (remap != nullptr) { // Remapped images are never run through the cache because they would complicate matters too much for very little gain. @@ -218,7 +218,7 @@ FBitmap FImageSource::GetCachedBitmap(const PalEntry *remap, int conversion, int if (index < precacheDataRgba.Size()) { auto cache = &precacheDataRgba[index]; - + trans = cache->TransInfo; if (cache->RefCount > 1) { @@ -256,7 +256,7 @@ FBitmap FImageSource::GetCachedBitmap(const PalEntry *remap, int conversion, int //Printf("creating cached entry for %s, refcount = %d\n", name.GetChars(), info->first); // This is the first time it gets accessed and needs to be placed in the cache. PrecacheDataRgba *pdr = &precacheDataRgba[precacheDataRgba.Reserve(1)]; - + pdr->ImageID = imageID; pdr->RefCount = info->first - 1; info->first = 0; diff --git a/source/common/textures/image.h b/source/common/textures/image.h index 6ddd34bc2..0924fe97e 100644 --- a/source/common/textures/image.h +++ b/source/common/textures/image.h @@ -77,7 +77,7 @@ public: int8_t bTranslucent = -1; // Image has pixels with a non-0/1 value. (-1 means the user needs to do a real check) int GetId() const { return ImageID; } - + // 'noremap0' will only be looked at by FPatchTexture and forwarded by FMultipatchTexture. // Either returns a reference to the cache, or a newly created item. The return of this has to be considered transient. If you need to store the result, use GetPalettedPixels @@ -86,7 +86,7 @@ public: // tries to get a buffer from the cache. If not available, create a new one. If further references are pending, create a copy. TArray GetPalettedPixels(int conversion); - + // Unlile for paletted images there is no variant here that returns a persistent bitmap, because all users have to process the returned image into another format. FBitmap GetCachedBitmap(const PalEntry *remap, int conversion, int *trans = nullptr); @@ -102,25 +102,25 @@ public: luminance = 1, noremap0 = 2 }; - + FImageSource(int sourcelump = -1) : SourceLump(sourcelump) { ImageID = ++NextID; } virtual ~FImageSource() {} - + int GetWidth() const { return Width; } - + int GetHeight() const { return Height; } - + std::pair GetSize() const { return std::make_pair(Width, Height); } - + std::pair GetOffsets() const { return std::make_pair(LeftOffset, TopOffset); @@ -131,12 +131,12 @@ public: LeftOffset = x; TopOffset = y; } - + int LumpNum() const { return SourceLump; } - + bool UseGamePalette() const { return bUseGamePalette; diff --git a/source/common/textures/imagehelpers.h b/source/common/textures/imagehelpers.h index 8923f92db..a25187ef2 100644 --- a/source/common/textures/imagehelpers.h +++ b/source/common/textures/imagehelpers.h @@ -58,7 +58,7 @@ namespace ImageHelpers return srcisgrayscale ? GPalette.GrayMap : GPalette.Remap; } } - + inline uint8_t RGBToPalettePrecise(bool wantluminance, int r, int g, int b, int a = 255) { if (wantluminance) @@ -70,7 +70,7 @@ namespace ImageHelpers return ColorMatcher.Pick(r, g, b); } } - + inline uint8_t RGBToPalette(bool wantluminance, int r, int g, int b, int a = 255) { if (wantluminance) @@ -83,19 +83,19 @@ namespace ImageHelpers return a < 128? 0 : RGB256k.RGB[r >> 2][g >> 2][b >> 2]; } } - + inline uint8_t RGBToPalette(bool wantluminance, PalEntry pe, bool hasalpha = true) { return RGBToPalette(wantluminance, pe.r, pe.g, pe.b, hasalpha? pe.a : 255); } - + //========================================================================== // // Converts a texture between row-major and column-major format // by flipping it about the X=Y axis. // //========================================================================== - + template void FlipSquareBlock (T *block, int x) { @@ -109,7 +109,7 @@ namespace ImageHelpers } } } - + inline void FlipSquareBlockRemap (uint8_t *block, int x, const uint8_t *remap) { for (int i = 0; i < x; ++i) @@ -124,7 +124,7 @@ namespace ImageHelpers } } } - + template void FlipNonSquareBlock (T *dst, const T *src, int x, int y, int srcpitch) { @@ -136,7 +136,7 @@ namespace ImageHelpers } } } - + inline void FlipNonSquareBlockRemap (uint8_t *dst, const uint8_t *src, int x, int y, int srcpitch, const uint8_t *remap) { for (int i = 0; i < x; ++i) diff --git a/source/common/textures/multipatchtexturebuilder.cpp b/source/common/textures/multipatchtexturebuilder.cpp index f7684c6ce..2a8b77fea 100644 --- a/source/common/textures/multipatchtexturebuilder.cpp +++ b/source/common/textures/multipatchtexturebuilder.cpp @@ -612,7 +612,7 @@ void FMultipatchTextureBuilder::ParseTexture(FScanner &sc, ETextureType UseType, BuildInfo &buildinfo = BuiltTextures[BuiltTextures.Reserve(1)]; bool bSilent = false; - + buildinfo.textual = true; sc.SetCMode(true); sc.MustGetString(); diff --git a/source/common/textures/texture.cpp b/source/common/textures/texture.cpp index 5b88c3cef..db922a7b5 100644 --- a/source/common/textures/texture.cpp +++ b/source/common/textures/texture.cpp @@ -97,7 +97,7 @@ FBitmap FTexture::GetBgraBitmap(const PalEntry* remap, int* ptrans) int FTexture::CheckRealHeight() { auto pixels = Get8BitPixels(false); - + for(int h = GetHeight()-1; h>= 0; h--) { for(int w = 0; w < GetWidth(); w++) diff --git a/source/common/textures/texturemanager.cpp b/source/common/textures/texturemanager.cpp index 5d49c7a9a..c7b5fad3d 100644 --- a/source/common/textures/texturemanager.cpp +++ b/source/common/textures/texturemanager.cpp @@ -235,7 +235,7 @@ FTextureID FTextureManager::CheckForTexture (const char *name, ETextureType uset } } - + if (!(flags & TEXMAN_ShortNameOnly)) { // We intentionally only look for textures in subdirectories. @@ -376,18 +376,18 @@ bool FTextureManager::OkForLocalization(FTextureID texnum, const char *substitut if (*substitute == '$') substitute = GStrings.GetString(substitute+1, &langtable); else return true; // String literals from the source data should never override graphics from the same definition. if (substitute == nullptr) return true; // The text does not exist. - + // Modes 2, 3 and 4 must not replace localized textures. int localizedTex = ResolveLocalizedTexture(texnum.GetIndex()); if (localizedTex != texnum.GetIndex()) return true; // Do not substitute a localized variant of the graphics patch. - + // For mode 4 we are done now. if (locmode == 4) return false; - + // Mode 2 and 3 must reject any text replacement from the default language tables. if ((langtable & MAKE_ID(255,0,0,0)) == MAKE_ID('*', 0, 0, 0)) return true; // Do not substitute if the string comes from the default table. if (locmode == 2) return false; - + // Mode 3 must also reject substitutions for non-IWAD content. int file = fileSystem.GetFileContainer(Textures[texnum.GetIndex()].Texture->GetSourceLump()); if (file > fileSystem.GetMaxIwadNum()) return true; @@ -771,7 +771,7 @@ void FTextureManager::ParseTextureDef(int lump, FMultipatchTextureBuilder &build else if (sc.Compare("define")) // define a new "fake" texture { sc.GetString(); - + FString base = ExtractFileBase(sc.String, false); if (!base.IsEmpty()) { @@ -1402,7 +1402,7 @@ int FTextureManager::ResolveLocalizedTexture(int tex) int FTextureManager::GuesstimateNumTextures () { int numtex = 0; - + for(int i = fileSystem.GetNumEntries()-1; i>=0; i--) { int space = fileSystem.GetFileNamespace(i); diff --git a/source/common/textures/texturemanager.h b/source/common/textures/texturemanager.h index 076ee1769..54d4aa8b8 100644 --- a/source/common/textures/texturemanager.h +++ b/source/common/textures/texturemanager.h @@ -21,7 +21,7 @@ class FTextureManager public: FTextureManager (); ~FTextureManager (); - + private: int ResolveLocalizedTexture(int texnum); @@ -57,7 +57,7 @@ public: { return InternalGetTexture(texnum.GetIndex(), animate, true); } - + FGameTexture* GetPalettedTexture(FTextureID texnum, bool animate = false, bool allowsubstitute = true) { auto texid = ResolveTextureIndex(texnum.GetIndex(), animate, true); @@ -171,7 +171,7 @@ public: private: void InitPalettedVersions(); - + // Switches struct TextureHash diff --git a/source/common/textures/textures.h b/source/common/textures/textures.h index a24dba5fa..ffb79c3e2 100644 --- a/source/common/textures/textures.h +++ b/source/common/textures/textures.h @@ -249,10 +249,10 @@ public: int GetWidth() { return Width; } int GetHeight() { return Height; } - + bool isHardwareCanvas() const { return bHasCanvas; } // There's two here so that this can deal with software canvases in the hardware renderer later. bool isCanvas() const { return bHasCanvas; } - + int GetSourceLump() { return SourceLump; } // needed by the scripted GetName method. void SetSourceLump(int sl) { SourceLump = sl; } bool FindHoles(const unsigned char * buffer, int w, int h); diff --git a/source/common/utility/cmdlib.cpp b/source/common/utility/cmdlib.cpp index e47610cf6..0dd6f7750 100644 --- a/source/common/utility/cmdlib.cpp +++ b/source/common/utility/cmdlib.cpp @@ -557,7 +557,7 @@ void CreatePath(const char *fn) void CreatePath(const char *fn) { char *copy, *p; - + if (fn[0] == '/' && fn[1] == '\0') { return; diff --git a/source/common/utility/colormatcher.h b/source/common/utility/colormatcher.h index 6ec20879a..277505e81 100644 --- a/source/common/utility/colormatcher.h +++ b/source/common/utility/colormatcher.h @@ -58,7 +58,7 @@ public: return (uint8_t)BestColor ((uint32_t *)Pal, r, g, b, startindex, 255, indexmap); } - + uint8_t Pick (PalEntry pe) { return Pick(pe.r, pe.g, pe.b); diff --git a/source/common/utility/files_decompress.cpp b/source/common/utility/files_decompress.cpp index 7d7d65442..cd2e36ed7 100644 --- a/source/common/utility/files_decompress.cpp +++ b/source/common/utility/files_decompress.cpp @@ -107,7 +107,7 @@ class DecompressorZ : public DecompressorBase bool SawEOF; z_stream Stream; uint8_t InBuff[BUFF_SIZE]; - + public: DecompressorZ (FileReader *file, bool zip, const std::function& cb) : SawEOF(false) @@ -198,7 +198,7 @@ class DecompressorBZ2 : public DecompressorBase bool SawEOF; bz_stream Stream; uint8_t InBuff[BUFF_SIZE]; - + public: DecompressorBZ2 (FileReader *file, const std::function& cb) : SawEOF(false) @@ -627,7 +627,7 @@ bool FileReader::OpenDecompressor(FileReader &parent, Size length, int method, b case METHOD_LZSS: dec = new DecompressorLZSS(p, cb); break; - + // todo: METHOD_IMPLODE, METHOD_SHRINK default: return false; diff --git a/source/common/utility/findfile.cpp b/source/common/utility/findfile.cpp index 6006a34a1..bdfa865a8 100644 --- a/source/common/utility/findfile.cpp +++ b/source/common/utility/findfile.cpp @@ -128,7 +128,7 @@ int I_FindAttr(findstate_t *const fileinfo) } #else - + #include #include diff --git a/source/common/utility/findfile.h b/source/common/utility/findfile.h index 895bbde69..44bee1a35 100644 --- a/source/common/utility/findfile.h +++ b/source/common/utility/findfile.h @@ -43,7 +43,7 @@ inline const char *I_FindName(findstate_t *fileinfo) #else - + // Mirror WIN32_FIND_DATAW in struct findstate_t diff --git a/source/common/utility/matrix.cpp b/source/common/utility/matrix.cpp index 006a5fe5d..476d09b60 100644 --- a/source/common/utility/matrix.cpp +++ b/source/common/utility/matrix.cpp @@ -58,7 +58,7 @@ VSMatrix::loadIdentity() void VSMatrix::multMatrix(const FLOATTYPE *aMatrix) { - + FLOATTYPE res[16]; for (int i = 0; i < 4; ++i) @@ -164,19 +164,19 @@ VSMatrix::rotate(FLOATTYPE angle, FLOATTYPE x, FLOATTYPE y, FLOATTYPE z) mat[4] = v[0] * v[1] * (1 - co) - v[2] * si; mat[8] = v[0] * v[2] * (1 - co) + v[1] * si; mat[12]= 0.0f; - + mat[1] = v[0] * v[1] * (1 - co) + v[2] * si; // mat[5] = y2 + (x2 + z2) * co; mat[5] = co + y2 * (1 - co); mat[9] = v[1] * v[2] * (1 - co) - v[0] * si; mat[13]= 0.0f; - + mat[2] = v[0] * v[2] * (1 - co) - v[1] * si; mat[6] = v[1] * v[2] * (1 - co) + v[0] * si; // mat[10]= z2 + (x2 + y2) * co; mat[10]= co + z2 * (1 - co); mat[14]= 0.0f; - + mat[3] = 0.0f; mat[7] = 0.0f; mat[11]= 0.0f; @@ -323,9 +323,9 @@ VSMatrix::multMatrixPoint(const FLOATTYPE *point, FLOATTYPE *res) { res[i] = 0.0f; - + for (int j = 0; j < 4; j++) { - + res[i] += point[j] * mMatrix[j*4 + i]; } } @@ -444,7 +444,7 @@ VSMatrix::computeNormalMatrix(const FLOATTYPE *aMatrix) void VSMatrix::multMatrix(FLOATTYPE *resMat, const FLOATTYPE *aMatrix) { - + FLOATTYPE res[16]; for (int i = 0; i < 4; ++i) diff --git a/source/common/utility/matrix.h b/source/common/utility/matrix.h index 81d7be6f2..c1c7c873c 100644 --- a/source/common/utility/matrix.h +++ b/source/common/utility/matrix.h @@ -34,7 +34,7 @@ class VSMatrix { public: VSMatrix() = default; - + VSMatrix(int) { loadIdentity(); @@ -135,11 +135,11 @@ public: m[0][0] *=x; m[1][0] *=x; m[2][0] *=x; - + m[0][1] *=y; m[1][1] *=y; m[2][1] *=y; - + m[0][2] *=z; m[1][2] *=z; m[2][2] *=z; diff --git a/source/common/utility/r_memory.cpp b/source/common/utility/r_memory.cpp index 383cdbeb4..8ff821c38 100644 --- a/source/common/utility/r_memory.cpp +++ b/source/common/utility/r_memory.cpp @@ -28,7 +28,7 @@ void *RenderMemory::AllocBytes(int size) { size = (size + 15) / 16 * 16; // 16-byte align - + if (UsedBlocks.empty() || UsedBlocks.back()->Position + size > BlockSize) { if (!FreeBlocks.empty()) @@ -43,14 +43,14 @@ void *RenderMemory::AllocBytes(int size) UsedBlocks.push_back(std::unique_ptr(new MemoryBlock())); } } - + auto &block = UsedBlocks.back(); void *data = block->Data + block->Position; block->Position += size; return data; } - + void RenderMemory::Clear() { while (!UsedBlocks.empty()) diff --git a/source/common/utility/r_memory.h b/source/common/utility/r_memory.h index 8007b6cc1..d9db538ca 100644 --- a/source/common/utility/r_memory.h +++ b/source/common/utility/r_memory.h @@ -8,33 +8,33 @@ class RenderMemory { public: void Clear(); - + template T *AllocMemory(int size = 1) { return (T*)AllocBytes(sizeof(T) * size); } - + template T *NewObject(Types &&... args) { void *ptr = AllocBytes(sizeof(T)); return new (ptr)T(std::forward(args)...); } - + private: void *AllocBytes(int size); - + enum { BlockSize = 1024 * 1024 }; - + struct MemoryBlock { MemoryBlock(); ~MemoryBlock(); - + MemoryBlock(const MemoryBlock &) = delete; MemoryBlock &operator=(const MemoryBlock &) = delete; - + uint8_t *Data; uint32_t Position; }; diff --git a/source/common/utility/refcounted.h b/source/common/utility/refcounted.h index 81ea3fc6d..f8643f080 100644 --- a/source/common/utility/refcounted.h +++ b/source/common/utility/refcounted.h @@ -26,7 +26,7 @@ public: RefCountedPtr() : ptr(nullptr) {} - + explicit RefCountedPtr(T* p) : ptr(p) { if (ptr) ptr->IncRef(); @@ -52,7 +52,7 @@ public: } return *this; } - + RefCountedPtr& operator=(T* r) { if (ptr != r) @@ -99,18 +99,18 @@ public: { return *ptr; } - + T* operator-> () const { return ptr; } - + T* get() const { return ptr; } - + private: - + T * ptr; }; \ No newline at end of file diff --git a/source/common/utility/tarray.h b/source/common/utility/tarray.h index 4a2285ca3..a8742a96b 100644 --- a/source/common/utility/tarray.h +++ b/source/common/utility/tarray.h @@ -165,7 +165,7 @@ public: { return &Array[Count]; } - + reverse_iterator rbegin() { return reverse_iterator(end()); @@ -919,7 +919,7 @@ public: LastFree = o.LastFree; /* any free position is before this position */ Size = o.Size; /* must be a power of 2 */ NumUsed = o.NumUsed; - + o.Size = 0; o.NumUsed = 0; o.SetNodeVector(1); diff --git a/source/common/utility/utf8.cpp b/source/common/utility/utf8.cpp index f8e7119d4..5ca3506ef 100644 --- a/source/common/utility/utf8.cpp +++ b/source/common/utility/utf8.cpp @@ -124,7 +124,7 @@ int utf8_decode(const uint8_t *src, int *size) } return -1; } - + int c3 = src[3]; if (c3 < 0x80 || c1 >= 0xc0) return -1; c3 &= 0x3f; @@ -200,7 +200,7 @@ int GetCharFromString(const uint8_t *&string) if (z < 192) { string++; - + // Handle Windows 1252 characters if (z >= 128 && z < 160) { @@ -353,7 +353,7 @@ int getAlternative(int code) { default: return code; - + case '{': return '('; case '}': return ')'; case 0x17f: return 's'; // The 'long s' can be safely remapped to the regular variant, not that this gets used in any real text... diff --git a/source/common/utility/x86.cpp b/source/common/utility/x86.cpp index 3312ff043..76e880834 100644 --- a/source/common/utility/x86.cpp +++ b/source/common/utility/x86.cpp @@ -164,7 +164,7 @@ void CheckCPUID(CPUInfo *cpu) FString DumpCPUInfo(const CPUInfo *cpu) { char cpustring[4*4*3+1]; - + // Why does Intel right-justify this string (on P4s) // or add extra spaces (on Cores)? const char *f = cpu->CPUString; diff --git a/source/core/binaryangle.h b/source/core/binaryangle.h index 147f434e5..adb863a13 100644 --- a/source/core/binaryangle.h +++ b/source/core/binaryangle.h @@ -112,9 +112,9 @@ inline double bcosf(const double ang, const int shift = 0) class binangle { uint32_t value; - + constexpr binangle(uint32_t v) : value(v) {} - + friend constexpr binangle bamang(uint32_t v); friend constexpr binangle q16ang(uint32_t v); friend constexpr binangle buildang(uint32_t v); @@ -125,7 +125,7 @@ class binangle friend FSerializer &Serialize(FSerializer &arc, const char *key, binangle &obj, binangle *defval); constexpr int32_t tosigned() const { return value > INT32_MAX ? int64_t(value) - UINT32_MAX : value; } - + public: binangle() = default; binangle(const binangle &other) = default; @@ -143,7 +143,7 @@ public: constexpr int32_t signedbam() const { return tosigned(); } constexpr double signedrad() const { return tosigned() * (pi::pi() / 0x80000000u); } constexpr double signeddeg() const { return AngleToFloat(tosigned()); } - + double fsin() const { return g_sin(asrad()); } double fcos() const { return g_cos(asrad()); } double ftan() const { return g_tan(asrad()); } @@ -240,9 +240,9 @@ inline constexpr double BAMToPitch(int32_t bam) { return bam * (90. / 0x80000000 class fixedhoriz { fixed_t value; - + constexpr fixedhoriz(fixed_t v) : value(v) {} - + friend constexpr fixedhoriz q16horiz(fixed_t v); friend constexpr fixedhoriz buildhoriz(int v); friend fixedhoriz buildfhoriz(double v); @@ -250,7 +250,7 @@ class fixedhoriz friend fixedhoriz bamhoriz(int32_t v); friend FSerializer &Serialize(FSerializer &arc, const char *key, fixedhoriz &obj, fixedhoriz *defval); - + public: fixedhoriz() = default; fixedhoriz(const fixedhoriz &other) = default; @@ -261,7 +261,7 @@ public: constexpr fixed_t asq16() const { return value; } double aspitch() const { return HorizToPitch(value); } int32_t asbam() const { return PitchToBAM(aspitch()); } - + bool operator< (fixedhoriz other) const { return value < other.value; @@ -302,7 +302,7 @@ public: value -= other.value; return *this; } - + constexpr fixedhoriz operator- () const { return fixedhoriz(-value); diff --git a/source/core/console/d_event.cpp b/source/core/console/d_event.cpp index 35cabc841..6dbf5e267 100644 --- a/source/core/console/d_event.cpp +++ b/source/core/console/d_event.cpp @@ -65,7 +65,7 @@ bool G_Responder (event_t *ev) return true; if (gamestate == GS_LEVEL && automapMode != am_off && AM_Responder(ev, false)) return true; - + switch (ev->type) { case EV_KeyDown: diff --git a/source/core/ct_chat.cpp b/source/core/ct_chat.cpp index 663754c9e..1c8be7d9d 100644 --- a/source/core/ct_chat.cpp +++ b/source/core/ct_chat.cpp @@ -232,7 +232,7 @@ void CT_Drawer (void) int scale = active_con_scale(drawer); int screen_width = twod->GetWidth() / scale; int screen_height= twod->GetHeight() / scale; - + y = screen_height - displayfont->GetHeight()-2; auto res = gi->GetReservedScreenSpace(hud_size); diff --git a/source/core/d_net.cpp b/source/core/d_net.cpp index 0171a234a..d05100d31 100644 --- a/source/core/d_net.cpp +++ b/source/core/d_net.cpp @@ -421,14 +421,14 @@ int ExpandTics (int low) int mt = maketic / ticdup; delta = low - (mt&0xff); - + if (delta >= -64 && delta <= 64) return (mt&~0xff) + low; if (delta > 64) return (mt&~0xff) - 256 + low; if (delta < -64) return (mt&~0xff) + 256 + low; - + I_Error ("ExpandTics: strange value %i at maketic %i", low, maketic); return 0; } @@ -480,7 +480,7 @@ void HSendPacket (int node, int len) node, ExpandTics(netbuffer[1]), numtics, realretrans, len); - + for (i = 0; i < len; i++) fprintf (debugfile, "%c%2x", i==k?'|':' ', ((uint8_t *)netbuffer)[i]); } @@ -583,7 +583,7 @@ bool HGetPacket (void) InBuffer.Push(store); doomcom.remotenode = -1; } - + if (doomcom.remotenode == -1) { bool gotmessage = false; @@ -606,7 +606,7 @@ bool HGetPacket (void) return false; } #endif - + if (debugfile) { int i, k, realretrans; @@ -648,7 +648,7 @@ bool HGetPacket (void) doomcom.remotenode, ExpandTics(netbuffer[1]), numtics, realretrans, doomcom.datalength); - + for (i = 0; i < doomcom.datalength; i++) fprintf (debugfile, "%c%2x", i==k?'|':' ', ((uint8_t *)netbuffer)[i]); if (numtics) @@ -769,7 +769,7 @@ void GetPackets (void) int k; uint8_t playerbytes[MAXNETNODES]; int numplayers; - + while ( HGetPacket() ) { if (netbuffer[0] & NCMD_SETUP) @@ -782,7 +782,7 @@ void GetPackets (void) } continue; // extra setup packet } - + netnode = doomcom.remotenode; netconsole = playerfornode[netnode] & ~PL_DRONE; @@ -877,9 +877,9 @@ void GetPackets (void) // Figure out what the rest of the bytes are realstart = ExpandTics (netbuffer[1]); realend = (realstart + numtics); - + nodeforplayer[netconsole] = netnode; - + // check for retransmit request if (resendcount[netnode] <= 0 && (netbuffer[0] & NCMD_RETRANSMIT)) { @@ -892,11 +892,11 @@ void GetPackets (void) { resendcount[netnode]--; } - + // check for out of order / duplicated packet if (realend == nettics[netnode]) continue; - + if (realend < nettics[netnode]) { if (debugfile) @@ -904,7 +904,7 @@ void GetPackets (void) realstart, numtics); continue; } - + // check for a missed packet if (realstart > nettics[netnode]) { @@ -991,7 +991,7 @@ void NetUpdate (void) D_ProcessEvents (); if (pauseext || (maketic - gametic) / ticdup >= BACKUPTICS/2-1) break; // can't hold any more - + //Printf ("mk:%i ",maketic); G_BuildTiccmd (&localcmds[maketic % LOCALCMDTICS]); maketic++; @@ -1346,7 +1346,7 @@ void NetUpdate (void) totalavg = lastaverage; } } - + mastertics = nettics[nodeforplayer[Net_Arbitrator]] + totalavg; } if (nettics[0] <= mastertics) @@ -1766,7 +1766,7 @@ bool D_CheckNetGame (void) if (!batchrun) Printf (PRINT_NONOTIFY, "player %i of %i (%i nodes)\n", myconnectindex+1, doomcom.numplayers, doomcom.numnodes); - + return true; } diff --git a/source/core/d_protocol.cpp b/source/core/d_protocol.cpp index 1938c2fd0..83e72b9bd 100644 --- a/source/core/d_protocol.cpp +++ b/source/core/d_protocol.cpp @@ -408,7 +408,7 @@ void StartChunk (int id, uint8_t **stream) void FinishChunk (uint8_t **stream) { int len; - + if (!lenspot) return; diff --git a/source/core/defparser.cpp b/source/core/defparser.cpp index cd66851c1..a32d9a1af 100644 --- a/source/core/defparser.cpp +++ b/source/core/defparser.cpp @@ -675,7 +675,7 @@ void parseVoxel(FScanner& sc, FScriptPosition& pos) } int lastvoxid = nextvoxid++; - + if (sc.StartBraces(&blockend)) return; while (!sc.FoundEndBrace(blockend)) { @@ -723,7 +723,7 @@ void parseDefineTint(FScanner& sc, FScriptPosition& pos) if (!sc.GetNumber(f)) return; lookups.setPaletteTint(pal, r, g, b, 0, 0, 0, f); } - + //=========================================================================== // // diff --git a/source/core/g_mapinfo.cpp b/source/core/g_mapinfo.cpp index ae57adbe1..bb459038c 100644 --- a/source/core/g_mapinfo.cpp +++ b/source/core/g_mapinfo.cpp @@ -832,10 +832,10 @@ void FMapInfoParser::ParseMapDefinition(MapRecord &info) success = true; return false; // break } - + return true; // continue }); - + if (!success) { if (!ParseCloseBrace()) @@ -1158,7 +1158,7 @@ void SetLevelNum (MapRecord *info, int num) { for (auto& map : mapList) { - + if (map->levelNumber == num) map->levelNumber = 0; } diff --git a/source/core/gameconfigfile.cpp b/source/core/gameconfigfile.cpp index 59b6af2d0..68e63b9c9 100644 --- a/source/core/gameconfigfile.cpp +++ b/source/core/gameconfigfile.cpp @@ -298,7 +298,7 @@ void FGameConfigFile::DoGameSetup (const char *gamename) sublen = countof(section) - 1 - mysnprintf (section, countof(section), "%s.", gamename); subsection = section + countof(section) - sublen - 1; section[countof(section) - 1] = '\0'; - + strncpy (subsection, "UnknownConsoleVariables", sublen); if (SetSection (section)) { diff --git a/source/core/gamecontrol.cpp b/source/core/gamecontrol.cpp index 33e4d0cab..7a29da602 100644 --- a/source/core/gamecontrol.cpp +++ b/source/core/gamecontrol.cpp @@ -242,7 +242,7 @@ static IntRect System_GetSceneRect() int viewwidth = viewright - windowxy1.X; int renderheight; - + if (viewheight == screen->GetHeight()) renderheight = viewheight; else renderheight = (viewwidth * screen->GetHeight() / screen->GetWidth()) & ~7; @@ -632,7 +632,7 @@ void SetDefaultStrings() gSkillNames[3] = "$WELL DONE"; gSkillNames[4] = "$EXTRA CRISPY"; } - + //Set a few quotes which are used for common handling of a few status messages quoteMgr.InitializeQuote(23, "$MESSAGES: ON"); quoteMgr.InitializeQuote(24, "$MESSAGES: OFF"); @@ -1016,7 +1016,7 @@ int RunGame() TileFiles.AddArt(addArt); inputState.ClearAllInput(); - + if (!GameConfig->IsInitialized()) { CONFIG_ReadCombatMacros(); @@ -1343,7 +1343,7 @@ CCMD(taunt) { int taunt = atoi(argv[1]); int mode = atoi(argv[2]); - + // In a ZDoom-style protocol this should be sent: // Net_WriteByte(DEM_TAUNT); // Net_WriteByte(taunt); diff --git a/source/core/gamefuncs.h b/source/core/gamefuncs.h index f2235178a..7c3c327c9 100644 --- a/source/core/gamefuncs.h +++ b/source/core/gamefuncs.h @@ -14,7 +14,7 @@ class BFSSearch unsigned bitpos; unsigned startpos; unsigned curpos; - + public: enum { EOL = ~0u }; BFSSearch(unsigned datasize, unsigned startnode) @@ -23,7 +23,7 @@ public: unsigned bitsize = (datasize + 31) >> 5; store.Reserve(bitsize); memset(&store[bitpos], 0, bitsize*4); - + startpos = store.Size(); curpos = startpos; Set(startnode); @@ -39,12 +39,12 @@ public: store.Reserve(bitsize); memset(&store[bitpos], 0, bitsize * 4); } - + ~BFSSearch() { store.Clamp(bitpos); } - + bool Check(unsigned index) const { return !!(store[bitpos + (index >> 5)] & (1 << (index & 31))); @@ -71,7 +71,7 @@ public: { curpos = startpos; } - + void Add(unsigned elem) { if (!Check(elem)) @@ -85,7 +85,7 @@ public: class BFSSectorSearch : public BFSSearch { public: - + BFSSectorSearch(const sectortype* startnode) : BFSSearch(sector.Size(), sector.IndexOf(startnode)) { } @@ -367,7 +367,7 @@ inline double SquareDistToWall(double px, double py, const walltype* wal, DVecto double ly1 = wal->pos.Y; double lx2 = wal->point2Wall()->pos.X; double ly2 = wal->point2Wall()->pos.Y; - + double wall_length = SquareDist(lx1, ly1, lx2, ly2); if (wall_length == 0) return SquareDist(px, py, lx1, ly1); diff --git a/source/core/initfs.cpp b/source/core/initfs.cpp index 7b653ad38..b6c90d107 100644 --- a/source/core/initfs.cpp +++ b/source/core/initfs.cpp @@ -353,7 +353,7 @@ void InitFileSystem(TArray& groups) D_AddConfigFiles(Files, file, "*.grp", GameConfig); lastpos += len + 1; } - + if (!insertdirectoriesafter && userConfig.AddFilesPre) for (auto& file : *userConfig.AddFilesPre) { D_AddFile(Files, file, true, -1, GameConfig); diff --git a/source/core/interpolate.cpp b/source/core/interpolate.cpp index 89fda3037..9548adc24 100644 --- a/source/core/interpolate.cpp +++ b/source/core/interpolate.cpp @@ -71,7 +71,7 @@ void Set(int index, int type, double val) case Interp_Sect_FloorPanY: sector[index].floorypan_ = float(val); break; case Interp_Sect_CeilingPanX: sector[index].ceilingxpan_ = float(val); break; case Interp_Sect_CeilingPanY: sector[index].ceilingypan_ = float(val); break; - + case Interp_Wall_X: old = wall[index].pos.X; wall[index].pos.X = xs_CRoundToInt(val); if (wall[index].pos.X != old) wall[index].moved(); break; case Interp_Wall_Y: old = wall[index].pos.Y; wall[index].pos.Y = xs_CRoundToInt(val); if (wall[index].pos.Y != old) wall[index].moved(); break; case Interp_Wall_PanX: wall[index].xpan_ = float(val); break; diff --git a/source/core/interpolate.h b/source/core/interpolate.h index 5b8346fe9..35b28b973 100644 --- a/source/core/interpolate.h +++ b/source/core/interpolate.h @@ -9,10 +9,10 @@ enum EInterpolationType Interp_Sect_Ceilingz, Interp_Sect_Floorheinum, Interp_Sect_Ceilingheinum, - + Interp_Wall_X, Interp_Wall_Y, - + Interp_Pan_First, // order of the following 4 flags must match the corresponding sector flags. Interp_Sect_FloorPanX = Interp_Pan_First, diff --git a/source/core/mainloop.cpp b/source/core/mainloop.cpp index 6e198ef25..35abb5499 100644 --- a/source/core/mainloop.cpp +++ b/source/core/mainloop.cpp @@ -557,7 +557,7 @@ void TryRunTics (void) counts = realtics; else counts = availabletics; - + // Uncapped framerate needs seprate checks if (counts == 0 && !doWait) { diff --git a/source/core/mapinfo.h b/source/core/mapinfo.h index b165d7e7d..8ec6fc4e2 100644 --- a/source/core/mapinfo.h +++ b/source/core/mapinfo.h @@ -152,7 +152,7 @@ struct MapRecord int ex_ramses_cdtrack = -1; // this is not music, it is the actual dialogue! FString ex_ramses_pup; FString ex_ramses_text; - + const char* LabelName() const { if (flags & MI_USERMAP) return GStrings("MNU_USERMAP"); @@ -181,7 +181,7 @@ struct MapRecord if (num < 0 || num>= MAX_MESSAGES) return ""; return GStrings(messages[num]); } - + void AddMessage(int num, const FString &msg) { messages[num] = msg; diff --git a/source/core/maptypes.h b/source/core/maptypes.h index c695b069b..ad50fb82f 100644 --- a/source/core/maptypes.h +++ b/source/core/maptypes.h @@ -137,7 +137,7 @@ enum ESpriteBits // names mostly from SW. CSTAT_SPRITE_ALIGNMENT_SLAB = 48, // 11 = either voxel or slope sprite, depending on the situation CSTAT_SPRITE_ALIGNMENT_SLOPE = 48, CSTAT_SPRITE_ALIGNMENT_MASK = 48, - + CSTAT_SPRITE_ONE_SIDE = 64, // bit 6: 1 = 1-sided sprite, 0 = normal "1" CSTAT_SPRITE_YCENTER = 128, // bit 7: 1 = Real centered centering, 0 = foot center "C" CSTAT_SPRITE_BLOCK_HITSCAN = 256, // bit 8: 1 = Blocking sprite (use with hitscan / cliptype 1) "H" @@ -202,7 +202,7 @@ struct sectortype // Fields were reordered by size, some also enlarged. DCoreActor* firstEntry, * lastEntry; - + int32_t wallptr; #ifdef SECTOR_HACKJOB // Debug hack job for finding all places where ceilingz and floorz get written to. @@ -233,7 +233,7 @@ struct sectortype #endif - + // panning byte fields were promoted to full floats to enable panning interpolation. float ceilingxpan_; float ceilingypan_; @@ -250,7 +250,7 @@ struct sectortype union { int16_t lotag, type; }; // type is for Blood. int16_t hitag; int16_t extra; - + int8_t ceilingshade; uint8_t ceilingpal; int8_t floorshade; @@ -348,32 +348,32 @@ struct sectortype struct walltype { vec2_t pos; - + int32_t point2; int32_t nextwall; int32_t sector; // Build never had this... int32_t nextsector; - + // Again, panning fields extended for interpolation. float xpan_; float ypan_; - + EWallFlags cstat; int16_t picnum; int16_t overpicnum; union { int16_t lotag, type; }; // type is for Blood int16_t hitag; int16_t extra; - + int8_t shade; uint8_t pal; uint8_t xrepeat; uint8_t yrepeat; - + // extensions not from the binary map format. binangle clipangle; int length; // cached value to avoid calling sqrt repeatedly. - + uint16_t portalnum; uint8_t portalflags; uint8_t lengthflags; @@ -417,9 +417,9 @@ struct walltype struct spritetypebase { vec3_t pos, opos; - + sectortype* sectp; - + ESpriteFlags cstat; int16_t picnum; int16_t statnum; @@ -432,7 +432,7 @@ struct spritetypebase union { int16_t hitag, flags; }; int16_t extra; int16_t detail; - + int8_t shade; uint8_t pal; uint8_t clipdist; diff --git a/source/core/music/s_advsound.cpp b/source/core/music/s_advsound.cpp index d3f9b4506..4103bf4e0 100644 --- a/source/core/music/s_advsound.cpp +++ b/source/core/music/s_advsound.cpp @@ -173,7 +173,7 @@ static void S_AddSNDINFO (int lump) sc.MustGetString(); FName nm = sc.String; FScanner::SavedPos save = sc.SavePos(); - + sc.SetCMode(true); sc.MustGetString(); MidiDeviceSetting devset; diff --git a/source/core/ns.h b/source/core/ns.h index 78aa9e9b0..1ed368b41 100644 --- a/source/core/ns.h +++ b/source/core/ns.h @@ -19,7 +19,7 @@ #define END_PS_NS } #else - + #define BEGIN_DUKE_NS #define END_DUKE_NS diff --git a/source/core/packet.h b/source/core/packet.h index 162656b6a..55afc9f33 100644 --- a/source/core/packet.h +++ b/source/core/packet.h @@ -74,7 +74,7 @@ struct InputPacket float avel; float horz; ESyncBits actions; - + int getNewWeapon() const { diff --git a/source/core/palette.h b/source/core/palette.h index 68e1fe7e5..b7e173841 100644 --- a/source/core/palette.h +++ b/source/core/palette.h @@ -22,7 +22,7 @@ enum MAXBASEPALS = 256, MAXPALOOKUPS = 256, MAXBLENDTABS = 256, - + RESERVEDPALS = 4, // don't forget to increment this when adding reserved pals DETAILPAL = (MAXPALOOKUPS - 1), GLOWPAL = (MAXPALOOKUPS - 2), diff --git a/source/core/quotemgr.h b/source/core/quotemgr.h index b387cc9ec..31ec350c0 100644 --- a/source/core/quotemgr.h +++ b/source/core/quotemgr.h @@ -17,9 +17,9 @@ class FSerializer; class Quotes { FString quotes[MAXQUOTES]; - + void MakeStringLabel(FString "e); - + public: void InitializeQuote(int num, const char *text, bool fromscript = false); @@ -28,12 +28,12 @@ public: { return GStrings.localize(quotes[num]); } - + const char *GetRawQuote(int num) { return quotes[num]; } - + void CopyQuote(int dst, int src) { quotes[dst] = quotes[src]; diff --git a/source/core/raze_sound.cpp b/source/core/raze_sound.cpp index 173ef140e..4adaa2a53 100644 --- a/source/core/raze_sound.cpp +++ b/source/core/raze_sound.cpp @@ -98,7 +98,7 @@ FString NoiseDebug(SoundEngine *engine) int ch = 0; FString out; - + out.Format("*** SOUND DEBUG INFO ***\nListener: %3.2f %2.3f %2.3f\n" "x y z vol dist chan pri flags aud pos name\n", listener.X, listener.Y, listener.Z); diff --git a/source/core/rendering/hw_sections.cpp b/source/core/rendering/hw_sections.cpp index 515fca462..6c89606e8 100644 --- a/source/core/rendering/hw_sections.cpp +++ b/source/core/rendering/hw_sections.cpp @@ -217,7 +217,7 @@ static void CollectLoops(TArray& sectors) visited.Zero(); TArray thisloop; - + int count = 0; for (unsigned i = 0; i < sector.Size(); i++) { @@ -225,14 +225,14 @@ static void CollectLoops(TArray& sectors) int last = first + sector[i].wallnum; sectors.Reserve(1); sectors.Last().bugged = 0; - + for (int w = first; w < last; w++) { if (visited[w]) continue; thisloop.Clear(); thisloop.Push(w); visited.Set(w); - + for (int ww = wall[w].point2; ww != w; ww = wall[ww].point2) { if (ww < first || ww >= last) diff --git a/source/core/rendering/scene/hw_clipper.cpp b/source/core/rendering/scene/hw_clipper.cpp index 0c917cc32..edc27f11b 100644 --- a/source/core/rendering/scene/hw_clipper.cpp +++ b/source/core/rendering/scene/hw_clipper.cpp @@ -78,7 +78,7 @@ void Clipper::RemoveRange(ClipNode * range, bool free) if (range->prev) range->prev->next = range->next; if (range->next) range->next->prev = range->prev; } - + if (free) Free(range); ValidateList(); } @@ -188,14 +188,14 @@ void Clipper::Clear(binangle rangestart) { ClipNode *node = cliphead; ClipNode *temp; - + while (node != nullptr) { temp = node; node = node->next; Free(temp); } - + cliphead = nullptr; if (visibleStart.asbam() != 0 || visibleEnd.asbam() != 0) @@ -220,9 +220,9 @@ bool Clipper::IsRangeVisible(int startAngle, int endAngle) { ClipNode *ci; ci = cliphead; - + if (endAngle == 0 && ci && ci->start==0) return false; - + while (ci != nullptr && ci->start < endAngle) { if (startAngle >= ci->start && endAngle <= ci->end && ci->topclip <= ci->bottomclip) @@ -231,7 +231,7 @@ bool Clipper::IsRangeVisible(int startAngle, int endAngle) } ci = ci->next; } - + return true; } @@ -393,7 +393,7 @@ void Clipper::AddWindowRange(int start, int end, float topclip, float bottomclip // existing range is part of new one. // //----------------------------------------------------------------------------- - + if (node->start >= start && node->end <= end) { if (node->topclip > node->bottomclip) // shortcut the common case where the old node is already closed. @@ -438,7 +438,7 @@ void Clipper::AddWindowRange(int start, int end, float topclip, float bottomclip float mtopclip = topclip, mbottomclip = bottomclip; mergeClip(node, mtopclip, mbottomclip, viewz); - + // existing range is a more narrow window on both sides, we're done. if (mtopclip > mbottomclip && mtopclip >= node->topclip && mbottomclip <= node->bottomclip) { @@ -456,14 +456,14 @@ void Clipper::AddWindowRange(int start, int end, float topclip, float bottomclip node = node->next; } } - + // at this point we know that overlaps can only be at one side because all full overlaps have been resolved already. // so what follows can at most intersect two other nodes - one at the left and one at the right node = cliphead; while (node != nullptr && node->start <= end) { auto next = node->next; // get this before making any edits. - + //----------------------------------------------------------------------------- // // node overlaps the start of the new range @@ -561,7 +561,7 @@ void Clipper::AddWindowRange(int start, int end, float topclip, float bottomclip } node = next; } - + // cliphead *can* be null here if a sole existing older range got removed because this one covers it entirely. if (cliphead) { @@ -617,7 +617,7 @@ void Clipper::RemoveClipRange(int start, int end) node = node->next; } } - + //check to see if range overlaps a range (or possibly 2) node = cliphead; while (node != nullptr) diff --git a/source/core/rendering/scene/hw_clipper.h b/source/core/rendering/scene/hw_clipper.h index ea0defeb0..aed46dd16 100644 --- a/source/core/rendering/scene/hw_clipper.h +++ b/source/core/rendering/scene/hw_clipper.h @@ -11,7 +11,7 @@ class ClipNode { friend class Clipper; - + ClipNode *prev, *next; int start, end; float topclip, bottomclip; @@ -73,7 +73,7 @@ private: void ValidateList(); public: - + void SetVisibleRange(angle_t a1, angle_t a2) { if (a2 != 0xffffffff) diff --git a/source/core/rendering/scene/hw_drawinfo.h b/source/core/rendering/scene/hw_drawinfo.h index 8b0dcef6f..cff4fcc1d 100644 --- a/source/core/rendering/scene/hw_drawinfo.h +++ b/source/core/rendering/scene/hw_drawinfo.h @@ -123,7 +123,7 @@ private: void WorkerThread(); void UnclipSubsector(sectortype *sub); - + void AddLine(walltype *seg, bool portalclip); void AddLines(sectortype* sector); void AddSpecialPortalLines(sectortype * sector, walltype* line); @@ -178,7 +178,7 @@ public: void DrawPlayerSprites(bool hudModelStep, FRenderState &state); //void AddSubsectorToPortal(FSectorPortalGroup *portal, sectortype *sub); - + void AddWall(HWWall *w); void AddMirrorSurface(HWWall *w); void AddFlat(HWFlat *flat); diff --git a/source/core/rendering/scene/hw_drawlist.h b/source/core/rendering/scene/hw_drawlist.h index a7045222a..daabf193e 100644 --- a/source/core/rendering/scene/hw_drawlist.h +++ b/source/core/rendering/scene/hw_drawlist.h @@ -30,7 +30,7 @@ struct HWDrawItem { HWDrawItemType rendertype; int index; - + HWDrawItem() = default; // we need this for dynamic arrays. HWDrawItem(HWDrawItemType _rendertype,int _index) : rendertype(_rendertype),index(_index) {} }; @@ -43,8 +43,8 @@ struct SortNode SortNode * left; // left side of this node SortNode * equal; // equal to this node SortNode * right; // right side of this node - - + + void UnlinkFromChain(); void Link(SortNode * hook); void AddToEqual(SortNode * newnode); @@ -69,7 +69,7 @@ struct HWDrawList float SortZ; SortNode * sorted; bool reverseSort; - + public: HWDrawList() { @@ -77,17 +77,17 @@ public: SortNodeStart=-1; sorted=NULL; } - + ~HWDrawList() { Reset(); } - + unsigned int Size() { return drawitems.Size(); } - + HWWall *NewWall(); HWFlat *NewFlat(); HWSprite *NewSprite(); @@ -95,8 +95,8 @@ public: void SortWallsHorz(HWDrawInfo* di); void SortWallsVert(HWDrawInfo* di); void SortFlats(HWDrawInfo* di); - - + + void MakeSortList(); SortNode * FindSortPlane(SortNode * head); SortNode * FindSortWall(SortNode * head); diff --git a/source/core/rendering/scene/hw_drawlistadd.cpp b/source/core/rendering/scene/hw_drawlistadd.cpp index 59a6a6f47..1a99a22e4 100644 --- a/source/core/rendering/scene/hw_drawlistadd.cpp +++ b/source/core/rendering/scene/hw_drawlistadd.cpp @@ -119,7 +119,7 @@ void HWDrawInfo::AddSprite(HWSprite *sprite, bool translucent) int list; if (translucent || sprite->modelframe == 0) list = GLDL_TRANSLUCENT; else list = GLDL_MODELS; - + auto newsprt = drawlists[list].NewSprite(); *newsprt = *sprite; } diff --git a/source/core/rendering/scene/hw_drawstructs.h b/source/core/rendering/scene/hw_drawstructs.h index 6aab29b08..d28646812 100644 --- a/source/core/rendering/scene/hw_drawstructs.h +++ b/source/core/rendering/scene/hw_drawstructs.h @@ -160,7 +160,7 @@ public: float alpha; FRenderStyle RenderStyle; - + float ViewDistance; float visibility; walltype* walldist; @@ -287,7 +287,7 @@ public: void PutFlat(HWDrawInfo* di, int whichplane); void ProcessSector(HWDrawInfo *di, sectortype * frontsector, int sectionnum, int which = 7 /*SSRF_RENDERALL*/); // cannot use constant due to circular dependencies. void ProcessFlatSprite(HWDrawInfo* di, tspritetype* sprite, sectortype* sector); - + void DrawSubsectors(HWDrawInfo *di, FRenderState &state); void DrawFlat(HWDrawInfo* di, FRenderState& state, bool translucent); }; diff --git a/source/core/rendering/scene/hw_portal.cpp b/source/core/rendering/scene/hw_portal.cpp index 661e8f727..97bbca6c4 100644 --- a/source/core/rendering/scene/hw_portal.cpp +++ b/source/core/rendering/scene/hw_portal.cpp @@ -174,7 +174,7 @@ void HWPortal::DrawPortalStencil(FRenderState &state, int pass) if (mPrimIndices.Size() == 0) { mPrimIndices.Resize(2 * lines.Size()); - + for (unsigned int i = 0; i < lines.Size(); i++) { mPrimIndices[i * 2] = lines[i].vertindex; @@ -208,7 +208,7 @@ void HWPortal::DrawPortalStencil(FRenderState &state, int pass) } } - + for (unsigned int i = 0; i < mPrimIndices.Size(); i += 2) { state.Draw(DT_TriangleFan, mPrimIndices[i], mPrimIndices[i + 1], i == 0); @@ -243,7 +243,7 @@ void HWPortal::SetupStencil(HWDrawInfo *di, FRenderState &state, bool usestencil Clocker c(PortalAll); rendered_portals++; - + if (usestencil) { // Create stencil @@ -253,20 +253,20 @@ void HWPortal::SetupStencil(HWDrawInfo *di, FRenderState &state, bool usestencil state.EnableTexture(false); state.ResetColor(); state.SetDepthFunc(DF_Less); - + if (NeedDepthBuffer()) { state.SetDepthMask(false); // don't write to Z-buffer! - + DrawPortalStencil(state, STP_Stencil); - + // Clear Z-buffer state.SetStencil(1, SOP_Keep); // draw sky into stencil. This stage doesn't modify the stencil. state.SetDepthMask(true); // enable z-buffer again state.SetDepthRange(1, 1); state.SetDepthFunc(DF_Always); DrawPortalStencil(state, STP_DepthClear); - + // set normal drawing mode state.EnableTexture(true); state.SetDepthRange(0, 1); @@ -278,7 +278,7 @@ void HWPortal::SetupStencil(HWDrawInfo *di, FRenderState &state, bool usestencil { // No z-buffer is needed therefore we can skip all the complicated stuff that is involved // Note: We must draw the stencil with z-write enabled here because there is no second pass! - + state.SetDepthMask(true); DrawPortalStencil(state, STP_AllInOne); state.SetStencil(1, SOP_Keep); // draw sky into stencil. This stage doesn't modify the stencil. @@ -289,8 +289,8 @@ void HWPortal::SetupStencil(HWDrawInfo *di, FRenderState &state, bool usestencil state.SetDepthMask(false); // don't write to Z-buffer! } screen->stencilValue++; - - + + } else { @@ -320,12 +320,12 @@ void HWPortal::RemoveStencil(HWDrawInfo *di, FRenderState &state, bool usestenci if (usestencil) { - + state.SetColorMask(false); // no graphics state.SetEffect(EFF_NONE); state.ResetColor(); state.EnableTexture(false); - + if (needdepth) { // first step: reset the depth buffer to max. depth @@ -337,20 +337,20 @@ void HWPortal::RemoveStencil(HWDrawInfo *di, FRenderState &state, bool usestenci { state.EnableDepthTest(true); } - + // second step: restore the depth buffer to the previous values and reset the stencil state.SetDepthFunc(DF_LEqual); state.SetDepthRange(0, 1); state.SetStencil(0, SOP_Decrement); DrawPortalStencil(state, STP_DepthRestore); state.SetDepthFunc(DF_Less); - - + + state.EnableTexture(true); state.SetEffect(EFF_NONE); state.SetColorMask(true); screen->stencilValue--; - + // restore old stencil op. state.SetStencil(0, SOP_Keep); } @@ -365,10 +365,10 @@ void HWPortal::RemoveStencil(HWDrawInfo *di, FRenderState &state, bool usestenci state.EnableDepthTest(true); state.SetDepthMask(true); } - + // This draws a valid z-buffer into the stencil's contents to ensure it // doesn't get overwritten by the level's geometry. - + state.ResetColor(); state.SetDepthFunc(DF_LEqual); state.SetDepthRange(0, 1); @@ -631,7 +631,7 @@ bool HWLineToLinePortal::Setup(HWDrawInfo *di, FRenderState &rstate, Clipper *cl di->SetClipLine(line); di->SetupView(rstate, vp.Pos.X, vp.Pos.Y, vp.Pos.Z, !!(state->MirrorFlag & 1), !!(state->PlaneMirrorFlag & 1)); - + ClearClipper(di, clipper); auto startan = bvectangbam(origin->pos.X - origx, origin->pos.Y - origy); @@ -683,7 +683,7 @@ bool HWLineToSpritePortal::Setup(HWDrawInfo* di, FRenderState& rstate, Clipper* di->SetClipLine(line); di->SetupView(rstate, vp.Pos.X, vp.Pos.Y, vp.Pos.Z, !!(state->MirrorFlag & 1), !!(state->PlaneMirrorFlag & 1)); - + ClearClipper(di, clipper); auto startan = bvectangbam(origin->pos.X - origx, origin->pos.Y - origy); diff --git a/source/core/rendering/scene/hw_portal.h b/source/core/rendering/scene/hw_portal.h index 70cdcb6a8..16aff022d 100644 --- a/source/core/rendering/scene/hw_portal.h +++ b/source/core/rendering/scene/hw_portal.h @@ -212,13 +212,13 @@ struct FPortalSceneState extern FPortalSceneState portalState; - + class HWScenePortalBase : public HWPortal { protected: HWScenePortalBase(FPortalSceneState *state) : HWPortal(state, false) { - + } public: void ClearClipper(HWDrawInfo *di, Clipper *clipper); @@ -402,7 +402,7 @@ protected: virtual const char *GetName(); public: - + HWHorizonPortal(FPortalSceneState *state, HWHorizonInfo * pt, FRenderViewpoint &vp, bool local = false); }; #endif diff --git a/source/core/rendering/scene/hw_walls.cpp b/source/core/rendering/scene/hw_walls.cpp index fc744121a..a6a3c699a 100644 --- a/source/core/rendering/scene/hw_walls.cpp +++ b/source/core/rendering/scene/hw_walls.cpp @@ -392,7 +392,7 @@ void HWWall::PutWall(HWDrawInfo *di, bool translucent) tcs[LORGT].v = 1.f - tcs[LORGT].v; } - + if (!screen->BuffersArePersistent()) { /* @@ -721,7 +721,7 @@ void HWWall::DoTexture(HWDrawInfo* di, walltype* wal, walltype* refwall, float r tcs[LOLFT].u = tcs[UPLFT].u = ((leftdist * 8.f * wal->xrepeat) + refwall->xpan_) / tw; tcs[LORGT].u = tcs[UPRGT].u = ((rightdist * 8.f * wal->xrepeat) + refwall->xpan_) / tw; - + auto setv = [=](float hl, float hr, float frac) -> float { float h = hl + (hr - hl) * frac; diff --git a/source/core/savegamehelp.cpp b/source/core/savegamehelp.cpp index a7232ce2a..316914151 100644 --- a/source/core/savegamehelp.cpp +++ b/source/core/savegamehelp.cpp @@ -370,7 +370,7 @@ int G_ValidateSavegame(FileReader &fr, FString *savetitle, bool formenu) } if (!curLevel) return 0; if (!formenu) currentLevel = curLevel; - + if (savever < savesig.minsavever) { @@ -853,7 +853,7 @@ static int nextquicksave = -1; BackupSaveGame = fn; } } - + //--------------------------------------------------------------------------- // // diff --git a/source/core/searchpaths.cpp b/source/core/searchpaths.cpp index ca6b6bf26..c00cd985c 100644 --- a/source/core/searchpaths.cpp +++ b/source/core/searchpaths.cpp @@ -212,7 +212,7 @@ void CollectSubdirectories(TArray &searchpath, const char *dirmatch) TArray CollectSearchPaths() { TArray searchpaths; - + if (GameConfig->SetSection("GameSearch.Directories")) { const char *key; @@ -396,7 +396,7 @@ static TArray ParseGrpInfo(const char *fn, FileReader &fr, TMap groups; TMap FlagMap; - + FlagMap.Insert("GAMEFLAG_DUKE", GAMEFLAG_DUKE); FlagMap.Insert("GAMEFLAG_NAM", GAMEFLAG_NAM); FlagMap.Insert("GAMEFLAG_NAPALM", GAMEFLAG_NAPALM); @@ -421,7 +421,7 @@ static TArray ParseGrpInfo(const char *fn, FileReader &fr, TMap ParseAllGrpInfos(TArray& filelist) // // //========================================================================== - + void GetCRC(FileEntry *entry, TArray &CRCCache) { for (auto &ce : CRCCache) @@ -909,7 +909,7 @@ TArray GrpScan() { SaveCRCs(cachedCRCs); } - + return foundGames; } diff --git a/source/core/secrets.cpp b/source/core/secrets.cpp index 70dceb8d8..2054ea3b6 100644 --- a/source/core/secrets.cpp +++ b/source/core/secrets.cpp @@ -110,7 +110,7 @@ CCMD(secret) } } } - + void SECRET_Serialize(FSerializer &arc) { if (arc.BeginObject("secrets")) diff --git a/source/core/secrets.h b/source/core/secrets.h index 21a6eefa9..4bcf8a496 100644 --- a/source/core/secrets.h +++ b/source/core/secrets.h @@ -6,4 +6,4 @@ void SECRET_Serialize(FSerializer &arc); void SECRET_SetMapName(const char *filename, const char *maptitle); bool SECRET_Trigger(int num); - + diff --git a/source/core/statusbar2.cpp b/source/core/statusbar2.cpp index db94857c1..2041b5fa3 100644 --- a/source/core/statusbar2.cpp +++ b/source/core/statusbar2.cpp @@ -161,7 +161,7 @@ void drawMapTitle() { if (!hud_showmapname || levelTextTime <= 0 || M_Active()) return; - + double alpha = levelTextTime > 16? 1.0 : levelTextTime / 16.; if (alpha > 0) { diff --git a/source/core/textures/buildtiles.cpp b/source/core/textures/buildtiles.cpp index 0e2f1ec54..d94dfd63c 100644 --- a/source/core/textures/buildtiles.cpp +++ b/source/core/textures/buildtiles.cpp @@ -772,7 +772,7 @@ void tileCopySection(int tilenum1, int sx1, int sy1, int xsiz, int ysiz, int til auto p1 = tilePtr(tilenum1); auto p2 = tileData(tilenum2); if (p2 == nullptr) return; // Error: Destination is not writable. - + int x1 = sx1; int x2 = sx2; for (int i=0; i= ysiz1) y1 = 0; diff --git a/source/core/textures/buildtiles.h b/source/core/textures/buildtiles.h index ac30a9537..5dfe94d30 100644 --- a/source/core/textures/buildtiles.h +++ b/source/core/textures/buildtiles.h @@ -204,7 +204,7 @@ public: FRestorableTile(FImageSource* base) { Base = base; - + CopySize(*base); ResizeImage(Width, Height); Reload(); diff --git a/source/core/textures/skytexture.cpp b/source/core/textures/skytexture.cpp index f2c584e0e..20c76c6e8 100644 --- a/source/core/textures/skytexture.cpp +++ b/source/core/textures/skytexture.cpp @@ -44,14 +44,14 @@ FGameTexture* GetSkyTexture(int basetile, int lognumtiles, const int16_t *tilemap, int remap) { FString synthname; - - + + if ((lognumtiles == 0 && remap == 0) || lognumtiles > 4) { // no special handling - let the old code do its job as-is return nullptr; } - + int numtiles = 1 << lognumtiles; synthname.Format("Sky%04x%02x", basetile, remap); for(int i = 0; i < numtiles; i++) @@ -60,7 +60,7 @@ FGameTexture* GetSkyTexture(int basetile, int lognumtiles, const int16_t *tilema }; auto tex = TexMan.FindGameTexture(synthname); if (tex) return tex; - + TArray build(numtiles, true); int tilewidth = tileWidth(basetile); for(int i = 0; i < numtiles; i++) diff --git a/source/games/blood/src/actor.cpp b/source/games/blood/src/actor.cpp index e8c2d45a5..f639f7c30 100644 --- a/source/games/blood/src/actor.cpp +++ b/source/games/blood/src/actor.cpp @@ -34,7 +34,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. BEGIN_BLD_NS VECTORDATA gVectorData[] = { // this is constant EXCEPT for [VECTOR_TYPE_20].maxDist. What were they thinking... - + // Tine { kDamageBullet, @@ -61,7 +61,7 @@ VECTORDATA gVectorData[] = { // this is constant EXCEPT for [VECTOR_TYPE_20].max FX_NONE, FX_NONE, FX_NONE, -1, FX_NONE, FX_5, FX_NONE, -1, }, - + // Shell { kDamageBullet, @@ -88,7 +88,7 @@ VECTORDATA gVectorData[] = { // this is constant EXCEPT for [VECTOR_TYPE_20].max FX_NONE, FX_NONE, FX_NONE, -1, FX_NONE, FX_5, FX_NONE, -1, }, - + // Bullet { kDamageBullet, @@ -116,7 +116,7 @@ VECTORDATA gVectorData[] = { // this is constant EXCEPT for [VECTOR_TYPE_20].max FX_NONE, FX_5, FX_NONE, -1, }, - + // Tommy AP { kDamageBullet, @@ -143,7 +143,7 @@ VECTORDATA gVectorData[] = { // this is constant EXCEPT for [VECTOR_TYPE_20].max FX_NONE, FX_NONE, FX_NONE, -1, FX_NONE, FX_5, FX_NONE, -1, }, - + // Shell AP { kDamageBullet, @@ -170,7 +170,7 @@ VECTORDATA gVectorData[] = { // this is constant EXCEPT for [VECTOR_TYPE_20].max FX_NONE, FX_NONE, FX_NONE, -1, FX_NONE, FX_5, FX_NONE, -1, }, - + // Tommy regular { kDamageBullet, @@ -197,7 +197,7 @@ VECTORDATA gVectorData[] = { // this is constant EXCEPT for [VECTOR_TYPE_20].max FX_NONE, FX_NONE, FX_NONE, -1, FX_NONE, FX_5, FX_NONE, -1, }, - + // Bat bite { kDamageBullet, @@ -224,7 +224,7 @@ VECTORDATA gVectorData[] = { // this is constant EXCEPT for [VECTOR_TYPE_20].max FX_NONE, FX_NONE, FX_NONE, -1, FX_NONE, FX_NONE, FX_NONE, -1, }, - + // Eel bite { kDamageBullet, @@ -251,7 +251,7 @@ VECTORDATA gVectorData[] = { // this is constant EXCEPT for [VECTOR_TYPE_20].max FX_NONE, FX_NONE, FX_NONE, -1, FX_NONE, FX_NONE, FX_NONE, -1, }, - + // Gill bite { kDamageBullet, @@ -278,7 +278,7 @@ VECTORDATA gVectorData[] = { // this is constant EXCEPT for [VECTOR_TYPE_20].max FX_NONE, FX_NONE, FX_NONE, -1, FX_NONE, FX_NONE, FX_NONE, -1, }, - + // Beast slash { kDamageExplode, @@ -305,7 +305,7 @@ VECTORDATA gVectorData[] = { // this is constant EXCEPT for [VECTOR_TYPE_20].max FX_NONE, FX_NONE, FX_NONE, -1, FX_NONE, FX_NONE, FX_NONE, -1, }, - + // Axe { kDamageBullet, @@ -332,7 +332,7 @@ VECTORDATA gVectorData[] = { // this is constant EXCEPT for [VECTOR_TYPE_20].max FX_NONE, FX_NONE, FX_NONE, -1, FX_NONE, FX_5, FX_NONE, -1, }, - + // Cleaver { kDamageBullet, @@ -359,7 +359,7 @@ VECTORDATA gVectorData[] = { // this is constant EXCEPT for [VECTOR_TYPE_20].max FX_NONE, FX_NONE, FX_NONE, -1, FX_NONE, FX_5, FX_NONE, -1, }, - + // Phantasm slash { kDamageBullet, @@ -548,7 +548,7 @@ VECTORDATA gVectorData[] = { // this is constant EXCEPT for [VECTOR_TYPE_20].max FX_NONE, FX_NONE, FX_NONE, -1, FX_NONE, FX_NONE, FX_NONE, -1, }, - + { (DAMAGE_TYPE)-1, 0, diff --git a/source/games/blood/src/aiburn.cpp b/source/games/blood/src/aiburn.cpp index 81038b80c..e71be3312 100644 --- a/source/games/blood/src/aiburn.cpp +++ b/source/games/blood/src/aiburn.cpp @@ -156,7 +156,7 @@ static void burnThinkChase(DBloodActor* actor) assert(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax); DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type); auto target = actor->GetTarget(); - + int dx = target->spr.pos.X - actor->spr.pos.X; int dy = target->spr.pos.Y - actor->spr.pos.Y; aiChooseDirection(actor, getangle(dx, dy)); diff --git a/source/games/blood/src/aicult.cpp b/source/games/blood/src/aicult.cpp index ec3999402..9fa89ee29 100644 --- a/source/games/blood/src/aicult.cpp +++ b/source/games/blood/src/aicult.cpp @@ -233,7 +233,7 @@ static void cultThinkChase(DBloodActor* actor) assert(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax); DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type); auto target = actor->GetTarget(); - + int dx = target->spr.pos.X - actor->spr.pos.X; int dy = target->spr.pos.Y - actor->spr.pos.Y; aiChooseDirection(actor, getangle(dx, dy)); diff --git a/source/games/blood/src/aihand.cpp b/source/games/blood/src/aihand.cpp index 32d41a6b8..5fe4ea08d 100644 --- a/source/games/blood/src/aihand.cpp +++ b/source/games/blood/src/aihand.cpp @@ -87,7 +87,7 @@ static void handThinkChase(DBloodActor* actor) DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type); if (!actor->ValidateTarget(__FUNCTION__)) return; auto target = actor->GetTarget(); - + int dx = target->spr.pos.X - actor->spr.pos.X; int dy = target->spr.pos.Y - actor->spr.pos.Y; aiChooseDirection(actor, getangle(dx, dy)); diff --git a/source/games/blood/src/aiinnoc.cpp b/source/games/blood/src/aiinnoc.cpp index c904df4a1..feb9e74cb 100644 --- a/source/games/blood/src/aiinnoc.cpp +++ b/source/games/blood/src/aiinnoc.cpp @@ -71,7 +71,7 @@ static void innocThinkChase(DBloodActor* actor) DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type); if (!actor->ValidateTarget(__FUNCTION__)) return; auto target = actor->GetTarget(); - + int dx = target->spr.pos.X - actor->spr.pos.X; int dy = target->spr.pos.Y - actor->spr.pos.Y; aiChooseDirection(actor, getangle(dx, dy)); diff --git a/source/games/blood/src/airat.cpp b/source/games/blood/src/airat.cpp index e74d7a6dc..cf7b5ea12 100644 --- a/source/games/blood/src/airat.cpp +++ b/source/games/blood/src/airat.cpp @@ -82,7 +82,7 @@ static void ratThinkChase(DBloodActor* actor) assert(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax); DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type); auto target = actor->GetTarget(); - + int dx = target->spr.pos.X - actor->spr.pos.X; int dy = target->spr.pos.Y - actor->spr.pos.Y; aiChooseDirection(actor, getangle(dx, dy)); diff --git a/source/games/blood/src/asound.cpp b/source/games/blood/src/asound.cpp index 5533ab86e..2f384b93f 100644 --- a/source/games/blood/src/asound.cpp +++ b/source/games/blood/src/asound.cpp @@ -127,20 +127,20 @@ void ambInit(void) while (DBloodActor* actor = it.Next()) { if (!actor->hasX()) continue; - + if (actor->xspr.data1 >= actor->xspr.data2) continue; - + int i; AMB_CHANNEL *pChannel = ambChannels; for (i = 0; i < nAmbChannels; i++, pChannel++) if (actor->xspr.data3 == pChannel->check) break; - + if (i == nAmbChannels) { - + if (i >= kMaxAmbChannel) { actor->spr.owner = -1; continue; } - + int nSFX = actor->xspr.data3; auto snd = soundEngine->FindSoundByResID(nSFX); if (!snd) { diff --git a/source/games/blood/src/inifile.cpp b/source/games/blood/src/inifile.cpp index e2fad85d7..e2ee8d533 100644 --- a/source/games/blood/src/inifile.cpp +++ b/source/games/blood/src/inifile.cpp @@ -261,7 +261,7 @@ bool IniFile::FindKey(const char *key) anotherNode = curNode; curNode = curNode->next; } - + return false; } diff --git a/source/games/blood/src/inifile.h b/source/games/blood/src/inifile.h index 7474968dc..ed4c422f6 100644 --- a/source/games/blood/src/inifile.h +++ b/source/games/blood/src/inifile.h @@ -65,7 +65,7 @@ private: char *_13; char fileName[BMAX_PATH]; // watcom maxpath - + void LoadRes(void *); void Load(); }; diff --git a/source/games/duke/src/actors.cpp b/source/games/duke/src/actors.cpp index 14f0cf7e3..9e6d6a79b 100644 --- a/source/games/duke/src/actors.cpp +++ b/source/games/duke/src/actors.cpp @@ -1965,7 +1965,7 @@ void camera(DDukeActor *actor) return; } } - + if (actor->spr.hitag > 0) { // alias our temp_data array indexes. @@ -3209,7 +3209,7 @@ void handle_se03(DDukeActor *actor) if (actor->temp_data[4] == 0) return; int x; - + findplayer(actor, &x); int palvals = actor->palvals; @@ -4864,7 +4864,7 @@ void makeitfall(DDukeActor* actor) c = gs.gravity/6; else c = gs.gravity; } - + if (isRRRA()) { c = adjustfall(actor, c); // this accesses sprite indices and cannot be in shared code. Should be done better. diff --git a/source/games/duke/src/actors_d.cpp b/source/games/duke/src/actors_d.cpp index f594d315b..245fc0bbd 100644 --- a/source/games/duke/src/actors_d.cpp +++ b/source/games/duke/src/actors_d.cpp @@ -264,7 +264,7 @@ void hitradius_d(DDukeActor* actor, int r, int hp1, int hp2, int hp3, int h if(actor->spr.picnum != SHRINKSPARK && !(actor->spr.picnum == RPG && actor->spr.xrepeat < 11)) { BFSSectorSearch search(actor->spr.sector()); - + while (auto dasectp = search.GetNext()) { if (((dasectp->ceilingz - actor->spr.pos.Z) >> 8) < r) @@ -300,9 +300,9 @@ void hitradius_d(DDukeActor* actor, int r, int hp1, int hp2, int hp3, int h } } } - + int q = -(16 << 8) + (krand() & ((32 << 8) - 1)); - + auto Owner = actor->GetOwner(); for (int x = 0; x < 7; x++) { @@ -315,13 +315,13 @@ void hitradius_d(DDukeActor* actor, int r, int hp1, int hp2, int hp3, int h { continue; } - + if (actor->spr.picnum == FLAMETHROWERFLAME && ((Owner->spr.picnum == FIREFLY && act2->spr.picnum == FIREFLY) || (Owner->spr.picnum == BOSS5 && act2->spr.picnum == BOSS5))) { continue; } } - + if (x == 0 || x >= 5 || AFLAMABLE(act2->spr.picnum)) { if (actor->spr.picnum != SHRINKSPARK || (act2->spr.cstat & CSTAT_SPRITE_BLOCK_ALL)) @@ -342,15 +342,15 @@ void hitradius_d(DDukeActor* actor, int r, int hp1, int hp2, int hp3, int h { continue; } - + if (act2->spr.picnum == APLAYER) act2->spr.pos.Z -= gs.playerheight; int d = dist(actor, act2); if (act2->spr.picnum == APLAYER) act2->spr.pos.Z += gs.playerheight; - + if (d < r && cansee(act2->spr.pos.X, act2->spr.pos.Y, act2->spr.pos.Z - (8 << 8), act2->spr.sector(), actor->spr.pos.X, actor->spr.pos.Y, actor->spr.pos.Z - (12 << 8), actor->spr.sector())) { act2->ang = getangle(act2->spr.pos.X - actor->spr.pos.X, act2->spr.pos.Y - actor->spr.pos.Y); - + if (actor->spr.picnum == RPG && act2->spr.extra > 0) act2->attackertype = RPG; else if (!isWorldTour()) @@ -373,7 +373,7 @@ void hitradius_d(DDukeActor* actor, int r, int hp1, int hp2, int hp3, int h else act2->attackertype = FLAMETHROWERFLAME; } - + if (actor->spr.picnum != SHRINKSPARK && (!isWorldTour() || actor->spr.picnum != LAVAPOOL)) { if (d < r / 3) @@ -391,29 +391,29 @@ void hitradius_d(DDukeActor* actor, int r, int hp1, int hp2, int hp3, int h if (hp2 == hp1) hp2++; act2->extra = hp1 + (krand() % (hp2 - hp1)); } - + if (act2->spr.picnum != TANK && act2->spr.picnum != ROTATEGUN && act2->spr.picnum != RECON && !bossguy(act2)) { if (act2->spr.xvel < 0) act2->spr.xvel = 0; act2->spr.xvel += (actor->spr.extra << 2); } - + if (gs.actorinfo[act2->spr.picnum].flags & SFLAG_HITRADIUSCHECK) fi.checkhitsprite(act2, actor); } else if (actor->spr.extra == 0) act2->extra = 0; - + if (act2->spr.picnum != RADIUSEXPLOSION && Owner && Owner->spr.statnum < MAXSTATUS) { if (act2->spr.picnum == APLAYER) { int p = act2->spr.yvel; - + if (isWorldTour() && act2->attackertype == FLAMETHROWERFLAME && Owner->spr.picnum == APLAYER) { ps[p].numloogs = -1 - actor->spr.yvel; } - + if (ps[p].newOwner != nullptr) { clearcamera(&ps[p]); @@ -725,7 +725,7 @@ int ifhitbyweapon_d(DDukeActor *actor) if (ud.god && actor->attackertype != SHRINKSPARK) return -1; p = actor->spr.yvel; - + if (hitowner && hitowner->spr.picnum == APLAYER && ud.coop == 1 && @@ -1875,12 +1875,12 @@ void movetransports_d(void) { int warpspriteto; int ll; - + DukeStatIterator iti(STAT_TRANSPORT); while (auto act = iti.Next()) { auto Owner = act->GetOwner(); - + if (Owner == act) { continue; @@ -1889,22 +1889,22 @@ void movetransports_d(void) auto sectp = act->spr.sector(); int sectlotag = sectp->lotag; int onfloorz = act->temp_data[4]; - + if (act->temp_data[0] > 0) act->temp_data[0]--; - + DukeSectIterator itj(act->sector()); while (auto act2 = itj.Next()) { switch (act2->spr.statnum) { case STAT_PLAYER: - + if (act2->GetOwner()) { int p = act2->PlayerIndex(); - + ps[p].on_warping_sector = 1; - + if (ps[p].transporter_hold == 0 && ps[p].jumping_counter == 0) { if (ps[p].on_ground && sectlotag == 0 && onfloorz && ps[p].jetpack_on == 0) @@ -1914,64 +1914,64 @@ void movetransports_d(void) spawn(act, TRANSPORTERBEAM); S_PlayActorSound(TELEPORTER, act); } - + for (int k = connecthead; k >= 0; k = connectpoint2[k]) if (ps[k].cursector == Owner->sector()) { ps[k].frag_ps = p; ps[k].GetActor()->spr.extra = 0; } - + ps[p].angle.ang = buildang(Owner->spr.ang); - + if (Owner->GetOwner() != Owner) { act->temp_data[0] = 13; Owner->temp_data[0] = 13; ps[p].transporter_hold = 13; } - + ps[p].bobposx = ps[p].opos.X = ps[p].pos.X = Owner->spr.pos.X; ps[p].bobposy = ps[p].opos.Y = ps[p].pos.Y = Owner->spr.pos.Y; ps[p].opos.Z = ps[p].pos.Z = Owner->spr.pos.Z - gs.playerheight; - + ChangeActorSect(act2, Owner->sector()); ps[p].setCursector(act2->spr.sector()); - + if (act->spr.pal == 0) { auto k = spawn(Owner, TRANSPORTERBEAM); if (k) S_PlayActorSound(TELEPORTER, k); } - + break; } } else if (!(sectlotag == 1 && ps[p].on_ground == 1)) break; - + if (onfloorz == 0 && abs(act->spr.pos.Z - ps[p].pos.Z) < 6144) if ((ps[p].jetpack_on == 0) || (ps[p].jetpack_on && (PlayerInput(p, SB_JUMP))) || (ps[p].jetpack_on && PlayerInput(p, SB_CROUCH))) { ps[p].opos.X = ps[p].pos.X += Owner->spr.pos.X - act->spr.pos.X; ps[p].opos.Y = ps[p].pos.Y += Owner->spr.pos.Y - act->spr.pos.Y; - + if (ps[p].jetpack_on && (PlayerInput(p, SB_JUMP) || ps[p].jetpack_on < 11)) ps[p].pos.Z = Owner->spr.pos.Z - 6144; else ps[p].pos.Z = Owner->spr.pos.Z + 6144; ps[p].opos.Z = ps[p].pos.Z; - + auto pa = ps[p].GetActor(); pa->spr.opos = ps[p].pos; - + ChangeActorSect(act2, Owner->sector()); ps[p].setCursector(Owner->sector()); - + break; } - + int k = 0; - + if (onfloorz && sectlotag == ST_1_ABOVE_WATER && ps[p].on_ground && ps[p].pos.Z > (sectp->floorz - (16 << 8)) && (PlayerInput(p, SB_CROUCH) || ps[p].poszv > 2048)) // if( onfloorz && sectlotag == 1 && ps[p].pos.z > (sectp->floorz-(6<<8)) ) { @@ -1984,12 +1984,12 @@ void movetransports_d(void) S_PlayActorSound(DUKE_UNDERWATER, act2); ps[p].opos.Z = ps[p].pos.Z = Owner->sector()->ceilingz + (7 << 8); - + ps[p].posxv = 4096 - (krand() & 8192); ps[p].posyv = 4096 - (krand() & 8192); - + } - + if (onfloorz && sectlotag == ST_2_UNDERWATER && ps[p].pos.Z < (sectp->ceilingz + (6 << 8))) { k = 1; @@ -1999,29 +1999,29 @@ void movetransports_d(void) FX_StopAllSounds(); } S_PlayActorSound(DUKE_GASP, act2); - + ps[p].opos.Z = ps[p].pos.Z = Owner->sector()->floorz - (7 << 8); - + ps[p].jumping_toggle = 1; ps[p].jumping_counter = 0; } - + if (k == 1) { ps[p].opos.X = ps[p].pos.X += Owner->spr.pos.X - act->spr.pos.X; ps[p].opos.Y = ps[p].pos.Y += Owner->spr.pos.Y - act->spr.pos.Y; - + if (!Owner || Owner->GetOwner() != Owner) ps[p].transporter_hold = -2; ps[p].setCursector(Owner->sector()); ChangeActorSect(act2, Owner->sector()); SetActor(ps[p].GetActor(), { ps[p].pos.X, ps[p].pos.Y, ps[p].pos.Z + gs.playerheight }); - + if ((krand() & 255) < 32) spawn(act2, WATERSPLASH2); - + if (sectlotag == 1) for (int l = 0; l < 9; l++) { @@ -2031,7 +2031,7 @@ void movetransports_d(void) } } break; - + case STAT_ACTOR: switch (act2->spr.picnum) { @@ -2054,17 +2054,17 @@ void movetransports_d(void) case STAT_MISC: case STAT_FALLER: case STAT_DUMMYPLAYER: - + ll = abs(act2->spr.zvel); - + { warpspriteto = 0; if (ll && sectlotag == 2 && act2->spr.pos.Z < (sectp->ceilingz + ll)) warpspriteto = 1; - + if (ll && sectlotag == 1 && act2->spr.pos.Z > (sectp->floorz - ll)) warpspriteto = 1; - + if (sectlotag == 0 && (onfloorz || abs(act2->spr.pos.Z - act->spr.pos.Z) < 4096)) { if ((!Owner || Owner->GetOwner() != Owner) && onfloorz && act->temp_data[0] > 0 && act2->spr.statnum != STAT_MISC) @@ -2074,7 +2074,7 @@ void movetransports_d(void) } warpspriteto = 1; } - + if (warpspriteto) switch (act2->spr.picnum) { case TRANSPORTERSTAR: @@ -2104,7 +2104,7 @@ void movetransports_d(void) case WATERBUBBLE: //if( rnd(192) && a2->s.picnum == WATERBUBBLE) // break; - + if (sectlotag > 0) { auto k = spawn(act2, WATERSPLASH2); @@ -2115,7 +2115,7 @@ void movetransports_d(void) ssp(k, CLIPMASK0); } } - + switch (sectlotag) { case 0: @@ -2127,24 +2127,24 @@ void movetransports_d(void) act2->spr.pos.Y += (Owner->spr.pos.Y - act->spr.pos.Y); act2->spr.pos.Z -= act->spr.pos.Z - Owner->sector()->floorz; act2->spr.ang = Owner->spr.ang; - + act2->spr.backupang(); - + if (act->spr.pal == 0) { auto k = spawn(act, TRANSPORTERBEAM); if (k) S_PlayActorSound(TELEPORTER, k); - + k = spawn(Owner, TRANSPORTERBEAM); if (k) S_PlayActorSound(TELEPORTER, k); } - + if (Owner && Owner->GetOwner() == Owner) { act->temp_data[0] = 13; Owner->temp_data[0] = 13; } - + ChangeActorSect(act2, Owner->sector()); } } @@ -2153,9 +2153,9 @@ void movetransports_d(void) act2->spr.pos.X += (Owner->spr.pos.X - act->spr.pos.X); act2->spr.pos.Y += (Owner->spr.pos.Y - act->spr.pos.Y); act2->spr.pos.Z = Owner->spr.pos.Z + 4096; - + act2->spr.backupz(); - + ChangeActorSect(act2, Owner->sector()); } break; @@ -2163,29 +2163,29 @@ void movetransports_d(void) act2->spr.pos.X += (Owner->spr.pos.X - act->spr.pos.X); act2->spr.pos.Y += (Owner->spr.pos.Y - act->spr.pos.Y); act2->spr.pos.Z = Owner->sector()->ceilingz + ll; - + act2->spr.backupz(); - + ChangeActorSect(act2, Owner->sector()); - + break; case 2: act2->spr.pos.X += (Owner->spr.pos.X - act->spr.pos.X); act2->spr.pos.Y += (Owner->spr.pos.Y - act->spr.pos.Y); act2->spr.pos.Z = Owner->sector()->floorz - ll; - + act2->spr.backupz(); - + ChangeActorSect(act2, Owner->sector()); - + break; } - + break; } } break; - + } } BOLT:; @@ -2916,7 +2916,7 @@ void moveactors_d(void) int x; int p; unsigned int k; - + DukeStatIterator it(STAT_ACTOR); while (auto act = it.Next()) { @@ -3136,7 +3136,7 @@ void moveexplosions_d(void) // STATNUM 5 { int p; int x; - + DukeStatIterator it(STAT_MISC); while (auto act = it.Next()) { @@ -3153,7 +3153,7 @@ void moveexplosions_d(void) // STATNUM 5 case FIREFLYFLYINGEFFECT: if (isWorldTour()) fireflyflyingeffect(act); continue; - + case NEON1: case NEON2: case NEON3: @@ -3460,7 +3460,7 @@ void moveeffectors_d(void) //STATNUM 3 int l; clearfriction(); - + DukeStatIterator it(STAT_EFFECTOR); while (auto act = it.Next()) { @@ -3470,11 +3470,11 @@ void moveeffectors_d(void) //STATNUM 3 case SE_0_ROTATING_SECTOR: handle_se00(act, LASERLINE); break; - + case SE_1_PIVOT: //Nothing for now used as the pivot handle_se01(act); break; - + case SE_6_SUBWAY: handle_se06_d(act); break; @@ -3519,7 +3519,7 @@ void moveeffectors_d(void) //STATNUM 3 case SE_11_SWINGING_DOOR: handle_se11(act); break; - + case SE_12_LIGHT_SWITCH: handle_se12(act); break; diff --git a/source/games/duke/src/actors_r.cpp b/source/games/duke/src/actors_r.cpp index a144bc35d..902694bb5 100644 --- a/source/games/duke/src/actors_r.cpp +++ b/source/games/duke/src/actors_r.cpp @@ -222,7 +222,7 @@ void hitradius_r(DDukeActor* actor, int r, int hp1, int hp2, int hp3, int h if (actor->spr.xrepeat >= 11 || !(actor->spr.picnum == RPG || ((isRRRA()) && actor->spr.picnum == RPG2))) { BFSSectorSearch search(actor->spr.sector()); - + while (auto dasectp = search.GetNext()) { if (((dasectp->ceilingz - actor->spr.pos.Z) >> 8) < r) @@ -239,7 +239,7 @@ void hitradius_r(DDukeActor* actor, int r, int hp1, int hp2, int hp3, int h fi.checkhitceiling(dasectp); } } - + for (auto& wal : wallsofsector(dasectp)) { if ((abs(wal.pos.X - actor->spr.pos.X) + abs(wal.pos.Y - actor->spr.pos.Y)) < r) @@ -613,7 +613,7 @@ void movefta_r(void) // //--------------------------------------------------------------------------- - + DDukeActor* ifhitsectors_r(sectortype* sect) { DukeStatIterator it(STAT_MISC); @@ -2792,7 +2792,7 @@ void moveactors_r(void) int x; int p; Collision coll; - + dojaildoor(); moveminecart(); @@ -2814,7 +2814,7 @@ void moveactors_r(void) } auto sectp = act->spr.sector(); - + switch(act->spr.picnum) { case RESPAWNMARKERRED: @@ -3021,7 +3021,7 @@ void moveactors_r(void) case HEAVYHBOMB: heavyhbomb(act); continue; - + case REACTORBURNT: case REACTOR2BURNT: continue; @@ -3068,7 +3068,7 @@ void moveexplosions_r(void) // STATNUM 5 int p; int x, * t; - + DukeStatIterator it(STAT_MISC); while (auto act = it.Next()) { @@ -3238,7 +3238,7 @@ void moveexplosions_r(void) // STATNUM 5 case DUKELEG: if (!jibs(act, JIBS6, false, true, true, act->spr.picnum == DUKELEG || act->spr.picnum == DUKETORSO || act->spr.picnum == DUKEGUN, isRRRA() && (act->spr.picnum == RRTILE2465 || act->spr.picnum == RRTILE2560))) continue; - + if (act->spr.sector()->lotag == 800) if (act->spr.pos.Z >= act->spr.sector()->floorz - (8 << 8)) { @@ -3429,11 +3429,11 @@ void moveeffectors_r(void) //STATNUM 3 case SE_0_ROTATING_SECTOR: handle_se00(act, -1); break; - + case SE_1_PIVOT: //Nothing for now used as the pivot handle_se01(act); break; - + case SE_6_SUBWAY: handle_se06_r(act); break; @@ -3477,7 +3477,7 @@ void moveeffectors_r(void) //STATNUM 3 case SE_11_SWINGING_DOOR: handle_se11(act); break; - + case SE_12_LIGHT_SWITCH: handle_se12(act); break; @@ -3485,11 +3485,11 @@ void moveeffectors_r(void) //STATNUM 3 case SE_47_LIGHT_SWITCH: if (isRRRA()) handle_se12(act, 1); break; - + case SE_48_LIGHT_SWITCH: if (isRRRA()) handle_se12(act, 2); break; - + case SE_13_EXPLOSIVE: handle_se13(act); diff --git a/source/games/duke/src/cheats.cpp b/source/games/duke/src/cheats.cpp index 795c60705..54730837a 100644 --- a/source/games/duke/src/cheats.cpp +++ b/source/games/duke/src/cheats.cpp @@ -297,7 +297,7 @@ static bool cheatLevel(cheatseq_t *s) int volnume,levnume; volnume = s->Args[0] - '0'; levnume = (s->Args[1] - '0')*10+(s->Args[2]-'0'); - + // Instead of hard coded range checks on volume and level, let's just check if the level is defined. auto map = FindMapByIndex(volnume, levnume); if (map) diff --git a/source/games/duke/src/conlabeldef.h b/source/games/duke/src/conlabeldef.h index 782680198..92e2aee22 100644 --- a/source/games/duke/src/conlabeldef.h +++ b/source/games/duke/src/conlabeldef.h @@ -62,7 +62,7 @@ LABELS walllabels[]= { "lotag", WALL_LOTAG, 0, 0 }, { "hitag", WALL_HITAG, 0, 0 }, { "extra", WALL_EXTRA, 0, 0 }, - + { "", -1, 0, 0 } // END OF LIST }; @@ -120,7 +120,7 @@ LABELS actorlabels[]= { "htg_t[5]", ACTOR_HTG_T5, 0, 0 }, { "", -1, 0, 0 } // END OF LIST - + }; @@ -261,9 +261,9 @@ LABELS playerlabels[]= { "pals", PLAYER_PALS, LABEL_HASPARM2, 3 }, { "max_actors_killed", PLAYER_MAX_ACTORS_KILLED, 0, 0 }, { "actors_killed", PLAYER_ACTORS_KILLED, 0, 0 }, - + { "", -1, 0, 0 } // END OF LIST - + }; /////////////////////////////////////// @@ -345,6 +345,6 @@ LABELS userdefslabels[]= { "mouseflip", USERDEFS_MOUSEFLIP, 0, 0 }, { "", -1, 0, 0 } // END OF LIST - + }; END_DUKE_NS diff --git a/source/games/duke/src/flags_d.cpp b/source/games/duke/src/flags_d.cpp index 346646f29..cb12fa4b5 100644 --- a/source/games/duke/src/flags_d.cpp +++ b/source/games/duke/src/flags_d.cpp @@ -86,20 +86,20 @@ void initactorflags_d() GREENSLIME+7, RAT, ROTATEGUN }); - + // Some flags taken from RedNukem's init code. This is a good start as any to reduce the insane dependency on tile numbers for making decisions in the play code. A lot more will be added here later. setflag(SFLAG_NODAMAGEPUSH, { TANK, BOSS1, BOSS2, BOSS3, BOSS4, RECON, ROTATEGUN }); setflag(SFLAG_BOSS, { BOSS1, BOSS2, BOSS3, BOSS4, BOSS4STAYPUT, BOSS1STAYPUT }); if (isWorldTour()) setflag(SFLAG_BOSS, { BOSS2STAYPUT, BOSS3STAYPUT, BOSS5, BOSS5STAYPUT }); setflag(SFLAG_NOWATERDIP, { OCTABRAIN, COMMANDER, DRONE }); setflag(SFLAG_GREENSLIMEFOOD, { LIZTROOP, LIZMAN, PIGCOP, NEWBEAST }); - + if (isWorldTour()) { setflag(SFLAG_INTERNAL_BADGUY, { FIREFLY }); setflag(SFLAG_INTERNAL_BADGUY|SFLAG_NODAMAGEPUSH|SFLAG_BOSS, { BOSS5 }); } - + settileflag(TFLAG_WALLSWITCH, { HANDPRINTSWITCH, HANDPRINTSWITCH+1, @@ -310,6 +310,6 @@ void initactorflags_d() TILE_EGG = EGG; } - - + + END_DUKE_NS diff --git a/source/games/duke/src/flags_r.cpp b/source/games/duke/src/flags_r.cpp index 88fa0f90b..ae70c79ba 100644 --- a/source/games/duke/src/flags_r.cpp +++ b/source/games/duke/src/flags_r.cpp @@ -73,7 +73,7 @@ void initactorflags_r() COOTSTAYPUT, SHARK, VIXEN}); - + if (isRRRA()) setflag(SFLAG_INTERNAL_BADGUY|SFLAG_KILLCOUNT, { SBSWIPE, BIKERB, diff --git a/source/games/duke/src/game_misc.cpp b/source/games/duke/src/game_misc.cpp index 3e5a3fbfc..657cfc7cb 100644 --- a/source/games/duke/src/game_misc.cpp +++ b/source/games/duke/src/game_misc.cpp @@ -177,7 +177,7 @@ void V_AddBlend (float r, float g, float b, float a, float v_blend[4]) b = clamp(b/255.f, 0.f, 0.25f); a = clamp(a/255.f, 0.f, 0.25f); - + float a2, a3; if (a <= 0) @@ -190,7 +190,7 @@ void V_AddBlend (float r, float g, float b, float a, float v_blend[4]) v_blend[2] = v_blend[2]*a3 + b*(1-a3); v_blend[3] = a2; } - + //--------------------------------------------------------------------------- // // diff --git a/source/games/duke/src/gamedef.cpp b/source/games/duke/src/gamedef.cpp index 71de56316..3d65247fc 100644 --- a/source/games/duke/src/gamedef.cpp +++ b/source/games/duke/src/gamedef.cpp @@ -313,12 +313,12 @@ int ConCompiler::getkeyword(const char* text) { ptrdiff_t min = 0; ptrdiff_t max = countof(cmdList) - 1; - + while (min <= max) { auto mid = (min + max) >> 1; const int comp = strcmp(text, cmdList[mid].cmd); - + if (comp == 0) { return cmdList[mid].instr; @@ -1218,7 +1218,7 @@ int ConCompiler::parsecommand() while (keyword() == -1) { transnum(LABEL_DEFINE); - + j |= popscriptvalue(); } appendscriptvalue(j); @@ -1451,7 +1451,7 @@ int ConCompiler::parsecommand() ReportError(ERROR_NOTAGAMEDEF); return 0; } - + appendscriptvalue(i); // the ID of the DEF (offset into array...) return 0; @@ -1782,7 +1782,7 @@ int ConCompiler::parsecommand() Printf(TEXTCOLOR_RED " * ERROR!(%s, line %d) Quote number exceeds limit of %d.\n", fn, line_number, MAXQUOTES); errorcount++; } - + i = 0; while (*textptr == ' ' || *textptr == '\t') textptr++; diff --git a/source/games/duke/src/gameexec.cpp b/source/games/duke/src/gameexec.cpp index a653ec77c..fbf5602e1 100644 --- a/source/games/duke/src/gameexec.cpp +++ b/source/games/duke/src/gameexec.cpp @@ -2600,7 +2600,7 @@ int ParseState::parse(void) break; // out of switch } DPrintf(DMSG_NOTIFY, "ADDLOGVAR: "); - + if( aGameVars[*insptr].dwFlags & GAMEVAR_FLAG_READONLY) { DPrintf(DMSG_NOTIFY, " (read-only)"); @@ -2646,7 +2646,7 @@ int ParseState::parse(void) insptr++; break; } - + case concmd_addvarvar: { int i; insptr++; diff --git a/source/games/duke/src/gameloop.cpp b/source/games/duke/src/gameloop.cpp index 05e322a49..cb2be5f9a 100644 --- a/source/games/duke/src/gameloop.cpp +++ b/source/games/duke/src/gameloop.cpp @@ -71,7 +71,7 @@ void GameInterface::Ticker() global_random = krand(); movedummyplayers();//ST 13 - + for (int i = connecthead; i >= 0; i = connectpoint2[i]) { if (playrunning()) @@ -85,7 +85,7 @@ void GameInterface::Ticker() fi.checksectors(i); } } - + fi.think(); if ((everyothertime & 1) == 0) diff --git a/source/games/duke/src/gamevar.cpp b/source/games/duke/src/gamevar.cpp index 575ed49a0..de657789f 100644 --- a/source/games/duke/src/gamevar.cpp +++ b/source/games/duke/src/gamevar.cpp @@ -346,7 +346,7 @@ GameVarValue GetGameVarID(int id, DDukeActor* sActor, int sPlayer) { return aGameVars[id].lValue; } - + } //--------------------------------------------------------------------------- @@ -399,7 +399,7 @@ void SetGameVarID(int id, GameVarValue lValue, DDukeActor* sActor, int sPlayer) { aGameVars[id].lValue=lValue; } - + } void SetGameVarID(int id, int lValue, DDukeActor* sActor, int sPlayer) @@ -456,7 +456,7 @@ int GetGameValuePtr(char *szGameLabel) } I_FatalError("%s was overridden to something other than a player gamevar.", szGameLabel); return -1; - + } //--------------------------------------------------------------------------- @@ -1186,7 +1186,7 @@ void AddSystemVars() AddGameVar("TRIPBOMB_CONTROL", TRIPBOMB_TRIPWIRE, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM); - + AddGameVar("WEAPON", 0, GAMEVAR_FLAG_READONLY | GAMEVAR_FLAG_SYSTEM); AddGameVar("WORKSLIKE", 0, GAMEVAR_FLAG_READONLY | GAMEVAR_FLAG_SYSTEM); AddGameVar("RETURN", 0, GAMEVAR_FLAG_SYSTEM); @@ -1258,6 +1258,6 @@ void SetupGameVarsForActor(DDukeActor* actor) } } } - + END_DUKE_NS diff --git a/source/games/duke/src/hudweapon_d.cpp b/source/games/duke/src/hudweapon_d.cpp index 4c7ef2d90..7d65ca72c 100644 --- a/source/games/duke/src/hudweapon_d.cpp +++ b/source/games/duke/src/hudweapon_d.cpp @@ -38,7 +38,7 @@ source as it is released. #include "dukeactor.h" BEGIN_DUKE_NS - + inline static double getavel(int snum) { return PlayerInputAngVel(snum) * (2048. / 360.); diff --git a/source/games/duke/src/player_d.cpp b/source/games/duke/src/player_d.cpp index 143cda9ba..fa64317b8 100644 --- a/source/games/duke/src/player_d.cpp +++ b/source/games/duke/src/player_d.cpp @@ -737,7 +737,7 @@ static void shootrpg(DDukeActor *actor, int p, int sx, int sy, int sz, int sa, i sz - (1 << 8), atwith, 0, 14, 14, sa, vel, zvel, actor, 4); if (!spawned) return; - + spawned->spr.extra += (krand() & 7); if (atwith != FREEZEBLAST) spawned->temp_actor = aimed; @@ -886,7 +886,7 @@ static void shootlaser(DDukeActor* actor, int p, int sx, int sy, int sz, int sa) - lLifetimeVar; } } - + // this originally used the sprite index as tag to link the laser segments. // This value is never used again to reference an actor by index. Decouple this for robustness. ud.bomb_tag = (ud.bomb_tag + 1) & 32767; @@ -897,7 +897,7 @@ static void shootlaser(DDukeActor* actor, int p, int sx, int sy, int sz, int sa) bomb->spr.cstat = CSTAT_SPRITE_ALIGNMENT_WALL; auto delta = hit.hitWall->delta(); bomb->temp_data[5] = bomb->spr.ang = getangle(-delta.X, -delta.Y) - 512; - + if (p >= 0) ps[p].ammo_amount[TRIPBOMB_WEAPON]--; } diff --git a/source/games/duke/src/player_w.cpp b/source/games/duke/src/player_w.cpp index 5379b5d8d..28d42fc77 100644 --- a/source/games/duke/src/player_w.cpp +++ b/source/games/duke/src/player_w.cpp @@ -110,10 +110,10 @@ void DoSpawn(struct player_struct *p, int snum) { if(!aplWeaponSpawn(p->curr_weapon, snum)) return; - + auto j = spawn(p->GetActor(), aplWeaponSpawn(p->curr_weapon, snum)); if (!j) return; - + if((aplWeaponFlags(p->curr_weapon, snum) & WEAPON_FLAG_SPAWNTYPE2 ) ) { // like shotgun shells @@ -131,7 +131,7 @@ void DoSpawn(struct player_struct *p, int snum) j->spr.pos.Z += (3<<8); ssp(j,CLIPMASK0); } - + } //--------------------------------------------------------------------------- diff --git a/source/games/duke/src/prediction.cpp b/source/games/duke/src/prediction.cpp index 0f4682319..7b29dcce4 100644 --- a/source/games/duke/src/prediction.cpp +++ b/source/games/duke/src/prediction.cpp @@ -273,7 +273,7 @@ void fakedomovethings(void) if(shrunk) j = 512; else j = 2048; - + if ((sb_snum&1) && !(p->OnMotorcycle || p->OnBoat)) myz -= j; if ((sb_snum&(1<<1)) && !(p->OnMotorcycle || p->OnBoat)) diff --git a/source/games/duke/src/premap.cpp b/source/games/duke/src/premap.cpp index e2f8b55ef..746fbe8af 100644 --- a/source/games/duke/src/premap.cpp +++ b/source/games/duke/src/premap.cpp @@ -980,7 +980,7 @@ static int LoadTheMap(MapRecord *mi, struct player_struct *p, int gamemode) gotpic.Zero(); auto actorlist = spawnactors(sprites); - + if (isRR()) prelevel_r(gamemode, actorlist); else prelevel_d(gamemode, actorlist); diff --git a/source/games/duke/src/premap_d.cpp b/source/games/duke/src/premap_d.cpp index 4c1623565..609e2bb51 100644 --- a/source/games/duke/src/premap_d.cpp +++ b/source/games/duke/src/premap_d.cpp @@ -178,7 +178,7 @@ static void cachespritenum(DDukeActor* actor) static void cachegoodsprites(void) { int i; - + tloadtile(BOTTOMSTATUSBAR); if (ud.multimode > 1) { diff --git a/source/games/duke/src/premap_r.cpp b/source/games/duke/src/premap_r.cpp index e7d8a7942..b8444af50 100644 --- a/source/games/duke/src/premap_r.cpp +++ b/source/games/duke/src/premap_r.cpp @@ -710,7 +710,7 @@ void prelevel_r(int g, TArray& actors) { walltype* wal = &wl; - + if (wal->overpicnum == MIRROR && (wal->cstat & CSTAT_WALL_1WAY) != 0) { auto sectp = wal->nextSector(); diff --git a/source/games/duke/src/sectors.cpp b/source/games/duke/src/sectors.cpp index bc3e30293..3a1877d43 100644 --- a/source/games/duke/src/sectors.cpp +++ b/source/games/duke/src/sectors.cpp @@ -527,7 +527,7 @@ static void handle_st09(sectortype* sptr, DDukeActor* actor) for (int j = 0; j < 2; j++) { auto wal = wallfind[j]; - + //find what direction door should open by averaging the // 2 neighboring points of wallfind[0] & wallfind[1]. auto prevwall = wal - 1; @@ -813,7 +813,7 @@ static void handle_st22(sectortype* sptr, DDukeActor* actor) static void handle_st23(sectortype* sptr, DDukeActor* actor) { int q = 0; - + DukeStatIterator it(STAT_EFFECTOR); DDukeActor* act2; while ((act2 = it.Next())) @@ -875,7 +875,7 @@ static void handle_st25(sectortype* sptr, DDukeActor* actor) break; } } - + if (act2 == nullptr) return; diff --git a/source/games/duke/src/sectors_d.cpp b/source/games/duke/src/sectors_d.cpp index 8b3ed84d4..5af5b9af9 100644 --- a/source/games/duke/src/sectors_d.cpp +++ b/source/games/duke/src/sectors_d.cpp @@ -234,7 +234,7 @@ bool checkhitswitch_d(int snum, walltype* wwal, DDukeActor *act) if (wwal == nullptr && act == nullptr) return 0; correctdips = 1; numdips = 0; - + if (act) { lotag = act->spr.lotag; @@ -1610,7 +1610,7 @@ void checksectors_d(int snum) S_PlayActorSound(hitscanwall->lotag, pact); return; } - + if (hitscanwall != nullptr && (hitscanwall->cstat & CSTAT_WALL_MASKED)) if (hitscanwall->lotag) return; diff --git a/source/games/duke/src/sectors_r.cpp b/source/games/duke/src/sectors_r.cpp index 80aa2756c..0ec80cdf6 100644 --- a/source/games/duke/src/sectors_r.cpp +++ b/source/games/duke/src/sectors_r.cpp @@ -25,7 +25,7 @@ Original Source: 1996 - Todd Replogle Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms */ //------------------------------------------------------------------------- - + #include "ns.h" #include "global.h" #include "sounds.h" @@ -164,7 +164,7 @@ bool isablockdoor(int dapic) case RRTILE3827: case RRTILE3837: return true; - + case RRTILE1996: case RRTILE2382: case RRTILE2961: @@ -2539,11 +2539,11 @@ void checksectors_r(int snum) return; } } - + if ((hitscanwall->cstat & CSTAT_WALL_MASKED)) if (hitscanwall->lotag) return; - + } if (isRRRA()) { diff --git a/source/games/duke/src/sounds.cpp b/source/games/duke/src/sounds.cpp index a2fbb5862..e988717c8 100644 --- a/source/games/duke/src/sounds.cpp +++ b/source/games/duke/src/sounds.cpp @@ -387,7 +387,7 @@ void GameInterface::UpdateSounds(void) vec3_t* c; int32_t ca; sectortype* cs; - + if (isRR() && !Mus_IsPlaying() && !paused && gamestate == GS_LEVEL) S_PlayRRMusic(); @@ -522,7 +522,7 @@ int S_PlaySound3D(int sndnum, DDukeActor* actor, const vec3_t* pos, int channel, int S_PlaySound(int sndnum, int channel, EChanFlags flags, float vol) { if (!soundEngine->isValidSoundId(sndnum+1) || !SoundEnabled()) return -1; - + sndnum = GetReplacementSound(sndnum); int userflags = S_GetUserFlags(sndnum); diff --git a/source/games/duke/src/spawn.cpp b/source/games/duke/src/spawn.cpp index ffdd0be86..0b6eb699e 100644 --- a/source/games/duke/src/spawn.cpp +++ b/source/games/duke/src/spawn.cpp @@ -617,7 +617,7 @@ void spawneffector(DDukeActor* actor, TArray* actors) case SE_23_ONE_WAY_TELEPORT:// XPTR END if (actor->spr.lotag != SE_23_ONE_WAY_TELEPORT && actors) { - + for(auto act2 : *actors) { if (act2->spr.statnum < MAXSTATUS && act2->spr.picnum == SECTOREFFECTOR && (act2->spr.lotag == SE_7_TELEPORT || act2->spr.lotag == SE_23_ONE_WAY_TELEPORT) && @@ -924,7 +924,7 @@ void spawneffector(DDukeActor* actor, TArray* actors) sectp->hitagactor = actor; } - + bool found = false; if (actors) for(auto act2 : *actors) { @@ -1175,7 +1175,7 @@ void lotsofcolourglass(DDukeActor* actor, walltype* wal, int n) } return; } - + int x1 = wal->pos.X; int y1 = wal->pos.Y; diff --git a/source/games/duke/src/types.h b/source/games/duke/src/types.h index 646f306b5..ebfdc413c 100644 --- a/source/games/duke/src/types.h +++ b/source/games/duke/src/types.h @@ -48,7 +48,7 @@ public: // Some SE's stored indices in temp_data. For purposes of clarity avoid that. These variables are meant to store these elements now walltype* temp_walls[2]; // SE20 + SE128 sectortype* temp_sect, *actorstayput; - + TObjPtr temp_actor, seek_actor; TArray uservars; @@ -172,7 +172,7 @@ struct CraneDef struct player_struct { // This is basically the version from JFDuke but this first block contains a few changes to make it work with other parts of Raze. - + // The sound code wants to read a vector out of this so we need to define one for the main coordinate. vec3_t pos, opos; diff --git a/source/games/exhumed/src/aistuff.h b/source/games/exhumed/src/aistuff.h index df45563ff..68424cc4d 100644 --- a/source/games/exhumed/src/aistuff.h +++ b/source/games/exhumed/src/aistuff.h @@ -307,7 +307,7 @@ struct RA { TObjPtr pActor; TObjPtr pTarget; - + int16_t nAction; int16_t nFrame; int16_t nRun; diff --git a/source/games/exhumed/src/bullet.cpp b/source/games/exhumed/src/bullet.cpp index 7a5491754..65bdffe1e 100644 --- a/source/games/exhumed/src/bullet.cpp +++ b/source/games/exhumed/src/bullet.cpp @@ -166,7 +166,7 @@ void IgniteSprite(DExhumedActor* pActor) pActor->spr.hitag += 2; auto pAnimActor = BuildAnim(nullptr, 38, 0, pActor->spr.pos.X, pActor->spr.pos.Y, pActor->spr.pos.Z, pActor->spr.sector(), 40, 20); - + if (pAnimActor) { pAnimActor->pTarget = pActor; diff --git a/source/games/exhumed/src/exhumed.cpp b/source/games/exhumed/src/exhumed.cpp index 30dcbef1a..5351c2f0d 100644 --- a/source/games/exhumed/src/exhumed.cpp +++ b/source/games/exhumed/src/exhumed.cpp @@ -517,7 +517,7 @@ void GameInterface::app_init() InitFX(); seq_LoadSequences(); InitStatus(); - + resettiming(); GrabPalette(); diff --git a/source/games/exhumed/src/gameloop.cpp b/source/games/exhumed/src/gameloop.cpp index 5ff8b8e25..3a4cfbf07 100644 --- a/source/games/exhumed/src/gameloop.cpp +++ b/source/games/exhumed/src/gameloop.cpp @@ -120,9 +120,9 @@ void GameInterface::NextLevel(MapRecord *map, int skill) { nBestLevel = map->levelNumber - 1; } - + STAT_NewLevel(currentLevel->labelName); - + } //--------------------------------------------------------------------------- diff --git a/source/games/exhumed/src/gun.cpp b/source/games/exhumed/src/gun.cpp index 4d26ca7c6..98ba5b310 100644 --- a/source/games/exhumed/src/gun.cpp +++ b/source/games/exhumed/src/gun.cpp @@ -58,7 +58,7 @@ void SerializeGun(FSerializer& arc) arc.Array("temperature", nTemperature, kMaxPlayers) ("isred", isRed) .EndObject(); - + } } diff --git a/source/games/exhumed/src/light.cpp b/source/games/exhumed/src/light.cpp index 936e99a97..f71c83acd 100644 --- a/source/games/exhumed/src/light.cpp +++ b/source/games/exhumed/src/light.cpp @@ -72,7 +72,7 @@ int LoadPaletteLookups() hFile.Read(buffer, 256*64); lookups.setTable(i, buffer); - + bGreenPal = 0; // These 3 tables do not have normal gradients. The others work without adjustment. diff --git a/source/games/exhumed/src/lighting.cpp b/source/games/exhumed/src/lighting.cpp index b9022fbe5..fa817a397 100644 --- a/source/games/exhumed/src/lighting.cpp +++ b/source/games/exhumed/src/lighting.cpp @@ -611,7 +611,7 @@ void DoFlickers() for (int i = 0; i < nFlickerCount; i++) { auto pSector = sFlicker[i].pSector; - + unsigned int eax = (sFlicker[i].nMask & 1); unsigned int edx = (sFlicker[i].nMask & 1) << 31; unsigned int ebp = sFlicker[i].nMask >> 1; diff --git a/source/games/exhumed/src/move.cpp b/source/games/exhumed/src/move.cpp index ccbc6c0a9..adbfb3c6a 100644 --- a/source/games/exhumed/src/move.cpp +++ b/source/games/exhumed/src/move.cpp @@ -290,7 +290,7 @@ int BelowNear(DExhumedActor* pActor, int x, int y, int walldist) } } } - + if (z2 < pActor->spr.pos.Z) { diff --git a/source/games/exhumed/src/object.cpp b/source/games/exhumed/src/object.cpp index c09626696..fb3adeb1b 100644 --- a/source/games/exhumed/src/object.cpp +++ b/source/games/exhumed/src/object.cpp @@ -1562,7 +1562,7 @@ DExhumedActor* BuildEnergyBlock(sectortype* pSector) { int x = 0; int y = 0; - + for(auto& wal : wallsofsector(pSector)) { x += wal.pos.X; diff --git a/source/games/exhumed/src/player.cpp b/source/games/exhumed/src/player.cpp index cf5ca61e6..37df54349 100644 --- a/source/games/exhumed/src/player.cpp +++ b/source/games/exhumed/src/player.cpp @@ -1259,7 +1259,7 @@ sectdone: PlayerList[nPlayer].nBreathTimer = 1; } - + PlayerList[nPlayer].nBreathTimer--; if (PlayerList[nPlayer].nBreathTimer <= 0) { diff --git a/source/games/exhumed/src/queen.cpp b/source/games/exhumed/src/queen.cpp index 6c177a0fe..9e8f6f369 100644 --- a/source/games/exhumed/src/queen.cpp +++ b/source/games/exhumed/src/queen.cpp @@ -755,7 +755,7 @@ void AIQueenHead::Tick(RunListEvent* ev) { DExhumedActor* pActor = QueenHead.pActor; if (!pActor) return; - + int nAction = QueenHead.nAction; int nHd; int var_14 = 0; diff --git a/source/games/exhumed/src/ra.cpp b/source/games/exhumed/src/ra.cpp index f045fcf23..2e52780fe 100644 --- a/source/games/exhumed/src/ra.cpp +++ b/source/games/exhumed/src/ra.cpp @@ -162,7 +162,7 @@ void MoveRaToEnemy(int nPlayer) pActor->spr.cstat = CSTAT_SPRITE_INVISIBLE; pTarget = PlayerList[nPlayer].pActor; } - + pActor->spr.pos.X = pTarget->spr.pos.X; pActor->spr.pos.Y = pTarget->spr.pos.Y; pActor->spr.pos.Z = pTarget->spr.pos.Z - GetActorHeight(pTarget); diff --git a/source/games/exhumed/src/roach.cpp b/source/games/exhumed/src/roach.cpp index b3235a324..326721712 100644 --- a/source/games/exhumed/src/roach.cpp +++ b/source/games/exhumed/src/roach.cpp @@ -113,7 +113,7 @@ void AIRoach::RadialDamage(RunListEvent* ev) { auto pActor = ev->pObjActor; if (!pActor) return; - + ev->nDamage = runlist_CheckRadialDamage(pActor); Damage(ev); } diff --git a/source/games/exhumed/src/runlist.cpp b/source/games/exhumed/src/runlist.cpp index cab42995a..eabbaee2a 100644 --- a/source/games/exhumed/src/runlist.cpp +++ b/source/games/exhumed/src/runlist.cpp @@ -616,7 +616,7 @@ void runlist_ProcessSectorTag(sectortype* pSector, int nLotag, int nHitag) closest (next) ceiling starting at the given z-coordinate (thez). */ auto nextSectorP = safenextsectorneighborzptr(pSector, pSector->ceilingz, -1, -1); - + int nElev = BuildElevC(0, nChannel, pSector, FindWallSprites(pSector), nSpeed * 100, nSpeed * 100, 2, pSector->floorz, nextSectorP->ceilingz); @@ -635,7 +635,7 @@ void runlist_ProcessSectorTag(sectortype* pSector, int nLotag, int nHitag) case 2: // Floor Doom door { auto nextSectorP = safenextsectorneighborzptr(pSector, pSector->floorz, 1, 1); - + int nElev = BuildElevF(nChannel, pSector, FindWallSprites(pSector), nSpeed * 100, nSpeed * 100, 2, pSector->ceilingz, nextSectorP->floorz); @@ -1334,7 +1334,7 @@ void runlist_ProcessSectorTag(sectortype* pSector, int nLotag, int nHitag) } auto nextSectorP = safenextsectorneighborzptr(pSector, pSector->ceilingz, -1, -1); - + int nElev = BuildElevC(0, nChannel, pSector, FindWallSprites(pSector), nSpeed * 100, nSpeed * 100, 2, pSector->floorz, nextSectorP->ceilingz); diff --git a/source/games/exhumed/src/snake.cpp b/source/games/exhumed/src/snake.cpp index aca6b3045..ee314f6c3 100644 --- a/source/games/exhumed/src/snake.cpp +++ b/source/games/exhumed/src/snake.cpp @@ -259,7 +259,7 @@ DExhumedActor* FindSnakeEnemy(int nSnake) { int nPlayer = SnakeList[nSnake].nSnakePlayer; auto pPlayerActor = PlayerList[nPlayer].pActor; - + DExhumedActor* pActor = SnakeList[nSnake].pSprites[0]; // CHECKME if (!pActor) return nullptr; diff --git a/source/games/exhumed/src/switch.cpp b/source/games/exhumed/src/switch.cpp index b8dc2bdee..050098628 100644 --- a/source/games/exhumed/src/switch.cpp +++ b/source/games/exhumed/src/switch.cpp @@ -45,7 +45,7 @@ struct Switch int16_t nWait; int16_t nRunPtr; int16_t nRun2; - + int16_t nRun3; uint16_t nKeyMask; }; diff --git a/source/games/sw/src/cache.cpp b/source/games/sw/src/cache.cpp index 124da97fa..1c43a777f 100644 --- a/source/games/sw/src/cache.cpp +++ b/source/games/sw/src/cache.cpp @@ -136,7 +136,7 @@ void SetupPreCache(void) { precacheMap(); - + // actors cache ranges are called from SpriteSetup // only caches the actor if its on the level diff --git a/source/games/sw/src/coolie.cpp b/source/games/sw/src/coolie.cpp index dc0ba81ac..4ec21a25f 100644 --- a/source/games/sw/src/coolie.cpp +++ b/source/games/sw/src/coolie.cpp @@ -375,7 +375,7 @@ void EnemyDefaults(DSWActor* actor, ACTOR_ACTION_SETp action, PERSONALITYp perso unsigned int wpn; int wpn_cnt; int depth = 0; - + switch (actor->user.ID) { case PACHINKO1: diff --git a/source/games/sw/src/d_menu.cpp b/source/games/sw/src/d_menu.cpp index 222093536..ad3a01d75 100644 --- a/source/games/sw/src/d_menu.cpp +++ b/source/games/sw/src/d_menu.cpp @@ -73,7 +73,7 @@ void GameInterface::MenuSound(EMenuSounds snd) case ChooseSound: PlaySound(DIGI_SWORDSWOOSH, v3df_dontpan, CHAN_BODY, CHANF_UI); break; - + case CloseSound: case BackSound: PlaySound(DIGI_STARCLINK, v3df_dontpan, CHAN_BODY, CHANF_UI); @@ -94,7 +94,7 @@ bool GameInterface::StartGame(FNewGameStartup& gs) PLAYERp pp = Player + screenpeek; int handle = 0; int zero = 0; - + CameraTestMode = false; StopAmbientSound(); diff --git a/source/games/sw/src/draw.cpp b/source/games/sw/src/draw.cpp index 0bb744001..c83f3f461 100644 --- a/source/games/sw/src/draw.cpp +++ b/source/games/sw/src/draw.cpp @@ -1079,7 +1079,7 @@ void PrintSpriteInfo(PLAYERp pp) Printf("COUNTER:%d, ", actor->user.Counter); Printf("COUNTER2:%d\n", actor->user.Counter); } - + { Printf("POSX:%d, ", actor->spr.pos.X); Printf("POSY:%d, ", actor->spr.pos.Y); @@ -1470,7 +1470,7 @@ void drawscreen(PLAYERp pp, double smoothratio) if (pp->Flags & (PF_VIEW_FROM_OUTSIDE)) { tz -= 8448; - + if (!calcChaseCamPos(&tx, &ty, &tz, pp->actor, &tsect, tang, thoriz, smoothratio)) { tz += 8448; diff --git a/source/games/sw/src/game.cpp b/source/games/sw/src/game.cpp index e731c7078..835cc74b4 100644 --- a/source/games/sw/src/game.cpp +++ b/source/games/sw/src/game.cpp @@ -278,7 +278,7 @@ void GameInterface::app_init() LoadCustomInfoFromScript("engine/swcustom.txt"); // load the internal definitions. These also apply to the shareware version. if (!SW_SHAREWARE) LoadCustomInfoFromScript("swcustom.txt"); // Load user customisation information - + SetTileNames(); userConfig.AddDefs.reset(); InitFX(); diff --git a/source/games/sw/src/game.h b/source/games/sw/src/game.h index 4769750f9..f9bd38c2b 100644 --- a/source/games/sw/src/game.h +++ b/source/games/sw/src/game.h @@ -603,7 +603,7 @@ struct PLAYERstruct { // variable that fit in the sprite or user structure vec3_t pos, opos; - + DSWActor* actor; // this may not be a TObjPtr! TObjPtr lowActor, highActor; TObjPtr remoteActor; @@ -643,7 +643,7 @@ struct PLAYERstruct int16_t circle_camera_ang; int16_t camera_check_time_delay; - + sectortype * cursector, * lastcursector, @@ -1026,7 +1026,7 @@ struct USER // Only have a place for actors // - + // scaling int16_t scale_speed; @@ -1147,35 +1147,35 @@ enum SPR_FALLING = BIT(6), // Actor is falling SPR_CLIMBING = BIT(7), // Actor is falling SPR_DEAD = BIT(8), // Actor is dying - + SPR_ZDIFF_MODE = BIT(10), // For following tracks at different z heights SPR_SPEED_UP = BIT(11), // For following tracks at different speeds SPR_SLOW_DOWN = BIT(12), // For following tracks at different speeds SPR_DONT_UPDATE_ANG = BIT(13), // For tracks - don't update the angle for a while - + SPR_SO_ATTACHED = BIT(14), // sprite is part of a sector object SPR_SUICIDE = BIT(15), // sprite is set to kill itself - + SPR_RUN_AWAY = BIT(16), // sprite is in "Run Away" track mode. SPR_FIND_PLAYER = BIT(17), // sprite is in "Find Player" track mode. - + SPR_SWIMMING = BIT(18), // Actor is swimming SPR_WAIT_FOR_PLAYER = BIT(19), // Track Mode - Actor is waiting for player to come close SPR_WAIT_FOR_TRIGGER = BIT(20), // Track Mode - Actor is waiting for player to trigger SPR_SLIDING = BIT(21), // Actor is sliding SPR_ON_SO_SECTOR = BIT(22), // sprite is on a sector object sector - + SPR_SHADE_DIR = BIT(23), // sprite is on a sector object sector SPR_XFLIP_TOGGLE = BIT(24), // sprite rotation xflip bit SPR_NO_SCAREDZ = BIT(25), // not afraid of falling - + SPR_SET_POS_DONT_KILL = BIT(26), // Don't kill sprites in MissileSetPos SPR_SKIP2 = BIT(27), // 20 moves ps SPR_SKIP4 = BIT(28), // 10 moves ps - + SPR_BOUNCE = BIT(29), // For shrapnel types that can bounce once SPR_UNDERWATER = BIT(30), // For missiles etc - + SPR_SHADOW = BIT(31), // Sprites that have shadows // User->Flags2 flags @@ -1221,7 +1221,7 @@ enum SECTFX_DIVE_AREA = BIT(7), // Diving area SECTFX_UNDERWATER = BIT(8), // Underwater area SECTFX_UNDERWATER2 = BIT(9), // Underwater area - + SECTFX_LIQUID_MASK = (BIT(10)|BIT(11)), // only valid for sectors with depth SECTFX_LIQUID_NONE = (0), SECTFX_LIQUID_LAVA = BIT(10), @@ -1460,7 +1460,7 @@ struct SECTOR_OBJECTstruct struct { int xmid, ymid, zmid; }; // midpoints of the sector object vec3_t pmid; }; - + TObjPtr so_actors[MAX_SO_SPRITE]; // hold the actors of the object TObjPtr match_event_actor; // spritenum of the match event sprite diff --git a/source/games/sw/src/hornet.cpp b/source/games/sw/src/hornet.cpp index dda6b7e1e..41325dbf1 100644 --- a/source/games/sw/src/hornet.cpp +++ b/source/games/sw/src/hornet.cpp @@ -340,7 +340,7 @@ int DoHornetMatchPlayerZ(DSWActor* actor) { int zdiff,zdist; int loz,hiz; - + int bound; // actor does a sine wave about actor->user.sz - this is the z mid point diff --git a/source/games/sw/src/interpso.cpp b/source/games/sw/src/interpso.cpp index 850b662f5..af33b6b79 100644 --- a/source/games/sw/src/interpso.cpp +++ b/source/games/sw/src/interpso.cpp @@ -237,7 +237,7 @@ void so_addinterpolation(SECTOR_OBJECTp sop) void so_setspriteinterpolation(SECTOR_OBJECTp sop, DSWActor* actor) { so_interp *interp = &so_interpdata[sop - SectorObject]; - + so_setpointinterpolation(interp, soi_sprx, actor); so_setpointinterpolation(interp, soi_spry, actor); if (!interp->hasvator) diff --git a/source/games/sw/src/jweapon.cpp b/source/games/sw/src/jweapon.cpp index aa48580bb..e47975a9e 100644 --- a/source/games/sw/src/jweapon.cpp +++ b/source/games/sw/src/jweapon.cpp @@ -2248,7 +2248,7 @@ int SpawnShell(DSWActor* actor, int ShellNum) actorNew->user.xchange = MOVEx(actorNew->spr.xvel, actorNew->spr.ang); actorNew->user.ychange = MOVEy(actorNew->spr.xvel, actorNew->spr.ang); actorNew->user.zchange = actorNew->spr.zvel; - + actorNew->user.jump_speed = 200; actorNew->user.jump_speed += RandomRange(400); actorNew->user.jump_speed = -actorNew->user.jump_speed; diff --git a/source/games/sw/src/light.cpp b/source/games/sw/src/light.cpp index dfa607428..f4d32f564 100644 --- a/source/games/sw/src/light.cpp +++ b/source/games/sw/src/light.cpp @@ -93,7 +93,7 @@ void DiffuseLighting(DSWActor* actor) int i; short count; short shade; - + // diffused lighting count = 0; SWStatIterator it(STAT_LIGHTING_DIFFUSE); diff --git a/source/games/sw/src/names2.h b/source/games/sw/src/names2.h index fea9509ad..40419a769 100644 --- a/source/games/sw/src/names2.h +++ b/source/games/sw/src/names2.h @@ -352,41 +352,41 @@ enum EPicnums COOLIE_CHARGE_R2 = COOLIE_CHARGE_R0 + (COOLIE_CHARGE_FRAMES * 2), COOLIE_CHARGE_R3 = COOLIE_CHARGE_R0 + (COOLIE_CHARGE_FRAMES * 3), COOLIE_CHARGE_R4 = COOLIE_CHARGE_R0 + (COOLIE_CHARGE_FRAMES * 4), - + COOLIE_RUN_R0 = 1400, COOLIE_RUN_R1 = COOLIE_RUN_R0 + (COOLIE_RUN_FRAMES * 1), COOLIE_RUN_R2 = COOLIE_RUN_R0 + (COOLIE_RUN_FRAMES * 2), COOLIE_RUN_R3 = COOLIE_RUN_R0 + (COOLIE_RUN_FRAMES * 3), COOLIE_RUN_R4 = COOLIE_RUN_R0 + (COOLIE_RUN_FRAMES * 4), - + COOLIE_PAIN_R0 = 1420, COOLIE_PAIN_R1 = COOLIE_PAIN_R0, //+ (COOLIE_PAIN_FRAMES * 1) COOLIE_PAIN_R2 = COOLIE_PAIN_R0, //+ (COOLIE_PAIN_FRAMES * 2) COOLIE_PAIN_R3 = COOLIE_PAIN_R0, //+ (COOLIE_PAIN_FRAMES * 3) COOLIE_PAIN_R4 = COOLIE_PAIN_R0, //+ (COOLIE_PAIN_FRAMES * 4) - + COOLG_RUN_R0 = 4277, COOLG_RUN_R1 = COOLG_RUN_R0 + (COOLG_RUN_FRAMES * 1), COOLG_RUN_R2 = COOLG_RUN_R0 + (COOLG_RUN_FRAMES * 2), COOLG_RUN_R3 = COOLG_RUN_R0 + (COOLG_RUN_FRAMES * 3), COOLG_RUN_R4 = COOLG_RUN_R0 + (COOLG_RUN_FRAMES * 4), - + COOLG_CLUB_R0 = 1451, COOLG_CLUB_R1 = COOLG_CLUB_R0 + (COOLG_CLUB_FRAMES * 1), COOLG_CLUB_R2 = COOLG_CLUB_R0 + (COOLG_CLUB_FRAMES * 2), COOLG_CLUB_R3 = COOLG_CLUB_R0 + (COOLG_CLUB_FRAMES * 3), COOLG_CLUB_R4 = COOLG_CLUB_R0 + (COOLG_CLUB_FRAMES * 4), - + COOLG_FIRE_R0 = 4297, COOLG_FIRE_R1 = COOLG_FIRE_R0 + (COOLG_FIRE_FRAMES * 1), COOLG_FIRE_R2 = COOLG_FIRE_R0 + (COOLG_FIRE_FRAMES * 2), - + COOLG_PAIN_R0 = 4306, COOLG_PAIN_R1 = COOLG_PAIN_R0, //+ (COOLIE_PAIN_FRAMES * 1) COOLG_PAIN_R2 = COOLG_PAIN_R0, //+ (COOLIE_PAIN_FRAMES * 2) COOLG_PAIN_R3 = COOLG_PAIN_R0, //+ (COOLIE_PAIN_FRAMES * 3) COOLG_PAIN_R4 = COOLG_PAIN_R0, //+ (COOLIE_PAIN_FRAMES * 4) - + COOLIE_DEAD_NOHEAD = 1440, COOLIE_DEAD_HEAD = 4267, COOLIE_DIE = 4260, @@ -403,69 +403,69 @@ enum EPicnums PLAYER_NINJA_SHOOT_R2 = PLAYER_NINJA_SHOOT_R0 + (PLAYER_NINJA_SHOOT_FRAMES * 3), PLAYER_NINJA_SHOOT_R3 = PLAYER_NINJA_SHOOT_R0 + (PLAYER_NINJA_SHOOT_FRAMES * 4), PLAYER_NINJA_SHOOT_R4 = PLAYER_NINJA_SHOOT_R0 + (PLAYER_NINJA_SHOOT_FRAMES * 1), - + PLAYER_NINJA_RUN_R0 = 1094, PLAYER_NINJA_RUN_R1 = PLAYER_NINJA_RUN_R0 + (PLAYER_NINJA_RUN_FRAMES * 1), PLAYER_NINJA_RUN_R2 = PLAYER_NINJA_RUN_R0 + (PLAYER_NINJA_RUN_FRAMES * 2), PLAYER_NINJA_RUN_R3 = PLAYER_NINJA_RUN_R0 + (PLAYER_NINJA_RUN_FRAMES * 3), PLAYER_NINJA_RUN_R4 = PLAYER_NINJA_RUN_R0 + (PLAYER_NINJA_RUN_FRAMES * 4), - + ZOMBIE_RUN_R0 = PLAYER_NINJA_RUN_R0+1, - + PLAYER_NINJA_STAND_R0 = PLAYER_NINJA_RUN_R0, PLAYER_NINJA_STAND_R1 = PLAYER_NINJA_RUN_R1, PLAYER_NINJA_STAND_R2 = PLAYER_NINJA_RUN_R2, PLAYER_NINJA_STAND_R3 = PLAYER_NINJA_RUN_R3, PLAYER_NINJA_STAND_R4 = PLAYER_NINJA_RUN_R4, - + PLAYER_NINJA_JUMP_R0 = 1074, PLAYER_NINJA_JUMP_R1 = PLAYER_NINJA_JUMP_R0 + (PLAYER_NINJA_JUMP_FRAMES * 1), PLAYER_NINJA_JUMP_R2 = PLAYER_NINJA_JUMP_R0 + (PLAYER_NINJA_JUMP_FRAMES * 2), PLAYER_NINJA_JUMP_R3 = PLAYER_NINJA_JUMP_R0 + (PLAYER_NINJA_JUMP_FRAMES * 3), PLAYER_NINJA_JUMP_R4 = PLAYER_NINJA_JUMP_R0 + (PLAYER_NINJA_JUMP_FRAMES * 4), - + PLAYER_NINJA_FALL_R0 = PLAYER_NINJA_JUMP_R0+2, PLAYER_NINJA_FALL_R1 = PLAYER_NINJA_JUMP_R1+2, PLAYER_NINJA_FALL_R2 = PLAYER_NINJA_JUMP_R2+2, PLAYER_NINJA_FALL_R3 = PLAYER_NINJA_JUMP_R3+2, PLAYER_NINJA_FALL_R4 = PLAYER_NINJA_JUMP_R4+2, - + PLAYER_NINJA_CLIMB_R0 = 1024, PLAYER_NINJA_CLIMB_R1 = PLAYER_NINJA_CLIMB_R0 + (PLAYER_NINJA_CLIMB_FRAMES * 1), PLAYER_NINJA_CLIMB_R2 = PLAYER_NINJA_CLIMB_R0 + (PLAYER_NINJA_CLIMB_FRAMES * 2), PLAYER_NINJA_CLIMB_R3 = PLAYER_NINJA_CLIMB_R0 + (PLAYER_NINJA_CLIMB_FRAMES * 3), PLAYER_NINJA_CLIMB_R4 = PLAYER_NINJA_CLIMB_R0 + (PLAYER_NINJA_CLIMB_FRAMES * 4), - + PLAYER_NINJA_CRAWL_R0 = 1044, PLAYER_NINJA_CRAWL_R1 = PLAYER_NINJA_CRAWL_R0 + (PLAYER_NINJA_CRAWL_FRAMES * 1), PLAYER_NINJA_CRAWL_R2 = PLAYER_NINJA_CRAWL_R0 + (PLAYER_NINJA_CRAWL_FRAMES * 2), PLAYER_NINJA_CRAWL_R3 = PLAYER_NINJA_CRAWL_R0 + (PLAYER_NINJA_CRAWL_FRAMES * 3), PLAYER_NINJA_CRAWL_R4 = PLAYER_NINJA_CRAWL_R0 + (PLAYER_NINJA_CRAWL_FRAMES * 4), - + PLAYER_NINJA_SWIM_R0 = 1114, PLAYER_NINJA_SWIM_R1 = PLAYER_NINJA_SWIM_R0 + (PLAYER_NINJA_SWIM_FRAMES * 1), PLAYER_NINJA_SWIM_R2 = PLAYER_NINJA_SWIM_R0 + (PLAYER_NINJA_SWIM_FRAMES * 2), PLAYER_NINJA_SWIM_R3 = PLAYER_NINJA_SWIM_R0 + (PLAYER_NINJA_SWIM_FRAMES * 3), PLAYER_NINJA_SWIM_R4 = PLAYER_NINJA_SWIM_R0 + (PLAYER_NINJA_SWIM_FRAMES * 4), - + PLAYER_NINJA_SWORD_R0 = 1161, PLAYER_NINJA_SWORD_R1 = PLAYER_NINJA_SWORD_R0 + (PLAYER_NINJA_SWORD_FRAMES * 1), PLAYER_NINJA_SWORD_R2 = PLAYER_NINJA_SWORD_R0 + (PLAYER_NINJA_SWORD_FRAMES * 2), PLAYER_NINJA_SWORD_R3 = PLAYER_NINJA_SWORD_R0 + (PLAYER_NINJA_SWORD_FRAMES * 3), PLAYER_NINJA_SWORD_R4 = PLAYER_NINJA_SWORD_R0 + (PLAYER_NINJA_SWORD_FRAMES * 4), - + PLAYER_NINJA_PUNCH_R0 = 1176, PLAYER_NINJA_PUNCH_R1 = PLAYER_NINJA_PUNCH_R0 + (PLAYER_NINJA_PUNCH_FRAMES * 1), PLAYER_NINJA_PUNCH_R2 = PLAYER_NINJA_PUNCH_R0 + (PLAYER_NINJA_PUNCH_FRAMES * 2), PLAYER_NINJA_PUNCH_R3 = PLAYER_NINJA_PUNCH_R0 + (PLAYER_NINJA_PUNCH_FRAMES * 3), PLAYER_NINJA_PUNCH_R4 = PLAYER_NINJA_PUNCH_R0 + (PLAYER_NINJA_PUNCH_FRAMES * 4), - + PLAYER_NINJA_KICK_R0 = 1186, PLAYER_NINJA_KICK_R1 = PLAYER_NINJA_KICK_R0 + (PLAYER_NINJA_KICK_FRAMES * 1), PLAYER_NINJA_KICK_R2 = PLAYER_NINJA_KICK_R0 + (PLAYER_NINJA_KICK_FRAMES * 2), PLAYER_NINJA_KICK_R3 = PLAYER_NINJA_KICK_R0 + (PLAYER_NINJA_KICK_FRAMES * 3), PLAYER_NINJA_KICK_R4 = PLAYER_NINJA_KICK_R0 + (PLAYER_NINJA_KICK_FRAMES * 4), - + PLAYER_NINJA_DIE = 1152, PLAYER_NINJA_FLY = 1069, }; diff --git a/source/games/sw/src/ninja.cpp b/source/games/sw/src/ninja.cpp index 8828b5ffb..861a0414c 100644 --- a/source/games/sw/src/ninja.cpp +++ b/source/games/sw/src/ninja.cpp @@ -1972,7 +1972,7 @@ int DoNinjaGrabThroat(DSWActor* actor) actor->spr.extra |= (SPRX_BREAKABLE); actor->spr.cstat |= (CSTAT_SPRITE_BREAKABLE); - + ChangeState(actor, actor->user.StateEnd); actor->spr.xvel = 0; //actor->user.jump_speed = -300; diff --git a/source/games/sw/src/player.cpp b/source/games/sw/src/player.cpp index 7a75c54f2..b114709bf 100644 --- a/source/games/sw/src/player.cpp +++ b/source/games/sw/src/player.cpp @@ -1296,7 +1296,7 @@ void DoSpawnTeleporterEffect(DSWActor* actor) { extern STATE s_TeleportEffect[]; int nx, ny; - + nx = MOVEx(512, actor->spr.ang); ny = MOVEy(512, actor->spr.ang); @@ -1320,7 +1320,7 @@ void DoSpawnTeleporterEffect(DSWActor* actor) void DoSpawnTeleporterEffectPlace(DSWActor* actor) { extern STATE s_TeleportEffect[]; - + auto effectActor = SpawnActor(STAT_MISSILE, 0, s_TeleportEffect, actor->spr.sector(), actor->spr.pos.X, actor->spr.pos.Y, ActorZOfTop(actor) + Z(16), actor->spr.ang, 0); @@ -1340,7 +1340,7 @@ void DoPlayerWarpTeleporter(PLAYERp pp) auto ppActor = pp->actor; short pnum; DSWActor* act_warp; - + #if 0 TAG 2 = match TAG 3 = Type @@ -1823,7 +1823,7 @@ void UpdatePlayerSprite(PLAYERp pp) actor->spr.ang = pp->angle.ang.asbuild(); } - + void DoPlayerZrange(PLAYERp pp) { Collision ceilhit, florhit; diff --git a/source/games/sw/src/ripper.cpp b/source/games/sw/src/ripper.cpp index 2d0729e6c..d751e658b 100644 --- a/source/games/sw/src/ripper.cpp +++ b/source/games/sw/src/ripper.cpp @@ -1049,7 +1049,7 @@ int DoRipperBeginJumpAttack(DSWActor* actor) Collision coll = move_sprite(actor, bcos(tang, -7), bsin(tang, -7), 0L, actor->user.ceiling_dist, actor->user.floor_dist, CLIPMASK_ACTOR, ACTORMOVETICS); - + if (coll.type != kHitNone) actor->spr.ang = NORM_ANGLE((actor->spr.ang + 1024) + (RANDOM_NEG(256, 6) >> 6)); else diff --git a/source/games/sw/src/ripper2.cpp b/source/games/sw/src/ripper2.cpp index a626dda81..7fe2f44d1 100644 --- a/source/games/sw/src/ripper2.cpp +++ b/source/games/sw/src/ripper2.cpp @@ -1068,7 +1068,7 @@ int DoRipper2BeginJumpAttack(DSWActor* actor) tang = getangle(target->spr.pos.X - actor->spr.pos.X, target->spr.pos.Y - actor->spr.pos.Y); // Always jump at player if mad. - + Collision coll = move_sprite(actor, bcos(tang, -7), bsin(tang, -7), 0, actor->user.ceiling_dist, actor->user.floor_dist, CLIPMASK_ACTOR, ACTORMOVETICS); if (coll.type != kHitNone) diff --git a/source/games/sw/src/sbar.cpp b/source/games/sw/src/sbar.cpp index 5e2b1c7d7..d8670fbe2 100644 --- a/source/games/sw/src/sbar.cpp +++ b/source/games/sw/src/sbar.cpp @@ -95,7 +95,7 @@ void UpdateStatusBar() if (pp->cookieTime > 0) { const int MESSAGE_LINE = 142; // Used to be 164 - + if (hud_textfont || !SmallFont2->CanPrint(pp->cookieQuote)) { int x = 320 - SmallFont->StringWidth(pp->cookieQuote) / 2; diff --git a/source/games/sw/src/sector.cpp b/source/games/sw/src/sector.cpp index b4edc5a80..60edf2818 100644 --- a/source/games/sw/src/sector.cpp +++ b/source/games/sw/src/sector.cpp @@ -2057,7 +2057,7 @@ void NearTagList(NEAR_TAG_INFOp ntip, PLAYERp pp, int z, int dist, int type, int ntip->actor = nullptr; nti_cnt++; ntip++; - + if (nti_cnt >= count) return; diff --git a/source/games/sw/src/sprite.cpp b/source/games/sw/src/sprite.cpp index b1400e08e..42ebc7a53 100644 --- a/source/games/sw/src/sprite.cpp +++ b/source/games/sw/src/sprite.cpp @@ -731,7 +731,7 @@ void KillActor(DSWActor* actor) ClearOwner(itActor); } - + if (itActor->hasU() && itActor->user.attachActor == actor) { itActor->user.attachActor = nullptr; @@ -4341,7 +4341,7 @@ void getzrangepoint(int x, int y, int z, sectortype* sect, if (sect == nullptr) { *ceilz = 0x80000000; - + *florz = 0x7fffffff; florhit->invalidate(); return; @@ -5004,7 +5004,7 @@ int DoGet(DSWActor* actor) bool can_see; // For flag stuff - + // Invisiblility is only used for DeathMatch type games // Sprites stays invisible for a period of time and is un-gettable // then "Re-Spawns" by becomming visible. Its never actually killed. diff --git a/source/games/sw/src/track.cpp b/source/games/sw/src/track.cpp index 6ea812fca..3ae8b14b0 100644 --- a/source/games/sw/src/track.cpp +++ b/source/games/sw/src/track.cpp @@ -1909,7 +1909,7 @@ void KillSectorObjectSprites(SECTOR_OBJECTp sop) { DSWActor* actor = sop->so_actors[i]; if (!actor) continue; - + // not a part of the so anymore actor->user.Flags &= ~(SPR_SO_ATTACHED); @@ -2404,7 +2404,7 @@ void DoTrack(SECTOR_OBJECTp sop, short locktics, int *nx, int *ny) // for lowering the whirlpool in level 1 SECTORp *sectp; int i; - + for (i = 0, sectp = &sop->sectp[0]; *sectp; sectp++, i++) { if ((*sectp)->hasU()) diff --git a/source/games/sw/src/weapon.cpp b/source/games/sw/src/weapon.cpp index 95eca2f32..bf51d1235 100644 --- a/source/games/sw/src/weapon.cpp +++ b/source/games/sw/src/weapon.cpp @@ -5161,7 +5161,7 @@ int ActorPainPlasma(DSWActor* actor) int ActorStdMissile(DSWActor* actor, DSWActor* weapActor) { assert(weapActor != nullptr); - + // Attack the player that is attacking you // Only if hes still alive auto own = GetOwner(weapActor); @@ -7142,7 +7142,7 @@ void TraverseBreakableWalls(sectortype* start_sect, int x, int y, int z, short a int wall_ang; int hit_x,hit_y,hit_z; - + // limit radius if (radius > 2000) @@ -7639,7 +7639,7 @@ int MissileSeek(DSWActor* actor, int16_t delay_tics, int16_t aware_range/*, int1 int zh; short ang2tgt, delta_ang; - + if (actor->user.WaitTics <= delay_tics) actor->user.WaitTics += MISSILEMOVETICS; @@ -9203,7 +9203,7 @@ int DoRail(DSWActor* actor) if (actor->user.coll.type == kHitSprite) { auto hitActor = actor->user.coll.actor(); - + if (hitActor->spr.extra & SPRX_PLAYER_OR_ENEMY) { auto cstat_save = hitActor->spr.cstat; @@ -9818,7 +9818,7 @@ int SpawnBreakFlames(DSWActor* actor) actorNew->spr.xrepeat = 16; actorNew->spr.yrepeat = 16; actorNew->user.Counter = 48; // max flame size - + actorNew->spr.shade = -40; if (actor->hasU()) actorNew->spr.pal = actorNew->user.spal = actor->user.spal; @@ -9853,7 +9853,7 @@ void SpawnBreakStaticFlames(DSWActor* actor) actorNew->spr.xrepeat = 32; actorNew->spr.yrepeat = 32; - + actorNew->spr.shade = -40; actorNew->spr.pal = actorNew->user.spal = actor->user.spal; actorNew->spr.cstat &= ~(CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN); @@ -9909,7 +9909,7 @@ void SpawnGoroFireballExp(DSWActor* actor) auto actorNew = SpawnActor(STAT_MISSILE, 0, s_FireballExp, actor->spr.sector(), actor->spr.pos.X, actor->spr.pos.Y, actor->spr.pos.Z, actor->spr.ang, 0); - + actorNew->spr.hitag = LUMINOUS; //Always full brightness actorNew->spr.xrepeat = 16; actorNew->spr.yrepeat = 16; @@ -13151,7 +13151,7 @@ int InitRail(PLAYERp pp) auto actorNew = SpawnActor(STAT_MISSILE, BOLT_THINMAN_R1, &s_Rail[0][0], pp->cursector, nx, ny, nz, pp->angle.ang.asbuild(), 1200); - + SetOwner(pp->actor, actorNew); actorNew->spr.yrepeat = 52; actorNew->spr.xrepeat = 52; @@ -14287,7 +14287,7 @@ int InitEnemyRocket(DSWActor* actor) SetOwner(GetOwner(actor), actorNew); else SetOwner(actor, actorNew); - + actorNew->spr.yrepeat = 28; actorNew->spr.xrepeat = 28; actorNew->spr.shade = -15; @@ -16746,7 +16746,7 @@ int InitEnemyFireball(DSWActor* actor) actorNew->spr.xrepeat = 20; actorNew->spr.yrepeat = 20; actorNew->spr.shade = -40; - + SetOwner(actor, actorNew); actorNew->spr.zvel = 0; actorNew->spr.clipdist = 16>>2; diff --git a/source/glbackend/glbackend.h b/source/glbackend/glbackend.h index 3692f9a67..e8f2042d7 100644 --- a/source/glbackend/glbackend.h +++ b/source/glbackend/glbackend.h @@ -62,14 +62,14 @@ public: int MatrixChange = 0; PolymostRenderState renderState; - - + + public: float mProjectionM5 = 1.0f; // needed by ssao glinfo_t glinfo; - + void Init(int y); - + static int GetTexDimension(int value) { //if (value > gl.max_texturesize) return gl.max_texturesize; diff --git a/wadsrc/static/filter/blood/engine/rmapinfo.txt b/wadsrc/static/filter/blood/engine/rmapinfo.txt index 482dbc52c..1437ec359 100644 --- a/wadsrc/static/filter/blood/engine/rmapinfo.txt +++ b/wadsrc/static/filter/blood/engine/rmapinfo.txt @@ -11,7 +11,7 @@ cutscenes { function = BloodCutscenes.BuildLoading } - + } gameinfo diff --git a/wadsrc/static/filter/blood/fontdefs.txt b/wadsrc/static/filter/blood/fontdefs.txt index 7c042b6a5..21f8607f0 100644 --- a/wadsrc/static/filter/blood/fontdefs.txt +++ b/wadsrc/static/filter/blood/fontdefs.txt @@ -2,7 +2,7 @@ tilesmallfont { ignoreoffsets spacewidth 4 - + ! #04097 "\"" #04098 # #04099 @@ -294,7 +294,7 @@ digifont { ignoreoffsets spacewidth 4 - + ! #04481 "\"" #04482 $ #04484 diff --git a/wadsrc/static/filter/duke/fontdefs.txt b/wadsrc/static/filter/duke/fontdefs.txt index e062908f6..7d6d17634 100644 --- a/wadsrc/static/filter/duke/fontdefs.txt +++ b/wadsrc/static/filter/duke/fontdefs.txt @@ -2,7 +2,7 @@ tilesmallfont { ignoreoffsets spacewidth 5 - + ! #02822 "\"" #02823 # #02824 @@ -103,7 +103,7 @@ tilebigfont { ignoreoffsets spacewidth 5 - + ! #03004 "\"" #03022 % #03009 @@ -162,7 +162,7 @@ smallfont2 kerning 1 minluminosity 0 spacewidth 3 - + ! #03072 "\"" #03073 # #03074 diff --git a/wadsrc/static/filter/duke/language.txt b/wadsrc/static/filter/duke/language.txt index 3891f288c..76f0e9fd4 100644 --- a/wadsrc/static/filter/duke/language.txt +++ b/wadsrc/static/filter/duke/language.txt @@ -125,15 +125,15 @@ "#Episode2Name" = "$$LUNAR APOCALYPSE"; "#Episode3Name" = "$$SHRAPNEL CITY"; "#Episode4Name" = "$$THE BIRTH"; - + "#SelectSkill" = "$$SELECT SKILL"; "#EasySkill" = "$$PIECE OF CAKE"; "#MediumSkill" = "$$LET'S ROCK"; "#HardSkill" = "$$COME GET SOME"; "#ImpossibleSkill" = "$$DAMN, I'M GOOD"; - + //Level Names: Level Names: - + "#E1L1" = "$$HOLLYWOOD HOLOCAUST"; "#E1L2" = "$$RED LIGHT DISTRICT"; "#E1L3" = "$$DEATH ROW"; @@ -145,7 +145,7 @@ "#E1L9" = "$$VOID ZONE"; "#E1L10" = "$$ROACH CONDO"; "#E1L11" = "$$ANTIPROFIT"; - + "#E2L1" = "$$SPACEPORT"; "#E2L2" = "$$INCUBATOR"; "#E2L3" = "$$WARP FACTOR"; @@ -157,7 +157,7 @@ "#E2L9" = "$$OVERLORD"; "#E2L10" = "$$SPIN CYCLE"; "#E2L11" = "$$LUNATIC FRINGE"; - + "#E3L1" = "$$RAW MEAT"; "#E3L2" = "$$BANK ROLL"; "#E3L3" = "$$FLOOD ZONE"; @@ -169,7 +169,7 @@ "#E3L9" = "$$STADIUM"; "#E3L10" = "$$TIER DROPS"; "#E3L11" = "$$FREEWAY"; - + "#E4L1" = "$$IT'S IMPOSSIBLE"; "#E4L2" = "$$DUKE-BURGER"; "#E4L3" = "$$SHOP-N-BAG"; diff --git a/wadsrc/static/filter/exhumed/fontdefs.txt b/wadsrc/static/filter/exhumed/fontdefs.txt index a6b553f9f..963152659 100644 --- a/wadsrc/static/filter/exhumed/fontdefs.txt +++ b/wadsrc/static/filter/exhumed/fontdefs.txt @@ -4,7 +4,7 @@ tilesmallfont kerning 1 minluminosity 0 spacewidth 4 - + ! #03549 "\"" #03553 , #03551 @@ -57,7 +57,7 @@ smallfont2 kerning 1 minluminosity 0 spacewidth 4 - + ! #03651 , #03653 . #03650 diff --git a/wadsrc/static/filter/nam/fontdefs.txt b/wadsrc/static/filter/nam/fontdefs.txt index 066512598..ef737beb2 100644 --- a/wadsrc/static/filter/nam/fontdefs.txt +++ b/wadsrc/static/filter/nam/fontdefs.txt @@ -2,7 +2,7 @@ tilesmallfont { ignoreoffsets spacewidth 5 - + ! #02822 "\"" #02823 # #02824 @@ -103,7 +103,7 @@ tilebigfont { ignoreoffsets spacewidth 5 - + ! #03004 "\"" #03022 % #03009 @@ -160,7 +160,7 @@ smallfont2 kerning 1 minluminosity 0 spacewidth 3 - + ! #03072 "\"" #03073 # #03074 diff --git a/wadsrc/static/filter/redneck/fontdefs.txt b/wadsrc/static/filter/redneck/fontdefs.txt index b8de29ca2..bb2e3d237 100644 --- a/wadsrc/static/filter/redneck/fontdefs.txt +++ b/wadsrc/static/filter/redneck/fontdefs.txt @@ -3,7 +3,7 @@ tilesmallfont ignoreoffsets kerning 2 spacewidth 10 - + ! #00514 "\"" #00515 # #00516 @@ -105,7 +105,7 @@ tilebigfont ignoreoffsets kerning 6 spacewidth 10 - + ! #00696 "\"" #00714 % #00701 diff --git a/wadsrc/static/filter/shadowwarrior/fontdefs.txt b/wadsrc/static/filter/shadowwarrior/fontdefs.txt index a4285c283..cea352670 100644 --- a/wadsrc/static/filter/shadowwarrior/fontdefs.txt +++ b/wadsrc/static/filter/shadowwarrior/fontdefs.txt @@ -2,7 +2,7 @@ tilesmallfont { ignoreoffsets spacewidth 4 - + ! #04608 "\"" #04609 # #04610 @@ -104,7 +104,7 @@ tilebigfont ignoreoffsets kerning 1 spacewidth 10 - + 0 #03732 1 #03733 2 #03734 diff --git a/wadsrc/static/filter/ww2gi/fontdefs.txt b/wadsrc/static/filter/ww2gi/fontdefs.txt index 066512598..ef737beb2 100644 --- a/wadsrc/static/filter/ww2gi/fontdefs.txt +++ b/wadsrc/static/filter/ww2gi/fontdefs.txt @@ -2,7 +2,7 @@ tilesmallfont { ignoreoffsets spacewidth 5 - + ! #02822 "\"" #02823 # #02824 @@ -103,7 +103,7 @@ tilebigfont { ignoreoffsets spacewidth 5 - + ! #03004 "\"" #03022 % #03009 @@ -160,7 +160,7 @@ smallfont2 kerning 1 minluminosity 0 spacewidth 3 - + ! #03072 "\"" #03073 # #03074 diff --git a/wadsrc/static/language.csv b/wadsrc/static/language.csv index d3aa0cd93..47db450d3 100644 --- a/wadsrc/static/language.csv +++ b/wadsrc/static/language.csv @@ -1,21 +1,21 @@ default,Identifier,Remarks,Filter,eng enc ena enz eni ens enj enb enl ent enw,cs,de,el,eo,es,esm esn esg esc esa esd esv eso esr ess esf esl esy esz esb ese esh esi esu,fi,fr,hu,it,jp,ko,nl,pl,pt,ptg,ro,ru,sr ,,Miscellaneous,,,,,,,,,,,,,,,,,,,,, -"Are you sure you want to end the game? -",ENDGAME,,,,"Opravdu si přeješ ukončit hru? -","Willst du das Spiel wirklich beenden? -",,"Ĉu vi certas, ke vi volas fini la ludon? -","¿Estás segur@[ao_esp] que deseas cerrar la partida? -",,"Haluatko varmasti päättää pelin? -","Voulez vous mettre fin à votre partie? -","Biztos be akarod fejezni a játékot? -","Sei sicuro di voler terminare la partita? -","本当にゲームを中断するのか? -","게임을 정말로 종료하시겠습니까? -","Weet je zeker dat je het spel wilt beëindigen? -","Czy jesteś pewien że chcesz zakończyć grę? -",Deseja mesmo encerrar o jogo?,"Tem certeza que deseja fechar este jogo? -",Ești sigur că vrei să închei jocul?,"Вы действительно хотите закончить игру? -","Јесте ли сигурни да желите завршити игру? +"Are you sure you want to end the game? +",ENDGAME,,,,"Opravdu si přeješ ukončit hru? +","Willst du das Spiel wirklich beenden? +",,"Ĉu vi certas, ke vi volas fini la ludon? +","¿Estás segur@[ao_esp] que deseas cerrar la partida? +",,"Haluatko varmasti päättää pelin? +","Voulez vous mettre fin à votre partie? +","Biztos be akarod fejezni a játékot? +","Sei sicuro di voler terminare la partita? +","本当にゲームを中断するのか? +","게임을 정말로 종료하시겠습니까? +","Weet je zeker dat je het spel wilt beëindigen? +","Czy jesteś pewien że chcesz zakończyć grę? +",Deseja mesmo encerrar o jogo?,"Tem certeza que deseja fechar este jogo? +",Ești sigur că vrei să închei jocul?,"Вы действительно хотите закончить игру? +","Јесте ли сигурни да желите завршити игру? " ,,Menus,,,,,,,,,,,,,,,,,,,,, New Game,MNU_NEWGAME,,,,Nová hra,Neues Spiel,,Nova Ludo,Nueva Partida,,Uusi peli,Nouvelle Partie,Új játék,Nuovo gioco,新規ゲーム,새로운 게임,Nieuw spel,Nowa Gra,Novo jogo,,Joc Nou,Новая игра,Нова игра @@ -26,9 +26,9 @@ Credits,MNU_CREDITS,,,,Autoři,,,Kreditoj,Créditos,,Tekijät,Crédits,Stáblist How to Order,MNU_HOWTOORDER,,,,Jak objednat,Bestellen,,Kiel Mendi,Cómo Comprar,,Tilausohje,Comment Acheter,Megrendelés,,,,,Jak Zamówić,Como comprar,,Cum Comanzi,, End Game,MNU_ENDGAME,,,,Ukončit hru,Spiel beenden,,Fini Ludon,Terminar la Partida,,Lopeta peli,Finir Partie,Befejezés,,,,,Zakończ Grę,Encerrar jogo,,Încheie Jocul,, User Map,MNU_USERMAP,not used yet,,,Uživatelská mapa,Benutzerlevel,,Mapo de Uzanto,Mapa de Usuario,,Omat tasot,Maps Perso.,Egyéni map,,,,,Mapa Użytkownika,Mapa de usuário,,Hărți de Utilizatori,, -Select a user map to play,MNU_SELECTUSERMAP,not used yet,,,Vyber uživatelskou mapu,"Wähle ein Level zum Spielen +Select a user map to play,MNU_SELECTUSERMAP,not used yet,,,Vyber uživatelskou mapu,"Wähle ein Level zum Spielen ",,Elektu uzanto-mapon por ludi,Selecciona un mapa de usuario para jugar,,Valitse oma taso pelattavaksi,Choisir une map perso. à jouer,Egyéni map kiválasztása,,,,,Wybierz mapę użytkownika,Selecione um mapa de usuário para jogar,,Alege o hartă de utilizatori,, -Select an Episode,MNU_SELECTEPISODE,DN3D et.al.,,,Vyber epizodu,"Welche Episode? +Select an Episode,MNU_SELECTEPISODE,DN3D et.al.,,,Vyber epizodu,"Welche Episode? ",,Elektu Epizodon,Selecciona un Episodio,,Valitse episodi,Choisir un épisode,Epizód kiválasztása,,,,,Wybierz Epizod,Selecione um episódio,,Alege un Episod,, Episodes,MNU_EPISODES,Blood,,,Epizody,Episoden,,Epizodoj,Episodios,,Episodit,Episodes,Epizódok,,,,,Epizody,Episódios,,Episoade,, Select Skill,MNU_SELECTSKILL,DN3D et.al.,,,Vyber obtížnost,Schwierigkeitsgrad,,Electu Malfacilecon,Selecciona Dificultad,,Valitse vaikeustaso,Choisir difficulté,Erősség kiválasztása,,,,,Wybierz Poziom Trudności,Escolha a dificuldade,,Alege Dificultatea,, @@ -39,7 +39,7 @@ Rotate mode ON,TXT_ROTATE_ON,,,,Režim rotace zap.,Rotiermodus an,,Turnmodo ŜAL Rotate mode OFF,TXT_ROTATE_OFF,,,,Režim rotace vyp.,Rotiermodus aus,,Turnmodo MALŜALTITA,Modo rotación DESACTIVADO,,Kääntötila pois päältä,Mode Rotation OFF,Forgató mód KI,,,,,Tryb obracania wyłączony,Modo de rotação desativado,,Modul Rotativ OPRIT,, ,,Controls submenu,,,,,,,,,,,,,,,,,,,,, Default,CTRL_DEFAULT,,,,Standardní,Standard,,Defaŭlta,Por defecto,,Oletus,Défaut,Alapbeállítás,,,,,Domyślne,Padrão,,Implicit,, -Classic,CTRL_CLASSIC,,,,Klasický,"Klassisch +Classic,CTRL_CLASSIC,,,,Klasický,"Klassisch ",,Klasika,Clásico,,Alkuperäinen,Classique,Klasszikus,,,,,Klasyczne,Clássico,,Clasic,, Left-handed,CTRL_LEFTHANDED,,,,Pro leváky,Linkshändig,,Maldekstramana,Zurdo,,Vasenkätinen,Mode Gaucher,Balkezes,,,,,Leworęczne,Canhoto,,Stângaci,, Control presets,CTRL_PRESET,,,,Přednastavení ovládání,Voreinstellungen,,,Preajustes de Control,,Ohjausesivalinnat,Sets de commandes par défaut,Kontrol sémák,,,,,Ustawienia sterowania,Predefinições de controle,,Configurații prestabilite,, @@ -130,11 +130,11 @@ Pre-load map textures,RENDER_CACHE,,,,Přednačíst textury mapy,Texturen cachen Detail Textures,RENDER_DETAIL,,,,Detailní textury,Detailtexturen,,,Texturas de Detalle,,Yksityiskohtaiset pintakuvioinnit,Textures Detail,Részletes textúrák,,,,,Detale Tekstur,Texturas de detalhe,,Detaliu Texturi,, Glow Textures,RENDER_GLOW,,,,Svítící textury,Leucht-Texturen,,,Texturas con Brillos,,Hehkuvat pintakuvioinnit,Textures Brillance,Világító textúrák,,,,,Świecące Tekstury,Texturas de brilho,,Strălucire Texturi,, 3D Models,RENDER_MODELS,,,,3D modely,3D Modelle,,,Modelos 3D,,3D-mallit,Modèles 3D,3D modellek,,,,,Modele 3D,Modelos 3D,,Modele 3D,, -"Render Options +"Render Options ",RENDER_OPTIONS,,,,Nastavení Polymostu,Polymost-Optionen,,,Opciones de Polymost,,Polymost-asetukset,Options Polymost,Renderelő opciók,,,,,Opcje Renderowania,Opções Polymost,,Setări Render,, Palette Emulation,RENDER_PALETTEEMU,,,,Emulace paletu,Palettenemulation,,,Emulación de Paleta,,Paletin emulaatio,Emulation de Palette,Paletta emuláció,,,,,Emulacja Palety,Emulação de paleta,,Emulare Paletă,, Palette Interpolation,RENDER_PALINTER,,,,Interpolace palety,Paletteninterpolation,,,Interpolación de Paleta,,Paletin interpolaatio,Interpolation de Palette,Paletta interpoláció,,,,,Interpolacja Palety,Interpolação de paleta,,Interpolare Paletă,, -"Ignore file type for music lookup +"Ignore file type for music lookup ",ADVSNDMNU_LOOKUPMUS,,,,Při hledání hudby ignorovat formát souboru,Dateityp bei Musiksuche ignorieren,,,Ignorar tipo de archivo al buscar música,,Jätä tiedostotyyppi huomioimatta musiikkihaussa,Ignorer l'extension pour recherche musique,Fájltípus mellőzése zene felkeresésénél,,,,,Nie sprawdzaj typu pliku przy szukaniu muzyki,Ignorar tipo de arquivo na busca de músicas,,Ignoră tipul fișierului la căutarea muzicii,, Ignore file type for sound lookup,ADVSNDMNU_LOOKUPSND,,,,Při hledání zvuků ignorovat formát souboru,Dateityp bei Soundsuche ignorieren,,,Ignorar tipo de archivo al buscar sonidos,,Jätä tiedostotyyppi huomioimatta äänihaussa,Ignorer l'extension pour recherche Effet Sonore,Fájltípus mellőzése hang felkeresésénél,,,,,Nie sprawdzaj typu pliku przy szukaniu dźwięków,Ignorar tipo de arquivo na busca de sons,,Ignoră tipul fișierului la căutarea sunetului,, Show game selection dialog,MISCMNU_QUERYIWAD,,,,Zobrazit dialog pro výběr GRPu,Zeige Spielauswahl,,Montri GRP elekta dialogo,Mostrar diálogo de selección de GRP,,Näytä GRP-valintaikkuna,Afficher la séléction de jeu,Játék választó ablak mutatása,Mostra la schermata della selezione GRP,GRPの選択画面を表示,GRP 게임 선택창 표시,GRP-selectiedialoogvenster weergeven,Pokaż ekran wyboru gry,Exibir janela de seleção de jogo,,Afișează fereastra de selecție a jocului,Выбор GRP-файла при запуске,Покажи GRP дијалог за избор @@ -149,7 +149,7 @@ Level Statistics,DSPLYMNU_LEVELSTATS,,,,Statistiky levelu,Levelstatistik,,,Estad Level Statistics Scale,DSPLYMNU_STATSCALE,,,,Velikost statistik,Textgröße für Levelstatistik,,,Escala de Estadísticas de Nivel,,Tason tilastojen skaalaus,Mise à l'échelle stats niveau,Pálya statisztika méret,,,,,Skala Statystyk Poziomu,Escala das estatísticas da fase,,Scară Statistici Nivel,, Text Scale,DSPLYMNU_TEXTSCALE,,,,Velikost textu,Textgröße,,Skalo de Teksto,Escala de Texto,,Tekstin skaalaus,Mise à l'échelle Texte,Szöveg méret,,,,,Skala Tekstu,Escala de texto,,Scară Text,, Generic,DSPLYMNU_GENERIC,,,,Výchozí,Generisch,,Ĝenerala,Genérico,,Yleinen,Générique,Általános,,,,,Zwykłe,Genérico,,,, -Show Map Name,DSPLYMNU_SHOWMAPNAME,,,,Zobrazit název mapy,"Levelnamen anzeigen +Show Map Name,DSPLYMNU_SHOWMAPNAME,,,,Zobrazit název mapy,"Levelnamen anzeigen ",,Montri Nomon de Mapo,Mostrar Nombre de Mapa,,Näytä tason nimi,Montrer nom map,Pálya név mutatása,,,,,Pokaż nazwę mapy,Mostrar nome da fase,,Afișare nume hartă,, FOV,DSPLYMNU_FOV,,,,Zorné pole (FOV),Gesichtsfeld,,Vidkampo,,,Näkökenttä,Champ de Vision,Látószög,,,,,Pole widzenia,Campo de visão,,Câmp vizual,, Crosshair,DSPLYMNU_CROSSHAIR,,,,Zaměřovač,Fadenkreuz,,Reteto,Retícula,,Tähtäin,Viseur,Célkereszt,Mirino,クロスヘア,조준점,Draadkruis,Celownik,Mira,,Țintă,Прицел,Нишан @@ -162,137 +162,137 @@ Play original Sounds,SNDMNU_WTSOUND,,,,Přehrávat původní zvuky,Original-Soun Developer commentary,SNDMNU_WTCOMMENT,,,,Komentář vývojáře,Entwicklerkommentar,,,Comentarios del desarrollador,,Kehittäjien kommentit,Commentaire développeur,Fejlesztői kommentár,Commentario sviluppatore,デベロッパーのコメンタリー,,,Komentarze twórców,Comentário de desenvolvedor,,Comentariu dezvoltatori,Комментарии разработчиков, Play original MIDI music,SNDMNU_WTMUSIC,,,,Přehrávat původní MIDI hudbu,Original-MIDI-Musik spielen,,,Reproducir música MIDI original,,Toista alkuperäinen MIDI-musiikki,Jouer la musique MIDI originale,Eredeti midi zene lejátszása,,,,,Odtwarzaj oryginalną muzykę MIDI,Reproduzir música MIDI original,,Utilizare muzică MIDI originală,, Sound Ambience,SNDMNU_AMBIENCE,,,,Okolní zvuky,Umgebungsgeräusche,,,Sonidos de Ambiente,,Taustaäänet,Ambiance sonore,Ambient hangok,,,,,Dźwięki Otoczenia,Ambiência de som,,Ambianță,, -"Player Speech +"Player Speech ",SNDMNU_SPEECH,,,,Hráčův hlas,Spielerkommentare,,,Voz de Jugador,,Pelaajan puhe,Paroles du Joueur,Játékos beszéd,,,,,Teksty Gracza,Fala do jogador,,Comentariu caracter jucător,, Flip Stereo Channels,ADVSNDMNU_FLIPSTEREO,,,,Prohodit stereo kanály,Stereo Kanäle vertauschen,,,Alternar Canales Estéreo,,Käännä stereokanavat,Inverser Canaux Stéréo,Sztereó csatornák megcserélése,,,,,Odwróć Kanały Stereo,Inverter canais estéreo,,Schimbă canalele stereo,, Ninja Slice Animation,MISCMNU_NINJA,,,,Animace rozseknutí ninjy,Ninja-Zerteilanimation,,,Animación de Corte Ninja,,Ninjan pilkkoutumisanimaatio,Animation Ninja Slice,Nindzsa kardcsapás animáció,,,,,Animacja Rozczłonkowania Przeciwników,Animação de Corte Ninja,,Animație feliere Ninja,, Use Darts instead of Shurikens,MISCMNU_DARTS,,,,Používat šipky místo šurikenů,Darts statt Wurfsterne,,,Usar Dardos en lugar de Shurikens,,Käytä tikkoja heittotähtien sijaan,Utiliser des fléchettes au lieu de shurikens,Dártok használata surikenek helyett,,,,,Używaj Rzutek zamiast Shurikenów,Usar Dardos ao invés de Shurikens,,Săgeți în loc de shurikeni,, ,,Miscellaneous,,,,,,,,,,,,,,,,,,,,, -"You are playing the shareware -version of Duke Nukem 3D. While -this version is really cool, you -are missing over 75% of the total -game, along with other great extras -which you'll get when you order -the complete version and get -the final three episodes.",SHAREWARELOCK,,,,"Hraješ shareware verzi Duke Nukem 3D. -I když je tahle verze fakt skvělá, -chybí tu víc než 75 % celé hry spolu -s jinými skvělými doplňky, které dostaneš, -když si objednáš celou hru -a získáš zbylé tři epizody.","Du spielst die Shareware-Version -von Duke Nukem 3D. Auch wenn -diese Version richtig cool ist, -verpasst du 75% des gesamten -Spiels und einer Reihe weiterer -toller Sachen, die du sehen -kannst, wenn du dir die Voll- -version holst.",,,"Estás jugando a la versión -shareware de Duke Nukem 3D. -Aunque esta version mole mazo, -te estás perdiendo más del 75% -del juego total, junto con otros extras chulos los cuales tendrás -cuando compres la versión completa -y tengas los tres episodios finales.",,"Pelaat Duke Nukem 3D:n -shareware-versiota. Vaikka -tämäkin versio on tosi siisti, -jäät yli 75 % paitsi täydestä -pelistä sekä lisäksi muista -mahtavista kylkiäisistä, jotka -saat, kun tilaat koko version -ja saat loput kolme episodia.","Vous jouez à la version Shareware de Duke Nukem 3D. Bien que cette version soit super cool, vous n'avez pas accès à 75% du jeu, en plus de plein de trucs en extra que vous aurez en achetant la version complète pour avoir les trois derniers épisodes.","Jelenleg a Duke Nukem 3D shareware verziójával játszol. Habár ez a verzió is igen menő, a teljes játékhoz képest lemaradsz a játék 75%-áról, ezen kívűl pedig extrákkal is elhalmozunk ha megrendeled a teljes verziót.",,,,,"Grasz w wersję demo gry -Duke Nukem 3D. Ta wersja może i jest -fajna, ale tracisz ponad 75% całej -gry wraz ze świetnymi bonusami, które -dostaniesz jak zamówisz pełną -wersję z pozostałymi trzema -epizodami.","Você está jogando a versão shareware -de Duke Nukem 3D. Mesmo que esta -versão seja bem bacana, você está -perdendo mais de 75% do total do jogo, -além de outros bônus incríveis que -você recebe quando compra a versão -completa e recebe os três episódios finais.",,"Joci versiunea gratuită a jocului -Duke Nukem 3D. Deși versiunea -aceasta e grozavă, pierzi aproximativ -75% din joc, -împreună cu alte suplimente pe -care le primești când comanzi -versiunea completă și primești +"You are playing the shareware +version of Duke Nukem 3D. While +this version is really cool, you +are missing over 75% of the total +game, along with other great extras +which you'll get when you order +the complete version and get +the final three episodes.",SHAREWARELOCK,,,,"Hraješ shareware verzi Duke Nukem 3D. +I když je tahle verze fakt skvělá, +chybí tu víc než 75 % celé hry spolu +s jinými skvělými doplňky, které dostaneš, +když si objednáš celou hru +a získáš zbylé tři epizody.","Du spielst die Shareware-Version +von Duke Nukem 3D. Auch wenn +diese Version richtig cool ist, +verpasst du 75% des gesamten +Spiels und einer Reihe weiterer +toller Sachen, die du sehen +kannst, wenn du dir die Voll- +version holst.",,,"Estás jugando a la versión +shareware de Duke Nukem 3D. +Aunque esta version mole mazo, +te estás perdiendo más del 75% +del juego total, junto con otros extras chulos los cuales tendrás +cuando compres la versión completa +y tengas los tres episodios finales.",,"Pelaat Duke Nukem 3D:n +shareware-versiota. Vaikka +tämäkin versio on tosi siisti, +jäät yli 75 % paitsi täydestä +pelistä sekä lisäksi muista +mahtavista kylkiäisistä, jotka +saat, kun tilaat koko version +ja saat loput kolme episodia.","Vous jouez à la version Shareware de Duke Nukem 3D. Bien que cette version soit super cool, vous n'avez pas accès à 75% du jeu, en plus de plein de trucs en extra que vous aurez en achetant la version complète pour avoir les trois derniers épisodes.","Jelenleg a Duke Nukem 3D shareware verziójával játszol. Habár ez a verzió is igen menő, a teljes játékhoz képest lemaradsz a játék 75%-áról, ezen kívűl pedig extrákkal is elhalmozunk ha megrendeled a teljes verziót.",,,,,"Grasz w wersję demo gry +Duke Nukem 3D. Ta wersja może i jest +fajna, ale tracisz ponad 75% całej +gry wraz ze świetnymi bonusami, które +dostaniesz jak zamówisz pełną +wersję z pozostałymi trzema +epizodami.","Você está jogando a versão shareware +de Duke Nukem 3D. Mesmo que esta +versão seja bem bacana, você está +perdendo mais de 75% do total do jogo, +além de outros bônus incríveis que +você recebe quando compra a versão +completa e recebe os três episódios finais.",,"Joci versiunea gratuită a jocului +Duke Nukem 3D. Deși versiunea +aceasta e grozavă, pierzi aproximativ +75% din joc, +împreună cu alte suplimente pe +care le primești când comanzi +versiunea completă și primești ultimele trei episoade.",, -"Buy the complete version of -Blood for three new episodes -plus eight BloodBath-only levels!",SHAREWARELOCK,,Blood,,"Kup si plnou verzi Blood -pro tři nové epizody a osm -levelů určených pro BloodBath!","Kaufe die Komplettversion -von Blood mit 3 weiteren -Episoden.",,,"¡Compra la versión completa de -Blood para tres nuevos episodios -más ocho niveles únicos de BloodBath!",,"Osta Bloodin koko versio ja -saat kolme uutta episodia ja -kahdeksan pelkästään -verilöylyä varten -suunniteltua tasoa!",Achetez la version complète de Blood pour trois épisodes supplémentaires et huit niveaux BloodBath en plus!,"Most vedd meg a Blood teljes verzióját, hogy hozzáférj a 3 további epizódhoz, plusz nyolc új BloodBath pályához.",,,,,"Kup pełną wersję gry Blood by dostać -trzy nowe epizody wraz z ośmioma -poziomami do tybu BloodBath.","Compre a versão completa de Blood -para receber três novos episódios e +"Buy the complete version of +Blood for three new episodes +plus eight BloodBath-only levels!",SHAREWARELOCK,,Blood,,"Kup si plnou verzi Blood +pro tři nové epizody a osm +levelů určených pro BloodBath!","Kaufe die Komplettversion +von Blood mit 3 weiteren +Episoden.",,,"¡Compra la versión completa de +Blood para tres nuevos episodios +más ocho niveles únicos de BloodBath!",,"Osta Bloodin koko versio ja +saat kolme uutta episodia ja +kahdeksan pelkästään +verilöylyä varten +suunniteltua tasoa!",Achetez la version complète de Blood pour trois épisodes supplémentaires et huit niveaux BloodBath en plus!,"Most vedd meg a Blood teljes verzióját, hogy hozzáférj a 3 további epizódhoz, plusz nyolc új BloodBath pályához.",,,,,"Kup pełną wersję gry Blood by dostać +trzy nowe epizody wraz z ośmioma +poziomami do tybu BloodBath.","Compre a versão completa de Blood +para receber três novos episódios e mais oito fases do modo BloodBath!",,Cumpără versiunea completă a jocului Blood pentru încă trei episoade și încă opt hărți pentru modul BloodBath!,, -"Be sure to call 800-3DREALMS today -and order the game. -You are only playing the first -four levels, and are missing most -of the game, weapons and monsters. -See the ordering information. -",SHAREWARELOCK,,ShadowWarrior,,"Určitě ještě dnes zavolej na -800-3DREALMS a objednej -tuto hru. Nyní můžeš hrát -pouze první čtyři levely a -nemáš k dispozici většinu -hry, zbraní a příšer. -Viz informace k objednání.","Du spielst nur die ersten 4 -Level und verpasst das Meiste -des Spiels, der Waffen und -Monster. -Rufe noch heute 800-3DREALMS -an und bestelle das Spiel. -",,,"Asegúrate de llamar hoy al -800-3DREALMS y comprar el -juego. Solo estás jugando a los -cuatro primeros niveles, y te -estás perdiendo la mayoría del -juego, armas y monstruos. -Revisa la información de compra.",,"Soita vielä tänään numeroon -800-3DREALMS ja tilaa peli. -Pelaat ainoastaan neljää -ensimmäistä tasoa ja jäät -paitsi suurimmasta osasta -peliä, sen aseista ja hirviöistä. -Katso tilausohjeet.","Pensez à appeler 800-3DREALMS aujourd'hui pour acheter le jeu. Vous ne jouez qu'aux quatre premiers niveaux et ratez la majorité du jeu, des armes et des enemis. Allez regarder les infos d'achat. ","Hívd a 800-3DREALMS számot, és rendeld meg még ma. Jelenleg csak az első 4 pályához férsz hozzá, és lemaradsz a játék túlnyomó részéről, legfőképp a fegyverekről és szörnyekről.",,,,,"Pamiętaj by już dziś zadzwonić -na numer 800-3DREALMS i zamówić -grę. -Grasz teraz tylko w pierwsze cztery -poziomy i tracisz większość gry wraz -z jej brońmi i potworami. -Sprawdź informacje dotyczące -zamówienia -","Não esqueça de ligar para 800-3DREALMS -hoje mesmo para adquirir o jogo. -Você está jogando somente as primeiras -quatro fases e perdendo a maior parte -do jogo, com mais armas e monstros. +"Be sure to call 800-3DREALMS today +and order the game. +You are only playing the first +four levels, and are missing most +of the game, weapons and monsters. +See the ordering information. +",SHAREWARELOCK,,ShadowWarrior,,"Určitě ještě dnes zavolej na +800-3DREALMS a objednej +tuto hru. Nyní můžeš hrát +pouze první čtyři levely a +nemáš k dispozici většinu +hry, zbraní a příšer. +Viz informace k objednání.","Du spielst nur die ersten 4 +Level und verpasst das Meiste +des Spiels, der Waffen und +Monster. +Rufe noch heute 800-3DREALMS +an und bestelle das Spiel. +",,,"Asegúrate de llamar hoy al +800-3DREALMS y comprar el +juego. Solo estás jugando a los +cuatro primeros niveles, y te +estás perdiendo la mayoría del +juego, armas y monstruos. +Revisa la información de compra.",,"Soita vielä tänään numeroon +800-3DREALMS ja tilaa peli. +Pelaat ainoastaan neljää +ensimmäistä tasoa ja jäät +paitsi suurimmasta osasta +peliä, sen aseista ja hirviöistä. +Katso tilausohjeet.","Pensez à appeler 800-3DREALMS aujourd'hui pour acheter le jeu. Vous ne jouez qu'aux quatre premiers niveaux et ratez la majorité du jeu, des armes et des enemis. Allez regarder les infos d'achat. ","Hívd a 800-3DREALMS számot, és rendeld meg még ma. Jelenleg csak az első 4 pályához férsz hozzá, és lemaradsz a játék túlnyomó részéről, legfőképp a fegyverekről és szörnyekről.",,,,,"Pamiętaj by już dziś zadzwonić +na numer 800-3DREALMS i zamówić +grę. +Grasz teraz tylko w pierwsze cztery +poziomy i tracisz większość gry wraz +z jej brońmi i potworami. +Sprawdź informacje dotyczące +zamówienia +","Não esqueça de ligar para 800-3DREALMS +hoje mesmo para adquirir o jogo. +Você está jogando somente as primeiras +quatro fases e perdendo a maior parte +do jogo, com mais armas e monstros. Confira as informações de encomenda.",,"Sună la 800-3DREALMS astăzi pentru a comanda jocul. Joci doar primele patru nivele și îți lipsesc majoritatea hărților, armelor, și monștrilor. Verifică informațiile pentru a comanda.",, -"Loading and saving games -not supported -in this demo version of Blood.","BLOOD_SW_BLOCK -",not used,,,"Nahrávání a ukládání her není -v této demoverzi hry Blood -podporováno.","Laden und Speichern ist in -dieser Demoversion von -Blood nicht gestattet.",,,"Cargar y guardar partidas -no soportado -en esta versión demo de Blood.",,"Pelien lataaminen ja tallentaminen -ei ole tuettu Bloodin demoversiossa.",Sauvegarder et charger une partie est indisponible dans cette version démo de Blood.,A Blood demo verziója nem támogatja a mentést és betöltést.,,,,,Ładowanie i zapisywanie nie jest wspierane w wersji demo gry Blood.,"Não é possível carregar -e salvar partidas nesta +"Loading and saving games +not supported +in this demo version of Blood.","BLOOD_SW_BLOCK +",not used,,,"Nahrávání a ukládání her není +v této demoverzi hry Blood +podporováno.","Laden und Speichern ist in +dieser Demoversion von +Blood nicht gestattet.",,,"Cargar y guardar partidas +no soportado +en esta versión demo de Blood.",,"Pelien lataaminen ja tallentaminen +ei ole tuettu Bloodin demoversiossa.",Sauvegarder et charger une partie est indisponible dans cette version démo de Blood.,A Blood demo verziója nem támogatja a mentést és betöltést.,,,,,Ładowanie i zapisywanie nie jest wspierane w wersji demo gry Blood.,"Não é possível carregar +e salvar partidas nesta versão demo de Blood.",,Salvarea și încărcarea jocului nu este suportată de această versiune demo a jocului Blood.,, Are you sure you want to quit this game?,CONFIRM_QUITMSG,,,,"Jsi si jistý, že chceš z této hry odejít?","Bist du dir sicher, dass du gehen willst?",,"Ĉu vi certas, ke vi volas forlasi?",¿Estás segur@[ao_esp] de que quieres salir de este juego?,,Haluatko varmasti lopettaa?,Êtes vous sûr de vouloir quitter ?,Biztos vagy benne hogy ki akarsz lépni?,Sei sicuro di voler abbandonare?,本当に終了するのか?,정말 종료하시겠습니까?,Weet je zeker dat je wilt stoppen?,Czy jesteś pewien że chcesz wyjść?,Tem certeza que quer sair?,Tens a certeza que queres sair?,Ești sigur că vrei să ieși din joc?,Вы действительно желаете выйти?,Да ли сте сигурни да желите да одустанеш? Reset controls to defaults?,CONFIRM_CTRL1,,,,Obnovit ovládání na výchozí?,Steuerung auf Standard zurücksetzen?,,,¿Resetear controles por defecto?,,Haluatko palauttaa oletusohjaukset?,Remettre les contrôles à zéro?,Vissza akarod állítani a billentyű kiosztást az alapra?,,,,,Ustawić domyślne klawisze?,Redefinir controles para o modo padrão?,,Revenire la schema de control implicită?,, @@ -1005,7 +1005,7 @@ Fun Park,FUN PARK,,,,Lunapark,Freizeitpark,,,,,,,,,,,,Lunapark,Parque de Divers ,,,,,,,,,,,,,,,,,,,,,,, Gassin' Up,GASSIN' UP,,,,Tankujeme,Auftanken,,,,,,,,,,,,Czas Zatankować,Enchendo o Tanque,,Popasul,, House Of Ill Repute,HOUSE OF ILL REPUTE,,,,Dům se špatnou pověstí,Haus des miesen Rufs,,,,,,,,,,,,Dom o Złej Reputacji,Casa da Mãe Joana,,Casă de Reputație Bolnavă,, -Mystery Dino Cave,MYSTERY DINO CAVE,,,,Tajemná dinosauří jeskyně,"Geheimnisvolle Dinohöhle +Mystery Dino Cave,MYSTERY DINO CAVE,,,,Tajemná dinosauří jeskyně,"Geheimnisvolle Dinohöhle ",,,,,,,,,,,,Jaskinia Dinozaurów,Caverna dos Dinossauros,,Caverna Dinozaurilor,, Campy Crystal Lake,CAMPY CRYSTAL LAKE,,,,Kýčovité křišťálové jezero,,,,,,,,,,,,,Obozowisko w Crystal Lake,Acampamento Crystal Lake,,Tabăra Lacului de Cristal,, Bigfoot Convention,BIGFOOT CONVENTION,,,,Přehlídka Yetiů,,,,,,,,,,,,,Zjazd Wielkich Stóp,Convenção do Pé Grande,,Convenția lui Bigfoot,, @@ -1141,7 +1141,7 @@ Picked up Dynamite,TXTB_WPN10,,,,Sebrán dynamit,Dynamit genommen,,,Recogiste Di Picked up Life Leech,TXTB_WPN11,,,,Sebrán životahltič,Lebenssauger genommen,,,Recogiste el Bastón Chupavidas,,,,,,,,,Zebrano Wysysacz Życia,Pegou Sugador de Vida,,Ridicat Lipitoare de Viață,, It's locked,TXTB_LOCKED,,,,Je to zamčené,Es ist verschlossen,,,Está bloqueado.,,,,,,,,,Zamknięte,Está trancada,,E încuiat,, That requires a key.,TXTB_KEY,,,,To potřebuje klíč.,Du brauchst einen Schlüssel,,,Necesitas una llave.,,,,,,,,,Wymaga Klucza.,É necessária uma chave.,,Necesită o cheie.,, -%s dropped Blue Flag!,"TXTB_DBF +%s dropped Blue Flag!,"TXTB_DBF ",,,,%s upustil@[ao_cs] modrou vlajku!,%d hat die blaue Flagge verloren,,,,,,,,,,,,%s upuszcza Niebieską Flagę,%s largou a Bandeira Azul!,,%s a scăpat Steagul Albastru,, %s dropped Red Flag!,TXTB_DRF,,,,%s upustil@[ao_cs] červenou vlajku!,%d hat die rote Flagge verloren,,,,,,,,,,,,%s upuszcza Czerwoną Flagę,%s largou a Bandeira Vermelha!,,%s a scăpat Steagul Roșu,, %s stole Blue Flag!,TXTB_SBF,todo,,,%s ukradl@[ao_cs] modrou vlajku!,%d hat die blaue Flagge gestohlen,,,,,,,,,,,,%s kradnie Niebieską Flagę,%s roubou a Bandeira Azul!,,%s a furat Steagul Albastru,, @@ -1165,7 +1165,7 @@ Cooperative,TXTB_NETGT1,,,,Kooperativní hra,Kooperativ,,,Cooperativo,,,,,,,,,Ko Bloodbath,TXTB_NETGT2,,,,Krveřežba,Blutbad,,,Baño de Sangre,,,,,,,,,Rozlew Krwi,Banho de Sangue,,Baie de Sânge,, Teams,TXTB_NETGT3,,,,Týmy,,,,Por equipos,,,,,,,,,Drużyny,Equipes,,Echipe,, Map Follow Mode,TXTB_FOLLOWON,,,,Režim následování mapy,Folgen-Modus,,,,,,,,,,,,Tryb Śledzenia na Mapie,Mapa (Modo seguir),,Hartă (Modul Urmărire),, -Map Scroll Mode,TXTB_FOLLOWOFF," +Map Scroll Mode,TXTB_FOLLOWOFF," ",,,Režim posouvání mapy,Scrollmodus,,,,,,,,,,,,Przewijanie Mapy,Mapa (Modo rolar),,Hartă (Modul Derulare),, You are immortal.,TXTB_GODMODE,,,,Jsi nesmrtelný.,Du bist unsterblich.,,,Eres inmortal.,,,,,,,,,Jesteś nieśmiertelny.,Você está imortal.,,Ești nemuritor.,, You are mortal.,TXTB_NOTGODMODE,,,,Jsi smrtelný.,Du bist verwundbar.,,,Eres mortal.,,,,,,,,,Jesteś śmiertelny.,Você está mortal.,,Ești muritor.,, @@ -1382,7 +1382,7 @@ Rail Gun Rods,TXTS_AMMO9,,,,Projektily do railgunu,Rail Gun Munition,,,,,,,,,,,, Shotshells,TXTS_AMMO10,,,,Patrony,Schrotflintenpatronen,,,,,,,,,,,,Naboje,Cartuchos de Metralhadora Pesada,,Muniție pentru Pușca Grea,, Firebursts,TXTS_AMMO11,,,,Ohňáky,Feuerkugeln,,,,,,,,,,,,Ogniste Kule,Bolas de Fogo,,Mingi de Foc,, Deathcoils,TXTS_AMMO12,,,,Smrticívky,Todeskerne,,,,,,,,,,,,Rdzenie Śmierci,Núcleos da Morte,,Nuclee de Morți,, -"Automapping ON +"Automapping ON ",TXTS_AMON,,,,Automapa ZAP.,Automap an,,,,,,,,,,,,Automapowanie WŁĄCZONE,Automap Ligado,,Hartă Computerizată ACTIVATĂ,, Automapping OFF,TXTS_AMOFF,,,,Automapa VYP.,Automap aus,,,,,,,,,,,,Automapowanie WYŁĄCZONE,Automap Desligado,,Hartă Computerizată DEZACTIVATĂ,, Given Weapon,TXTS_GIVENW,,,,Dána zbraň,Waffe erhalten,,,,,,,,,,,,Dano Broń,Arma Recebida,,Armă Primită,, @@ -1563,557 +1563,557 @@ Level 31,TXT_EX_MAP31,,,,,,,,,,,,,,,,,Poziom 31,Fase 31,,Nivelul 31,, Level 32,TXT_EX_MAP32,,,,,,,,,,,,,,,,,Poziom 32,Fase 32,,Nivelul 32,, ,,,,,,,,,,,,,,,,,,,,,,, Incoming Message,TXT_EX_LASTLEVEL1,,,,Příchozí zpráva,Eingehende Nachricht,,Envena Mesaĝo,,,,,,,,,,Uwaga Wiadomość,Recebendo Mensagem,,Mesaj în Așteptare,, -"Our latest scans show -that the alien craft is -powering up, apparently -in an effort to leave. -The bad news is that they -seem to have left a device -behind, and all evidence -says its going to blow a -big hole in our fine planet. -A squad is trying to dismantle -it right now, but no luck so -far, and time is running out. -",TXT_EX_LASTLEVEL2,,,,"Poslední průzkumy ukazují, -že mimozemské plavidlo -začíná startovat, očividně -za účelem odletu. -Špatná zpráva je, že tu nechali -zařízení, které s největší -pravděpodobností odpálí velkou -díru do naší krásné planety. -Tým se momentálně snaží tuto -bombu zneškodnit, ale zatím -bezúspěšně - a čas vyprchává.","Unsere neuesten Scans zeigen, -dass das außerirdische Schiff -sufsteigt, anscheinend um die -Erde zu verlassen. -Die schlechte Nachricht ist, -dass sie anscheinend ein Gerät -zurückgelassen haben, und alles -deutet darauf hin, dass es ein -großes Loch in unseren schönen -Planeten sprengen wird. -Ein Trupp versucht gerade, es -abzubauen, hatte aber bisher -keinen Erfolg, und die Zeit läuft -uns davon.",,,,,,,,,,,,"Nasze ostatnie skany -wskazują, że statek obcych -startuje. Prawdopodobnie -po to, by uciec. -Zła wiadomość jest -taka, że obcy zostawili -urządzenie, które według -naszych badań ma wysadzić -wielką dziurę w naszej planecie. -Wojsko stara się rozbroić -tą bombę, ale nie dają rady. -A czas ucieka."," -Nosso últimos rastreios mostram -que a nave alienígena está -carregando sua energia, pelo visto -para tentar partir. As más notícias -são que eles deixaram para trás -um dispositivo e todas as evidências -mostram que isso vai detonar um -grande buraco no nosso belo -planeta. Um esquadrão está -tentando desmontá-lo neste -momento, mas nenhum progresso -até agora e o tempo está se esgotando.",,"Ultimele noastre scanări arată -că nava extraterestră se încarcă, -aparent într-un efort de a pleca. -Vestea proastă e că au lăsat un -dispozitiv în urmă, iar informațiile -noastre indică faptul că va crea o -groapă imensă în planeta noastră. -Un escadron încearcă să îl dezarmeze -chiar acum, dar fără noroc +"Our latest scans show +that the alien craft is +powering up, apparently +in an effort to leave. +The bad news is that they +seem to have left a device +behind, and all evidence +says its going to blow a +big hole in our fine planet. +A squad is trying to dismantle +it right now, but no luck so +far, and time is running out. +",TXT_EX_LASTLEVEL2,,,,"Poslední průzkumy ukazují, +že mimozemské plavidlo +začíná startovat, očividně +za účelem odletu. +Špatná zpráva je, že tu nechali +zařízení, které s největší +pravděpodobností odpálí velkou +díru do naší krásné planety. +Tým se momentálně snaží tuto +bombu zneškodnit, ale zatím +bezúspěšně - a čas vyprchává.","Unsere neuesten Scans zeigen, +dass das außerirdische Schiff +sufsteigt, anscheinend um die +Erde zu verlassen. +Die schlechte Nachricht ist, +dass sie anscheinend ein Gerät +zurückgelassen haben, und alles +deutet darauf hin, dass es ein +großes Loch in unseren schönen +Planeten sprengen wird. +Ein Trupp versucht gerade, es +abzubauen, hatte aber bisher +keinen Erfolg, und die Zeit läuft +uns davon.",,,,,,,,,,,,"Nasze ostatnie skany +wskazują, że statek obcych +startuje. Prawdopodobnie +po to, by uciec. +Zła wiadomość jest +taka, że obcy zostawili +urządzenie, które według +naszych badań ma wysadzić +wielką dziurę w naszej planecie. +Wojsko stara się rozbroić +tą bombę, ale nie dają rady. +A czas ucieka."," +Nosso últimos rastreios mostram +que a nave alienígena está +carregando sua energia, pelo visto +para tentar partir. As más notícias +são que eles deixaram para trás +um dispositivo e todas as evidências +mostram que isso vai detonar um +grande buraco no nosso belo +planeta. Um esquadrão está +tentando desmontá-lo neste +momento, mas nenhum progresso +até agora e o tempo está se esgotando.",,"Ultimele noastre scanări arată +că nava extraterestră se încarcă, +aparent într-un efort de a pleca. +Vestea proastă e că au lăsat un +dispozitiv în urmă, iar informațiile +noastre indică faptul că va crea o +groapă imensă în planeta noastră. +Un escadron încearcă să îl dezarmeze +chiar acum, dar fără noroc deocamdată, iar timpul trece.",, -"Get aboard that craft now -before it leaves, then find -and shoot all the energy -towers to gain access to the -control room. There you need to -take out the control panels and -the central power source. This -is the big one buddy, best of -luck... For all of us. -",TXT_EX_LASTLEVEL3,,,,"Dostaň se na palubu té lodi -dřív než odletí a poté najdi -a odstřel všechny napájecí -věže. Tím získáš přístup do -řídící místnosti. Tam musíš -zničit ovládácí panely a -centrální zdroj napájení. -Tohle je ono, kamaráde. -Hodně štěstí a zlom vaz, -za nás za všechny. -","Begib dich an Bord dieses -Schiffes bevor es startet und -zerstöre alle Energietürme um -in den Kontrollraum einzudringen. -Dort musst du die Schalttafeln und -die zentrale Energiequelle ausschalten. -Das ist der letzte Kampf, viel Glück... -... für uns alle.",,,,,,,,,,,,"Wejdź na pokład statku -zanim ucieknie. Potem -znajdź i zniszcz wszystkie -wieże energetyczne, by dostać -się do centrum dowodzenia. -Tam zniszcz panele kontrolne -oraz główne źródło energii. -Będzie ciężko mój drogi. -Życzę szczęścia... Nam wszystkim.","Entre agora naquela nave -antes que ela parta. Depois, -ache e destrua todas as torres -de energia para poder acessar -a sala de controle. Lá você vai -precisar destruir os painéis de -controle e a fonte de energia -central. Essa é a grande missão, -meu amigo. Boa sorte... Para -todos nós.",,"Acostează înainte să plece, -apoi găsește și distruge turnurile -de energie pentru a accesa -camera de control. Acolo -va trebui să distrugi panourile de -control și sursa de energie centrală. -E peștele mare amice, multă baftă... +"Get aboard that craft now +before it leaves, then find +and shoot all the energy +towers to gain access to the +control room. There you need to +take out the control panels and +the central power source. This +is the big one buddy, best of +luck... For all of us. +",TXT_EX_LASTLEVEL3,,,,"Dostaň se na palubu té lodi +dřív než odletí a poté najdi +a odstřel všechny napájecí +věže. Tím získáš přístup do +řídící místnosti. Tam musíš +zničit ovládácí panely a +centrální zdroj napájení. +Tohle je ono, kamaráde. +Hodně štěstí a zlom vaz, +za nás za všechny. +","Begib dich an Bord dieses +Schiffes bevor es startet und +zerstöre alle Energietürme um +in den Kontrollraum einzudringen. +Dort musst du die Schalttafeln und +die zentrale Energiequelle ausschalten. +Das ist der letzte Kampf, viel Glück... +... für uns alle.",,,,,,,,,,,,"Wejdź na pokład statku +zanim ucieknie. Potem +znajdź i zniszcz wszystkie +wieże energetyczne, by dostać +się do centrum dowodzenia. +Tam zniszcz panele kontrolne +oraz główne źródło energii. +Będzie ciężko mój drogi. +Życzę szczęścia... Nam wszystkim.","Entre agora naquela nave +antes que ela parta. Depois, +ache e destrua todas as torres +de energia para poder acessar +a sala de controle. Lá você vai +precisar destruir os painéis de +controle e a fonte de energia +central. Essa é a grande missão, +meu amigo. Boa sorte... Para +todos nós.",,"Acostează înainte să plece, +apoi găsește și distruge turnurile +de energie pentru a accesa +camera de control. Acolo +va trebui să distrugi panourile de +control și sursa de energie centrală. +E peștele mare amice, multă baftă... Pentru noi toți.",, -"The ancient Egyptian city -of Karnak has been seized -by unknown powers, and great -turmoil is spreading into -neighboring lands, posing -a grave threat to planet -earth. Militant forces from -all parts of the globe have -entered the Karnak valley, -but none have returned. The -only known information -regarding this crisis came -from a dying karnak villager -who managed to wander out of -the valley to safety. -'They've stolen the great -King's mummy...', Murmured -the dying villager, but the -villager died before he -could say more. With no -other options, world -leaders have chosen to drop -you into the valley via -helicopter in an attempt -to find and destroy the -threatening forces and -resolve the mystery that -has engulfed this once -peaceful land. Flying at -high altitude to avoid -being shot down like others -before you, your copter -mysteriously explodes in the -air as you barely escape, -with no possible contact -with the outside world. -Scared as hell, you descend -into the heart of karnak... -Home to the celebrated -burial crypt of the great -King Ramses. +"The ancient Egyptian city +of Karnak has been seized +by unknown powers, and great +turmoil is spreading into +neighboring lands, posing +a grave threat to planet +earth. Militant forces from +all parts of the globe have +entered the Karnak valley, +but none have returned. The +only known information +regarding this crisis came +from a dying karnak villager +who managed to wander out of +the valley to safety. +'They've stolen the great +King's mummy...', Murmured +the dying villager, but the +villager died before he +could say more. With no +other options, world +leaders have chosen to drop +you into the valley via +helicopter in an attempt +to find and destroy the +threatening forces and +resolve the mystery that +has engulfed this once +peaceful land. Flying at +high altitude to avoid +being shot down like others +before you, your copter +mysteriously explodes in the +air as you barely escape, +with no possible contact +with the outside world. +Scared as hell, you descend +into the heart of karnak... +Home to the celebrated +burial crypt of the great +King Ramses. ",TXT_EX_INTRO,Do not translate yet,,,,,,,,,,,,,,,,,,,,, -"An evil force known as the -Kilmaat has besieged the -sanctity of my palace and -is pulling at the very -tendrils of my existence. -These forces intend to -enslave me by reanimating -my preserved corpse. I have -protected my corpse with a -genetic key. If you are -unsuccessful I cannot -protect civilization, and -chaos will prevail. I am -being torn between worlds -and this insidious -experiment must be stopped. -",TXT_EX_CINEMA1,Level 1,,,"Zlá síla, známá jako Kilmát, -oblehla svatost mého paláce -a hrozí kořeném mé samotné -existence. Tyto síly mě chtějí -zotročit oživením mé zachovalé -mrtvoly. Ochránil jsem své -tělo genetickým klíčem. -Pokud se ti toto nezdaří, nebudu -moci ochránit civilizaci a -zkáza zvítězí. Jsem roztrháván -napříč světy a tento ďábelský -experiment musí skončit.","Eine böse Kraft, die als Kilmaat -bekannt ist, hat die Heiligkeit -meines Palastes belagert und -zieht an den Wurzeln meiner -Existenz. Diese Kräfte wollen -mich versklaven, indem sie meine -erhaltene Leiche wiederbeleben. -Ich habe meine Leiche mit einem -genetischen Schlüssel geschützt. -Wenn du erfolglos bleibst, kann -ich die Zivilisation nicht schützen, -und es wird Chaos herrschen. -Ich bin zwischen den Welten -hin und her gerissen und -dieses heimtückische -Experiment muss gestoppt -werden. -",,,,,,,,,,,,"Złe siły zwane też Kilmaatem -zbeszcześciły mój święty pałac -i łaszą się na to co pozostało -po mojej śmierci. -Te siły chcą mnie zniewolić -poprzez ożywienie mojego -zmumifikowanego ciała. -Postanowiłem uchronić je -poprzez użycie szyfru -genetycznego. Jeśli twoja misja się -nie powiedzie, to nie będę -mógł ochronić ludzkości -i wtedy nadejdzie chaos. -Jestem rozrywany między -światami, a ten podstępny -eksperyment musi się skończyć.","Uma força maligna conhecida -como os Kilmaat invadiram a -santidade de meu palácio e -ameaçam a minha existência. -Eles desejam me escravizar ao -reanimar meu corpo preservado. -Eu protegi meu corpo com uma -chave genética. Se você falhar -eu não poderei proteger a -civilização e o caos dominará. -Estou sendo rasgado entre -mundos diferentes e este -experimento macabro precisa -ter um fim.",,"O forță malefică cunoscută -drept Kilmaat a asediat sanctitatea -palatului meu și îmi amenință -propria existență. Aceste forțe -încearcă să mă înrobească și -reanimeze. Mi-am protejat corpul -cu o cheie genetică. Dacă nu vei reuși -să îi oprești nu voi putea proteja -civilizațiile, și haosul va triumfa. -Sunt blocat între lumi iar acest -experiment macabru trebuie să +"An evil force known as the +Kilmaat has besieged the +sanctity of my palace and +is pulling at the very +tendrils of my existence. +These forces intend to +enslave me by reanimating +my preserved corpse. I have +protected my corpse with a +genetic key. If you are +unsuccessful I cannot +protect civilization, and +chaos will prevail. I am +being torn between worlds +and this insidious +experiment must be stopped. +",TXT_EX_CINEMA1,Level 1,,,"Zlá síla, známá jako Kilmát, +oblehla svatost mého paláce +a hrozí kořeném mé samotné +existence. Tyto síly mě chtějí +zotročit oživením mé zachovalé +mrtvoly. Ochránil jsem své +tělo genetickým klíčem. +Pokud se ti toto nezdaří, nebudu +moci ochránit civilizaci a +zkáza zvítězí. Jsem roztrháván +napříč světy a tento ďábelský +experiment musí skončit.","Eine böse Kraft, die als Kilmaat +bekannt ist, hat die Heiligkeit +meines Palastes belagert und +zieht an den Wurzeln meiner +Existenz. Diese Kräfte wollen +mich versklaven, indem sie meine +erhaltene Leiche wiederbeleben. +Ich habe meine Leiche mit einem +genetischen Schlüssel geschützt. +Wenn du erfolglos bleibst, kann +ich die Zivilisation nicht schützen, +und es wird Chaos herrschen. +Ich bin zwischen den Welten +hin und her gerissen und +dieses heimtückische +Experiment muss gestoppt +werden. +",,,,,,,,,,,,"Złe siły zwane też Kilmaatem +zbeszcześciły mój święty pałac +i łaszą się na to co pozostało +po mojej śmierci. +Te siły chcą mnie zniewolić +poprzez ożywienie mojego +zmumifikowanego ciała. +Postanowiłem uchronić je +poprzez użycie szyfru +genetycznego. Jeśli twoja misja się +nie powiedzie, to nie będę +mógł ochronić ludzkości +i wtedy nadejdzie chaos. +Jestem rozrywany między +światami, a ten podstępny +eksperyment musi się skończyć.","Uma força maligna conhecida +como os Kilmaat invadiram a +santidade de meu palácio e +ameaçam a minha existência. +Eles desejam me escravizar ao +reanimar meu corpo preservado. +Eu protegi meu corpo com uma +chave genética. Se você falhar +eu não poderei proteger a +civilização e o caos dominará. +Estou sendo rasgado entre +mundos diferentes e este +experimento macabro precisa +ter um fim.",,"O forță malefică cunoscută +drept Kilmaat a asediat sanctitatea +palatului meu și îmi amenință +propria existență. Aceste forțe +încearcă să mă înrobească și +reanimeze. Mi-am protejat corpul +cu o cheie genetică. Dacă nu vei reuși +să îi oprești nu voi putea proteja +civilizațiile, și haosul va triumfa. +Sunt blocat între lumi iar acest +experiment macabru trebuie să înceteze.",, -"I have hidden a mystical -gauntlet at El Kab that will -channel my energy through -your hands. Find the -gauntlet and cross the Aswan -High Dam to defeat the evil -beast Set. -",TXT_EX_CINEMA2,After Level 4,,,"V el-Kábu jsem ukryl tajemnou -rukavici, která ti umožní využít -mé síly skrz tvé ruce. Najdi -ji, přejdi Vysokou Asuánskou -přehradu a poraž Sutecha, -zlou bestii.","Ich habe in El Kab einen -mystischen Handschuh -versteckt, der meine Energie -durch deine Hände leiten wird. -Finde den Handschuh und -überquere den Assuan-Staudamm, -um das böse Biest zu besiegen.",,,,,,,,,,,,"Ukryłem mistyczną bransoletę -w El Kab, która prześle część -mojej mocy do twych rąk. -Znajdź ją i przejdź przez -Wielką Tamę Asuanu, by zniszczyć -złą bestię, której imię Set.","Eu escondi uma braçadeira -mística em Elcabe que -canalizará minha energia -para suas mãos. Encontre-a -e atravesse a Represa de -Assuã para derrotar a -besta malígna Set.",,"Am ascuns o mănușă mistică -îl El Kab care îmi va canaliza energia -prin mâinile tale. Găsește-o și treci -peste barajul Aswan pentru a învinge +"I have hidden a mystical +gauntlet at El Kab that will +channel my energy through +your hands. Find the +gauntlet and cross the Aswan +High Dam to defeat the evil +beast Set. +",TXT_EX_CINEMA2,After Level 4,,,"V el-Kábu jsem ukryl tajemnou +rukavici, která ti umožní využít +mé síly skrz tvé ruce. Najdi +ji, přejdi Vysokou Asuánskou +přehradu a poraž Sutecha, +zlou bestii.","Ich habe in El Kab einen +mystischen Handschuh +versteckt, der meine Energie +durch deine Hände leiten wird. +Finde den Handschuh und +überquere den Assuan-Staudamm, +um das böse Biest zu besiegen.",,,,,,,,,,,,"Ukryłem mistyczną bransoletę +w El Kab, która prześle część +mojej mocy do twych rąk. +Znajdź ją i przejdź przez +Wielką Tamę Asuanu, by zniszczyć +złą bestię, której imię Set.","Eu escondi uma braçadeira +mística em Elcabe que +canalizará minha energia +para suas mãos. Encontre-a +e atravesse a Represa de +Assuã para derrotar a +besta malígna Set.",,"Am ascuns o mănușă mistică +îl El Kab care îmi va canaliza energia +prin mâinile tale. Găsește-o și treci +peste barajul Aswan pentru a învinge bestia perfidă Set.",, -"You've made it halfway toward -fullfilling your destiny. -The Kilmaat are growing -restless with your progress. -Seek out a temple in this -citadel where I will provide -more information. -",TXT_EX_CINEMA3,After Level 10,,,"Jsi napůl cesty k naplnění -svého osudu. Kilmátu se tvůj -postup nelíbí a je neklidný. -Najdi v této citadele chrám, -kde ti poskytnu další informace.","Du den halben Weg geschafft, -um dein Schicksal zu erfüllen. -Die Kilmaat werden durch deine -Aktionen unruhig. -Suche in dieser Zitadelle einen -Tempel auf, in dem ich weitere -Informationen geben werde.",,,,,,,,,,,,"Jesteś już w połowie drogi -by osiągnąć swe przeznaczenie. -Kilmaat robi się niespokojny -patrząc na twe osiągnięcia. -Znajdź świątynię w tej twierdzy. -Tam podam ci więcej informacji.","Você já está na metade do -caminho para cumprir o seu -destino. Os Kilmaat estão -ficando inquietos com o seu -progresso. Encontre um -templo nesta cidadela onde -darei mais informações.",,"Ești la jumătatea drumului -de a-ți împlini destinul. Kilmaații -își pierd răbdarea în fața progresului -tău. Caută un templu în citadela +"You've made it halfway toward +fullfilling your destiny. +The Kilmaat are growing +restless with your progress. +Seek out a temple in this +citadel where I will provide +more information. +",TXT_EX_CINEMA3,After Level 10,,,"Jsi napůl cesty k naplnění +svého osudu. Kilmátu se tvůj +postup nelíbí a je neklidný. +Najdi v této citadele chrám, +kde ti poskytnu další informace.","Du den halben Weg geschafft, +um dein Schicksal zu erfüllen. +Die Kilmaat werden durch deine +Aktionen unruhig. +Suche in dieser Zitadelle einen +Tempel auf, in dem ich weitere +Informationen geben werde.",,,,,,,,,,,,"Jesteś już w połowie drogi +by osiągnąć swe przeznaczenie. +Kilmaat robi się niespokojny +patrząc na twe osiągnięcia. +Znajdź świątynię w tej twierdzy. +Tam podam ci więcej informacji.","Você já está na metade do +caminho para cumprir o seu +destino. Os Kilmaat estão +ficando inquietos com o seu +progresso. Encontre um +templo nesta cidadela onde +darei mais informações.",,"Ești la jumătatea drumului +de a-ți împlini destinul. Kilmaații +își pierd răbdarea în fața progresului +tău. Caută un templu în citadela asta unde îți voi oferi mai multe informații.",, -"Set was a formidable foe. -No mortal has even conquered -their own fear, much less -entered mortal battle and -taken his life. -",TXT_EX_CINEMA4,Before Level 11,,,"Sutech byl hrozivým nepřítelem. -Žádný smrtelník ještě neporazil -vlastní strach, natožpak aby -se s ním ve smrtelném souboji -střetl a zahubil jej.","Set war ein beeindruckender Feind. -Kein Sterblicher hat je seine -eigene Angst besiegt, geschweige -denn den tödlichen Kampf -aufgenommen und sein Leben -genommen.",,,,,,,,,,,,"Set był potężnym przeciwnikiem. -Żaden śmiertelnik jeszcze nigdy -nie przezwyciężył swych najgorszych -koszmarów. Tak samo nikt nigdy -nie stoczył z nim walki i zwyciężył.","Set foi um inimigo formidável. -Nenhum mortal jamais conquistou -o próprio medo, tampouco entrou -em combate mortal e tirou a sua vida.",,"Set a fost un inamic formidabil. -Niciun muritor nu a reușit să își -învingă teama, cu atât mai puțin +"Set was a formidable foe. +No mortal has even conquered +their own fear, much less +entered mortal battle and +taken his life. +",TXT_EX_CINEMA4,Before Level 11,,,"Sutech byl hrozivým nepřítelem. +Žádný smrtelník ještě neporazil +vlastní strach, natožpak aby +se s ním ve smrtelném souboji +střetl a zahubil jej.","Set war ein beeindruckender Feind. +Kein Sterblicher hat je seine +eigene Angst besiegt, geschweige +denn den tödlichen Kampf +aufgenommen und sein Leben +genommen.",,,,,,,,,,,,"Set był potężnym przeciwnikiem. +Żaden śmiertelnik jeszcze nigdy +nie przezwyciężył swych najgorszych +koszmarów. Tak samo nikt nigdy +nie stoczył z nim walki i zwyciężył.","Set foi um inimigo formidável. +Nenhum mortal jamais conquistou +o próprio medo, tampouco entrou +em combate mortal e tirou a sua vida.",,"Set a fost un inamic formidabil. +Niciun muritor nu a reușit să își +învingă teama, cu atât mai puțin să intre în luptă și să îi ia viața.",, -"The Kilmaat race has -continued their monsterous -animal-human experiments in -an effort to solve the key of -animating my corpse. The -victory defeating Set didn't -slow you down as much as -they had planned. They are -actively robbing a slave -girl of her life to create -another monsterous -abomination, combining human -and insect intent on slaying -you. Prepare yourself for -battle as she will be waiting -for you at the Luxor temple. -",TXT_EX_CINEMA5,In Level 11,,,"Kilmátové pokračují ve svých -nestvůrných pokusech s cílem -rozluštit klíč k oživení -mé mrtvoly. Tvé vítězství -nad Sutechem tě nezpomalilo -tolik, jak měli v plánu. -Právě teď berou život otrokyni, -aby stvořili další odpornou -obludnost, kombinujíce člověka -a hmyz s cílem tě zneškodnit. -Připrav se na bitvu; bestie -tě bude čekat v Luxorském chrámu.","Die Kilmaat-Rasse hat ihre -monströsen Tier-Mensch- -Experimente fortgesetzt, -um den Schlüssel zur Animation -meiner Leiche zu lösen. -Der Sieg gegen Set hat dich -nicht so sehr gebremst, wie sie -es geplant hatten. Sie berauben -aktiv eine Sklavin ihres Lebens, -um einen weiteren monströsen -Greuel zu erschaffen, der -Mensch und Insekt kombiniert -und darauf abzielt, dich zu töten. -Bereite dich auf den Kampf vor, -denn sie wird im Luxor-Tempel -auf dich warten.",,,,,,,,,,,,"Kilmaat dalej kontynuuje swoje -eksperymenty z hybrydami -ludzi i zwierząt po to by złamać -szyfr chroniący moje ciało. -Wygląda na to, że walka z Setem -nie spowolniła cię tak bardzo -jak przypuszczali. Teraz próbują -pozbawić biedną niewolnicę życia -by stworzyć kolejną maszkarę -będącą hybrydą człowieka -i insekta, której zadanie jest -zniszczenie ciebie. -Przygotuj się do walki. Będzie ona -czekać na ciebie w świątyni -w Luksorze.","A raça Kilmaat continuou com -seus experimentos monstruosos -com seres humanos e animais -para tentar solucionar a chave -para reanimar o meu corpo. -A vitória contra Set não te -atrasou tanto o quanto eles -planejavam. Eles estão tirando -a vida de uma garota escrava -para criar mais outra abominação, -combinando humano com inseto -para te destruir. Prepare-se para -a batalha pois ela estará te -esperando no Templo de Luxor.",,"Rasa Kilmaat și-a continuat -experimentele om-animal monstruoase -într-o încercare de a îmi anima cadavrul. -Victoria asupra lui Set nu te-a încetinit pe -cât ar fi dorit. În timp ce vorbim, o -față e înrobită pentru a crea altă -abominație, combinând intenție -umană și insectă de a te ucide. -Pregătește-te de luptă, te va aștepta +"The Kilmaat race has +continued their monsterous +animal-human experiments in +an effort to solve the key of +animating my corpse. The +victory defeating Set didn't +slow you down as much as +they had planned. They are +actively robbing a slave +girl of her life to create +another monsterous +abomination, combining human +and insect intent on slaying +you. Prepare yourself for +battle as she will be waiting +for you at the Luxor temple. +",TXT_EX_CINEMA5,In Level 11,,,"Kilmátové pokračují ve svých +nestvůrných pokusech s cílem +rozluštit klíč k oživení +mé mrtvoly. Tvé vítězství +nad Sutechem tě nezpomalilo +tolik, jak měli v plánu. +Právě teď berou život otrokyni, +aby stvořili další odpornou +obludnost, kombinujíce člověka +a hmyz s cílem tě zneškodnit. +Připrav se na bitvu; bestie +tě bude čekat v Luxorském chrámu.","Die Kilmaat-Rasse hat ihre +monströsen Tier-Mensch- +Experimente fortgesetzt, +um den Schlüssel zur Animation +meiner Leiche zu lösen. +Der Sieg gegen Set hat dich +nicht so sehr gebremst, wie sie +es geplant hatten. Sie berauben +aktiv eine Sklavin ihres Lebens, +um einen weiteren monströsen +Greuel zu erschaffen, der +Mensch und Insekt kombiniert +und darauf abzielt, dich zu töten. +Bereite dich auf den Kampf vor, +denn sie wird im Luxor-Tempel +auf dich warten.",,,,,,,,,,,,"Kilmaat dalej kontynuuje swoje +eksperymenty z hybrydami +ludzi i zwierząt po to by złamać +szyfr chroniący moje ciało. +Wygląda na to, że walka z Setem +nie spowolniła cię tak bardzo +jak przypuszczali. Teraz próbują +pozbawić biedną niewolnicę życia +by stworzyć kolejną maszkarę +będącą hybrydą człowieka +i insekta, której zadanie jest +zniszczenie ciebie. +Przygotuj się do walki. Będzie ona +czekać na ciebie w świątyni +w Luksorze.","A raça Kilmaat continuou com +seus experimentos monstruosos +com seres humanos e animais +para tentar solucionar a chave +para reanimar o meu corpo. +A vitória contra Set não te +atrasou tanto o quanto eles +planejavam. Eles estão tirando +a vida de uma garota escrava +para criar mais outra abominação, +combinando humano com inseto +para te destruir. Prepare-se para +a batalha pois ela estará te +esperando no Templo de Luxor.",,"Rasa Kilmaat și-a continuat +experimentele om-animal monstruoase +într-o încercare de a îmi anima cadavrul. +Victoria asupra lui Set nu te-a încetinit pe +cât ar fi dorit. În timp ce vorbim, o +față e înrobită pentru a crea altă +abominație, combinând intenție +umană și insectă de a te ucide. +Pregătește-te de luptă, te va aștepta la templul din Luxor.",, -"You've done well to defeat -Selkis. You have distracted -the Kilmaat with your -presence and they have -temporarily abandoned -animation of my corpse. -The alien queen Kilmaatikhan -has a personal vendetta -against you. Arrogance is -her weakness, and if you can -defeat Kilmaatikhan, the -battle will be won. -",TXT_EX_CINEMA6,After Level 15,,,"Tvé vítězství nad Selket -bylo dobré. Podařilo se ti -odvrátit pozornost Kilmátů, -kteří dočasně ustali se svými -pokusy oživit mé tělo. -Mimozemská královna Kilmátichana -vůči tobě teď chová osobní nenávist. -Arogance je její slabá stránka a, -pokud se ti Kilmátichanu podaří -porazit, tato bitva bude dokončena.","Es war gute Arbeit, Selkis zu -besiegen. Du hast die Kilmaat -mit deiner Anwesenheit -abgelenkt und sie haben die -Animation meiner Leiche -vorübergehend aufgegeben. -Die außerirdische Königin -Kilmaatikhan plant eine -persönliche Rache gegen dich. -Arroganz ist ihre Schwäche, -und wenn du Kilmaatikhan -besiegen kannst, wird -der Kampf gewonnen.",,,,,,,,,,,,"Poradziłeś sobie z Selkis. -Twoja obecność odwróciła -uwagę Kilmaatu, przez co -przerwali ożywianie mojego ciała. -Kilmaatykańska królowa teraz -szykuje się do odwetu. -Jej arogancja jest jej największą -słabością i jeśli ją pokonasz -to wojna będzie wygrana.","Parabéns por derrotar Selkis. -Você conseguiu distrair os -Kilmaat com a sua presença -e eles abandonaram -temporariamente a reanimação -de meu corpo. A rainha -alienígena Kilmaatikhan tem -uma desejo de vingança contra você. -A arrogância é a sua fraqueza -e se você conseguir derrotá-la, -a batalha será vencida.",,"Ai făcut bine să o învingi pe Selkis. -Kilmaații au fost distrași de -prezența ta și au renunțat la -încercarea lor de a-mi reanima -cadavrul. Regina extraterestră -Kilmaatikahn are un plan de -răzbunare personal cu tine. -Aroganța e slăbiciunea ei, si dacă +"You've done well to defeat +Selkis. You have distracted +the Kilmaat with your +presence and they have +temporarily abandoned +animation of my corpse. +The alien queen Kilmaatikhan +has a personal vendetta +against you. Arrogance is +her weakness, and if you can +defeat Kilmaatikhan, the +battle will be won. +",TXT_EX_CINEMA6,After Level 15,,,"Tvé vítězství nad Selket +bylo dobré. Podařilo se ti +odvrátit pozornost Kilmátů, +kteří dočasně ustali se svými +pokusy oživit mé tělo. +Mimozemská královna Kilmátichana +vůči tobě teď chová osobní nenávist. +Arogance je její slabá stránka a, +pokud se ti Kilmátichanu podaří +porazit, tato bitva bude dokončena.","Es war gute Arbeit, Selkis zu +besiegen. Du hast die Kilmaat +mit deiner Anwesenheit +abgelenkt und sie haben die +Animation meiner Leiche +vorübergehend aufgegeben. +Die außerirdische Königin +Kilmaatikhan plant eine +persönliche Rache gegen dich. +Arroganz ist ihre Schwäche, +und wenn du Kilmaatikhan +besiegen kannst, wird +der Kampf gewonnen.",,,,,,,,,,,,"Poradziłeś sobie z Selkis. +Twoja obecność odwróciła +uwagę Kilmaatu, przez co +przerwali ożywianie mojego ciała. +Kilmaatykańska królowa teraz +szykuje się do odwetu. +Jej arogancja jest jej największą +słabością i jeśli ją pokonasz +to wojna będzie wygrana.","Parabéns por derrotar Selkis. +Você conseguiu distrair os +Kilmaat com a sua presença +e eles abandonaram +temporariamente a reanimação +de meu corpo. A rainha +alienígena Kilmaatikhan tem +uma desejo de vingança contra você. +A arrogância é a sua fraqueza +e se você conseguir derrotá-la, +a batalha será vencida.",,"Ai făcut bine să o învingi pe Selkis. +Kilmaații au fost distrași de +prezența ta și au renunțat la +încercarea lor de a-mi reanima +cadavrul. Regina extraterestră +Kilmaatikahn are un plan de +răzbunare personal cu tine. +Aroganța e slăbiciunea ei, si dacă o poți învinge, bătălia va fi câștigată.",, -"The Kilmaat have been -destroyed. Unfortunately, -your recklessness has -destroyed the Earth and all -of its inhabitants. All that -remains is a smoldering hunk -of rock. -",TXT_EX_CINEMA7,Bad ending,,,"Kilmáti byli zničeni. -Tvá neopatrnost ale zničila -Zemi a všechen život na ní. -Vše, co zbylo, je doutnající -kus kamene.","Die Kilmaat sind vernichtet. -Dummerweise hat deine -Sorglosigkeit zur Zerstörung -der Erde und all ihrer -Bewohner geführt. -Alles, was bleibt ist ein -kokelnder Felsbrocken.",,,,,,,,,,,,"Kilmaat został pokonany. Niestety -twoja lekkomyślność zniszczyła -Ziemię i jej mieszkańców. -Jedyne co pozostało to -kupa kamieni.","Os Kilmaat foram destruídos. -Infelizmente, o seu descuido -destruiu a Terra e todos os seus -habitantes. Tudo o que resta é -um pedaço de pedra fumegante.",,"Rasa Kilmaat a fost distrusă. Din păcate -neglijența ta a distrus Pământul -și pe toți locuitorii ei. Tot ce a -rămas în urmă e o bucată +"The Kilmaat have been +destroyed. Unfortunately, +your recklessness has +destroyed the Earth and all +of its inhabitants. All that +remains is a smoldering hunk +of rock. +",TXT_EX_CINEMA7,Bad ending,,,"Kilmáti byli zničeni. +Tvá neopatrnost ale zničila +Zemi a všechen život na ní. +Vše, co zbylo, je doutnající +kus kamene.","Die Kilmaat sind vernichtet. +Dummerweise hat deine +Sorglosigkeit zur Zerstörung +der Erde und all ihrer +Bewohner geführt. +Alles, was bleibt ist ein +kokelnder Felsbrocken.",,,,,,,,,,,,"Kilmaat został pokonany. Niestety +twoja lekkomyślność zniszczyła +Ziemię i jej mieszkańców. +Jedyne co pozostało to +kupa kamieni.","Os Kilmaat foram destruídos. +Infelizmente, o seu descuido +destruiu a Terra e todos os seus +habitantes. Tudo o que resta é +um pedaço de pedra fumegante.",,"Rasa Kilmaat a fost distrusă. Din păcate +neglijența ta a distrus Pământul +și pe toți locuitorii ei. Tot ce a +rămas în urmă e o bucată fierbinte de rocă.",, -"The Kilmaat have been -defeated and you single -handedly saved the Earth -from destruction. - - - -Your bravery and heroism -are legendary. -",TXT_EX_CINEMA8,After Level 20,,,"Kilmáti byli zničení a -tys vlastnoručně zachránil -Zemi před jejím zničením. - - -Tvá odvaha a hrdinství -jsou legendární.","Die Klimaat sind geschlagen -und du alleine hast die -Erde vor der Zerstörung -berwahrt. - - - -Deine Tapferkeit und -Heldenmut sind legendär.",,,,,,,,,,,,"Kilmaat został pokonany i dzięki -swojej brawurze ocaliłeś Ziemię -przed zniszczeniem. - - - -Twoja odwaga i męstwo są -legendarne.","Os Kilmaat foram destruídos -e você conseguiu por conta -própria salvar a Terra da -destruição. - - - -Sua bravura e seu heroísmo -são lendários.",,"Rasa Kilmaat a fost înfrântă și -ai salvat Pământul de unul singur -de la distrugere. - - - -Acțiunile tale eroice și curajul tău +"The Kilmaat have been +defeated and you single +handedly saved the Earth +from destruction. + + + +Your bravery and heroism +are legendary. +",TXT_EX_CINEMA8,After Level 20,,,"Kilmáti byli zničení a +tys vlastnoručně zachránil +Zemi před jejím zničením. + + +Tvá odvaha a hrdinství +jsou legendární.","Die Klimaat sind geschlagen +und du alleine hast die +Erde vor der Zerstörung +berwahrt. + + + +Deine Tapferkeit und +Heldenmut sind legendär.",,,,,,,,,,,,"Kilmaat został pokonany i dzięki +swojej brawurze ocaliłeś Ziemię +przed zniszczeniem. + + + +Twoja odwaga i męstwo są +legendarne.","Os Kilmaat foram destruídos +e você conseguiu por conta +própria salvar a Terra da +destruição. + + + +Sua bravura e seu heroísmo +são lendários.",,"Rasa Kilmaat a fost înfrântă și +ai salvat Pământul de unul singur +de la distrugere. + + + +Acțiunile tale eroice și curajul tău sunt legendare.",, "LOBOTOMY SOFTWARE, INC.,",TXT_EX_COPYRIGHT1,,,,,,,,,,,,,,,,,,,,,, "3D ENGINE BY 3D REALMS,",TXT_EX_COPYRIGHT2,,,,,,,,,,,,,,,,,,,,,, @@ -2146,49 +2146,49 @@ War Key,TXT_EX_PICKUP26,,,,Klíč války,Kriegsschlüssel,,,,,,,,,,,,Klucz Wojny Earth Key,TXT_EX_PICKUP27,,,,Klíč země,Erdschlüssel,,,,,,,,,,,,Klucz Ziemi,Chave da Terra,,Cheia Pământului,, Magic,TXT_EX_PICKUP28,,,,Magie,Magie,,,,,,,,,,,,Magia,Magia,,Magie,, Location Preserved,TXT_EX_PICKUP29,,,,Lokace uchována,Position gespeichert,,,,,,,,,,,,Pozycja Zapisana,Local Preservado,,Locație Memorată,, -"Pick up a copy of Exhumed -today to continue the adventure! -More levels, nastier creatures -and the evil doings of the -Kilmaat await you in the full -version of the game. -Twenty levels, plus 12 network -play levels can be yours! -",TXT_EX_SHAREWARE,,,,"Pro pokračování si ještě dnes -kup kopii Exhumed! -Víc levelů, odpornějších -příšer a Kilmátových zlovolností -na tebe čeká v plné verzi hry. -Dvacet levelů a dvanáct -multiplayerových levelů -mohou být tvoje! -","Besorge dir noch heute die -Vollversion um weiterzuspielen! -Mehr Level, fiesere Kreaturen und -Untaten der Kilmaat warten auf -dich dort. -Zwanzig Level plus 12 -Multispielerlevel warten auf dich!",,,,,,,,,,,,"Kup grę Exhumed już dziś -i kontynuuj swoją przygodę! -Więcej poziomów, groźniejszych -potworów i innych maszkar Kilmaatu -czeka na ciebie w pełnej wersji gry. -Dwadzieścia poziomów oraz -12 aren dla trybu sieciowego -mogą być twoje!","Adquira uma cópia de Exhumed -hoje mesmo para continuar -a aventura! Mais fases, criaturas -mais terríveis ainda e os atos -cruéis dos Kilmaat te esperam -na versão completa do jogo. -Você receberá vinte fases, além de -mais 12 para jogar em rede!",,"Ridică o copie a jocului Exhumed -astăzi pentru a continua aventura! -Mai multe nivele, creaturi meschine -și fapte oribile ale rasei Kilmaat te -așteaptă în versiunea completă a -jocului. Douăzeci de nivele, plus -doisprezece nivele de joc online +"Pick up a copy of Exhumed +today to continue the adventure! +More levels, nastier creatures +and the evil doings of the +Kilmaat await you in the full +version of the game. +Twenty levels, plus 12 network +play levels can be yours! +",TXT_EX_SHAREWARE,,,,"Pro pokračování si ještě dnes +kup kopii Exhumed! +Víc levelů, odpornějších +příšer a Kilmátových zlovolností +na tebe čeká v plné verzi hry. +Dvacet levelů a dvanáct +multiplayerových levelů +mohou být tvoje! +","Besorge dir noch heute die +Vollversion um weiterzuspielen! +Mehr Level, fiesere Kreaturen und +Untaten der Kilmaat warten auf +dich dort. +Zwanzig Level plus 12 +Multispielerlevel warten auf dich!",,,,,,,,,,,,"Kup grę Exhumed już dziś +i kontynuuj swoją przygodę! +Więcej poziomów, groźniejszych +potworów i innych maszkar Kilmaatu +czeka na ciebie w pełnej wersji gry. +Dwadzieścia poziomów oraz +12 aren dla trybu sieciowego +mogą być twoje!","Adquira uma cópia de Exhumed +hoje mesmo para continuar +a aventura! Mais fases, criaturas +mais terríveis ainda e os atos +cruéis dos Kilmaat te esperam +na versão completa do jogo. +Você receberá vinte fases, além de +mais 12 para jogar em rede!",,"Ridică o copie a jocului Exhumed +astăzi pentru a continua aventura! +Mai multe nivele, creaturi meschine +și fapte oribile ale rasei Kilmaat te +așteaptă în versiunea completă a +jocului. Douăzeci de nivele, plus +doisprezece nivele de joc online pot fi numai ale tale!",, "Hi Sweetie, I love you",TXT_EX_SWEETIE,,,,"Ahoj, zlato, miluju tě.","Hallo, ich liebe dich",,,,,,,,,,,,"Cześć Skarbie, kocham cię","Oi, querida, te amo",,"Bună Dragule, te iubesc",, Flashes toggled,TXT_EX_FLASHES,,,,Blikání přepnuto,Blitze umgeschaltet,,,,,,,,,,,,Miganie Przełączone,Flashes ligados,,Orbitoare comutate,, diff --git a/wadsrc/static/menudef.txt b/wadsrc/static/menudef.txt index 7dd23c9c2..2880f6978 100644 --- a/wadsrc/static/menudef.txt +++ b/wadsrc/static/menudef.txt @@ -219,7 +219,7 @@ ImageScroller "HelpMenu" { ifgame(Duke, Nam, WW2GI, Redneck, RedneckRides) { - + ImageItem "TEXTSTORY" ImageItem "F1HELP" ifgame(RedneckRides) @@ -379,7 +379,7 @@ ImageScroller "CreditsMenu" ImageItem "TilePIELogo" } } - + //------------------------------------------------------------------------------------------- // // Base definition for load game menu. Only the configurable part is done here @@ -405,7 +405,7 @@ ListMenu "SaveGameMenu" Class "SaveMenu" // uses its own implementation CaptionItem "$MNU_SAVEGAME" } - + //------------------------------------------------------------------------------------------- // // Base definition for user map menu. Only the configurable part is done here @@ -418,7 +418,7 @@ ListMenu "UsermapMenu" Class "UsermapMenu" // uses its own implementation CaptionItem "$MNU_USERMAP" } - + //------------------------------------------------------------------------------------------- // // The generic options menus start here @@ -488,7 +488,7 @@ OptionMenu "OptionsMenu" protected SafeCommand "$OPTMNU_RESETTOSAVED", "reset2saved" //Command "$OPTMNU_CONSOLE", "menuconsole" } - + //------------------------------------------------------------------------------------------- // // Controls Menu @@ -547,7 +547,7 @@ OptionMenu "ActionControlsMenu" protected StaticText "" Control "$CNTRLMNU_MOUSELOOK" , "+mouse_aiming" Control "$CNTRLMNU_MLOOKTOGGLE" , "togglemouseaim" - + Control "$CNTRLMNU_AIMUP" , "+aim_up" Control "$CNTRLMNU_AIMDOWN" , "+aim_down" Control "$CNTRLMNU_LOOKUP" , "+look_up" @@ -638,7 +638,7 @@ OptionMenu "InventoryControlsMenu" protected StaticText "" Control "$CNTRLMNU_NEXTITEM" , "invnext" Control "$CNTRLMNU_PREVIOUSITEM" , "invprev" - + // Item numbers here are are defined by the games' internal order. ifgame(Duke) { @@ -1062,7 +1062,7 @@ OptionValue "Precision" OptionMenu "VideoOptions" protected { Title "$DSPLYMNU_TITLE" - + Submenu "$OPTMNU_HUD", "HUDOptions" Submenu "$RENDER_OPTIONS", "RenderOptions" Submenu "$AUTOMAPMNU_TITLE", "AutomapOptions" @@ -1438,7 +1438,7 @@ OptionMenu AdvSoundOptions protected Option "$ADVSNDMNU_LOOKUPMUS", "mus_extendedlookup", "OnOff" Option "$ADVSNDMNU_LOOKUPSND", "snd_extendedlookup", "OnOff" StaticText " " - + //Option "$ADVSNDMNU_HRTF", "snd_hrtf", "AutoOffOn" StaticText " " //Option "$SNDMNU_BACKGROUND", "i_soundinbackground", "OnOff" @@ -1988,7 +1988,7 @@ OptionMenu "EngineCredits1a" title "$MNU_CREDITS" Submenu " ---->", "EngineCredits1b" StaticText "Raze QA", 1 - + StaticText "sinisterseed ", 0 StaticText "Major Cooke Dynamo ", 0 StaticText "Nash Muhandes   Martin Howe       ", 0 @@ -2043,7 +2043,7 @@ OptionMenu "EngineCredits2a" StaticText "Alexey \"Nuke.YKT\" Skrybykin", 0 StaticText "sirlemonhead", 0 } - + OptionMenu "EngineCredits2b" { title "$MNU_CREDITS" @@ -2054,14 +2054,14 @@ OptionMenu "EngineCredits2b" StaticText "MaxED        Kinsie   ", 0 StaticText "Maxi Clouds   ", 0 } - + OptionMenu "EngineCredits3" { title "$MNU_CREDITS" //Submenu " ---->", "EngineCredits" // This creates a circular dependency which makes the search tool crash. StaticText "The EDuke32 team thanks the following people", 1 StaticText "for their contributions:", 1 - + StaticText "Alexey Skrybykin  Bioman            Brandon Bergren  ", 0 StaticText "Charlie Honig     Dan Gaskill       David Koenig     ", 0 StaticText "Ed Coolidge       Emile Belanger    Fox              ", 0 @@ -2074,4 +2074,4 @@ OptionMenu "EngineCredits3" StaticText "Ryan Gordon       Stephen Anthony   tueidj           ", 0 StaticText "Pär \"Parkar\" Karlsson", 0 } - + diff --git a/wadsrc/static/shaders/glsl/burn.fp b/wadsrc/static/shaders/glsl/burn.fp index 486789f54..ff9c1d699 100644 --- a/wadsrc/static/shaders/glsl/burn.fp +++ b/wadsrc/static/shaders/glsl/burn.fp @@ -9,6 +9,6 @@ void main() vec4 t1 = texture(tex, vTexCoord.xy); vec4 t2 = texture(texture2, vec2(vTexCoord.x, 1.0-vTexCoord.y)); - + FragColor = frag * vec4(t1.r, t1.g, t1.b, t2.a); } diff --git a/wadsrc/static/shaders/glsl/fogboundary.fp b/wadsrc/static/shaders/glsl/fogboundary.fp index 9494a9ca9..3bfa059c0 100644 --- a/wadsrc/static/shaders/glsl/fogboundary.fp +++ b/wadsrc/static/shaders/glsl/fogboundary.fp @@ -15,7 +15,7 @@ void main() { float fogdist; float fogfactor; - + // // calculate fog factor // diff --git a/wadsrc/static/shaders/glsl/func_paletted.fp b/wadsrc/static/shaders/glsl/func_paletted.fp index 2f86139e2..8e2aa8a5b 100644 --- a/wadsrc/static/shaders/glsl/func_paletted.fp +++ b/wadsrc/static/shaders/glsl/func_paletted.fp @@ -15,10 +15,10 @@ vec4 ProcessTexel() float coordX = vTexCoord.x; float coordY = vTexCoord.y; vec2 newCoord; - + // z is the depth in view space, positive going into the screen float z = abs(pixelpos.w); - + #ifdef NPOT_EMULATION // Coordinate adjustment for NPOT textures. It is somehow fitting that Build games exploited this texture wrapping quirk of the software rendering engine... if (uNpotEmulation.y != 0.0) @@ -36,13 +36,13 @@ vec4 ProcessTexel() float numShades = float(uPalLightLevels & 255); float shade = (1.0 - uLightLevel) * (numShades); shade = clamp((shade + visibility), 0.0, numShades - 1.0); - + int palindex = int(color.r * 255.0 + 0.1); // The 0.1 is for roundoff error compensation. int shadeindex = int(floor(shade)); float colorIndexF = texelFetch(texture3, ivec2(palindex, shadeindex), 0).r; int colorIndex = int(colorIndexF * 255.0 + 0.1); // The 0.1 is for roundoff error compensation. vec4 palettedColor = texelFetch(texture2, ivec2(colorIndex, 0), 0); - + if ((blendflags & 16384) != 0) { // Get the next shaded palette index for interpolation @@ -52,10 +52,10 @@ vec4 ProcessTexel() float shadeFrac = mod(shade, 1.0); palettedColor.rgb = mix(palettedColor.rgb, palettedColorNext.rgb, shadeFrac); } - + palettedColor.a = color.r == 0.0? 0.0 : 1.0;// 1.0-floor(color.r); color = palettedColor; - + if (color.a < uAlphaThreshold) discard; // it's only here that we have the alpha value available to be able to perform the alpha test. return vec4(color.rgb, 1.0); } diff --git a/wadsrc/static/shaders/glsl/fuzz_smooth.fp b/wadsrc/static/shaders/glsl/fuzz_smooth.fp index 3c642c399..b2af9a2e5 100644 --- a/wadsrc/static/shaders/glsl/fuzz_smooth.fp +++ b/wadsrc/static/shaders/glsl/fuzz_smooth.fp @@ -13,6 +13,6 @@ vec4 ProcessTexel() basicColor.a = basicColor.a * test; basicColor.r = basicColor.g = basicColor.b = 0.0; - + return basicColor; } diff --git a/wadsrc/static/shaders/glsl/fuzz_standard.fp b/wadsrc/static/shaders/glsl/fuzz_standard.fp index 3eb3b67e6..fd166760a 100644 --- a/wadsrc/static/shaders/glsl/fuzz_standard.fp +++ b/wadsrc/static/shaders/glsl/fuzz_standard.fp @@ -17,6 +17,6 @@ vec4 ProcessTexel() basicColor.a = basicColor.a * test; basicColor.r = basicColor.g = basicColor.b = 0.0; - + return basicColor; } diff --git a/wadsrc/static/shaders/glsl/fuzz_swirly.fp b/wadsrc/static/shaders/glsl/fuzz_swirly.fp index 266858999..0bb584cd5 100644 --- a/wadsrc/static/shaders/glsl/fuzz_swirly.fp +++ b/wadsrc/static/shaders/glsl/fuzz_swirly.fp @@ -13,6 +13,6 @@ vec4 ProcessTexel() basicColor.a = basicColor.a * test; basicColor.r = basicColor.g = basicColor.b = 0.0; - + return basicColor; } diff --git a/wadsrc/static/shaders/glsl/main.fp b/wadsrc/static/shaders/glsl/main.fp index e181e259b..ab1e276e1 100644 --- a/wadsrc/static/shaders/glsl/main.fp +++ b/wadsrc/static/shaders/glsl/main.fp @@ -98,27 +98,27 @@ const int Tex_Blend_Alpha = 1; const int Tex_Blend_Screen = 2; const int Tex_Blend_Overlay = 3; const int Tex_Blend_Hardlight = 4; - + vec4 ApplyTextureManipulation(vec4 texel, int blendflags) { // Step 1: desaturate according to the material's desaturation factor. texel = dodesaturate(texel, uTextureModulateColor.a); - + // Step 2: Invert if requested if ((blendflags & 8) != 0) { texel.rgb = vec3(1.0 - texel.r, 1.0 - texel.g, 1.0 - texel.b); } - + // Step 3: Apply additive color texel.rgb += uTextureAddColor.rgb; - + // Step 4: Colorization, including gradient if set. texel.rgb *= uTextureModulateColor.rgb; - + // Before applying the blend the value needs to be clamped to [0..1] range. texel.rgb = clamp(texel.rgb, 0.0, 1.0); - + // Step 5: Apply a blend. This may just be a translucent overlay or one of the blend modes present in current Build engines. if ((blendflags & 7) != 0) { @@ -163,7 +163,7 @@ const int Tex_Blend_Hardlight = 4; vec4 getTexel(vec2 st) { vec4 texel = texture(tex, st); - + // // Apply texture modes // @@ -172,33 +172,33 @@ vec4 getTexel(vec2 st) case 1: // TM_STENCIL texel.rgb = vec3(1.0,1.0,1.0); break; - + case 2: // TM_OPAQUE texel.a = 1.0; break; - + case 3: // TM_INVERSE texel = vec4(1.0-texel.r, 1.0-texel.b, 1.0-texel.g, texel.a); break; - + case 4: // TM_ALPHATEXTURE { float gray = grayscale(texel); texel = vec4(1.0, 1.0, 1.0, gray*texel.a); break; } - + case 5: // TM_CLAMPY if (st.t < 0.0 || st.t > 1.0) { texel.a = 0.0; } break; - + case 6: // TM_OPAQUEINVERSE texel = vec4(1.0-texel.r, 1.0-texel.b, 1.0-texel.g, 1.0); break; - + case 7: //TM_FOGLAYER return texel; @@ -211,7 +211,7 @@ vec4 getTexel(vec2 st) texel.a = 0.0; } } - + // Apply the texture modification colors. int blendflags = int(uTextureAddColor.a); // this alpha is unused otherwise if (blendflags != 0) @@ -319,7 +319,7 @@ float R_DoomLightingEquation(float light) { z = pixelpos.w; } - + if ((uPalLightLevels >> 16) == 5) // gl_lightmode 5: Build software lighting emulation. { // This is a lot more primitive than Doom's lighting... @@ -436,7 +436,7 @@ float sampleShadowmapPCF(vec3 planePoint, float v) float sum = 0.0; float step_count = uShadowmapFilter; - + texelPos -= step_count + 0.5; for (float x = -step_count; x <= step_count; x++) { @@ -579,13 +579,13 @@ void SetMaterialProps(inout Material material, vec2 texCoord) #ifndef NO_LAYERS if ((uTextureMode & TEXF_Brightmap) != 0) material.Bright = desaturate(texture(brighttexture, texCoord.st)); - + if ((uTextureMode & TEXF_Detailmap) != 0) { vec4 Detail = texture(detailtexture, texCoord.st * uDetailParms.xy) * uDetailParms.z; material.Base.rgb *= Detail.rgb; } - + if ((uTextureMode & TEXF_Glowmap) != 0) material.Glow = desaturate(texture(glowtexture, texCoord.st)); #endif @@ -608,7 +608,7 @@ void SetMaterialProps(inout Material material, vec2 texCoord) vec4 getLightColor(Material material, float fogdist, float fogfactor) { vec4 color = vColor; - + if (uLightLevel >= 0.0) { float newlightlevel = 1.0 - R_DoomLightingEquation(uLightLevel); @@ -621,13 +621,13 @@ vec4 getLightColor(Material material, float fogdist, float fogfactor) { color.rgb *= uLightFactor - (fogdist / uLightDist) * (uLightFactor - 1.0); } - + // // apply light diminishing through fog equation // color.rgb = mix(vec3(0.0, 0.0, 0.0), color.rgb, fogfactor); } - + // // handle glowing walls // @@ -653,7 +653,7 @@ vec4 getLightColor(Material material, float fogdist, float fogfactor) // color.rgb = min(color.rgb + material.Bright.rgb, 1.0); #endif - + // // apply other light manipulation by custom shaders, default is a NOP. // @@ -686,7 +686,7 @@ vec3 AmbientOcclusionColor() { float fogdist; float fogfactor; - + // // calculate fog factor // @@ -699,7 +699,7 @@ vec3 AmbientOcclusionColor() fogdist = max(16.0, distance(pixelpos.xyz, uCameraPos.xyz)); } fogfactor = exp2 (uFogDensity * fogdist); - + return mix(uFogColor.rgb, vec3(0.0), fogfactor); } @@ -717,7 +717,7 @@ void main() #ifndef LEGACY_USER_SHADER Material material; - + material.Base = vec4(0.0); material.Bright = vec4(0.0); material.Glow = vec4(0.0); @@ -733,7 +733,7 @@ void main() Material material = ProcessMaterial(); #endif vec4 frag = material.Base; - + #ifndef NO_ALPHATEST if (frag.a <= uAlphaThreshold) discard; #endif @@ -742,7 +742,7 @@ void main() { float fogdist = 0.0; float fogfactor = 0.0; - + // // calculate fog factor // @@ -758,7 +758,7 @@ void main() } fogfactor = exp2 (uFogDensity * fogdist); } - + if ((uTextureMode & 0xffff) != 7) { frag = getLightColor(material, fogdist, fogfactor); diff --git a/wadsrc/static/shaders/glsl/main.vp b/wadsrc/static/shaders/glsl/main.vp index a410d5a4d..f6ad81e43 100644 --- a/wadsrc/static/shaders/glsl/main.vp +++ b/wadsrc/static/shaders/glsl/main.vp @@ -29,10 +29,10 @@ void main() vec2 parmTexCoord; vec4 parmPosition; - + parmTexCoord = aTexCoord; parmPosition = aPosition; - + #ifndef SIMPLE vec4 worldcoord = ModelMatrix * mix(parmPosition, aVertex2, uInterpolationFactor); #else @@ -62,7 +62,7 @@ void main() glowdist.y = worldcoord.y - bottomatpoint; glowdist.z = clamp(glowdist.x / (topatpoint - bottomatpoint), 0.0, 1.0); } - + if (uObjectColor2.a != 0) { float topatpoint = (uGradientTopPlane.w + uGradientTopPlane.x * worldcoord.x + uGradientTopPlane.y * worldcoord.z) * uGradientTopPlane.z; @@ -71,7 +71,7 @@ void main() gradientdist.y = worldcoord.y - bottomatpoint; gradientdist.z = clamp(gradientdist.x / (topatpoint - bottomatpoint), 0.0, 1.0); } - + if (uSplitBottomPlane.z != 0.0) { ClipDistance3 = ((uSplitTopPlane.w + uSplitTopPlane.x * worldcoord.x + uSplitTopPlane.y * worldcoord.z) * uSplitTopPlane.z) - worldcoord.y; @@ -88,7 +88,7 @@ void main() #endif vEyeNormal = NormalViewMatrix * vec4(normalize(vWorldNormal.xyz), 1.0); #endif - + #ifdef SPHEREMAP vec3 u = normalize(eyeCoordPos.xyz); vec4 n = normalize(NormalViewMatrix * vec4(parmTexCoord.x, 0.0, parmTexCoord.y, 0.0)); @@ -99,7 +99,7 @@ void main() #else vTexCoord = TextureMatrix * vec4(parmTexCoord, 0.0, 1.0); #endif - + gl_Position = ProjectionMatrix * eyeCoordPos; #ifdef VULKAN_COORDINATE_SYSTEM diff --git a/wadsrc/static/shaders/glsl/material_normal.fp b/wadsrc/static/shaders/glsl/material_normal.fp index add128812..02c905623 100644 --- a/wadsrc/static/shaders/glsl/material_normal.fp +++ b/wadsrc/static/shaders/glsl/material_normal.fp @@ -13,7 +13,7 @@ vec3 lightContribution(int i, vec3 normal) vec3 lightdir = normalize(lightpos.xyz - pixelpos.xyz); float dotprod = dot(normal, lightdir); if (dotprod < -0.0001) return vec3(0.0); // light hits from the backside. This can happen with full sector light lists and must be rejected for all cases. Note that this can cause precision issues. - + float attenuation = clamp((lightpos.w - lightdistance) / lightpos.w, 0.0, 1.0); if (lightspot1.w == 1.0) @@ -67,7 +67,7 @@ vec3 ProcessMaterialLight(Material material, vec3 color) if (lightRange.w > lightRange.z) { vec4 addlight = vec4(0.0,0.0,0.0,0.0); - + // additive lights for(int i=lightRange.z; i blendflags 0x7 = (USES all) diff --git a/wadsrc/static/shaders_gles/glsl/burn.fp b/wadsrc/static/shaders_gles/glsl/burn.fp index 040311711..250c471f5 100644 --- a/wadsrc/static/shaders_gles/glsl/burn.fp +++ b/wadsrc/static/shaders_gles/glsl/burn.fp @@ -8,6 +8,6 @@ void main() vec4 t1 = texture2D(tex, vTexCoord.xy); vec4 t2 = texture2D(texture2, vec2(vTexCoord.x, 1.0-vTexCoord.y)); - + gl_FragColor = frag * vec4(t1.r, t1.g, t1.b, t2.a); } diff --git a/wadsrc/static/shaders_gles/glsl/fogboundary.fp b/wadsrc/static/shaders_gles/glsl/fogboundary.fp index 9a6448bee..e04fdbd09 100644 --- a/wadsrc/static/shaders_gles/glsl/fogboundary.fp +++ b/wadsrc/static/shaders_gles/glsl/fogboundary.fp @@ -10,7 +10,7 @@ void main() { float fogdist; float fogfactor; - + // // calculate fog factor // @@ -24,7 +24,7 @@ void main() } #endif fogfactor = exp2 (uFogDensity * fogdist); - + gl_FragColor = vec4(uFogColor.rgb, 1.0 - fogfactor); } diff --git a/wadsrc/static/shaders_gles/glsl/func_paletted.fp b/wadsrc/static/shaders_gles/glsl/func_paletted.fp index 8447f6271..615b9871a 100644 --- a/wadsrc/static/shaders_gles/glsl/func_paletted.fp +++ b/wadsrc/static/shaders_gles/glsl/func_paletted.fp @@ -18,10 +18,10 @@ vec4 ProcessTexel() float coordX = vTexCoord.x; float coordY = vTexCoord.y; vec2 newCoord; - + // z is the depth in view space, positive going into the screen float z = abs(pixelpos.w); - + #ifdef NPOT_EMULATION // Coordinate adjustment for NPOT textures. It is somehow fitting that Build games exploited this texture wrapping quirk of the software rendering engine... #if (DEF_NPOT_EMULATION == 1) @@ -69,7 +69,7 @@ vec4 ProcessTexel() palettedColor.a = floor(color.a + 0.999); color = palettedColor; - + //if (color.a < uAlphaThreshold) discard; // it's only here that we have the alpha value available to be able to perform the alpha test. // This replaces the above line to avoid the branch and the discard.. Seems to look the same but could be unforeseen issues. float alpha = step(uAlphaThreshold, color.a); diff --git a/wadsrc/static/shaders_gles/glsl/fuzz_noise.fp b/wadsrc/static/shaders_gles/glsl/fuzz_noise.fp index 0107ebbd2..48595c4ea 100644 --- a/wadsrc/static/shaders_gles/glsl/fuzz_noise.fp +++ b/wadsrc/static/shaders_gles/glsl/fuzz_noise.fp @@ -4,7 +4,7 @@ vec4 ProcessTexel() { vec2 texCoord = vTexCoord.st; vec4 basicColor = getTexel(texCoord); - + texCoord.x = float( int(texCoord.x * 128.0) ) / 128.0; texCoord.y = float( int(texCoord.y * 128.0) ) / 128.0; diff --git a/wadsrc/static/shaders_gles/glsl/fuzz_smooth.fp b/wadsrc/static/shaders_gles/glsl/fuzz_smooth.fp index 3c642c399..b2af9a2e5 100644 --- a/wadsrc/static/shaders_gles/glsl/fuzz_smooth.fp +++ b/wadsrc/static/shaders_gles/glsl/fuzz_smooth.fp @@ -13,6 +13,6 @@ vec4 ProcessTexel() basicColor.a = basicColor.a * test; basicColor.r = basicColor.g = basicColor.b = 0.0; - + return basicColor; } diff --git a/wadsrc/static/shaders_gles/glsl/fuzz_software.fp b/wadsrc/static/shaders_gles/glsl/fuzz_software.fp index 1edcb0099..2ea4593b7 100644 --- a/wadsrc/static/shaders_gles/glsl/fuzz_software.fp +++ b/wadsrc/static/shaders_gles/glsl/fuzz_software.fp @@ -16,6 +16,6 @@ vec4 ProcessTexel() basicColor.a = basicColor.a * test; basicColor.r = basicColor.g = basicColor.b = 0.0; - + return basicColor; } diff --git a/wadsrc/static/shaders_gles/glsl/fuzz_standard.fp b/wadsrc/static/shaders_gles/glsl/fuzz_standard.fp index 1edcb0099..2ea4593b7 100644 --- a/wadsrc/static/shaders_gles/glsl/fuzz_standard.fp +++ b/wadsrc/static/shaders_gles/glsl/fuzz_standard.fp @@ -16,6 +16,6 @@ vec4 ProcessTexel() basicColor.a = basicColor.a * test; basicColor.r = basicColor.g = basicColor.b = 0.0; - + return basicColor; } diff --git a/wadsrc/static/shaders_gles/glsl/fuzz_swirly.fp b/wadsrc/static/shaders_gles/glsl/fuzz_swirly.fp index 266858999..0bb584cd5 100644 --- a/wadsrc/static/shaders_gles/glsl/fuzz_swirly.fp +++ b/wadsrc/static/shaders_gles/glsl/fuzz_swirly.fp @@ -13,6 +13,6 @@ vec4 ProcessTexel() basicColor.a = basicColor.a * test; basicColor.r = basicColor.g = basicColor.b = 0.0; - + return basicColor; } diff --git a/wadsrc/static/shaders_gles/glsl/main.fp b/wadsrc/static/shaders_gles/glsl/main.fp index 33516d5c8..2ec0d36b7 100644 --- a/wadsrc/static/shaders_gles/glsl/main.fp +++ b/wadsrc/static/shaders_gles/glsl/main.fp @@ -93,35 +93,35 @@ const int Tex_Blend_Alpha = 1; const int Tex_Blend_Screen = 2; const int Tex_Blend_Overlay = 3; const int Tex_Blend_Hardlight = 4; - + vec4 ApplyTextureManipulation(vec4 texel) { // Step 1: desaturate according to the material's desaturation factor. texel = dodesaturate(texel, uTextureModulateColor.a); - + // Step 2: Invert if requested // TODO FIX //if ((blendflags & 8) != 0) //{ // texel.rgb = vec3(1.0 - texel.r, 1.0 - texel.g, 1.0 - texel.b); //} - + // Step 3: Apply additive color texel.rgb += uTextureAddColor.rgb; - + // Step 4: Colorization, including gradient if set. texel.rgb *= uTextureModulateColor.rgb; - + // Before applying the blend the value needs to be clamped to [0..1] range. texel.rgb = clamp(texel.rgb, 0.0, 1.0); - + // Step 5: Apply a blend. This may just be a translucent overlay or one of the blend modes present in current Build engines. #if ((DEF_BLEND_FLAGS & 7) != 0) - + vec3 tcol = texel.rgb * 255.0; // * 255.0 to make it easier to reuse the integer math. vec4 tint = uTextureBlendColor * 255.0; #if ((DEF_BLEND_FLAGS & 7) == 1) - + tcol.b = tcol.b * (1.0 - uTextureBlendColor.a) + tint.b * uTextureBlendColor.a; tcol.g = tcol.g * (1.0 - uTextureBlendColor.a) + tint.g * uTextureBlendColor.a; tcol.r = tcol.r * (1.0 - uTextureBlendColor.a) + tint.r * uTextureBlendColor.a; @@ -132,7 +132,7 @@ const int Tex_Blend_Hardlight = 4; tcol.r = 255.0 - (((255.0 - tcol.r) * (255.0 - tint.b)) / 256.0); #elif ((DEF_BLEND_FLAGS & 7) == 3) // Tex_Blend_Overlay: - + tcol.b = tcol.b < 128.0? (tcol.b * tint.b) / 128.0 : 255.0 - (((255.0 - tcol.b) * (255.0 - tint.b)) / 128.0); tcol.g = tcol.g < 128.0? (tcol.g * tint.g) / 128.0 : 255.0 - (((255.0 - tcol.g) * (255.0 - tint.g)) / 128.0); tcol.r = tcol.r < 128.0? (tcol.r * tint.r) / 128.0 : 255.0 - (((255.0 - tcol.r) * (255.0 - tint.r)) / 128.0); @@ -144,9 +144,9 @@ const int Tex_Blend_Hardlight = 4; tcol.r = tint.r < 128.0 ? (tcol.r * tint.r) / 128.0 : 255.0 - (((255.0 - tcol.r) * (255.0 - tint.r)) / 128.0); #endif - + texel.rgb = tcol / 255.0; - + #endif return texel; @@ -161,42 +161,42 @@ const int Tex_Blend_Hardlight = 4; vec4 getTexel(vec2 st) { vec4 texel = texture2D(tex, st); - + #if (DEF_TEXTURE_MODE == 1) texel.rgb = vec3(1.0,1.0,1.0); - + #elif (DEF_TEXTURE_MODE == 2)// TM_OPAQUE - + texel.a = 1.0; - + #elif (DEF_TEXTURE_MODE == 3)// TM_INVERSE - + texel = vec4(1.0-texel.r, 1.0-texel.b, 1.0-texel.g, texel.a); #elif (DEF_TEXTURE_MODE == 4)// TM_ALPHATEXTURE float gray = grayscale(texel); texel = vec4(1.0, 1.0, 1.0, gray*texel.a); - + #elif (DEF_TEXTURE_MODE == 5)// TM_CLAMPY - + if (st.t < 0.0 || st.t > 1.0) { texel.a = 0.0; } - + #elif (DEF_TEXTURE_MODE == 6)// TM_OPAQUEINVERSE texel = vec4(1.0-texel.r, 1.0-texel.b, 1.0-texel.g, 1.0); - + #elif (DEF_TEXTURE_MODE == 7)//TM_FOGLAYER - + return texel; - + #endif - + // Apply the texture modification colors. #if (DEF_BLEND_FLAGS != 0) @@ -207,7 +207,7 @@ vec4 getTexel(vec2 st) // Apply the Doom64 style material colors on top of everything from the texture modification settings. // This may be a bit redundant in terms of features but the data comes from different sources so this is unavoidable. - + texel.rgb += uAddColor.rgb; #if (DEF_USE_OBJECT_COLOR_2 == 1) @@ -236,7 +236,7 @@ float R_DoomLightingEquation_OLD(float light) // z is the depth in view space, positive going into the screen float z = pixelpos.w; - + /* L in the range 0 to 63 */ float L = light * 63.0/31.0; @@ -384,7 +384,7 @@ void SetMaterialProps(inout Material material, vec2 texCoord) vec4 getLightColor(Material material, float fogdist, float fogfactor) { vec4 color = vColor; - + #if (DEF_USE_U_LIGHT_LEVEL == 1) { float newlightlevel = 1.0 - R_DoomLightingEquation(uLightLevel); @@ -400,7 +400,7 @@ vec4 getLightColor(Material material, float fogdist, float fogfactor) { color.rgb *= uLightFactor - (fogdist / uLightDist) * (uLightFactor - 1.0); } - + // // apply light diminishing through fog equation // @@ -443,7 +443,7 @@ vec4 getLightColor(Material material, float fogdist, float fogfactor) // color.rgb = min(color.rgb + material.Bright.rgb, 1.0); #endif - + // // apply other light manipulation by custom shaders, default is a NOP. // @@ -479,7 +479,7 @@ void main() #ifndef LEGACY_USER_SHADER Material material; - + material.Base = vec4(0.0); material.Bright = vec4(0.0); material.Glow = vec4(0.0); @@ -501,7 +501,7 @@ void main() { float fogdist = 0.0; float fogfactor = 0.0; - + // // calculate fog factor // @@ -545,12 +545,12 @@ void main() frag = vec4(clamp(cm.rgb, 0.0, 1.0), frag.a); } #endif - + frag = frag * ProcessLight(material, vColor); frag.rgb = frag.rgb + uFogColor.rgb; } #endif // (DEF_2D_FOG == 0) - + #if (DEF_USE_COLOR_MAP == 1) // This mostly works but doesn't look great because of the blending. { frag.rgb = clamp(pow(frag.rgb, vec3(uFixedColormapStart.a)), 0.0, 1.0); diff --git a/wadsrc/static/shaders_gles/glsl/main.vp b/wadsrc/static/shaders_gles/glsl/main.vp index 9d78e38a1..56ba9dc88 100644 --- a/wadsrc/static/shaders_gles/glsl/main.vp +++ b/wadsrc/static/shaders_gles/glsl/main.vp @@ -29,10 +29,10 @@ void main() vec2 parmTexCoord; vec4 parmPosition; - + parmTexCoord = aTexCoord; parmPosition = aPosition; - + #ifndef SIMPLE vec4 worldcoord = ModelMatrix * mix(parmPosition, aVertex2, uInterpolationFactor); #else @@ -53,7 +53,7 @@ void main() #ifndef SIMPLE pixelpos.xyz = worldcoord.xyz; pixelpos.w = -eyeCoordPos.z/eyeCoordPos.w; - + if (uGlowTopColor.a > 0.0 || uGlowBottomColor.a > 0.0) { float topatpoint = (uGlowTopPlane.w + uGlowTopPlane.x * worldcoord.x + uGlowTopPlane.y * worldcoord.z) * uGlowTopPlane.z; @@ -62,7 +62,7 @@ void main() glowdist.y = worldcoord.y - bottomatpoint; glowdist.z = clamp(glowdist.x / (topatpoint - bottomatpoint), 0.0, 1.0); } - + if (uObjectColor2.a != 0.0) { float topatpoint = (uGradientTopPlane.w + uGradientTopPlane.x * worldcoord.x + uGradientTopPlane.y * worldcoord.z) * uGradientTopPlane.z; @@ -71,7 +71,7 @@ void main() gradientdist.y = worldcoord.y - bottomatpoint; gradientdist.z = clamp(gradientdist.x / (topatpoint - bottomatpoint), 0.0, 1.0); } - + if (uSplitBottomPlane.z != 0.0) { ClipDistance3 = ((uSplitTopPlane.w + uSplitTopPlane.x * worldcoord.x + uSplitTopPlane.y * worldcoord.z) * uSplitTopPlane.z) - worldcoord.y; @@ -88,7 +88,7 @@ void main() #endif vEyeNormal = NormalViewMatrix * vWorldNormal; #endif - + #ifdef SPHEREMAP vec3 u = normalize(eyeCoordPos.xyz); vec4 n = normalize(NormalViewMatrix * vec4(parmTexCoord.x, 0.0, parmTexCoord.y, 0.0)); @@ -99,7 +99,7 @@ void main() #else vTexCoord = TextureMatrix * vec4(parmTexCoord, 0.0, 1.0); #endif - + if (uClipHeightDirection != 0.0) // clip planes used for reflective flats { diff --git a/wadsrc/static/shaders_gles/glsl/material_normal.fp b/wadsrc/static/shaders_gles/glsl/material_normal.fp index 0fceef675..04986f074 100644 --- a/wadsrc/static/shaders_gles/glsl/material_normal.fp +++ b/wadsrc/static/shaders_gles/glsl/material_normal.fp @@ -7,7 +7,7 @@ vec3 lightContribution(int i, vec3 normal) vec4 lightspot2 = lights[i+3]; float lightdistance = distance(lightpos.xyz, pixelpos.xyz); - + //if (lightpos.w < lightdistance) // return vec3(0.0); // Early out lights touching surface but not this fragment @@ -15,7 +15,7 @@ vec3 lightContribution(int i, vec3 normal) float dotprod = dot(normal, lightdir); if (dotprod < -0.0001) return vec3(0.0); // light hits from the backside. This can happen with full sector light lists and must be rejected for all cases. Note that this can cause precision issues. - + float attenuation = clamp((lightpos.w - lightdistance) / lightpos.w, 0.0, 1.0); @@ -41,7 +41,7 @@ vec3 ProcessMaterialLight(Material material, vec3 color) #if (DEF_DYNAMIC_LIGHTS_MOD == 1) // modulated lights - + // Some very old GLES2 hardware does not allow non-constants in a for-loop expression because it can not unroll it. // However they do allow 'break', so use stupid hack #if (USE_GLSL_V100 == 1) @@ -85,12 +85,12 @@ vec3 ProcessMaterialLight(Material material, vec3 color) #endif #endif - + vec3 frag = material.Base.rgb * clamp(color + desaturate(dynlight).rgb, 0.0, 1.4); - + #if (DEF_DYNAMIC_LIGHTS_ADD == 1) vec4 addlight = vec4(0.0,0.0,0.0,0.0); - + // additive lights #if (USE_GLSL_V100 == 1) @@ -113,6 +113,6 @@ vec3 ProcessMaterialLight(Material material, vec3 color) frag = clamp(frag + desaturate(addlight).rgb, 0.0, 1.0); #endif - + return frag; } diff --git a/wadsrc/static/zscript/engine/base.zs b/wadsrc/static/zscript/engine/base.zs index 9f0648736..8c672886d 100644 --- a/wadsrc/static/zscript/engine/base.zs +++ b/wadsrc/static/zscript/engine/base.zs @@ -11,7 +11,7 @@ enum ESoundFlags CHAN_5 = 5, CHAN_6 = 6, CHAN_7 = 7, - + // modifier flags CHAN_LISTENERZ = 8, CHAN_MAYBE_LOCAL = 16, @@ -194,7 +194,7 @@ struct System native native static bool SoundEnabled(); native static bool MusicEnabled(); native static double GetTimeFrac(); - + static bool specialKeyEvent(InputEvent ev) { if (ev.type == InputEvent.Type_KeyDown || ev.type == InputEvent.Type_KeyUp) @@ -216,7 +216,7 @@ struct MusPlayingInfo native native int baseorder; native bool loop; native voidptr handle; - + }; struct TexMan @@ -252,7 +252,7 @@ struct TexMan ForceLookup = 128, NoAlias = 256 }; - + enum ETexReplaceFlags { NOT_BOTTOM = 1, @@ -475,7 +475,7 @@ struct Font native CR_TEAL, NUM_TEXT_COLORS }; - + const TEXTCOLOR_BRICK = "\034A"; const TEXTCOLOR_TAN = "\034B"; const TEXTCOLOR_GRAY = "\034C"; @@ -509,7 +509,7 @@ struct Font native const TEXTCOLOR_CHAT = "\034*"; const TEXTCOLOR_TEAMCHAT = "\034!"; - + native int GetCharWidth(int code); native int StringWidth(String code); @@ -591,7 +591,7 @@ class Object native private native static void BuiltinRandomSeed(voidptr rng, int seed); private native static Class BuiltinNameToClass(Name nm, Class filter); private native static Object BuiltinClassCast(Object inptr, Class test); - + native static uint MSTime(); native vararg static void ThrowAbortException(String fmt, ...); diff --git a/wadsrc/static/zscript/engine/dynarrays.zs b/wadsrc/static/zscript/engine/dynarrays.zs index 009350b8e..0b2d16184 100644 --- a/wadsrc/static/zscript/engine/dynarrays.zs +++ b/wadsrc/static/zscript/engine/dynarrays.zs @@ -4,7 +4,7 @@ struct DynArray_I8 native { native readonly uint Size; - + native void Copy(DynArray_I8 other); native void Move(DynArray_I8 other); native void Append (DynArray_I8 other); @@ -65,7 +65,7 @@ struct DynArray_I32 native struct DynArray_F32 native { native readonly uint Size; - + native void Copy(DynArray_F32 other); native void Move(DynArray_F32 other); native void Append (DynArray_F32 other); @@ -85,7 +85,7 @@ struct DynArray_F32 native struct DynArray_F64 native { native readonly uint Size; - + native void Copy(DynArray_F64 other); native void Move(DynArray_F64 other); native void Append (DynArray_F64 other); @@ -105,7 +105,7 @@ struct DynArray_F64 native struct DynArray_Ptr native { native readonly uint Size; - + native void Copy(DynArray_Ptr other); native void Move(DynArray_Ptr other); native void Append (DynArray_Ptr other); @@ -125,7 +125,7 @@ struct DynArray_Ptr native struct DynArray_Obj native { native readonly uint Size; - + native void Copy(DynArray_Obj other); native void Move(DynArray_Obj other); native void Append (DynArray_Obj other); diff --git a/wadsrc/static/zscript/engine/inputevents.zs b/wadsrc/static/zscript/engine/inputevents.zs index ba63b59e9..3c56e1178 100644 --- a/wadsrc/static/zscript/engine/inputevents.zs +++ b/wadsrc/static/zscript/engine/inputevents.zs @@ -29,7 +29,7 @@ struct UiEvent native ui version("2.4") Type_FwdButtonUp, // ??? Type_LastMouseEvent } - + // for KeyDown, KeyRepeat, KeyUp enum ESpecialGUIKeys { @@ -67,7 +67,7 @@ struct UiEvent native ui version("2.4") Key_Back = 30, // browser back key Key_CEscape = 31 // color escape } - + // native readonly EGUIEvent Type; // @@ -93,7 +93,7 @@ struct InputEvent native play version("2.4") Type_GUI, // unused, kept for completeness Type_DeviceChange } - + // ew. enum EDoomInputKeys { @@ -237,7 +237,7 @@ struct InputEvent native play version("2.4") Num_Keys = 0x1C4 } - + // native readonly EGenericEvent Type; // diff --git a/wadsrc/static/zscript/engine/screenjob.zs b/wadsrc/static/zscript/engine/screenjob.zs index 74720619a..776cafc00 100644 --- a/wadsrc/static/zscript/engine/screenjob.zs +++ b/wadsrc/static/zscript/engine/screenjob.zs @@ -244,12 +244,12 @@ class MoviePlayerJob : SkippableScreenJob empty.Push(int(soundname)); return CreateWithSoundInfo(filename, empty, flags, frametime); } - + virtual void DrawFrame() { let tex = player.GetTexture(); let size = TexMan.GetScaledSize(tex); - + if (!(flag & MoviePlayer.FIXEDVIEWPORT) || (size.x <= 320 && size.y <= 200) || size.x >= 640 || size.y >= 480) { Screen.DrawTexture(tex, false, 0, 0, DTA_FullscreenEx, FSMode_ScaleToFit43, DTA_Masked, false); @@ -533,7 +533,7 @@ class ScreenJobRunner : Object if (snd > 0) sounds.Pushv(1, snd); Append(MoviePlayerJob.CreateWithSoundInfo(fn, sounds, 0, framerate)); } - + //========================================================================== // // This also gets used by the title loop. @@ -572,7 +572,7 @@ class ScreenJobRunner : Object } y = hudheight * 0.9 - height; if (y < 0) y = 0; - + Screen.Dim(0, 0.5f, int(x * hscale), int(y * vscale), int(w * hscale), int(height * vscale)); x += 20; y += 10; @@ -662,7 +662,7 @@ class TextTypeOnOverlay bool usesDefault; int mTicker; int mTextDelay; - + //========================================================================== // // @@ -676,7 +676,7 @@ class TextTypeOnOverlay tt.Split(lines, "\n"); mLineCount = lines.Size(); - + mText = ""; for (int i = 0; i < lines.Size(); i++) { @@ -727,7 +727,7 @@ class TextTypeOnOverlay mTextColor = cr; mPalette = pal; } - + //========================================================================== // // diff --git a/wadsrc/static/zscript/engine/ui/menu/colorpickermenu.zs b/wadsrc/static/zscript/engine/ui/menu/colorpickermenu.zs index f8ce51874..ac02f7394 100644 --- a/wadsrc/static/zscript/engine/ui/menu/colorpickermenu.zs +++ b/wadsrc/static/zscript/engine/ui/menu/colorpickermenu.zs @@ -73,20 +73,20 @@ class ColorpickerMenu : OptionMenu int mStartItem; CVar mCVar; - + double GetColor(int index) { double v = index == 0? mRed : index == 1? mGreen : mBlue; return v; } - + void SetColor(int index, double val) { if (index == 0) mRed = val; else if (index == 1) mGreen = val; else mBlue = val; } - + //============================================================================= // // @@ -119,7 +119,7 @@ class ColorpickerMenu : OptionMenu mDesc.mIndent = 0; mDesc.CalcIndent(); } - + //============================================================================= // // @@ -273,7 +273,7 @@ class ColorpickerMenu : OptionMenu if (h > fh) h = fh; else if (h < 4) return; // no space to draw it. - + int indent = (screen.GetWidth() / 2); int p = 0; @@ -328,7 +328,7 @@ class ColorpickerMenu : OptionMenu y += 49*CleanYfac_1; screen.DrawText (SmallFont, Font.CR_GRAY, x+(48-SmallFont.StringWidth("---->")/2)*CleanXfac_1, y, "---->", DTA_CleanNoMove_1, true); } - + override void OnDestroy() { if (mStartItem >= 0) diff --git a/wadsrc/static/zscript/engine/ui/menu/imagescroller.zs b/wadsrc/static/zscript/engine/ui/menu/imagescroller.zs index cab771ae7..6fd58bb6a 100644 --- a/wadsrc/static/zscript/engine/ui/menu/imagescroller.zs +++ b/wadsrc/static/zscript/engine/ui/menu/imagescroller.zs @@ -47,20 +47,20 @@ class ImageScrollerDescriptor : MenuDescriptor native class ImageScrollerPage : MenuItemBase { int virtWidth, virtHeight; - + protected void DrawText(Font fnt, int color, double x, double y, String text) { screen.DrawText(fnt, color, x, y, text, DTA_VirtualWidth, virtWidth, DTA_VirtualHeight, virtHeight, DTA_FullscreenScale, FSMode_ScaleToFit43); } - + protected void DrawTexture(TextureID tex, double x, double y) { screen.DrawTexture(tex, true, x, y, DTA_VirtualWidth, virtWidth, DTA_VirtualHeight, virtHeight, DTA_FullscreenScale, FSMode_ScaleToFit43); } - + virtual void OnStartPage() {} - + virtual void OnEndPage() {} } @@ -74,13 +74,13 @@ class ImageScrollerPage : MenuItemBase class ImageScrollerPageImageItem : ImageScrollerPage { TextureID mTexture; - + void Init(ImageScrollerDescriptor desc, String patch) { Super.Init(); mTexture = TexMan.CheckForTexture(patch); } - + override void Drawer(bool selected) { Screen.DrawTexture(mTexture, true, 0, 0, DTA_FullscreenEx, FSMode_ScaleToFit43, DTA_LegacyRenderStyle, STYLE_Normal); @@ -100,7 +100,7 @@ class ImageScrollerPageTextItem : ImageScrollerPage TextureID mTexture; Color mBrightness; double mTextScale; - + void Init(ImageScrollerDescriptor desc, String txt, int y = -1) { Super.Init(); @@ -110,16 +110,16 @@ class ImageScrollerPageTextItem : ImageScrollerPage mTextScale = desc.textScale; virtWidth = desc.virtWidth; virtHeight = desc.virtHeight; - + mText = mFont.BreakLines(Stringtable.Localize(txt.Filter()), int(virtWidth / mTextScale)); mYpos = y >= 0? y : virtHeight / 2 - mText.Count() * mFont.GetHeight() * mTextScale / 2; - + } - + override void Drawer(bool selected) { Screen.DrawTexture(mTexture, true, 0, 0, DTA_FullscreenEx, FSMode_ScaleToFit43, DTA_LegacyRenderStyle, STYLE_Normal, DTA_Color, mBrightness); - + let fontheight = mFont.GetHeight() * mTextScale; let y = mYpos; let c = mText.Count(); @@ -180,7 +180,7 @@ class ImageScrollerMenu : Menu // // //============================================================================= - + override bool MenuEvent(int mkey, bool fromcontroller) { if (mDesc.mItems.Size() <= 1) @@ -228,7 +228,7 @@ class ImageScrollerMenu : Menu // // //============================================================================= - + override bool MouseEvent(int type, int x, int y) { // Todo: Implement some form of drag event to switch between pages. @@ -244,7 +244,7 @@ class ImageScrollerMenu : Menu // // //============================================================================= - + private bool DrawTransition() { double now = MSTime() * (120. / 1000.); @@ -270,7 +270,7 @@ class ImageScrollerMenu : Menu // // //============================================================================= - + override void Drawer() { if (previous != null) diff --git a/wadsrc/static/zscript/engine/ui/menu/joystickmenu.zs b/wadsrc/static/zscript/engine/ui/menu/joystickmenu.zs index 48b5840e7..06b412f17 100644 --- a/wadsrc/static/zscript/engine/ui/menu/joystickmenu.zs +++ b/wadsrc/static/zscript/engine/ui/menu/joystickmenu.zs @@ -41,7 +41,7 @@ class OptionMenuSliderJoySensitivity : OptionMenuSliderBase { JoystickConfig mJoy; - + OptionMenuSliderJoySensitivity Init(String label, double min, double max, double step, int showval, JoystickConfig joy) { Super.Init(label, min, max, step, showval); @@ -71,7 +71,7 @@ class OptionMenuSliderJoyScale : OptionMenuSliderBase int mAxis; int mNeg; JoystickConfig mJoy; - + OptionMenuSliderJoyScale Init(String label, int axis, double min, double max, double step, int showval, JoystickConfig joy) { Super.Init(label, min, max, step, showval); @@ -138,7 +138,7 @@ class OptionMenuItemJoyMap : OptionMenuItemOptionBase { int mAxis; JoystickConfig mJoy; - + OptionMenuItemJoyMap Init(String label, int axis, Name values, int center, JoystickConfig joy) { Super.Init(label, 'none', values, null, center); @@ -191,7 +191,7 @@ class OptionMenuItemInverter : OptionMenuItemOptionBase { int mAxis; JoystickConfig mJoy; - + OptionMenuItemInverter Init(String label, int axis, int center, JoystickConfig joy) { Super.Init(label, "none", "YesNo", NULL, center); @@ -223,7 +223,7 @@ class OptionMenuItemInverter : OptionMenuItemOptionBase class OptionMenuItemJoyConfigMenu : OptionMenuItemSubmenu { JoystickConfig mJoy; - + OptionMenuItemJoyConfigMenu Init(String label, JoystickConfig joy) { Super.Init(label, "JoystickConfigMenu"); @@ -243,7 +243,7 @@ class OptionMenuItemJoyConfigMenu : OptionMenuItemSubmenu if (res && joymenu != null) joymenu.mJoy = mJoy; return res; } - + static void SetController(OptionMenuDescriptor opt, JoystickConfig joy) { OptionMenuItem it; @@ -296,7 +296,7 @@ class OptionMenuItemJoyConfigMenu : OptionMenuItemSubmenu opt.mPosition = -25; opt.CalcIndent(); } - + } //============================================================================= diff --git a/wadsrc/static/zscript/engine/ui/menu/listmenu.zs b/wadsrc/static/zscript/engine/ui/menu/listmenu.zs index cc4656d95..66d9a1ce6 100644 --- a/wadsrc/static/zscript/engine/ui/menu/listmenu.zs +++ b/wadsrc/static/zscript/engine/ui/menu/listmenu.zs @@ -120,7 +120,7 @@ class ListMenu : Menu mDesc.mItems[i].OnMenuCreated(); } } - + //============================================================================= // // @@ -136,7 +136,7 @@ class ListMenu : Menu } return NULL; } - + //============================================================================= // @@ -243,7 +243,7 @@ class ListMenu : Menu int h = mDesc.DisplayHeight(); double fx, fy, fw, fh; [fx, fy, fw, fh] = Screen.GetFullscreenRect(w, h, FSMode_ScaleToFit43); - + x = int((x - fx) * w / fw); y = int((y - fy) * h / fh); } @@ -311,7 +311,7 @@ class ListMenu : Menu } Super.Drawer(); } - + //============================================================================= // // diff --git a/wadsrc/static/zscript/engine/ui/menu/listmenuitems.zs b/wadsrc/static/zscript/engine/ui/menu/listmenuitems.zs index 8b47d288c..9e2257820 100644 --- a/wadsrc/static/zscript/engine/ui/menu/listmenuitems.zs +++ b/wadsrc/static/zscript/engine/ui/menu/listmenuitems.zs @@ -109,7 +109,7 @@ class ListMenuItemStaticPatch : ListMenuItem mColor = desc.mFontColor; } - + override void Draw(bool selected, ListMenuDescriptor desc) { if (!mTexture.Exists()) @@ -163,7 +163,7 @@ class ListMenuItemStaticText : ListMenuItem mColor = color >= 0? color : desc.mFontColor; mCentered = false; } - + void InitDirect(double x, double y, String text, Font font, int color = Font.CR_UNTRANSLATED, bool centered = false) { Super.Init(x, y); @@ -172,7 +172,7 @@ class ListMenuItemStaticText : ListMenuItem mColor = color; mCentered = centered; } - + override void Draw(bool selected, ListMenuDescriptor desc) { if (mText.Length() != 0) @@ -216,12 +216,12 @@ class ListMenuItemSelectable : ListMenuItem mParam = param; mHotkey = 0; } - + override bool CheckCoordinate(int x, int y) { return mEnabled > 0 && y >= mYpos && y < mYpos + mHeight; // no x check here } - + override bool Selectable() { return mEnabled > 0; @@ -231,13 +231,13 @@ class ListMenuItemSelectable : ListMenuItem { return c > 0 && c == mHotkey; } - + override bool Activate() { Menu.SetMenu(mAction, mParam); return true; } - + override bool MouseEvent(int type, int x, int y) { if (type == Menu.MOUSE_Release) @@ -250,7 +250,7 @@ class ListMenuItemSelectable : ListMenuItem } return false; } - + override Name, int GetAction() { return mAction, mParam; @@ -279,7 +279,7 @@ class ListMenuItemTextItem : ListMenuItemSelectable mColorSelected = desc.mFontcolor2; mHotkey = hotkey.GetNextCodePoint(0); } - + void InitDirect(double x, double y, int height, String hotkey, String text, Font font, int color, int color2, Name child, int param = 0) { Super.Init(x, y, height, child, param); @@ -290,7 +290,7 @@ class ListMenuItemTextItem : ListMenuItemSelectable int pos = 0; mHotkey = hotkey.GetNextCodePoint(0); } - + override void Draw(bool selected, ListMenuDescriptor desc) { let font = menuDelegate.PickFont(mFont); @@ -313,31 +313,31 @@ class ListMenuItemTextItem : ListMenuItemSelectable class ListMenuItemPatchItem : ListMenuItemSelectable { TextureID mTexture; - + void Init(ListMenuDescriptor desc, TextureID patch, String hotkey, Name child, int param = 0) { Super.Init(desc.mXpos, desc.mYpos, desc.mLinespacing, child, param); mHotkey = hotkey.GetNextCodePoint(0); mTexture = patch; } - + void InitDirect(double x, double y, int height, TextureID patch, String hotkey, Name child, int param = 0) { Super.Init(x, y, height, child, param); mHotkey = hotkey.GetNextCodePoint(0); mTexture = patch; } - + override void Draw(bool selected, ListMenuDescriptor desc) { DrawTexture(desc, mTexture, mXpos, mYpos); } - + override int GetWidth() { return TexMan.GetSize(mTexture); } - + } //============================================================================= @@ -357,7 +357,7 @@ class ListMenuItemCaptionItem : ListMenuItem mText = text; mFont = Font.FindFont(fnt); } - + override void Draw(bool selected, ListMenuDescriptor desc) { let font = menuDelegate.PickFont(desc.mFont); diff --git a/wadsrc/static/zscript/engine/ui/menu/loadsavemenu.zs b/wadsrc/static/zscript/engine/ui/menu/loadsavemenu.zs index 3fac8bf40..e15ca266f 100644 --- a/wadsrc/static/zscript/engine/ui/menu/loadsavemenu.zs +++ b/wadsrc/static/zscript/engine/ui/menu/loadsavemenu.zs @@ -87,7 +87,7 @@ class LoadSaveMenu : ListMenu int listboxLeft; int listboxTop; int listboxWidth; - + int listboxRows; int listboxHeight; int listboxRight; @@ -101,10 +101,10 @@ class LoadSaveMenu : ListMenu bool mEntering; TextEnterMenu mInput; double FontScale; - + BrokenLines BrokenSaveComment; - + //============================================================================= // @@ -119,13 +119,13 @@ class LoadSaveMenu : ListMenu manager.ReadSaveStrings(); SetWindows(); } - + private void SetWindows() { bool aspect43 = true; int Width43 = screen.GetHeight() * 4 / 3; int Left43 = (screen.GetWidth() - Width43) / 2; - + double wScale = Width43 / 640.; savepicLeft = Left43 + int(20 * wScale); @@ -135,7 +135,7 @@ class LoadSaveMenu : ListMenu FontScale = max(screen.GetHeight() / 480, 1); rowHeight = int(max((NewConsoleFont.GetHeight() + 1) * FontScale, 1)); - + listboxLeft = savepicLeft + savepicWidth + int(20*wScale); listboxTop = savepicTop; listboxWidth = Width43 + Left43 - listboxLeft - int(30 * wScale); @@ -151,7 +151,7 @@ class LoadSaveMenu : ListMenu commentRows = commentHeight / rowHeight; } - + //============================================================================= // // @@ -202,7 +202,7 @@ class LoadSaveMenu : ListMenu if (Selected >= manager.SavegameCount()) Selected = 0; String text = (Selected == -1 || !manager.GetSavegame(Selected).bOldVersion)? Stringtable.Localize("$MNU_NOPICTURE") : Stringtable.Localize("$MNU_DIFFVERSION"); int textlen = NewSmallFont.StringWidth(text); - + screen.DrawText (NewSmallFont, Font.CR_GOLD, (savepicLeft + savepicWidth / 2) / FontScale - textlen/2, (savepicTop+(savepicHeight-rowHeight)/2) / FontScale, text, DTA_VirtualWidthF, screen.GetWidth() / FontScale, DTA_VirtualHeightF, screen.GetHeight() / FontScale, DTA_KeepRatio, true); } @@ -218,7 +218,7 @@ class LoadSaveMenu : ListMenu screen.DrawText(NewConsoleFont, Font.CR_ORANGE, commentLeft / FontScale, (commentTop + rowHeight * i) / FontScale, BrokenSaveComment.StringAt(i), DTA_VirtualWidthF, screen.GetWidth() / FontScale, DTA_VirtualHeightF, screen.GetHeight() / FontScale, DTA_KeepRatio, true); } - + // Draw file area DrawFrame (listboxLeft, listboxTop, listboxWidth, listboxHeight); @@ -257,7 +257,7 @@ class LoadSaveMenu : ListMenu } screen.SetClipRect(listboxLeft, listboxTop+rowHeight*i, listboxRight, listboxTop+rowHeight*(i+1)); - + if (j == Selected) { screen.Clear (listboxLeft, listboxTop+rowHeight*i, listboxRight, listboxTop+rowHeight*(i+1), mEntering ? Color(255,255,0,0) : Color(255,0,0,255)); @@ -388,7 +388,7 @@ class LoadSaveMenu : ListMenu return Super.MenuEvent(mkey, fromcontroller); } } - + //============================================================================= // // @@ -422,8 +422,8 @@ class LoadSaveMenu : ListMenu return Super.MouseEvent(type, x, y); } - - + + //============================================================================= // // @@ -466,13 +466,13 @@ class LoadSaveMenu : ListMenu return Super.OnUIEvent(ev); } - + } class SaveMenu : LoadSaveMenu { String mSaveName; - + //============================================================================= // // @@ -508,7 +508,7 @@ class SaveMenu : LoadSaveMenu // // //============================================================================= - + override bool MenuEvent (int mkey, bool fromcontroller) { if (Super.MenuEvent(mkey, fromcontroller)) @@ -603,7 +603,7 @@ class SaveMenu : LoadSaveMenu mSaveName = ""; } } - + } //============================================================================= diff --git a/wadsrc/static/zscript/engine/ui/menu/menu.zs b/wadsrc/static/zscript/engine/ui/menu/menu.zs index 8e08870aa..181234808 100644 --- a/wadsrc/static/zscript/engine/ui/menu/menu.zs +++ b/wadsrc/static/zscript/engine/ui/menu/menu.zs @@ -76,14 +76,14 @@ struct JoystickConfig native version("2.4") native float GetAxisDeadZone(int axis); native void SetAxisDeadZone(int axis, float zone); - + native int GetAxisMap(int axis); native void SetAxisMap(int axis, int gameaxis); - + native String GetName(); native int GetNumAxes(); native String GetAxisName(int axis); - + } class Menu : Object native ui version("2.4") @@ -139,7 +139,7 @@ class Menu : Object native ui version("2.4") native static void SetMouseCapture(bool on); native void Close(); native void ActivateMenu(); - + //============================================================================= // // @@ -156,7 +156,7 @@ class Menu : Object native ui version("2.4") AnimatedTransition = false; Animated = false; } - + //============================================================================= // // @@ -230,7 +230,7 @@ class Menu : Object native ui version("2.4") { SetCapture(true); } - + } else if (ev.type == UIEvent.Type_MouseMove) { @@ -259,7 +259,7 @@ class Menu : Object native ui version("2.4") { return false; } - + //============================================================================= // // @@ -289,7 +289,7 @@ class Menu : Object native ui version("2.4") } } } - + //============================================================================= // // @@ -330,34 +330,34 @@ class Menu : Object native ui version("2.4") { menuDelegate.PlaySound(snd); } - + deprecated("4.0") static void DrawConText (int color, int x, int y, String str) { screen.DrawText (ConFont, color, x, y, str, DTA_CellX, 8 * CleanXfac, DTA_CellY, 8 * CleanYfac); } - + static Font OptionFont() { return NewSmallFont; } - + static int OptionHeight() { return OptionFont().GetHeight(); } - + static int OptionWidth(String s) { return OptionFont().StringWidth(s); } - + static void DrawOptionText(int x, int y, int color, String text, bool grayed = false) { String label = Stringtable.Localize(text); int overlay = grayed? Color(96,48,0,0) : 0; screen.DrawText (OptionFont(), color, x, y, text, DTA_CleanNoMove_1, true, DTA_ColorOverlay, overlay); } - + } diff --git a/wadsrc/static/zscript/engine/ui/menu/menucustomize.zs b/wadsrc/static/zscript/engine/ui/menu/menucustomize.zs index 75b114e54..390a2a703 100644 --- a/wadsrc/static/zscript/engine/ui/menu/menucustomize.zs +++ b/wadsrc/static/zscript/engine/ui/menu/menucustomize.zs @@ -7,11 +7,11 @@ class MenuDelegateBase ui if (drawit) screen.DrawText(fnt, OptionMenuSettings.mTitleColor, (screen.GetWidth() - fnt.StringWidth(title) * CleanXfac_1) / 2, 10 * CleanYfac_1, title, DTA_CleanNoMove_1, true); return (y + fnt.GetHeight()) * CleanYfac_1; // return is spacing in screen pixels. } - + virtual void PlaySound(Name sound) { } - + virtual bool DrawSelector(ListMenuDescriptor desc) { return false; @@ -21,7 +21,7 @@ class MenuDelegateBase ui { // overriding this allows to execute special actions when the menu closes } - + virtual Font PickFont(Font fnt) { if (generic_ui || !fnt) return NewSmallFont; diff --git a/wadsrc/static/zscript/engine/ui/menu/messagebox.zs b/wadsrc/static/zscript/engine/ui/menu/messagebox.zs index 94f8a38fd..8e76cae31 100644 --- a/wadsrc/static/zscript/engine/ui/menu/messagebox.zs +++ b/wadsrc/static/zscript/engine/ui/menu/messagebox.zs @@ -68,7 +68,7 @@ class MessageBoxMenu : Menu if (SmallFont && SmallFont.CanPrint(message) && SmallFont.CanPrint("$TXT_YES") && SmallFont.CanPrint("$TXT_NO")) textFont = SmallFont; else if (OriginalSmallFont && OriginalSmallFont.CanPrint(message) && OriginalSmallFont.CanPrint("$TXT_YES") && OriginalSmallFont.CanPrint("$TXT_NO")) textFont = OriginalSmallFont; } - + if (!textFont) { arrowFont = textFont = NewSmallFont; @@ -97,7 +97,7 @@ class MessageBoxMenu : Menu } Handler = native_handler; } - + //============================================================================= // // @@ -140,7 +140,7 @@ class MessageBoxMenu : Menu } } - + //============================================================================= // // @@ -227,7 +227,7 @@ class MessageBoxMenu : Menu } return Super.OnUIEvent(ev); } - + override bool OnInputEvent(InputEvent ev) { if (ev.type == InputEvent.Type_KeyDown) diff --git a/wadsrc/static/zscript/engine/ui/menu/optionmenu.zs b/wadsrc/static/zscript/engine/ui/menu/optionmenu.zs index 91b79aae0..93b7c2192 100644 --- a/wadsrc/static/zscript/engine/ui/menu/optionmenu.zs +++ b/wadsrc/static/zscript/engine/ui/menu/optionmenu.zs @@ -65,7 +65,7 @@ class OptionMenuDescriptor : MenuDescriptor native mIndent = 0; mDontDim = 0; } - + //============================================================================= // // @@ -133,7 +133,7 @@ class OptionMenu : Menu } } - + //============================================================================= // // @@ -149,7 +149,7 @@ class OptionMenu : Menu } return NULL; } - + //============================================================================= // @@ -260,7 +260,7 @@ class OptionMenu : Menu do { ++mDesc.mSelectedItem; - + if (CanScrollDown && mDesc.mSelectedItem == VisBottom) { mDesc.mScrollPos++; @@ -356,7 +356,7 @@ class OptionMenu : Menu return true; } - + //============================================================================= // // @@ -393,7 +393,7 @@ class OptionMenu : Menu return Super.MouseEvent(type, x, y); } - + //============================================================================= // // @@ -408,7 +408,7 @@ class OptionMenu : Menu mDesc.mItems[i].Ticker(); } } - + //============================================================================= // // @@ -509,12 +509,12 @@ class OptionMenu : Menu { mFocusControl = OptionMenuItem(fc); } - + override bool CheckFocus(MenuItemBase fc) { return mFocusControl == fc; } - + override void ReleaseFocus() { mFocusControl = NULL; diff --git a/wadsrc/static/zscript/engine/ui/menu/optionmenuitems.zs b/wadsrc/static/zscript/engine/ui/menu/optionmenuitems.zs index 7ece14176..02b9d0a89 100644 --- a/wadsrc/static/zscript/engine/ui/menu/optionmenuitems.zs +++ b/wadsrc/static/zscript/engine/ui/menu/optionmenuitems.zs @@ -36,7 +36,7 @@ class OptionMenuItem : MenuItemBase { String mLabel; bool mCentered; - + protected void Init(String label, String command, bool center = false) { Super.Init(0, 0, command); @@ -48,11 +48,11 @@ class OptionMenuItem : MenuItemBase { Menu.DrawOptionText(x, y, color, text, grayed); } - + protected int drawLabel(int indent, int y, int color, bool grayed = false) { String label = Stringtable.Localize(mLabel); - + int x; int w = Menu.OptionWidth(label) * CleanXfac_1; if (!mCentered) x = indent - w; @@ -66,24 +66,24 @@ class OptionMenuItem : MenuItemBase Menu.DrawOptionText(indent + CursorSpace(), y, color, text, grayed); } - + int CursorSpace() { return (14 * CleanXfac_1); } - + override bool Selectable() { return true; } - + override int GetIndent() { if (mCentered) return 0; if (screen.GetWidth() < 640) return screen.GetWidth() / 2; return Menu.OptionWidth(Stringtable.Localize(mLabel)); } - + override bool MouseEvent(int type, int x, int y) { if (Selectable() && type == Menu.MOUSE_Release) @@ -147,7 +147,7 @@ class OptionMenuItemLabeledSubmenu : OptionMenuItemSubmenu override int Draw(OptionMenuDescriptor desc, int y, int indent, bool selected) { drawLabel(indent, y, selected? OptionMenuSettings.mFontColorSelection : OptionMenuSettings.mFontColor); - + String text = mLabelCVar.GetString(); if (text.Length() == 0) text = Stringtable.Localize("$notset"); drawValue(indent, y, OptionMenuSettings.mFontColorValue, text); @@ -166,7 +166,7 @@ class OptionMenuItemCommand : OptionMenuItemSubmenu private String ccmd; // do not allow access to this from the outside. bool mCloseOnSelect; private bool mUnsafe; - + OptionMenuItemCommand Init(String label, Name command, bool centered = false, bool closeonselect = false) { Super.Init(label, command, 0, centered); @@ -255,7 +255,7 @@ class OptionMenuItemOptionBase : OptionMenuItem Name mValues; // Entry in OptionValues table CVar mGrayCheck; int mCenter; - + const OP_VALUES = 0x11001; protected void Init(String label, Name command, Name values, CVar graycheck, int center) @@ -288,11 +288,11 @@ class OptionMenuItemOptionBase : OptionMenuItem { return 0; } - + virtual void SetSelection(int Selection) { } - + //============================================================================= override int Draw(OptionMenuDescriptor desc, int y, int indent, bool selected) { @@ -338,7 +338,7 @@ class OptionMenuItemOptionBase : OptionMenuItem } return true; } - + virtual bool isGrayed() { return mGrayCheck != null && !mGrayCheck.GetInt(); @@ -542,7 +542,7 @@ class OptionMenuItemControlBase : OptionMenuItem } return false; } - + void SendKey(int key) { mInput = key; @@ -717,7 +717,7 @@ class OptionMenuSliderBase : OptionMenuItem { return 0; } - + virtual void SetSliderValue(double val) { } @@ -862,7 +862,7 @@ class OptionMenuSliderBase : OptionMenuItem class OptionMenuItemSlider : OptionMenuSliderBase { CVar mCVar; - + OptionMenuItemSlider Init(String label, Name command, double min, double max, double step, int showval = 1, CVar graycheck = NULL) { Super.Init(label, min, max, step, showval, command, graycheck); @@ -941,11 +941,11 @@ class OptionMenuItemColorPicker : OptionMenuItem if (mCVar != null) { Menu.MenuSound("menu/choose"); - + // This code is a bit complicated because it should allow subclassing the // colorpicker menu. // New color pickers must inherit from the internal one to work here. - + let desc = MenuDescriptor.GetDescriptor('Colorpickermenu'); if (desc != NULL && (desc.mClass == null || desc.mClass is "ColorPickerMenu")) { @@ -1042,7 +1042,7 @@ class OptionMenuFieldBase : OptionMenuItem class OptionMenuItemTextField : OptionMenuFieldBase { TextEnterMenu mEnter; - + OptionMenuItemTextField Init (String label, Name command, CVar graycheck = null) { Super.Init(label, command, graycheck); @@ -1175,7 +1175,7 @@ class OptionMenuItemScaleSlider : OptionMenuItemSlider String TextZero; String TextNegOne; int mClickVal; - + OptionMenuItemScaleSlider Init(String label, Name command, double min, double max, double step, String zero, String negone = "") { Super.Init(label, command, min, max, step, 0); @@ -1204,7 +1204,7 @@ class OptionMenuItemScaleSlider : OptionMenuItemSlider } return indent; } - + override bool MouseEvent(int type, int x, int y) { int value = int(GetSliderValue()); @@ -1214,11 +1214,11 @@ class OptionMenuItemScaleSlider : OptionMenuItemSlider mClickVal = value; if (value <= 0) return false; return Super.MouseEvent(type, x, y); - + case Menu.MOUSE_Move: if (mClickVal <= 0) return false; return Super.MouseEvent(type, x, y); - + case Menu.MOUSE_Release: if (mClickVal <= 0) { @@ -1231,7 +1231,7 @@ class OptionMenuItemScaleSlider : OptionMenuItemSlider } return false; } - + } //============================================================================= diff --git a/wadsrc/static/zscript/engine/ui/menu/reverbedit.zs b/wadsrc/static/zscript/engine/ui/menu/reverbedit.zs index 65fa5158e..282fce55d 100644 --- a/wadsrc/static/zscript/engine/ui/menu/reverbedit.zs +++ b/wadsrc/static/zscript/engine/ui/menu/reverbedit.zs @@ -15,14 +15,14 @@ class ReverbEdit : OptionMenu super.Init(parent, desc); OnReturn(); } - + override void OnReturn() { string env; int id; - + [env, id] = GetSelectedEnvironment(); - + let li = GetItem('EvironmentName'); if (li != NULL) { @@ -126,7 +126,7 @@ class OptionMenuItemReverbSelect : OptionMenuItemSubMenu return self; } - + override int Draw(OptionMenuDescriptor desc, int y, int indent, bool selected) { int x = drawLabel(indent, y, selected? OptionMenuSettings.mFontColorSelection : OptionMenuSettings.mFontColor); @@ -164,7 +164,7 @@ class OptionMenuItemReverbOption : OptionMenuItemOptionBase { return int(ReverbEdit.GetValue(mValIndex)); } - + override void SetSelection(int Selection) { ReverbEdit.SetValue(mValIndex, Selection); @@ -182,7 +182,7 @@ class OptionMenuItemSliderReverbEditOption : OptionMenuSliderBase int mValIndex; String mEditValue; TextEnterMenu mEnter; - + OptionMenuItemSliderReverbEditOption Init(String label, double min, double max, double step, int showval, int valindex) { Super.Init(label, min, max, step, showval); @@ -190,7 +190,7 @@ class OptionMenuItemSliderReverbEditOption : OptionMenuSliderBase mEnter = null; return self; } - + override double GetSliderValue() { @@ -201,7 +201,7 @@ class OptionMenuItemSliderReverbEditOption : OptionMenuSliderBase { ReverbEdit.SetValue(mValIndex, val); } - + override bool Selectable() { return !ReverbEdit.GrayCheck(); @@ -228,7 +228,7 @@ class OptionMenuItemSliderReverbEditOption : OptionMenuSliderBase } return indent; } - + override bool MenuEvent (int mkey, bool fromcontroller) { if (mkey == Menu.MKEY_Enter) @@ -253,6 +253,6 @@ class OptionMenuItemSliderReverbEditOption : OptionMenuSliderBase return Super.MenuEvent(mkey, fromcontroller); } - + } diff --git a/wadsrc/static/zscript/engine/ui/menu/textentermenu.zs b/wadsrc/static/zscript/engine/ui/menu/textentermenu.zs index 6fc7abe02..9a83deb50 100644 --- a/wadsrc/static/zscript/engine/ui/menu/textentermenu.zs +++ b/wadsrc/static/zscript/engine/ui/menu/textentermenu.zs @@ -38,7 +38,7 @@ class TextEnterMenu : Menu { const INPUTGRID_WIDTH = 13; const INPUTGRID_HEIGHT = 5; - + const Chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+-=.,!?@'\":;[]()<>^#$%&*/_ \b"; String mEnterString; @@ -50,7 +50,7 @@ class TextEnterMenu : Menu int CursorSize; bool AllowColors; Font displayFont; - + //============================================================================= // // @@ -106,13 +106,13 @@ class TextEnterMenu : Menu { return mEnterString; } - + override bool TranslateKeyboardEvents() { return mInputGridOkay; } - - + + //============================================================================= // // @@ -303,7 +303,7 @@ class TextEnterMenu : Menu return false; } - + //============================================================================= // // @@ -375,5 +375,5 @@ class TextEnterMenu : Menu } Super.Drawer(); } - + } diff --git a/wadsrc/static/zscript/engine/ui/statusbar/statusbarcore.zs b/wadsrc/static/zscript/engine/ui/statusbar/statusbarcore.zs index 86f93773c..b00af3fde 100644 --- a/wadsrc/static/zscript/engine/ui/statusbar/statusbarcore.zs +++ b/wadsrc/static/zscript/engine/ui/statusbar/statusbarcore.zs @@ -23,22 +23,22 @@ class StatusBarCore native ui DI_MIRROR = 0x1000, // flip the texture horizontally, like a mirror DI_ITEM_RELCENTER = 0x2000, DI_MIRRORY = 0x40000000, - + DI_SCREEN_AUTO = 0, // decide based on given offsets. DI_SCREEN_MANUAL_ALIGN = 0x4000, // If this is on, the following flags will have an effect - + DI_SCREEN_TOP = DI_SCREEN_MANUAL_ALIGN, DI_SCREEN_VCENTER = 0x8000 | DI_SCREEN_MANUAL_ALIGN, DI_SCREEN_BOTTOM = 0x10000 | DI_SCREEN_MANUAL_ALIGN, DI_SCREEN_VOFFSET = 0x18000 | DI_SCREEN_MANUAL_ALIGN, DI_SCREEN_VMASK = 0x18000 | DI_SCREEN_MANUAL_ALIGN, - + DI_SCREEN_LEFT = DI_SCREEN_MANUAL_ALIGN, DI_SCREEN_HCENTER = 0x20000 | DI_SCREEN_MANUAL_ALIGN, DI_SCREEN_RIGHT = 0x40000 | DI_SCREEN_MANUAL_ALIGN, DI_SCREEN_HOFFSET = 0x60000 | DI_SCREEN_MANUAL_ALIGN, DI_SCREEN_HMASK = 0x60000 | DI_SCREEN_MANUAL_ALIGN, - + DI_SCREEN_LEFT_TOP = DI_SCREEN_TOP | DI_SCREEN_LEFT, DI_SCREEN_RIGHT_TOP = DI_SCREEN_TOP | DI_SCREEN_RIGHT, DI_SCREEN_LEFT_BOTTOM = DI_SCREEN_BOTTOM | DI_SCREEN_LEFT, @@ -49,21 +49,21 @@ class StatusBarCore native ui DI_SCREEN_CENTER_TOP = DI_SCREEN_TOP | DI_SCREEN_HCENTER, DI_SCREEN_CENTER_BOTTOM = DI_SCREEN_BOTTOM | DI_SCREEN_HCENTER, DI_SCREEN_OFFSETS = DI_SCREEN_HOFFSET | DI_SCREEN_VOFFSET, - + DI_ITEM_AUTO = 0, // equivalent with bottom center, which is the default alignment. - + DI_ITEM_TOP = 0x80000, DI_ITEM_VCENTER = 0x100000, DI_ITEM_BOTTOM = 0, // this is the default vertical alignment DI_ITEM_VOFFSET = 0x180000, DI_ITEM_VMASK = 0x180000, - + DI_ITEM_LEFT = 0x200000, DI_ITEM_HCENTER = 0, // this is the default horizontal alignment DI_ITEM_RIGHT = 0x400000, DI_ITEM_HOFFSET = 0x600000, DI_ITEM_HMASK = 0x600000, - + DI_ITEM_LEFT_TOP = DI_ITEM_TOP|DI_ITEM_LEFT, DI_ITEM_RIGHT_TOP = DI_ITEM_TOP|DI_ITEM_RIGHT, DI_ITEM_LEFT_BOTTOM = DI_ITEM_BOTTOM|DI_ITEM_LEFT, @@ -71,7 +71,7 @@ class StatusBarCore native ui DI_ITEM_CENTER = DI_ITEM_VCENTER|DI_ITEM_HCENTER, DI_ITEM_CENTER_BOTTOM = DI_ITEM_BOTTOM|DI_ITEM_HCENTER, DI_ITEM_OFFSETS = DI_ITEM_HOFFSET|DI_ITEM_VOFFSET, - + DI_TEXT_ALIGN_LEFT = 0, DI_TEXT_ALIGN_RIGHT = 0x800000, DI_TEXT_ALIGN_CENTER = 0x1000000, @@ -94,7 +94,7 @@ class StatusBarCore native ui FNF_WHENNOTZERO = 0x1, FNF_FILLZEROS = 0x2, } - + // These are block properties for the drawers. A child class can set them to have a block of items use the same settings. native double Alpha; native Vector2 drawOffset; // can be set by subclasses to offset drawing operations @@ -118,17 +118,17 @@ class StatusBarCore native ui native double, double, double, double TransformRect(double x, double y, double w, double h, int flags = 0); native void Fill(Color col, double x, double y, double w, double h, int flags = 0); native void SetClipRect(double x, double y, double w, double h, int flags = 0); - + native void SetSize(int height, int vwidth, int vheight, int hwidth = -1, int hheight = -1); native Vector2 GetHUDScale(); native void BeginStatusBar(bool forceScaled = false, int resW = -1, int resH = -1, int rel = -1); native void BeginHUD(double Alpha = 1., bool forcescaled = false, int resW = -1, int resH = -1); - + void ClearClipRect() { screen.ClearClipRect(); } - + //============================================================================ // // Returns how much the status bar's graphics extend into the view @@ -137,7 +137,7 @@ class StatusBarCore native ui // by the element requesting this information. // //============================================================================ - + virtual int GetProtrusion(double scaleratio) const { return 0; @@ -156,7 +156,7 @@ class LinearValueInterpolator : Object { int mCurrentValue; int mMaxChange; - + static LinearValueInterpolator Create(int startval, int maxchange) { let v = new("LinearValueInterpolator"); @@ -164,12 +164,12 @@ class LinearValueInterpolator : Object v.mMaxChange = maxchange; return v; } - + void Reset(int value) { mCurrentValue = value; } - + // This must be called periodically in the status bar's Tick function. // Do not call this in the Draw function because that may skip some frames! void Update(int destvalue) @@ -183,7 +183,7 @@ class LinearValueInterpolator : Object mCurrentValue = min(destvalue, mCurrentValue + mMaxChange); } } - + // This must be called in the draw function to retrieve the value for output. int GetValue() { @@ -197,8 +197,8 @@ class DynamicValueInterpolator : Object int mMinChange; int mMaxChange; double mChangeFactor; - - + + static DynamicValueInterpolator Create(int startval, double changefactor, int minchange, int maxchange) { let v = new("DynamicValueInterpolator"); @@ -208,12 +208,12 @@ class DynamicValueInterpolator : Object v.mChangeFactor = changefactor; return v; } - + void Reset(int value) { mCurrentValue = value; } - + // This must be called periodically in the status bar's Tick function. // Do not call this in the Draw function because that may skip some frames! void Update(int destvalue) @@ -228,7 +228,7 @@ class DynamicValueInterpolator : Object mCurrentValue = min(destvalue, mCurrentValue + diff); } } - + // This must be called in the draw function to retrieve the value for output. int GetValue() { diff --git a/wadsrc/static/zscript/games/blood/bloodgame.zs b/wadsrc/static/zscript/games/blood/bloodgame.zs index 2cf21144c..c1de25186 100644 --- a/wadsrc/static/zscript/games/blood/bloodgame.zs +++ b/wadsrc/static/zscript/games/blood/bloodgame.zs @@ -29,9 +29,9 @@ struct Blood native native static void sndStartSampleNamed(String sname, int volume, int channel); native static TextureID PowerupIcon(int pwup); native static BloodPlayer GetViewPlayer(); - + // These are just dummies to make the MP statusbar code compile. - + static void GetPlayers(Array players) { players.Clear(); diff --git a/wadsrc/static/zscript/games/blood/ui/menu.zs b/wadsrc/static/zscript/games/blood/ui/menu.zs index cbf6378dc..5f5b9054f 100644 --- a/wadsrc/static/zscript/games/blood/ui/menu.zs +++ b/wadsrc/static/zscript/games/blood/ui/menu.zs @@ -11,12 +11,12 @@ class BloodMenuDelegate : RazeMenuDelegate { return BloodScreen.DrawCaption(title, y, drawit); // this ignores the passed font intentionally. } - + override bool DrawSelector(ListMenuDescriptor desc) { return true; // do not draw any selector. } - + } //------------------------------------------------------------------------------------------- @@ -49,12 +49,12 @@ class ListMenuItemBloodTextItem : ListMenuItemTextItem { Super.Init(desc, text, hotkey, child, param); } - + void InitDirect(double x, double y, int height, String hotkey, String text, Font font, int color, int color2, Name child, int param = 0) { Super.InitDirect(x, y, height, hotkey, text, font, color, color2, child, param); } - + override void Draw(bool selected, ListMenuDescriptor desc) { int shade = Selectable()? 32: 48; @@ -63,13 +63,13 @@ class ListMenuItemBloodTextItem : ListMenuItemTextItem int xpos = mXpos - gamefont.StringWidth(mText) / 2; int cr = generic_ui? Font.CR_GRAY : Font.CR_NATIVEPAL; int trans = generic_ui? 0 : Translation.MakeID(Translation_Remap, pal); - + if (selected) shade = 32 - ((MSTime() * 120 / 1000) & 63); Screen.DrawText(gamefont, Font.CR_UNTRANSLATED, xpos+1, mYpos+1, mText, DTA_Color, 0xff000000, DTA_FullscreenScale, FSMode_Fit320x200); Screen.DrawText(gamefont, Font.CR_NATIVEPAL, xpos, mYpos, mText, DTA_TranslationIndex, trans, DTA_Color, Raze.shadeToLight(shade), DTA_FullscreenScale, FSMode_Fit320x200); } - + } @@ -77,7 +77,7 @@ class ImageScrollerPageQavDrawer : ImageScrollerPage { String qavn; voidptr qav; - + void Init(ImageScrollerDescriptor desc, String qavname) { Super.Init(); @@ -100,7 +100,7 @@ class ImageScrollerPageQavDrawer : ImageScrollerPage { qav = LoadQav(qavn); } - + override void OnEndPage() { if (qav) DestroyQav(qav); diff --git a/wadsrc/static/zscript/games/blood/ui/screens.zs b/wadsrc/static/zscript/games/blood/ui/screens.zs index e5922cb0c..c0e1f20da 100644 --- a/wadsrc/static/zscript/games/blood/ui/screens.zs +++ b/wadsrc/static/zscript/games/blood/ui/screens.zs @@ -273,7 +273,7 @@ class BloodLoadScreen : ScreenJob { if (fadestate == visible) jobstate = finished; } - + override void Draw(double sr) { BloodScreen.DrawBackground(); diff --git a/wadsrc/static/zscript/games/duke/dukegame.zs b/wadsrc/static/zscript/games/duke/dukegame.zs index baf279ee8..e27146a2b 100644 --- a/wadsrc/static/zscript/games/duke/dukegame.zs +++ b/wadsrc/static/zscript/games/duke/dukegame.zs @@ -35,7 +35,7 @@ struct Duke native MUS_BRIEFING = 1, MUS_LOADING = 2, }; - + enum EPalette { BASEPAL = 0, @@ -69,20 +69,20 @@ struct Duke native native static DukePlayer GetViewPlayer(); native static int MaxPlayerHealth(); native static int MaxAmmoAmount(int weap); - + static void PlayBonusMusic() { if (System.MusicEnabled()) PlaySound(DukeSnd.BONUSMUSIC, CHAN_AUTO, CHANF_UI); } - + //========================================================================== // // wrappers around DrawText to allow easier reuse of the old code. // The vertical displacements are to have the same positioning as with the original code. // //========================================================================== - + static void BigText(double x, double y, String text, int align = -1, double alpha = 1.) { let myfont = Raze.PickBigFont(); diff --git a/wadsrc/static/zscript/games/duke/ui/menu.zs b/wadsrc/static/zscript/games/duke/ui/menu.zs index dccfec24e..f0363a1f5 100644 --- a/wadsrc/static/zscript/games/duke/ui/menu.zs +++ b/wadsrc/static/zscript/games/duke/ui/menu.zs @@ -51,7 +51,7 @@ class DukeMenuDelegate : RazeMenuDelegate int h = texid.isValid() && texsize.Y < 40? texsize.Y : fonth; return int((y+h) * fh / 200); // This must be the covered height of the header in true pixels. } - + //---------------------------------------------------------------------------- // // @@ -69,7 +69,7 @@ class DukeMenuDelegate : RazeMenuDelegate let pe = color(255, light, light, light); Screen.DrawTexture(TexMan.CheckForTexture(picname), false, x, y, DTA_FullscreenScale, FSMode_Fit320x200, DTA_ScaleX, scale, DTA_ScaleY, scale, DTA_Color, pe, DTA_CenterOffsetRel, true); } - + override bool DrawSelector(ListMenuDescriptor desc) { int cursorOffset = 110; @@ -79,7 +79,7 @@ class DukeMenuDelegate : RazeMenuDelegate DrawCursor(160 - cursorOffset, ymid, cursorScale, true); return true; } - + //---------------------------------------------------------------------------- // // not used for any localized content. @@ -103,7 +103,7 @@ class DukeMenuDelegate : RazeMenuDelegate Screen.DrawText(SmallFont, Font.CR_UNTRANSLATED, x, y + 2, t, DTA_FullscreenScale, FSMode_Fit320x200); } - + } //---------------------------------------------------------------------------- @@ -115,12 +115,12 @@ class DukeMenuDelegate : RazeMenuDelegate class ListMenuItemDukeLogo : ListMenuItem { const x = 160; - + void Init(ListMenuDescriptor desc) { Super.Init(0, 0); } - + override void Draw(bool selected, ListMenuDescriptor desc) { if (gameinfo.gametype & GAMEFLAG_RRRA) @@ -142,7 +142,7 @@ class ListMenuItemDukeLogo : ListMenuItem Screen.DrawTexture(TexMan.CheckForTexture("MENUPLUTOPAKSPRITE"), false, x + 100, 36, DTA_FullscreenScale, FSMode_Fit320x200Top, DTA_Color, pe, DTA_CenterOffsetRel, true); } } - + } } @@ -159,12 +159,12 @@ class ListMenuItemDukeTextItem : ListMenuItemTextItem Super.Init(desc, text, hotkey, child, param); mColorSelected = 0; } - + void InitDirect(double x, double y, int height, String hotkey, String text, Font font, int color, int color2, Name child, int param = 0) { Super.InitDirect(x, y, height, hotkey, text, font, color, color2, child, param); } - + override void Draw(bool selected, ListMenuDescriptor desc) { let font = Raze.PickBigFont(); @@ -188,7 +188,7 @@ class ListMenuItemDukeTextItem : ListMenuItemTextItem Screen.DrawText(font, trans? Font.CR_NATIVEPAL : Font.CR_UNTRANSLATED, xpos, mYpos, mText, DTA_FullscreenScale, FSMode_Fit320x200, DTA_ScaleX, scale, DTA_ScaleY, scale, DTA_Color, pe, DTA_TranslationIndex, trans); } - + } //---------------------------------------------------------------------------- @@ -199,12 +199,12 @@ class ListMenuItemDukeTextItem : ListMenuItemTextItem class ImageScrollerPageDukeCredits1 : ImageScrollerPage { - + void Init(ImageScrollerDescriptor desc) { Super.Init(); } - + override void Drawer(bool selected) { int m, l; @@ -269,12 +269,12 @@ class ImageScrollerPageDukeCredits1 : ImageScrollerPage class ImageScrollerPageDukeCredits2 : ImageScrollerPage { - + void Init(ImageScrollerDescriptor desc) { Super.Init(); } - + override void Drawer(bool selected) { int m, l; @@ -322,12 +322,12 @@ class ImageScrollerPageDukeCredits2 : ImageScrollerPage class ImageScrollerPageDukeCredits3 : ImageScrollerPage { - + void Init(ImageScrollerDescriptor desc) { Super.Init(); } - + override void Drawer(bool selected) { let VOLUMEONE = gameinfo.gametype & GAMEFLAG_SHAREWARE; @@ -356,6 +356,6 @@ class PlayerMenu : OptionMenu DrawPlayerSprite((mDesc.mSelectedItem == 3)); Super.Drawer(); } - + native static void DrawPlayerSprite(int sel); } diff --git a/wadsrc/static/zscript/games/duke/ui/sbar.zs b/wadsrc/static/zscript/games/duke/ui/sbar.zs index 006a99c2c..aafcdbc20 100644 --- a/wadsrc/static/zscript/games/duke/ui/sbar.zs +++ b/wadsrc/static/zscript/games/duke/ui/sbar.zs @@ -68,7 +68,7 @@ class DukeCommonStatusBar : RazeStatusBar auto tex = tileGetTexture(TILE_FRAGBAR); for (int y = 0; y < 32; y += 8) DrawTexture(twod, tex, 0, 0, DTA_FullscreenScale, FSMode_Fit320x200, DTA_ScaleX, 1.001, DTA_ScaleY, 1.001, TAG_Done); - + for (i = connecthead; i >= 0; i = connectpoint2[i]) { m initext(21 + (73 * (i & 3)), 2 + ((i & 28) << 1), &ud.user_name[i][0], ps[i].GetActor().s.pal, 2 + 8 + 16 + 128); diff --git a/wadsrc/static/zscript/games/duke/ui/sbar_r.zs b/wadsrc/static/zscript/games/duke/ui/sbar_r.zs index 33ccf2e6b..d215c3992 100644 --- a/wadsrc/static/zscript/games/duke/ui/sbar_r.zs +++ b/wadsrc/static/zscript/games/duke/ui/sbar_r.zs @@ -301,7 +301,7 @@ class RedneckStatusBar : DukeCommonStatusBar texname = "AMMO_ICON" .. i; format = String.Format("%d", p.ammo_amount[i+1]); } - + DrawImage(texname, (18 + i * 32, top - 6.5), DI_ITEM_OFFSETS, scale:(sbscale, sbscale)); if (format.Length()) @@ -389,7 +389,7 @@ class RedneckStatusBar : DukeCommonStatusBar p.drink_amt = 100; p.drunkang = 400; } - + DrawImageRotated("GUTMETER", (256, top + 15), DI_ITEM_RELCENTER, p.drunkang * -Raze.BAngToDegree, 1, (scale, scale)); DrawImageRotated("GUTMETER", (292, top + 15), DI_ITEM_RELCENTER, p.eatang * -Raze.BAngToDegree, 1, (scale, scale)); diff --git a/wadsrc/static/zscript/games/duke/ui/screens.zs b/wadsrc/static/zscript/games/duke/ui/screens.zs index 2988e7588..80fc75d94 100644 --- a/wadsrc/static/zscript/games/duke/ui/screens.zs +++ b/wadsrc/static/zscript/games/duke/ui/screens.zs @@ -190,7 +190,7 @@ class Episode1End1 : SkippableScreenJob Super.Init(fadein | fadeout); return self; } - + override void OnTick() { @@ -201,7 +201,7 @@ class Episode1End1 : SkippableScreenJob static const int boss_time[] = { 0, 220, 260, 290, 320, 350, 350 }; static const int boss_time2[] = { 120, 260, 290, 320, 350, 380, 380 }; static const String boss_tile[] = { "VICTORY4", "VICTORY5", "VICTORY6", "VICTORY7", "VICTORY8", "VICTORY9", "VICTORY9" }; - + int currentclock = ticks * 120 / GameTicRate; bossani.SetInvalid(); @@ -761,7 +761,7 @@ class RRLevelSummaryScreen : SummaryScreenBase if (cluster != null) basetex = cluster.InterBackground; } if (basetex.length() == 0) basetex = "BONUSPIC01"; - + lastmapname = level.DisplayName(); texBg = TexMan.CheckForTexture(basetex); return self; @@ -960,7 +960,7 @@ class RRRAEndOfGame : SkippableScreenJob class DukeLoadScreen : ScreenJob { MapRecord rec; - + ScreenJob Init(MapRecord maprec) { Super.Init(fadein); @@ -972,11 +972,11 @@ class DukeLoadScreen : ScreenJob { if (fadestate == visible) jobstate = finished; } - + override void Draw(double sr) { Screen.DrawTexture(TexMan.CheckForTexture("LOADSCREEN"), false, 0, 0, DTA_FullscreenEx, FSMode_ScaleToFit43, DTA_LegacyRenderStyle, STYLE_Normal); - + if (!Raze.IsRR()) { Duke.BigText(160, 90, (rec.flags & MapRecord.USERMAP)? "$TXT_LOADUM" : "$TXT_LOADING", 0); diff --git a/wadsrc/static/zscript/games/exhumed/exhumedgame.zs b/wadsrc/static/zscript/games/exhumed/exhumedgame.zs index 9dd83e4c2..4fe187a59 100644 --- a/wadsrc/static/zscript/games/exhumed/exhumedgame.zs +++ b/wadsrc/static/zscript/games/exhumed/exhumedgame.zs @@ -13,12 +13,12 @@ struct Exhumed native native static ExhumedPlayer GetViewPlayer(); native static int GetPistolClip(); native static int GetPlayerClip(); - + static void DrawAbs(String img, int x, int y, int shade = 0) { Screen.DrawTexture(TexMan.CheckForTexture(img, TexMan.Type_Any), false, x, y, DTA_FullscreenScale, FSMode_Fit320x200, DTA_TopLeft, true, DTA_Color, Raze.shadeToLight(shade)); } - + static void DrawRel(String img, int x, int y, int shade = 0) { let tex = TexMan.CheckForTexture(img, TexMan.Type_Any); @@ -65,7 +65,7 @@ struct ExhumedPlayer native //PlayerHorizon horizon; //PlayerAngle angle; - + native bool IsUnderwater(); native int GetAngle(); } diff --git a/wadsrc/static/zscript/games/exhumed/ui/menu.zs b/wadsrc/static/zscript/games/exhumed/ui/menu.zs index 52585f439..24aafd6ff 100644 --- a/wadsrc/static/zscript/games/exhumed/ui/menu.zs +++ b/wadsrc/static/zscript/games/exhumed/ui/menu.zs @@ -2,7 +2,7 @@ class ExhumedMenuDelegate : RazeMenuDelegate { double zoomsize; // this is the only persistent place where it can be conveniently stored. - + override int DrawCaption(String title, Font fnt, int y, bool drawit) { let font = Raze.PickBigFont(); diff --git a/wadsrc/static/zscript/games/exhumed/ui/screens.zs b/wadsrc/static/zscript/games/exhumed/ui/screens.zs index 189eee8b6..fc60c64dd 100644 --- a/wadsrc/static/zscript/games/exhumed/ui/screens.zs +++ b/wadsrc/static/zscript/games/exhumed/ui/screens.zs @@ -43,7 +43,7 @@ class LmfPlayer : SkippableScreenJob fn = filename; return self; } - + override void Start() { decoder = LMFDecoder.Create(fn); @@ -269,7 +269,7 @@ class MapScreen : ScreenJob int x; int delta; int nIdleSeconds; - + int curYPos, destYPos; int nLevel, nLevelNew, nLevelBest; @@ -330,7 +330,7 @@ class MapScreen : ScreenJob } return true; } - + if (key == InputEvent.KEY_DOWNARROW || key == InputEvent.KEY_PAD_DPAD_DOWN || key == InputEvent.Key_kpad_2 || binding ~== "+move_backward") { if (curYPos == destYPos && nLevelNew > 0) @@ -384,7 +384,7 @@ class MapScreen : ScreenJob int currentclock = int((ticks + smoothratio) * 120 / GameTicRate); int tileY = curYPos; - + // Draw the background screens for (int i = 0; i < 10; i++) { @@ -392,12 +392,12 @@ class MapScreen : ScreenJob Exhumed.DrawAbs(tex, x, tileY); tileY -= 200; } - + // for each level - drawing the 'level completed' on-fire smoke markers for (int i = 0; i < 20; i++) { int screenY = (i >> 1) * -200; - + if (nLevelBest >= i) // check if the player has finished this level { for (int j = 0; j < MapLevelFires[i * FIRE_SIZE]; j++) @@ -407,29 +407,29 @@ class MapScreen : ScreenJob int nFireType = MapLevelFires[elem + FIRE_TYPE]; int x = MapLevelFires[elem + FIRE_XOFS]; int y = MapLevelFires[elem + FIRE_YOFS]; - + String nTile = String.Format("MAPFIRE_%d%d", nFireType+1, nFireFrame+1); int smokeX = x + FireTilesX[nFireType*3 + nFireFrame]; int smokeY = y + FireTilesY[nFireType*3 + nFireFrame] + curYPos + screenY; - + // Use rotatesprite to trim smoke in widescreen Exhumed.DrawAbs(nTile, smokeX, smokeY); // Todo: mask out the sides of the screen if the background is not widescreen. } } - + int t = (((currentclock & 16) >> 4)); - + String nTile = String.Format("MapPlaque%d_%02d", t+1, i+1); - + int nameX = mapPlaqueX[i]; int nameY = mapPlaqueY[i] + curYPos + screenY; - + // Draw level name plaque Exhumed.DrawAbs(nTile, nameX, nameY); - + int shade = 96; - + if (nLevelNew == i) { shade = (Raze.bsin(16 * currentclock) + 31) >> 8; @@ -438,11 +438,11 @@ class MapScreen : ScreenJob { shade = 31; } - + int textY = nameY + MapPlaqueTextY[i]; int textX = nameX + MapPlaqueTextX[i]; nTile = String.Format("MapPlaqueText_%02d", i+1); - + // draw the text, alternating between red and black Exhumed.DrawAbs(nTile, textX, textY, shade); } @@ -475,7 +475,7 @@ class Cinema : SkippableScreenJob cdtrack = cdtrk; return self; } - + override void Start() { System.StopAllSounds(); diff --git a/wadsrc/static/zscript/games/sw/ui/menu.zs b/wadsrc/static/zscript/games/sw/ui/menu.zs index f5fcb0aa7..828faaa45 100644 --- a/wadsrc/static/zscript/games/sw/ui/menu.zs +++ b/wadsrc/static/zscript/games/sw/ui/menu.zs @@ -36,16 +36,16 @@ class SWMenuDelegate : RazeMenuDelegate int h = texid.isValid() && texsize.Y < 40? texsize.Y : fonth; return int((y+h) * fh / 200); // This must be the covered height of the header in true pixels. } - + override bool DrawSelector(ListMenuDescriptor desc) { let item = desc.mItems[desc.mSelectedItem]; let x = item.GetX(); let y = item.GetY(); - + let tex = TexMan.CheckForTexture("YINYANG"); - + x -= TexMan.GetSize(tex) / 4 + 2; y += 4; @@ -104,17 +104,17 @@ class ListMenuItemSWTextItem : ListMenuItemTextItem Super.Init(desc, text, hotkey, child, param); if (child == 'none') mEnabled = -1; } - + override bool Selectable() { return super.Selectable() && mFont == BigFont; } - + void InitDirect(double x, double y, int height, String hotkey, String text, Font font, int color, int color2, Name child, int param = 0) { Super.InitDirect(x, y, height, hotkey, text, font, color, color2, child, param); } - + override void Draw(bool selected, ListMenuDescriptor desc) { let gamefont = generic_ui ? NewSmallFont : mFont == SmallFont? Raze.PickSmallFont() : mFont == BigFont? Raze.PickBigFont() : mFont; diff --git a/wadsrc/static/zscript/games/sw/ui/sbar.zs b/wadsrc/static/zscript/games/sw/ui/sbar.zs index badc50c38..aa7b9af49 100644 --- a/wadsrc/static/zscript/games/sw/ui/sbar.zs +++ b/wadsrc/static/zscript/games/sw/ui/sbar.zs @@ -106,14 +106,14 @@ class SWStatusBar : RazeStatusBar let siz = TexMan.GetScaledSize(img); return int(siz.Y); } - + int tileWidth(String tex) { let img = TexMan.CheckForTexture(tex, TexMan.TYPE_Any); let siz = TexMan.GetScaledSize(img); return int(siz.X); } - + //--------------------------------------------------------------------------- // // @@ -583,7 +583,7 @@ class SWStatusBar : RazeStatusBar DisplayPanelNumber(PANEL_ARMOR_BOX_X + PANEL_ARMOR_XOFF, PANEL_BOX_Y + PANEL_ARMOR_YOFF, pp.Armor); if (wnum != SW.WPN_FIST && wnum != SW.WPN_SWORD) DisplayPanelNumber(PANEL_AMMO_BOX_X + PANEL_AMMO_XOFF, PANEL_BOX_Y + PANEL_AMMO_YOFF, pp.WpnAmmo[wnum]); PlayerUpdateWeaponSummaryAll(pp); - + /* if (gNet.MultiGameType != MULTI_GAME_COMMBAT) DisplayKeys(pp, PANEL_KEYS_BOX_X, PANEL_BOX_Y); diff --git a/wadsrc/static/zscript/games/sw/ui/screens.zs b/wadsrc/static/zscript/games/sw/ui/screens.zs index 9f2b549ec..66d6c142c 100644 --- a/wadsrc/static/zscript/games/sw/ui/screens.zs +++ b/wadsrc/static/zscript/games/sw/ui/screens.zs @@ -35,7 +35,7 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms class SWDRealmsScreen : SkippableScreenJob { const DREALMSPAL = 1; - + ScreenJob Init() { Super.Init(fadein | fadeout); @@ -351,7 +351,7 @@ class SWLoadScreen : ScreenJob { if (fadestate == visible) jobstate = finished; } - + override void Draw(double sr) { Screen.DrawTexture(TexMan.CheckForTexture("TITLE_PIC", TexMan.Type_Any), true, 0, 0, DTA_FullscreenEx, FSMode_ScaleToFit43, DTA_LegacyRenderStyle, STYLE_Normal); diff --git a/wadsrc/static/zscript/gamescreen.zs b/wadsrc/static/zscript/gamescreen.zs index 0703a1771..143f228a0 100644 --- a/wadsrc/static/zscript/gamescreen.zs +++ b/wadsrc/static/zscript/gamescreen.zs @@ -6,12 +6,12 @@ class GameScreen : Object ui { return false; } - + virtual bool Tick(int framenum) { return false; } - + virtual void Draw() { } diff --git a/wadsrc/static/zscript/razebase.zs b/wadsrc/static/zscript/razebase.zs index 9f623c9e1..11c797919 100644 --- a/wadsrc/static/zscript/razebase.zs +++ b/wadsrc/static/zscript/razebase.zs @@ -79,7 +79,7 @@ struct MapRecord native FORCEEOG = 1, USERMAP = 2, } - + native readonly int parTime; native readonly int designerTime; native readonly String fileName; @@ -97,7 +97,7 @@ struct MapRecord native //native readonly String messages[MAX_MESSAGES]; native readonly String author; - + String GetLabelName() { if (flags & USERMAP) return StringTable.Localize("$MNU_USERMAP"); @@ -135,7 +135,7 @@ struct Raze { const kAngleMask = 0x7FF; const BAngToDegree = 360. / 2048.; - + native static Color shadeToLight(int shade); native static String PlayerName(int i); native static int bsin(int angle, int shift = 0); @@ -190,18 +190,18 @@ struct Raze { return gameinfo.gametype & GAMEFLAG_BLOOD; } - + // Dont know yet how to best export this, so for now these are just placeholders as MP is not operational anyway. static int playerPalette(int i) { return 0; } - + static int playerFrags(int i, int j) { return 0; } - + static int playerFraggedSelf(int i) { return 0; @@ -212,7 +212,7 @@ struct Raze // todo: reimplement this in a game independent fashion based on GZDoom's code. // Right now, with no MP support there is no need, though. } - + } /* @@ -228,5 +228,5 @@ class RazeMenuDelegate : MenuDelegateBase native override void PlaySound(name sname); // This is native for security reasons. Having a script call to open the console could be subject to abuse. native override void MenuDismissed(); - + } diff --git a/wadsrc/static/zscript/statusbar.zs b/wadsrc/static/zscript/statusbar.zs index 0abfcc11d..7977b7a55 100644 --- a/wadsrc/static/zscript/statusbar.zs +++ b/wadsrc/static/zscript/statusbar.zs @@ -22,7 +22,7 @@ class RazeStatusBar : StatusBarCore virtual void Init() { } - + virtual void Tick() {} virtual void Reset() {} virtual void UpdateStatusBar(SummaryInfo info) {} @@ -78,7 +78,7 @@ class RazeStatusBar : StatusBarCore y3 = y; String text; - + text = String.Format("%sT: %s%d:%02d", info.letterColor, info.standardColor, stats.time / 60000, (stats.time % 60000) / 1000); drawStatText(info.statFont, 2 * hud_statscale, y3, text, scale); @@ -143,7 +143,7 @@ class RazeStatusBar : StatusBarCore - + double y; if (am_nameontop) { diff --git a/wadsrc/static/zscript/usermapmenu.zs b/wadsrc/static/zscript/usermapmenu.zs index c9b05ac76..17ee2a979 100644 --- a/wadsrc/static/zscript/usermapmenu.zs +++ b/wadsrc/static/zscript/usermapmenu.zs @@ -47,7 +47,7 @@ struct UsermapDirectory native { native readonly String dirname; native readonly UsermapDirectory parent; - + native static UsermapDirectory ReadData(); native int GetNumEntries(); native int GetNumDirectories(); @@ -83,7 +83,7 @@ class UsermapMenu : ListMenu int listboxLeft; int listboxTop; int listboxWidth; - + int listboxRows; int listboxHeight; int listboxRight; @@ -96,9 +96,9 @@ class UsermapMenu : ListMenu bool mEntering; double FontScale; - + int numparent, numdirs, numentries; - + BrokenLines BrokenComment; Array selects; @@ -119,13 +119,13 @@ class UsermapMenu : ListMenu SetSize(); SetWindows(); } - + private void SetWindows() { bool aspect43 = true; int Width43 = screen.GetHeight() * 4 / 3; int Left43 = (screen.GetWidth() - Width43) / 2; - + double wScale = Width43 / 640.; previewLeft = Left43 + int(20 * wScale); @@ -135,7 +135,7 @@ class UsermapMenu : ListMenu FontScale = max(screen.GetHeight() / 480, 1); rowHeight = int(max((NewConsoleFont.GetHeight() + 1) * FontScale, 1)); - + listboxLeft = previewLeft + previewWidth + int(20*wScale); listboxTop = previewTop; listboxWidth = Width43 + Left43 - listboxLeft - int(30 * wScale); @@ -151,7 +151,7 @@ class UsermapMenu : ListMenu commentRows = commentHeight / rowHeight; } - + //============================================================================= // // @@ -163,7 +163,7 @@ class UsermapMenu : ListMenu let framecolor = Color(255, 80, 80, 80); Screen.DrawLineFrame(framecolor, left, top, width, height, screen.GetHeight() / 240); } - + void SetSize() { numparent = (currentDir.parent != null); @@ -182,7 +182,7 @@ class UsermapMenu : ListMenu SetWindows(); DrawFrame(previewLeft, previewTop, previewWidth, previewHeight); screen.Dim(0, 0.6, previewLeft, previewTop, previewWidth, previewHeight); - + if (Selected >= numparent + numdirs) { let entry = currentDir.GetEntry(Selected - numparent - numdirs); @@ -200,12 +200,12 @@ class UsermapMenu : ListMenu screen.DrawText(NewConsoleFont, Font.CR_ORANGE, commentLeft / FontScale, (commentTop + rowHeight * i) / FontScale, BrokenComment.StringAt(i), DTA_VirtualWidthF, screen.GetWidth() / FontScale, DTA_VirtualHeightF, screen.GetHeight() / FontScale, DTA_KeepRatio, true); } - + // Draw file area DrawFrame (listboxLeft, listboxTop, listboxWidth, listboxHeight); screen.Dim(0, 0.6, listboxLeft, listboxTop, listboxWidth, listboxHeight); - + /* if (NumTotalEntries == 0) { @@ -223,7 +223,7 @@ class UsermapMenu : ListMenu { int colr; String texttoprint; - + if (j < numparent) { colr = Font.CR_YELLOW; @@ -252,7 +252,7 @@ class UsermapMenu : ListMenu } screen.SetClipRect(listboxLeft, listboxTop+rowHeight*i, listboxRight, listboxTop+rowHeight*(i+1)); - + if (j == Selected) { screen.Clear (listboxLeft, listboxTop+rowHeight*i, listboxRight, listboxTop+rowHeight*(i+1), Color(255,0,0,255)); @@ -288,7 +288,7 @@ class UsermapMenu : ListMenu UpdateComment(); } } - + //============================================================================= // // @@ -386,7 +386,7 @@ class UsermapMenu : ListMenu StartMap(entry); } return true; - + case MKEY_Back: if (selects.Size() > 0) { @@ -398,7 +398,7 @@ class UsermapMenu : ListMenu return Super.MenuEvent(mkey, fromcontroller); } } - + //============================================================================= // // @@ -431,8 +431,8 @@ class UsermapMenu : ListMenu return Super.MouseEvent(type, x, y); } - - + + //============================================================================= // // @@ -463,6 +463,6 @@ class UsermapMenu : ListMenu return Super.OnUIEvent(ev); } - + }