Initial import of Red Planet v4.10 Win32 source
Imports the current Win32 source for the pod-racing game 'Red Planet', built on the MUNGA engine and its L4 (Win32/DirectX) platform layer: - MUNGA / MUNGA_L4: cross-platform engine core and Win32 backend - RP / RP_L4: Red Planet game logic and Win32 application - DivLoader, Setup1: asset loader and installer project - lib, MUNGA_L4/openal, MUNGA_L4/sos: third-party audio dependencies Removed stale Subversion metadata and added .gitignore/.gitattributes. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,154 @@
|
||||
#include "munga.h"
|
||||
#pragma hdrstop
|
||||
|
||||
#include "iterator.h"
|
||||
|
||||
//
|
||||
//#############################################################################
|
||||
//#############################################################################
|
||||
//
|
||||
Iterator::Iterator()
|
||||
{
|
||||
}
|
||||
|
||||
//
|
||||
//#############################################################################
|
||||
//#############################################################################
|
||||
//
|
||||
Iterator::~Iterator()
|
||||
{
|
||||
}
|
||||
|
||||
//
|
||||
//#############################################################################
|
||||
//#############################################################################
|
||||
//
|
||||
Logical
|
||||
Iterator::TestInstance() const
|
||||
{
|
||||
return True;
|
||||
}
|
||||
|
||||
//
|
||||
//###########################################################################
|
||||
// First
|
||||
//###########################################################################
|
||||
//
|
||||
void
|
||||
Iterator::First()
|
||||
{
|
||||
Fail("Iterator::First - Should never reach here");
|
||||
}
|
||||
|
||||
//
|
||||
//###########################################################################
|
||||
// Last
|
||||
//###########################################################################
|
||||
//
|
||||
void
|
||||
Iterator::Last()
|
||||
{
|
||||
Fail("Iterator::Last - Should never reach here");
|
||||
}
|
||||
|
||||
//
|
||||
//###########################################################################
|
||||
// Next
|
||||
//###########################################################################
|
||||
//
|
||||
void
|
||||
Iterator::Next()
|
||||
{
|
||||
Fail("Iterator::Next - Should never reach here");
|
||||
}
|
||||
|
||||
//
|
||||
//###########################################################################
|
||||
// Previous
|
||||
//###########################################################################
|
||||
//
|
||||
void
|
||||
Iterator::Previous()
|
||||
{
|
||||
Fail("Iterator::Previous - Should never reach here");
|
||||
}
|
||||
|
||||
//
|
||||
//###########################################################################
|
||||
// GetSize
|
||||
//###########################################################################
|
||||
//
|
||||
CollectionSize
|
||||
Iterator::GetSize()
|
||||
{
|
||||
Fail("Iterator::GetSize - Should never reach here");
|
||||
return 0;
|
||||
}
|
||||
|
||||
//
|
||||
//###########################################################################
|
||||
// ReadAndNextImplementation
|
||||
//###########################################################################
|
||||
//
|
||||
void
|
||||
*Iterator::ReadAndNextImplementation()
|
||||
{
|
||||
void *item;
|
||||
|
||||
if ((item = GetCurrentImplementation()) != NULL)
|
||||
{
|
||||
Next();
|
||||
}
|
||||
return item;
|
||||
}
|
||||
|
||||
//
|
||||
//###########################################################################
|
||||
// ReadAndPreviousImplementation
|
||||
//###########################################################################
|
||||
//
|
||||
void
|
||||
*Iterator::ReadAndPreviousImplementation()
|
||||
{
|
||||
void *item;
|
||||
|
||||
if ((item = GetCurrentImplementation()) != NULL)
|
||||
{
|
||||
Previous();
|
||||
}
|
||||
return item;
|
||||
}
|
||||
|
||||
//
|
||||
//###########################################################################
|
||||
// GetCurrentImplementation
|
||||
//###########################################################################
|
||||
//
|
||||
void*
|
||||
Iterator::GetCurrentImplementation()
|
||||
{
|
||||
Fail("Iterator::GetCurrentImplementation - Should never reach here");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
//
|
||||
//###########################################################################
|
||||
// GetNthImplementation
|
||||
//###########################################################################
|
||||
//
|
||||
void
|
||||
*Iterator::GetNthImplementation(CollectionSize index)
|
||||
{
|
||||
CollectionSize i = 0;
|
||||
void *item;
|
||||
|
||||
First();
|
||||
while ((item = GetCurrentImplementation()) != NULL)
|
||||
{
|
||||
if (i == index)
|
||||
return item;
|
||||
Next();
|
||||
i++;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
Reference in New Issue
Block a user