Removed all objectives tweak, replaced with No Doors. Tweaks to item and pushblock mirroring. Other minor mission tweak fixes.
This commit is contained in:
parent
1ad4746a27
commit
24f677236a
|
@ -440,7 +440,7 @@ enum
|
|||
};
|
||||
|
||||
#define PLUS_NONE 0
|
||||
#define PLUS_ALL_OBJS (2 << 0)
|
||||
#define PLUS_NO_DOORS (2 << 0)
|
||||
#define PLUS_STRONGER (2 << 1)
|
||||
#define PLUS_RANDOM (2 << 2)
|
||||
#define PLUS_KILL_ALL (2 << 3)
|
||||
|
|
|
@ -247,6 +247,11 @@ static void load(cJSON *root)
|
|||
{
|
||||
i->collected = cJSON_GetObjectItem(root, "collected")->valueint;
|
||||
}
|
||||
|
||||
if (game.plus & PLUS_MIRROR)
|
||||
{
|
||||
i->startX = MAP_PIXEL_WIDTH - i->startX;
|
||||
}
|
||||
}
|
||||
|
||||
static void save(cJSON *root)
|
||||
|
|
|
@ -77,7 +77,7 @@ static void init(void)
|
|||
s->closedY = s->y;
|
||||
}
|
||||
|
||||
if (game.plus & PLUS_ALL_OBJS)
|
||||
if (game.plus & PLUS_NO_DOORS)
|
||||
{
|
||||
s->alive = ALIVE_DEAD;
|
||||
}
|
||||
|
|
|
@ -28,3 +28,4 @@ extern void playBattleSound(int snd, int ch, int x, int y);
|
|||
extern int rrnd(int low, int high);
|
||||
|
||||
extern Entity *self;
|
||||
extern Game game;
|
||||
|
|
|
@ -664,6 +664,7 @@ static void cancel(void)
|
|||
hideAllWidgets();
|
||||
showing = SHOW_NONE;
|
||||
selectedMission = NULL;
|
||||
doPlusSettings = 0;
|
||||
app.keyboard[SDL_SCANCODE_ESCAPE] = 0;
|
||||
}
|
||||
|
||||
|
@ -671,9 +672,9 @@ static void startMissionPlus(void)
|
|||
{
|
||||
game.plus = 0;
|
||||
|
||||
if (getWidget("allObjectives", "missionPlus")->value[0])
|
||||
if (getWidget("noDoors", "missionPlus")->value[0])
|
||||
{
|
||||
game.plus |= PLUS_ALL_OBJS;
|
||||
game.plus |= PLUS_NO_DOORS;
|
||||
}
|
||||
|
||||
if (getWidget("randomEnemies", "missionPlus")->value[0])
|
||||
|
|
|
@ -1146,6 +1146,7 @@ static int drawComparator(const void *a, const void *b)
|
|||
static void mirror(void)
|
||||
{
|
||||
Structure *s;
|
||||
Item *i;
|
||||
|
||||
if (self->flags & EF_MIRROR)
|
||||
{
|
||||
|
@ -1174,6 +1175,21 @@ static void mirror(void)
|
|||
s->tx -= self->w;
|
||||
break;
|
||||
|
||||
case ET_PUSHBLOCK:
|
||||
s = (Structure*)self;
|
||||
if (s->x != s->startX)
|
||||
{
|
||||
s->startX = s->x;
|
||||
s->startX -= self->w;
|
||||
}
|
||||
break;
|
||||
|
||||
case ET_ITEM:
|
||||
case ET_KEY:
|
||||
i = (Item*)self;
|
||||
i->startX -= self->w;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -52,10 +52,10 @@ void initObjectives(void)
|
|||
}
|
||||
}
|
||||
|
||||
if (world.isReturnVisit || game.plus & PLUS_ALL_OBJS)
|
||||
if (world.isReturnVisit)
|
||||
{
|
||||
o->targetValue = o->totalValue;
|
||||
o->required = game.plus & PLUS_ALL_OBJS;
|
||||
o->required = game.isComplete;
|
||||
}
|
||||
|
||||
if ((strcmp(o->targetName, "ENEMY") == 0 && o->targetValue == o->totalValue) || game.plus & PLUS_KILL_ALL)
|
||||
|
|
Loading…
Reference in New Issue