render3d: terrain tiles for a map with no photograph (Lamar)
The tiles' photograph side is 0 when the map has none: no photograph or coarse photograph sections, no decode, ter_o answers 0, and no coarse photograph texture - as such a map has always drawn. The cut and terrain_tiles_bake no longer require one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
199109f1ae
commit
f02eab5c51
4 changed files with 30 additions and 14 deletions
|
|
@ -28,6 +28,7 @@ function ter_h(render3d_st: mut Render3dState, tx: int, tz: int) -> float {
|
|||
# the photograph's texel (px, pz) as 0xRRGGBB
|
||||
function ter_o(render3d_st: mut Render3dState, px: int, pz: int) -> int {
|
||||
let side = render3d_st.tt_oside
|
||||
if side == 0 { return 0 }
|
||||
let s = tt_slot(render3d_st, (pz / side) * render3d_st.tt_n + (px / side))
|
||||
if s < 0 { return 0 }
|
||||
return render3d_st.tt_o[s * side * side + (pz % side) * side + (px % side)]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue