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

Remove x-position from setactivityposition

After discussing with Ally and Dav, we came to the agreement that this
is basically useless since the prompt will always be centered and take
up most of the horizontal space of the screen.

And the x-position was only added as an offset because at some point,
there was a missing space from the side of the "- Press ENTER to
Teleport -" prompt, and the offset was there so people could mimic the
prompt accordingly. But that was fixed at some point, so it's useless
now.
This commit is contained in:
Misa 2023-02-17 20:38:05 -08:00
parent 3d5ba95b96
commit acca4747f7
9 changed files with 8 additions and 20 deletions

View file

@ -28,7 +28,6 @@ void blockclass::clear(void)
g = 0; g = 0;
b = 0; b = 0;
activity_x = 0;
activity_y = 0; activity_y = 0;
/* std::strings get initialized automatically, but this is /* std::strings get initialized automatically, but this is

View file

@ -22,7 +22,7 @@ public:
int xp, yp, wp, hp; int xp, yp, wp, hp;
std::string script, prompt; std::string script, prompt;
int r, g, b; int r, g, b;
int activity_x, activity_y; int activity_y;
uint32_t print_flags; uint32_t print_flags;
}; };

View file

@ -84,7 +84,6 @@ void entityclass::init(void)
customenemy = 0; customenemy = 0;
customwarpmode = false; customwarpmodevon = false; customwarpmodehon = false; customwarpmode = false; customwarpmodevon = false; customwarpmodehon = false;
customactivitycolour = ""; customactivitycolour = "";
customactivitypositionx = -1;
customactivitypositiony = -1; customactivitypositiony = -1;
customactivitytext = ""; customactivitytext = "";
trophytext = 0; trophytext = 0;
@ -1102,16 +1101,13 @@ void entityclass::createblock( int t, int xp, int yp, int w, int h, int trig /*=
customactivitycolour = ""; customactivitycolour = "";
} }
if (customactivitypositionx != -1) if (customactivitypositiony != -1)
{ {
block.activity_x = customactivitypositionx;
block.activity_y = customactivitypositiony; block.activity_y = customactivitypositiony;
customactivitypositionx = -1;
customactivitypositiony = -1; customactivitypositiony = -1;
} }
else else
{ {
block.activity_x = 0;
block.activity_y = 0; block.activity_y = 0;
} }

View file

@ -199,7 +199,6 @@ public:
bool customcrewmoods[Game::numcrew]; bool customcrewmoods[Game::numcrew];
std::string customactivitycolour; std::string customactivitycolour;
std::string customactivitytext; std::string customactivitytext;
int customactivitypositionx;
int customactivitypositiony; int customactivitypositiony;
}; };

View file

@ -225,7 +225,6 @@ void Game::init(void)
activity_r = 0; activity_r = 0;
activity_g = 0; activity_g = 0;
activity_b = 0; activity_b = 0;
activity_x = 0;
activity_y = 0; activity_y = 0;
creditposition = 0; creditposition = 0;
oldcreditposition = 0; oldcreditposition = 0;

View file

@ -430,7 +430,7 @@ public:
bool activetele; bool activetele;
int readytotele; int readytotele;
int oldreadytotele; int oldreadytotele;
int activity_r, activity_g, activity_b, activity_x, activity_y; int activity_r, activity_g, activity_b, activity_y;
std::string activity_lastprompt; std::string activity_lastprompt;
uint32_t activity_print_flags; uint32_t activity_print_flags;

View file

@ -1431,7 +1431,6 @@ void gamelogic(void)
game.activity_r = obj.blocks[game.activeactivity].r; game.activity_r = obj.blocks[game.activeactivity].r;
game.activity_g = obj.blocks[game.activeactivity].g; game.activity_g = obj.blocks[game.activeactivity].g;
game.activity_b = obj.blocks[game.activeactivity].b; game.activity_b = obj.blocks[game.activeactivity].b;
game.activity_x = obj.blocks[game.activeactivity].activity_x;
game.activity_y = obj.blocks[game.activeactivity].activity_y; game.activity_y = obj.blocks[game.activeactivity].activity_y;
} }

View file

@ -2222,13 +2222,11 @@ void gamerender(void)
game.activity_lastprompt.c_str() game.activity_lastprompt.c_str()
); );
int centered_x = ((160 ) - ((font::len(game.activity_print_flags, final_string)) / 2));
if (game.activity_r == 0 && game.activity_g == 0 && game.activity_b == 0) if (game.activity_r == 0 && game.activity_g == 0 && game.activity_b == 0)
{ {
font::print( font::print(
game.activity_print_flags | PR_BRIGHTNESS(act_alpha*255), game.activity_print_flags | PR_BRIGHTNESS(act_alpha*255) | PR_CEN,
centered_x + game.activity_x, -1,
game.activity_y + 12, game.activity_y + 12,
final_string, final_string,
196, 196,
@ -2239,7 +2237,7 @@ void gamerender(void)
else else
{ {
graphics.drawpixeltextbox( graphics.drawpixeltextbox(
game.activity_x + 4, 4,
game.activity_y + 4, game.activity_y + 4,
39*8, 39*8,
16 + font::height(game.activity_print_flags), 16 + font::height(game.activity_print_flags),
@ -2248,8 +2246,8 @@ void gamerender(void)
game.activity_b*act_alpha game.activity_b*act_alpha
); );
font::print( font::print(
game.activity_print_flags | PR_BRIGHTNESS(act_alpha*255) | PR_CJK_LOW, game.activity_print_flags | PR_BRIGHTNESS(act_alpha*255) | PR_CJK_LOW | PR_CEN,
centered_x + game.activity_x, -1,
game.activity_y + 12, game.activity_y + 12,
final_string, final_string,
game.activity_r, game.activity_r,

View file

@ -1709,7 +1709,6 @@ void scriptclass::run(void)
} }
else if (words[0] == "setactivityposition") else if (words[0] == "setactivityposition")
{ {
obj.customactivitypositionx = ss_toi(words[1]);
obj.customactivitypositiony = ss_toi(words[2]); obj.customactivitypositiony = ss_toi(words[2]);
} }
else if (words[0] == "createrescuedcrew") else if (words[0] == "createrescuedcrew")
@ -3280,7 +3279,6 @@ void scriptclass::hardreset(void)
obj.customactivitycolour = ""; obj.customactivitycolour = "";
obj.customactivitytext = ""; obj.customactivitytext = "";
obj.customactivitypositionx = -1;
obj.customactivitypositiony = -1; obj.customactivitypositiony = -1;
} }