|
|
@ -12,6 +12,13 @@ draw_player (_player * player)
|
|
|
|
dest;
|
|
|
|
dest;
|
|
|
|
int i;
|
|
|
|
int i;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ((player->pos.x >> 8) < 0 || (player->pos.x >> 8) > bman.fieldsize.x ||
|
|
|
|
|
|
|
|
(player->pos.y >> 8) < 0 || (player->pos.y >> 8) > bman.fieldsize.y) {
|
|
|
|
|
|
|
|
d_fatal ("Draw Player out of range : [%d,%d]\n", (player->pos.x >> 8),
|
|
|
|
|
|
|
|
(player->pos.y >> 8));
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (PS_IS_alife (player->state)) {
|
|
|
|
if (PS_IS_alife (player->state)) {
|
|
|
|
/* player is alife */
|
|
|
|
/* player is alife */
|
|
|
|
dest.w = src.w = player->gfx->size.x;
|
|
|
|
dest.w = src.w = player->gfx->size.x;
|
|
|
@ -78,8 +85,16 @@ restore_players_screen ()
|
|
|
|
y,
|
|
|
|
y,
|
|
|
|
ys,
|
|
|
|
ys,
|
|
|
|
ye;
|
|
|
|
ye;
|
|
|
|
|
|
|
|
|
|
|
|
for (i = 0; i < MAX_PLAYERS; i++)
|
|
|
|
for (i = 0; i < MAX_PLAYERS; i++)
|
|
|
|
if ((PS_IS_used (bman.players[i].state)) && bman.players[i].old.x != -1) {
|
|
|
|
if ((PS_IS_used (bman.players[i].state)) && bman.players[i].old.x != -1) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ((bman.players[i].old.x >> 8) < 0 || (bman.players[i].old.x >> 8) > bman.fieldsize.x
|
|
|
|
|
|
|
|
|| (bman.players[i].old.y >> 8) < 0
|
|
|
|
|
|
|
|
|| (bman.players[i].old.y >> 8) > bman.fieldsize.y)
|
|
|
|
|
|
|
|
d_fatal ("Restore Player out of range : playernr %d [%d,%d]\n", i,
|
|
|
|
|
|
|
|
(bman.players[i].old.x >> 8), (bman.players[i].old.y >> 8));
|
|
|
|
|
|
|
|
else {
|
|
|
|
if ((bman.players[i].old.x & 0xFF) > 128) {
|
|
|
|
if ((bman.players[i].old.x & 0xFF) > 128) {
|
|
|
|
x = (bman.players[i].old.x >> 8);
|
|
|
|
x = (bman.players[i].old.x >> 8);
|
|
|
|
xe = (bman.players[i].old.x >> 8) + 2;
|
|
|
|
xe = (bman.players[i].old.x >> 8) + 2;
|
|
|
@ -105,6 +120,7 @@ restore_players_screen ()
|
|
|
|
gfx_AddUpdateRect (xs * gfx.block.x + gfx.offset.x, ys * gfx.block.y + gfx.offset.y,
|
|
|
|
gfx_AddUpdateRect (xs * gfx.block.x + gfx.offset.x, ys * gfx.block.y + gfx.offset.y,
|
|
|
|
gfx.block.x * 3, gfx.block.y * 3);
|
|
|
|
gfx.block.x * 3, gfx.block.y * 3);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|