Skip to content
Myr

Merge branch 'master' of https://github.com/guitarfreak/stb into working

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Sean Barrett · committed by Sean Barrett · parents 0c1232f, 6a29bcf · Browse files · 1 file+12 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+12 added−3 removed

  • other:+12 added−3 removed

1 file+12 added−3 removed

modified:stb_voxel_render.h+12 added-3 removed
2898 unmodified lines
2899 unsigned char mesh = mm->default_mesh;29002901 if (mm->input.selector)2902 mesh = mm->input.selector[v_off];2903 else if (mm->input.block_selector)2904 mesh = mm->input.block_selector[mm->input.blocktype[v_off]];29032905 2906 // check if we're going off the end2907 if (mm->output_cur[mesh][0] + mm->output_size[mesh][0]*6 > mm->output_end[mesh][0]) {2908 mm->full = 1;2909 return;
200 unmodified lines
31103111 mesh = mm->default_mesh;3112 if (mm->input.selector)3113 mesh = mm->input.selector[v_off];3114 else if (mm->input.block_selector)3115 mesh = mm->input.block_selector[bt];31123116 3117 if (geo <= STBVOX_GEOM_ceil_slope_north_is_bottom) {3118 // this is the simple case, we can just use regular block gen with special vmesh calculated with vheight3119 stbvox_mesh_vertex basevert;3120 stbvox_mesh_vertex vmesh[6][4];
12 unmodified lines
31333134 basevert = stbvox_vertex_encode(pos.x, pos.y, pos.z << STBVOX_CONFIG_PRECISION_Z, 0,0);3135 if (mm->input.selector) {3136 mesh = mm->input.selector[v_off];3133 }3137 } else if (mm->input.block_selector)3138 mesh = mm->input.block_selector[bt];313931403141 // check if we're going off the end3142 if (mm->output_cur[mesh][0] + mm->output_size[mesh][0]*6 > mm->output_end[mesh][0]) {3143 mm->full = 1;3144 return;
210 unmodified lines
3355 if (mm->input.selector) {3356 mesh = mm->input.selector[v_off];3357 simple_rot = mesh >> 4;3358 mesh &= 15;3359 } 3360 if (mm->input.block_selector) {3361 mesh = mm->input.block_selector[bt];3362 }33633364 // check if we're going off the end3365 if (mm->output_cur[mesh][0] + mm->output_size[mesh][0]*4 > mm->output_end[mesh][0]) {
436 unmodified lines