Allocate rects dynamically

... instead of hard-coding them to 50. New allocated value is
(COLNO*ROWNO)/30, which is slightly higher (56), and that formula
seems to work for hypothetical larger maps too.
This commit is contained in:
Pasi Kallinen
2022-01-05 17:35:30 +02:00
parent 7238622621
commit e5ee580961
3 changed files with 22 additions and 5 deletions

View File

@@ -2171,6 +2171,7 @@ extern boolean create_particular(void);
/* ### rect.c ### */
extern void init_rect(void);
extern void free_rect(void);
extern NhRect *get_rect(NhRect *);
extern NhRect *rnd_rect(void);
extern void remove_rect(NhRect *);