1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-12-23 01:59:43 +01:00

Completely remove Graphics::PrintAlpha and Graphics::bprintalpha

Only four deprecated functions remain:
- Graphics::Print
- Graphics::PrintWrap
- Graphics::bigprint
- Graphics::bprint

Graphics::bprint is the least-used one of them, and after that, the
other functions are used a LOT, but it'll be a lot faster to go through
them, since I have less and less flags to worry about. I'll probably
start using Vim macros again like I did for loc::gettext()ing strings,
or maybe I'll automate this completely.
This commit is contained in:
Dav999-v 2023-01-17 18:37:35 +01:00 committed by Misa Elizabeth Kai
parent 9749858365
commit d784f7f61a
3 changed files with 1 additions and 23 deletions

View file

@ -345,15 +345,6 @@ void Graphics::Print( int x, int y, const std::string& text, int r, int g, int b
font::print(0, x, y, text, r, g, b); font::print(0, x, y, text, r, g, b);
} }
void Graphics::PrintAlpha( int x, int y, const std::string& text, int r, int g, int b, int a, bool cen /*= false*/ )
{
// DEPRECATED
if (cen)
font::print(PR_ALPHA(a) | PR_CEN, -1, y, text, r, g, b);
else
font::print(PR_ALPHA(a), x, y, text, r, g, b);
}
int Graphics::PrintWrap( int Graphics::PrintWrap(
const int x, const int x,
int y, int y,
@ -391,15 +382,6 @@ void Graphics::bprint( int x, int y, const std::string& text, int r, int g, int
font::print(PR_BOR, x, y, text, r, g, b); font::print(PR_BOR, x, y, text, r, g, b);
} }
void Graphics::bprintalpha( int x, int y, const std::string& text, int r, int g, int b, int a, bool cen /*= false*/ )
{
// DEPRECATED
if (cen)
font::print(PR_ALPHA(a) | PR_CEN | PR_BOR, -1, y, text, r, g, b);
else
font::print(PR_ALPHA(a) | PR_BOR, x, y, text, r, g, b);
}
void Graphics::printcrewname( int x, int y, int t ) void Graphics::printcrewname( int x, int y, int t )
{ {
//Print the name of crew member t in the right colour //Print the name of crew member t in the right colour

View file

@ -204,14 +204,10 @@ public:
void Print(int _x, int _y, const std::string& _s, int r, int g, int b, bool cen = false); void Print(int _x, int _y, const std::string& _s, int r, int g, int b, bool cen = false);
void PrintAlpha(int _x, int _y, const std::string& _s, int r, int g, int b, int a, bool cen = false);
int PrintWrap(int x, int y, const std::string& s, int r, int g, int b, bool cen = false, int linespacing = -1, int maxwidth = -1); int PrintWrap(int x, int y, const std::string& s, int r, int g, int b, bool cen = false, int linespacing = -1, int maxwidth = -1);
void bprint(int x, int y, const std::string& t, int r, int g, int b, bool cen = false); void bprint(int x, int y, const std::string& t, int r, int g, int b, bool cen = false);
void bprintalpha(int x, int y, const std::string& t, int r, int g, int b, int a, bool cen = false);
void bigprint( int _x, int _y, const std::string& _s, int r, int g, int b, bool cen = false, int sc = 2 ); void bigprint( int _x, int _y, const std::string& _s, int r, int g, int b, bool cen = false, int sc = 2 );
void drawspritesetcol(int x, int y, int t, int c); void drawspritesetcol(int x, int y, int t, int c);

View file

@ -1958,7 +1958,7 @@ void gamerender(void)
if(map.custommode && !map.custommodeforreal && !game.advancetext){ if(map.custommode && !map.custommodeforreal && !game.advancetext){
//Return to level editor //Return to level editor
int alpha = graphics.lerp(ed.oldreturneditoralpha, ed.returneditoralpha); int alpha = graphics.lerp(ed.oldreturneditoralpha, ed.returneditoralpha);
graphics.bprintalpha(5, 5, loc::gettext("[Press ENTER to return to editor]"), 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2), alpha, false); font::print(PR_ALPHA(alpha) | PR_BOR, 5, 5, loc::gettext("[Press ENTER to return to editor]"), 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2));
} }
#endif #endif