Readded Binary files

This commit is contained in:
2003-10-26 00:18:37 -04:00
parent 2157244344
commit 6f0db4a3ad
4 changed files with 318 additions and 324 deletions

View File

@@ -1,12 +1,223 @@
1
36
1
-10.0 -1.0 -10.0 0.0 0.0
-10.0 -1.0 10.0 2 0.0
-10.0 10.0 10.0 2 1.1
1.0 0.0 0.0
1
-10.0 -1.0 -10.0 0.0 0.0
-10.0 10.0 -10.0 0.0 1.1
-10.0 10.0 10.0 2 1.1
1.0 0.0 0.0
1
10.0 -1.0 -10.0 0.0 0.0
10.0 -1.0 10.0 2 0.0
10.0 10.0 10.0 2 1.1
-1.0 0.0 0.0
1
10.0 -1.0 -10.0 0.0 0.0
10.0 10.0 -10.0 0.0 1.1
10.0 10.0 10.0 2 1.1
-1.0 0.0 0.0
1
-10.0 -1.0 -10.0 0.0 0.0
-10.0 10.0 -10.0 0.0 1.1
-5.0 10.0 -10.0 .5 1.1
0.0 0.0 1.0
1
-10.0 -1.0 -10.0 0.0 0.0
-5.0 -1.0 -10.0 .5 0.0
-5.0 10.0 -10.0 .5 1.1
0.0 0.0 1.0
1
5.0 -1.0 -10.0 1.5 0.0
5.0 10.0 -10.0 1.5 1.1
10.0 10.0 -10.0 2 1.1
0.0 0.0 1.0
1
5.0 -1.0 -10.0 1.5 0.0
10.0 -1.0 -10.0 2 0.0
10.0 10.0 -10.0 2 1.1
0.0 0.0 1.0
1
-10.0 -1.0 10.0 0.0 0.0
-10.0 10.0 10.0 0.0 1.1
10.0 10.0 10.0 2 1.1
0.0 0.0 -1.0
1
-10.0 -1.0 10.0 0.0 0.0
10.0 -1.0 10.0 2 0.0
10.0 10.0 10.0 2 1.1
0.0 0.0 -1.0
2
-10.0 10.0 -10.0 0.0 32.0
10.0 10.0 -10.0 32.0 32.0
-10.0 10.0 10.0 0.0 0.0
0.0 -1.0 0.0
2
-10.0 10.0 10.0 0.0 0.0
10.0 10.0 10.0 32.0 0.0
10.0 10.0 -10.0 32.0 32.0
0.0 -1.0 0.0
0
-10 -10 -5 0 0
-10 10 -5 0 1
10 -10 -5 1 0
-10.0 -1.0 -10.0 0.0 4.0
10.0 -1.0 -10.0 4.0 4.0
-10.0 -1.0 10.0 0.0 0.0
0.0 1.0 0.0
0
-10.0 -1.0 10.0 0.0 0.0
10.0 -1.0 10.0 4.0 0.0
10.0 -1.0 -10.0 4.0 4.0
0.0 1.0 0.0
0
-5 -1 -10 1 0
-5 -1 -20 1 2
5 -1 -10 3 0
0 1 0
0
5 -1 -10 3 0
-5 -1 -20 1 2
5 -1 -20 3 2
0 1 0
1
-5 -1 -10 0 0
-5 10 -10 0 1.1
-5 -1 -20 1 0
1 0 0
1
-5 10 -10 0 1.1
-5 10 -20 1 1.1
-5 -1 -20 1 0
1 0 0
1
5 -1 -10 0 0
5 10 -10 0 1.1
5 -1 -20 1 0
-1 0 0
1
5 10 -10 0 1.1
5 10 -20 1 1.1
5 -1 -20 1 0
-1 0 0
2
-5 10 -10 8 0
-5 10 -20 8 16
5 10 -10 24 0
0 -1 0
2
5 10 -10 24 0
-5 10 -20 8 16
5 10 -20 24 16
0 -1 0
0
-10 -1 -20 0 2
10 -1 -20 4 2
-10 -1 -40 0 6
0 1 0
0
-10 -1 -40 0 6
10 -1 -40 4 6
10 -1 -20 4 2
0 1 0
1
-10 -1 -20 0 0
-10 -1 -40 2 0
-10 10 -20 0 1.1
1 0 0
1
-10 10 -20 0 1.1
-10 10 -40 2 1.1
-10 -1 -40 2 0
1 0 0
1
10 -1 -20 0 0
10 -1 -40 2 0
10 10 -20 0 1.1
-1 0 0
1
10 10 -20 0 1.1
10 10 -40 2 1.1
10 -1 -40 2 0
-1 0 0
1
-10 -1 -40 0 0
-10 10 -40 0 1.1
10 -1 -40 2 0
0 0 1
1
-10 10 -40 0 1.1
10 10 -40 2 1.1
10 -1 -40 2 0
0 0 1
2
-10 10 -20 0 0
10 10 -20 32 0
-10 10 -40 0 32
0 -1 0
2
-10 10 -40 0 32
10 10 -40 32 32
10 10 -20 32 0
0 -1 0
1
-10 -1 -20 0 0
-5 -1 -20 .5 0
-10 10 -20 0 1.1
0 0 -1
1
-10 10 -20 0 1.1
-5 -1 -20 .5 0
-5 10 -20 .5 1.1
0 0 -1
1
5 -1 -20 1.5 0
10 -1 -20 2 0
5 10 -20 1.5 1.1
0 0 -1
1
5 10 -20 1.5 1.1
10 -1 -20 2 0
10 10 -20 2 1.1
0 0 -1
3
groundc.tga
moonc.tga

View File

@@ -1,246 +0,0 @@
/*
template <class ItemType>
listNode<ItemType>::listNode()
{
next = NULL;
}
template <class ItemType>
list<ItemType>::list()
{
head = NULL;
tail = NULL;
currPos = NULL;
}
template <class ItemType>
list<ItemType>::~list()
{
currPos = NULL;
while(head != NULL)
{
tail = head;
head = head->next;
delete tail;
tail = NULL;
}
}
template <class ItemType>
list<ItemType>::list(const list<ItemType>& rtOp)
{
head = NULL;
tail = NULL
currPos = NULL;
operator=(rtOp);
}
template <class ItemType>
void list<ItemType>::Clear()
{
while(head)
Remove(head->data);
}
template <class ItemType>
void list<ItemType>::operator=(const list<ItemType>& rtOp)
{
Clear();
listNode<ItemType> temp = rtOp.head->next;
listNode<ItemType> temp2 = NULL;
if(temp != NULL)
{
head = new listNode<ItemType>;
head->data = rtOp.head->data;
tail = head;
temp2 = head;
}
while (temp != NULL)
{
temp2->next = new listNode<ItemType>;
temp2 = temp2->next;
temp2->data = temp->data;
temp = temp->next;
}
tail = temp2;
}
template <class ItemType>
bool list<ItemType>::IsEmpty()
{
return head == NULL;
}
template <class ItemType>
bool list<ItemType>::IsFull()
{
return false;
}
template <class ItemType>
void list<ItemType>::Insert(ItemType newItem)
{
listNode<ItemType>* temp = head;
if(head != NULL)
{
while(temp->next!= NULL && temp->data < newItem)
{
temp = temp->next;
}
if(temp == head)
{
tail->next = head;
head = new listNode<ItemType>;
head->next = tail->next;
tail->next = NULL;
temp = head;
}
else if(temp->data != newItem)
{
if(temp == tail)
{
tail->next = new listNode<ItemType>;
tail = tail->next;
temp = tail;
}
else
{
tail->next = temp->next;
temp = temp->next = new listNode<ItemType>;
temp->next = tail->next;
tail->next = NULL;
}
}
}
else
{
temp = tail = head = new listNode<ItemType>;
tail->next = NULL;
}
temp->data = newItem;
}
template <class ItemType>
void list<ItemType>::Remove(ItemType target)
{
if(head != NULL)
{
listNode<ItemType>* temp = head;
tail->next = head;
while(temp->next != NULL && temp->data != target)
{
tail->next = temp;
temp = temp->next;
}
if(temp->data == target)
{
if(tail->next != head)
{
tail->next->next = temp->next;
delete temp;
}
else
{
head = head->next;
delete tail->next;
}
}
tail->next = NULL;
}
}
template <class ItemType>
bool list<ItemType>::PrevPosition()
{
if(currPos != head)
{
tail->next = currPos;
currPos = head;
if(currPos != tail->next)
{
while(currPos->next != tail->next)
{
currPos = currPos->next;
}
}
tail->next = NULL;
return true;
}
else
{
return false;
}
}
template <class ItemType>
bool list<ItemType>::NextPosition()
{
if(currPos != tail)
{
currPos = currPos->next;
return true;
}
else
{
return false;
}
}
template <class ItemType>
void list<ItemType>::Remove()
{
if(currPos != NULL)
{
tail->next = currPos;
currPos = currPos->next;
delete tail->next;
tail->next = NULL;
}
}
template <class ItemType>
ItemType list<ItemType>::Retrieve()
{
if(currPos != NULL)
return currPos->data;
}
template <class ItemType>
bool list<ItemType>::IsFirstPosition()
{
return currPos == head;
}
template <class ItemType>
bool list<ItemType>::IsLastPosition()
{
return currPos == tail;
}
template <class ItemType>
void list<ItemType>::FirstPosition()
{
currPos = head;
}
template <class ItemType>
void list<ItemType>::LastPosition()
{
currPos = tail;
}
*/

View File

@@ -5,13 +5,15 @@
#pragma warning(disable:4715)
typedef unsigned int LIST_ARRAY_INDEX_TYPE;
template <class ItemType>
class listNode
{
public:
listNode();
listNode<ItemType>* next;
ItemType data;
listNode<ItemType>* next;
};
template <class ItemType>
@@ -22,21 +24,22 @@ public:
~list();
list(const list&);
bool IsEmpty();
bool IsFull();
bool IsEmpty() const;
bool IsFull() const;
void Insert(ItemType newItem);
void Remove(ItemType target);
void Remove();
ItemType Retrieve();
ItemType Retrieve() const;
bool PrevPosition();
bool NextPosition();
bool IsFirstPosition();
bool IsLastPosition();
bool IsFirstPosition() const;
bool IsLastPosition() const;
void FirstPosition();
void LastPosition();
void Clear();
void operator=(const list<ItemType>&);
ItemType operator[](unsigned int);
ItemType operator[](LIST_ARRAY_INDEX_TYPE) const;
ItemType& operator[](LIST_ARRAY_INDEX_TYPE);
private:
listNode<ItemType>* head;
@@ -75,7 +78,7 @@ template <class ItemType>
list<ItemType>::list(const list<ItemType>& rtOp)
{
head = NULL;
tail = NULL
tail = NULL;
currPos = NULL;
operator=(rtOp);
@@ -93,36 +96,39 @@ void list<ItemType>::operator=(const list<ItemType>& rtOp)
{
Clear();
listNode<ItemType> temp = rtOp.head->next;
listNode<ItemType> temp2 = NULL;
if(temp != NULL)
if(!rtOp.IsEmpty())
{
head = new listNode<ItemType>;
head->data = rtOp.head->data;
tail = head;
temp2 = head;
}
listNode<ItemType>* temp = rtOp.head->next;
listNode<ItemType>* temp2 = NULL;
while (temp != NULL)
{
temp2->next = new listNode<ItemType>;
temp2 = temp2->next;
temp2->data = temp->data;
temp = temp->next;
}
if(temp != NULL)
{
head = new listNode<ItemType>;
head->data = rtOp.head->data;
tail = head;
temp2 = head;
}
tail = temp2;
while (temp != NULL)
{
temp2->next = new listNode<ItemType>;
temp2 = temp2->next;
temp2->data = temp->data;
temp = temp->next;
}
tail = temp2;
}
}
template <class ItemType>
bool list<ItemType>::IsEmpty()
bool list<ItemType>::IsEmpty() const
{
return head == NULL;
}
template <class ItemType>
bool list<ItemType>::IsFull()
bool list<ItemType>::IsFull() const
{
return false;
}
@@ -131,46 +137,41 @@ template <class ItemType>
void list<ItemType>::Insert(ItemType newItem)
{
listNode<ItemType>* temp = head;
if(head != NULL)
listNode<ItemType>* temp2 = NULL;
if(head == NULL)
{
while(temp->next!= NULL && temp->data < newItem)
{
temp = temp->next;
}
if(temp == head)
{
tail->next = head;
head = new listNode<ItemType>;
head->next = tail->next;
tail->next = NULL;
temp = head;
}
else if(temp->data != newItem)
{
if(temp == tail)
{
tail->next = new listNode<ItemType>;
tail = tail->next;
temp = tail;
}
else
{
tail->next = temp->next;
temp = temp->next = new listNode<ItemType>;
temp->next = tail->next;
tail->next = NULL;
}
}
temp = tail = head = new listNode<ItemType>;
}
else
{
temp = tail = head = new listNode<ItemType>;
tail->next = NULL;
if(newItem < head->data)
{
temp2 = head;
temp = head = new listNode<ItemType>;
head->next = temp2;
temp2 = NULL;
}
else
{
//temp = head;
while(temp->next != NULL && newItem > temp->next->data)
{
temp = temp->next;
}
temp2 = temp->next;
temp = temp->next = new listNode<ItemType>;
temp->next = temp2;
temp2 = NULL;
}
}
temp->data = newItem;
if(temp->next == NULL)
{
tail = temp;
}
}
template <class ItemType>
@@ -259,20 +260,20 @@ void list<ItemType>::Remove()
}
template <class ItemType>
ItemType list<ItemType>::Retrieve()
ItemType list<ItemType>::Retrieve() const
{
if(currPos != NULL)
return currPos->data;
}
template <class ItemType>
bool list<ItemType>::IsFirstPosition()
bool list<ItemType>::IsFirstPosition() const
{
return currPos == head;
}
template <class ItemType>
bool list<ItemType>::IsLastPosition()
bool list<ItemType>::IsLastPosition() const
{
return currPos == tail;
}
@@ -290,24 +291,52 @@ void list<ItemType>::LastPosition()
}
template <class ItemType>
ItemType list<ItemType>::operator[](unsigned int index)
ItemType list<ItemType>::operator[](LIST_ARRAY_INDEX_TYPE index) const
{
if(head != NULL)
if(head == NULL)
{
listNode<ItemType>* temp = head;
while(index > 0 && temp != NULL)
{
temp = temp->next;
--index;
//We should throw an exception here but instead I'll just return shit guess for now if somebody does this they're just fucked.
}
if(temp != NULL)
else
{
listNode<ItemType>* temp = head;
LIST_ARRAY_INDEX_TYPE current;
for(current=0;current <index; current++)
{
if(temp->next == NULL)
{
temp->next = new listNode<ItemType>;
}
temp = temp->next;
}
return temp->data;
}
}
}
template <class ItemType>
ItemType& list<ItemType>::operator[](LIST_ARRAY_INDEX_TYPE index)
{
if(head == NULL)
{
tail = currPos = head = new listNode<ItemType>;
return (ItemType&)(head->data);
}
else
{
listNode<ItemType>* temp = head;
LIST_ARRAY_INDEX_TYPE current;
#include "list.cpp"
for(current=0;current <index; current++)
{
if(temp->next == NULL)
{
temp->next = new listNode<ItemType>;
}
temp = temp->next;
}
return (ItemType&)(temp->data);
}
}
#endif