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

Apply suggestions from code review

Co-authored-by: Misa Elizabeth Kai <infoteddy@infoteddy.info>
This commit is contained in:
Nyako 2024-10-01 10:51:38 -03:00 committed by GitHub
parent ed125b1735
commit f44f89fee2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 17 additions and 18 deletions

View file

@ -498,15 +498,15 @@ void Game::deletecustomlevelstats(void)
{ \ { \
/* We're loading in 32-bit integers. If we need more than 16 chars, /* We're loading in 32-bit integers. If we need more than 16 chars,
* something is seriously wrong */ \ * something is seriously wrong */ \
char buffer[16]; \ char buffer[16]; \
size_t start = 0; \ size_t start = 0; \
size_t i = 0; \ size_t i = 0; \
\ \
while (next_split_s(buffer, sizeof(buffer), &start, pText, ',')) \ while (next_split_s(buffer, sizeof(buffer), &start, pText, ',')) \
{ \ { \
DEST.insert(help.Int(buffer)); \ DEST.insert(help.Int(buffer)); \
++i; \ ++i; \
} \ } \
} }
#define LOAD_ARRAY_RENAME(ARRAY_NAME, DEST) \ #define LOAD_ARRAY_RENAME(ARRAY_NAME, DEST) \
@ -6000,11 +6000,10 @@ bool Game::customsavequick(const std::string& savfile)
std::string coincollect; std::string coincollect;
std::set<int>::iterator iterator = obj.coincollect.begin(); std::set<int>::iterator iterator = obj.coincollect.begin();
while (iterator != obj.coincollect.end()) { while (iterator != obj.coincollect.end())
{ {
coincollect += help.String(*iterator) + ","; coincollect += help.String(*iterator) + ",";
iterator++; iterator++;
}
} }
xml::update_tag(msgs, "coincollect", coincollect.c_str()); xml::update_tag(msgs, "coincollect", coincollect.c_str());

View file

@ -2071,16 +2071,16 @@ void gamerender(void)
} }
bool show_coins = game.coins() > 0; bool show_coins = game.coins() > 0;
#ifndef NO_CUSTOM_LEVELS
show_coins = show_coins || (map.custommode && (cl.numcoins() > 0)); show_coins = show_coins || (map.custommode && (cl.numcoins() > 0));
#endif
if (show_coins) { if (show_coins)
{
int color = 255 - help.glow / 2; int color = 255 - help.glow / 2;
font::print(PR_BOR | PR_RIGHT, 304, 231, help.String(game.coins()), color, color, 196); font::print(PR_BOR | PR_RIGHT, 304, 231, help.String(game.coins()), color, color, 196);
if (!graphics.notextoutline) { if (!graphics.notextoutline)
{
graphics.draw_grid_tile(graphics.grphx.im_tiles_white, 48, 310, 230, 8, 8, graphics.getRGB(0, 0, 0)); graphics.draw_grid_tile(graphics.grphx.im_tiles_white, 48, 310, 230, 8, 8, graphics.getRGB(0, 0, 0));
graphics.draw_grid_tile(graphics.grphx.im_tiles_white, 48, 312, 230, 8, 8, graphics.getRGB(0, 0, 0)); graphics.draw_grid_tile(graphics.grphx.im_tiles_white, 48, 312, 230, 8, 8, graphics.getRGB(0, 0, 0));
graphics.draw_grid_tile(graphics.grphx.im_tiles_white, 48, 311, 229, 8, 8, graphics.getRGB(0, 0, 0)); graphics.draw_grid_tile(graphics.grphx.im_tiles_white, 48, 311, 229, 8, 8, graphics.getRGB(0, 0, 0));