Account for Object API changes
parent
d2d94fe3bc
commit
b0734bda05
|
@ -10,22 +10,6 @@
|
||||||
|
|
||||||
// Extern Functions ----------------------------------------------------------|
|
// Extern Functions ----------------------------------------------------------|
|
||||||
|
|
||||||
//
|
|
||||||
// G_Object_AnimGet
|
|
||||||
//
|
|
||||||
G_anima const *G_Object_AnimGet(unsigned id, unsigned ofs)
|
|
||||||
{
|
|
||||||
return (G_anima const *)DGE_Object_MemberGet(unsigned, id, ofs);
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
// G_Object_AnimSet
|
|
||||||
//
|
|
||||||
void G_Object_AnimSet(unsigned id, unsigned ofs, G_anima const *an)
|
|
||||||
{
|
|
||||||
DGE_Object_MemberSet(unsigned, id, ofs, (unsigned)an);
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// G_RenderThinker_Animate
|
// G_RenderThinker_Animate
|
||||||
//
|
//
|
||||||
|
@ -90,8 +74,10 @@ void G_Entity_Create(G_mfdat *info)
|
||||||
ent.y = info->ent.y;
|
ent.y = info->ent.y;
|
||||||
ent.z = info->ent.z;
|
ent.z = info->ent.z;
|
||||||
|
|
||||||
ent.gravity = 1;
|
ent.gx = 1;
|
||||||
ent.mass = 1;
|
ent.gy = 1;
|
||||||
|
ent.gz = 1;
|
||||||
|
ent.mass = 1;
|
||||||
ent.friction = 0.875ulr;
|
ent.friction = 0.875ulr;
|
||||||
|
|
||||||
if(type) {
|
if(type) {
|
||||||
|
|
|
@ -8,36 +8,34 @@
|
||||||
#include <Doominati.h>
|
#include <Doominati.h>
|
||||||
|
|
||||||
#define G_propMemOfs(ofs, t, name) \
|
#define G_propMemOfs(ofs, t, name) \
|
||||||
__prop name {__get: DGE_Object_MemberGet(t, ->id, ofs), \
|
__prop name {__get: DGE_Object_MemberGetT(t, ->id, ofs), \
|
||||||
__set: DGE_Object_MemberSet(t, ->id, ofs)}
|
__set: DGE_Object_MemberSetT(t, ->id, ofs, __arg)}
|
||||||
|
|
||||||
#define G_propMemFcn(ofs, fn, name) \
|
#define G_propMemGEM(cl, t, name) \
|
||||||
__prop name {__get: fn##Get(->id, ofs), \
|
G_propMemOfs(DGE_OME(cl##.##name), t, name)
|
||||||
__set: fn##Set(->id, ofs)}
|
|
||||||
|
|
||||||
#define G_propMemExt(base, ofs, t, name) \
|
#define G_propMemIEM(cl, ofs, t, name) \
|
||||||
G_propMemOfs(DGE_OME_##base + (ofs), t, name)
|
G_propMemOfs(DGE_OME_##cl + (ofs), t, name)
|
||||||
|
|
||||||
|
#define G_Entity_propMem(ofs, t, name) \
|
||||||
|
G_propMemIEM(Entity, ofs, t, name)
|
||||||
|
|
||||||
#define G_Entity_propMem(ofs, t, name) G_propMemExt(Entity, ofs, t, name)
|
|
||||||
#define G_RenderThinker_propMem(ofs, t, name) \
|
#define G_RenderThinker_propMem(ofs, t, name) \
|
||||||
G_propMemExt(RenderThinker, ofs, t, name)
|
G_propMemIEM(RenderThinker, ofs, t, name)
|
||||||
|
|
||||||
#define G_RenderThinker_propExt() \
|
#define G_RenderThinker_propExt() \
|
||||||
G_propMemOfs(DGE_OME(RenderThinker.frame), unsigned, frame) \
|
G_propMemGEM(RenderThinker, unsigned, frame) \
|
||||||
G_propMemOfs(DGE_OME(RenderThinker.ftime), unsigned, ftime) \
|
G_propMemGEM(RenderThinker, unsigned, ftime) \
|
||||||
G_propMemFcn(DGE_OME(RenderThinker.curanim), G_Object_Anim, curanim) \
|
G_propMemGEM(RenderThinker, G_anima const *, curanim) \
|
||||||
__prop animate {__call: G_RenderThinker_Animate(->id)} \
|
__prop animate {__call: G_RenderThinker_Animate(->id)} \
|
||||||
__prop setAnim {__call: G_RenderThinker_AnimSet(->id)} \
|
__prop setAnim {__call: G_RenderThinker_AnimSet(->id)} \
|
||||||
__prop fsetAnim {__call: G_RenderThinker_AnimSetForced(->id)}
|
__prop fsetAnim {__call: G_RenderThinker_AnimSetForced(->id)}
|
||||||
|
|
||||||
#define G_Entity_propExt() \
|
#define G_Entity_propExt() \
|
||||||
G_propMemOfs(DGE_OME(Entity.subtype), int, subtype)
|
G_propMemGEM(Entity, int, subtype)
|
||||||
|
|
||||||
// Extern Functions ----------------------------------------------------------|
|
// Extern Functions ----------------------------------------------------------|
|
||||||
|
|
||||||
G_anima const *G_Object_AnimGet(unsigned id, unsigned ofs);
|
|
||||||
void G_Object_AnimSet(unsigned id, unsigned ofs, G_anima const *an);
|
|
||||||
|
|
||||||
void G_RenderThinker_Animate(unsigned id);
|
void G_RenderThinker_Animate(unsigned id);
|
||||||
void G_RenderThinker_AnimSet(unsigned id, G_anima const *anim);
|
void G_RenderThinker_AnimSet(unsigned id, G_anima const *anim);
|
||||||
void G_RenderThinker_AnimSetForced(unsigned id, G_anima const *anim);
|
void G_RenderThinker_AnimSetForced(unsigned id, G_anima const *anim);
|
||||||
|
|
Loading…
Reference in New Issue