02061d74c2
(as received from Jonas Echterhoff)
24 lines
510 B
C++
Executable File
24 lines
510 B
C++
Executable File
#include "gamemem.h"
|
|
#include "entities.h"
|
|
|
|
tGameEntity *gFirstEntity=NULL,*gCameraEntity,*gViewedEntity;
|
|
int gEntityID=0;
|
|
|
|
void EntityResetCount()
|
|
{
|
|
gEntityID=0;
|
|
}
|
|
|
|
tGameEntity *EntityNew(tGameEntity *prev)
|
|
{
|
|
tGameEntity *entity=(tGameEntity*)MemoryAllocateZeroedBlock(sizeof(tGameEntity));
|
|
entity->next=prev->next;
|
|
entity->prev=prev;
|
|
((tGameEntity*)(prev->next))->prev=entity;
|
|
prev->next=entity;
|
|
MatrixIdentity(entity->dir);
|
|
MatrixIdentity(entity->rVelo);
|
|
entity->id=gEntityID++;
|
|
return entity;
|
|
}
|