mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-07-27 17:41:49 +03:00
Compare commits
10 Commits
2.4.3
..
be29c31511
| Author | SHA1 | Date | |
|---|---|---|---|
| be29c31511 | |||
| 1099a9ee8e | |||
| 08c3590a0a | |||
| ea811e15bd | |||
| 4b9f26bf81 | |||
| 6ed72297da | |||
| cf66323721 | |||
| b708b8911c | |||
| 30bdb47f80 | |||
| f22ae5fbf5 |
@@ -54,6 +54,7 @@ if(NOT WIN32)
|
||||
elseif(CMAKE_SIZEOF_VOID_P MATCHES "8")
|
||||
set(BIN_LIBROOT "lib64")
|
||||
set(BIN_RPATH "\$ORIGIN/lib64")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--disable-new-dtags")
|
||||
else()
|
||||
set(BIN_LIBROOT "lib")
|
||||
set(BIN_RPATH "\$ORIGIN/lib")
|
||||
|
||||
@@ -1387,6 +1387,10 @@ next:
|
||||
{
|
||||
name.text.push_back(std::string(text));
|
||||
}
|
||||
else
|
||||
{
|
||||
name.text.push_back(std::string(""));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1404,6 +1408,10 @@ next:
|
||||
{
|
||||
name.text.push_back(std::string(text));
|
||||
}
|
||||
else
|
||||
{
|
||||
name.text.push_back(std::string(""));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3175,8 +3175,8 @@ void editorinput(void)
|
||||
ed.old_tilex = ed.tilex;
|
||||
ed.old_tiley = ed.tiley;
|
||||
|
||||
ed.tilex = key.mousex / 8;
|
||||
ed.tiley = key.mousey / 8;
|
||||
ed.tilex = SDL_clamp(key.mousex, 0, SCREEN_WIDTH_PIXELS - 1) / 8;
|
||||
ed.tiley = SDL_clamp(key.mousey, 0, SCREEN_HEIGHT_PIXELS - 1) / 8;
|
||||
|
||||
bool up_pressed = key.isDown(SDLK_UP) || key.isDown(SDL_CONTROLLER_BUTTON_DPAD_UP);
|
||||
bool down_pressed = key.isDown(SDLK_DOWN) || key.isDown(SDL_CONTROLLER_BUTTON_DPAD_DOWN);
|
||||
@@ -3594,7 +3594,6 @@ void editorinput(void)
|
||||
if (game.currentmenuname == Menu::ed_settings)
|
||||
{
|
||||
ed.state = EditorState_DRAW;
|
||||
gameScreen.recacheTextures();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -7800,7 +7800,6 @@ void Game::mapmenuchange(const enum GameGamestate newgamestate, const bool user_
|
||||
gamestate = newgamestate;
|
||||
graphics.resumegamemode = false;
|
||||
mapheld = true;
|
||||
gameScreen.recacheTextures();
|
||||
|
||||
if (prevgamestate == GAMEMODE)
|
||||
{
|
||||
|
||||
@@ -459,6 +459,10 @@ void KeyPoll::Poll(void)
|
||||
break;
|
||||
}
|
||||
|
||||
case SDL_RENDER_TARGETS_RESET:
|
||||
gameScreen.recacheTextures();
|
||||
break;
|
||||
|
||||
/* Window Events */
|
||||
case SDL_WINDOWEVENT:
|
||||
switch (evt.window.event)
|
||||
@@ -496,7 +500,6 @@ void KeyPoll::Poll(void)
|
||||
}
|
||||
}
|
||||
SDL_DisableScreenSaver();
|
||||
gameScreen.recacheTextures();
|
||||
break;
|
||||
case SDL_WINDOWEVENT_FOCUS_LOST:
|
||||
if (!game.disablepause)
|
||||
|
||||
@@ -214,11 +214,11 @@ void mapclass::updateroomnames(void)
|
||||
if (rx == roomname->x && ry == roomname->y && (roomname->flag == -1 || (INBOUNDS_ARR(roomname->flag, obj.flags) && obj.flags[roomname->flag])))
|
||||
{
|
||||
roomname_special = true;
|
||||
if (roomname->type == RoomnameType_STATIC)
|
||||
if (roomname->type == RoomnameType_STATIC && roomname->text.size() >= 1)
|
||||
{
|
||||
setroomname(roomname->text[0].c_str());
|
||||
}
|
||||
if (roomname->type == RoomnameType_GLITCH)
|
||||
if (roomname->type == RoomnameType_GLITCH && roomname->text.size() >= 2)
|
||||
{
|
||||
roomname->delay--;
|
||||
if (roomname->delay <= 0)
|
||||
@@ -232,7 +232,7 @@ void mapclass::updateroomnames(void)
|
||||
}
|
||||
setroomname(roomname->text[roomname->progress].c_str());
|
||||
}
|
||||
if (roomname->type == RoomnameType_TRANSFORM)
|
||||
if (roomname->type == RoomnameType_TRANSFORM && roomname->text.size() >= 1)
|
||||
{
|
||||
roomname->delay--;
|
||||
if (roomname->delay <= 0)
|
||||
|
||||
@@ -134,7 +134,7 @@ public:
|
||||
format.nSamplesPerSec = spec.freq;
|
||||
format.wFormatTag = FAUDIO_FORMAT_PCM;
|
||||
format.wBitsPerSample = SDL_AUDIO_BITSIZE(spec.format);
|
||||
format.nBlockAlign = format.nChannels * format.wBitsPerSample;
|
||||
format.nBlockAlign = format.nChannels * (format.wBitsPerSample / 8);
|
||||
format.nAvgBytesPerSec = format.nSamplesPerSec * format.nBlockAlign;
|
||||
format.cbSize = 0;
|
||||
valid = true;
|
||||
@@ -158,7 +158,7 @@ end:
|
||||
format.wBitsPerSample = sizeof(float) * 8;
|
||||
format.nChannels = vorbis_info.channels;
|
||||
format.nSamplesPerSec = vorbis_info.sample_rate;
|
||||
format.nBlockAlign = format.nChannels * format.wBitsPerSample;
|
||||
format.nBlockAlign = format.nChannels * (format.wBitsPerSample / 8);
|
||||
format.nAvgBytesPerSec = format.nSamplesPerSec * format.nBlockAlign;
|
||||
format.cbSize = 0;
|
||||
|
||||
@@ -210,7 +210,7 @@ end:
|
||||
}
|
||||
FAudioBuffer faudio_buffer = {
|
||||
FAUDIO_END_OF_STREAM, /* Flags */
|
||||
wav_length * 8, /* AudioBytes */
|
||||
wav_length, /* AudioBytes */
|
||||
wav_buffer, /* AudioData */
|
||||
0, /* playbegin */
|
||||
0, /* playlength */
|
||||
@@ -262,7 +262,7 @@ end:
|
||||
format.nSamplesPerSec = audio_rate;
|
||||
format.wFormatTag = FAUDIO_FORMAT_PCM;
|
||||
format.wBitsPerSample = 16;
|
||||
format.nBlockAlign = format.nChannels * format.wBitsPerSample;
|
||||
format.nBlockAlign = format.nChannels * (format.wBitsPerSample / 8);
|
||||
format.nAvgBytesPerSec = format.nSamplesPerSec * format.nBlockAlign;
|
||||
format.cbSize = 0;
|
||||
voice_formats[i] = format;
|
||||
@@ -392,7 +392,7 @@ public:
|
||||
format.wBitsPerSample = sizeof(float) * 8;
|
||||
format.nChannels = vorbis_info.channels;
|
||||
format.nSamplesPerSec = vorbis_info.sample_rate;
|
||||
format.nBlockAlign = format.nChannels * format.wBitsPerSample;
|
||||
format.nBlockAlign = format.nChannels * (format.wBitsPerSample / 8);
|
||||
format.nAvgBytesPerSec = format.nSamplesPerSec * format.nBlockAlign;
|
||||
format.cbSize = 0;
|
||||
|
||||
@@ -731,7 +731,7 @@ musicclass::musicclass(void)
|
||||
|
||||
void musicclass::init(void)
|
||||
{
|
||||
if (FAudioCreate(&faudioctx, 0, FAUDIO_DEFAULT_PROCESSOR))
|
||||
if (FAudioCreate(&faudioctx, FAUDIO_1024_QUANTUM, FAUDIO_DEFAULT_PROCESSOR))
|
||||
{
|
||||
vlog_error("Unable to initialize FAudio");
|
||||
return;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#ifndef RELEASEVERSION_H
|
||||
#define RELEASEVERSION_H
|
||||
|
||||
#define RELEASE_VERSION "v2.4.3"
|
||||
#define RELEASE_VERSION "v2.4.4"
|
||||
|
||||
#endif /* RELEASEVERSION_H */
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
|
||||
#include "Alloc.h"
|
||||
#include "Constants.h"
|
||||
#include "CustomLevels.h"
|
||||
#include "Enums.h"
|
||||
#include "Exit.h"
|
||||
#include "FileSystemUtils.h"
|
||||
#include "Game.h"
|
||||
@@ -14,6 +16,7 @@
|
||||
#include "GraphicsResources.h"
|
||||
#endif
|
||||
#include "InterimVersion.h"
|
||||
#include "Map.h"
|
||||
#include "Render.h"
|
||||
#include "Vlogging.h"
|
||||
|
||||
@@ -152,7 +155,6 @@ void Screen::ResizeScreen(int x, int y)
|
||||
if (!isWindowed || isForcedFullscreen())
|
||||
{
|
||||
int result = SDL_SetWindowFullscreen(m_window, SDL_WINDOW_FULLSCREEN_DESKTOP);
|
||||
recacheTextures();
|
||||
if (result != 0)
|
||||
{
|
||||
vlog_error("Error: could not set the game to fullscreen mode: %s", SDL_GetError());
|
||||
@@ -175,7 +177,6 @@ void Screen::ResizeScreen(int x, int y)
|
||||
SDL_WINDOWPOS_CENTERED_DISPLAY(windowDisplay)
|
||||
);
|
||||
}
|
||||
recacheTextures();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -352,8 +353,6 @@ void Screen::toggleVSync(void)
|
||||
{
|
||||
vsync = !vsync;
|
||||
SDL_RenderSetVSync(m_renderer, (int) vsync);
|
||||
|
||||
recacheTextures();
|
||||
}
|
||||
|
||||
void Screen::recacheTextures(void)
|
||||
@@ -366,15 +365,21 @@ void Screen::recacheTextures(void)
|
||||
graphics.towerbg.tdrawback = true;
|
||||
graphics.titlebg.tdrawback = true;
|
||||
|
||||
if (game.ingame_titlemode)
|
||||
if (game.gamestate == MAPMODE || game.ingame_titlemode)
|
||||
{
|
||||
// Redraw the cached gameplay texture if we're in the in-game menu.
|
||||
// Redraw the cached gameplay texture if we're in the map screen.
|
||||
// Additionally, reset alpha so things don't jitter when re-entering gameplay.
|
||||
float oldAlpha = graphics.alpha;
|
||||
graphics.alpha = 0;
|
||||
gamerender();
|
||||
graphics.alpha = oldAlpha;
|
||||
}
|
||||
|
||||
if (map.custommode)
|
||||
{
|
||||
// If we're in a custom level, regenerate the minimap, which also got cleared.
|
||||
cl.generatecustomminimap();
|
||||
}
|
||||
}
|
||||
|
||||
bool Screen::isForcedFullscreen(void)
|
||||
|
||||
Vendored
+1
-1
Submodule third_party/FAudio updated: 38e9da7264...14f2875e27
Reference in New Issue
Block a user