- replaced another large batch of homegrown type use.
This commit is contained in:
parent
6c6bab73ad
commit
6dee9ff566
57 changed files with 656 additions and 656 deletions
|
|
@ -95,7 +95,7 @@ FAnimDef *FTextureManager::AddAnim (FAnimDef *anim)
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
FAnimDef *FTextureManager::AddSimpleAnim (FTextureID picnum, int animcount, DWORD speedmin, DWORD speedrange)
|
||||
FAnimDef *FTextureManager::AddSimpleAnim (FTextureID picnum, int animcount, uint32_t speedmin, uint32_t speedrange)
|
||||
{
|
||||
if (AreTexturesCompatible(picnum, picnum + (animcount - 1)))
|
||||
{
|
||||
|
|
@ -187,11 +187,11 @@ void FTextureManager::InitAnimated (void)
|
|||
{
|
||||
FMemLump animatedlump = Wads.ReadLump (lumpnum);
|
||||
int animatedlen = Wads.LumpLength(lumpnum);
|
||||
const BYTE *animdefs = (const BYTE *)animatedlump.GetMem();
|
||||
const BYTE *anim_p;
|
||||
const uint8_t *animdefs = (const uint8_t *)animatedlump.GetMem();
|
||||
const uint8_t *anim_p;
|
||||
FTextureID pic1, pic2;
|
||||
int animtype;
|
||||
DWORD animspeed;
|
||||
uint32_t animspeed;
|
||||
|
||||
// Init animation
|
||||
animtype = FAnimDef::ANIM_Forward;
|
||||
|
|
@ -349,7 +349,7 @@ void FTextureManager::ParseAnim (FScanner &sc, int usetype)
|
|||
int defined = 0;
|
||||
bool optional = false, missing = false;
|
||||
FAnimDef *ani = NULL;
|
||||
BYTE type = FAnimDef::ANIM_Forward;
|
||||
uint8_t type = FAnimDef::ANIM_Forward;
|
||||
|
||||
sc.MustGetString ();
|
||||
if (sc.Compare ("optional"))
|
||||
|
|
@ -467,7 +467,7 @@ FAnimDef *FTextureManager::ParseRangeAnim (FScanner &sc, FTextureID picnum, int
|
|||
{
|
||||
int type;
|
||||
FTextureID framenum;
|
||||
DWORD min, max;
|
||||
uint32_t min, max;
|
||||
|
||||
type = FAnimDef::ANIM_Forward;
|
||||
framenum = ParseFramenum (sc, picnum, usetype, missing);
|
||||
|
|
@ -507,7 +507,7 @@ FAnimDef *FTextureManager::ParseRangeAnim (FScanner &sc, FTextureID picnum, int
|
|||
void FTextureManager::ParsePicAnim (FScanner &sc, FTextureID picnum, int usetype, bool missing, TArray<FAnimDef::FAnimFrame> &frames)
|
||||
{
|
||||
FTextureID framenum;
|
||||
DWORD min = 1, max = 1;
|
||||
uint32_t min = 1, max = 1;
|
||||
|
||||
framenum = ParseFramenum (sc, picnum, usetype, missing);
|
||||
ParseTime (sc, min, max);
|
||||
|
|
@ -561,20 +561,20 @@ FTextureID FTextureManager::ParseFramenum (FScanner &sc, FTextureID basepicnum,
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
void FTextureManager::ParseTime (FScanner &sc, DWORD &min, DWORD &max)
|
||||
void FTextureManager::ParseTime (FScanner &sc, uint32_t &min, uint32_t &max)
|
||||
{
|
||||
sc.MustGetString ();
|
||||
if (sc.Compare ("tics"))
|
||||
{
|
||||
sc.MustGetFloat ();
|
||||
min = max = DWORD(sc.Float * 1000 / 35);
|
||||
min = max = uint32_t(sc.Float * 1000 / 35);
|
||||
}
|
||||
else if (sc.Compare ("rand"))
|
||||
{
|
||||
sc.MustGetFloat ();
|
||||
min = DWORD(sc.Float * 1000 / 35);
|
||||
min = uint32_t(sc.Float * 1000 / 35);
|
||||
sc.MustGetFloat ();
|
||||
max = DWORD(sc.Float * 1000 / 35);
|
||||
max = uint32_t(sc.Float * 1000 / 35);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -876,7 +876,7 @@ FDoorAnimation *FTextureManager::FindAnimatedDoor (FTextureID picnum)
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
void FAnimDef::SetSwitchTime (DWORD mstime)
|
||||
void FAnimDef::SetSwitchTime (uint32_t mstime)
|
||||
{
|
||||
int speedframe = bDiscrete ? CurFrame : 0;
|
||||
|
||||
|
|
@ -917,7 +917,7 @@ void FTextureManager::SetTranslation (FTextureID fromtexnum, FTextureID totexnum
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
void FTextureManager::UpdateAnimations (DWORD mstime)
|
||||
void FTextureManager::UpdateAnimations (uint32_t mstime)
|
||||
{
|
||||
for (unsigned int j = 0; j < mAnimations.Size(); ++j)
|
||||
{
|
||||
|
|
@ -955,7 +955,7 @@ void FTextureManager::UpdateAnimations (DWORD mstime)
|
|||
// select a random frame other than the current one
|
||||
if (anim->NumFrames > 1)
|
||||
{
|
||||
WORD rndFrame = (WORD)pr_animatepictures(anim->NumFrames - 1);
|
||||
uint16_t rndFrame = (uint16_t)pr_animatepictures(anim->NumFrames - 1);
|
||||
if (rndFrame >= anim->CurFrame) rndFrame++;
|
||||
anim->CurFrame = rndFrame;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue