- [NEW] Nova debug info: flags
- [NEW] Só de caminar i botar funcionant - [NEW] Só de enemics rebotant - [NEW] Menus amb só (MOC MOC!) - [FIX] El so de caminar ja no continua durant el menu ingame
This commit is contained in:
@@ -32,7 +32,6 @@ namespace actor
|
||||
bool floating_editing = false;
|
||||
|
||||
int walk_channel = -1;
|
||||
int falling_sound = -1;
|
||||
|
||||
void resetTag()
|
||||
{
|
||||
@@ -858,9 +857,6 @@ namespace actor
|
||||
{
|
||||
act->react_mask = 0; // desactivem la guarda (react_mask=0)
|
||||
act->flags |= FLAG_GRAVITY; // i reactivem el flag de gravetat
|
||||
|
||||
if (falling_sound!=-1) { audio::stopChannel(falling_sound); falling_sound = -1; }
|
||||
falling_sound = audio::playSound("snd_fall.wav", SOUND_ALL, -1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -868,7 +864,7 @@ namespace actor
|
||||
if (moving)
|
||||
{
|
||||
act->flags |= FLAG_ANIMATED;
|
||||
if (act->react_mask==0 && !(act->flags&FLAG_GRAVITY)) audio::resumeChannel(walk_channel);
|
||||
if (act->react_mask==0 && ( (act->below) || (act->pos.z==0) )) audio::resumeChannel(walk_channel);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -886,6 +882,7 @@ namespace actor
|
||||
|
||||
void changeMoving(actor_t *act)
|
||||
{
|
||||
audio::playSound("snd_push.wav", SOUND_BASIC);
|
||||
switch (act->movement)
|
||||
{
|
||||
case MOV_X:
|
||||
@@ -1260,8 +1257,6 @@ namespace actor
|
||||
// Si estic sobre el piso, no faig res
|
||||
if (act->pos.z == 0)
|
||||
{
|
||||
if (act->flags&FLAG_HERO && falling_sound!=-1) { audio::stopChannel(falling_sound); falling_sound = -1; }
|
||||
|
||||
if ((act->flags & FLAG_MOVING) && (act->movement == MOV_Z))
|
||||
changeMoving(act);
|
||||
act->push &= ~PUSH_ZN;
|
||||
@@ -1302,7 +1297,6 @@ namespace actor
|
||||
// Si sí que hi ha...
|
||||
if (below)
|
||||
{
|
||||
if (act->flags&FLAG_HERO && falling_sound!=-1) { audio::stopChannel(falling_sound); falling_sound = -1; }
|
||||
// ...el asociem...
|
||||
act->below = below;
|
||||
below->above = act;
|
||||
@@ -1496,6 +1490,13 @@ namespace actor
|
||||
draw::swapcol(1, room::getColor(0)); // Tornem al color per defecte
|
||||
}
|
||||
}
|
||||
if ((act->flags & FLAG_HERO) && debug::isEnabled(DEBUG_ACTOR_FLAGS))
|
||||
{
|
||||
char tmp[100];
|
||||
draw::print(SDL_itoa(act->flags, tmp, 2), 1, 1, LIGHT + WHITE, BLACK);
|
||||
draw::swapcol(1, room::getColor(0)); // Tornem al color per defecte
|
||||
}
|
||||
|
||||
if (draw_all && act->next)
|
||||
draw(act->next);
|
||||
}
|
||||
@@ -1671,6 +1672,11 @@ namespace actor
|
||||
{
|
||||
return floating_editing;
|
||||
}
|
||||
void pauseWalkSound()
|
||||
{
|
||||
audio::pauseChannel(walk_channel);
|
||||
}
|
||||
|
||||
namespace templates
|
||||
{
|
||||
std::vector<actor_t> templates;
|
||||
|
||||
Reference in New Issue
Block a user