├── .gitattributes ├── .github └── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md ├── .gitignore ├── CONTRIBUTING.md ├── LICENSE ├── Makefile ├── README.md ├── TODO.md ├── build.sh ├── extras ├── cavecube.desktop ├── docs │ ├── default config.txt │ ├── formats │ │ ├── ccm model.txt │ │ ├── database.txt │ │ ├── server list.txt │ │ └── world saves.txt │ ├── gamepad config.txt │ ├── palette.png │ └── palette_sat.png ├── emscr_shell.html └── icon │ ├── hicolor │ ├── 128x128 │ │ └── apps │ │ │ └── cavecube.png │ ├── 256x256 │ │ └── apps │ │ │ └── cavecube.png │ ├── 512x512 │ │ └── apps │ │ │ └── cavecube.png │ └── 64x64 │ │ └── apps │ │ └── cavecube.png │ └── icon.ico ├── gen.mk ├── mkrelease.sh ├── quickbuild.sh ├── resources ├── base │ ├── engine │ │ └── shaders │ │ │ ├── GLSL │ │ │ ├── fragment │ │ │ │ ├── 2d.glsl │ │ │ │ ├── block.glsl │ │ │ │ ├── framebuffer.glsl │ │ │ │ ├── text.glsl │ │ │ │ └── ui.glsl │ │ │ └── vertex │ │ │ │ ├── 2d.glsl │ │ │ │ ├── block.glsl │ │ │ │ ├── framebuffer.glsl │ │ │ │ ├── text.glsl │ │ │ │ └── ui.glsl │ │ │ └── headers │ │ │ ├── OpenGL ES.glsl │ │ │ └── OpenGL.glsl │ ├── game │ │ ├── data │ │ │ └── blocks │ │ │ │ ├── 0 │ │ │ │ ├── 0.inf │ │ │ │ └── block.inf │ │ │ │ ├── 1 │ │ │ │ ├── 0.inf │ │ │ │ ├── 1.inf │ │ │ │ ├── 2.inf │ │ │ │ ├── 3.inf │ │ │ │ └── block.inf │ │ │ │ ├── 2 │ │ │ │ ├── 0.inf │ │ │ │ └── block.inf │ │ │ │ ├── 3 │ │ │ │ ├── 0.inf │ │ │ │ └── block.inf │ │ │ │ ├── 4 │ │ │ │ ├── 0.inf │ │ │ │ └── block.inf │ │ │ │ ├── 5 │ │ │ │ ├── 0.inf │ │ │ │ └── block.inf │ │ │ │ ├── 6 │ │ │ │ ├── 0.inf │ │ │ │ └── block.inf │ │ │ │ ├── 7 │ │ │ │ ├── 0.inf │ │ │ │ └── block.inf │ │ │ │ ├── 8 │ │ │ │ ├── 0.inf │ │ │ │ ├── 1.inf │ │ │ │ ├── 10.inf │ │ │ │ ├── 11.inf │ │ │ │ ├── 12.inf │ │ │ │ ├── 13.inf │ │ │ │ ├── 14.inf │ │ │ │ ├── 15.inf │ │ │ │ ├── 2.inf │ │ │ │ ├── 3.inf │ │ │ │ ├── 4.inf │ │ │ │ ├── 5.inf │ │ │ │ ├── 6.inf │ │ │ │ ├── 7.inf │ │ │ │ ├── 8.inf │ │ │ │ ├── 9.inf │ │ │ │ └── block.inf │ │ │ │ ├── 9 │ │ │ │ ├── 0.inf │ │ │ │ └── block.inf │ │ │ │ ├── 10 │ │ │ │ ├── 0.inf │ │ │ │ └── block.inf │ │ │ │ ├── 11 │ │ │ │ ├── 0.inf │ │ │ │ └── block.inf │ │ │ │ ├── 12 │ │ │ │ ├── 0.inf │ │ │ │ └── block.inf │ │ │ │ ├── 13 │ │ │ │ ├── 0.inf │ │ │ │ └── block.inf │ │ │ │ ├── 14 │ │ │ │ ├── 0.inf │ │ │ │ ├── 1.inf │ │ │ │ └── block.inf │ │ │ │ ├── 15 │ │ │ │ ├── 0.inf │ │ │ │ ├── 1.inf │ │ │ │ ├── 2.inf │ │ │ │ ├── 3.inf │ │ │ │ ├── 4.inf │ │ │ │ ├── 5.inf │ │ │ │ ├── 6.inf │ │ │ │ └── block.inf │ │ │ │ ├── 16 │ │ │ │ ├── 0.inf │ │ │ │ └── block.inf │ │ │ │ ├── 17 │ │ │ │ ├── 0.inf │ │ │ │ ├── 1.inf │ │ │ │ └── block.inf │ │ │ │ ├── 18 │ │ │ │ ├── 0.inf │ │ │ │ ├── 1.inf │ │ │ │ ├── 2.inf │ │ │ │ └── block.inf │ │ │ │ └── 19 │ │ │ │ ├── 0.inf │ │ │ │ └── block.inf │ │ ├── scripts │ │ │ └── blocks │ │ │ │ ├── bookshelf.script │ │ │ │ ├── furnace.script │ │ │ │ ├── lamp.script │ │ │ │ └── workbench.script │ │ ├── sounds │ │ │ ├── block │ │ │ │ └── default │ │ │ │ │ └── placeholder │ │ │ ├── disc │ │ │ │ ├── 00.ogg │ │ │ │ ├── 01.ogg │ │ │ │ ├── 02.ogg │ │ │ │ ├── 03.ogg │ │ │ │ ├── 04.ogg │ │ │ │ ├── 05.ogg │ │ │ │ ├── 06.ogg │ │ │ │ └── 07.ogg │ │ │ ├── note │ │ │ │ ├── bass.ogg │ │ │ │ ├── brass.ogg │ │ │ │ ├── choir.ogg │ │ │ │ ├── grit.ogg │ │ │ │ ├── kick.ogg │ │ │ │ ├── pad.ogg │ │ │ │ ├── piano.ogg │ │ │ │ ├── sawsynth.ogg │ │ │ │ ├── sine.ogg │ │ │ │ ├── square.ogg │ │ │ │ └── synth.ogg │ │ │ └── ui │ │ │ │ ├── click.ogg │ │ │ │ └── tick.ogg │ │ └── textures │ │ │ ├── blocks │ │ │ ├── 1 │ │ │ │ ├── 0 │ │ │ │ │ └── 0.png │ │ │ │ ├── 1 │ │ │ │ │ └── 0.png │ │ │ │ ├── 2 │ │ │ │ │ └── 0.png │ │ │ │ └── 3 │ │ │ │ │ └── 0.png │ │ │ ├── 2 │ │ │ │ └── 0 │ │ │ │ │ ├── 0.png │ │ │ │ │ ├── 1.png │ │ │ │ │ └── 2.png │ │ │ ├── 3 │ │ │ │ └── 0 │ │ │ │ │ ├── 0.png │ │ │ │ │ ├── 1.png │ │ │ │ │ └── 2.png │ │ │ ├── 4 │ │ │ │ └── 0 │ │ │ │ │ ├── 0.png │ │ │ │ │ ├── 1.png │ │ │ │ │ ├── 2.png │ │ │ │ │ ├── 3.png │ │ │ │ │ ├── 4.png │ │ │ │ │ └── 5.png │ │ │ ├── 5 │ │ │ │ └── 0 │ │ │ │ │ └── 0.png │ │ │ ├── 6 │ │ │ │ └── 0 │ │ │ │ │ └── 0.png │ │ │ ├── 7 │ │ │ │ └── 0 │ │ │ │ │ ├── 0.png │ │ │ │ │ ├── 1.png │ │ │ │ │ ├── 2.png │ │ │ │ │ ├── 3.png │ │ │ │ │ ├── 4.png │ │ │ │ │ ├── 5.png │ │ │ │ │ ├── 6.png │ │ │ │ │ └── 7.png │ │ │ ├── 8 │ │ │ │ ├── 0 │ │ │ │ │ └── 0.png │ │ │ │ ├── 1 │ │ │ │ │ └── 0.png │ │ │ │ ├── 2 │ │ │ │ │ └── 0.png │ │ │ │ ├── 3 │ │ │ │ │ └── 0.png │ │ │ │ ├── 4 │ │ │ │ │ └── 0.png │ │ │ │ ├── 5 │ │ │ │ │ └── 0.png │ │ │ │ ├── 6 │ │ │ │ │ └── 0.png │ │ │ │ ├── 7 │ │ │ │ │ └── 0.png │ │ │ │ ├── 8 │ │ │ │ │ └── 0.png │ │ │ │ ├── 9 │ │ │ │ │ └── 0.png │ │ │ │ ├── 10 │ │ │ │ │ └── 0.png │ │ │ │ ├── 11 │ │ │ │ │ └── 0.png │ │ │ │ ├── 12 │ │ │ │ │ └── 0.png │ │ │ │ ├── 13 │ │ │ │ │ └── 0.png │ │ │ │ ├── 14 │ │ │ │ │ └── 0.png │ │ │ │ └── 15 │ │ │ │ │ └── 0.png │ │ │ ├── 9 │ │ │ │ └── 0 │ │ │ │ │ ├── 0.png │ │ │ │ │ ├── 1.png │ │ │ │ │ ├── 2.png │ │ │ │ │ ├── 3.png │ │ │ │ │ ├── 4.png │ │ │ │ │ └── 5.png │ │ │ ├── 10 │ │ │ │ └── 0 │ │ │ │ │ └── 0.png │ │ │ ├── 11 │ │ │ │ └── 0 │ │ │ │ │ └── 0.png │ │ │ ├── 12 │ │ │ │ └── 0 │ │ │ │ │ └── 0.png │ │ │ ├── 13 │ │ │ │ └── 0 │ │ │ │ │ ├── 0.png │ │ │ │ │ ├── 1.png │ │ │ │ │ ├── 2.png │ │ │ │ │ ├── 3.png │ │ │ │ │ ├── 4.png │ │ │ │ │ └── 5.png │ │ │ ├── 14 │ │ │ │ ├── 0 │ │ │ │ │ └── 0.png │ │ │ │ └── 1 │ │ │ │ │ └── 0.png │ │ │ ├── 15 │ │ │ │ ├── 0 │ │ │ │ │ └── 0.png │ │ │ │ ├── 1 │ │ │ │ │ └── 0.png │ │ │ │ ├── 2 │ │ │ │ │ └── 0.png │ │ │ │ ├── 3 │ │ │ │ │ └── 0.png │ │ │ │ ├── 4 │ │ │ │ │ └── 0.png │ │ │ │ ├── 5 │ │ │ │ │ └── 0.png │ │ │ │ └── 6 │ │ │ │ │ └── 0.png │ │ │ ├── 16 │ │ │ │ └── 0 │ │ │ │ │ ├── 0.png │ │ │ │ │ ├── 1.png │ │ │ │ │ ├── 2.png │ │ │ │ │ ├── 3.png │ │ │ │ │ └── 4.png │ │ │ ├── 17 │ │ │ │ ├── 0 │ │ │ │ │ ├── 0.png │ │ │ │ │ └── 1.png │ │ │ │ └── 1 │ │ │ │ │ ├── 0.png │ │ │ │ │ ├── 1.png │ │ │ │ │ ├── 2.png │ │ │ │ │ ├── 3.png │ │ │ │ │ └── 4.png │ │ │ ├── 18 │ │ │ │ ├── 0 │ │ │ │ │ └── 0.png │ │ │ │ ├── 1 │ │ │ │ │ └── 0.png │ │ │ │ └── 2 │ │ │ │ │ └── 0.png │ │ │ ├── 19 │ │ │ │ └── 0 │ │ │ │ │ ├── 0.png │ │ │ │ │ ├── 1.png │ │ │ │ │ ├── 2.png │ │ │ │ │ ├── 3.png │ │ │ │ │ ├── 4.png │ │ │ │ │ ├── 5.png │ │ │ │ │ ├── 6.png │ │ │ │ │ └── 7.png │ │ │ └── debug │ │ │ │ ├── 0 │ │ │ │ ├── 0.png │ │ │ │ ├── 1.png │ │ │ │ ├── 2.png │ │ │ │ ├── 3.png │ │ │ │ ├── 4.png │ │ │ │ └── 5.png │ │ │ │ └── 1 │ │ │ │ ├── 0.png │ │ │ │ ├── 1.png │ │ │ │ ├── 2.png │ │ │ │ ├── 3.png │ │ │ │ ├── 4.png │ │ │ │ └── 5.png │ │ │ ├── common │ │ │ └── missing.png │ │ │ └── ui │ │ │ ├── borders │ │ │ ├── black │ │ │ │ ├── b.png │ │ │ │ ├── bl.png │ │ │ │ ├── br.png │ │ │ │ ├── l.png │ │ │ │ ├── r.png │ │ │ │ ├── t.png │ │ │ │ ├── tl.png │ │ │ │ └── tr.png │ │ │ ├── doubleraised │ │ │ │ ├── b.png │ │ │ │ ├── bl.png │ │ │ │ ├── br.png │ │ │ │ ├── l.png │ │ │ │ ├── r.png │ │ │ │ ├── t.png │ │ │ │ ├── tl.png │ │ │ │ └── tr.png │ │ │ ├── doublesunken │ │ │ │ ├── b.png │ │ │ │ ├── bl.png │ │ │ │ ├── br.png │ │ │ │ ├── l.png │ │ │ │ ├── r.png │ │ │ │ ├── t.png │ │ │ │ ├── tl.png │ │ │ │ └── tr.png │ │ │ ├── grey │ │ │ │ ├── b.png │ │ │ │ ├── bl.png │ │ │ │ ├── br.png │ │ │ │ ├── l.png │ │ │ │ ├── r.png │ │ │ │ ├── t.png │ │ │ │ ├── tl.png │ │ │ │ └── tr.png │ │ │ ├── raised │ │ │ │ ├── b.png │ │ │ │ ├── bl.png │ │ │ │ ├── br.png │ │ │ │ ├── l.png │ │ │ │ ├── r.png │ │ │ │ ├── t.png │ │ │ │ ├── tl.png │ │ │ │ └── tr.png │ │ │ ├── sunken │ │ │ │ ├── b.png │ │ │ │ ├── bl.png │ │ │ │ ├── br.png │ │ │ │ ├── l.png │ │ │ │ ├── r.png │ │ │ │ ├── t.png │ │ │ │ ├── tl.png │ │ │ │ └── tr.png │ │ │ └── white │ │ │ │ ├── b.png │ │ │ │ ├── bl.png │ │ │ │ ├── br.png │ │ │ │ ├── l.png │ │ │ │ ├── r.png │ │ │ │ ├── t.png │ │ │ │ ├── tl.png │ │ │ │ └── tr.png │ │ │ ├── charset.png │ │ │ ├── crosshair.png │ │ │ └── elements │ │ │ ├── box │ │ │ └── bg.png │ │ │ ├── button │ │ │ └── bg.png │ │ │ ├── checkbox │ │ │ └── bg.png │ │ │ ├── hotbar │ │ │ ├── bar │ │ │ │ ├── l.png │ │ │ │ └── r.png │ │ │ └── selector.png │ │ │ ├── itemgrid │ │ │ ├── border.png │ │ │ ├── hover.png │ │ │ └── normal.png │ │ │ ├── progressbar │ │ │ ├── bar.png │ │ │ └── bg.png │ │ │ ├── radio │ │ │ └── bg.png │ │ │ ├── scrollbar │ │ │ └── arrow.png │ │ │ ├── slider │ │ │ └── bar │ │ │ │ ├── l.png │ │ │ │ ├── m.png │ │ │ │ └── r.png │ │ │ ├── textbox │ │ │ └── bg.png │ │ │ └── toggle │ │ │ └── bg.png │ └── info.inf ├── ntsc │ ├── engine │ │ └── shaders │ │ │ └── code │ │ │ └── GLSL │ │ │ └── framebuffer │ │ │ └── fragment.glsl │ └── info.inf └── ps1 │ ├── engine │ └── shaders │ │ └── code │ │ └── GLSL │ │ ├── block │ │ ├── fragment.glsl │ │ └── vertex.glsl │ │ └── framebuffer │ │ └── fragment.glsl │ └── info.inf ├── src ├── common │ ├── blocks.c │ ├── blocks.h │ ├── chunk.c │ ├── chunk.h │ ├── collision.c │ ├── collision.h │ ├── common.c │ ├── common.h │ ├── config.c │ ├── config.h │ ├── endian.h │ ├── glue.h │ ├── noise.c │ ├── noise.h │ ├── resource.c │ ├── resource.h │ ├── stb_image.c │ └── stb_image.h ├── game │ ├── game.c │ ├── game.h │ ├── input.c │ └── input.h ├── graphics │ ├── cglm │ │ ├── affine-mat.h │ │ ├── affine-post.h │ │ ├── affine-pre.h │ │ ├── affine.h │ │ ├── affine2d.h │ │ ├── applesimd.h │ │ ├── bezier.h │ │ ├── box.h │ │ ├── call.h │ │ ├── call │ │ │ ├── affine.h │ │ │ ├── affine2d.h │ │ │ ├── bezier.h │ │ │ ├── box.h │ │ │ ├── cam.h │ │ │ ├── clipspace │ │ │ │ ├── ortho_lh_no.h │ │ │ │ ├── ortho_lh_zo.h │ │ │ │ ├── ortho_rh_no.h │ │ │ │ ├── ortho_rh_zo.h │ │ │ │ ├── persp_lh_no.h │ │ │ │ ├── persp_lh_zo.h │ │ │ │ ├── persp_rh_no.h │ │ │ │ ├── persp_rh_zo.h │ │ │ │ ├── project_no.h │ │ │ │ ├── project_zo.h │ │ │ │ ├── view_lh_no.h │ │ │ │ ├── view_lh_zo.h │ │ │ │ ├── view_rh_no.h │ │ │ │ └── view_rh_zo.h │ │ │ ├── curve.h │ │ │ ├── ease.h │ │ │ ├── euler.h │ │ │ ├── frustum.h │ │ │ ├── io.h │ │ │ ├── ivec2.h │ │ │ ├── ivec3.h │ │ │ ├── ivec4.h │ │ │ ├── mat2.h │ │ │ ├── mat3.h │ │ │ ├── mat4.h │ │ │ ├── plane.h │ │ │ ├── project.h │ │ │ ├── quat.h │ │ │ ├── ray.h │ │ │ ├── sphere.h │ │ │ ├── vec2.h │ │ │ ├── vec3.h │ │ │ └── vec4.h │ │ ├── cam.h │ │ ├── cglm.h │ │ ├── clipspace │ │ │ ├── ortho_lh_no.h │ │ │ ├── ortho_lh_zo.h │ │ │ ├── ortho_rh_no.h │ │ │ ├── ortho_rh_zo.h │ │ │ ├── persp.h │ │ │ ├── persp_lh_no.h │ │ │ ├── persp_lh_zo.h │ │ │ ├── persp_rh_no.h │ │ │ ├── persp_rh_zo.h │ │ │ ├── project_no.h │ │ │ ├── project_zo.h │ │ │ ├── view_lh.h │ │ │ ├── view_lh_no.h │ │ │ ├── view_lh_zo.h │ │ │ ├── view_rh.h │ │ │ ├── view_rh_no.h │ │ │ └── view_rh_zo.h │ │ ├── color.h │ │ ├── common.h │ │ ├── curve.h │ │ ├── ease.h │ │ ├── euler.h │ │ ├── frustum.h │ │ ├── io.h │ │ ├── ivec2.h │ │ ├── ivec3.h │ │ ├── ivec4.h │ │ ├── mat2.h │ │ ├── mat3.h │ │ ├── mat4.h │ │ ├── plane.h │ │ ├── project.h │ │ ├── quat.h │ │ ├── ray.h │ │ ├── simd │ │ │ ├── arm.h │ │ │ ├── avx │ │ │ │ ├── affine.h │ │ │ │ └── mat4.h │ │ │ ├── intrin.h │ │ │ ├── neon │ │ │ │ ├── affine.h │ │ │ │ ├── mat2.h │ │ │ │ ├── mat4.h │ │ │ │ └── quat.h │ │ │ ├── sse2 │ │ │ │ ├── affine.h │ │ │ │ ├── mat2.h │ │ │ │ ├── mat3.h │ │ │ │ ├── mat4.h │ │ │ │ └── quat.h │ │ │ ├── wasm.h │ │ │ ├── wasm │ │ │ │ ├── affine.h │ │ │ │ ├── mat2.h │ │ │ │ ├── mat3.h │ │ │ │ ├── mat4.h │ │ │ │ └── quat.h │ │ │ └── x86.h │ │ ├── sphere.h │ │ ├── struct.h │ │ ├── struct │ │ │ ├── affine-post.h │ │ │ ├── affine-pre.h │ │ │ ├── affine.h │ │ │ ├── affine2d.h │ │ │ ├── box.h │ │ │ ├── cam.h │ │ │ ├── clipspace │ │ │ │ ├── ortho_lh_no.h │ │ │ │ ├── ortho_lh_zo.h │ │ │ │ ├── ortho_rh_no.h │ │ │ │ ├── ortho_rh_zo.h │ │ │ │ ├── persp_lh_no.h │ │ │ │ ├── persp_lh_zo.h │ │ │ │ ├── persp_rh_no.h │ │ │ │ ├── persp_rh_zo.h │ │ │ │ ├── project_no.h │ │ │ │ ├── project_zo.h │ │ │ │ ├── view_lh_no.h │ │ │ │ ├── view_lh_zo.h │ │ │ │ ├── view_rh_no.h │ │ │ │ └── view_rh_zo.h │ │ │ ├── color.h │ │ │ ├── curve.h │ │ │ ├── euler.h │ │ │ ├── frustum.h │ │ │ ├── io.h │ │ │ ├── mat2.h │ │ │ ├── mat3.h │ │ │ ├── mat4.h │ │ │ ├── plane.h │ │ │ ├── project.h │ │ │ ├── quat.h │ │ │ ├── sphere.h │ │ │ ├── vec2-ext.h │ │ │ ├── vec2.h │ │ │ ├── vec3-ext.h │ │ │ ├── vec3.h │ │ │ ├── vec4-ext.h │ │ │ └── vec4.h │ │ ├── types-struct.h │ │ ├── types.h │ │ ├── util.h │ │ ├── vec2-ext.h │ │ ├── vec2.h │ │ ├── vec3-ext.h │ │ ├── vec3.h │ │ ├── vec4-ext.h │ │ ├── vec4.h │ │ └── version.h │ ├── glad.c │ ├── glad.h │ ├── khrplatform.h │ ├── renderer.c │ ├── renderer.h │ ├── ui.c │ └── ui.h ├── main │ ├── main.c │ ├── main.h │ ├── toolbox.c │ ├── toolbox.h │ ├── version.h │ └── version.rc ├── server │ ├── ccscript.c │ ├── ccscript.h │ ├── chunkpool.c │ ├── chunkpool.h │ ├── network.c │ ├── network.h │ ├── save.c │ ├── save.h │ ├── server.c │ ├── server.h │ ├── worldgen.c │ └── worldgen.h ├── zip │ ├── LICENSE │ ├── miniz.h │ ├── zip.c │ └── zip.h └── zlib │ ├── LICENSE │ ├── README │ ├── adler32.c │ ├── compress.c │ ├── crc32.c │ ├── crc32.h │ ├── deflate.c │ ├── deflate.h │ ├── gzclose.c │ ├── gzguts.h │ ├── gzlib.c │ ├── gzread.c │ ├── gzwrite.c │ ├── infback.c │ ├── inffast.c │ ├── inffast.h │ ├── inffixed.h │ ├── inflate.c │ ├── inflate.h │ ├── inftrees.c │ ├── inftrees.h │ ├── trees.c │ ├── trees.h │ ├── uncompr.c │ ├── zconf.h │ ├── zlib.h │ ├── zutil.c │ └── zutil.h ├── util.mk └── util.sh /.gitattributes: -------------------------------------------------------------------------------- 1 | *.c linguist-language=C 2 | *.h linguist-language=C 3 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Report a bug 4 | title: '' 5 | labels: bug 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Platform** 11 | [OS and architecture (e.g. Linux x86_64, Windows x86_64, Linux ARMv7, etc.)] 12 | 13 | **Bug description** 14 | [Describe the bug and how to reproduce it] 15 | 16 | **Expected behavior** 17 | [What should happen instead?] 18 | 19 | **Additional info** 20 | [Screenshots or videos of the problem] 21 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Make a suggestion 4 | title: '' 5 | labels: enhancement 6 | assignees: '' 7 | 8 | --- 9 | 10 | 11 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !extras/ 3 | !extras/** 4 | !resources/ 5 | !resources/** 6 | !src/ 7 | !src/** 8 | !.github/ 9 | !*.sh 10 | !CONTRIBUTING.md 11 | !gen.mk 12 | !LICENSE 13 | !Makefile 14 | !README.md 15 | !TODO.md 16 | !util.mk 17 | !.gitattributes 18 | !.gitignore 19 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Boost Software License - Version 1.0 - August 17th, 2003 2 | 3 | Permission is hereby granted, free of charge, to any person or organization 4 | obtaining a copy of the software and accompanying documentation covered by 5 | this license (the "Software") to use, reproduce, display, distribute, 6 | execute, and transmit the Software, and to prepare derivative works of the 7 | Software, and to permit third-parties to whom the Software is furnished to 8 | do so, all subject to the following: 9 | 10 | The copyright notices in the Software and this entire statement, including 11 | the above license grant, this restriction and the following disclaimer, 12 | must be included in all copies of the Software, in whole or in part, and 13 | all derivative works of the Software, unless such copies or derivative 14 | works are solely in the form of machine-executable object code generated by 15 | a source language processor. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 20 | SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 21 | FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 22 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 23 | DEALINGS IN THE SOFTWARE. 24 | -------------------------------------------------------------------------------- /extras/cavecube.desktop: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env xdg-open 2 | [Desktop Entry] 3 | Version=1.0 4 | Name=CaveCube 5 | Comment=An in-development Minecraft/Infiniminer clone 6 | GenericName=Voxel Game 7 | Icon=cavecube 8 | Categories=Game; 9 | Keywords=voxel;game;minecraft;infiniminer;cave;cube; 10 | StartupWMClass=CaveCube 11 | Type=Application 12 | Terminal=false 13 | TryExec=/opt/CaveCube/cavecube 14 | Exec=/opt/CaveCube/cavecube 15 | -------------------------------------------------------------------------------- /extras/docs/formats/ccm model.txt: -------------------------------------------------------------------------------- 1 | Model data: ... 2 | 3 | Part data: 4 | 5 | 6 | []... 7 | 8 | [[]]... 9 | []... 10 | 11 | Vertex data: 12 | {[]...| 13 | []...| 14 | []...| 15 | []...} 16 | -------------------------------------------------------------------------------- /extras/docs/formats/database.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | <6 bits: 0><1 bit: Writing><1 bit: Open> 7 | 8 | [Block]... 9 | 10 | Block: 11 | 12 | <6 bits: 0><1 bit: Is continuation><1 bit: Is free space> 13 | (Points to of same type, 0 if no more continuation) 14 | (How much data can the block hold) 15 | (How much data is the block holding) 16 | | | }> 17 | 18 | Dir data: 19 | (Must always have a CCDB_ENT_END entry at the end) 20 | 21 | [Data] (Not present if type is CCDB_ENT_END and ignored if type is CCDB_ENT_SKIP) 22 | 23 | on the first 3 levels and a file info on the 4th level> 24 | ... 25 | 26 | File data: 27 | 28 | 29 | File info: 30 | 31 | [File info entry] 32 | 33 | <7 bits: 0><1 bit: Skip> 34 | 35 | [Data] (Ignored if skip flag is set) 36 | 37 | if type is CCDB_DIR, or a file data if type is CCDB_FILE> 38 | (Ignored if type is not CCDB_FILE) 39 | 40 | ... 41 | -------------------------------------------------------------------------------- /extras/docs/formats/server list.txt: -------------------------------------------------------------------------------- 1 | - The server list is in a format readable and writable by common/config.c 2 | - Each server is stored as a section 3 | - The section is given the name the user inputs when creating the entry 4 | - The section contains the following vars 5 | - addr: A comma-separated list of the addresses the server can be reached from 6 | - Addresses can be IPv4 addresses or domain names 7 | - A port can be specified by adding a colon and then the port number (the default port is 46000) 8 | - uid: The UID used to log in to the server 9 | - Should be empty if no UID has been provided by the server or user 10 | 11 | Example: 12 | 13 | [My Server] 14 | addr = 127.0.0.1,127.0.0.1:46000,localhost,localhost:46000 15 | uid = 000000000000001C 16 | 17 | [I'll join later] 18 | addr = later.time 19 | uid = 20 | 21 | [Foobar Network] 22 | addr = foo.bar,foobar.ddns.net 23 | uid = 0000000000000042 24 | -------------------------------------------------------------------------------- /extras/docs/gamepad config.txt: -------------------------------------------------------------------------------- 1 | [Input] 2 | xSen = 8 3 | ySen = 4 4 | 5 | [GLFW Keybinds] 6 | move.forward = \0,\0,0;\0,\0,0 7 | move.backward = g,a,1;\0,\0,0 8 | move.left = \0,\0,0;\0,\0,0 9 | move.right = g,a,0;\0,\0,0 10 | move.lookUp = g,a,3;\0,\0,0 11 | move.lookDown = \0,\0,0;\0,\0,0 12 | move.lookLeft = g,a,2;\0,\0,0 13 | move.lookRight = \0,\0,0;\0,\0,0 14 | multi.place = g,a,5;\0,\0,0 15 | multi.destroy = g,a,4;\0,\0,0 16 | multi.zoom = g,b,10;\0,\0,0 17 | multi.jump = g,b,0;\0,\0,0 18 | multi.crouch = g,b,9;\0,\0,0 19 | multi.run = g,b,5;\0,\0,0 20 | multi.playerlist = g,b,6;\0,\0,0 21 | single.escape = g,b,7;\0,\0,0 22 | single.inventory = g,b,4;\0,\0,0 23 | single.invNext = g,b,12;\0,\0,0 24 | single.invPrev = g,b,14;\0,\0,0 25 | single.invShiftUp = g,b,11;\0,\0,0 26 | single.invShiftDown = g,b,13;\0,\0,0 27 | single.rotBlockX = g,b,2;\0,\0,0 28 | single.rotBlockY = g,b,3;\0,\0,0 29 | single.rotBlockZ = g,b,1;\0,\0,0 30 | -------------------------------------------------------------------------------- /extras/docs/palette.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/extras/docs/palette.png -------------------------------------------------------------------------------- /extras/docs/palette_sat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/extras/docs/palette_sat.png -------------------------------------------------------------------------------- /extras/icon/hicolor/128x128/apps/cavecube.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/extras/icon/hicolor/128x128/apps/cavecube.png -------------------------------------------------------------------------------- /extras/icon/hicolor/256x256/apps/cavecube.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/extras/icon/hicolor/256x256/apps/cavecube.png -------------------------------------------------------------------------------- /extras/icon/hicolor/512x512/apps/cavecube.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/extras/icon/hicolor/512x512/apps/cavecube.png -------------------------------------------------------------------------------- /extras/icon/hicolor/64x64/apps/cavecube.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/extras/icon/hicolor/64x64/apps/cavecube.png -------------------------------------------------------------------------------- /extras/icon/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/extras/icon/icon.ico -------------------------------------------------------------------------------- /gen.mk: -------------------------------------------------------------------------------- 1 | include $(UTILMK) 2 | 3 | MKENV = SRCDIR="../../$(SRCDIR)" OBJDIR="../../$(OBJDIR)" UTILMK="../../$(UTILMK)" CC="$(CC)" CFLAGS="$(CFLAGS) -I../../$(SRCDIR)" 4 | MKENV2 = SRCDIR="$(SRCDIR)" OBJDIR="$(OBJDIR)" UTILMK="$(UTILMK)" CC="$(CC)" CFLAGS="$(CFLAGS)" 5 | 6 | ifndef MKRULES 7 | MKOUT = $(OBJDIR)/$@.mk 8 | all: $(BASEDIRS) 9 | else 10 | MKOUT = $(OBJDIR)/$(NAME).mk 11 | all: $(OFILES) 12 | .NOTPARALLEL: 13 | endif 14 | 15 | ifndef MKSUB 16 | $(BASEDIRS): 17 | @$(MAKE) --silent --no-print-directory -f gen.mk NAME="$@" ${MKENV2} MKSUB=y NAME="$@" $(MKOUT) 18 | else 19 | define MKSRC 20 | $(subst .mk,,$(subst $(OBJDIR)/,$(SRCDIR)/,$@)) 21 | endef 22 | define MKND 23 | $(OBJDIR)/$(subst .mk,,$(subst $(OBJDIR)/,,$@)) 24 | endef 25 | $(OBJDIR)/%.mk: $(wildcard $(SRCDIR)/$(NAME)/*.c $(SRCDIR)/$(NAME)/*.h) 26 | @echo Writing $@... 27 | @echo include $$$(esc)(UTILMK$(esc)) > $@ 28 | @$(echoblank) >> $@ 29 | @echo all: $(addprefix ../../$(OUTDIR)/,$(notdir $(CFILES:.c=.o))) >> $@ 30 | @$(echoblank) >> $@ 31 | @$(MAKE) --silent --no-print-directory -C "$(MKSRC)" -f ../../gen.mk NAME="$(subst .mk,,$(subst $(OBJDIR)/,,$@))" ${MKENV} MKRULES=y 32 | ifeq ($(SHCMD),unix) 33 | @[ ! -d "$(MKND)" ] && echo Creating $(MKND)... && mkdir -p "$(MKND)"; true 34 | else ifeq ($(SHCMD),win32) 35 | @if not exist "$(MKND)" echo Creating $(MKND)... & md "$(subst /,\,$(MKND))" 36 | endif 37 | endif 38 | 39 | $(OUTDIR)/%.o: FORCE 40 | @$(CC) $(CFLAGS) -MM "$(notdir $(@:.o=.c))" -MT "$@" >> $(MKOUT) 41 | @echo $(TAB)$$$(esc)(COMPC$(esc)) >> $(MKOUT) 42 | @$(echoblank) >> $(MKOUT) 43 | 44 | FORCE: 45 | 46 | .PHONY: all $(BASEDIRS) 47 | 48 | -------------------------------------------------------------------------------- /quickbuild.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | { 4 | 5 | source util.sh 6 | 7 | NJOBS="$(nproc)" 8 | rm -rf cavecube*.tar.gz cavecube*.zip 9 | 10 | pkgrel() { :; } 11 | 12 | build() { 13 | buildrel "${1}" "$(uname -o) using GLFW" ${@:2} 14 | buildrel "${1}" "$(uname -o) using SDL2" ${@:2} USESDL2=y 15 | buildrel "${1}" "Windows using GLFW" ${@:2} CROSS=win32 16 | buildrel "${1}" "Windows using SDL2" ${@:2} CROSS=win32 USESDL2=y 17 | } 18 | buildmod "game" 19 | 20 | build() { 21 | buildrel "${1}" "" ${@:2} 22 | buildrel "${1}" "Windows" ${@:2} CROSS=win32 23 | } 24 | buildmod "server" 25 | 26 | build() { 27 | buildrel "${1}" "" ${@:2} 28 | buildrel "${1}" "Windows" ${@:2} CROSS=win32 29 | } 30 | buildmod "toolbox" 31 | 32 | } 33 | -------------------------------------------------------------------------------- /resources/base/engine/shaders/GLSL/fragment/2d.glsl: -------------------------------------------------------------------------------- 1 | in vec2 texCoord; 2 | uniform sampler2D texData; 3 | uniform vec4 mcolor; 4 | 5 | out vec4 fragColor; 6 | 7 | void main() { 8 | fragColor = mcolor * texture(texData, texCoord); 9 | } 10 | -------------------------------------------------------------------------------- /resources/base/engine/shaders/GLSL/fragment/block.glsl: -------------------------------------------------------------------------------- 1 | in vec2 texCoord; 2 | #ifndef OPT_SORTTRANSPARENT 3 | flat in uint transparency; 4 | #endif 5 | in vec3 fragPos; 6 | in float texOffset; 7 | in vec3 light[4]; 8 | in vec2 corner; 9 | uniform vec3 skycolor; 10 | uniform sampler2DArray texData; 11 | uniform int dist; 12 | uniform float fogNear; 13 | uniform float fogFar; 14 | uniform vec3 cam; 15 | uniform bool mipmap; 16 | 17 | out vec4 fragColor; 18 | 19 | void main() { 20 | #ifndef OPT_SORTTRANSPARENT 21 | vec2 dx, dy; 22 | if (mipmap && transparency != uint(1)) { 23 | dx = dFdx(texCoord); 24 | dy = dFdy(texCoord); 25 | } else { 26 | dx = vec2(0.0); 27 | dy = vec2(0.0); 28 | } 29 | fragColor = textureGrad(texData, vec3(texCoord, texOffset), dx, dy); 30 | if (transparency == uint(1) && fragColor.a == 0.0) { 31 | discard; 32 | return; 33 | } 34 | #else 35 | fragColor = texture(texData, vec3(texCoord, texOffset)); 36 | #endif 37 | float fogdist = distance(vec3(fragPos.x, abs(cam.y - fragPos.y) * 0.67, fragPos.z), vec3(cam.x, 0, cam.z)); 38 | float fogdmin = (float(dist) * 16.0) * fogNear; 39 | float fogdmax = (float(dist) * 16.0) * fogFar; 40 | fragColor.rgb *= mix(mix(light[0], light[1], corner.x), mix(light[2], light[3], corner.x), corner.y); 41 | float fogmix = 1.0 - clamp((fogdmax - fogdist) / (fogdmax - fogdmin), 0.0, 1.0); 42 | #ifdef OPT_FANCYFOG 43 | fogmix = (fogmix * fogmix * fogmix - fogmix * fogmix * fogmix * fogmix * fogmix * fogmix * 0.5) * 2.0; 44 | #else 45 | fogmix *= fogmix; 46 | #endif 47 | fragColor = mix(fragColor, vec4(skycolor, fragColor.a), fogmix); 48 | } 49 | -------------------------------------------------------------------------------- /resources/base/engine/shaders/GLSL/fragment/framebuffer.glsl: -------------------------------------------------------------------------------- 1 | in vec2 texCoord; 2 | uniform sampler2D texData; 3 | uniform vec3 mcolor; 4 | uniform int fbtype; 5 | uniform vec2 fbsize; 6 | 7 | uniform float h; 8 | uniform float s; 9 | uniform float v; 10 | 11 | out vec4 fragColor; 12 | 13 | vec3 rgb2hsv(vec3 c) { 14 | vec4 K = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0); 15 | vec4 p = mix(vec4(c.bg, K.wz), vec4(c.gb, K.xy), step(c.b, c.g)); 16 | vec4 q = mix(vec4(p.xyw, c.r), vec4(c.r, p.yzx), step(p.x, c.r)); 17 | float d = q.x - min(q.w, q.y); 18 | float e = 1.0e-10; 19 | return vec3(abs(q.z + (q.w - q.y) / (6.0 * d + e)), d / (q.x + e), q.x); 20 | } 21 | 22 | vec3 hsv2rgb(vec3 c) { 23 | vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0); 24 | vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www); 25 | return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y); 26 | } 27 | 28 | void main() { 29 | fragColor = texture(texData, texCoord); 30 | if (fbtype == 0) { 31 | vec3 hsvFrag = rgb2hsv(fragColor.rgb); 32 | hsvFrag.x *= (1.0 + h); 33 | hsvFrag.y *= (1.0 + s); 34 | hsvFrag.z *= (1.0 + v); 35 | fragColor.rgb = hsv2rgb(hsvFrag) * mcolor; 36 | //float gamma = 1.5; 37 | //fragColor.rgb = pow(fragColor.rgb, vec3(1.0 / gamma)); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /resources/base/engine/shaders/GLSL/fragment/text.glsl: -------------------------------------------------------------------------------- 1 | in vec3 texCoord; 2 | in vec4 fgc; 3 | in vec4 bgc; 4 | flat in uint b; 5 | flat in uint u; 6 | flat in uint s; 7 | uniform sampler2DArray texData; 8 | uniform vec2 texsize; 9 | 10 | out vec4 fragColor; 11 | 12 | void main() { 13 | fragColor = texture(texData, texCoord); 14 | float bx = texCoord.x + 1.0 / texsize.x; 15 | vec4 bFragColor = texture(texData, vec3(bx, texCoord.yz)); 16 | #ifdef USEGLES 17 | if (texCoord.x > 1.0 || texCoord.x < 0.0) { 18 | fragColor = vec4(0.0); 19 | } 20 | if (texCoord.y > 1.0 || texCoord.y < 0.0) { 21 | fragColor = vec4(0.0); 22 | bFragColor = vec4(0.0); 23 | } 24 | if (bx > 1.0 || bx < 0.0) { 25 | bFragColor = vec4(0.0); 26 | } 27 | #endif 28 | if (bool(b)) { 29 | fragColor = max(fragColor, bFragColor); 30 | } 31 | float tcy = texCoord.y * texsize.y; 32 | if (bool(u)) { 33 | if (tcy < 1.0) { 34 | fragColor = vec4(1.0); 35 | } 36 | } 37 | if (bool(s)) { 38 | float tmp = floor(texsize.y / 2.0); 39 | if (tcy >= tmp && tcy < tmp + 1.0) { 40 | fragColor = vec4(1.0); 41 | } 42 | } 43 | fragColor *= mix(bgc, fgc, fragColor.a); 44 | } 45 | -------------------------------------------------------------------------------- /resources/base/engine/shaders/GLSL/fragment/ui.glsl: -------------------------------------------------------------------------------- 1 | in vec2 texCoord; 2 | in vec4 color; 3 | uniform sampler2D texData; 4 | 5 | out vec4 fragColor; 6 | 7 | void main() { 8 | fragColor = texture(texData, texCoord) * color; 9 | } 10 | -------------------------------------------------------------------------------- /resources/base/engine/shaders/GLSL/vertex/2d.glsl: -------------------------------------------------------------------------------- 1 | layout (location = 0) in vec4 data; 2 | uniform float xratio; 3 | uniform float yratio; 4 | 5 | out vec2 texCoord; 6 | 7 | void main() { 8 | texCoord.x = data[2]; 9 | texCoord.y = data[3]; 10 | gl_Position = vec4(data[0] * xratio, data[1] * yratio, 0.0, 1.0); 11 | } 12 | -------------------------------------------------------------------------------- /resources/base/engine/shaders/GLSL/vertex/framebuffer.glsl: -------------------------------------------------------------------------------- 1 | layout (location = 0) in vec4 data; 2 | //uniform int fbtype; 3 | 4 | out vec2 texCoord; 5 | 6 | void main() { 7 | texCoord.x = data[2]; 8 | texCoord.y = data[3]; 9 | gl_Position = vec4(data[0], -data[1], 0.0, 1.0); 10 | } 11 | -------------------------------------------------------------------------------- /resources/base/engine/shaders/GLSL/vertex/text.glsl: -------------------------------------------------------------------------------- 1 | layout (location = 0) in uint data1; 2 | // [16 bits: x][16 bits: y] 3 | layout (location = 1) in float data2; 4 | // [f32: z] 5 | layout (location = 2) in uint data3; 6 | // [8 bits: texture x][8 bits: texture y][8 bits: reserved][8 bits: char] 7 | layout (location = 3) in uint data4; 8 | // [3 bits: 0][1 bit: world colors][1 bit: s][1 bit: u][1 bit: i][1 bit: b][4 bits: fgc][4 bits: bgc][8 bits: fga][8 bits: bga] 9 | uniform vec2 fbsize; 10 | uniform vec2 texsize; 11 | uniform vec3 textColors[16]; 12 | uniform vec3 worldTextColors[16]; 13 | 14 | out vec3 texCoord; 15 | out vec4 fgc; 16 | out vec4 bgc; 17 | flat out uint b; 18 | flat out uint u; 19 | flat out uint s; 20 | 21 | void main() { 22 | gl_Position.x = float((int(data1 >> 16) & int(32767)) + (int(data1 >> 16) & int(32768)) * int(-1)); 23 | gl_Position.x = (gl_Position.x / fbsize.x) * 2.0 - 1.0; 24 | gl_Position.y = float((int(data1) & int(32767)) + (int(data1) & int(32768)) * int(-1)); 25 | gl_Position.y = (1.0 - (gl_Position.y / fbsize.y)) * 2.0 - 1.0; 26 | gl_Position.z = data2; 27 | gl_Position.w = 1.0; 28 | texCoord.x = float((data3 >> 24) & uint(255)); 29 | texCoord.y = 1.0 - float((data3 >> 16) & uint(255)); 30 | texCoord.xy /= texsize; 31 | b = (data4 >> 24) & uint(1); 32 | if (bool((data4 >> 25) & uint(1))) { 33 | texCoord.x -= 2.0 / texsize.x; 34 | texCoord.x += (4.0 / texsize.x) * texCoord.y; 35 | } 36 | u = (data4 >> 26) & uint(1); 37 | s = (data4 >> 27) & uint(1); 38 | texCoord.z = float((data3 >> 8) & uint(255)); 39 | fgc.a = float((data4 >> 8) & uint(255)) / 255.0; 40 | bgc.a = float(data4 & uint(255)) / 255.0; 41 | if (bool((data4 >> 28) & uint(1))) { 42 | fgc.rgb = worldTextColors[(data3 >> 4) & uint(15)]; 43 | bgc.rgb = worldTextColors[data3 & uint(15)]; 44 | } else { 45 | fgc.rgb = textColors[(data3 >> 4) & uint(15)]; 46 | bgc.rgb = textColors[data3 & uint(15)]; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /resources/base/engine/shaders/GLSL/vertex/ui.glsl: -------------------------------------------------------------------------------- 1 | layout (location = 0) in uint data1; 2 | // [16 bits: x][16 bits: y] 3 | layout (location = 1) in float data2; 4 | // [f32: z] 5 | layout (location = 2) in uint data3; 6 | // [16 bits: texture x][16 bits: texture y] 7 | layout (location = 3) in uint data4; 8 | // [8 bits: r][8 bits: g][8 bits: b][8 bits: a] 9 | uniform vec2 fbsize; 10 | uniform vec2 texsize; 11 | 12 | out vec2 texCoord; 13 | out vec4 color; 14 | 15 | void main() { 16 | gl_Position.x = float((int(data1 >> 16) & int(32767)) + (int(data1 >> 16) & int(32768)) * int(-1)); 17 | gl_Position.x = (gl_Position.x / fbsize.x) * 2.0 - 1.0; 18 | gl_Position.y = float((int(data1) & int(32767)) + (int(data1) & int(32768)) * int(-1)); 19 | gl_Position.y = (1.0 - (gl_Position.y / fbsize.y)) * 2.0 - 1.0; 20 | gl_Position.z = data2; 21 | gl_Position.w = 1.0; 22 | texCoord.x = float((data3 >> 16) & uint(65535)); 23 | texCoord.y = 1.0 - float(data3 & uint(65535)); 24 | texCoord /= texsize; 25 | color.r = float((data4 >> 24) & uint(255)) / 255.0; 26 | color.g = float((data4 >> 16) & uint(255)) / 255.0; 27 | color.b = float((data4 >> 8) & uint(255)) / 255.0; 28 | color.a = float(data4 & uint(255)) / 255.0; 29 | } 30 | -------------------------------------------------------------------------------- /resources/base/engine/shaders/headers/OpenGL ES.glsl: -------------------------------------------------------------------------------- 1 | #version 300 es 2 | #pragma optimize(on) 3 | precision mediump float; 4 | precision mediump sampler2DArray; 5 | precision highp int; 6 | -------------------------------------------------------------------------------- /resources/base/engine/shaders/headers/OpenGL.glsl: -------------------------------------------------------------------------------- 1 | #version 330 2 | #pragma optimize(on) 3 | -------------------------------------------------------------------------------- /resources/base/game/data/blocks/0/0.inf: -------------------------------------------------------------------------------- 1 | # tex={.|$[subid].|@.[subid].} 2 | # . = texture in current block and variant 3 | # $ = texture in current block but different variant 4 | # @ = texture in different block and variant 5 | # = 0-6, a, or m0-m2 6 | -------------------------------------------------------------------------------- /resources/base/game/data/blocks/0/block.inf: -------------------------------------------------------------------------------- 1 | id=air 2 | name=Air 3 | -------------------------------------------------------------------------------- /resources/base/game/data/blocks/1/0.inf: -------------------------------------------------------------------------------- 1 | texa=.0 2 | -------------------------------------------------------------------------------- /resources/base/game/data/blocks/1/1.inf: -------------------------------------------------------------------------------- 1 | name=Cobblestone 2 | id=cobble 3 | texa=.0 4 | -------------------------------------------------------------------------------- /resources/base/game/data/blocks/1/2.inf: -------------------------------------------------------------------------------- 1 | name=Basalt 2 | id=basalt 3 | texa=.0 4 | -------------------------------------------------------------------------------- /resources/base/game/data/blocks/1/3.inf: -------------------------------------------------------------------------------- 1 | name=Granite 2 | id=granite 3 | texa=.0 4 | -------------------------------------------------------------------------------- /resources/base/game/data/blocks/1/block.inf: -------------------------------------------------------------------------------- 1 | id=stone 2 | name=Stone 3 | -------------------------------------------------------------------------------- /resources/base/game/data/blocks/10/0.inf: -------------------------------------------------------------------------------- 1 | texa=.0 2 | -------------------------------------------------------------------------------- /resources/base/game/data/blocks/10/block.inf: -------------------------------------------------------------------------------- 1 | id=leaves 2 | name=Leaves 3 | -------------------------------------------------------------------------------- /resources/base/game/data/blocks/11/0.inf: -------------------------------------------------------------------------------- 1 | texa=.0 2 | -------------------------------------------------------------------------------- /resources/base/game/data/blocks/11/block.inf: -------------------------------------------------------------------------------- 1 | id=planks 2 | name=Planks 3 | -------------------------------------------------------------------------------- /resources/base/game/data/blocks/12/0.inf: -------------------------------------------------------------------------------- 1 | texa=.0 2 | -------------------------------------------------------------------------------- /resources/base/game/data/blocks/12/block.inf: -------------------------------------------------------------------------------- 1 | id=bricks 2 | name=Bricks 3 | -------------------------------------------------------------------------------- /resources/base/game/data/blocks/13/0.inf: -------------------------------------------------------------------------------- 1 | tex0=.0 2 | tex1=.1 3 | tex2=.2 4 | tex3=.3 5 | tex4=.4 6 | tex5=.5 7 | -------------------------------------------------------------------------------- /resources/base/game/data/blocks/13/block.inf: -------------------------------------------------------------------------------- 1 | id=effect_emitter 2 | name=Effect Emitter 3 | -------------------------------------------------------------------------------- /resources/base/game/data/blocks/14/0.inf: -------------------------------------------------------------------------------- 1 | id=off 2 | texa=.0 3 | -------------------------------------------------------------------------------- /resources/base/game/data/blocks/14/1.inf: -------------------------------------------------------------------------------- 1 | id=on 2 | texa=.0 3 | light_r=0.75 4 | light_g=0.75 5 | light_b=0.67 6 | -------------------------------------------------------------------------------- /resources/base/game/data/blocks/14/block.inf: -------------------------------------------------------------------------------- 1 | id=lamp 2 | name=Lamp 3 | -------------------------------------------------------------------------------- /resources/base/game/data/blocks/15/0.inf: -------------------------------------------------------------------------------- 1 | name=Coal Ore 2 | id=coal 3 | texa=.0 4 | -------------------------------------------------------------------------------- /resources/base/game/data/blocks/15/1.inf: -------------------------------------------------------------------------------- 1 | name=Gold Ore 2 | id=gold 3 | texa=.0 4 | -------------------------------------------------------------------------------- /resources/base/game/data/blocks/15/2.inf: -------------------------------------------------------------------------------- 1 | name=Iron Ore 2 | id=iron 3 | texa=.0 4 | -------------------------------------------------------------------------------- /resources/base/game/data/blocks/15/3.inf: -------------------------------------------------------------------------------- 1 | name=Photonium Ore 2 | id=photonium 3 | texa=.0 4 | light_r=0.1 5 | light_g=0.1 6 | -------------------------------------------------------------------------------- /resources/base/game/data/blocks/15/4.inf: -------------------------------------------------------------------------------- 1 | name=Diamond Ore 2 | id=diamond 3 | texa=.0 4 | -------------------------------------------------------------------------------- /resources/base/game/data/blocks/15/5.inf: -------------------------------------------------------------------------------- 1 | name=Copper Ore 2 | id=copper 3 | texa=.0 4 | -------------------------------------------------------------------------------- /resources/base/game/data/blocks/15/6.inf: -------------------------------------------------------------------------------- 1 | name=Powerite Ore 2 | id=powerite 3 | texa=.0 4 | light_g=0.2 5 | -------------------------------------------------------------------------------- /resources/base/game/data/blocks/15/block.inf: -------------------------------------------------------------------------------- 1 | id=ore 2 | -------------------------------------------------------------------------------- /resources/base/game/data/blocks/16/0.inf: -------------------------------------------------------------------------------- 1 | tex0=.0 2 | tex1=.1 3 | tex2=@planks..0 4 | tex3=.2 5 | tex4=.3 6 | tex5=.4 7 | -------------------------------------------------------------------------------- /resources/base/game/data/blocks/16/block.inf: -------------------------------------------------------------------------------- 1 | id=workbench 2 | name=Workbench 3 | -------------------------------------------------------------------------------- /resources/base/game/data/blocks/17/0.inf: -------------------------------------------------------------------------------- 1 | id=inactive 2 | tex0=.0 3 | tex1=.0 4 | tex2=.0 5 | tex3=.0 6 | tex4=.0 7 | tex5=.1 8 | -------------------------------------------------------------------------------- /resources/base/game/data/blocks/17/1.inf: -------------------------------------------------------------------------------- 1 | id=active 2 | tex0=$.0 3 | tex1=$.0 4 | tex2=$.0 5 | tex3=$.0 6 | tex4=$.0 7 | tex5=.0 8 | animation5=5 9 | animationdiv=15 10 | light_r=0.5 11 | light_g=0.33 12 | light_b=0.25 13 | -------------------------------------------------------------------------------- /resources/base/game/data/blocks/17/block.inf: -------------------------------------------------------------------------------- 1 | id=furnace 2 | name=Furnace 3 | -------------------------------------------------------------------------------- /resources/base/game/data/blocks/18/0.inf: -------------------------------------------------------------------------------- 1 | id=empty 2 | tex0=@planks..0 3 | tex1=@planks..0 4 | tex2=@planks..0 5 | tex3=@planks..0 6 | tex4=@planks..0 7 | tex5=.0 8 | -------------------------------------------------------------------------------- /resources/base/game/data/blocks/18/1.inf: -------------------------------------------------------------------------------- 1 | id=used 2 | tex0=@planks..0 3 | tex1=@planks..0 4 | tex2=@planks..0 5 | tex3=@planks..0 6 | tex4=@planks..0 7 | tex5=.0 8 | -------------------------------------------------------------------------------- /resources/base/game/data/blocks/18/2.inf: -------------------------------------------------------------------------------- 1 | id=full 2 | tex0=@planks..0 3 | tex1=@planks..0 4 | tex2=@planks..0 5 | tex3=@planks..0 6 | tex4=@planks..0 7 | tex5=.0 8 | -------------------------------------------------------------------------------- /resources/base/game/data/blocks/18/block.inf: -------------------------------------------------------------------------------- 1 | id=bookshelf 2 | name=Bookshelf 3 | -------------------------------------------------------------------------------- /resources/base/game/data/blocks/19/0.inf: -------------------------------------------------------------------------------- 1 | animation=8 2 | animationdiv=35 3 | backfaces=true 4 | texa=.0 5 | -------------------------------------------------------------------------------- /resources/base/game/data/blocks/19/block.inf: -------------------------------------------------------------------------------- 1 | id=lava 2 | name=Lava 3 | -------------------------------------------------------------------------------- /resources/base/game/data/blocks/2/0.inf: -------------------------------------------------------------------------------- 1 | texm0=.0 2 | texm1=.1 3 | texm2=.2 4 | -------------------------------------------------------------------------------- /resources/base/game/data/blocks/2/block.inf: -------------------------------------------------------------------------------- 1 | id=bedrock 2 | name=Bedrock 3 | -------------------------------------------------------------------------------- /resources/base/game/data/blocks/3/0.inf: -------------------------------------------------------------------------------- 1 | texm0=.0 2 | texm1=.1 3 | texm2=.2 4 | -------------------------------------------------------------------------------- /resources/base/game/data/blocks/3/block.inf: -------------------------------------------------------------------------------- 1 | id=dirt 2 | name=Dirt 3 | -------------------------------------------------------------------------------- /resources/base/game/data/blocks/4/0.inf: -------------------------------------------------------------------------------- 1 | tex0=.0 2 | tex1=.1 3 | tex2=.2 4 | tex3=.3 5 | tex4=.4 6 | tex5=.5 7 | -------------------------------------------------------------------------------- /resources/base/game/data/blocks/4/block.inf: -------------------------------------------------------------------------------- 1 | id=grass_block 2 | name=Grass 3 | -------------------------------------------------------------------------------- /resources/base/game/data/blocks/5/0.inf: -------------------------------------------------------------------------------- 1 | texa=.0 2 | -------------------------------------------------------------------------------- /resources/base/game/data/blocks/5/block.inf: -------------------------------------------------------------------------------- 1 | id=sand 2 | name=Sand 3 | -------------------------------------------------------------------------------- /resources/base/game/data/blocks/6/0.inf: -------------------------------------------------------------------------------- 1 | texa=.0 2 | -------------------------------------------------------------------------------- /resources/base/game/data/blocks/6/block.inf: -------------------------------------------------------------------------------- 1 | id=gravel 2 | name=Gravel 3 | -------------------------------------------------------------------------------- /resources/base/game/data/blocks/7/0.inf: -------------------------------------------------------------------------------- 1 | animation=8 2 | animationdiv=17 3 | backfaces=true 4 | texa=.0 5 | -------------------------------------------------------------------------------- /resources/base/game/data/blocks/7/block.inf: -------------------------------------------------------------------------------- 1 | id=water 2 | name=Water 3 | -------------------------------------------------------------------------------- /resources/base/game/data/blocks/8/0.inf: -------------------------------------------------------------------------------- 1 | texa=.0 2 | -------------------------------------------------------------------------------- /resources/base/game/data/blocks/8/1.inf: -------------------------------------------------------------------------------- 1 | name=Tinted Glass 2 | id=tinted 3 | texa=.0 4 | -------------------------------------------------------------------------------- /resources/base/game/data/blocks/8/10.inf: -------------------------------------------------------------------------------- 1 | name=Aqua Stained Glass 2 | id=aqua 3 | texa=.0 4 | -------------------------------------------------------------------------------- /resources/base/game/data/blocks/8/11.inf: -------------------------------------------------------------------------------- 1 | name=Cobalt Stained Glass 2 | id=cobalt 3 | texa=.0 4 | -------------------------------------------------------------------------------- /resources/base/game/data/blocks/8/12.inf: -------------------------------------------------------------------------------- 1 | name=Brown Stained Glass 2 | id=brown 3 | texa=.0 4 | -------------------------------------------------------------------------------- /resources/base/game/data/blocks/8/13.inf: -------------------------------------------------------------------------------- 1 | name=Black Stained Glass 2 | id=black 3 | texa=.0 4 | -------------------------------------------------------------------------------- /resources/base/game/data/blocks/8/14.inf: -------------------------------------------------------------------------------- 1 | name=Grey Stained Glass 2 | id=grey 3 | texa=.0 4 | -------------------------------------------------------------------------------- /resources/base/game/data/blocks/8/15.inf: -------------------------------------------------------------------------------- 1 | name=White Stained Glass 2 | id=white 3 | texa=.0 4 | -------------------------------------------------------------------------------- /resources/base/game/data/blocks/8/2.inf: -------------------------------------------------------------------------------- 1 | name=Blue Stained Glass 2 | id=blue 3 | texa=.0 4 | -------------------------------------------------------------------------------- /resources/base/game/data/blocks/8/3.inf: -------------------------------------------------------------------------------- 1 | name=Purple Stained Glass 2 | id=purple 3 | texa=.0 4 | -------------------------------------------------------------------------------- /resources/base/game/data/blocks/8/4.inf: -------------------------------------------------------------------------------- 1 | name=Pink Stained Glass 2 | id=pink 3 | texa=.0 4 | -------------------------------------------------------------------------------- /resources/base/game/data/blocks/8/5.inf: -------------------------------------------------------------------------------- 1 | name=Magenta Stained Glass 2 | id=magenta 3 | texa=.0 4 | -------------------------------------------------------------------------------- /resources/base/game/data/blocks/8/6.inf: -------------------------------------------------------------------------------- 1 | name=Red Stained Glass 2 | id=red 3 | texa=.0 4 | -------------------------------------------------------------------------------- /resources/base/game/data/blocks/8/7.inf: -------------------------------------------------------------------------------- 1 | name=Orange Stained Glass 2 | id=orange 3 | texa=.0 4 | -------------------------------------------------------------------------------- /resources/base/game/data/blocks/8/8.inf: -------------------------------------------------------------------------------- 1 | name=Yellow Stained Glass 2 | id=yellow 3 | texa=.0 4 | -------------------------------------------------------------------------------- /resources/base/game/data/blocks/8/9.inf: -------------------------------------------------------------------------------- 1 | name=Green Stained Glass 2 | id=green 3 | texa=.0 4 | -------------------------------------------------------------------------------- /resources/base/game/data/blocks/8/block.inf: -------------------------------------------------------------------------------- 1 | id=glass 2 | name=Glass 3 | -------------------------------------------------------------------------------- /resources/base/game/data/blocks/9/0.inf: -------------------------------------------------------------------------------- 1 | tex0=.0 2 | tex1=.1 3 | tex2=.2 4 | tex3=.3 5 | tex4=.4 6 | tex5=.5 7 | -------------------------------------------------------------------------------- /resources/base/game/data/blocks/9/block.inf: -------------------------------------------------------------------------------- 1 | id=log 2 | name=Log 3 | -------------------------------------------------------------------------------- /resources/base/game/scripts/blocks/bookshelf.script: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/scripts/blocks/bookshelf.script -------------------------------------------------------------------------------- /resources/base/game/scripts/blocks/furnace.script: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/scripts/blocks/furnace.script -------------------------------------------------------------------------------- /resources/base/game/scripts/blocks/lamp.script: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/scripts/blocks/lamp.script -------------------------------------------------------------------------------- /resources/base/game/scripts/blocks/workbench.script: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/scripts/blocks/workbench.script -------------------------------------------------------------------------------- /resources/base/game/sounds/block/default/placeholder: -------------------------------------------------------------------------------- 1 | placeholder 2 | -------------------------------------------------------------------------------- /resources/base/game/sounds/disc/00.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/sounds/disc/00.ogg -------------------------------------------------------------------------------- /resources/base/game/sounds/disc/01.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/sounds/disc/01.ogg -------------------------------------------------------------------------------- /resources/base/game/sounds/disc/02.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/sounds/disc/02.ogg -------------------------------------------------------------------------------- /resources/base/game/sounds/disc/03.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/sounds/disc/03.ogg -------------------------------------------------------------------------------- /resources/base/game/sounds/disc/04.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/sounds/disc/04.ogg -------------------------------------------------------------------------------- /resources/base/game/sounds/disc/05.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/sounds/disc/05.ogg -------------------------------------------------------------------------------- /resources/base/game/sounds/disc/06.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/sounds/disc/06.ogg -------------------------------------------------------------------------------- /resources/base/game/sounds/disc/07.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/sounds/disc/07.ogg -------------------------------------------------------------------------------- /resources/base/game/sounds/note/bass.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/sounds/note/bass.ogg -------------------------------------------------------------------------------- /resources/base/game/sounds/note/brass.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/sounds/note/brass.ogg -------------------------------------------------------------------------------- /resources/base/game/sounds/note/choir.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/sounds/note/choir.ogg -------------------------------------------------------------------------------- /resources/base/game/sounds/note/grit.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/sounds/note/grit.ogg -------------------------------------------------------------------------------- /resources/base/game/sounds/note/kick.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/sounds/note/kick.ogg -------------------------------------------------------------------------------- /resources/base/game/sounds/note/pad.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/sounds/note/pad.ogg -------------------------------------------------------------------------------- /resources/base/game/sounds/note/piano.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/sounds/note/piano.ogg -------------------------------------------------------------------------------- /resources/base/game/sounds/note/sawsynth.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/sounds/note/sawsynth.ogg -------------------------------------------------------------------------------- /resources/base/game/sounds/note/sine.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/sounds/note/sine.ogg -------------------------------------------------------------------------------- /resources/base/game/sounds/note/square.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/sounds/note/square.ogg -------------------------------------------------------------------------------- /resources/base/game/sounds/note/synth.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/sounds/note/synth.ogg -------------------------------------------------------------------------------- /resources/base/game/sounds/ui/click.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/sounds/ui/click.ogg -------------------------------------------------------------------------------- /resources/base/game/sounds/ui/tick.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/sounds/ui/tick.ogg -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/1/0/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/1/0/0.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/1/1/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/1/1/0.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/1/2/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/1/2/0.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/1/3/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/1/3/0.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/10/0/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/10/0/0.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/11/0/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/11/0/0.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/12/0/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/12/0/0.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/13/0/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/13/0/0.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/13/0/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/13/0/1.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/13/0/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/13/0/2.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/13/0/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/13/0/3.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/13/0/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/13/0/4.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/13/0/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/13/0/5.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/14/0/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/14/0/0.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/14/1/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/14/1/0.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/15/0/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/15/0/0.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/15/1/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/15/1/0.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/15/2/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/15/2/0.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/15/3/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/15/3/0.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/15/4/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/15/4/0.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/15/5/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/15/5/0.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/15/6/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/15/6/0.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/16/0/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/16/0/0.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/16/0/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/16/0/1.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/16/0/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/16/0/2.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/16/0/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/16/0/3.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/16/0/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/16/0/4.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/17/0/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/17/0/0.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/17/0/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/17/0/1.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/17/1/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/17/1/0.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/17/1/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/17/1/1.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/17/1/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/17/1/2.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/17/1/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/17/1/3.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/17/1/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/17/1/4.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/18/0/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/18/0/0.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/18/1/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/18/1/0.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/18/2/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/18/2/0.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/19/0/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/19/0/0.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/19/0/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/19/0/1.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/19/0/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/19/0/2.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/19/0/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/19/0/3.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/19/0/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/19/0/4.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/19/0/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/19/0/5.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/19/0/6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/19/0/6.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/19/0/7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/19/0/7.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/2/0/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/2/0/0.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/2/0/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/2/0/1.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/2/0/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/2/0/2.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/3/0/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/3/0/0.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/3/0/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/3/0/1.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/3/0/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/3/0/2.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/4/0/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/4/0/0.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/4/0/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/4/0/1.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/4/0/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/4/0/2.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/4/0/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/4/0/3.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/4/0/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/4/0/4.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/4/0/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/4/0/5.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/5/0/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/5/0/0.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/6/0/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/6/0/0.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/7/0/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/7/0/0.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/7/0/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/7/0/1.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/7/0/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/7/0/2.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/7/0/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/7/0/3.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/7/0/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/7/0/4.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/7/0/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/7/0/5.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/7/0/6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/7/0/6.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/7/0/7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/7/0/7.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/8/0/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/8/0/0.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/8/1/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/8/1/0.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/8/10/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/8/10/0.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/8/11/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/8/11/0.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/8/12/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/8/12/0.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/8/13/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/8/13/0.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/8/14/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/8/14/0.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/8/15/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/8/15/0.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/8/2/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/8/2/0.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/8/3/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/8/3/0.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/8/4/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/8/4/0.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/8/5/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/8/5/0.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/8/6/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/8/6/0.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/8/7/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/8/7/0.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/8/8/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/8/8/0.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/8/9/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/8/9/0.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/9/0/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/9/0/0.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/9/0/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/9/0/1.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/9/0/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/9/0/2.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/9/0/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/9/0/3.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/9/0/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/9/0/4.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/9/0/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/9/0/5.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/debug/0/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/debug/0/0.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/debug/0/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/debug/0/1.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/debug/0/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/debug/0/2.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/debug/0/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/debug/0/3.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/debug/0/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/debug/0/4.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/debug/0/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/debug/0/5.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/debug/1/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/debug/1/0.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/debug/1/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/debug/1/1.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/debug/1/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/debug/1/2.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/debug/1/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/debug/1/3.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/debug/1/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/debug/1/4.png -------------------------------------------------------------------------------- /resources/base/game/textures/blocks/debug/1/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/blocks/debug/1/5.png -------------------------------------------------------------------------------- /resources/base/game/textures/common/missing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/common/missing.png -------------------------------------------------------------------------------- /resources/base/game/textures/ui/borders/black/b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/ui/borders/black/b.png -------------------------------------------------------------------------------- /resources/base/game/textures/ui/borders/black/bl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/ui/borders/black/bl.png -------------------------------------------------------------------------------- /resources/base/game/textures/ui/borders/black/br.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/ui/borders/black/br.png -------------------------------------------------------------------------------- /resources/base/game/textures/ui/borders/black/l.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/ui/borders/black/l.png -------------------------------------------------------------------------------- /resources/base/game/textures/ui/borders/black/r.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/ui/borders/black/r.png -------------------------------------------------------------------------------- /resources/base/game/textures/ui/borders/black/t.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/ui/borders/black/t.png -------------------------------------------------------------------------------- /resources/base/game/textures/ui/borders/black/tl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/ui/borders/black/tl.png -------------------------------------------------------------------------------- /resources/base/game/textures/ui/borders/black/tr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/ui/borders/black/tr.png -------------------------------------------------------------------------------- /resources/base/game/textures/ui/borders/doubleraised/b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/ui/borders/doubleraised/b.png -------------------------------------------------------------------------------- /resources/base/game/textures/ui/borders/doubleraised/bl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/ui/borders/doubleraised/bl.png -------------------------------------------------------------------------------- /resources/base/game/textures/ui/borders/doubleraised/br.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/ui/borders/doubleraised/br.png -------------------------------------------------------------------------------- /resources/base/game/textures/ui/borders/doubleraised/l.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/ui/borders/doubleraised/l.png -------------------------------------------------------------------------------- /resources/base/game/textures/ui/borders/doubleraised/r.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/ui/borders/doubleraised/r.png -------------------------------------------------------------------------------- /resources/base/game/textures/ui/borders/doubleraised/t.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/ui/borders/doubleraised/t.png -------------------------------------------------------------------------------- /resources/base/game/textures/ui/borders/doubleraised/tl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/ui/borders/doubleraised/tl.png -------------------------------------------------------------------------------- /resources/base/game/textures/ui/borders/doubleraised/tr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/ui/borders/doubleraised/tr.png -------------------------------------------------------------------------------- /resources/base/game/textures/ui/borders/doublesunken/b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/ui/borders/doublesunken/b.png -------------------------------------------------------------------------------- /resources/base/game/textures/ui/borders/doublesunken/bl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/ui/borders/doublesunken/bl.png -------------------------------------------------------------------------------- /resources/base/game/textures/ui/borders/doublesunken/br.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/ui/borders/doublesunken/br.png -------------------------------------------------------------------------------- /resources/base/game/textures/ui/borders/doublesunken/l.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/ui/borders/doublesunken/l.png -------------------------------------------------------------------------------- /resources/base/game/textures/ui/borders/doublesunken/r.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/ui/borders/doublesunken/r.png -------------------------------------------------------------------------------- /resources/base/game/textures/ui/borders/doublesunken/t.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/ui/borders/doublesunken/t.png -------------------------------------------------------------------------------- /resources/base/game/textures/ui/borders/doublesunken/tl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/ui/borders/doublesunken/tl.png -------------------------------------------------------------------------------- /resources/base/game/textures/ui/borders/doublesunken/tr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/ui/borders/doublesunken/tr.png -------------------------------------------------------------------------------- /resources/base/game/textures/ui/borders/grey/b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/ui/borders/grey/b.png -------------------------------------------------------------------------------- /resources/base/game/textures/ui/borders/grey/bl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/ui/borders/grey/bl.png -------------------------------------------------------------------------------- /resources/base/game/textures/ui/borders/grey/br.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/ui/borders/grey/br.png -------------------------------------------------------------------------------- /resources/base/game/textures/ui/borders/grey/l.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/ui/borders/grey/l.png -------------------------------------------------------------------------------- /resources/base/game/textures/ui/borders/grey/r.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/ui/borders/grey/r.png -------------------------------------------------------------------------------- /resources/base/game/textures/ui/borders/grey/t.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/ui/borders/grey/t.png -------------------------------------------------------------------------------- /resources/base/game/textures/ui/borders/grey/tl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/ui/borders/grey/tl.png -------------------------------------------------------------------------------- /resources/base/game/textures/ui/borders/grey/tr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/ui/borders/grey/tr.png -------------------------------------------------------------------------------- /resources/base/game/textures/ui/borders/raised/b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/ui/borders/raised/b.png -------------------------------------------------------------------------------- /resources/base/game/textures/ui/borders/raised/bl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/ui/borders/raised/bl.png -------------------------------------------------------------------------------- /resources/base/game/textures/ui/borders/raised/br.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/ui/borders/raised/br.png -------------------------------------------------------------------------------- /resources/base/game/textures/ui/borders/raised/l.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/ui/borders/raised/l.png -------------------------------------------------------------------------------- /resources/base/game/textures/ui/borders/raised/r.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/ui/borders/raised/r.png -------------------------------------------------------------------------------- /resources/base/game/textures/ui/borders/raised/t.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/ui/borders/raised/t.png -------------------------------------------------------------------------------- /resources/base/game/textures/ui/borders/raised/tl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/ui/borders/raised/tl.png -------------------------------------------------------------------------------- /resources/base/game/textures/ui/borders/raised/tr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/ui/borders/raised/tr.png -------------------------------------------------------------------------------- /resources/base/game/textures/ui/borders/sunken/b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/ui/borders/sunken/b.png -------------------------------------------------------------------------------- /resources/base/game/textures/ui/borders/sunken/bl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/ui/borders/sunken/bl.png -------------------------------------------------------------------------------- /resources/base/game/textures/ui/borders/sunken/br.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/ui/borders/sunken/br.png -------------------------------------------------------------------------------- /resources/base/game/textures/ui/borders/sunken/l.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/ui/borders/sunken/l.png -------------------------------------------------------------------------------- /resources/base/game/textures/ui/borders/sunken/r.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/ui/borders/sunken/r.png -------------------------------------------------------------------------------- /resources/base/game/textures/ui/borders/sunken/t.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/ui/borders/sunken/t.png -------------------------------------------------------------------------------- /resources/base/game/textures/ui/borders/sunken/tl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/ui/borders/sunken/tl.png -------------------------------------------------------------------------------- /resources/base/game/textures/ui/borders/sunken/tr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/ui/borders/sunken/tr.png -------------------------------------------------------------------------------- /resources/base/game/textures/ui/borders/white/b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/ui/borders/white/b.png -------------------------------------------------------------------------------- /resources/base/game/textures/ui/borders/white/bl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/ui/borders/white/bl.png -------------------------------------------------------------------------------- /resources/base/game/textures/ui/borders/white/br.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/ui/borders/white/br.png -------------------------------------------------------------------------------- /resources/base/game/textures/ui/borders/white/l.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/ui/borders/white/l.png -------------------------------------------------------------------------------- /resources/base/game/textures/ui/borders/white/r.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/ui/borders/white/r.png -------------------------------------------------------------------------------- /resources/base/game/textures/ui/borders/white/t.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/ui/borders/white/t.png -------------------------------------------------------------------------------- /resources/base/game/textures/ui/borders/white/tl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/ui/borders/white/tl.png -------------------------------------------------------------------------------- /resources/base/game/textures/ui/borders/white/tr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/ui/borders/white/tr.png -------------------------------------------------------------------------------- /resources/base/game/textures/ui/charset.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/ui/charset.png -------------------------------------------------------------------------------- /resources/base/game/textures/ui/crosshair.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/ui/crosshair.png -------------------------------------------------------------------------------- /resources/base/game/textures/ui/elements/box/bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/ui/elements/box/bg.png -------------------------------------------------------------------------------- /resources/base/game/textures/ui/elements/button/bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/ui/elements/button/bg.png -------------------------------------------------------------------------------- /resources/base/game/textures/ui/elements/checkbox/bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/ui/elements/checkbox/bg.png -------------------------------------------------------------------------------- /resources/base/game/textures/ui/elements/hotbar/bar/l.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/ui/elements/hotbar/bar/l.png -------------------------------------------------------------------------------- /resources/base/game/textures/ui/elements/hotbar/bar/r.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/ui/elements/hotbar/bar/r.png -------------------------------------------------------------------------------- /resources/base/game/textures/ui/elements/hotbar/selector.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/ui/elements/hotbar/selector.png -------------------------------------------------------------------------------- /resources/base/game/textures/ui/elements/itemgrid/border.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/ui/elements/itemgrid/border.png -------------------------------------------------------------------------------- /resources/base/game/textures/ui/elements/itemgrid/hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/ui/elements/itemgrid/hover.png -------------------------------------------------------------------------------- /resources/base/game/textures/ui/elements/itemgrid/normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/ui/elements/itemgrid/normal.png -------------------------------------------------------------------------------- /resources/base/game/textures/ui/elements/progressbar/bar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/ui/elements/progressbar/bar.png -------------------------------------------------------------------------------- /resources/base/game/textures/ui/elements/progressbar/bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/ui/elements/progressbar/bg.png -------------------------------------------------------------------------------- /resources/base/game/textures/ui/elements/radio/bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/ui/elements/radio/bg.png -------------------------------------------------------------------------------- /resources/base/game/textures/ui/elements/scrollbar/arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/ui/elements/scrollbar/arrow.png -------------------------------------------------------------------------------- /resources/base/game/textures/ui/elements/slider/bar/l.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/ui/elements/slider/bar/l.png -------------------------------------------------------------------------------- /resources/base/game/textures/ui/elements/slider/bar/m.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/ui/elements/slider/bar/m.png -------------------------------------------------------------------------------- /resources/base/game/textures/ui/elements/slider/bar/r.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/ui/elements/slider/bar/r.png -------------------------------------------------------------------------------- /resources/base/game/textures/ui/elements/textbox/bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/ui/elements/textbox/bg.png -------------------------------------------------------------------------------- /resources/base/game/textures/ui/elements/toggle/bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PQCraft/CaveCube/457b8d0f1b79b4ec900375660f457b686e052566/resources/base/game/textures/ui/elements/toggle/bg.png -------------------------------------------------------------------------------- /resources/base/info.inf: -------------------------------------------------------------------------------- 1 | name=Base 2 | id=base 3 | -------------------------------------------------------------------------------- /resources/ntsc/info.inf: -------------------------------------------------------------------------------- 1 | name=NTSC filter 2 | id=ntsc 3 | -------------------------------------------------------------------------------- /resources/ps1/engine/shaders/code/GLSL/block/fragment.glsl: -------------------------------------------------------------------------------- 1 | noperspective in vec2 texCoord; 2 | flat in uint transparency; 3 | in vec3 fragPos; 4 | in float texOffset; 5 | in vec3 light; 6 | uniform vec3 skycolor; 7 | uniform sampler2DArray texData; 8 | uniform int dist; 9 | uniform float fogNear; 10 | uniform float fogFar; 11 | uniform vec3 cam; 12 | uniform bool mipmap; 13 | 14 | out vec4 fragColor; 15 | 16 | void main() { 17 | fragColor = textureLod(texData, vec3(texCoord, texOffset), 0.0); 18 | if (transparency == uint(1) && fragColor.a == 0.0) {discard; return;} 19 | float fogdist = distance(vec3(fragPos.x, abs(cam.y - fragPos.y) * 0.5, fragPos.z), vec3(cam.x, 0, cam.z)); 20 | float fogdmin = (float(dist) * 16.0) * fogNear; 21 | float fogdmax = (float(dist) * 16.0) * fogFar; 22 | fragColor.rgb *= light; 23 | fragColor = mix(fragColor, vec4(skycolor, fragColor.a), 1.0 - clamp((fogdmax - fogdist) / (fogdmax - fogdmin), 0.0, 1.0)); 24 | } 25 | -------------------------------------------------------------------------------- /resources/ps1/engine/shaders/code/GLSL/block/vertex.glsl: -------------------------------------------------------------------------------- 1 | layout (location = 0) in uint data1; 2 | // [8 bits: X][16 bits: Y][8 bits: Z] 3 | layout (location = 1) in uint data2; 4 | // [3 bits: reserved][5 bits: R][3 bits: reserved][5 bits: G][3 bits: reserved][5 bits: B][3 bits: reserved][5 bits: natural] 5 | layout (location = 2) in uint data3; 6 | // [16 bits: texture offset][8 bits: animation offset][8 bits: animation divisor] 7 | layout (location = 3) in uint data4; 8 | // [8 bits: texture X][8 bits: texture Y][6 bits: reserved][2 bits: transparency][3 bits: reserved][1 bit: X + 1][1 bit: Y + 1][1 bit: Z + 1][1 bit: texture X + 1][1 bit: texture Y + 1] 9 | uniform mat4 view; 10 | uniform mat4 projection; 11 | uniform vec2 ccoord; 12 | uniform uint aniMult; 13 | uniform vec3 natLight; 14 | uniform vec3 skycolor; 15 | 16 | noperspective out vec2 texCoord; 17 | flat out uint transparency; 18 | out vec3 fragPos; 19 | out float texOffset; 20 | out vec3 light; 21 | 22 | void main() { 23 | fragPos.x = (float(((data1 >> 24) & uint(255)) + ((data4 >> 4) & uint(1)))) / 16.0 - 8.0; 24 | fragPos.y = (float(((data1 >> 8) & uint(65535)) + ((data4 >> 3) & uint(1)))) / 16.0; 25 | fragPos.z = ((float((data1 & uint(255)) + ((data4 >> 2) & uint(1)))) / 16.0 - 8.0) * -1.0; 26 | texCoord.x = (float(((data4 >> 24) & uint(255)) + ((data4 >> 1) & uint(1)))) / 16.0; 27 | texCoord.y = (float(((data4 >> 16) & uint(255)) + (data4 & uint(1)))) / 16.0; 28 | transparency = (data4 >> 8) & uint(3); 29 | fragPos += vec3(ccoord.x, 0.0, ccoord.y) * 16.0; 30 | texOffset = float(((data3 >> 16) & uint(65535)) + ((aniMult / (data3 & uint(255))) % ((data3 >> 8) & uint(255)))); 31 | vec3 nat = pow((natLight * 0.8 + skycolor * 0.2) * ((float(data2 & uint(31)) + 14.0) / 45.0), vec3(2.0)); 32 | light.r = float((data2 >> 24) & uint(31)) / 31.0; 33 | light.g = float((data2 >> 16) & uint(31)) / 31.0; 34 | light.b = float((data2 >> 8) & uint(31)) / 31.0; 35 | light.rgb += nat; 36 | vec4 vertpos = projection * view * vec4(fragPos, 1.0); 37 | gl_Position = vertpos; 38 | gl_Position.xyz /= vertpos.w; 39 | gl_Position.x = floor(gl_Position.x * 320.0) / 320.0; 40 | gl_Position.y = floor(gl_Position.y * 240.0) / 240.0; 41 | gl_Position.z = floor(gl_Position.z * 32768.0) / 32768.0; 42 | gl_Position.xyz *= vertpos.w; 43 | } 44 | -------------------------------------------------------------------------------- /resources/ps1/engine/shaders/code/GLSL/framebuffer/fragment.glsl: -------------------------------------------------------------------------------- 1 | in vec2 texCoord; 2 | uniform sampler2D texData; 3 | uniform vec3 mcolor; 4 | uniform int fbtype; 5 | uniform vec2 fbsize; 6 | 7 | uniform float h; 8 | uniform float s; 9 | uniform float v; 10 | 11 | out vec4 fragColor; 12 | 13 | vec3 rgb2hsv(vec3 c) { 14 | vec4 K = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0); 15 | vec4 p = mix(vec4(c.bg, K.wz), vec4(c.gb, K.xy), step(c.b, c.g)); 16 | vec4 q = mix(vec4(p.xyw, c.r), vec4(c.r, p.yzx), step(p.x, c.r)); 17 | float d = q.x - min(q.w, q.y); 18 | float e = 1.0e-10; 19 | return vec3(abs(q.z + (q.w - q.y) / (6.0 * d + e)), d / (q.x + e), q.x); 20 | } 21 | 22 | vec3 hsv2rgb(vec3 c) { 23 | vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0); 24 | vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www); 25 | return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y); 26 | } 27 | 28 | void main() { 29 | vec2 texCoord2; 30 | if (fbtype == 0) { 31 | texCoord2.x = floor(texCoord.x * 320.0) / 320.0; 32 | texCoord2.y = floor(texCoord.y * 240.0) / 240.0; 33 | } else { 34 | texCoord2 = texCoord; 35 | } 36 | fragColor = texture(texData, texCoord2); 37 | float mult = 31.0; 38 | fragColor = floor(fragColor * mult); 39 | fragColor /= mult; 40 | if (fbtype == 0) { 41 | vec3 hsvFrag = rgb2hsv(fragColor.rgb); 42 | hsvFrag.x *= (1.0 + h); 43 | hsvFrag.y *= (1.0 + s); 44 | hsvFrag.z *= (1.0 + v); 45 | fragColor.rgb = hsv2rgb(hsvFrag) * mcolor; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /resources/ps1/info.inf: -------------------------------------------------------------------------------- 1 | name=PS1 shader 2 | id=ps1 3 | -------------------------------------------------------------------------------- /src/common/blocks.h: -------------------------------------------------------------------------------- 1 | #if defined(MODULE_GAME) || defined(MODULE_SERVER) 2 | 3 | #ifndef COMMON_BLOCKS_H 4 | #define COMMON_BLOCKS_H 5 | 6 | #include 7 | #include 8 | 9 | struct blockinfo_data { 10 | char* name; 11 | char* id; 12 | int8_t transparency; 13 | char* texstr[6]; 14 | uint16_t texstart; 15 | uint16_t texcount; 16 | uint16_t texoff[6]; 17 | uint8_t anict[6]; 18 | uint8_t anidiv; 19 | float light_r; 20 | float light_g; 21 | float light_b; 22 | bool backfaces; 23 | }; 24 | 25 | struct blockinfo { 26 | char* id; 27 | struct blockinfo_data data[64]; 28 | }; 29 | 30 | extern struct blockinfo blockinf[256]; 31 | 32 | void initBlocks(void); 33 | int blockNoFromID(char*); 34 | int blockSubNoFromID(int, char*); 35 | 36 | #define BLOCKNO_NULL (0) 37 | #define BLOCKNO_BORDER (255) 38 | 39 | #endif 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /src/common/collision.c: -------------------------------------------------------------------------------- 1 | #if defined(MODULE_GAME) || defined(MODULE_SERVER) 2 | 3 | #include
4 | #include "collision.h" 5 | 6 | #include 7 | 8 | struct _phys_box { 9 | float maxx; 10 | float maxy; 11 | float maxz; 12 | float minx; 13 | float miny; 14 | float minz; 15 | float density; 16 | }; 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /src/common/collision.h: -------------------------------------------------------------------------------- 1 | #if defined(MODULE_GAME) || defined(MODULE_SERVER) 2 | 3 | #ifndef COMMON_COLLISION_H 4 | #define COMMON_COLLISION_H 5 | 6 | struct phys_point { 7 | float x; 8 | float y; 9 | float z; 10 | }; 11 | 12 | struct phys_ray { 13 | float x; 14 | float y; 15 | float z; 16 | float rotx; 17 | float roty; 18 | float rotz; 19 | float dist; 20 | }; 21 | 22 | struct phys_box { 23 | float x; 24 | float y; 25 | float z; 26 | float sizex; 27 | float sizey; 28 | float sizez; 29 | float density; 30 | }; 31 | 32 | void phys_box_collide_boxes(struct phys_box* /*box*/, struct phys_box* /*new_state*/, struct phys_box** /*colliders*/, int /*colider_count*/, float /*step*/); 33 | struct phys_point phys_ray_collide_boxes(struct phys_ray* /*ray*/ , struct phys_box** /*colliders*/, int /*colider_count*/, float /*step*/); 34 | 35 | #endif 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /src/common/common.h: -------------------------------------------------------------------------------- 1 | #ifndef COMMON_COMMON_H 2 | #define COMMON_COMMON_H 3 | 4 | #include 5 | #include 6 | #include 7 | #ifdef _WIN32 8 | #include 9 | #endif 10 | 11 | typedef struct { 12 | long size; 13 | unsigned char* data; 14 | } file_data; 15 | 16 | #define FILEDATA_NULL (file_data){0, NULL} 17 | #define FILEDATA_ERROR (file_data){-1, NULL} 18 | 19 | #define GCBUFSIZE 32768 20 | 21 | int isFile(char*); 22 | bool rm(char*); 23 | bool md(char*); 24 | file_data getFile(char*, char*); 25 | file_data getBinFile(char*); 26 | file_data getTextFile(char*); 27 | file_data catFiles(file_data, bool, file_data, bool); 28 | file_data catTextFiles(file_data, bool, file_data, bool); 29 | void addTextToFile(file_data*, char*); 30 | void freeFile(file_data); 31 | void getInfoVar(char*, char*, char*, long, char*); 32 | char* getInfoVarAlloc(char*, char*, char*, long); 33 | char* getInfoVarStatic(char*, char*, char*, long); 34 | void setRandSeed(int, uint64_t); 35 | uint8_t getRandByte(int); 36 | uint16_t getRandWord(int); 37 | uint32_t getRandDWord(int); 38 | uint64_t getRandQWord(int); 39 | uint64_t altutime(void); 40 | void microwait(uint64_t); 41 | char* basefilename(char*); 42 | char* pathfilename(char*); 43 | char* execpath(void); 44 | int getCoreCt(void); 45 | char* spCharToStr(char); 46 | bool getBool(char*); 47 | int readStrUntil(char*, char, char*); 48 | int ezCompress(int, unsigned, void*, unsigned, void*); 49 | int ezDecompress(unsigned, void*, unsigned, void*); 50 | 51 | #ifdef _WIN32 52 | extern LARGE_INTEGER perfctfreq; 53 | #endif 54 | 55 | #endif 56 | -------------------------------------------------------------------------------- /src/common/config.h: -------------------------------------------------------------------------------- 1 | #ifndef COMMON_CONFIG_H 2 | #define COMMON_CONFIG_H 3 | 4 | #include 5 | 6 | #define CONFIG struct config 7 | 8 | struct config_key { 9 | char* name; 10 | char* value; 11 | bool changed; 12 | }; 13 | 14 | struct config_sect { 15 | char* name; 16 | int keys; 17 | struct config_key* keydata; 18 | bool changed; 19 | }; 20 | 21 | struct config { 22 | int sects; 23 | struct config_sect* sectdata; 24 | bool changed; 25 | }; 26 | 27 | struct config* openConfig(char* /*path*/); 28 | void declareConfigKey(struct config* /*cfg*/, char* /*sect*/, char* /*key*/, char* /*val*/, bool /*overwrite*/); 29 | void deleteConfigKey(struct config* /*cfg*/, char* /*sect*/, char* /*key*/); 30 | char* getConfigKey(struct config* /*cfg*/, char* /*sect*/, char* /*key*/); 31 | bool writeConfig(struct config* /*cfg*/, char* /*path*/); 32 | void closeConfig(struct config* /*cfg*/); 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /src/common/glue.h: -------------------------------------------------------------------------------- 1 | #ifndef COMMON_GLUE_H 2 | #define COMMON_GLUE_H 3 | 4 | #ifndef _WIN32 5 | #define mkdir(x) mkdir(x, (S_IRWXU) | (S_IRGRP | S_IXGRP) | (S_IROTH | S_IXOTH)) 6 | #else 7 | #define pause() Sleep(INFINITE) 8 | #define strcasecmp stricmp 9 | #define realpath(x, y) _fullpath(y, x, MAX_PATH) 10 | #endif 11 | 12 | #include 13 | 14 | #ifndef MAX_PATH 15 | #ifdef PATH_MAX 16 | #define MAX_PATH PATH_MAX 17 | #else 18 | #define MAX_PATH 4095 19 | #endif 20 | #endif 21 | 22 | #ifndef _WIN32 23 | #define PATHSEP '/' 24 | #define PATHSEPSTR "/" 25 | #else 26 | #define PATHSEP '\\' 27 | #define PATHSEPSTR "\\" 28 | #endif 29 | 30 | #ifndef _WIN32 31 | #define PRIdz "zd" 32 | #define PRIuz "zu" 33 | #define PRIxz "zx" 34 | #define PRIXz "zX" 35 | #else 36 | #define PRIdz "Id" 37 | #define PRIuz "Iu" 38 | #define PRIxz "Ix" 39 | #define PRIXz "IX" 40 | #endif 41 | 42 | #ifdef __ANDROID__ 43 | #include 44 | #include 45 | #include
46 | #define printf(...) __android_log_print(ANDROID_LOG_INFO, PROG_NAME, __VA_ARGS__) 47 | #define fprintf(f, ...) {\ 48 | if ((f) == stderr) {\ 49 | __android_log_print(ANDROID_LOG_ERROR, PROG_NAME, __VA_ARGS__);\ 50 | } else if ((f) == stdout) {\ 51 | __android_log_print(ANDROID_LOG_INFO, PROG_NAME, __VA_ARGS__);\ 52 | }\ 53 | } 54 | #define puts(str) __android_log_write(ANDROID_LOG_INFO, PROG_NAME, str) 55 | #define fputs(str, f) {\ 56 | if ((f) == stderr) {\ 57 | __android_log_write(ANDROID_LOG_ERROR, PROG_NAME, str);\ 58 | } else if ((f) == stdout) {\ 59 | __android_log_write(ANDROID_LOG_INFO, PROG_NAME, str);\ 60 | }\ 61 | } 62 | #endif 63 | 64 | #endif 65 | -------------------------------------------------------------------------------- /src/common/noise.h: -------------------------------------------------------------------------------- 1 | #if defined(MODULE_SERVER) 2 | 3 | #ifndef COMMON_NOISE_H 4 | #define COMMON_NOISE_H 5 | 6 | #ifndef NOISE_TABLES 7 | #define NOISE_TABLES 64 8 | #endif 9 | 10 | #include 11 | 12 | #define noiseint int64_t 13 | #define noisefloat double 14 | #define perm_t int 15 | #define noise_t float 16 | 17 | void initNoiseTable(int); 18 | noise_t noise2d(int, noisefloat, noisefloat); 19 | noise_t nnoise2d(int, noisefloat, noisefloat); 20 | noise_t perlin2d(int, noisefloat, noisefloat, noisefloat, int); 21 | noise_t nperlin2d(int, noisefloat, noisefloat, noisefloat, int); 22 | noise_t noise2(int, noisefloat, noisefloat); 23 | noise_t noise3(int, noisefloat, noisefloat, noisefloat); 24 | 25 | #endif 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /src/common/resource.h: -------------------------------------------------------------------------------- 1 | #ifndef COMMON_RESOURCE_H 2 | #define COMMON_RESOURCE_H 3 | 4 | #include 5 | 6 | typedef file_data resdata_file; 7 | 8 | typedef struct { 9 | int width; 10 | int height; 11 | int channels; 12 | unsigned char* data; 13 | } resdata_image; 14 | 15 | enum { 16 | RESOURCE_TEXTFILE, 17 | RESOURCE_BINFILE, 18 | RESOURCE_IMAGE, 19 | RESOURCE_SOUND, 20 | }; 21 | 22 | void initResource(void); 23 | void* loadResource(int, char*); 24 | int resourceExists(char*); 25 | void setResourcePacks(int, char**); 26 | void freeResource(void*); 27 | void freeAllResources(void); 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /src/game/game.h: -------------------------------------------------------------------------------- 1 | #if defined(MODULE_GAME) 2 | 3 | #ifndef GAME_GAME_H 4 | #define GAME_GAME_H 5 | 6 | #include 7 | 8 | #include 9 | 10 | enum { 11 | UILAYER_CLIENT, // For client UI (chat, hotbar, etc.) 12 | UILAYER_SERVER, // For server UI (inventory, block-specific menus, etc.) 13 | UILAYER_DBGINF, // For debug info 14 | UILAYER_INGAME, // For in-game menu (main menu and pressing Esc while in a game) 15 | }; 16 | 17 | bool doGame(); 18 | 19 | extern double fps; 20 | extern double realfps; 21 | extern bool showDebugInfo; 22 | extern coord_3d_dbl pcoord; 23 | extern coord_3d pvelocity; 24 | extern int pblockx, pblocky, pblockz; 25 | 26 | extern bool debug_wireframe; 27 | extern bool debug_nocavecull; 28 | 29 | extern struct ui_layer* game_ui[4]; 30 | 31 | #endif 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /src/game/input.h: -------------------------------------------------------------------------------- 1 | #if defined(MODULE_GAME) 2 | 3 | #ifndef GAME_INPUT_H 4 | #define GAME_INPUT_H 5 | 6 | #include 7 | #include 8 | 9 | enum { 10 | INPUT_MODE_UI, 11 | INPUT_MODE_GAME, 12 | INPUT_MODE_TEXTINPUT, 13 | }; 14 | 15 | enum { 16 | INPUT_ACTION_MULTI__NONE, 17 | INPUT_ACTION_MULTI_PLACE, 18 | INPUT_ACTION_MULTI_DESTROY, 19 | INPUT_ACTION_MULTI_PICK, 20 | INPUT_ACTION_MULTI_ZOOM, 21 | INPUT_ACTION_MULTI_JUMP, 22 | INPUT_ACTION_MULTI_CROUCH, 23 | INPUT_ACTION_MULTI_RUN, 24 | INPUT_ACTION_MULTI_PLAYERLIST, 25 | INPUT_ACTION_MULTI_DEBUG, 26 | INPUT_ACTION_MULTI__MAX, 27 | }; 28 | 29 | #define INPUT_GETMAFLAG(x) (1 << ((x) - 1)) 30 | 31 | enum { 32 | INPUT_ACTION_SINGLE__NONE = -1, 33 | INPUT_ACTION_SINGLE_ESC, 34 | INPUT_ACTION_SINGLE_INV, 35 | INPUT_ACTION_SINGLE_INV_0, 36 | INPUT_ACTION_SINGLE_INV_1, 37 | INPUT_ACTION_SINGLE_INV_2, 38 | INPUT_ACTION_SINGLE_INV_3, 39 | INPUT_ACTION_SINGLE_INV_4, 40 | INPUT_ACTION_SINGLE_INV_5, 41 | INPUT_ACTION_SINGLE_INV_6, 42 | INPUT_ACTION_SINGLE_INV_7, 43 | INPUT_ACTION_SINGLE_INV_8, 44 | INPUT_ACTION_SINGLE_INV_9, 45 | INPUT_ACTION_SINGLE_INV_NEXT, 46 | INPUT_ACTION_SINGLE_INV_PREV, 47 | INPUT_ACTION_SINGLE_INVOFF_NEXT, 48 | INPUT_ACTION_SINGLE_INVOFF_PREV, 49 | INPUT_ACTION_SINGLE_ROT_X, 50 | INPUT_ACTION_SINGLE_ROT_Y, 51 | INPUT_ACTION_SINGLE_ROT_Z, 52 | INPUT_ACTION_SINGLE_CHAT, 53 | INPUT_ACTION_SINGLE_COMMAND, 54 | INPUT_ACTION_SINGLE_FULLSCR, 55 | INPUT_ACTION_SINGLE_DEBUG, 56 | //INPUT_ACTION_SINGLE_LCLICK, // move to INPUT_ACTION_UI 57 | //INPUT_ACTION_SINGLE_RCLICK, // move to INPUT_ACTION_UI 58 | INPUT_ACTION_SINGLE__MAX, 59 | }; 60 | 61 | struct input_info { 62 | bool focus; 63 | unsigned multi_actions; 64 | int single_action; 65 | float mov_mult; 66 | float mov_up; 67 | float mov_right; 68 | float mov_bal; 69 | float rot_mult_x; 70 | float rot_mult_y; 71 | float rot_up; 72 | float rot_right; 73 | int ui_mouse_x; 74 | int ui_mouse_y; 75 | int ui_mouse_click; 76 | }; 77 | 78 | extern int inputMode; 79 | 80 | void setInputMode(int); 81 | bool initInput(void); 82 | void resetInput(void); 83 | void getInput(struct input_info*); 84 | 85 | #define INPUT_EMPTY_INFO (struct input_info){false, INPUT_ACTION_MULTI__NONE, INPUT_ACTION_SINGLE__NONE, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0, 0, 0} 86 | 87 | #endif 88 | 89 | #endif 90 | -------------------------------------------------------------------------------- /src/graphics/cglm/applesimd.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c), Recep Aslantas. 3 | * 4 | * MIT License (MIT), http://opensource.org/licenses/MIT 5 | * Full license can be found in the LICENSE file 6 | */ 7 | 8 | #ifndef cglm_applesimd_h 9 | #define cglm_applesimd_h 10 | #if defined(__APPLE__) \ 11 | && defined(SIMD_COMPILER_HAS_REQUIRED_FEATURES) \ 12 | && defined(SIMD_BASE) \ 13 | && defined(SIMD_TYPES) \ 14 | && defined(SIMD_VECTOR_TYPES) 15 | 16 | #include "common.h" 17 | 18 | /*! 19 | * @brief converts mat4 to Apple's simd type simd_float4x4 20 | * @return simd_float4x4 21 | */ 22 | CGLM_INLINE 23 | simd_float4x4 24 | glm_mat4_applesimd(mat4 m) { 25 | simd_float4x4 t; 26 | 27 | t.columns[0][0] = m[0][0]; 28 | t.columns[0][1] = m[0][1]; 29 | t.columns[0][2] = m[0][2]; 30 | t.columns[0][3] = m[0][3]; 31 | 32 | t.columns[1][0] = m[1][0]; 33 | t.columns[1][1] = m[1][1]; 34 | t.columns[1][2] = m[1][2]; 35 | t.columns[1][3] = m[1][3]; 36 | 37 | t.columns[2][0] = m[2][0]; 38 | t.columns[2][1] = m[2][1]; 39 | t.columns[2][2] = m[2][2]; 40 | t.columns[2][3] = m[2][3]; 41 | 42 | t.columns[3][0] = m[3][0]; 43 | t.columns[3][1] = m[3][1]; 44 | t.columns[3][2] = m[3][2]; 45 | t.columns[3][3] = m[3][3]; 46 | 47 | return t; 48 | } 49 | 50 | /*! 51 | * @brief converts mat3 to Apple's simd type simd_float3x3 52 | * @return simd_float3x3 53 | */ 54 | CGLM_INLINE 55 | simd_float3x3 56 | glm_mat3_applesimd(mat3 m) { 57 | simd_float3x3 t; 58 | 59 | t.columns[0][0] = m[0][0]; 60 | t.columns[0][1] = m[0][1]; 61 | t.columns[0][2] = m[0][2]; 62 | 63 | t.columns[1][0] = m[1][0]; 64 | t.columns[1][1] = m[1][1]; 65 | t.columns[1][2] = m[1][2]; 66 | 67 | t.columns[2][0] = m[2][0]; 68 | t.columns[2][1] = m[2][1]; 69 | t.columns[2][2] = m[2][2]; 70 | 71 | return t; 72 | } 73 | 74 | /*! 75 | * @brief converts vec4 to Apple's simd type simd_float4 76 | * @return simd_float4 77 | */ 78 | CGLM_INLINE 79 | simd_float4 80 | glm_vec4_applesimd(vec4 v) { 81 | return (simd_float4){v[0], v[1], v[2], v[3]}; 82 | } 83 | 84 | /*! 85 | * @brief converts vec3 to Apple's simd type simd_float3 86 | * @return v 87 | */ 88 | CGLM_INLINE 89 | simd_float3 90 | glm_vec3_applesimd(vec3 v) { 91 | return (simd_float3){v[0], v[1], v[2]}; 92 | } 93 | 94 | #endif 95 | #endif /* cglm_applesimd_h */ 96 | -------------------------------------------------------------------------------- /src/graphics/cglm/call.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c), Recep Aslantas. 3 | * 4 | * MIT License (MIT), http://opensource.org/licenses/MIT 5 | * Full license can be found in the LICENSE file 6 | */ 7 | 8 | #ifndef cglm_call_h 9 | #define cglm_call_h 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | #include "cglm.h" 15 | #include "call/vec2.h" 16 | #include "call/vec3.h" 17 | #include "call/vec4.h" 18 | #include "call/ivec2.h" 19 | #include "call/ivec3.h" 20 | #include "call/ivec4.h" 21 | #include "call/mat2.h" 22 | #include "call/mat3.h" 23 | #include "call/mat4.h" 24 | #include "call/affine.h" 25 | #include "call/cam.h" 26 | #include "call/quat.h" 27 | #include "call/euler.h" 28 | #include "call/plane.h" 29 | #include "call/frustum.h" 30 | #include "call/box.h" 31 | #include "call/io.h" 32 | #include "call/project.h" 33 | #include "call/sphere.h" 34 | #include "call/ease.h" 35 | #include "call/curve.h" 36 | #include "call/bezier.h" 37 | #include "call/ray.h" 38 | #include "call/affine2d.h" 39 | 40 | #ifdef __cplusplus 41 | } 42 | #endif 43 | #endif /* cglm_call_h */ 44 | -------------------------------------------------------------------------------- /src/graphics/cglm/call/affine2d.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c), Recep Aslantas. 3 | * 4 | * MIT License (MIT), http://opensource.org/licenses/MIT 5 | * Full license can be found in the LICENSE file 6 | */ 7 | 8 | #ifndef cglmc_affine2d_h 9 | #define cglmc_affine2d_h 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | #include "../cglm.h" 15 | 16 | CGLM_EXPORT 17 | void 18 | glmc_translate2d_make(mat3 m, vec2 v); 19 | 20 | CGLM_EXPORT 21 | void 22 | glmc_translate2d_to(mat3 m, vec2 v, mat3 dest); 23 | 24 | CGLM_EXPORT 25 | void 26 | glmc_translate2d(mat3 m, vec2 v); 27 | 28 | CGLM_EXPORT 29 | void 30 | glmc_translate2d_x(mat3 m, float to); 31 | 32 | CGLM_EXPORT 33 | void 34 | glmc_translate2d_y(mat3 m, float to); 35 | 36 | CGLM_EXPORT 37 | void 38 | glmc_scale2d_to(mat3 m, vec2 v, mat3 dest); 39 | 40 | CGLM_EXPORT 41 | void 42 | glmc_scale2d_make(mat3 m, vec2 v); 43 | 44 | CGLM_EXPORT 45 | void 46 | glmc_scale2d(mat3 m, vec2 v); 47 | 48 | CGLM_EXPORT 49 | void 50 | glmc_scale2d_uni(mat3 m, float s); 51 | 52 | CGLM_EXPORT 53 | void 54 | glmc_rotate2d_make(mat3 m, float angle); 55 | 56 | CGLM_EXPORT 57 | void 58 | glmc_rotate2d(mat3 m, float angle); 59 | 60 | CGLM_EXPORT 61 | void 62 | glmc_rotate2d_to(mat3 m, float angle, mat3 dest); 63 | 64 | #ifdef __cplusplus 65 | } 66 | #endif 67 | #endif /* cglmc_affine2d_h */ 68 | -------------------------------------------------------------------------------- /src/graphics/cglm/call/bezier.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c), Recep Aslantas. 3 | * 4 | * MIT License (MIT), http://opensource.org/licenses/MIT 5 | * Full license can be found in the LICENSE file 6 | */ 7 | 8 | #ifndef cglmc_bezier_h 9 | #define cglmc_bezier_h 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | #include "../cglm.h" 15 | 16 | CGLM_EXPORT 17 | float 18 | glmc_bezier(float s, float p0, float c0, float c1, float p1); 19 | 20 | CGLM_EXPORT 21 | float 22 | glmc_hermite(float s, float p0, float t0, float t1, float p1); 23 | 24 | CGLM_EXPORT 25 | float 26 | glmc_decasteljau(float prm, float p0, float c0, float c1, float p1); 27 | 28 | #ifdef __cplusplus 29 | } 30 | #endif 31 | #endif /* cglmc_bezier_h */ 32 | -------------------------------------------------------------------------------- /src/graphics/cglm/call/box.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c), Recep Aslantas. 3 | * 4 | * MIT License (MIT), http://opensource.org/licenses/MIT 5 | * Full license can be found in the LICENSE file 6 | */ 7 | 8 | #ifndef cglmc_box_h 9 | #define cglmc_box_h 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | #include "../cglm.h" 15 | 16 | CGLM_EXPORT 17 | void 18 | glmc_aabb_transform(vec3 box[2], mat4 m, vec3 dest[2]); 19 | 20 | CGLM_EXPORT 21 | void 22 | glmc_aabb_merge(vec3 box1[2], vec3 box2[2], vec3 dest[2]); 23 | 24 | CGLM_EXPORT 25 | void 26 | glmc_aabb_crop(vec3 box[2], vec3 cropBox[2], vec3 dest[2]); 27 | 28 | CGLM_EXPORT 29 | void 30 | glmc_aabb_crop_until(vec3 box[2], 31 | vec3 cropBox[2], 32 | vec3 clampBox[2], 33 | vec3 dest[2]); 34 | 35 | CGLM_EXPORT 36 | bool 37 | glmc_aabb_frustum(vec3 box[2], vec4 planes[6]); 38 | 39 | CGLM_EXPORT 40 | void 41 | glmc_aabb_invalidate(vec3 box[2]); 42 | 43 | CGLM_EXPORT 44 | bool 45 | glmc_aabb_isvalid(vec3 box[2]); 46 | 47 | CGLM_EXPORT 48 | float 49 | glmc_aabb_size(vec3 box[2]); 50 | 51 | CGLM_EXPORT 52 | float 53 | glmc_aabb_radius(vec3 box[2]); 54 | 55 | CGLM_EXPORT 56 | void 57 | glmc_aabb_center(vec3 box[2], vec3 dest); 58 | 59 | CGLM_EXPORT 60 | bool 61 | glmc_aabb_aabb(vec3 box[2], vec3 other[2]); 62 | 63 | CGLM_EXPORT 64 | bool 65 | glmc_aabb_point(vec3 box[2], vec3 point); 66 | 67 | CGLM_EXPORT 68 | bool 69 | glmc_aabb_contains(vec3 box[2], vec3 other[2]); 70 | 71 | CGLM_EXPORT 72 | bool 73 | glmc_aabb_sphere(vec3 box[2], vec4 s); 74 | 75 | #ifdef __cplusplus 76 | } 77 | #endif 78 | #endif /* cglmc_box_h */ 79 | 80 | -------------------------------------------------------------------------------- /src/graphics/cglm/call/clipspace/ortho_lh_no.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c), Recep Aslantas. 3 | * 4 | * MIT License (MIT), http://opensource.org/licenses/MIT 5 | * Full license can be found in the LICENSE file 6 | */ 7 | 8 | #ifndef cglmc_ortho_lh_no_h 9 | #define cglmc_ortho_lh_no_h 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | #include "../../cglm.h" 15 | 16 | CGLM_EXPORT 17 | void 18 | glmc_ortho_lh_no(float left, float right, 19 | float bottom, float top, 20 | float nearZ, float farZ, 21 | mat4 dest); 22 | 23 | CGLM_EXPORT 24 | void 25 | glmc_ortho_aabb_lh_no(vec3 box[2], mat4 dest); 26 | 27 | CGLM_EXPORT 28 | void 29 | glmc_ortho_aabb_p_lh_no(vec3 box[2], float padding, mat4 dest); 30 | 31 | CGLM_EXPORT 32 | void 33 | glmc_ortho_aabb_pz_lh_no(vec3 box[2], float padding, mat4 dest); 34 | 35 | CGLM_EXPORT 36 | void 37 | glmc_ortho_default_lh_no(float aspect, mat4 dest); 38 | 39 | CGLM_EXPORT 40 | void 41 | glmc_ortho_default_s_lh_no(float aspect, float size, mat4 dest); 42 | 43 | #ifdef __cplusplus 44 | } 45 | #endif 46 | #endif /* cglmc_ortho_lh_no_h */ 47 | -------------------------------------------------------------------------------- /src/graphics/cglm/call/clipspace/ortho_lh_zo.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c), Recep Aslantas. 3 | * 4 | * MIT License (MIT), http://opensource.org/licenses/MIT 5 | * Full license can be found in the LICENSE file 6 | */ 7 | 8 | #ifndef cglmc_ortho_lh_zo_h 9 | #define cglmc_ortho_lh_zo_h 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | #include "../../cglm.h" 15 | 16 | CGLM_EXPORT 17 | void 18 | glmc_ortho_lh_zo(float left, float right, 19 | float bottom, float top, 20 | float nearZ, float farZ, 21 | mat4 dest); 22 | 23 | CGLM_EXPORT 24 | void 25 | glmc_ortho_aabb_lh_zo(vec3 box[2], mat4 dest); 26 | 27 | CGLM_EXPORT 28 | void 29 | glmc_ortho_aabb_p_lh_zo(vec3 box[2], float padding, mat4 dest); 30 | 31 | CGLM_EXPORT 32 | void 33 | glmc_ortho_aabb_pz_lh_zo(vec3 box[2], float padding, mat4 dest); 34 | 35 | CGLM_EXPORT 36 | void 37 | glmc_ortho_default_lh_zo(float aspect, mat4 dest); 38 | 39 | CGLM_EXPORT 40 | void 41 | glmc_ortho_default_s_lh_zo(float aspect, float size, mat4 dest); 42 | 43 | #ifdef __cplusplus 44 | } 45 | #endif 46 | #endif /* cglmc_ortho_lh_zo_h */ 47 | -------------------------------------------------------------------------------- /src/graphics/cglm/call/clipspace/ortho_rh_no.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c), Recep Aslantas. 3 | * 4 | * MIT License (MIT), http://opensource.org/licenses/MIT 5 | * Full license can be found in the LICENSE file 6 | */ 7 | 8 | #ifndef cglmc_ortho_rh_no_h 9 | #define cglmc_ortho_rh_no_h 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | #include "../../cglm.h" 15 | 16 | CGLM_EXPORT 17 | void 18 | glmc_ortho_rh_no(float left, float right, 19 | float bottom, float top, 20 | float nearZ, float farZ, 21 | mat4 dest); 22 | 23 | CGLM_EXPORT 24 | void 25 | glmc_ortho_aabb_rh_no(vec3 box[2], mat4 dest); 26 | 27 | CGLM_EXPORT 28 | void 29 | glmc_ortho_aabb_p_rh_no(vec3 box[2], float padding, mat4 dest); 30 | 31 | CGLM_EXPORT 32 | void 33 | glmc_ortho_aabb_pz_rh_no(vec3 box[2], float padding, mat4 dest); 34 | 35 | CGLM_EXPORT 36 | void 37 | glmc_ortho_default_rh_no(float aspect, mat4 dest); 38 | 39 | CGLM_EXPORT 40 | void 41 | glmc_ortho_default_s_rh_no(float aspect, float size, mat4 dest); 42 | 43 | #ifdef __cplusplus 44 | } 45 | #endif 46 | #endif /* cglmc_ortho_rh_no_h */ 47 | -------------------------------------------------------------------------------- /src/graphics/cglm/call/clipspace/ortho_rh_zo.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c), Recep Aslantas. 3 | * 4 | * MIT License (MIT), http://opensource.org/licenses/MIT 5 | * Full license can be found in the LICENSE file 6 | */ 7 | 8 | #ifndef cglmc_ortho_rh_zo_h 9 | #define cglmc_ortho_rh_zo_h 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | #include "../../cglm.h" 15 | 16 | CGLM_EXPORT 17 | void 18 | glmc_ortho_rh_zo(float left, float right, 19 | float bottom, float top, 20 | float nearZ, float farZ, 21 | mat4 dest); 22 | 23 | CGLM_EXPORT 24 | void 25 | glmc_ortho_aabb_rh_zo(vec3 box[2], mat4 dest); 26 | 27 | CGLM_EXPORT 28 | void 29 | glmc_ortho_aabb_p_rh_zo(vec3 box[2], float padding, mat4 dest); 30 | 31 | CGLM_EXPORT 32 | void 33 | glmc_ortho_aabb_pz_rh_zo(vec3 box[2], float padding, mat4 dest); 34 | 35 | CGLM_EXPORT 36 | void 37 | glmc_ortho_default_rh_zo(float aspect, mat4 dest); 38 | 39 | CGLM_EXPORT 40 | void 41 | glmc_ortho_default_s_rh_zo(float aspect, float size, mat4 dest); 42 | 43 | #ifdef __cplusplus 44 | } 45 | #endif 46 | #endif /* cglmc_ortho_rh_zo_h */ 47 | -------------------------------------------------------------------------------- /src/graphics/cglm/call/clipspace/persp_lh_no.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c), Recep Aslantas. 3 | * 4 | * MIT License (MIT), http://opensource.org/licenses/MIT 5 | * Full license can be found in the LICENSE file 6 | */ 7 | 8 | #ifndef cglmc_persp_lh_no_h 9 | #define cglmc_persp_lh_no_h 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | #include "../../cglm.h" 15 | 16 | CGLM_EXPORT 17 | void 18 | glmc_frustum_lh_no(float left, float right, 19 | float bottom, float top, 20 | float nearZ, float farZ, 21 | mat4 dest); 22 | 23 | CGLM_EXPORT 24 | void 25 | glmc_perspective_lh_no(float fovy, 26 | float aspect, 27 | float nearVal, 28 | float farVal, 29 | mat4 dest); 30 | 31 | CGLM_EXPORT 32 | void 33 | glmc_persp_move_far_lh_no(mat4 proj, float deltaFar); 34 | 35 | CGLM_EXPORT 36 | void 37 | glmc_persp_decomp_lh_no(mat4 proj, 38 | float * __restrict nearZ, float * __restrict farZ, 39 | float * __restrict top, float * __restrict bottom, 40 | float * __restrict left, float * __restrict right); 41 | 42 | CGLM_EXPORT 43 | void 44 | glmc_persp_decompv_lh_no(mat4 proj, float dest[6]); 45 | 46 | CGLM_EXPORT 47 | void 48 | glmc_persp_decomp_x_lh_no(mat4 proj, 49 | float * __restrict left, 50 | float * __restrict right); 51 | 52 | CGLM_EXPORT 53 | void 54 | glmc_persp_decomp_y_lh_no(mat4 proj, 55 | float * __restrict top, 56 | float * __restrict bottom); 57 | 58 | CGLM_EXPORT 59 | void 60 | glmc_persp_decomp_z_lh_no(mat4 proj, 61 | float * __restrict nearZ, 62 | float * __restrict farZ); 63 | 64 | CGLM_EXPORT 65 | void 66 | glmc_persp_decomp_far_lh_no(mat4 proj, float * __restrict farZ); 67 | 68 | CGLM_EXPORT 69 | void 70 | glmc_persp_decomp_near_lh_no(mat4 proj, float * __restrict nearZ); 71 | 72 | CGLM_EXPORT 73 | void 74 | glmc_persp_sizes_lh_no(mat4 proj, float fovy, vec4 dest); 75 | 76 | CGLM_EXPORT 77 | float 78 | glmc_persp_fovy_lh_no(mat4 proj); 79 | 80 | CGLM_EXPORT 81 | float 82 | glmc_persp_aspect_lh_no(mat4 proj); 83 | 84 | #ifdef __cplusplus 85 | } 86 | #endif 87 | #endif /* cglmc_persp_lh_no_h */ 88 | -------------------------------------------------------------------------------- /src/graphics/cglm/call/clipspace/persp_lh_zo.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c), Recep Aslantas. 3 | * 4 | * MIT License (MIT), http://opensource.org/licenses/MIT 5 | * Full license can be found in the LICENSE file 6 | */ 7 | 8 | #ifndef cglmc_persp_lh_zo_h 9 | #define cglmc_persp_lh_zo_h 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | #include "../../cglm.h" 15 | 16 | CGLM_EXPORT 17 | void 18 | glmc_frustum_lh_zo(float left, float right, 19 | float bottom, float top, 20 | float nearZ, float farZ, 21 | mat4 dest); 22 | 23 | CGLM_EXPORT 24 | void 25 | glmc_perspective_lh_zo(float fovy, 26 | float aspect, 27 | float nearVal, 28 | float farVal, 29 | mat4 dest); 30 | 31 | CGLM_EXPORT 32 | void 33 | glmc_persp_move_far_lh_zo(mat4 proj, float deltaFar); 34 | 35 | CGLM_EXPORT 36 | void 37 | glmc_persp_decomp_lh_zo(mat4 proj, 38 | float * __restrict nearZ, float * __restrict farZ, 39 | float * __restrict top, float * __restrict bottom, 40 | float * __restrict left, float * __restrict right); 41 | 42 | CGLM_EXPORT 43 | void 44 | glmc_persp_decompv_lh_zo(mat4 proj, float dest[6]); 45 | 46 | CGLM_EXPORT 47 | void 48 | glmc_persp_decomp_x_lh_zo(mat4 proj, 49 | float * __restrict left, 50 | float * __restrict right); 51 | 52 | CGLM_EXPORT 53 | void 54 | glmc_persp_decomp_y_lh_zo(mat4 proj, 55 | float * __restrict top, 56 | float * __restrict bottom); 57 | 58 | CGLM_EXPORT 59 | void 60 | glmc_persp_decomp_z_lh_zo(mat4 proj, 61 | float * __restrict nearZ, 62 | float * __restrict farZ); 63 | 64 | CGLM_EXPORT 65 | void 66 | glmc_persp_decomp_far_lh_zo(mat4 proj, float * __restrict farZ); 67 | 68 | CGLM_EXPORT 69 | void 70 | glmc_persp_decomp_near_lh_zo(mat4 proj, float * __restrict nearZ); 71 | 72 | CGLM_EXPORT 73 | void 74 | glmc_persp_sizes_lh_zo(mat4 proj, float fovy, vec4 dest); 75 | 76 | CGLM_EXPORT 77 | float 78 | glmc_persp_fovy_lh_zo(mat4 proj); 79 | 80 | CGLM_EXPORT 81 | float 82 | glmc_persp_aspect_lh_zo(mat4 proj); 83 | 84 | #ifdef __cplusplus 85 | } 86 | #endif 87 | #endif /* cglmc_persp_lh_zo_h */ 88 | -------------------------------------------------------------------------------- /src/graphics/cglm/call/clipspace/persp_rh_no.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c), Recep Aslantas. 3 | * 4 | * MIT License (MIT), http://opensource.org/licenses/MIT 5 | * Full license can be found in the LICENSE file 6 | */ 7 | 8 | #ifndef cglmc_persp_rh_no_h 9 | #define cglmc_persp_rh_no_h 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | #include "../../cglm.h" 15 | 16 | CGLM_EXPORT 17 | void 18 | glmc_frustum_rh_no(float left, float right, 19 | float bottom, float top, 20 | float nearZ, float farZ, 21 | mat4 dest); 22 | 23 | CGLM_EXPORT 24 | void 25 | glmc_perspective_rh_no(float fovy, 26 | float aspect, 27 | float nearVal, 28 | float farVal, 29 | mat4 dest); 30 | 31 | CGLM_EXPORT 32 | void 33 | glmc_persp_move_far_rh_no(mat4 proj, float deltaFar); 34 | 35 | CGLM_EXPORT 36 | void 37 | glmc_persp_decomp_rh_no(mat4 proj, 38 | float * __restrict nearZ, float * __restrict farZ, 39 | float * __restrict top, float * __restrict bottom, 40 | float * __restrict left, float * __restrict right); 41 | 42 | CGLM_EXPORT 43 | void 44 | glmc_persp_decompv_rh_no(mat4 proj, float dest[6]); 45 | 46 | CGLM_EXPORT 47 | void 48 | glmc_persp_decomp_x_rh_no(mat4 proj, 49 | float * __restrict left, 50 | float * __restrict right); 51 | 52 | CGLM_EXPORT 53 | void 54 | glmc_persp_decomp_y_rh_no(mat4 proj, 55 | float * __restrict top, 56 | float * __restrict bottom); 57 | 58 | CGLM_EXPORT 59 | void 60 | glmc_persp_decomp_z_rh_no(mat4 proj, 61 | float * __restrict nearZ, 62 | float * __restrict farZ); 63 | 64 | CGLM_EXPORT 65 | void 66 | glmc_persp_decomp_far_rh_no(mat4 proj, float * __restrict farZ); 67 | 68 | CGLM_EXPORT 69 | void 70 | glmc_persp_decomp_near_rh_no(mat4 proj, float * __restrict nearZ); 71 | 72 | CGLM_EXPORT 73 | void 74 | glmc_persp_sizes_rh_no(mat4 proj, float fovy, vec4 dest); 75 | 76 | CGLM_EXPORT 77 | float 78 | glmc_persp_fovy_rh_no(mat4 proj); 79 | 80 | CGLM_EXPORT 81 | float 82 | glmc_persp_aspect_rh_no(mat4 proj); 83 | 84 | #ifdef __cplusplus 85 | } 86 | #endif 87 | #endif /* cglmc_persp_rh_no_h */ 88 | -------------------------------------------------------------------------------- /src/graphics/cglm/call/clipspace/persp_rh_zo.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c), Recep Aslantas. 3 | * 4 | * MIT License (MIT), http://opensource.org/licenses/MIT 5 | * Full license can be found in the LICENSE file 6 | */ 7 | 8 | #ifndef cglmc_persp_rh_zo_h 9 | #define cglmc_persp_rh_zo_h 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | #include "../../cglm.h" 15 | 16 | CGLM_EXPORT 17 | void 18 | glmc_frustum_rh_zo(float left, float right, 19 | float bottom, float top, 20 | float nearZ, float farZ, 21 | mat4 dest); 22 | 23 | CGLM_EXPORT 24 | void 25 | glmc_perspective_rh_zo(float fovy, 26 | float aspect, 27 | float nearVal, 28 | float farVal, 29 | mat4 dest); 30 | 31 | CGLM_EXPORT 32 | void 33 | glmc_persp_move_far_rh_zo(mat4 proj, float deltaFar); 34 | 35 | CGLM_EXPORT 36 | void 37 | glmc_persp_decomp_rh_zo(mat4 proj, 38 | float * __restrict nearZ, float * __restrict farZ, 39 | float * __restrict top, float * __restrict bottom, 40 | float * __restrict left, float * __restrict right); 41 | 42 | CGLM_EXPORT 43 | void 44 | glmc_persp_decompv_rh_zo(mat4 proj, float dest[6]); 45 | 46 | CGLM_EXPORT 47 | void 48 | glmc_persp_decomp_x_rh_zo(mat4 proj, 49 | float * __restrict left, 50 | float * __restrict right); 51 | 52 | CGLM_EXPORT 53 | void 54 | glmc_persp_decomp_y_rh_zo(mat4 proj, 55 | float * __restrict top, 56 | float * __restrict bottom); 57 | 58 | CGLM_EXPORT 59 | void 60 | glmc_persp_decomp_z_rh_zo(mat4 proj, 61 | float * __restrict nearZ, 62 | float * __restrict farZ); 63 | 64 | CGLM_EXPORT 65 | void 66 | glmc_persp_decomp_far_rh_zo(mat4 proj, float * __restrict farZ); 67 | 68 | CGLM_EXPORT 69 | void 70 | glmc_persp_decomp_near_rh_zo(mat4 proj, float * __restrict nearZ); 71 | 72 | CGLM_EXPORT 73 | void 74 | glmc_persp_sizes_rh_zo(mat4 proj, float fovy, vec4 dest); 75 | 76 | CGLM_EXPORT 77 | float 78 | glmc_persp_fovy_rh_zo(mat4 proj); 79 | 80 | CGLM_EXPORT 81 | float 82 | glmc_persp_aspect_rh_zo(mat4 proj); 83 | 84 | #ifdef __cplusplus 85 | } 86 | #endif 87 | #endif /* cglmc_persp_rh_zo_h */ 88 | -------------------------------------------------------------------------------- /src/graphics/cglm/call/clipspace/project_no.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c), Recep Aslantas. 3 | * 4 | * MIT License (MIT), http://opensource.org/licenses/MIT 5 | * Full license can be found in the LICENSE file 6 | */ 7 | 8 | #ifndef cglmc_project_no_h 9 | #define cglmc_project_no_h 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | #include "../../cglm.h" 15 | 16 | CGLM_EXPORT 17 | void 18 | glmc_unprojecti_no(vec3 pos, mat4 invMat, vec4 vp, vec3 dest); 19 | 20 | CGLM_EXPORT 21 | void 22 | glmc_project_no(vec3 pos, mat4 m, vec4 vp, vec3 dest); 23 | 24 | CGLM_EXPORT 25 | float 26 | glmc_project_z_no(vec3 pos, mat4 m); 27 | 28 | #ifdef __cplusplus 29 | } 30 | #endif 31 | #endif /* cglmc_project_no_h */ 32 | -------------------------------------------------------------------------------- /src/graphics/cglm/call/clipspace/project_zo.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c), Recep Aslantas. 3 | * 4 | * MIT License (MIT), http://opensource.org/licenses/MIT 5 | * Full license can be found in the LICENSE file 6 | */ 7 | 8 | #ifndef cglmc_project_zo_h 9 | #define cglmc_project_zo_h 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | #include "../../cglm.h" 15 | 16 | CGLM_EXPORT 17 | void 18 | glmc_unprojecti_zo(vec3 pos, mat4 invMat, vec4 vp, vec3 dest); 19 | 20 | CGLM_EXPORT 21 | void 22 | glmc_project_zo(vec3 pos, mat4 m, vec4 vp, vec3 dest); 23 | 24 | CGLM_EXPORT 25 | float 26 | glmc_project_z_zo(vec3 pos, mat4 m); 27 | 28 | #ifdef __cplusplus 29 | } 30 | #endif 31 | #endif /* cglmc_project_zo_h */ 32 | -------------------------------------------------------------------------------- /src/graphics/cglm/call/clipspace/view_lh_no.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c), Recep Aslantas. 3 | * 4 | * MIT License (MIT), http://opensource.org/licenses/MIT 5 | * Full license can be found in the LICENSE file 6 | */ 7 | 8 | #ifndef cglmc_view_lh_no_h 9 | #define cglmc_view_lh_no_h 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | #include "../../cglm.h" 15 | 16 | CGLM_EXPORT 17 | void 18 | glmc_lookat_lh_no(vec3 eye, vec3 center, vec3 up, mat4 dest); 19 | 20 | CGLM_EXPORT 21 | void 22 | glmc_look_lh_no(vec3 eye, vec3 dir, vec3 up, mat4 dest); 23 | 24 | CGLM_EXPORT 25 | void 26 | glmc_look_anyup_lh_no(vec3 eye, vec3 dir, mat4 dest); 27 | 28 | #ifdef __cplusplus 29 | } 30 | #endif 31 | #endif /* cglmc_view_lh_no_h */ 32 | -------------------------------------------------------------------------------- /src/graphics/cglm/call/clipspace/view_lh_zo.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c), Recep Aslantas. 3 | * 4 | * MIT License (MIT), http://opensource.org/licenses/MIT 5 | * Full license can be found in the LICENSE file 6 | */ 7 | 8 | #ifndef cglmc_view_lh_zo_h 9 | #define cglmc_view_lh_zo_h 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | #include "../../cglm.h" 15 | 16 | CGLM_EXPORT 17 | void 18 | glmc_lookat_lh_zo(vec3 eye, vec3 center, vec3 up, mat4 dest); 19 | 20 | CGLM_EXPORT 21 | void 22 | glmc_look_lh_zo(vec3 eye, vec3 dir, vec3 up, mat4 dest); 23 | 24 | CGLM_EXPORT 25 | void 26 | glmc_look_anyup_lh_zo(vec3 eye, vec3 dir, mat4 dest); 27 | 28 | #ifdef __cplusplus 29 | } 30 | #endif 31 | #endif /* cglmc_view_lh_zo_h */ 32 | -------------------------------------------------------------------------------- /src/graphics/cglm/call/clipspace/view_rh_no.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c), Recep Aslantas. 3 | * 4 | * MIT License (MIT), http://opensource.org/licenses/MIT 5 | * Full license can be found in the LICENSE file 6 | */ 7 | 8 | #ifndef cglmc_view_rh_no_h 9 | #define cglmc_view_rh_no_h 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | #include "../../cglm.h" 15 | 16 | CGLM_EXPORT 17 | void 18 | glmc_lookat_rh_no(vec3 eye, vec3 center, vec3 up, mat4 dest); 19 | 20 | CGLM_EXPORT 21 | void 22 | glmc_look_rh_no(vec3 eye, vec3 dir, vec3 up, mat4 dest); 23 | 24 | CGLM_EXPORT 25 | void 26 | glmc_look_anyup_rh_no(vec3 eye, vec3 dir, mat4 dest); 27 | 28 | #ifdef __cplusplus 29 | } 30 | #endif 31 | #endif /* cglmc_view_rh_no_h */ 32 | -------------------------------------------------------------------------------- /src/graphics/cglm/call/clipspace/view_rh_zo.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c), Recep Aslantas. 3 | * 4 | * MIT License (MIT), http://opensource.org/licenses/MIT 5 | * Full license can be found in the LICENSE file 6 | */ 7 | 8 | #ifndef cglmc_view_rh_zo_h 9 | #define cglmc_view_rh_zo_h 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | #include "../../cglm.h" 15 | 16 | CGLM_EXPORT 17 | void 18 | glmc_lookat_rh_zo(vec3 eye, vec3 center, vec3 up, mat4 dest); 19 | 20 | CGLM_EXPORT 21 | void 22 | glmc_look_rh_zo(vec3 eye, vec3 dir, vec3 up, mat4 dest); 23 | 24 | CGLM_EXPORT 25 | void 26 | glmc_look_anyup_rh_zo(vec3 eye, vec3 dir, mat4 dest); 27 | 28 | #ifdef __cplusplus 29 | } 30 | #endif 31 | #endif /* cglmc_view_rh_zo_h */ 32 | -------------------------------------------------------------------------------- /src/graphics/cglm/call/curve.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c), Recep Aslantas. 3 | * 4 | * MIT License (MIT), http://opensource.org/licenses/MIT 5 | * Full license can be found in the LICENSE file 6 | */ 7 | 8 | #ifndef cglmc_curve_h 9 | #define cglmc_curve_h 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | #include "../cglm.h" 15 | 16 | CGLM_EXPORT 17 | float 18 | glmc_smc(float s, mat4 m, vec4 c); 19 | 20 | #ifdef __cplusplus 21 | } 22 | #endif 23 | #endif /* cglmc_curve_h */ 24 | -------------------------------------------------------------------------------- /src/graphics/cglm/call/ease.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c), Recep Aslantas. 3 | * 4 | * MIT License (MIT), http://opensource.org/licenses/MIT 5 | * Full license can be found in the LICENSE file 6 | */ 7 | 8 | #ifndef cglmc_ease_h 9 | #define cglmc_ease_h 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | #include "../cglm.h" 15 | 16 | CGLM_EXPORT 17 | float 18 | glmc_ease_linear(float t); 19 | 20 | CGLM_EXPORT 21 | float 22 | glmc_ease_sine_in(float t); 23 | 24 | CGLM_EXPORT 25 | float 26 | glmc_ease_sine_out(float t); 27 | 28 | CGLM_EXPORT 29 | float 30 | glmc_ease_sine_inout(float t); 31 | 32 | CGLM_EXPORT 33 | float 34 | glmc_ease_quad_in(float t); 35 | 36 | CGLM_EXPORT 37 | float 38 | glmc_ease_quad_out(float t); 39 | 40 | CGLM_EXPORT 41 | float 42 | glmc_ease_quad_inout(float t); 43 | 44 | CGLM_EXPORT 45 | float 46 | glmc_ease_cubic_in(float t); 47 | 48 | CGLM_EXPORT 49 | float 50 | glmc_ease_cubic_out(float t); 51 | 52 | CGLM_EXPORT 53 | float 54 | glmc_ease_cubic_inout(float t); 55 | 56 | CGLM_EXPORT 57 | float 58 | glmc_ease_quart_in(float t); 59 | 60 | CGLM_EXPORT 61 | float 62 | glmc_ease_quart_out(float t); 63 | 64 | CGLM_EXPORT 65 | float 66 | glmc_ease_quart_inout(float t); 67 | 68 | CGLM_EXPORT 69 | float 70 | glmc_ease_quint_in(float t); 71 | 72 | CGLM_EXPORT 73 | float 74 | glmc_ease_quint_out(float t); 75 | 76 | CGLM_EXPORT 77 | float 78 | glmc_ease_quint_inout(float t); 79 | 80 | CGLM_EXPORT 81 | float 82 | glmc_ease_exp_in(float t); 83 | 84 | CGLM_EXPORT 85 | float 86 | glmc_ease_exp_out(float t); 87 | 88 | CGLM_EXPORT 89 | float 90 | glmc_ease_exp_inout(float t); 91 | 92 | CGLM_EXPORT 93 | float 94 | glmc_ease_circ_in(float t); 95 | 96 | CGLM_EXPORT 97 | float 98 | glmc_ease_circ_out(float t); 99 | 100 | CGLM_EXPORT 101 | float 102 | glmc_ease_circ_inout(float t); 103 | 104 | CGLM_EXPORT 105 | float 106 | glmc_ease_back_in(float t); 107 | 108 | CGLM_EXPORT 109 | float 110 | glmc_ease_back_out(float t); 111 | 112 | CGLM_EXPORT 113 | float 114 | glmc_ease_back_inout(float t); 115 | 116 | CGLM_EXPORT 117 | float 118 | glmc_ease_elast_in(float t); 119 | 120 | CGLM_EXPORT 121 | float 122 | glmc_ease_elast_out(float t); 123 | 124 | CGLM_EXPORT 125 | float 126 | glmc_ease_elast_inout(float t); 127 | 128 | CGLM_EXPORT 129 | float 130 | glmc_ease_bounce_out(float t); 131 | 132 | CGLM_EXPORT 133 | float 134 | glmc_ease_bounce_in(float t); 135 | 136 | CGLM_EXPORT 137 | float 138 | glmc_ease_bounce_inout(float t); 139 | 140 | #ifdef __cplusplus 141 | } 142 | #endif 143 | #endif /* cglmc_ease_h */ 144 | -------------------------------------------------------------------------------- /src/graphics/cglm/call/euler.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c), Recep Aslantas. 3 | * 4 | * MIT License (MIT), http://opensource.org/licenses/MIT 5 | * Full license can be found in the LICENSE file 6 | */ 7 | 8 | #ifndef cglmc_euler_h 9 | #define cglmc_euler_h 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | #include "../cglm.h" 15 | 16 | CGLM_EXPORT 17 | void 18 | glmc_euler_angles(mat4 m, vec3 dest); 19 | 20 | CGLM_EXPORT 21 | void 22 | glmc_euler(vec3 angles, mat4 dest); 23 | 24 | CGLM_EXPORT 25 | void 26 | glmc_euler_xyz(vec3 angles, mat4 dest); 27 | 28 | CGLM_EXPORT 29 | void 30 | glmc_euler_zyx(vec3 angles, mat4 dest); 31 | 32 | CGLM_EXPORT 33 | void 34 | glmc_euler_zxy(vec3 angles, mat4 dest); 35 | 36 | CGLM_EXPORT 37 | void 38 | glmc_euler_xzy(vec3 angles, mat4 dest); 39 | 40 | CGLM_EXPORT 41 | void 42 | glmc_euler_yzx(vec3 angles, mat4 dest); 43 | 44 | CGLM_EXPORT 45 | void 46 | glmc_euler_yxz(vec3 angles, mat4 dest); 47 | 48 | CGLM_EXPORT 49 | void 50 | glmc_euler_by_order(vec3 angles, glm_euler_seq axis, mat4 dest); 51 | 52 | #ifdef __cplusplus 53 | } 54 | #endif 55 | #endif /* cglmc_euler_h */ 56 | -------------------------------------------------------------------------------- /src/graphics/cglm/call/frustum.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c), Recep Aslantas. 3 | * 4 | * MIT License (MIT), http://opensource.org/licenses/MIT 5 | * Full license can be found in the LICENSE file 6 | */ 7 | 8 | #ifndef cglmc_frustum_h 9 | #define cglmc_frustum_h 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | #include "../cglm.h" 15 | 16 | CGLM_EXPORT 17 | void 18 | glmc_frustum_planes(mat4 m, vec4 dest[6]); 19 | 20 | CGLM_EXPORT 21 | void 22 | glmc_frustum_corners(mat4 invMat, vec4 dest[8]); 23 | 24 | CGLM_EXPORT 25 | void 26 | glmc_frustum_center(vec4 corners[8], vec4 dest); 27 | 28 | CGLM_EXPORT 29 | void 30 | glmc_frustum_box(vec4 corners[8], mat4 m, vec3 box[2]); 31 | 32 | CGLM_EXPORT 33 | void 34 | glmc_frustum_corners_at(vec4 corners[8], 35 | float splitDist, 36 | float farDist, 37 | vec4 planeCorners[4]); 38 | #ifdef __cplusplus 39 | } 40 | #endif 41 | #endif /* cglmc_frustum_h */ 42 | -------------------------------------------------------------------------------- /src/graphics/cglm/call/io.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c), Recep Aslantas. 3 | * 4 | * MIT License (MIT), http://opensource.org/licenses/MIT 5 | * Full license can be found in the LICENSE file 6 | */ 7 | 8 | #ifndef cglmc_io_h 9 | #define cglmc_io_h 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | #include "../cglm.h" 16 | 17 | CGLM_EXPORT 18 | void 19 | glmc_mat4_print(mat4 matrix, 20 | FILE * __restrict ostream); 21 | 22 | CGLM_EXPORT 23 | void 24 | glmc_mat3_print(mat3 matrix, 25 | FILE * __restrict ostream); 26 | 27 | CGLM_EXPORT 28 | void 29 | glmc_vec4_print(vec4 vec, 30 | FILE * __restrict ostream); 31 | 32 | CGLM_EXPORT 33 | void 34 | glmc_vec3_print(vec3 vec, 35 | FILE * __restrict ostream); 36 | 37 | CGLM_EXPORT 38 | void 39 | glmc_versor_print(versor vec, 40 | FILE * __restrict ostream); 41 | 42 | #ifdef __cplusplus 43 | } 44 | #endif 45 | #endif /* cglmc_io_h */ 46 | -------------------------------------------------------------------------------- /src/graphics/cglm/call/ivec2.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c), Recep Aslantas. 3 | * 4 | * MIT License (MIT), http://opensource.org/licenses/MIT 5 | * Full license can be found in the LICENSE file 6 | */ 7 | 8 | #ifndef cglmc_ivec2_h 9 | #define cglmc_ivec2_h 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | #include "../cglm.h" 15 | 16 | CGLM_EXPORT 17 | void 18 | glmc_ivec2(int * __restrict v, ivec2 dest); 19 | 20 | CGLM_EXPORT 21 | void 22 | glmc_ivec2_copy(ivec2 a, ivec2 dest); 23 | 24 | CGLM_EXPORT 25 | void 26 | glmc_ivec2_zero(ivec2 v); 27 | 28 | CGLM_EXPORT 29 | void 30 | glmc_ivec2_one(ivec2 v); 31 | 32 | CGLM_EXPORT 33 | void 34 | glmc_ivec2_add(ivec2 a, ivec2 b, ivec2 dest); 35 | 36 | CGLM_EXPORT 37 | void 38 | glmc_ivec2_adds(ivec2 v, int s, ivec2 dest); 39 | 40 | CGLM_EXPORT 41 | void 42 | glmc_ivec2_sub(ivec2 a, ivec2 b, ivec2 dest); 43 | 44 | CGLM_EXPORT 45 | void 46 | glmc_ivec2_subs(ivec2 v, int s, ivec2 dest); 47 | 48 | CGLM_EXPORT 49 | void 50 | glmc_ivec2_mul(ivec2 a, ivec2 b, ivec2 dest); 51 | 52 | CGLM_EXPORT 53 | void 54 | glmc_ivec2_scale(ivec2 v, int s, ivec2 dest); 55 | 56 | CGLM_EXPORT 57 | int 58 | glmc_ivec2_distance2(ivec2 a, ivec2 b); 59 | 60 | CGLM_EXPORT 61 | float 62 | glmc_ivec2_distance(ivec2 a, ivec2 b); 63 | 64 | CGLM_EXPORT 65 | void 66 | glmc_ivec2_maxv(ivec2 a, ivec2 b, ivec2 dest); 67 | 68 | CGLM_EXPORT 69 | void 70 | glmc_ivec2_minv(ivec2 a, ivec2 b, ivec2 dest); 71 | 72 | CGLM_EXPORT 73 | void 74 | glmc_ivec2_clamp(ivec2 v, int minVal, int maxVal); 75 | 76 | CGLM_EXPORT 77 | void 78 | glmc_ivec2_abs(ivec2 v, ivec2 dest); 79 | 80 | #ifdef __cplusplus 81 | } 82 | #endif 83 | #endif /* cglmc_ivec2_h */ 84 | -------------------------------------------------------------------------------- /src/graphics/cglm/call/ivec3.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c);, Recep Aslantas. 3 | * 4 | * MIT License (MIT);, http://opensource.org/licenses/MIT 5 | * Full license can be found in the LICENSE file 6 | */ 7 | 8 | #ifndef cglmc_ivec3_h 9 | #define cglmc_ivec3_h 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | #include "../cglm.h" 15 | 16 | CGLM_EXPORT 17 | void 18 | glmc_ivec3(ivec4 v4, ivec3 dest); 19 | 20 | CGLM_EXPORT 21 | void 22 | glmc_ivec3_copy(ivec3 a, ivec3 dest); 23 | 24 | CGLM_EXPORT 25 | void 26 | glmc_ivec3_zero(ivec3 v); 27 | 28 | CGLM_EXPORT 29 | void 30 | glmc_ivec3_one(ivec3 v); 31 | 32 | CGLM_EXPORT 33 | void 34 | glmc_ivec3_add(ivec3 a, ivec3 b, ivec3 dest); 35 | 36 | CGLM_EXPORT 37 | void 38 | glmc_ivec3_adds(ivec3 v, int s, ivec3 dest); 39 | 40 | CGLM_EXPORT 41 | void 42 | glmc_ivec3_sub(ivec3 a, ivec3 b, ivec3 dest); 43 | 44 | CGLM_EXPORT 45 | void 46 | glmc_ivec3_subs(ivec3 v, int s, ivec3 dest); 47 | 48 | CGLM_EXPORT 49 | void 50 | glmc_ivec3_mul(ivec3 a, ivec3 b, ivec3 dest); 51 | 52 | CGLM_EXPORT 53 | void 54 | glmc_ivec3_scale(ivec3 v, int s, ivec3 dest); 55 | 56 | CGLM_EXPORT 57 | int 58 | glmc_ivec3_distance2(ivec3 a, ivec3 b); 59 | 60 | CGLM_EXPORT 61 | float 62 | glmc_ivec3_distance(ivec3 a, ivec3 b); 63 | 64 | CGLM_EXPORT 65 | void 66 | glmc_ivec3_maxv(ivec3 a, ivec3 b, ivec3 dest); 67 | 68 | CGLM_EXPORT 69 | void 70 | glmc_ivec3_minv(ivec3 a, ivec3 b, ivec3 dest); 71 | 72 | CGLM_EXPORT 73 | void 74 | glmc_ivec3_clamp(ivec3 v, int minVal, int maxVal); 75 | 76 | CGLM_EXPORT 77 | void 78 | glmc_ivec3_abs(ivec3 v, ivec3 dest); 79 | 80 | #ifdef __cplusplus 81 | } 82 | #endif 83 | #endif /* cglmc_ivec3_h */ 84 | -------------------------------------------------------------------------------- /src/graphics/cglm/call/ivec4.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c), Recep Aslantas. 3 | * 4 | * MIT License (MIT), http://opensource.org/licenses/MIT 5 | * Full license can be found in the LICENSE file 6 | */ 7 | 8 | #ifndef cglmc_ivec4_h 9 | #define cglmc_ivec4_h 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | #include "../cglm.h" 15 | 16 | CGLM_EXPORT 17 | void 18 | glmc_ivec4(ivec3 v3, int last, ivec4 dest); 19 | 20 | CGLM_EXPORT 21 | void 22 | glmc_ivec4_copy(ivec4 a, ivec4 dest); 23 | 24 | CGLM_EXPORT 25 | void 26 | glmc_ivec4_zero(ivec4 v); 27 | 28 | CGLM_EXPORT 29 | void 30 | glmc_ivec4_one(ivec4 v); 31 | 32 | CGLM_EXPORT 33 | void 34 | glmc_ivec4_add(ivec4 a, ivec4 b, ivec4 dest); 35 | 36 | CGLM_EXPORT 37 | void 38 | glmc_ivec4_adds(ivec4 v, int s, ivec4 dest); 39 | 40 | CGLM_EXPORT 41 | void 42 | glmc_ivec4_sub(ivec4 a, ivec4 b, ivec4 dest); 43 | 44 | CGLM_EXPORT 45 | void 46 | glmc_ivec4_subs(ivec4 v, int s, ivec4 dest); 47 | 48 | CGLM_EXPORT 49 | void 50 | glmc_ivec4_mul(ivec4 a, ivec4 b, ivec4 dest); 51 | 52 | CGLM_EXPORT 53 | void 54 | glmc_ivec4_scale(ivec4 v, int s, ivec4 dest); 55 | 56 | CGLM_EXPORT 57 | int 58 | glmc_ivec4_distance2(ivec4 a, ivec4 b); 59 | 60 | CGLM_EXPORT 61 | float 62 | glmc_ivec4_distance(ivec4 a, ivec4 b); 63 | 64 | CGLM_EXPORT 65 | void 66 | glmc_ivec4_maxv(ivec4 a, ivec4 b, ivec4 dest); 67 | 68 | CGLM_EXPORT 69 | void 70 | glmc_ivec4_minv(ivec4 a, ivec4 b, ivec4 dest); 71 | 72 | CGLM_EXPORT 73 | void 74 | glmc_ivec4_clamp(ivec4 v, int minVal, int maxVal); 75 | 76 | CGLM_EXPORT 77 | void 78 | glmc_ivec4_abs(ivec4 v, ivec4 dest); 79 | 80 | #ifdef __cplusplus 81 | } 82 | #endif 83 | #endif /* cglmc_ivec4_h */ 84 | -------------------------------------------------------------------------------- /src/graphics/cglm/call/mat2.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c), Recep Aslantas. 3 | * 4 | * MIT License (MIT), http://opensource.org/licenses/MIT 5 | * Full license can be found in the LICENSE file 6 | */ 7 | 8 | #ifndef cglmc_mat2_h 9 | #define cglmc_mat2_h 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | #include "../cglm.h" 15 | 16 | CGLM_EXPORT 17 | void 18 | glmc_mat2_copy(mat2 mat, mat2 dest); 19 | 20 | CGLM_EXPORT 21 | void 22 | glmc_mat2_identity(mat2 mat); 23 | 24 | CGLM_EXPORT 25 | void 26 | glmc_mat2_identity_array(mat2 * __restrict mat, size_t count); 27 | 28 | CGLM_EXPORT 29 | void 30 | glmc_mat2_zero(mat2 mat); 31 | 32 | CGLM_EXPORT 33 | void 34 | glmc_mat2_mul(mat2 m1, mat2 m2, mat2 dest); 35 | 36 | CGLM_EXPORT 37 | void 38 | glmc_mat2_transpose_to(mat2 m, mat2 dest); 39 | 40 | CGLM_EXPORT 41 | void 42 | glmc_mat2_transpose(mat2 m); 43 | 44 | CGLM_EXPORT 45 | void 46 | glmc_mat2_mulv(mat2 m, vec2 v, vec2 dest); 47 | 48 | CGLM_EXPORT 49 | float 50 | glmc_mat2_trace(mat2 m); 51 | 52 | CGLM_EXPORT 53 | void 54 | glmc_mat2_scale(mat2 m, float s); 55 | 56 | CGLM_EXPORT 57 | float 58 | glmc_mat2_det(mat2 mat); 59 | 60 | CGLM_EXPORT 61 | void 62 | glmc_mat2_inv(mat2 mat, mat2 dest); 63 | 64 | CGLM_EXPORT 65 | void 66 | glmc_mat2_swap_col(mat2 mat, int col1, int col2); 67 | 68 | CGLM_EXPORT 69 | void 70 | glmc_mat2_swap_row(mat2 mat, int row1, int row2); 71 | 72 | CGLM_EXPORT 73 | float 74 | glmc_mat2_rmc(vec2 r, mat2 m, vec2 c); 75 | 76 | #ifdef __cplusplus 77 | } 78 | #endif 79 | #endif /* cglmc_mat2_h */ 80 | -------------------------------------------------------------------------------- /src/graphics/cglm/call/mat3.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c), Recep Aslantas. 3 | * 4 | * MIT License (MIT), http://opensource.org/licenses/MIT 5 | * Full license can be found in the LICENSE file 6 | */ 7 | 8 | #ifndef cglmc_mat3_h 9 | #define cglmc_mat3_h 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | #include "../cglm.h" 15 | 16 | /* DEPRECATED! use _copy, _ucopy versions */ 17 | #define glmc_mat3_dup(mat, dest) glmc_mat3_copy(mat, dest) 18 | 19 | CGLM_EXPORT 20 | void 21 | glmc_mat3_copy(mat3 mat, mat3 dest); 22 | 23 | CGLM_EXPORT 24 | void 25 | glmc_mat3_identity(mat3 mat); 26 | 27 | CGLM_EXPORT 28 | void 29 | glmc_mat3_zero(mat3 mat); 30 | 31 | CGLM_EXPORT 32 | void 33 | glmc_mat3_identity_array(mat3 * __restrict mat, size_t count); 34 | 35 | CGLM_EXPORT 36 | void 37 | glmc_mat3_mul(mat3 m1, mat3 m2, mat3 dest); 38 | 39 | CGLM_EXPORT 40 | void 41 | glmc_mat3_transpose_to(mat3 m, mat3 dest); 42 | 43 | CGLM_EXPORT 44 | void 45 | glmc_mat3_transpose(mat3 m); 46 | 47 | CGLM_EXPORT 48 | void 49 | glmc_mat3_mulv(mat3 m, vec3 v, vec3 dest); 50 | 51 | CGLM_EXPORT 52 | float 53 | glmc_mat3_trace(mat3 m); 54 | 55 | CGLM_EXPORT 56 | void 57 | glmc_mat3_quat(mat3 m, versor dest); 58 | 59 | CGLM_EXPORT 60 | void 61 | glmc_mat3_scale(mat3 m, float s); 62 | 63 | CGLM_EXPORT 64 | float 65 | glmc_mat3_det(mat3 mat); 66 | 67 | CGLM_EXPORT 68 | void 69 | glmc_mat3_inv(mat3 mat, mat3 dest); 70 | 71 | CGLM_EXPORT 72 | void 73 | glmc_mat3_swap_col(mat3 mat, int col1, int col2); 74 | 75 | CGLM_EXPORT 76 | void 77 | glmc_mat3_swap_row(mat3 mat, int row1, int row2); 78 | 79 | CGLM_EXPORT 80 | float 81 | glmc_mat3_rmc(vec3 r, mat3 m, vec3 c); 82 | 83 | #ifdef __cplusplus 84 | } 85 | #endif 86 | #endif /* cglmc_mat3_h */ 87 | -------------------------------------------------------------------------------- /src/graphics/cglm/call/plane.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c), Recep Aslantas. 3 | * 4 | * MIT License (MIT), http://opensource.org/licenses/MIT 5 | * Full license can be found in the LICENSE file 6 | */ 7 | 8 | #ifndef cglmc_plane_h 9 | #define cglmc_plane_h 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | #include "../cglm.h" 15 | 16 | CGLM_EXPORT 17 | void 18 | glmc_plane_normalize(vec4 plane); 19 | 20 | #ifdef __cplusplus 21 | } 22 | #endif 23 | #endif /* cglmc_plane_h */ 24 | -------------------------------------------------------------------------------- /src/graphics/cglm/call/project.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c), Recep Aslantas. 3 | * 4 | * MIT License (MIT), http://opensource.org/licenses/MIT 5 | * Full license can be found in the LICENSE file 6 | */ 7 | 8 | #ifndef cglmc_project_h 9 | #define cglmc_project_h 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | #include "../cglm.h" 15 | 16 | CGLM_EXPORT 17 | void 18 | glmc_unprojecti(vec3 pos, mat4 invMat, vec4 vp, vec3 dest); 19 | 20 | CGLM_EXPORT 21 | void 22 | glmc_unproject(vec3 pos, mat4 m, vec4 vp, vec3 dest); 23 | 24 | CGLM_EXPORT 25 | void 26 | glmc_project(vec3 pos, mat4 m, vec4 vp, vec3 dest); 27 | 28 | CGLM_EXPORT 29 | float 30 | glmc_project_z(vec3 pos, mat4 m); 31 | 32 | CGLM_EXPORT 33 | void 34 | glmc_pickmatrix(vec2 center, vec2 size, vec4 vp, mat4 dest); 35 | 36 | #ifdef __cplusplus 37 | } 38 | #endif 39 | #endif /* cglmc_project_h */ 40 | 41 | 42 | -------------------------------------------------------------------------------- /src/graphics/cglm/call/ray.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c), Recep Aslantas. 3 | * 4 | * MIT License (MIT), http://opensource.org/licenses/MIT 5 | * Full license can be found in the LICENSE file 6 | */ 7 | 8 | #ifndef cglmc_ray_h 9 | #define cglmc_ray_h 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | #include "../cglm.h" 14 | 15 | CGLM_EXPORT 16 | bool 17 | glmc_ray_triangle(vec3 origin, 18 | vec3 direction, 19 | vec3 v0, 20 | vec3 v1, 21 | vec3 v2, 22 | float *d); 23 | 24 | #ifdef __cplusplus 25 | } 26 | #endif 27 | #endif /* cglmc_ray_h */ 28 | -------------------------------------------------------------------------------- /src/graphics/cglm/call/sphere.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c), Recep Aslantas. 3 | * 4 | * MIT License (MIT), http://opensource.org/licenses/MIT 5 | * Full license can be found in the LICENSE file 6 | */ 7 | 8 | #ifndef cglmc_sphere_h 9 | #define cglmc_sphere_h 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | #include "../cglm.h" 15 | 16 | CGLM_EXPORT 17 | float 18 | glmc_sphere_radii(vec4 s); 19 | 20 | CGLM_EXPORT 21 | void 22 | glmc_sphere_transform(vec4 s, mat4 m, vec4 dest); 23 | 24 | CGLM_EXPORT 25 | void 26 | glmc_sphere_merge(vec4 s1, vec4 s2, vec4 dest); 27 | 28 | CGLM_EXPORT 29 | bool 30 | glmc_sphere_sphere(vec4 s1, vec4 s2); 31 | 32 | CGLM_EXPORT 33 | bool 34 | glmc_sphere_point(vec4 s, vec3 point); 35 | 36 | #ifdef __cplusplus 37 | } 38 | #endif 39 | #endif /* cglmc_sphere_h */ 40 | -------------------------------------------------------------------------------- /src/graphics/cglm/cglm.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c), Recep Aslantas. 3 | * 4 | * MIT License (MIT), http://opensource.org/licenses/MIT 5 | * Full license can be found in the LICENSE file 6 | */ 7 | 8 | #ifndef cglm_h 9 | #define cglm_h 10 | 11 | #include "common.h" 12 | #include "vec2.h" 13 | #include "vec3.h" 14 | #include "vec4.h" 15 | #include "ivec2.h" 16 | #include "ivec3.h" 17 | #include "ivec4.h" 18 | #include "mat4.h" 19 | #include "mat3.h" 20 | #include "mat2.h" 21 | #include "affine.h" 22 | #include "cam.h" 23 | #include "frustum.h" 24 | #include "quat.h" 25 | #include "euler.h" 26 | #include "plane.h" 27 | #include "box.h" 28 | #include "color.h" 29 | #include "util.h" 30 | #include "io.h" 31 | #include "project.h" 32 | #include "sphere.h" 33 | #include "ease.h" 34 | #include "curve.h" 35 | #include "bezier.h" 36 | #include "ray.h" 37 | #include "affine2d.h" 38 | 39 | #endif /* cglm_h */ 40 | -------------------------------------------------------------------------------- /src/graphics/cglm/clipspace/persp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c), Recep Aslantas. 3 | * 4 | * MIT License (MIT), http://opensource.org/licenses/MIT 5 | * Full license can be found in the LICENSE file 6 | */ 7 | 8 | /* 9 | Functions: 10 | CGLM_INLINE void glm_persp_decomp_far(mat4 proj, float *farZ) 11 | CGLM_INLINE float glm_persp_fovy(mat4 proj) 12 | CGLM_INLINE float glm_persp_aspect(mat4 proj) 13 | CGLM_INLINE void glm_persp_sizes(mat4 proj, float fovy, vec4 dest) 14 | */ 15 | 16 | #ifndef cglm_persp_h 17 | #define cglm_persp_h 18 | 19 | #include "../common.h" 20 | #include "../plane.h" 21 | #include "../mat4.h" 22 | 23 | /*! 24 | * @brief returns field of view angle along the Y-axis (in radians) 25 | * 26 | * if you need to degrees, use glm_deg to convert it or use this: 27 | * fovy_deg = glm_deg(glm_persp_fovy(projMatrix)) 28 | * 29 | * @param[in] proj perspective projection matrix 30 | */ 31 | CGLM_INLINE 32 | float 33 | glm_persp_fovy(mat4 proj) { 34 | return 2.0f * atanf(1.0f / proj[1][1]); 35 | } 36 | 37 | /*! 38 | * @brief returns aspect ratio of perspective projection 39 | * 40 | * @param[in] proj perspective projection matrix 41 | */ 42 | CGLM_INLINE 43 | float 44 | glm_persp_aspect(mat4 proj) { 45 | return proj[1][1] / proj[0][0]; 46 | } 47 | 48 | #endif /* cglm_persp_h */ 49 | -------------------------------------------------------------------------------- /src/graphics/cglm/clipspace/view_lh_no.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c), Recep Aslantas. 3 | * 4 | * MIT License (MIT), http://opensource.org/licenses/MIT 5 | * Full license can be found in the LICENSE file 6 | */ 7 | 8 | /* 9 | Functions: 10 | CGLM_INLINE void glm_lookat_lh_no(vec3 eye, vec3 center, vec3 up, mat4 dest) 11 | CGLM_INLINE void glm_look_lh_no(vec3 eye, vec3 dir, vec3 up, mat4 dest) 12 | CGLM_INLINE void glm_look_anyup_lh_no(vec3 eye, vec3 dir, mat4 dest) 13 | */ 14 | 15 | #ifndef cglm_view_lh_no_h 16 | #define cglm_view_lh_no_h 17 | 18 | #include "../common.h" 19 | #include "view_lh.h" 20 | 21 | /*! 22 | * @brief set up view matrix with left handed coordinate system. 23 | * 24 | * NOTE: The UP vector must not be parallel to the line of sight from 25 | * the eye point to the reference point 26 | * 27 | * @param[in] eye eye vector 28 | * @param[in] center center vector 29 | * @param[in] up up vector 30 | * @param[out] dest result matrix 31 | */ 32 | CGLM_INLINE 33 | void 34 | glm_lookat_lh_no(vec3 eye, vec3 center, vec3 up, mat4 dest) { 35 | glm_lookat_lh(eye, center, up, dest); 36 | } 37 | 38 | /*! 39 | * @brief set up view matrix with left handed coordinate system. 40 | * 41 | * convenient wrapper for lookat: if you only have direction not target self 42 | * then this might be useful. Because you need to get target from direction. 43 | * 44 | * NOTE: The UP vector must not be parallel to the line of sight from 45 | * the eye point to the reference point 46 | * 47 | * @param[in] eye eye vector 48 | * @param[in] dir direction vector 49 | * @param[in] up up vector 50 | * @param[out] dest result matrix 51 | */ 52 | CGLM_INLINE 53 | void 54 | glm_look_lh_no(vec3 eye, vec3 dir, vec3 up, mat4 dest) { 55 | glm_look_lh(eye, dir, up, dest); 56 | } 57 | 58 | /*! 59 | * @brief set up view matrix with left handed coordinate system. 60 | * 61 | * convenient wrapper for look: if you only have direction and if you don't 62 | * care what UP vector is then this might be useful to create view matrix 63 | * 64 | * @param[in] eye eye vector 65 | * @param[in] dir direction vector 66 | * @param[out] dest result matrix 67 | */ 68 | CGLM_INLINE 69 | void 70 | glm_look_anyup_lh_no(vec3 eye, vec3 dir, mat4 dest) { 71 | glm_look_anyup_lh(eye, dir, dest); 72 | } 73 | 74 | #endif /*cglm_view_lh_no_h*/ 75 | -------------------------------------------------------------------------------- /src/graphics/cglm/clipspace/view_lh_zo.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c), Recep Aslantas. 3 | * 4 | * MIT License (MIT), http://opensource.org/licenses/MIT 5 | * Full license can be found in the LICENSE file 6 | */ 7 | 8 | /* 9 | Functions: 10 | CGLM_INLINE void glm_lookat_lh_zo(vec3 eye, vec3 center, vec3 up, mat4 dest) 11 | CGLM_INLINE void glm_look_lh_zo(vec3 eye, vec3 dir, vec3 up, mat4 dest) 12 | CGLM_INLINE void glm_look_anyup_lh_zo(vec3 eye, vec3 dir, mat4 dest) 13 | */ 14 | 15 | #ifndef cglm_view_lh_zo_h 16 | #define cglm_view_lh_zo_h 17 | 18 | #include "../common.h" 19 | #include "view_lh.h" 20 | 21 | /*! 22 | * @brief set up view matrix with left handed coordinate system. 23 | * 24 | * NOTE: The UP vector must not be parallel to the line of sight from 25 | * the eye point to the reference point 26 | * 27 | * @param[in] eye eye vector 28 | * @param[in] center center vector 29 | * @param[in] up up vector 30 | * @param[out] dest result matrix 31 | */ 32 | CGLM_INLINE 33 | void 34 | glm_lookat_lh_zo(vec3 eye, vec3 center, vec3 up, mat4 dest) { 35 | glm_lookat_lh(eye, center, up, dest); 36 | } 37 | 38 | /*! 39 | * @brief set up view matrix with left handed coordinate system. 40 | * 41 | * convenient wrapper for lookat: if you only have direction not target self 42 | * then this might be useful. Because you need to get target from direction. 43 | * 44 | * NOTE: The UP vector must not be parallel to the line of sight from 45 | * the eye point to the reference point 46 | * 47 | * @param[in] eye eye vector 48 | * @param[in] dir direction vector 49 | * @param[in] up up vector 50 | * @param[out] dest result matrix 51 | */ 52 | CGLM_INLINE 53 | void 54 | glm_look_lh_zo(vec3 eye, vec3 dir, vec3 up, mat4 dest) { 55 | glm_look_lh(eye, dir, up, dest); 56 | } 57 | 58 | /*! 59 | * @brief set up view matrix with left handed coordinate system. 60 | * 61 | * convenient wrapper for look: if you only have direction and if you don't 62 | * care what UP vector is then this might be useful to create view matrix 63 | * 64 | * @param[in] eye eye vector 65 | * @param[in] dir direction vector 66 | * @param[out] dest result matrix 67 | */ 68 | CGLM_INLINE 69 | void 70 | glm_look_anyup_lh_zo(vec3 eye, vec3 dir, mat4 dest) { 71 | glm_look_anyup_lh(eye, dir, dest); 72 | } 73 | 74 | #endif /*cglm_view_lh_zo_h*/ 75 | -------------------------------------------------------------------------------- /src/graphics/cglm/clipspace/view_rh_no.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c), Recep Aslantas. 3 | * 4 | * MIT License (MIT), http://opensource.org/licenses/MIT 5 | * Full license can be found in the LICENSE file 6 | */ 7 | 8 | /* 9 | Functions: 10 | CGLM_INLINE void glm_lookat_rh_no(vec3 eye, vec3 center, vec3 up, mat4 dest) 11 | CGLM_INLINE void glm_look_rh_no(vec3 eye, vec3 dir, vec3 up, mat4 dest) 12 | CGLM_INLINE void glm_look_anyup_rh_no(vec3 eye, vec3 dir, mat4 dest) 13 | */ 14 | 15 | #ifndef cglm_view_rh_no_h 16 | #define cglm_view_rh_no_h 17 | 18 | #include "../common.h" 19 | #include "view_rh.h" 20 | 21 | /*! 22 | * @brief set up view matrix with right handed coordinate system. 23 | * 24 | * NOTE: The UP vector must not be parallel to the line of sight from 25 | * the eye point to the reference point 26 | * 27 | * @param[in] eye eye vector 28 | * @param[in] center center vector 29 | * @param[in] up up vector 30 | * @param[out] dest result matrix 31 | */ 32 | CGLM_INLINE 33 | void 34 | glm_lookat_rh_no(vec3 eye, vec3 center, vec3 up, mat4 dest) { 35 | glm_lookat_rh(eye, center, up, dest); 36 | } 37 | 38 | /*! 39 | * @brief set up view matrix with right handed coordinate system. 40 | * 41 | * convenient wrapper for lookat: if you only have direction not target self 42 | * then this might be useful. Because you need to get target from direction. 43 | * 44 | * NOTE: The UP vector must not be parallel to the line of sight from 45 | * the eye point to the reference point 46 | * 47 | * @param[in] eye eye vector 48 | * @param[in] dir direction vector 49 | * @param[in] up up vector 50 | * @param[out] dest result matrix 51 | */ 52 | CGLM_INLINE 53 | void 54 | glm_look_rh_no(vec3 eye, vec3 dir, vec3 up, mat4 dest) { 55 | glm_look_rh(eye, dir, up, dest); 56 | } 57 | 58 | /*! 59 | * @brief set up view matrix with right handed coordinate system. 60 | * 61 | * convenient wrapper for look: if you only have direction and if you don't 62 | * care what UP vector is then this might be useful to create view matrix 63 | * 64 | * @param[in] eye eye vector 65 | * @param[in] dir direction vector 66 | * @param[out] dest result matrix 67 | */ 68 | CGLM_INLINE 69 | void 70 | glm_look_anyup_rh_no(vec3 eye, vec3 dir, mat4 dest) { 71 | glm_look_anyup_rh(eye, dir, dest); 72 | } 73 | 74 | #endif /*cglm_view_rh_no_h*/ 75 | -------------------------------------------------------------------------------- /src/graphics/cglm/clipspace/view_rh_zo.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c), Recep Aslantas. 3 | * 4 | * MIT License (MIT), http://opensource.org/licenses/MIT 5 | * Full license can be found in the LICENSE file 6 | */ 7 | 8 | /* 9 | Functions: 10 | CGLM_INLINE void glm_lookat_rh_zo(vec3 eye, vec3 center, vec3 up, mat4 dest) 11 | CGLM_INLINE void glm_look_rh_zo(vec3 eye, vec3 dir, vec3 up, mat4 dest) 12 | CGLM_INLINE void glm_look_anyup_rh_zo(vec3 eye, vec3 dir, mat4 dest) 13 | */ 14 | 15 | #ifndef cglm_view_rh_zo_h 16 | #define cglm_view_rh_zo_h 17 | 18 | #include "../common.h" 19 | #include "view_rh.h" 20 | 21 | /*! 22 | * @brief set up view matrix with right handed coordinate system. 23 | * 24 | * NOTE: The UP vector must not be parallel to the line of sight from 25 | * the eye point to the reference point 26 | * 27 | * @param[in] eye eye vector 28 | * @param[in] center center vector 29 | * @param[in] up up vector 30 | * @param[out] dest result matrix 31 | */ 32 | CGLM_INLINE 33 | void 34 | glm_lookat_rh_zo(vec3 eye, vec3 center, vec3 up, mat4 dest) { 35 | glm_lookat_rh(eye, center, up, dest); 36 | } 37 | 38 | /*! 39 | * @brief set up view matrix with right handed coordinate system. 40 | * 41 | * convenient wrapper for lookat: if you only have direction not target self 42 | * then this might be useful. Because you need to get target from direction. 43 | * 44 | * NOTE: The UP vector must not be parallel to the line of sight from 45 | * the eye point to the reference point 46 | * 47 | * @param[in] eye eye vector 48 | * @param[in] dir direction vector 49 | * @param[in] up up vector 50 | * @param[out] dest result matrix 51 | */ 52 | CGLM_INLINE 53 | void 54 | glm_look_rh_zo(vec3 eye, vec3 dir, vec3 up, mat4 dest) { 55 | glm_look_rh(eye, dir, up, dest); 56 | } 57 | 58 | /*! 59 | * @brief set up view matrix with right handed coordinate system. 60 | * 61 | * convenient wrapper for look: if you only have direction and if you don't 62 | * care what UP vector is then this might be useful to create view matrix 63 | * 64 | * @param[in] eye eye vector 65 | * @param[in] dir direction vector 66 | * @param[out] dest result matrix 67 | */ 68 | CGLM_INLINE 69 | void 70 | glm_look_anyup_rh_zo(vec3 eye, vec3 dir, mat4 dest) { 71 | glm_look_anyup_rh(eye, dir, dest); 72 | } 73 | 74 | #endif /*cglm_view_rh_zo_h*/ 75 | -------------------------------------------------------------------------------- /src/graphics/cglm/color.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c), Recep Aslantas. 3 | * 4 | * MIT License (MIT), http://opensource.org/licenses/MIT 5 | * Full license can be found in the LICENSE file 6 | */ 7 | 8 | #ifndef cglm_color_h 9 | #define cglm_color_h 10 | 11 | #include "common.h" 12 | #include "vec3.h" 13 | 14 | /*! 15 | * @brief averages the color channels into one value 16 | * 17 | * @param[in] rgb RGB color 18 | */ 19 | CGLM_INLINE 20 | float 21 | glm_luminance(vec3 rgb) { 22 | vec3 l = {0.212671f, 0.715160f, 0.072169f}; 23 | return glm_dot(rgb, l); 24 | } 25 | 26 | #endif /* cglm_color_h */ 27 | -------------------------------------------------------------------------------- /src/graphics/cglm/curve.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c), Recep Aslantas. 3 | * 4 | * MIT License (MIT), http://opensource.org/licenses/MIT 5 | * Full license can be found in the LICENSE file 6 | */ 7 | 8 | #ifndef cglm_curve_h 9 | #define cglm_curve_h 10 | 11 | #include "common.h" 12 | #include "vec4.h" 13 | #include "mat4.h" 14 | 15 | /*! 16 | * @brief helper function to calculate S*M*C multiplication for curves 17 | * 18 | * This function does not encourage you to use SMC, 19 | * instead it is a helper if you use SMC. 20 | * 21 | * if you want to specify S as vector then use more generic glm_mat4_rmc() func. 22 | * 23 | * Example usage: 24 | * B(s) = glm_smc(s, GLM_BEZIER_MAT, (vec4){p0, c0, c1, p1}) 25 | * 26 | * @param[in] s parameter between 0 and 1 (this will be [s3, s2, s, 1]) 27 | * @param[in] m basis matrix 28 | * @param[in] c position/control vector 29 | * 30 | * @return B(s) 31 | */ 32 | CGLM_INLINE 33 | float 34 | glm_smc(float s, mat4 m, vec4 c) { 35 | vec4 vs; 36 | glm_vec4_cubic(s, vs); 37 | return glm_mat4_rmc(vs, m, c); 38 | } 39 | 40 | #endif /* cglm_curve_h */ 41 | -------------------------------------------------------------------------------- /src/graphics/cglm/plane.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c), Recep Aslantas. 3 | * 4 | * MIT License (MIT), http://opensource.org/licenses/MIT 5 | * Full license can be found in the LICENSE file 6 | */ 7 | 8 | #ifndef cglm_plane_h 9 | #define cglm_plane_h 10 | 11 | #include "common.h" 12 | #include "vec3.h" 13 | #include "vec4.h" 14 | 15 | /* 16 | Plane equation: Ax + By + Cz + D = 0; 17 | 18 | It stored in vec4 as [A, B, C, D]. (A, B, C) is normal and D is distance 19 | */ 20 | 21 | /* 22 | Functions: 23 | CGLM_INLINE void glm_plane_normalize(vec4 plane); 24 | */ 25 | 26 | /*! 27 | * @brief normalizes a plane 28 | * 29 | * @param[in, out] plane plane to normalize 30 | */ 31 | CGLM_INLINE 32 | void 33 | glm_plane_normalize(vec4 plane) { 34 | float norm; 35 | 36 | if ((norm = glm_vec3_norm(plane)) == 0.0f) { 37 | glm_vec4_zero(plane); 38 | return; 39 | } 40 | 41 | glm_vec4_scale(plane, 1.0f / norm, plane); 42 | } 43 | 44 | #endif /* cglm_plane_h */ 45 | -------------------------------------------------------------------------------- /src/graphics/cglm/ray.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c), Recep Aslantas. 3 | * 4 | * MIT License (MIT), http://opensource.org/licenses/MIT 5 | * Full license can be found in the LICENSE file 6 | */ 7 | 8 | /* 9 | Functions: 10 | CGLM_INLINE bool glm_line_triangle_intersect(vec3 origin, 11 | vec3 direction, 12 | vec3 v0, 13 | vec3 v1, 14 | vec3 v2, 15 | float *d); 16 | */ 17 | 18 | #ifndef cglm_ray_h 19 | #define cglm_ray_h 20 | 21 | #include "vec3.h" 22 | 23 | /*! 24 | * @brief Möller–Trumbore ray-triangle intersection algorithm 25 | * 26 | * @param[in] origin origin of ray 27 | * @param[in] direction direction of ray 28 | * @param[in] v0 first vertex of triangle 29 | * @param[in] v1 second vertex of triangle 30 | * @param[in] v2 third vertex of triangle 31 | * @param[in, out] d distance to intersection 32 | * @return whether there is intersection 33 | */ 34 | 35 | CGLM_INLINE 36 | bool 37 | glm_ray_triangle(vec3 origin, 38 | vec3 direction, 39 | vec3 v0, 40 | vec3 v1, 41 | vec3 v2, 42 | float *d) { 43 | vec3 edge1, edge2, p, t, q; 44 | float det, inv_det, u, v, dist; 45 | const float epsilon = 0.000001f; 46 | 47 | glm_vec3_sub(v1, v0, edge1); 48 | glm_vec3_sub(v2, v0, edge2); 49 | glm_vec3_cross(direction, edge2, p); 50 | 51 | det = glm_vec3_dot(edge1, p); 52 | if (det > -epsilon && det < epsilon) 53 | return false; 54 | 55 | inv_det = 1.0f / det; 56 | 57 | glm_vec3_sub(origin, v0, t); 58 | 59 | u = inv_det * glm_vec3_dot(t, p); 60 | if (u < 0.0f || u > 1.0f) 61 | return false; 62 | 63 | glm_vec3_cross(t, edge1, q); 64 | 65 | v = inv_det * glm_vec3_dot(direction, q); 66 | if (v < 0.0f || u + v > 1.0f) 67 | return false; 68 | 69 | dist = inv_det * glm_vec3_dot(edge2, q); 70 | 71 | if (d) 72 | *d = dist; 73 | 74 | return dist > epsilon; 75 | } 76 | 77 | #endif 78 | -------------------------------------------------------------------------------- /src/graphics/cglm/simd/avx/affine.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c), Recep Aslantas. 3 | * 4 | * MIT License (MIT), http://opensource.org/licenses/MIT 5 | * Full license can be found in the LICENSE file 6 | */ 7 | 8 | #ifndef cglm_affine_mat_avx_h 9 | #define cglm_affine_mat_avx_h 10 | #ifdef __AVX__ 11 | 12 | #include "../../common.h" 13 | #include "../intrin.h" 14 | 15 | #include 16 | 17 | CGLM_INLINE 18 | void 19 | glm_mul_avx(mat4 m1, mat4 m2, mat4 dest) { 20 | /* D = R * L (Column-Major) */ 21 | 22 | __m256 y0, y1, y2, y3, y4, y5, y6, y7, y8, y9; 23 | 24 | y0 = glmm_load256(m2[0]); /* h g f e d c b a */ 25 | y1 = glmm_load256(m2[2]); /* p o n m l k j i */ 26 | 27 | y2 = glmm_load256(m1[0]); /* h g f e d c b a */ 28 | y3 = glmm_load256(m1[2]); /* p o n m l k j i */ 29 | 30 | /* 0x03: 0b00000011 */ 31 | y4 = _mm256_permute2f128_ps(y2, y2, 0x03); /* d c b a h g f e */ 32 | y5 = _mm256_permute2f128_ps(y3, y3, 0x03); /* l k j i p o n m */ 33 | 34 | /* f f f f a a a a */ 35 | /* h h h h c c c c */ 36 | /* e e e e b b b b */ 37 | /* g g g g d d d d */ 38 | y6 = _mm256_permutevar_ps(y0, _mm256_set_epi32(1, 1, 1, 1, 0, 0, 0, 0)); 39 | y7 = _mm256_permutevar_ps(y0, _mm256_set_epi32(3, 3, 3, 3, 2, 2, 2, 2)); 40 | y8 = _mm256_permutevar_ps(y0, _mm256_set_epi32(0, 0, 0, 0, 1, 1, 1, 1)); 41 | y9 = _mm256_permutevar_ps(y0, _mm256_set_epi32(2, 2, 2, 2, 3, 3, 3, 3)); 42 | 43 | glmm_store256(dest[0], 44 | _mm256_add_ps(_mm256_add_ps(_mm256_mul_ps(y2, y6), 45 | _mm256_mul_ps(y3, y7)), 46 | _mm256_add_ps(_mm256_mul_ps(y4, y8), 47 | _mm256_mul_ps(y5, y9)))); 48 | 49 | /* n n n n i i i i */ 50 | /* p p p p k k k k */ 51 | /* m m m m j j j j */ 52 | /* o o o o l l l l */ 53 | y6 = _mm256_permutevar_ps(y1, _mm256_set_epi32(1, 1, 1, 1, 0, 0, 0, 0)); 54 | y7 = _mm256_permutevar_ps(y1, _mm256_set_epi32(3, 3, 3, 3, 2, 2, 2, 2)); 55 | y8 = _mm256_permutevar_ps(y1, _mm256_set_epi32(0, 0, 0, 0, 1, 1, 1, 1)); 56 | y9 = _mm256_permutevar_ps(y1, _mm256_set_epi32(2, 2, 2, 2, 3, 3, 3, 3)); 57 | 58 | glmm_store256(dest[2], 59 | _mm256_add_ps(_mm256_add_ps(_mm256_mul_ps(y2, y6), 60 | _mm256_mul_ps(y3, y7)), 61 | _mm256_add_ps(_mm256_mul_ps(y4, y8), 62 | _mm256_mul_ps(y5, y9)))); 63 | } 64 | 65 | #endif 66 | #endif /* cglm_affine_mat_avx_h */ 67 | -------------------------------------------------------------------------------- /src/graphics/cglm/simd/neon/mat2.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c), Recep Aslantas. 3 | * 4 | * MIT License (MIT), http://opensource.org/licenses/MIT 5 | * Full license can be found in the LICENSE file 6 | */ 7 | 8 | #ifndef cglm_mat2_neon_h 9 | #define cglm_mat2_neon_h 10 | #if defined(CGLM_NEON_FP) 11 | 12 | #include "../../common.h" 13 | #include "../intrin.h" 14 | 15 | CGLM_INLINE 16 | void 17 | glm_mat2_mul_neon(mat2 m1, mat2 m2, mat2 dest) { 18 | float32x4x2_t a1; 19 | glmm_128 x0, x1, x2; 20 | float32x2_t dc, ba; 21 | 22 | x1 = glmm_load(m1[0]); /* d c b a */ 23 | x2 = glmm_load(m2[0]); /* h g f e */ 24 | 25 | dc = vget_high_f32(x1); 26 | ba = vget_low_f32(x1); 27 | 28 | /* g g e e, h h f f */ 29 | a1 = vtrnq_f32(x2, x2); 30 | 31 | /* 32 | dest[0][0] = a * e + c * f; 33 | dest[0][1] = b * e + d * f; 34 | dest[1][0] = a * g + c * h; 35 | dest[1][1] = b * g + d * h; 36 | */ 37 | x0 = glmm_fmadd(vcombine_f32(ba, ba), a1.val[0], 38 | vmulq_f32(vcombine_f32(dc, dc), a1.val[1])); 39 | 40 | glmm_store(dest[0], x0); 41 | } 42 | 43 | #endif 44 | #endif /* cglm_mat2_neon_h */ 45 | -------------------------------------------------------------------------------- /src/graphics/cglm/simd/neon/quat.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c), Recep Aslantas. 3 | * 4 | * MIT License (MIT), http://opensource.org/licenses/MIT 5 | * Full license can be found in the LICENSE file 6 | */ 7 | 8 | #ifndef cglm_quat_neon_h 9 | #define cglm_quat_neon_h 10 | #if defined(CGLM_NEON_FP) 11 | 12 | #include "../../common.h" 13 | #include "../intrin.h" 14 | 15 | CGLM_INLINE 16 | void 17 | glm_quat_mul_neon(versor p, versor q, versor dest) { 18 | /* 19 | + (a1 b2 + b1 a2 + c1 d2 − d1 c2)i 20 | + (a1 c2 − b1 d2 + c1 a2 + d1 b2)j 21 | + (a1 d2 + b1 c2 − c1 b2 + d1 a2)k 22 | a1 a2 − b1 b2 − c1 c2 − d1 d2 23 | */ 24 | 25 | glmm_128 xp, xq, xqr, r, x, y, z, s2, s3; 26 | glmm_128 s1 = glmm_float32x4_SIGNMASK_NPPN; 27 | 28 | float32x2_t qh, ql; 29 | 30 | xp = glmm_load(p); /* 3 2 1 0 */ 31 | xq = glmm_load(q); 32 | 33 | r = vmulq_f32(glmm_splat_w(xp), xq); 34 | x = glmm_splat_x(xp); 35 | y = glmm_splat_y(xp); 36 | z = glmm_splat_z(xp); 37 | 38 | ql = vget_high_f32(s1); 39 | s3 = vcombine_f32(ql, ql); 40 | s2 = vzipq_f32(s3, s3).val[0]; 41 | 42 | xqr = vrev64q_f32(xq); 43 | qh = vget_high_f32(xqr); 44 | ql = vget_low_f32(xqr); 45 | 46 | r = glmm_fmadd(glmm_xor(x, s3), vcombine_f32(qh, ql), r); 47 | 48 | r = glmm_fmadd(glmm_xor(y, s2), vcombine_f32(vget_high_f32(xq), 49 | vget_low_f32(xq)), r); 50 | 51 | r = glmm_fmadd(glmm_xor(z, s1), vcombine_f32(ql, qh), r); 52 | 53 | glmm_store(dest, r); 54 | } 55 | 56 | #endif 57 | #endif /* cglm_quat_neon_h */ 58 | -------------------------------------------------------------------------------- /src/graphics/cglm/simd/sse2/mat2.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c), Recep Aslantas. 3 | * 4 | * MIT License (MIT), http://opensource.org/licenses/MIT 5 | * Full license can be found in the LICENSE file 6 | */ 7 | 8 | #ifndef cglm_mat2_sse_h 9 | #define cglm_mat2_sse_h 10 | #if defined( __SSE__ ) || defined( __SSE2__ ) 11 | 12 | #include "../../common.h" 13 | #include "../intrin.h" 14 | 15 | CGLM_INLINE 16 | void 17 | glm_mat2_mul_sse2(mat2 m1, mat2 m2, mat2 dest) { 18 | __m128 x0, x1, x2, x3, x4; 19 | 20 | x1 = glmm_load(m1[0]); /* d c b a */ 21 | x2 = glmm_load(m2[0]); /* h g f e */ 22 | 23 | x3 = glmm_shuff1(x2, 2, 2, 0, 0); 24 | x4 = glmm_shuff1(x2, 3, 3, 1, 1); 25 | x0 = _mm_movelh_ps(x1, x1); 26 | x2 = _mm_movehl_ps(x1, x1); 27 | 28 | /* 29 | dest[0][0] = a * e + c * f; 30 | dest[0][1] = b * e + d * f; 31 | dest[1][0] = a * g + c * h; 32 | dest[1][1] = b * g + d * h; 33 | */ 34 | x0 = glmm_fmadd(x0, x3, _mm_mul_ps(x2, x4)); 35 | 36 | glmm_store(dest[0], x0); 37 | } 38 | 39 | CGLM_INLINE 40 | void 41 | glm_mat2_transp_sse2(mat2 m, mat2 dest) { 42 | /* d c b a */ 43 | /* d b c a */ 44 | glmm_store(dest[0], glmm_shuff1(glmm_load(m[0]), 3, 1, 2, 0)); 45 | } 46 | 47 | #endif 48 | #endif /* cglm_mat2_sse_h */ 49 | -------------------------------------------------------------------------------- /src/graphics/cglm/simd/sse2/quat.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c), Recep Aslantas. 3 | * 4 | * MIT License (MIT), http://opensource.org/licenses/MIT 5 | * Full license can be found in the LICENSE file 6 | */ 7 | 8 | #ifndef cglm_quat_simd_h 9 | #define cglm_quat_simd_h 10 | #if defined( __SSE__ ) || defined( __SSE2__ ) 11 | 12 | #include "../../common.h" 13 | #include "../intrin.h" 14 | 15 | CGLM_INLINE 16 | void 17 | glm_quat_mul_sse2(versor p, versor q, versor dest) { 18 | /* 19 | + (a1 b2 + b1 a2 + c1 d2 − d1 c2)i 20 | + (a1 c2 − b1 d2 + c1 a2 + d1 b2)j 21 | + (a1 d2 + b1 c2 − c1 b2 + d1 a2)k 22 | a1 a2 − b1 b2 − c1 c2 − d1 d2 23 | */ 24 | 25 | __m128 xp, xq, x1, x2, x3, r, x, y, z; 26 | 27 | xp = glmm_load(p); /* 3 2 1 0 */ 28 | xq = glmm_load(q); 29 | x1 = glmm_float32x4_SIGNMASK_NPNP; /* TODO: _mm_set1_ss() + shuff ? */ 30 | r = _mm_mul_ps(glmm_splat_w(xp), xq); 31 | 32 | x2 = _mm_unpackhi_ps(x1, x1); 33 | x3 = glmm_shuff1(x1, 3, 2, 0, 1); 34 | x = glmm_splat_x(xp); 35 | y = glmm_splat_y(xp); 36 | z = glmm_splat_z(xp); 37 | 38 | x = _mm_xor_ps(x, x1); 39 | y = _mm_xor_ps(y, x2); 40 | z = _mm_xor_ps(z, x3); 41 | 42 | x1 = glmm_shuff1(xq, 0, 1, 2, 3); 43 | x2 = glmm_shuff1(xq, 1, 0, 3, 2); 44 | x3 = glmm_shuff1(xq, 2, 3, 0, 1); 45 | 46 | r = glmm_fmadd(x, x1, r); 47 | r = glmm_fmadd(y, x2, r); 48 | r = glmm_fmadd(z, x3, r); 49 | 50 | glmm_store(dest, r); 51 | } 52 | 53 | #endif 54 | #endif /* cglm_quat_simd_h */ 55 | -------------------------------------------------------------------------------- /src/graphics/cglm/simd/wasm/mat2.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c), Recep Aslantas. 3 | * 4 | * MIT License (MIT), http://opensource.org/licenses/MIT 5 | * Full license can be found in the LICENSE file 6 | */ 7 | 8 | #ifndef cglm_mat2_wasm_h 9 | #define cglm_mat2_wasm_h 10 | #if defined(__wasm__) && defined(__wasm_simd128__) 11 | 12 | #include "../../common.h" 13 | #include "../intrin.h" 14 | 15 | CGLM_INLINE 16 | void 17 | glm_mat2_mul_wasm(mat2 m1, mat2 m2, mat2 dest) { 18 | glmm_128 x0, x1, x2, x3, x4; 19 | 20 | x1 = glmm_load(m1[0]); /* d c b a */ 21 | x2 = glmm_load(m2[0]); /* h g f e */ 22 | 23 | x3 = glmm_shuff1(x2, 2, 2, 0, 0); 24 | x4 = glmm_shuff1(x2, 3, 3, 1, 1); 25 | /* x0 = _mm_movelh_ps(x1, x1); */ 26 | x0 = wasm_i32x4_shuffle(x1, x1, 0, 1, 4, 5); 27 | /* x2 = _mm_movehl_ps(x1, x1); */ 28 | x2 = wasm_i32x4_shuffle(x1, x1, 6, 7, 2, 3); 29 | 30 | /* 31 | dest[0][0] = a * e + c * f; 32 | dest[0][1] = b * e + d * f; 33 | dest[1][0] = a * g + c * h; 34 | dest[1][1] = b * g + d * h; 35 | */ 36 | x0 = glmm_fmadd(x0, x3, wasm_f32x4_mul(x2, x4)); 37 | 38 | glmm_store(dest[0], x0); 39 | } 40 | 41 | CGLM_INLINE 42 | void 43 | glm_mat2_transp_wasm(mat2 m, mat2 dest) { 44 | /* d c b a */ 45 | /* d b c a */ 46 | glmm_store(dest[0], glmm_shuff1(glmm_load(m[0]), 3, 1, 2, 0)); 47 | } 48 | 49 | #endif 50 | #endif /* cglm_mat2_wasm_h */ 51 | -------------------------------------------------------------------------------- /src/graphics/cglm/simd/wasm/quat.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c), Recep Aslantas. 3 | * 4 | * MIT License (MIT), http://opensource.org/licenses/MIT 5 | * Full license can be found in the LICENSE file 6 | */ 7 | 8 | #ifndef cglm_quat_wasm_h 9 | #define cglm_quat_wasm_h 10 | #if defined(__wasm__) && defined(__wasm_simd128__) 11 | 12 | #include "../../common.h" 13 | #include "../intrin.h" 14 | 15 | CGLM_INLINE 16 | void 17 | glm_quat_mul_wasm(versor p, versor q, versor dest) { 18 | /* 19 | + (a1 b2 + b1 a2 + c1 d2 − d1 c2)i 20 | + (a1 c2 − b1 d2 + c1 a2 + d1 b2)j 21 | + (a1 d2 + b1 c2 − c1 b2 + d1 a2)k 22 | a1 a2 − b1 b2 − c1 c2 − d1 d2 23 | */ 24 | 25 | glmm_128 xp, xq, x1, x2, x3, r, x, y, z; 26 | 27 | xp = glmm_load(p); /* 3 2 1 0 */ 28 | xq = glmm_load(q); 29 | /* x1 = wasm_f32x4_const(0.f, -0.f, 0.f, -0.f); */ 30 | x1 = glmm_float32x4_SIGNMASK_PNPN; /* TODO: _mm_set1_ss() + shuff ? */ 31 | r = wasm_f32x4_mul(glmm_splat_w(xp), xq); 32 | /* x2 = _mm_unpackhi_ps(x1, x1); */ 33 | x2 = wasm_i32x4_shuffle(x1, x1, 2, 6, 3, 7); 34 | x3 = glmm_shuff1(x1, 3, 2, 0, 1); 35 | x = glmm_splat_x(xp); 36 | y = glmm_splat_y(xp); 37 | z = glmm_splat_z(xp); 38 | 39 | x = wasm_v128_xor(x, x1); 40 | y = wasm_v128_xor(y, x2); 41 | z = wasm_v128_xor(z, x3); 42 | 43 | x1 = glmm_shuff1(xq, 0, 1, 2, 3); 44 | x2 = glmm_shuff1(xq, 1, 0, 3, 2); 45 | x3 = glmm_shuff1(xq, 2, 3, 0, 1); 46 | 47 | r = glmm_fmadd(x, x1, r); 48 | r = glmm_fmadd(y, x2, r); 49 | r = glmm_fmadd(z, x3, r); 50 | 51 | glmm_store(dest, r); 52 | } 53 | 54 | #endif 55 | #endif /* cglm_quat_wasm_h */ 56 | -------------------------------------------------------------------------------- /src/graphics/cglm/sphere.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c), Recep Aslantas. 3 | * 4 | * MIT License (MIT), http://opensource.org/licenses/MIT 5 | * Full license can be found in the LICENSE file 6 | */ 7 | 8 | #ifndef cglm_sphere_h 9 | #define cglm_sphere_h 10 | 11 | #include "common.h" 12 | #include "mat4.h" 13 | 14 | /* 15 | Sphere Representation in cglm: [center.x, center.y, center.z, radii] 16 | 17 | You could use this representation or you can convert it to vec4 before call 18 | any function 19 | */ 20 | 21 | /*! 22 | * @brief helper for getting sphere radius 23 | * 24 | * @param[in] s sphere 25 | * 26 | * @return returns radii 27 | */ 28 | CGLM_INLINE 29 | float 30 | glm_sphere_radii(vec4 s) { 31 | return s[3]; 32 | } 33 | 34 | /*! 35 | * @brief apply transform to sphere, it is just wrapper for glm_mat4_mulv3 36 | * 37 | * @param[in] s sphere 38 | * @param[in] m transform matrix 39 | * @param[out] dest transformed sphere 40 | */ 41 | CGLM_INLINE 42 | void 43 | glm_sphere_transform(vec4 s, mat4 m, vec4 dest) { 44 | glm_mat4_mulv3(m, s, 1.0f, dest); 45 | dest[3] = s[3]; 46 | } 47 | 48 | /*! 49 | * @brief merges two spheres and creates a new one 50 | * 51 | * two sphere must be in same space, for instance if one in world space then 52 | * the other must be in world space too, not in local space. 53 | * 54 | * @param[in] s1 sphere 1 55 | * @param[in] s2 sphere 2 56 | * @param[out] dest merged/extended sphere 57 | */ 58 | CGLM_INLINE 59 | void 60 | glm_sphere_merge(vec4 s1, vec4 s2, vec4 dest) { 61 | float dist, radii; 62 | 63 | dist = glm_vec3_distance(s1, s2); 64 | radii = dist + s1[3] + s2[3]; 65 | 66 | radii = glm_max(radii, s1[3]); 67 | radii = glm_max(radii, s2[3]); 68 | 69 | glm_vec3_center(s1, s2, dest); 70 | dest[3] = radii; 71 | } 72 | 73 | /*! 74 | * @brief check if two sphere intersects 75 | * 76 | * @param[in] s1 sphere 77 | * @param[in] s2 other sphere 78 | */ 79 | CGLM_INLINE 80 | bool 81 | glm_sphere_sphere(vec4 s1, vec4 s2) { 82 | return glm_vec3_distance2(s1, s2) <= glm_pow2(s1[3] + s2[3]); 83 | } 84 | 85 | /*! 86 | * @brief check if sphere intersects with point 87 | * 88 | * @param[in] s sphere 89 | * @param[in] point point 90 | */ 91 | CGLM_INLINE 92 | bool 93 | glm_sphere_point(vec4 s, vec3 point) { 94 | float rr; 95 | rr = s[3] * s[3]; 96 | return glm_vec3_distance2(point, s) <= rr; 97 | } 98 | 99 | #endif /* cglm_sphere_h */ 100 | -------------------------------------------------------------------------------- /src/graphics/cglm/struct.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c), Recep Aslantas. 3 | * 4 | * MIT License (MIT), http://opensource.org/licenses/MIT 5 | * Full license can be found in the LICENSE file 6 | */ 7 | 8 | #ifndef cglm_structs_h 9 | #define cglm_structs_h 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | #include "cglm.h" 15 | #include "types-struct.h" 16 | #include "struct/vec2.h" 17 | #include "struct/vec3.h" 18 | #include "struct/vec4.h" 19 | #include "struct/mat2.h" 20 | #include "struct/mat3.h" 21 | #include "struct/mat4.h" 22 | #include "struct/affine.h" 23 | #include "struct/frustum.h" 24 | #include "struct/plane.h" 25 | #include "struct/box.h" 26 | #include "struct/color.h" 27 | #include "struct/io.h" 28 | #include "struct/cam.h" 29 | #include "struct/quat.h" 30 | #include "struct/euler.h" 31 | #include "struct/project.h" 32 | #include "struct/sphere.h" 33 | #include "struct/curve.h" 34 | #include "struct/affine2d.h" 35 | 36 | #ifdef __cplusplus 37 | } 38 | #endif 39 | #endif /* cglm_structs_h */ 40 | -------------------------------------------------------------------------------- /src/graphics/cglm/struct/color.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c), Recep Aslantas. 3 | * 4 | * MIT License (MIT), http://opensource.org/licenses/MIT 5 | * Full license can be found in the LICENSE file 6 | */ 7 | 8 | #ifndef cglms_colors_h 9 | #define cglms_colors_h 10 | 11 | #include "../common.h" 12 | #include "../types-struct.h" 13 | #include "../color.h" 14 | #include "vec3.h" 15 | 16 | /*! 17 | * @brief averages the color channels into one value 18 | * 19 | * @param[in] rgb RGB color 20 | */ 21 | CGLM_INLINE 22 | float 23 | glms_luminance(vec3s rgb) { 24 | return glm_luminance(rgb.raw); 25 | } 26 | 27 | #endif /* cglms_colors_h */ 28 | -------------------------------------------------------------------------------- /src/graphics/cglm/struct/curve.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c), Recep Aslantas. 3 | * 4 | * MIT License (MIT), http://opensource.org/licenses/MIT 5 | * Full license can be found in the LICENSE file 6 | */ 7 | 8 | #ifndef cglms_curves_h 9 | #define cglms_curves_h 10 | 11 | #include "../common.h" 12 | #include "../types-struct.h" 13 | #include "../curve.h" 14 | #include "vec4.h" 15 | #include "mat4.h" 16 | 17 | /*! 18 | * @brief helper function to calculate S*M*C multiplication for curves 19 | * 20 | * This function does not encourage you to use SMC, 21 | * instead it is a helper if you use SMC. 22 | * 23 | * if you want to specify S as vector then use more generic glm_mat4_rmc() func. 24 | * 25 | * Example usage: 26 | * B(s) = glm_smc(s, GLM_BEZIER_MAT, (vec4){p0, c0, c1, p1}) 27 | * 28 | * @param[in] s parameter between 0 and 1 (this will be [s3, s2, s, 1]) 29 | * @param[in] m basis matrix 30 | * @param[in] c position/control vector 31 | * 32 | * @return B(s) 33 | */ 34 | CGLM_INLINE 35 | float 36 | glms_smc(float s, mat4s m, vec4s c) { 37 | return glm_smc(s, m.raw, c.raw); 38 | } 39 | 40 | #endif /* cglms_curves_h */ 41 | -------------------------------------------------------------------------------- /src/graphics/cglm/struct/io.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c), Recep Aslantas. 3 | * 4 | * MIT License (MIT), http://opensource.org/licenses/MIT 5 | * Full license can be found in the LICENSE file 6 | */ 7 | 8 | /* 9 | Functions: 10 | CGLM_INLINE void glm_mat4_print(mat4 matrix, FILE *ostream); 11 | CGLM_INLINE void glm_mat3_print(mat3 matrix, FILE *ostream); 12 | CGLM_INLINE void glm_vec4_print(vec4 vec, FILE *ostream); 13 | CGLM_INLINE void glm_vec3_print(vec3 vec, FILE *ostream); 14 | CGLM_INLINE void glm_ivec3_print(ivec3 vec, FILE *ostream); 15 | CGLM_INLINE void glm_versor_print(versor vec, FILE *ostream); 16 | */ 17 | 18 | #ifndef cglms_ios_h 19 | #define cglms_ios_h 20 | 21 | #include "../common.h" 22 | #include "../io.h" 23 | #include "mat4.h" 24 | 25 | #include 26 | #include 27 | 28 | CGLM_INLINE 29 | void 30 | glms_mat4_print(mat4s matrix, 31 | FILE * __restrict ostream) { 32 | 33 | glm_mat4_print(matrix.raw, ostream); 34 | } 35 | 36 | CGLM_INLINE 37 | void 38 | glms_mat3_print(mat3s matrix, 39 | FILE * __restrict ostream) { 40 | glm_mat3_print(matrix.raw, ostream); 41 | } 42 | 43 | CGLM_INLINE 44 | void 45 | glms_vec4_print(vec4s vec, 46 | FILE * __restrict ostream) { 47 | glm_vec4_print(vec.raw, ostream); 48 | } 49 | 50 | CGLM_INLINE 51 | void 52 | glms_vec3_print(vec3s vec, 53 | FILE * __restrict ostream) { 54 | glm_vec3_print(vec.raw, ostream); 55 | } 56 | 57 | CGLM_INLINE 58 | void 59 | glms_ivec3_print(ivec3s vec, 60 | FILE * __restrict ostream) { 61 | glm_ivec3_print(vec.raw, ostream); 62 | } 63 | 64 | CGLM_INLINE 65 | void 66 | glms_versor_print(versors vec, 67 | FILE * __restrict ostream) { 68 | glm_versor_print(vec.raw, ostream); 69 | } 70 | 71 | CGLM_INLINE 72 | void 73 | glms_aabb_print(vec3s bbox[2], 74 | const char * __restrict tag, 75 | FILE * __restrict ostream) { 76 | vec3 rawBbox[2]; 77 | 78 | glms_vec3_(unpack)(rawBbox, bbox, 2); 79 | glm_aabb_print(rawBbox, tag, ostream); 80 | } 81 | 82 | #endif /* cglms_ios_h */ 83 | -------------------------------------------------------------------------------- /src/graphics/cglm/struct/plane.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c), Recep Aslantas. 3 | * 4 | * MIT License (MIT), http://opensource.org/licenses/MIT 5 | * Full license can be found in the LICENSE file 6 | */ 7 | 8 | #ifndef cglms_planes_h 9 | #define cglms_planes_h 10 | 11 | #include "../common.h" 12 | #include "../types-struct.h" 13 | #include "../plane.h" 14 | #include "vec4.h" 15 | 16 | /* 17 | Plane equation: Ax + By + Cz + D = 0; 18 | 19 | It stored in vec4 as [A, B, C, D]. (A, B, C) is normal and D is distance 20 | */ 21 | 22 | /* 23 | Functions: 24 | CGLM_INLINE vec4s glms_plane_normalize(vec4s plane); 25 | */ 26 | 27 | /*! 28 | * @brief normalizes a plane 29 | * 30 | * @param[in] plane plane to normalize 31 | * @returns normalized plane 32 | */ 33 | CGLM_INLINE 34 | vec4s 35 | glms_plane_normalize(vec4s plane) { 36 | glm_plane_normalize(plane.raw); 37 | return plane; 38 | } 39 | 40 | #endif /* cglms_planes_h */ 41 | -------------------------------------------------------------------------------- /src/graphics/cglm/struct/sphere.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c), Recep Aslantas. 3 | * 4 | * MIT License (MIT), http://opensource.org/licenses/MIT 5 | * Full license can be found in the LICENSE file 6 | */ 7 | 8 | #ifndef cglms_spheres_h 9 | #define cglms_spheres_h 10 | 11 | #include "../common.h" 12 | #include "../types-struct.h" 13 | #include "../sphere.h" 14 | #include "mat4.h" 15 | 16 | /* 17 | Sphere Representation in cglm: [center.x, center.y, center.z, radii] 18 | 19 | You could use this representation or you can convert it to vec4 before call 20 | any function 21 | */ 22 | 23 | /*! 24 | * @brief helper for getting sphere radius 25 | * 26 | * @param[in] s sphere 27 | * 28 | * @return returns radii 29 | */ 30 | CGLM_INLINE 31 | float 32 | glms_sphere_radii(vec4s s) { 33 | return glm_sphere_radii(s.raw); 34 | } 35 | 36 | /*! 37 | * @brief apply transform to sphere, it is just wrapper for glm_mat4_mulv3 38 | * 39 | * @param[in] s sphere 40 | * @param[in] m transform matrix 41 | * @returns transformed sphere 42 | */ 43 | CGLM_INLINE 44 | vec4s 45 | glms_sphere_transform(vec4s s, mat4s m) { 46 | vec4s r; 47 | glm_sphere_transform(s.raw, m.raw, r.raw); 48 | return r; 49 | } 50 | 51 | /*! 52 | * @brief merges two spheres and creates a new one 53 | * 54 | * two sphere must be in same space, for instance if one in world space then 55 | * the other must be in world space too, not in local space. 56 | * 57 | * @param[in] s1 sphere 1 58 | * @param[in] s2 sphere 2 59 | * returns merged/extended sphere 60 | */ 61 | CGLM_INLINE 62 | vec4s 63 | glms_sphere_merge(vec4s s1, vec4s s2) { 64 | vec4s r; 65 | glm_sphere_merge(s1.raw, s2.raw, r.raw); 66 | return r; 67 | } 68 | 69 | /*! 70 | * @brief check if two sphere intersects 71 | * 72 | * @param[in] s1 sphere 73 | * @param[in] s2 other sphere 74 | */ 75 | CGLM_INLINE 76 | bool 77 | glms_sphere_sphere(vec4s s1, vec4s s2) { 78 | return glm_sphere_sphere(s1.raw, s2.raw); 79 | } 80 | 81 | /*! 82 | * @brief check if sphere intersects with point 83 | * 84 | * @param[in] s sphere 85 | * @param[in] point point 86 | */ 87 | CGLM_INLINE 88 | bool 89 | glms_sphere_point(vec4s s, vec3s point) { 90 | return glm_sphere_point(s.raw, point.raw); 91 | } 92 | 93 | #endif /* cglms_spheres_h */ 94 | -------------------------------------------------------------------------------- /src/graphics/cglm/version.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c), Recep Aslantas. 3 | * 4 | * MIT License (MIT), http://opensource.org/licenses/MIT 5 | * Full license can be found in the LICENSE file 6 | */ 7 | 8 | #ifndef cglm_version_h 9 | #define cglm_version_h 10 | 11 | #define CGLM_VERSION_MAJOR 0 12 | #define CGLM_VERSION_MINOR 9 13 | #define CGLM_VERSION_PATCH 0 14 | 15 | #endif /* cglm_version_h */ 16 | -------------------------------------------------------------------------------- /src/main/main.h: -------------------------------------------------------------------------------- 1 | #ifndef MAIN_MAIN_H 2 | #define MAIN_MAIN_H 3 | 4 | #ifdef __EMSCRIPTEN__ 5 | #include 6 | #endif 7 | 8 | #ifdef _WIN32 9 | #include 10 | #endif 11 | 12 | #include 13 | 14 | #ifndef DEBUG 15 | #define DEBUG -1 16 | #endif 17 | 18 | // Debug levels: 19 | // =< -1: No debug (no debug symbols) 20 | // 0: Silent debug (debug symbols) 21 | // 1: Simple debug (debug symbols + print out non-constant debug text) 22 | // 2: Verbose debug (debug symbols + print out all debug text) 23 | 24 | #define DBGLVL(x) (DEBUG >= (x)) 25 | 26 | #if DBGLVL(0) && !(defined(__EMSCRIPTEN__) || defined(__ANDROID__)) 27 | #define NAME_THREADS 28 | #endif 29 | 30 | #ifndef MAX_THREADS 31 | #define MAX_THREADS 32 32 | #endif 33 | 34 | #define force_inline inline __attribute__((always_inline)) 35 | 36 | extern CONFIG* config; 37 | extern int quitRequest; 38 | extern int g_argc; 39 | extern char** g_argv; 40 | extern char* maindir; 41 | extern char* startdir; 42 | extern char* localdir; 43 | 44 | #endif 45 | -------------------------------------------------------------------------------- /src/main/toolbox.c: -------------------------------------------------------------------------------- 1 | #if defined(MODULE_TOOLBOX) 2 | 3 | #include
4 | #include "toolbox.h" 5 | #include "version.h" 6 | 7 | #include 8 | #include 9 | #include 10 | 11 | #include 12 | 13 | #define GETARG() ({char* a = NULL; if (argc > 0) {--argc; a = *(argv++);} a;}) 14 | 15 | static void help() { 16 | printf("%s {COMMAND [OPTION]...}... [ARGUMENT]...\n", g_argv[0]); 17 | } 18 | 19 | static int serverlist(int argc, char** argv) { 20 | (void)argc; 21 | (void)argv; 22 | return 0; 23 | } 24 | 25 | int toolbox_main(int argc, char** argv) { 26 | if (argc <= 0) { 27 | help(); 28 | return 0; 29 | } 30 | char* arg; 31 | while ((arg = GETARG())) { 32 | if (!strcmp(arg, "--help")) { 33 | help(); 34 | return 0; 35 | } else if (!strcmp(arg, "--version")) { 36 | puts(PROG_NAME" "VER_STR); 37 | return 0; 38 | } 39 | } 40 | return 0; 41 | } 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /src/main/toolbox.h: -------------------------------------------------------------------------------- 1 | #if defined(MODULE_TOOLBOX) 2 | 3 | #ifndef MAIN_TOOLBOX_H 4 | #define MAIN_TOOLBOX_H 5 | 6 | int toolbox_main(int, char**); 7 | 8 | #endif 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /src/main/version.h: -------------------------------------------------------------------------------- 1 | #ifndef MAIN_VERSION_H 2 | #define MAIN_VERSION_H 3 | 4 | #define VER_MAJOR 0 5 | #define VER_MINOR 7 6 | #define VER_PATCH 0 7 | 8 | #define _STR(x) #x 9 | #define STR(x) _STR(x) 10 | 11 | #define VER_STR STR(VER_MAJOR) "." STR(VER_MINOR) "." STR(VER_PATCH) 12 | 13 | #define PROG_NAME "CaveCube" 14 | #define MODULE_NAME STR(MODULE) 15 | 16 | #define FULL_PROG_NAME PROG_NAME " " MODULE_NAME 17 | 18 | #if defined(USESDL2) 19 | #define IO_ABST "SDL2" 20 | #else 21 | #define IO_ABST "GLFW" 22 | #endif 23 | #if defined(USEGLES) 24 | #define GFX_API "OpenGL ES" 25 | #else 26 | #define GFX_API "OpenGL" 27 | #endif 28 | #define BUILD_STR "Built with " IO_ABST " for " GFX_API "." 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /src/main/version.rc: -------------------------------------------------------------------------------- 1 | #include "version.h" 2 | MAINICON ICON "extras/icon/icon.ico" 3 | 1 VERSIONINFO 4 | FILEVERSION VER_MAJOR,VER_MINOR,VER_PATCH,0 5 | PRODUCTVERSION VER_MAJOR,VER_MINOR,VER_PATCH,0 6 | { 7 | BLOCK "StringFileInfo" { 8 | BLOCK "040904E4" { 9 | VALUE "ProductName", FULL_PROG_NAME 10 | VALUE "ProductVersion", VER_STR 11 | VALUE "FileVersion", VER_STR 12 | VALUE "FileDescription", "An in-development Minecraft/Infiniminer clone" 13 | VALUE "CompanyName", "CaveCube" 14 | VALUE "LegalCopyright", "Copyright (C) CaveCube contributors; Licensed under the Boost Software License 1.0" 15 | VALUE "OriginalFilename", STR(ORIG_NAME) 16 | VALUE "InternalName", STR(INT_NAME) 17 | VALUE "Comments", BUILD_STR 18 | } 19 | } 20 | BLOCK "VarFileInfo" { 21 | VALUE "Translation", 0x0409, 0x04E4 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/server/ccscript.c: -------------------------------------------------------------------------------- 1 | #if defined(MODULE_SERVER) 2 | 3 | #include
4 | #include "ccscript.h" 5 | 6 | #include 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /src/server/chunkpool.c: -------------------------------------------------------------------------------- 1 | #if defined(MODULE_SERVER) 2 | 3 | #include
4 | #include "chunkpool.h" 5 | 6 | #include 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /src/server/chunkpool.h: -------------------------------------------------------------------------------- 1 | #if defined(MODULE_SERVER) 2 | 3 | #ifndef SERVER_CHUNKPOOL_H 4 | #define SERVER_CHUNKPOOL_H 5 | 6 | #include 7 | 8 | #include 9 | 10 | struct chunkpooldata { 11 | pthread_mutex_t lock; 12 | bool valid; 13 | int64_t x; 14 | int64_t z; 15 | struct blockdata* data; 16 | }; 17 | 18 | struct chunkpool { 19 | pthread_mutex_t lock; 20 | int chunks; 21 | struct chunkpooldata chunkdata; 22 | }; 23 | 24 | struct chunkpool* createChunkPool(void); 25 | void destroyChunkPool(struct chunkpool* /*pool*/); 26 | struct chunkpooldata* getPoolChunk(struct chunkpool* /*pool*/, int64_t /*x*/, int64_t /*z*/); 27 | void retPoolChunk(struct chunkpool* /*pool*/, struct chunkpooldata* /*chunk*/); 28 | 29 | #endif 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /src/server/network.h: -------------------------------------------------------------------------------- 1 | #if defined(MODULE_GAME) || defined(MODULE_SERVER) 2 | 3 | #ifndef SERVER_NETWORK_H 4 | #define SERVER_NETWORK_H 5 | 6 | #include 7 | #include 8 | 9 | #ifndef _WIN32 10 | #include 11 | #include 12 | #ifdef __FreeBSD__ 13 | #include 14 | #include 15 | #endif 16 | #define PRIsock "d" 17 | #else 18 | #include 19 | #include 20 | #include 21 | #define PRIsock PRIu64 22 | #endif 23 | 24 | #ifndef _WIN32 25 | typedef int sock_t; 26 | #define INVALID_SOCKET -1 27 | #else 28 | typedef SOCKET sock_t; 29 | #endif 30 | 31 | enum { 32 | CXN__MIN = 0, 33 | CXN_INVAL = 0, 34 | CXN_ACTIVE, 35 | CXN_PASSIVE, 36 | CXN_ACTIVE_MULTICAST, 37 | CXN_PASSIVE_MULTICAST, 38 | CXN__MAX, 39 | }; 40 | 41 | struct netbuf { 42 | int size; 43 | unsigned char* data; 44 | int dlen; 45 | int rptr; 46 | int wptr; 47 | }; 48 | 49 | struct netinfo { 50 | uint8_t addr[4]; 51 | uint16_t port; 52 | }; 53 | 54 | struct netcxn { 55 | int type; 56 | sock_t socket; 57 | struct netbuf* inbuf; 58 | struct netbuf* outbuf; 59 | struct sockaddr_in* address; 60 | struct netinfo info; 61 | }; 62 | 63 | bool initNet(void); 64 | struct netcxn* newCxn(int, char*, int, int, int); 65 | void closeCxn(struct netcxn*); 66 | struct netcxn* acceptCxn(struct netcxn*, int, int); 67 | int recvCxn(struct netcxn*); 68 | int sendCxn(struct netcxn*); 69 | int readFromCxnBuf(struct netcxn*, void*, int); 70 | int writeToCxnBuf(struct netcxn*, void*, int); 71 | void setCxnBufSize(struct netcxn*, int, int); 72 | char* getCxnAddrStr(struct netcxn*, char*); 73 | 74 | #endif 75 | 76 | #endif 77 | -------------------------------------------------------------------------------- /src/server/save.c: -------------------------------------------------------------------------------- 1 | #if defined(MODULE_SERVER) 2 | 3 | #include
4 | #include "save.h" 5 | 6 | #include 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /src/server/save.h: -------------------------------------------------------------------------------- 1 | #if defined(MODULE_SERVER) 2 | 3 | #ifndef SERVER_SAVE_H 4 | #define SERVER_SAVE_H 5 | 6 | #endif 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /src/server/worldgen.h: -------------------------------------------------------------------------------- 1 | #if defined(MODULE_SERVER) 2 | 3 | #ifndef SERVER_WORLDGEN_H 4 | #define SERVER_WORLDGEN_H 5 | 6 | #include 7 | 8 | #include 9 | 10 | bool initWorldgen(void); 11 | void genChunk(int64_t, int64_t, struct blockdata*, int); 12 | 13 | #endif 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /src/zip/LICENSE: -------------------------------------------------------------------------------- 1 | This is free and unencumbered software released into the public domain. 2 | 3 | Anyone is free to copy, modify, publish, use, compile, sell, or 4 | distribute this software, either in source code form or as a compiled 5 | binary, for any purpose, commercial or non-commercial, and by any 6 | means. 7 | 8 | In jurisdictions that recognize copyright laws, the author or authors 9 | of this software dedicate any and all copyright interest in the 10 | software to the public domain. We make this dedication for the benefit 11 | of the public at large and to the detriment of our heirs and 12 | successors. We intend this dedication to be an overt act of 13 | relinquishment in perpetuity of all present and future rights to this 14 | software under copyright law. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR 20 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 21 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | OTHER DEALINGS IN THE SOFTWARE. 23 | 24 | For more information, please refer to 25 | -------------------------------------------------------------------------------- /src/zlib/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright notice: 2 | 3 | (C) 1995-2022 Jean-loup Gailly and Mark Adler 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | 21 | Jean-loup Gailly Mark Adler 22 | jloup@gzip.org madler@alumni.caltech.edu 23 | -------------------------------------------------------------------------------- /src/zlib/README: -------------------------------------------------------------------------------- 1 | This notice serves to fulfill restriction 2 stated in LICENSE 2 | 3 | Modified by PQCraft for use in CaveCube: 4 | - Removed unessential files 5 | -------------------------------------------------------------------------------- /src/zlib/gzclose.c: -------------------------------------------------------------------------------- 1 | /* gzclose.c -- zlib gzclose() function 2 | * Copyright (C) 2004, 2010 Mark Adler 3 | * For conditions of distribution and use, see copyright notice in zlib.h 4 | */ 5 | 6 | #include "gzguts.h" 7 | 8 | /* gzclose() is in a separate file so that it is linked in only if it is used. 9 | That way the other gzclose functions can be used instead to avoid linking in 10 | unneeded compression or decompression routines. */ 11 | int ZEXPORT gzclose(file) 12 | gzFile file; 13 | { 14 | #ifndef NO_GZCOMPRESS 15 | gz_statep state; 16 | 17 | if (file == NULL) 18 | return Z_STREAM_ERROR; 19 | state = (gz_statep)file; 20 | 21 | return state->mode == GZ_READ ? gzclose_r(file) : gzclose_w(file); 22 | #else 23 | return gzclose_r(file); 24 | #endif 25 | } 26 | -------------------------------------------------------------------------------- /src/zlib/inffast.h: -------------------------------------------------------------------------------- 1 | /* inffast.h -- header to use inffast.c 2 | * Copyright (C) 1995-2003, 2010 Mark Adler 3 | * For conditions of distribution and use, see copyright notice in zlib.h 4 | */ 5 | 6 | /* WARNING: this file should *not* be used by applications. It is 7 | part of the implementation of the compression library and is 8 | subject to change. Applications should only use zlib.h. 9 | */ 10 | 11 | void ZLIB_INTERNAL inflate_fast OF((z_streamp strm, unsigned start)); 12 | -------------------------------------------------------------------------------- /util.mk: -------------------------------------------------------------------------------- 1 | ifeq ($(SHCMD),unix) 2 | define null 3 | @echo > /dev/null 4 | endef 5 | else ifeq ($(SHCMD),win32) 6 | define null 7 | @echo. > NUL 8 | endef 9 | endif 10 | 11 | define ccmsg 12 | @echo Compiling $(NAME)/$<... 13 | endef 14 | 15 | define cdmsg 16 | @echo Compiled $(NAME)/$< 17 | endef 18 | 19 | ifeq ($(SHCMD),unix) 20 | define mkdir 21 | @[ ! -d "$@" ] && echo Creating $@... && mkdir -p "$@"; true 22 | endef 23 | else ifeq ($(SHCMD),win32) 24 | define mkdir 25 | @if not exist "$@" echo Creating $@... & md "$(subst /,\,$@)" 26 | endef 27 | endif 28 | 29 | default: all 30 | $(null) 31 | 32 | OUTDIR := $(OBJDIR)/$(NAME) 33 | CFILES := $(wildcard $(SRCDIR)/$(NAME)/*.c) 34 | OFILES := $(addprefix $(OUTDIR)/,$(notdir $(CFILES:.c=.o))) 35 | 36 | ifeq ($(SHCMD),unix) 37 | TAB := " " 38 | else ifeq ($(SHCMD),win32) 39 | define TAB 40 | 41 | endef 42 | endif 43 | 44 | ifeq ($(SHCMD),unix) 45 | esc = \$() 46 | else ifeq ($(SHCMD),win32) 47 | define esc 48 | ^ 49 | endef 50 | endif 51 | 52 | ifeq ($(SHCMD),unix) 53 | define echoblank 54 | echo 55 | endef 56 | else ifeq ($(SHCMD),win32) 57 | define echoblank 58 | echo. 59 | endef 60 | endif 61 | 62 | define COMPC 63 | @$(ccmsg) 64 | @$(CC) $(CFLAGS) $< -Wuninitialized -c -o $@ 65 | @$(cdmsg) 66 | endef 67 | 68 | SNAME := $(NAME): 69 | 70 | $(OBJDIR): 71 | $(mkdir) 72 | 73 | $(OUTDIR): 74 | $(mkdir) 75 | 76 | cleanobjdir: FORCE 77 | @echo Removing $(OBJDIR)... 78 | ifeq ($(SHCMD),unix) 79 | @rm -rf "$(OBJDIR)" 80 | else ifeq ($(SHCMD),win32) 81 | @if exist "$(subst /,\,$(OBJDIR))" rmdir /S /Q "$(subst /,\,$(OBJDIR))" 82 | endif 83 | 84 | cleanoutdir: FORCE 85 | @echo Removing $(OUTDIR)... 86 | ifeq ($(SHCMD),unix) 87 | @rm -rf "$(OUTDIR)" 88 | else ifeq ($(SHCMD),win32) 89 | @if exist "$(subst /,\,$(OUTDIR))" rmdir /S /Q "$(subst /,\,$(OUTDIR))" 90 | endif 91 | 92 | FORCE: 93 | 94 | .PHONY: cleanobjdir cleanoutdir FORCE 95 | 96 | --------------------------------------------------------------------------------