src/mem.bend source
src/mem.bend on the hub · documented module
import Basetype Info is Data: Info{mask: U32, height: U32, base: U32, posts: U32}type Layout is Data: Layout{texs: List<&2, Info>, flats: List<&2, U32>, size: U32}def cmap() -> U32: 0def zlight() -> U32: 8704def yslope() -> U32: 10752def distscale() -> U32: 10952def pal() -> U32: 11520def texbase() -> U32: 12288def sky() -> U32: 4294967295def rd(a: Array<U32>, +i: U32) -> Array<U32> & U32: Array.get(U32, a, i)def wr(a: Array<U32>, +i: U32, v: U32) -> Array<U32>: Array.set(U32, a, i, v)def fill(xs: List<&2, U32>, a: Array<U32>, +i: U32) -> Array<U32>: match xs: case x <> t: fill(t, Array.set(U32, a, i, x), (i + 1 : U32)) case []: adef depth(+n: U32) -> Nat: Bool.pick(Nat, U32.is_le(n, 1), 0n, 1n+U32.log2((n - 1 : U32)))def ceilclip() -> U32: 0def floorclip() -> U32: 320def nplanes() -> U32: 640def curfloor() -> U32: 641def curceil() -> U32: 642def planehead() -> U32: 1024def spanstart() -> U32: 4096def planetop() -> U32: 16384def planebot() -> U32: 99328def maxplanes() -> U32: 256def ramdepth() -> Nat: 18ndef head(+p: U32, +k: U32) -> U32: (planehead() + p * 8 + k : U32)def top(+p: U32, +x: U32) -> U32: (planetop() + p * 322 + 1 + x : U32)def bot(+p: U32, +x: U32) -> U32: (planebot() + p * 322 + 1 + x : U32)def let(-R: Type, r: Array<U32> & U32, k: Array<U32> -> U32 -> R) -> R: (a, v) = r k(a, v)def lastopening() -> U32: 643def ndrawsegs() -> U32: 644def nvis() -> U32: 645def openings() -> U32: 182272def drawsegs() -> U32: 223232def maxdrawsegs() -> U32: 1024def vissprites() -> U32: 239616def maxvis() -> U32: 256def clipbot() -> U32: 243712def cliptop() -> U32: 244032def negone() -> U32: 244352def vh() -> U32: 168def cy() -> U32: 84def screenh() -> U32: 244672def secseen() -> U32: 245760def visorder() -> U32: 253952def ds(+d: U32, +k: U32) -> U32: (drawsegs() + d * 16 + k : U32)def vs(+s: U32, +k: U32) -> U32: (vissprites() + s * 16 + k : U32)def fuzz() -> U32: 11776def fuzzpos() -> U32: 11830def geokey() -> U32: 11300def geo() -> U32: 646def none() -> U32: 4294967295