mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-30 09:54:10 +03:00
Move from surfaces to the SDL render system
Ever since VVVVVV was initially ported to C++ in 2.0, it has used surfaces from SDL. The downside is, that's all software rendering. This commit moves most things off of surfaces, and all into GPU, by using textures and SDL_Renderer. Pixel-perfect collision has been kept by keeping a copy of sprites as surfaces. There's plans for pixel-perfect collision to use masks instead of reading pixel data directly, but that's out of scope for this commit. - `graphics.reloadresources()` is now called later in `main`, because textures cannot be created without a renderer. - This commit also removes a bunch of surface functions which are no longer needed. - This also recaches target textures in certain places for d3d9. - graphics.images was converted to a fixed-size array. - fillbox and fillboxabs use SDL_RenderDrawRect instead of drawing an outline using four filled rectangles - Update my name in the credits
This commit is contained in:
committed by
Misa Elizabeth Kai
parent
556e3a110a
commit
19b2a317f1
@@ -3,6 +3,7 @@
|
||||
#include "Constants.h"
|
||||
#include "Game.h"
|
||||
#include "Graphics.h"
|
||||
#include "GraphicsUtil.h"
|
||||
#include "KeyPoll.h"
|
||||
#include "Localization.h"
|
||||
#include "LocalizationMaint.h"
|
||||
@@ -54,7 +55,9 @@ namespace roomname_translator
|
||||
fullscreen_rect.y = 0;
|
||||
fullscreen_rect.w = 320;
|
||||
fullscreen_rect.h = 240;
|
||||
SDL_BlitSurface(dimbuffer, NULL, graphics.backBuffer, &fullscreen_rect);
|
||||
graphics.set_blendmode(SDL_BLENDMODE_BLEND);
|
||||
graphics.fill_rect(0, 0, 0, 96);
|
||||
graphics.set_blendmode(SDL_BLENDMODE_NONE);
|
||||
if (help_screen)
|
||||
{
|
||||
graphics.bprint(0, 0, "=== Room name translation mode help ===", 255,255,255);
|
||||
|
||||
Reference in New Issue
Block a user