support for oriented stairs

This commit is contained in:
Zack Buhman 2026-03-23 12:27:26 -05:00
parent 9b0c118ae1
commit 5a18050878
11 changed files with 837272 additions and 836819 deletions

View File

@ -1,5 +1,5 @@
local ffi = require 'ffi' local ffi = require 'ffi'
local joysticks local joysticks = {}
function init_joysticks() function init_joysticks()
joysticks = {} joysticks = {}

View File

@ -6,15 +6,15 @@ CROP=-255,-255:382,382
ALL_REGIONS=../midnightmeadow/all_regions.txt ALL_REGIONS=../midnightmeadow/all_regions.txt
cat <<EOF > $ALL_REGIONS cat <<EOF > $ALL_REGIONS
$HOME/MidnightMeadow/region/r.0.0.mcr $HOME/sunnyhill/region/r.0.0.mcr
$HOME/MidnightMeadow/region/r.-1.-1.mcr $HOME/sunnyhill/region/r.-1.-1.mcr
$HOME/MidnightMeadow/region/r.0.-1.mcr $HOME/sunnyhill/region/r.0.-1.mcr
$HOME/MidnightMeadow/region/r.-1.0.mcr $HOME/sunnyhill/region/r.-1.0.mcr
EOF EOF
$PYTHON mc.py $HOME/MidnightMeadow/region/r.0.0.mcr ../midnightmeadow/region.0.0 $ALL_REGIONS $CROP & $PYTHON mc.py $HOME/sunnyhill/region/r.0.0.mcr ../midnightmeadow/region.0.0 $ALL_REGIONS $CROP &
$PYTHON mc.py $HOME/MidnightMeadow/region/r.-1.-1.mcr ../midnightmeadow/region.-1.-1 $ALL_REGIONS $CROP & $PYTHON mc.py $HOME/sunnyhill/region/r.-1.-1.mcr ../midnightmeadow/region.-1.-1 $ALL_REGIONS $CROP &
$PYTHON mc.py $HOME/MidnightMeadow/region/r.0.-1.mcr ../midnightmeadow/region.0.-1 $ALL_REGIONS $CROP & $PYTHON mc.py $HOME/sunnyhill/region/r.0.-1.mcr ../midnightmeadow/region.0.-1 $ALL_REGIONS $CROP &
$PYTHON mc.py $HOME/MidnightMeadow/region/r.-1.0.mcr ../midnightmeadow/region.-1.0 $ALL_REGIONS $CROP & $PYTHON mc.py $HOME/sunnyhill/region/r.-1.0.mcr ../midnightmeadow/region.-1.0 $ALL_REGIONS $CROP &
wait wait

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
/home/bilbo/MidnightMeadow/region/r.0.0.mcr /home/bilbo/sunnyhill/region/r.0.0.mcr
/home/bilbo/MidnightMeadow/region/r.-1.-1.mcr /home/bilbo/sunnyhill/region/r.-1.-1.mcr
/home/bilbo/MidnightMeadow/region/r.0.-1.mcr /home/bilbo/sunnyhill/region/r.0.-1.mcr
/home/bilbo/MidnightMeadow/region/r.-1.0.mcr /home/bilbo/sunnyhill/region/r.-1.0.mcr

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -35,6 +35,16 @@ vec3 orientation(vec3 position)
return vec3(position.x, position.y, -position.z); return vec3(position.x, position.y, -position.z);
else // "facing south" else // "facing south"
return position; return position;
} else if (Special == 2) { // oriented stair
if (Data == 0) {
return vec3(-position.x, position.y, position.z);
} else if (Data == 2) { //
return vec3(position.z, position.y, -position.x);
} else if (Data == 3) { //
return vec3(-position.z, position.y, position.x);
} else {
return position;
}
} else { } else {
return position; return position;
} }

View File

@ -109,6 +109,12 @@ namespace hud {
font::bitmap::draw_string(ter_best, " look: left stick", 10, y); y += ter_best.desc->glyph_height; font::bitmap::draw_string(ter_best, " look: left stick", 10, y); y += ter_best.desc->glyph_height;
font::bitmap::draw_string(ter_best, " warp: a", 10, y); y += ter_best.desc->glyph_height; font::bitmap::draw_string(ter_best, " warp: a", 10, y); y += ter_best.desc->glyph_height;
font::bitmap::draw_string(ter_best, "mouse:", 10, y); y += ter_best.desc->glyph_height;
y = draw_vector(ter_best, buf, y, " position", XMLoadFloat4((XMFLOAT4*)mouse_position));
y = draw_vector(ter_best, buf, y, " block", XMLoadFloat4((XMFLOAT4*)mouse_block));
if (frame++ > 60 * 10) if (frame++ > 60 * 10)
return; return;
@ -138,11 +144,6 @@ namespace hud {
y = draw_label<float>(ter_best, buf, 10, y, "pitch: ", "%.4f", view::state.pitch); y = draw_label<float>(ter_best, buf, 10, y, "pitch: ", "%.4f", view::state.pitch);
y = draw_label<float>(ter_best, buf, 10, y, "frame_rate_avg: ", "%.2f", 1.0f / update_average(current_time - last_frame_time)); y = draw_label<float>(ter_best, buf, 10, y, "frame_rate_avg: ", "%.2f", 1.0f / update_average(current_time - last_frame_time));
font::bitmap::draw_string(ter_best, "mouse:", 10, y); y += ter_best.desc->glyph_height;
y = draw_vector(ter_best, buf, y, " position", XMLoadFloat4((XMFLOAT4*)mouse_position));
y = draw_vector(ter_best, buf, y, " block", XMLoadFloat4((XMFLOAT4*)mouse_block));
*/ */
} }
} }