mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-07-27 17:41:49 +03:00
Compare commits
3 Commits
cf66323721
...
2.4.4
| Author | SHA1 | Date | |
|---|---|---|---|
| ea811e15bd | |||
| 4b9f26bf81 | |||
| 6ed72297da |
@@ -3175,8 +3175,8 @@ void editorinput(void)
|
|||||||
ed.old_tilex = ed.tilex;
|
ed.old_tilex = ed.tilex;
|
||||||
ed.old_tiley = ed.tiley;
|
ed.old_tiley = ed.tiley;
|
||||||
|
|
||||||
ed.tilex = key.mousex / 8;
|
ed.tilex = SDL_clamp(key.mousex, 0, SCREEN_WIDTH_PIXELS - 1) / 8;
|
||||||
ed.tiley = key.mousey / 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 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);
|
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)
|
if (game.currentmenuname == Menu::ed_settings)
|
||||||
{
|
{
|
||||||
ed.state = EditorState_DRAW;
|
ed.state = EditorState_DRAW;
|
||||||
gameScreen.recacheTextures();
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -7800,7 +7800,6 @@ void Game::mapmenuchange(const enum GameGamestate newgamestate, const bool user_
|
|||||||
gamestate = newgamestate;
|
gamestate = newgamestate;
|
||||||
graphics.resumegamemode = false;
|
graphics.resumegamemode = false;
|
||||||
mapheld = true;
|
mapheld = true;
|
||||||
gameScreen.recacheTextures();
|
|
||||||
|
|
||||||
if (prevgamestate == GAMEMODE)
|
if (prevgamestate == GAMEMODE)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -459,6 +459,10 @@ void KeyPoll::Poll(void)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case SDL_RENDER_TARGETS_RESET:
|
||||||
|
gameScreen.recacheTextures();
|
||||||
|
break;
|
||||||
|
|
||||||
/* Window Events */
|
/* Window Events */
|
||||||
case SDL_WINDOWEVENT:
|
case SDL_WINDOWEVENT:
|
||||||
switch (evt.window.event)
|
switch (evt.window.event)
|
||||||
@@ -496,7 +500,6 @@ void KeyPoll::Poll(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
SDL_DisableScreenSaver();
|
SDL_DisableScreenSaver();
|
||||||
gameScreen.recacheTextures();
|
|
||||||
break;
|
break;
|
||||||
case SDL_WINDOWEVENT_FOCUS_LOST:
|
case SDL_WINDOWEVENT_FOCUS_LOST:
|
||||||
if (!game.disablepause)
|
if (!game.disablepause)
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#ifndef RELEASEVERSION_H
|
#ifndef RELEASEVERSION_H
|
||||||
#define RELEASEVERSION_H
|
#define RELEASEVERSION_H
|
||||||
|
|
||||||
#define RELEASE_VERSION "v2.4.3"
|
#define RELEASE_VERSION "v2.4.4"
|
||||||
|
|
||||||
#endif /* RELEASEVERSION_H */
|
#endif /* RELEASEVERSION_H */
|
||||||
|
|||||||
@@ -5,6 +5,8 @@
|
|||||||
|
|
||||||
#include "Alloc.h"
|
#include "Alloc.h"
|
||||||
#include "Constants.h"
|
#include "Constants.h"
|
||||||
|
#include "CustomLevels.h"
|
||||||
|
#include "Enums.h"
|
||||||
#include "Exit.h"
|
#include "Exit.h"
|
||||||
#include "FileSystemUtils.h"
|
#include "FileSystemUtils.h"
|
||||||
#include "Game.h"
|
#include "Game.h"
|
||||||
@@ -14,6 +16,7 @@
|
|||||||
#include "GraphicsResources.h"
|
#include "GraphicsResources.h"
|
||||||
#endif
|
#endif
|
||||||
#include "InterimVersion.h"
|
#include "InterimVersion.h"
|
||||||
|
#include "Map.h"
|
||||||
#include "Render.h"
|
#include "Render.h"
|
||||||
#include "Vlogging.h"
|
#include "Vlogging.h"
|
||||||
|
|
||||||
@@ -152,7 +155,6 @@ void Screen::ResizeScreen(int x, int y)
|
|||||||
if (!isWindowed || isForcedFullscreen())
|
if (!isWindowed || isForcedFullscreen())
|
||||||
{
|
{
|
||||||
int result = SDL_SetWindowFullscreen(m_window, SDL_WINDOW_FULLSCREEN_DESKTOP);
|
int result = SDL_SetWindowFullscreen(m_window, SDL_WINDOW_FULLSCREEN_DESKTOP);
|
||||||
recacheTextures();
|
|
||||||
if (result != 0)
|
if (result != 0)
|
||||||
{
|
{
|
||||||
vlog_error("Error: could not set the game to fullscreen mode: %s", SDL_GetError());
|
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)
|
SDL_WINDOWPOS_CENTERED_DISPLAY(windowDisplay)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
recacheTextures();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -352,8 +353,6 @@ void Screen::toggleVSync(void)
|
|||||||
{
|
{
|
||||||
vsync = !vsync;
|
vsync = !vsync;
|
||||||
SDL_RenderSetVSync(m_renderer, (int) vsync);
|
SDL_RenderSetVSync(m_renderer, (int) vsync);
|
||||||
|
|
||||||
recacheTextures();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Screen::recacheTextures(void)
|
void Screen::recacheTextures(void)
|
||||||
@@ -366,15 +365,21 @@ void Screen::recacheTextures(void)
|
|||||||
graphics.towerbg.tdrawback = true;
|
graphics.towerbg.tdrawback = true;
|
||||||
graphics.titlebg.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.
|
// Additionally, reset alpha so things don't jitter when re-entering gameplay.
|
||||||
float oldAlpha = graphics.alpha;
|
float oldAlpha = graphics.alpha;
|
||||||
graphics.alpha = 0;
|
graphics.alpha = 0;
|
||||||
gamerender();
|
gamerender();
|
||||||
graphics.alpha = oldAlpha;
|
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)
|
bool Screen::isForcedFullscreen(void)
|
||||||
|
|||||||
Reference in New Issue
Block a user