1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-12-25 17:40:36 +00:00

CAP_BITFIELD can be disabled -- this helps with Emscripten

This commit is contained in:
Zeno Rogue 2018-02-10 18:21:46 +01:00
parent 1391a7fe4d
commit 90d477d3dc
2 changed files with 17 additions and 0 deletions

13
hyper.h
View File

@ -65,6 +65,7 @@ extern int cellcount, heptacount;
struct gcell { struct gcell {
#if CAP_BITFIELD
// main fields // main fields
eLand land : 8; eLand land : 8;
eWall wall : 8; eWall wall : 8;
@ -87,6 +88,18 @@ struct gcell {
hitpoints : 4; // hitpoints left (for Palace Guards, also reused as cpid for mirrors) hitpoints : 4; // hitpoints left (for Palace Guards, also reused as cpid for mirrors)
unsigned landflags : 8; // extra flags for land unsigned landflags : 8; // extra flags for land
#else
eLand land;
eWall wall;
eMonster monst;
eItem item;
eLand barleft, barright;
bool ligon;
unsigned char pathdist, cpdist, mpdist;
unsigned char mondir, bardir, stuntime, hitpoints;
unsigned char landflags;
#endif
// 'landparam' is used for: // 'landparam' is used for:
// heat in Icy/Cocytus; // heat in Icy/Cocytus;

View File

@ -226,6 +226,10 @@
#define CAP_ACHIEVE 1 #define CAP_ACHIEVE 1
#endif #endif
#ifndef CAP_BITFIELD
#define CAP_BITFIELD (!ISWEB)
#endif
#ifndef CAP_ACHIEVE #ifndef CAP_ACHIEVE
#define CAP_ACHIEVE 0 #define CAP_ACHIEVE 0
#endif #endif