mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-22 09:39:43 +01:00
Apply suggestions from code review
Co-authored-by: Misa Elizabeth Kai <infoteddy@infoteddy.info>
This commit is contained in:
parent
ed125b1735
commit
f44f89fee2
2 changed files with 17 additions and 18 deletions
|
@ -498,15 +498,15 @@ void Game::deletecustomlevelstats(void)
|
|||
{ \
|
||||
/* We're loading in 32-bit integers. If we need more than 16 chars,
|
||||
* something is seriously wrong */ \
|
||||
char buffer[16]; \
|
||||
size_t start = 0; \
|
||||
size_t i = 0; \
|
||||
\
|
||||
while (next_split_s(buffer, sizeof(buffer), &start, pText, ',')) \
|
||||
{ \
|
||||
DEST.insert(help.Int(buffer)); \
|
||||
++i; \
|
||||
} \
|
||||
char buffer[16]; \
|
||||
size_t start = 0; \
|
||||
size_t i = 0; \
|
||||
\
|
||||
while (next_split_s(buffer, sizeof(buffer), &start, pText, ',')) \
|
||||
{ \
|
||||
DEST.insert(help.Int(buffer)); \
|
||||
++i; \
|
||||
} \
|
||||
}
|
||||
|
||||
#define LOAD_ARRAY_RENAME(ARRAY_NAME, DEST) \
|
||||
|
@ -6000,11 +6000,10 @@ bool Game::customsavequick(const std::string& savfile)
|
|||
|
||||
std::string coincollect;
|
||||
std::set<int>::iterator iterator = obj.coincollect.begin();
|
||||
while (iterator != obj.coincollect.end()) {
|
||||
{
|
||||
coincollect += help.String(*iterator) + ",";
|
||||
iterator++;
|
||||
}
|
||||
while (iterator != obj.coincollect.end())
|
||||
{
|
||||
coincollect += help.String(*iterator) + ",";
|
||||
iterator++;
|
||||
}
|
||||
xml::update_tag(msgs, "coincollect", coincollect.c_str());
|
||||
|
||||
|
|
|
@ -2071,16 +2071,16 @@ void gamerender(void)
|
|||
}
|
||||
|
||||
bool show_coins = game.coins() > 0;
|
||||
#ifndef NO_CUSTOM_LEVELS
|
||||
show_coins = show_coins || (map.custommode && (cl.numcoins() > 0));
|
||||
#endif
|
||||
|
||||
if (show_coins) {
|
||||
if (show_coins)
|
||||
{
|
||||
int color = 255 - help.glow / 2;
|
||||
|
||||
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, 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));
|
||||
|
|
Loading…
Reference in a new issue