raze-gles/source/exhumed/src/aistuff.cpp
nukeykt 50349a6b3d wip
# Conflicts:
#	platform/Windows/exhumed.vcxproj
#	platform/Windows/exhumed.vcxproj.filters
#	source/build/include/build.h
#	source/build/src/palette.cpp
2019-11-21 22:59:33 +01:00

49 lines
797 B
C++

#include "aistuff.h"
extern int localclock;
int TimeSlot[KMaxTimeSlots];
void InitTimeSlot()
{
for (int i = 0; i < KMaxTimeSlots; i++) {
TimeSlot[i] = 0;
}
}
int GrabTimeSlot(int nVal)
{
return -1;
// BJD - below code found in an early Powerslave release. Doesn't seem to do anything and is missing in later releases.
#if 0
int ebx = -1;
int esi;
for (int i = 0; i < nVal; i++)
{
int nSlot = (localclock + i) & 0xF;
if (ebx >= 0)
{
if (esi <= TimeSlot[nSlot]) {
continue;
}
}
esi = TimeSlot[nSlot];
ebx = i;
}
esi = localclock;
int edx = ebx;
while (edx < 16)
{
TimeSlot[(edx + esi) & 0xF]++;
edx += nVal;
}
#endif
}