mirror of
https://github.com/ZDoom/Raze.git
synced 2025-05-30 08:51:08 +00:00
- rewrote the model storage code.
Using proper C++ containers now.
This commit is contained in:
parent
8bc34f3dac
commit
a4dd5bb4ce
29 changed files with 401 additions and 1374 deletions
|
@ -76,7 +76,7 @@ static voxmodel_t* voxload(int lumpnum)
|
|||
voxmodel_t* vm = new voxmodel_t;
|
||||
*vm = {};
|
||||
auto pivot = voxel->Mips[0].Pivot;
|
||||
vm->mdnum = 1; //VOXel model id
|
||||
//vm->mdnum = 1; //VOXel model id
|
||||
vm->scale = vm->bscale = 1.f;
|
||||
vm->piv.X = float(pivot.X);
|
||||
vm->piv.Y = float(pivot.Y);
|
||||
|
|
|
@ -1,12 +1,16 @@
|
|||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
#include "mdsprite.h"
|
||||
#include "model.h"
|
||||
#include "model_kvx.h"
|
||||
#include "intvec.h"
|
||||
|
||||
// We still need the relation to mdmodel_t as long as the model code hasn't been redone.
|
||||
struct voxmodel_t : public mdmodel_t
|
||||
constexpr int MAXVOXELS = 1024;
|
||||
|
||||
struct voxmodel_t // : public mdmodel_t
|
||||
{
|
||||
FVoxelModel* model = nullptr;
|
||||
float scale, bscale, zadd, yoffset;
|
||||
vec3_t siz;
|
||||
FVector3 piv;
|
||||
int32_t is8bit;
|
||||
|
@ -19,6 +23,9 @@ extern float voxscale[];
|
|||
extern voxmodel_t* voxmodels[MAXVOXELS];
|
||||
extern FixedBitArray<MAXVOXELS> voxrotate;
|
||||
|
||||
inline int32_t nextvoxid;
|
||||
inline FixedBitArray<MAXVOXELS>voxreserve;
|
||||
|
||||
void voxInit();
|
||||
void voxClear();
|
||||
int voxDefine(int voxindex, const char* filename);
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
#include "build.h"
|
||||
#include "hw_renderstate.h"
|
||||
#include "hw_drawinfo.h"
|
||||
//#include "models.h"
|
||||
#include "models/modeldata.h"
|
||||
#include "hw_clock.h"
|
||||
#include "hw_cvars.h"
|
||||
#include "hw_viewpointbuffer.h"
|
||||
|
@ -290,8 +290,8 @@ void HWDrawInfo::DispatchSprites()
|
|||
|
||||
if (!(actor->sprext.renderflags & SPREXT_NOTMD))
|
||||
{
|
||||
int pt = Ptile2tile(tilenum, tspr->pal);
|
||||
if (hw_models && tile2model[pt].modelid >= 0 && tile2model[pt].framenum >= 0)
|
||||
auto pt = modelManager.GetModel(tilenum, tspr->pal);
|
||||
if (hw_models && pt && pt->modelid >= 0 && pt->framenum >= 0)
|
||||
{
|
||||
//HWSprite hwsprite;
|
||||
//if (hwsprite.ProcessModel(pt, tspr)) continue;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue