mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-30 21:31:03 +00:00
- moveclouds.
This commit is contained in:
parent
25bff01c70
commit
827672a775
4 changed files with 26 additions and 58 deletions
|
@ -51,7 +51,6 @@ set( PCH_SOURCES
|
|||
src/zz_premap.cpp
|
||||
src/zz_savegame.cpp
|
||||
src/zz_screens.cpp
|
||||
src/zz_sector.cpp
|
||||
)
|
||||
|
||||
add_game_library2( duke )
|
||||
|
|
|
@ -1099,6 +1099,30 @@ void allignwarpelevators(void)
|
|||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void moveclouds(void)
|
||||
{
|
||||
if (totalclock > cloudtotalclock || totalclock < (cloudtotalclock - 7))
|
||||
{
|
||||
cloudtotalclock = totalclock + 6;
|
||||
|
||||
// cloudx/y were an array, but all entries were always having the same value so a single pair is enough.
|
||||
cloudx += (sintable[(ps[screenpeek].getang() + 512) & 2047] >> 9);
|
||||
cloudy += (sintable[ps[screenpeek].getang() & 2047] >> 9);
|
||||
for (int i = 0; i < numclouds; i++)
|
||||
{
|
||||
sector[clouds[i]].ceilingxpanning = cloudx >> 6;
|
||||
sector[clouds[i]].ceilingypanning = cloudy >> 6;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
END_DUKE_NS
|
||||
|
|
|
@ -117,28 +117,9 @@ static int32_t gtextsc(int32_t sc)
|
|||
|
||||
////////// DISPLAYREST //////////
|
||||
|
||||
static inline void G_MoveClouds(void)
|
||||
{
|
||||
int32_t i;
|
||||
|
||||
if (totalclock <= g_cloudClock && totalclock >= (g_cloudClock-7))
|
||||
return;
|
||||
|
||||
g_cloudClock = totalclock+6;
|
||||
|
||||
g_cloudX += sintable[(fix16_to_int(g_player[screenpeek].ps->q16ang)+512)&2047]>>9;
|
||||
g_cloudY += sintable[fix16_to_int(g_player[screenpeek].ps->q16ang)&2047]>>9;
|
||||
|
||||
for (i=numclouds-1; i>=0; i--)
|
||||
{
|
||||
sector[clouds[i]].ceilingxpanning = g_cloudX>>6;
|
||||
sector[clouds[i]].ceilingypanning = g_cloudY>>6;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void displayweapon(int snum);
|
||||
void moveclouds();
|
||||
|
||||
void G_DisplayRest(int32_t smoothratio)
|
||||
{
|
||||
|
@ -236,7 +217,7 @@ void G_DisplayRest(int32_t smoothratio)
|
|||
fi.displaymasks(screenpeek);
|
||||
}
|
||||
if (!RR)
|
||||
G_MoveClouds();
|
||||
moveclouds();
|
||||
}
|
||||
|
||||
if (ud.overhead_on > 0)
|
||||
|
|
|
@ -1,36 +0,0 @@
|
|||
//-------------------------------------------------------------------------
|
||||
/*
|
||||
Copyright (C) 2010 EDuke32 developers and contributors
|
||||
|
||||
This file is part of EDuke32.
|
||||
|
||||
EDuke32 is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License version 2
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
//-------------------------------------------------------------------------
|
||||
#include "ns.h" // Must come before everything else!
|
||||
|
||||
#define sector_c_
|
||||
|
||||
#include "duke3d.h"
|
||||
|
||||
#include "secrets.h"
|
||||
#include "v_video.h"
|
||||
#include "glbackend/glbackend.h"
|
||||
|
||||
BEGIN_DUKE_NS
|
||||
|
||||
|
||||
|
||||
END_DUKE_NS
|
Loading…
Reference in a new issue