Fixed console and made commands typed there work

This commit is contained in:
2003-10-20 13:31:30 -04:00
parent 4c6f5dfb15
commit 1685e64676
13 changed files with 411 additions and 296 deletions

View File

@@ -8,6 +8,7 @@ class ControlSchemeClass
public:
void LoadDefaultControlScheme();
void ClearControlScheme();
void Unbind(uint8);
list<uint8> forward;
list<uint8> backward;

View File

@@ -50,6 +50,7 @@ public:
void LoadGLTextures();
void Render();
void UnloadMap();
void UpdateConsole(char);
uint32 FPS();
void ParseCmds(LPSTR);

View File

@@ -179,28 +179,29 @@ void list<ItemType>::Remove(ItemType target)
if(head != NULL)
{
listNode<ItemType>* temp = head;
tail->next = head;
listNode<ItemType>* temp2 = head;
while(temp->next != NULL && temp->data != target)
{
tail->next = temp;
temp2 = temp;
temp = temp->next;
}
if(temp->data == target)
{
if(tail->next != head)
if(temp != head)
{
tail->next->next = temp->next;
temp2->next = temp->next;
delete temp;
}
else
{
if(tail == head)
tail = NULL;
head = head->next;
delete tail->next;
delete temp2;
}
}
tail->next = NULL;
}
}

View File

@@ -22,7 +22,8 @@ static bool keys[256]; // Array for which keys are down now
static bool keys2[256]; // Array for which keys are were down already
static bool active=true; // Is window active flag
static bool fullscreen=true; // Is window fullscreen flag
static bool showConsole = false;// Do we need to draw the console
//static bool showConsole = false;// Do we need to draw the console
//static SCREEN g_Screen = {800,600,16,1,"OpenArena"};