support for oriented stairs
This commit is contained in:
parent
9b0c118ae1
commit
5a18050878
2
main.lua
2
main.lua
@ -1,5 +1,5 @@
|
||||
local ffi = require 'ffi'
|
||||
local joysticks
|
||||
local joysticks = {}
|
||||
|
||||
function init_joysticks()
|
||||
joysticks = {}
|
||||
|
||||
@ -6,15 +6,15 @@ CROP=-255,-255:382,382
|
||||
ALL_REGIONS=../midnightmeadow/all_regions.txt
|
||||
|
||||
cat <<EOF > $ALL_REGIONS
|
||||
$HOME/MidnightMeadow/region/r.0.0.mcr
|
||||
$HOME/MidnightMeadow/region/r.-1.-1.mcr
|
||||
$HOME/MidnightMeadow/region/r.0.-1.mcr
|
||||
$HOME/MidnightMeadow/region/r.-1.0.mcr
|
||||
$HOME/sunnyhill/region/r.0.0.mcr
|
||||
$HOME/sunnyhill/region/r.-1.-1.mcr
|
||||
$HOME/sunnyhill/region/r.0.-1.mcr
|
||||
$HOME/sunnyhill/region/r.-1.0.mcr
|
||||
EOF
|
||||
$PYTHON mc.py $HOME/MidnightMeadow/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/MidnightMeadow/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.0.0.mcr ../midnightmeadow/region.0.0 $ALL_REGIONS $CROP &
|
||||
$PYTHON mc.py $HOME/sunnyhill/region/r.-1.-1.mcr ../midnightmeadow/region.-1.-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/sunnyhill/region/r.-1.0.mcr ../midnightmeadow/region.-1.0 $ALL_REGIONS $CROP &
|
||||
|
||||
wait
|
||||
|
||||
|
||||
1620641
minecraft/love2dworld/map.txt
1620641
minecraft/love2dworld/map.txt
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,4 @@
|
||||
/home/bilbo/MidnightMeadow/region/r.0.0.mcr
|
||||
/home/bilbo/MidnightMeadow/region/r.-1.-1.mcr
|
||||
/home/bilbo/MidnightMeadow/region/r.0.-1.mcr
|
||||
/home/bilbo/MidnightMeadow/region/r.-1.0.mcr
|
||||
/home/bilbo/sunnyhill/region/r.0.0.mcr
|
||||
/home/bilbo/sunnyhill/region/r.-1.-1.mcr
|
||||
/home/bilbo/sunnyhill/region/r.0.-1.mcr
|
||||
/home/bilbo/sunnyhill/region/r.-1.0.mcr
|
||||
|
||||
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -35,6 +35,16 @@ vec3 orientation(vec3 position)
|
||||
return vec3(position.x, position.y, -position.z);
|
||||
else // "facing south"
|
||||
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 {
|
||||
return position;
|
||||
}
|
||||
|
||||
11
src/hud.cpp
11
src/hud.cpp
@ -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, " 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)
|
||||
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, "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));
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user