Skip to content

Commit

Permalink
player move fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
goblinhack committed Jan 25, 2025
1 parent 3d9d3d5 commit 0b8377a
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
Binary file modified data/gfx.tgz
Binary file not shown.
4 changes: 2 additions & 2 deletions src/level_display.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,8 @@ void level_display(Levelp l)
game_visible_map_mouse_get(game, &visible_map_mouse_x, &visible_map_mouse_y);

for (auto y = l->miny; y < l->maxy; y++) {
for (int z = MAP_Z_DEPTH_FLOOR; z < MAP_Z_DEPTH_CURSOR; z++) {
for (auto x = l->maxx - 1; x >= l->minx; x--) {
for (auto x = l->maxx - 1; x >= l->minx; x--) {
for (int z = 0; z < MAP_Z_DEPTH_CURSOR; z++) {
for (auto slot = 0; slot < MAP_SLOTS; slot++) {
point3d p(x, y, player->at.z);
level_display_slot(l, p, slot, z);
Expand Down
14 changes: 7 additions & 7 deletions src/level_dungeon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ void level_dungeon_create_and_place(Levelp l, int z)
"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
"xx...............x............................................................................xx"
"xx....CCC........x............................................................................xx"
"xx..CCC1C........x............................................................................xx"
"xx.CCCCCC........x............................................................................xx"
"xx....C.C..xxxxxxx............................................................................xx"
"xxxxx.CCC..x.....=............................................................................xx"
"xx..x.C.C........=............................................................................xx"
"xx..x.CCC..x.....=............................................................................xx"
"xx....CC.........x............................................................................xx"
"xx..CCC1.........x............................................................................xx"
"xx.CCCC..........x............................................................................xx"
"xx.........xxxxxxx............................................................................xx"
"xxxxx......x.....=............................................................................xx"
"xx..x............=............................................................................xx"
"xx..x......x.....=............................................................................xx"
"xx..x......x.....=............................................................................xx"
"xx..xx====xx.xxxxx............................................................................xx"
"xx............................................................................................xx"
Expand Down
2 changes: 1 addition & 1 deletion src/my_level.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ typedef struct Level_ {
//
ThingId thing_id[ MAP_WIDTH ][ MAP_HEIGHT ][ MAP_DEPTH ][ MAP_SLOTS ];
//
// All thing structure memory.
// All things structure memory.
//
Thing thing_body[ 1 << THING_COMMON_ID_BITS ];
//
Expand Down
2 changes: 1 addition & 1 deletion src/thing_move.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ void thing_push(Levelp l, Thingp t)
{
TRACE_NO_INDENT();

point3d p(t->pix_at.x / TILE_WIDTH, t->pix_at.y / TILE_HEIGHT, t->at.z);
point3d p(t->at.x, t->at.y, t->at.z);

if (level_is_oob(l, p)) {
return;
Expand Down

0 comments on commit 0b8377a

Please sign in to comment.