header for octarender

master
Daniel Kolesa 2020-06-22 23:54:57 +02:00
parent 089c896411
commit 9ce4837683
18 changed files with 42 additions and 19 deletions

View File

@ -63,22 +63,4 @@ extern bool useavatarmask();
extern void enableavatarmask();
extern void disableavatarmask();
// octarender
extern ivec worldmin, worldmax, nogimin, nogimax;
extern vector<tjoint> tjoints;
extern vector<vtxarray *> varoot, valist;
extern ushort encodenormal(const vec &n);
extern vec decodenormal(ushort norm);
extern void guessnormals(const vec *pos, int numverts, vec *normals);
extern void reduceslope(ivec &n);
extern void findtjoints();
extern void octarender();
extern void allchanged(bool load = false);
extern void clearvas(cube *c);
extern void destroyva(vtxarray *va, bool reparent = true);
extern void updatevabb(vtxarray *va, bool force = false);
extern void updatevabbs(bool force = false);
#endif

View File

@ -3,6 +3,7 @@
#include "main.hh" // renderbackground
#include "octa.hh"
#include "octaedit.hh" // commitchanges
#include "octarender.hh"
#include "physics.hh"
#include "renderlights.hh"
#include "texture.hh"

View File

@ -7,6 +7,7 @@
#include "console.hh"
#include "movie.hh"
#include "octaedit.hh"
#include "octarender.hh" // allchanged
#include "rendergl.hh"
#include "rendermodel.hh" // cleanupmodels
#include "renderparticles.hh"

View File

@ -1,5 +1,6 @@
#include "material.hh"
#include "octaedit.hh" // editmode
#include "octarender.hh"
#include "rendergl.hh"
#include "renderlights.hh"
#include "renderva.hh"

View File

@ -1,4 +1,5 @@
#include "main.hh" // renderprogress
#include "octarender.hh"
#include "texture.hh"
#include "engine.hh"

View File

@ -5,6 +5,7 @@
#include "console.hh" /* conoutf */
#include "main.hh" // renderprogress
#include "octaedit.hh"
#include "octarender.hh"
#include "world.hh"
#include "engine.hh"

View File

@ -5,6 +5,7 @@
#include "main.hh" // mainmenu, keyrepeat, renderedframe
#include "material.hh"
#include "octa.hh"
#include "octarender.hh"
#include "pvs.hh"
#include "rendergl.hh"
#include "renderlights.hh"

View File

@ -1,5 +1,7 @@
// octarender.cpp: fill vertex arrays with different cube surfaces.
#include "octarender.hh"
#include "blend.hh"
#include "console.hh" /* conoutf */
#include "grass.hh"
@ -836,7 +838,7 @@ ushort encodenormal(const vec &n)
return ushort(clamp(pitch + 90, 0, 180)*360 + (yaw < 0 ? yaw%360 + 360 : yaw%360) + 1);
}
vec decodenormal(ushort norm)
static vec decodenormal(ushort norm)
{
if(!norm) return vec(0, 0, 1);
norm--;

View File

@ -0,0 +1,24 @@
#ifndef ENGINE_OCTARENDER_HH
#define ENGINE_OCTARENDER_HH
#include <shared/tools.hh>
#include <shared/geom.hh>
#include "octa.hh"
extern ivec worldmin, worldmax, nogimin, nogimax;
extern vector<tjoint> tjoints;
extern vector<vtxarray *> varoot, valist;
ushort encodenormal(const vec &n);
void guessnormals(const vec *pos, int numverts, vec *normals);
void reduceslope(ivec &n);
void findtjoints();
void octarender();
void allchanged(bool load = false);
void clearvas(cube *c);
void destroyva(vtxarray *va, bool reparent = true);
void updatevabb(vtxarray *va, bool force = false);
void updatevabbs(bool force = false);
#endif

View File

@ -3,6 +3,7 @@
#include "console.hh" /* conoutf */
#include "main.hh" // numcpus, interceptkey, renderbackground
#include "octa.hh"
#include "octarender.hh" // valist
#include "engine.hh"

View File

@ -8,6 +8,7 @@
#include "material.hh"
#include "pvs.hh"
#include "octaedit.hh"
#include "octarender.hh" // valist
#include "rendergl.hh"
#include "renderlights.hh"
#include "rendermodel.hh"

View File

@ -5,6 +5,7 @@
#include "main.hh" // initwarning
#include "material.hh"
#include "octaedit.hh" // editmode
#include "octarender.hh"
#include "pvs.hh"
#include "rendergl.hh"
#include "rendermodel.hh"

View File

@ -6,6 +6,7 @@
#include "grass.hh"
#include "main.hh" // renderprogress
#include "octaedit.hh" // editmode
#include "octarender.hh"
#include "pvs.hh"
#include "rendergl.hh"
#include "renderlights.hh"

View File

@ -5,6 +5,7 @@
#include "command.hh" // identflags
#include "console.hh" /* conoutf */
#include "main.hh" // loadprogress, renderprogress
#include "octarender.hh"
#include "rendergl.hh"
#include "rendermodel.hh" // cleanupmodels
#include "texture.hh"

View File

@ -7,6 +7,7 @@
#include "main.hh" // initwarning, loadprogress, renderprogress, screenw/h, renderedframe
#include "material.hh"
#include "octaedit.hh"
#include "octarender.hh"
#include "rendergl.hh"
#include "rendersky.hh"
#include "shader.hh"

View File

@ -1,4 +1,5 @@
#include "material.hh"
#include "octarender.hh"
#include "rendergl.hh"
#include "texture.hh"
#include "water.hh"

View File

@ -6,6 +6,7 @@
#include "main.hh" // clearmainmenu
#include "octa.hh"
#include "octaedit.hh"
#include "octarender.hh"
#include "physics.hh"
#include "pvs.hh"
#include "rendergl.hh" /* fovy */

View File

@ -6,6 +6,7 @@
#include "main.hh" // clearmainmenu, renderbackground
#include "octa.hh"
#include "octaedit.hh" // texmru
#include "octarender.hh"
#include "pvs.hh"
#include "rendermodel.hh" // loadmapmodel, getmminfo, flushpreloadedmodels
#include "texture.hh"