mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-27 22:33:17 +00:00
Test on a few methods/classes
This commit is contained in:
parent
26dc0c6df2
commit
fb2a843c03
6 changed files with 41 additions and 3 deletions
|
@ -1419,6 +1419,10 @@ public:
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
VMEXPORT_NATIVES_START(AActor, DThinker)
|
||||||
|
VMEXPORT_NATIVES_FUNC(DropInventory)
|
||||||
|
VMEXPORT_NATIVES_END(AActor)
|
||||||
|
|
||||||
class FActorIterator
|
class FActorIterator
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -608,6 +608,8 @@ protected:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class AInventory;//
|
||||||
|
|
||||||
template<class T>
|
template<class T>
|
||||||
class DVMObject : public T
|
class DVMObject : public T
|
||||||
{
|
{
|
||||||
|
@ -638,6 +640,23 @@ private:
|
||||||
{
|
{
|
||||||
new((EInPlace *)mem) DVMObject<T>;
|
new((EInPlace *)mem) DVMObject<T>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public:
|
||||||
|
void Destroy()
|
||||||
|
{
|
||||||
|
Printf("Destroy\n");
|
||||||
|
ExportedNatives<T>::Get()->Destroy<void, T>(this);
|
||||||
|
}
|
||||||
|
void Tick()
|
||||||
|
{
|
||||||
|
Printf("Tick\n");
|
||||||
|
ExportedNatives<T>::Get()->Tick<void, T>(this);
|
||||||
|
}
|
||||||
|
AInventory *DropInventory(AInventory *item)
|
||||||
|
{
|
||||||
|
Printf("DropInventory\n");
|
||||||
|
return ExportedNatives<T>::Get()->DropInventory<AInventory *, T>(this, item);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
template<class T>
|
template<class T>
|
||||||
|
@ -655,6 +674,17 @@ ClassReg DVMObject<T>::RegistrationInfo =
|
||||||
};
|
};
|
||||||
template<class T> _DECLARE_TI(DVMObject<T>)
|
template<class T> _DECLARE_TI(DVMObject<T>)
|
||||||
|
|
||||||
|
//Initial list
|
||||||
|
VMEXPORTED_NATIVES_START
|
||||||
|
VMEXPORTED_NATIVES_FUNC(Destroy)
|
||||||
|
VMEXPORTED_NATIVES_FUNC(Tick)
|
||||||
|
VMEXPORTED_NATIVES_FUNC(DropInventory)
|
||||||
|
VMEXPORTED_NATIVES_END
|
||||||
|
|
||||||
|
VMEXPORT_NATIVES_START(DObject, void)
|
||||||
|
VMEXPORT_NATIVES_FUNC(Destroy)
|
||||||
|
VMEXPORT_NATIVES_END(DObject)
|
||||||
|
|
||||||
// When you write to a pointer to an Object, you must call this for
|
// When you write to a pointer to an Object, you must call this for
|
||||||
// proper bookkeeping in case the Object holding this pointer has
|
// proper bookkeeping in case the Object holding this pointer has
|
||||||
// already been processed by the GC.
|
// already been processed by the GC.
|
||||||
|
|
|
@ -47,7 +47,7 @@ extern cycle_t BotSupportCycles;
|
||||||
extern cycle_t ActionCycles;
|
extern cycle_t ActionCycles;
|
||||||
extern int BotWTG;
|
extern int BotWTG;
|
||||||
|
|
||||||
IMPLEMENT_CLASS(DThinker, false, false, false, false)
|
IMPLEMENT_CLASS(DThinker, false, false, false, true)
|
||||||
|
|
||||||
DThinker *NextToThink;
|
DThinker *NextToThink;
|
||||||
|
|
||||||
|
|
|
@ -108,6 +108,10 @@ private:
|
||||||
DThinker *NextThinker, *PrevThinker;
|
DThinker *NextThinker, *PrevThinker;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
VMEXPORT_NATIVES_START(DThinker, DObject)
|
||||||
|
VMEXPORT_NATIVES_FUNC(Tick)
|
||||||
|
VMEXPORT_NATIVES_END(DThinker)
|
||||||
|
|
||||||
class FThinkerIterator
|
class FThinkerIterator
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
|
|
|
@ -131,7 +131,7 @@ CVAR (Int, cl_bloodtype, 0, CVAR_ARCHIVE);
|
||||||
|
|
||||||
// CODE --------------------------------------------------------------------
|
// CODE --------------------------------------------------------------------
|
||||||
|
|
||||||
IMPLEMENT_CLASS(AActor, false, true, true, false)
|
IMPLEMENT_CLASS(AActor, false, true, true, true)
|
||||||
|
|
||||||
IMPLEMENT_POINTERS_START(AActor)
|
IMPLEMENT_POINTERS_START(AActor)
|
||||||
IMPLEMENT_POINTER(target)
|
IMPLEMENT_POINTER(target)
|
||||||
|
|
|
@ -622,7 +622,7 @@ void player_t::SendPitchLimits() const
|
||||||
//
|
//
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
|
|
||||||
IMPLEMENT_CLASS(APlayerPawn, false, true, false, false)
|
IMPLEMENT_CLASS(APlayerPawn, false, true, false, true)
|
||||||
|
|
||||||
IMPLEMENT_POINTERS_START(APlayerPawn)
|
IMPLEMENT_POINTERS_START(APlayerPawn)
|
||||||
IMPLEMENT_POINTER(InvFirst)
|
IMPLEMENT_POINTER(InvFirst)
|
||||||
|
|
Loading…
Reference in a new issue