1
0
mirror of https://github.com/Tha14/toxic.git synced 2025-12-07 03:16:34 +01:00

Refactor game window sizing

- Add large square and rectangle window types
- Remove forced small windows
- Fit game of life to largest possible window type
- Hide cursor in game of life when game is running
This commit is contained in:
jfreegman
2021-06-03 01:19:49 -04:00
parent 5e67571908
commit 4514ecd839
9 changed files with 108 additions and 91 deletions

View File

@@ -33,7 +33,7 @@
#define CENT_MUSHROOMS_POP_CONSTANT 35000
/* Max number of mushrooms */
#define CENT_MUSHROOMS_LENGTH (GAME_MAX_SQUARE_X * GAME_MAX_SQUARE_Y)
#define CENT_MUSHROOMS_LENGTH (GAME_MAX_SQUARE_X_DEFAULT * GAME_MAX_SQUARE_X_DEFAULT)
/* Max number of individual centipedes at any given time */
#define CENT_MAX_NUM_HEADS 20
@@ -1714,6 +1714,7 @@ static int cent_init_state(GameData *game, CentState *state)
int centipede_initialize(GameData *game)
{
// note: If this changes we must update CENT_MUSHROOMS_LENGTH
if (game_set_window_shape(game, GW_ShapeSquare) == -1) {
return -1;
}