mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-16 09:21:36 +00:00
Clean up mdsprite.c:voxdraw() a little.
git-svn-id: https://svn.eduke32.com/eduke32@3589 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
286cd692ec
commit
904a26e045
2 changed files with 11 additions and 7 deletions
|
@ -3301,9 +3301,9 @@ voxmodel_t *voxload(const char *filnam)
|
|||
//Draw voxel model as perfect cubes
|
||||
int32_t voxdraw(voxmodel_t *m, const spritetype *tspr)
|
||||
{
|
||||
point3d fp, m0, a0;
|
||||
point3d m0, a0;
|
||||
int32_t i, j, fi, xx, yy, zz;
|
||||
float ru, rv, phack[2], clut[6] = {1,1,1,1,1,1}; //1.02,1.02,0.94,1.06,0.98,0.98};
|
||||
float ru, rv, phack[2]; //, clut[6] = {1.02,1.02,0.94,1.06,0.98,0.98};
|
||||
float f, g, k0, mat[16], omat[16], pc[4];
|
||||
vert_t *vptr;
|
||||
|
||||
|
@ -3398,7 +3398,7 @@ int32_t voxdraw(voxmodel_t *m, const spritetype *tspr)
|
|||
bglBegin(GL_QUADS);
|
||||
for (i=0,fi=0; i<m->qcnt; i++)
|
||||
{
|
||||
if (i == m->qfacind[fi]) { f = clut[fi++]; bglColor4f(pc[0]*f,pc[1]*f,pc[2]*f,pc[3]*f); }
|
||||
if (i == m->qfacind[fi]) { f = 1 /*clut[fi++]*/; bglColor4f(pc[0]*f,pc[1]*f,pc[2]*f,pc[3]*f); }
|
||||
vptr = &m->quad[i].v[0];
|
||||
|
||||
xx = vptr[0].x+vptr[2].x;
|
||||
|
@ -3407,6 +3407,7 @@ int32_t voxdraw(voxmodel_t *m, const spritetype *tspr)
|
|||
|
||||
for (j=0; j<4; j++)
|
||||
{
|
||||
point3d fp;
|
||||
#if (VOXBORDWIDTH == 0)
|
||||
bglTexCoord2f(((float)vptr[j].u)*ru+uhack[vptr[j].u!=vptr[0].u],
|
||||
((float)vptr[j].v)*rv+vhack[vptr[j].v!=vptr[0].v]);
|
||||
|
|
|
@ -53,8 +53,6 @@ DBG_.loadGamevarsString(gvstr)
|
|||
print("ourvar[4]="..ourvar[4])
|
||||
|
||||
|
||||
local i
|
||||
|
||||
print('tweaking sector pals')
|
||||
print('numsectors: ' .. gv.numsectors .. ' of ' .. gv.MAXSECTORS)
|
||||
|
||||
|
@ -69,12 +67,16 @@ printf('volume=%d, level=%d', vol, lev)
|
|||
|
||||
if (vol==1 and lev==1) then -- E1L1
|
||||
print('tweaking some sprites 2')
|
||||
i = 562
|
||||
local i = 562
|
||||
spriteext[i].alpha = 0.5;
|
||||
sprite[i].cstat = bit.bor(sprite[i].cstat, 2+512);
|
||||
spriteext[i].pitch = 128;
|
||||
spriteext[i].roll = 256;
|
||||
|
||||
i = 107 -- pistol ammo at rooftop
|
||||
spriteext[i].pitch = 128;
|
||||
spriteext[i].roll = 256;
|
||||
|
||||
for spr in spritesofsect(307) do -- some fence sprites in E1L1
|
||||
printf('spr %d', spr)
|
||||
sprite[spr].pal = 6
|
||||
|
@ -414,7 +416,8 @@ gameevent("DISPLAYROOMS",
|
|||
gameevent("DISPLAYREST", function()
|
||||
for i=0,10 do
|
||||
for j=1,100 do
|
||||
con._gametext(2822, j, i, 12, 0, 0, 16, 0,0,gv.xdim,gv.ydim,8192)
|
||||
-- XXX: This is slower in the Polymodes than with classic!
|
||||
-- con._gametext(2822, j, i, 12, 0, 0, 16, 0,0,gv.xdim,gv.ydim,8192)
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
|
Loading…
Reference in a new issue