Fixed console and made commands typed there work
This commit is contained in:
		| @@ -8,6 +8,7 @@ class ControlSchemeClass | ||||
| public: | ||||
| 	void LoadDefaultControlScheme(); | ||||
| 	void ClearControlScheme(); | ||||
| 	void Unbind(uint8); | ||||
|  | ||||
| 	list<uint8> forward; | ||||
| 	list<uint8> backward; | ||||
|   | ||||
| @@ -50,6 +50,7 @@ public: | ||||
| 	void LoadGLTextures(); | ||||
| 	void Render(); | ||||
| 	void UnloadMap(); | ||||
| 	void UpdateConsole(char); | ||||
| 	uint32 FPS(); | ||||
| 	void ParseCmds(LPSTR); | ||||
|  | ||||
|   | ||||
| @@ -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; | ||||
| 	} | ||||
| } | ||||
|  | ||||
|   | ||||
| @@ -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"}; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user