mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 19:20:46 +00:00
50349a6b3d
# Conflicts: # platform/Windows/exhumed.vcxproj # platform/Windows/exhumed.vcxproj.filters # source/build/include/build.h # source/build/src/palette.cpp
49 lines
797 B
C++
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
|
|
}
|