1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-30 15:39:54 +00:00

using arrays for items and kills

This commit is contained in:
Zeno Rogue 2018-01-25 17:20:41 +01:00
parent 65cac5073f
commit ed82d5bae9
2 changed files with 8 additions and 2 deletions

View File

@ -96,7 +96,10 @@ extern void DEBT(const char *buf);
bool eq(short a, short b) { return a==b; } bool eq(short a, short b) { return a==b; }
// game state // game state
int items[ittypes], kills[motypes], explore[10], exploreland[10][landtypes], landcount[landtypes]; array<int, ittypes> items;
array<int, motypes> kills;
int explore[10], exploreland[10][landtypes], landcount[landtypes];
map<modecode_t, array<int, ittypes> > hiitems; map<modecode_t, array<int, ittypes> > hiitems;
bool orbused[ittypes], lastorbused[ittypes]; bool orbused[ittypes], lastorbused[ittypes];
bool playermoved = true; // center on the PC? bool playermoved = true; // center on the PC?

View File

@ -884,7 +884,10 @@ bool isAlchAny(cell *c);
extern cellwalker cwt; // player character position extern cellwalker cwt; // player character position
extern int sval; extern int sval;
extern int items[ittypes], kills[motypes], explore[10], exploreland[10][landtypes], landcount[landtypes]; extern array<int, ittypes> items;
extern array<int, motypes> kills;
extern int explore[10], exploreland[10][landtypes], landcount[landtypes];
typedef int modecode_t; typedef int modecode_t;
extern map<modecode_t, array<int, ittypes> > hiitems; extern map<modecode_t, array<int, ittypes> > hiitems;