- Treballant en el prólogo

This commit is contained in:
2024-10-07 20:07:03 +02:00
parent 304f636a95
commit 77cdf90c99
30 changed files with 3942 additions and 7 deletions

View File

@@ -820,10 +820,13 @@ namespace actor
// act->pos.z -= height;
}
}
actor::actor_t *future_below = any_below_me(act);
// if ((input::keyDown(SDL_SCANCODE_SPACE) || input::keyDown(config::getKey(KEY_JUMP))) &&
if ((controller::down(KEY_JUMP)) &&
(hero::getSkills() & SKILL_SHOES) && (act->pos.y + act->size.y) <= max.y && act->pos.y >= min.y && (act->pos.x + act->size.x) <= max.x && act->pos.x >= min.x && act->react_mask == 0 && ((act->pos.z == 0 && room::getFloor() != 11) || (act->below || future_below)))
if ((controller::down(KEY_JUMP)) && ((hero::getSkills() & SKILL_SHOES) || actor::hero::isPrologo())
&& (act->pos.y + act->size.y) <= max.y && act->pos.y >= min.y && (act->pos.x + act->size.x) <= max.x && act->pos.x >= min.x && act->react_mask == 0 && ((act->pos.z == 0 && room::getFloor() != 11) || (act->below || future_below)))
{
audio::pauseChannel(walk_channel);
audio::playSound("snd_jump.wav", SOUND_BASIC);
@@ -1913,10 +1916,29 @@ namespace actor
vec3_t first_pos = {0, 0, 0};
int first_orient = 0;
bool dead = false;
bool prologo = false;
void setPrologo()
{
prologo = true;
}
const bool isPrologo()
{
return prologo;
}
void init(const bool complete)
{
actor::actor_t *hero = actor::create("HERO", {16, 32, 0}, {6, 6, 12}, "test.gif", {0, 32, 20, 32}, {-6, 38});
actor::actor_t *hero = nullptr;
if (prologo)
{
hero = actor::create("HERO", {16, 32, 0}, {6, 6, 8}, "gat.gif", {0, 0, 24, 28}, {-4, 32});
}
else
{
hero = actor::create("HERO", {16, 32, 0}, {6, 6, 12}, "test.gif", {0, 32, 20, 32}, {-6, 38});
}
hero->flags = FLAG_HERO | FLAG_PUSHABLE | FLAG_GRAVITY | FLAG_ORIENTABLE | FLAG_ANIMATED;
actor::setDirty(hero, true);
@@ -1928,6 +1950,7 @@ namespace actor
stats::reset();
lives = 8;
skills = SKILL_NONE;
if (prologo) skills &= SKILL_SHOES;
parts = PART_NONE;
for (int i = 0; i < 10; ++i)
anbernics[i] = false;