New ramp types
Build Dusk / run-tests (push) Failing after 5m33s
Build Dusk / build-linux (push) Successful in 5m3s
Build Dusk / build-psp (push) Successful in 1m17s
Build Dusk / build-knulli (push) Successful in 4m45s
Build Dusk / build-gamecube (push) Successful in 3m49s
Build Dusk / build-gamecube-iso (push) Successful in 3m50s
Build Dusk / build-wii (push) Successful in 3m29s
Build Dusk / build-wii-iso (push) Successful in 4m4s

This commit is contained in:
2026-07-01 16:05:02 -05:00
parent a2d0a12c1a
commit 874c6258ab
10 changed files with 168 additions and 28 deletions
+36 -10
View File
@@ -97,22 +97,35 @@ void entityWalk(entity_t *entity, const entitydir_t direction) {
(
// Can only walk UP the direction the ramp faces.
(direction+TILE_SHAPE_RAMP_NORTH) == tileCurrent ||
// If diagonal ramp, can go up one of two ways only.
// If diagonal ramp, can go up one of two ways only. Inner ramps
// share the same allowed directions as their outer counterparts.
(
(
tileCurrent == TILE_SHAPE_RAMP_SOUTHEAST &&
(
tileCurrent == TILE_SHAPE_RAMP_SOUTHEAST ||
tileCurrent == TILE_SHAPE_RAMP_SOUTHEAST_INNER
) &&
(direction == ENTITY_DIR_SOUTH || direction == ENTITY_DIR_EAST)
) ||
(
tileCurrent == TILE_SHAPE_RAMP_SOUTHWEST &&
(
tileCurrent == TILE_SHAPE_RAMP_SOUTHWEST ||
tileCurrent == TILE_SHAPE_RAMP_SOUTHWEST_INNER
) &&
(direction == ENTITY_DIR_SOUTH || direction == ENTITY_DIR_WEST)
) ||
(
tileCurrent == TILE_SHAPE_RAMP_NORTHEAST &&
(
tileCurrent == TILE_SHAPE_RAMP_NORTHEAST ||
tileCurrent == TILE_SHAPE_RAMP_NORTHEAST_INNER
) &&
(direction == ENTITY_DIR_NORTH || direction == ENTITY_DIR_EAST)
) ||
(
tileCurrent == TILE_SHAPE_RAMP_NORTHWEST &&
(
tileCurrent == TILE_SHAPE_RAMP_NORTHWEST ||
tileCurrent == TILE_SHAPE_RAMP_NORTHWEST_INNER
) &&
(direction == ENTITY_DIR_NORTH || direction == ENTITY_DIR_WEST)
)
)
@@ -141,22 +154,35 @@ void entityWalk(entity_t *entity, const entitydir_t direction) {
(
// This handles regular cardinal ramps
(entityDirGetOpposite(direction)+TILE_SHAPE_RAMP_NORTH) == tileBelow ||
// This handles diagonal ramps
// This handles diagonal ramps. Inner ramps share the same
// allowed directions as their outer counterparts.
(
(
tileBelow == TILE_SHAPE_RAMP_SOUTHEAST &&
(
tileBelow == TILE_SHAPE_RAMP_SOUTHEAST ||
tileBelow == TILE_SHAPE_RAMP_SOUTHEAST_INNER
) &&
(direction == ENTITY_DIR_NORTH || direction == ENTITY_DIR_WEST)
) ||
(
tileBelow == TILE_SHAPE_RAMP_SOUTHWEST &&
(
tileBelow == TILE_SHAPE_RAMP_SOUTHWEST ||
tileBelow == TILE_SHAPE_RAMP_SOUTHWEST_INNER
) &&
(direction == ENTITY_DIR_NORTH || direction == ENTITY_DIR_EAST)
) ||
(
tileBelow == TILE_SHAPE_RAMP_NORTHEAST &&
(
tileBelow == TILE_SHAPE_RAMP_NORTHEAST ||
tileBelow == TILE_SHAPE_RAMP_NORTHEAST_INNER
) &&
(direction == ENTITY_DIR_SOUTH || direction == ENTITY_DIR_WEST)
) ||
(
tileBelow == TILE_SHAPE_RAMP_NORTHWEST &&
(
tileBelow == TILE_SHAPE_RAMP_NORTHWEST ||
tileBelow == TILE_SHAPE_RAMP_NORTHWEST_INNER
) &&
(direction == ENTITY_DIR_SOUTH || direction == ENTITY_DIR_EAST)
)
)
+4
View File
@@ -27,6 +27,10 @@ bool_t tileIsRamp(const tile_t tile) {
case TILE_SHAPE_RAMP_NORTHWEST:
case TILE_SHAPE_RAMP_SOUTHEAST:
case TILE_SHAPE_RAMP_SOUTHWEST:
case TILE_SHAPE_RAMP_NORTHEAST_INNER:
case TILE_SHAPE_RAMP_NORTHWEST_INNER:
case TILE_SHAPE_RAMP_SOUTHEAST_INNER:
case TILE_SHAPE_RAMP_SOUTHWEST_INNER:
return true;
default:
+5 -1
View File
@@ -21,7 +21,11 @@ typedef enum {
TILE_SHAPE_RAMP_NORTHWEST = 7,
TILE_SHAPE_RAMP_SOUTHEAST = 8,
TILE_SHAPE_RAMP_SOUTHWEST = 9,
TILE_SHAPE_RAMP_NORTHEAST_INNER = 10,
TILE_SHAPE_RAMP_NORTHWEST_INNER = 11,
TILE_SHAPE_RAMP_SOUTHEAST_INNER = 12,
TILE_SHAPE_RAMP_SOUTHWEST_INNER = 13,
TILE_SHAPE_COUNT
} tile_t;