mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-29 20:50:58 +00:00
fade_t fields
This commit is contained in:
parent
0fedd2e566
commit
44b25be69a
3 changed files with 17 additions and 32 deletions
|
@ -1561,15 +1561,11 @@ static void SaveDisappearThinker(const thinker_t *th, const UINT8 type)
|
|||
static void SaveFadeThinker(const thinker_t *th, const UINT8 type)
|
||||
{
|
||||
const fade_t *ht = (const void *)th;
|
||||
// \todo fields
|
||||
WRITEUINT8(save_p, type);
|
||||
WRITEUINT32(save_p, ht->appeartime);
|
||||
WRITEUINT32(save_p, ht->disappeartime);
|
||||
WRITEUINT32(save_p, ht->offset);
|
||||
WRITEUINT32(save_p, ht->timer);
|
||||
WRITEINT32(save_p, ht->affectee);
|
||||
WRITEINT32(save_p, ht->sourceline);
|
||||
WRITEINT32(save_p, ht->exists);
|
||||
WRITEINT32(save_p, ht->destvalue);
|
||||
WRITEINT32(save_p, ht->speed);
|
||||
WRITEUINT8(save_p, ht->ignoreflags);
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -2564,14 +2560,10 @@ static inline void LoadFadeThinker(actionf_p1 thinker)
|
|||
{
|
||||
fade_t *ht = Z_Malloc(sizeof (*ht), PU_LEVSPEC, NULL);
|
||||
ht->thinker.function.acp1 = thinker;
|
||||
// \todo fields
|
||||
ht->appeartime = READUINT32(save_p);
|
||||
ht->disappeartime = READUINT32(save_p);
|
||||
ht->offset = READUINT32(save_p);
|
||||
ht->timer = READUINT32(save_p);
|
||||
ht->affectee = READINT32(save_p);
|
||||
ht->sourceline = READINT32(save_p);
|
||||
ht->exists = READINT32(save_p);
|
||||
ht->destvalue = READINT32(save_p);
|
||||
ht->speed = READINT32(save_p);
|
||||
ht->ignoreflags = READUINT8(save_p);
|
||||
P_AddThinker(&ht->thinker);
|
||||
}
|
||||
|
||||
|
|
19
src/p_spec.c
19
src/p_spec.c
|
@ -7058,23 +7058,20 @@ void T_Disappear(disappear_t *d)
|
|||
|
||||
/** Adds master fader thinker.
|
||||
*
|
||||
* \param appeartime tics to be existent
|
||||
* \param disappeartime tics to be nonexistent
|
||||
* \param sector pointer to control sector
|
||||
* \param destvalue transparency value to fade to
|
||||
* \param speed speed to fade by
|
||||
* \param ignoreexists do not handle FF_EXISTS
|
||||
* \param line line to target FOF
|
||||
*/
|
||||
static void P_AddMasterFader(tic_t appeartime, tic_t disappeartime, tic_t offset, INT32 line, INT32 sourceline)
|
||||
static void P_AddMasterFader(INT32 destvalue, INT32 speed, BOOL ignoreflags, INT32 line)
|
||||
{
|
||||
fade_t *d = Z_Malloc(sizeof *d, PU_LEVSPEC, NULL);
|
||||
|
||||
// \todo fields
|
||||
d->thinker.function.acp1 = (actionf_p1)T_Disappear;
|
||||
d->appeartime = appeartime;
|
||||
d->disappeartime = disappeartime;
|
||||
d->offset = offset;
|
||||
d->affectee = line;
|
||||
d->sourceline = sourceline;
|
||||
d->exists = true;
|
||||
d->timer = 1;
|
||||
d->destvalue = destvalue;
|
||||
d->speed = speed;
|
||||
d->ignoreflags = (UINT8)ignoreflags;
|
||||
|
||||
P_AddThinker(&d->thinker);
|
||||
}
|
||||
|
|
10
src/p_spec.h
10
src/p_spec.h
|
@ -452,15 +452,11 @@ void T_Disappear(disappear_t *d);
|
|||
// Model for fading FOFs
|
||||
typedef struct
|
||||
{
|
||||
// \todo fields
|
||||
thinker_t thinker; ///< Thinker structure for effect.
|
||||
tic_t appeartime; ///< Tics to be appeared for
|
||||
tic_t disappeartime;///< Tics to be disappeared for
|
||||
tic_t offset; ///< Time to wait until thinker starts
|
||||
tic_t timer; ///< Timer between states
|
||||
INT32 affectee; ///< Number of affected line
|
||||
INT32 sourceline; ///< Number of source line
|
||||
INT32 exists; ///< Exists toggle
|
||||
INT32 destvalue; ///< Transparency value to fade to
|
||||
INT32 speed; ///< Speed to fade by
|
||||
UINT8 ignoreflags; ///< Do not handle FF_EXISTS
|
||||
} fade_t;
|
||||
|
||||
void T_Fade(fade_t *d);
|
||||
|
|
Loading…
Reference in a new issue