Bläddra i källkod

reading some text files from lods, enabling object sorting

mateuszb 18 år sedan
förälder
incheckning
cc67967051
13 ändrade filer med 133 tillägg och 125 borttagningar
  1. 9 9
      CAbilityHandler.cpp
  2. 1 1
      CAbilityHandler.h
  3. 9 9
      CAmbarCendamo.cpp
  4. 10 37
      CBuildingHandler.cpp
  5. 5 17
      CCreatureHandler.cpp
  6. 3 9
      CGeneralTextHandler.cpp
  7. 14 9
      CHeroHandler.cpp
  8. 38 0
      CLodHandler.cpp
  9. 1 0
      CLodHandler.h
  10. 23 18
      CPreGameTextHandler.cpp
  11. 5 9
      CSpellHandler.cpp
  12. 15 6
      mapHandler.cpp
  13. 0 1
      stdafx.h

+ 9 - 9
CAbilityHandler.cpp

@@ -12,7 +12,7 @@ void CAbilityHandler::loadAbilities()
 	inp.ignore();
 	while(!inp.eof())
 	{
-		CAbility nab; //new creature, that will be read
+		CAbility * nab = new CAbility; //new creature, that will be read
 		std::string base;
 		char * tab = new char[500];
 		int iitBef = 0;
@@ -28,11 +28,11 @@ void CAbilityHandler::loadAbilities()
 		{
 			++iit;
 		}
-		nab.name = base.substr(0, iit);
+		nab->name = base.substr(0, iit);
 		++iit;
 		iitBef=iit;
 
-		nab.basicText = base.substr(iitBef, base.size()-iitBef);
+		nab->basicText = base.substr(iitBef, base.size()-iitBef);
 
 		inp.getline(tab, 500);
 		inp.getline(tab, 500);
@@ -45,11 +45,11 @@ void CAbilityHandler::loadAbilities()
 		{
 			++iit;
 		}
-		nab.basicText2 = base.substr(0, iit);
+		nab->basicText2 = base.substr(0, iit);
 		++iit;
 		iitBef=iit;
 
-		nab.advText = base.substr(iitBef, base.size()-iitBef);
+		nab->advText = base.substr(iitBef, base.size()-iitBef);
 
 		inp.getline(tab, 500);
 		inp.getline(tab, 500);
@@ -62,19 +62,19 @@ void CAbilityHandler::loadAbilities()
 		{
 			++iit;
 		}
-		nab.advText2 = base.substr(0, iit);
+		nab->advText2 = base.substr(0, iit);
 		++iit;
 		iitBef=iit;
 
-		nab.expText = base.substr(iitBef, base.size()-iitBef);
+		nab->expText = base.substr(iitBef, base.size()-iitBef);
 
 		inp.getline(tab, 500);
 		inp.getline(tab, 500);
 		base = std::string(tab);
 
-		nab.expText2 = base;
+		nab->expText2 = base;
 
-		nab.idNumber = abilities.size();
+		nab->idNumber = abilities.size();
 		abilities.push_back(nab);
 		delete [500] tab;
 	}

+ 1 - 1
CAbilityHandler.h

@@ -18,7 +18,7 @@ public:
 class CAbilityHandler
 {
 public:
-	std::vector<CAbility> abilities;
+	std::vector<CAbility *> abilities;
 	void loadAbilities();
 };
 

+ 9 - 9
CAmbarCendamo.cpp

@@ -345,9 +345,9 @@ void CAmbarCendamo::deh3m()
 			if((i-ist)*8+yy < CGameInfo::mainObj->abilh->abilities.size())
 			{
 				if(c != (c|((unsigned char)intPow(2, yy))))
-					CGameInfo::mainObj->abilh->abilities[(i-ist)*8+yy].isAllowed = true;
+					CGameInfo::mainObj->abilh->abilities[(i-ist)*8+yy]->isAllowed = true;
 				else
-					CGameInfo::mainObj->abilh->abilities[(i-ist)*8+yy].isAllowed = false;
+					CGameInfo::mainObj->abilh->abilities[(i-ist)*8+yy]->isAllowed = false;
 			}
 		}
 	}
@@ -462,7 +462,7 @@ void CAmbarCendamo::deh3m()
 	int howManyObjs = readNormalNr(i, 4); i+=4;
 	for(int ww=0; ww<howManyObjs; ++ww) //comment this line to turn loading objects off
 	{
-		std::cout << "object nr "<<ww<<"\ti= "<<i<<std::endl;
+		//std::cout << "object nr "<<ww<<"\ti= "<<i<<std::endl;
 		CObjectInstance nobj; //we will read this object
 		nobj.id = CGameInfo::mainObj->objh->objInstances.size();
 		nobj.x = bufor[i++];
@@ -533,7 +533,7 @@ void CAmbarCendamo::deh3m()
 				gabn = readNormalNr(i, 1); ++i;
 				for(int oo = 0; oo<gabn; ++oo)
 				{
-					spec->abilities.push_back(&((CGameInfo::mainObj->abilh)->abilities[readNormalNr(i, 1)])); ++i;
+					spec->abilities.push_back((CGameInfo::mainObj->abilh)->abilities[readNormalNr(i, 1)]); ++i;
 					spec->abilityLevels.push_back(readNormalNr(i, 1)); ++i;
 				}
 				int gart = readNormalNr(i, 1); ++i; //number of gained artifacts
@@ -591,7 +591,7 @@ void CAmbarCendamo::deh3m()
 					int howMany = readNormalNr(i); i+=4;
 					for(int yy=0; yy<howMany; ++yy)
 					{
-						spec->abilities.push_back(&(CGameInfo::mainObj->abilh->abilities[readNormalNr(i, 1)])); ++i;
+						spec->abilities.push_back(CGameInfo::mainObj->abilh->abilities[readNormalNr(i, 1)]); ++i;
 						spec->abilityLevels.push_back(readNormalNr(i, 1)); ++i;
 					}
 				}
@@ -1069,7 +1069,7 @@ void CAmbarCendamo::deh3m()
 				case 7:
 					{
 						int abid = bufor[i]; ++i;
-						spec->r7ability = &(CGameInfo::mainObj->abilh->abilities[abid]);
+						spec->r7ability = CGameInfo::mainObj->abilh->abilities[abid];
 						spec->r7level = bufor[i]; ++i;
 						break;
 					}
@@ -1109,7 +1109,7 @@ void CAmbarCendamo::deh3m()
 						if((i-ist)*8+yy < CGameInfo::mainObj->abilh->abilities.size())
 						{
 							if(c == (c|((unsigned char)intPow(2, yy))))
-								spec->allowedAbilities.push_back(&(CGameInfo::mainObj->abilh->abilities[(i-ist)*8+yy]));
+								spec->allowedAbilities.push_back(CGameInfo::mainObj->abilh->abilities[(i-ist)*8+yy]);
 						}
 					}
 				}
@@ -1130,7 +1130,7 @@ void CAmbarCendamo::deh3m()
 					spec->r0type = bufor[i]; ++i;
 					break;
 				case 1:
-					spec->r1 = &(CGameInfo::mainObj->abilh->abilities[bufor[i]]); ++i;
+					spec->r1 = CGameInfo::mainObj->abilh->abilities[bufor[i]]; ++i;
 					break;
 				case 2:
 					spec->r2 = &(CGameInfo::mainObj->spellh->spells[bufor[i]]); ++i;
@@ -1398,7 +1398,7 @@ void CAmbarCendamo::deh3m()
 				gabn = readNormalNr(i, 1); ++i;
 				for(int oo = 0; oo<gabn; ++oo)
 				{
-					spec->abilities.push_back(&((CGameInfo::mainObj->abilh)->abilities[readNormalNr(i, 1)])); ++i;
+					spec->abilities.push_back((CGameInfo::mainObj->abilh)->abilities[readNormalNr(i, 1)]); ++i;
 					spec->abilityLevels.push_back(readNormalNr(i, 1)); ++i;
 				}
 				int gart = readNormalNr(i, 1); ++i; //number of gained artifacts

+ 10 - 37
CBuildingHandler.cpp

@@ -1,17 +1,11 @@
 #include "stdafx.h"
+#include "CGameInfo.h"
 #include "CBuildingHandler.h"
 
 void CBuildingHandler::loadBuildings()
 {
-	std::ifstream inp("H3bitmap.lod\\BUILDING.TXT", std::ios::in | std::ios::binary);
-	inp.seekg(0,std::ios::end); // na koniec
-	int andame = inp.tellg();  // read length
-	inp.seekg(0,std::ios::beg); // wracamy na poczatek
-	char * bufor = new char[andame]; // allocate memory 
-	inp.read((char*)bufor, andame); // read map file to buffer
-	inp.close();
-	std::string buf = std::string(bufor);
-	delete [andame] bufor;
+	std::string buf = CGameInfo::mainObj->bitmaph->getTextFile("BUILDING.TXT");
+	int andame = buf.size();
 	int i=0; //buf iterator
 	int hmcr=0;
 	for(i; i<andame; ++i) //omitting rubbish
@@ -24,7 +18,7 @@ void CBuildingHandler::loadBuildings()
 	i+=2;
 	EbuildingType currType; //current type of building
 	bool currDwel = false; //true, if we are reading dwellings
-	while(!inp.eof())
+	while(true)
 	{
 		CBuilding nbu; //currently read building
 		if(buildings.size()>200 && buf.substr(i, buf.size()-i).find('\r')==std::string::npos)
@@ -255,15 +249,8 @@ void CBuildingHandler::loadBuildings()
 
 void CBuildingHandler::loadNames()
 {
-	std::ifstream inp("H3bitmap.lod\\BLDGSPEC.TXT", std::ios::in | std::ios::binary);
-	inp.seekg(0,std::ios::end); // na koniec
-	int andame = inp.tellg();  // read length
-	inp.seekg(0,std::ios::beg); // wracamy na poczatek
-	char * bufor = new char[andame]; // allocate memory 
-	inp.read((char*)bufor, andame); // read map file to buffer
-	inp.close();
-	std::string buf = std::string(bufor);
-	delete [andame] bufor;
+	std::string buf = CGameInfo::mainObj->bitmaph->getTextFile("BLDGSPEC.TXT");
+	int andame = buf.size();
 	int i=0; //buf iterator
 	for(int ii=0; ii<9; ++ii)
 	{
@@ -519,15 +506,8 @@ void CBuildingHandler::loadNames()
 
 void CBuildingHandler::loadNeutNames()
 {
-	std::ifstream inp("H3bitmap.lod\\BLDGNEUT.TXT", std::ios::in | std::ios::binary);
-	inp.seekg(0,std::ios::end); // na koniec
-	int andame = inp.tellg();  // read length
-	inp.seekg(0,std::ios::beg); // wracamy na poczatek
-	char * bufor = new char[andame]; // allocate memory 
-	inp.read((char*)bufor, andame); // read map file to buffer
-	inp.close();
-	std::string buf = std::string(bufor);
-	delete [andame] bufor;
+	std::string buf = CGameInfo::mainObj->bitmaph->getTextFile("BLDGNEUT.TXT");
+	int andame = buf.size();
 	int i=0; //buf iterator
 	for(int q=0; q<15; ++q)
 	{
@@ -643,15 +623,8 @@ void CBuildingHandler::loadNeutNames()
 
 void CBuildingHandler::loadDwellingNames()
 {
-	std::ifstream inp("H3bitmap.lod\\DWELLING.TXT", std::ios::in | std::ios::binary);
-	inp.seekg(0,std::ios::end); // na koniec
-	int andame = inp.tellg();  // read length
-	inp.seekg(0,std::ios::beg); // wracamy na poczatek
-	char * bufor = new char[andame]; // allocate memory 
-	inp.read((char*)bufor, andame); // read map file to buffer
-	inp.close();
-	std::string buf = std::string(bufor);
-	delete [andame] bufor;
+	std::string buf = CGameInfo::mainObj->bitmaph->getTextFile("DWELLING.TXT");
+	int andame = buf.size();
 	int i = 0; //buf iterator
 	int whdw = 98; //wchich dwelling we are currently reading
 	for(whdw; whdw<224; ++whdw)

+ 5 - 17
CCreatureHandler.cpp

@@ -1,16 +1,11 @@
 #include "stdafx.h"
+#include "CGameInfo.h"
 #include "CCreatureHandler.h"
 
 void CCreatureHandler::loadCreatures()
 {
-	std::ifstream inp("H3bitmap.lod\\ZCRTRAIT.TXT", std::ios::in|std::ios::binary);
-	inp.seekg(0,std::ios::end); // na koniec
-	int andame = inp.tellg();  // read length
-	inp.seekg(0,std::ios::beg); // wracamy na poczatek
-	char * bufor = new char[andame]; // allocate memory 
-	inp.read((char*)bufor, andame); // read map file to buffer
-	std::string buf = std::string(bufor);
-	delete [andame] bufor;
+	std::string buf = CGameInfo::mainObj->bitmaph->getTextFile("ZCRTRAIT.TXT");
+	int andame = buf.size();
 	int i=0; //buf iterator
 	int hmcr=0;
 	for(i; i<andame; ++i)
@@ -277,15 +272,8 @@ void CCreatureHandler::loadCreatures()
 
 void CCreatureHandler::loadAnimationInfo()
 {
-	std::ifstream inp("H3bitmap.lod\\CRANIM.TXT", std::ios::in|std::ios::binary);
-	inp.seekg(0,std::ios::end); // na koniec
-	int andame = inp.tellg();  // read length
-	inp.seekg(0,std::ios::beg); // wracamy na poczatek
-	char * bufor = new char[andame]; // allocate memory 
-	inp.read((char*)bufor, andame); // read map file to buffer
-	inp.close();
-	std::string buf = std::string(bufor);
-	delete [andame] bufor;
+	std::string buf = CGameInfo::mainObj->bitmaph->getTextFile("CRANIM.TXT");
+	int andame = buf.size();
 	int i=0; //buf iterator
 	int hmcr=0;
 	for(i; i<andame; ++i)

+ 3 - 9
CGeneralTextHandler.cpp

@@ -1,18 +1,12 @@
 #include "stdafx.h"
 #include "CGeneralTextHandler.h"
+#include "CGameInfo.h"
 #include <fstream>
 
 void CGeneralTextHandler::load()
 {
-	std::ifstream inp("H3bitmap.lod\\GENRLTXT.TXT", std::ios::in|std::ios::binary);
-	inp.seekg(0,std::ios::end); // na koniec
-	int andame = inp.tellg();  // read length
-	inp.seekg(0,std::ios::beg); // wracamy na poczatek
-	char * bufor = new char[andame]; // allocate memory 
-	inp.read((char*)bufor, andame); // read map file to buffer
-	inp.close();
-	std::string buf = std::string(bufor);
-	delete [andame] bufor;
+	std::string buf = CGameInfo::mainObj->bitmaph->getTextFile("GENRLTXT.TXT");
+	int andame = buf.size();
 	int i=0; //buf iterator
 	for(i; i<andame; ++i)
 	{

+ 14 - 9
CHeroHandler.cpp

@@ -228,15 +228,20 @@ void CHeroHandler::loadBiographies()
 
 void CHeroHandler::loadHeroClasses()
 {
-	std::ifstream inp("H3bitmap.lod\\HCTRAITS.TXT", std::ios::in | std::ios::binary);
-	inp.seekg(0,std::ios::end); // na koniec
-	int andame = inp.tellg();  // read length
-	inp.seekg(0,std::ios::beg); // wracamy na poczatek
-	char * bufor = new char[andame]; // allocate memory 
-	inp.read((char*)bufor, andame); // read map file to buffer
-	inp.close();
-	std::string buf = std::string(bufor);
-	delete [andame] bufor;
+	//std::ifstream inp("H3bitmap.lod\\HCTRAITS.TXT", std::ios::in | std::ios::binary);
+	//inp.seekg(0,std::ios::end); // na koniec
+	//int andame = inp.tellg();  // read length
+	//inp.seekg(0,std::ios::beg); // wracamy na poczatek
+	//char * bufor = new char[andame]; // allocate memory 
+	//inp.read((char*)bufor, andame); // read map file to buffer
+	//inp.close();
+	//std::string buf = std::string(bufor);
+	//delete [andame] bufor;
+	std::string buf = CGameInfo::mainObj->bitmaph->getTextFile("HCTRAITS.TXT");
+	int andame = buf.size();
+	for(int y=0; y<andame; ++y)
+		if(buf[y]==',')
+			buf[y]='.';
 	int i = 0; //buf iterator
 	int hmcr = 0;
 	for(i; i<andame; ++i) //omitting rubbish

+ 38 - 0
CLodHandler.cpp

@@ -836,3 +836,41 @@ void CLodHandler::init(std::string lodFile)
 		entries[i].size=readNormalNr(temp,4);
 	}
 }
+
+std::string CLodHandler::getTextFile(std::string name)
+{
+	std::string ret0;
+	std::transform(name.begin(), name.end(), name.begin(), (int(*)(int))toupper);
+	int i;
+	for (int i=0;i<totalFiles;i++)
+	{
+		std::string buf1 = std::string((char*)entries[i].name);
+		bool exists = false;
+		int curDef;
+		if(buf1!=name)
+			continue;
+		FLOD.seekg(entries[i].offset,std::ios_base::beg);
+		unsigned char * outp;
+		if (entries[i].size==0) //file is not compressed
+		{
+			outp = new unsigned char[entries[i].realSize];
+			FLOD.read((char*)outp, entries[i].realSize);
+			std::string ret = std::string((char*)outp);
+			delete outp;
+			return ret;
+		}
+		else //we will decompressing file
+		{
+			outp = new unsigned char[entries[i].size];
+			FLOD.read((char*)outp, entries[i].size);
+			FLOD.seekg(0, std::ios_base::beg);
+			unsigned char * decomp = NULL;
+			int decRes = infs2(outp, entries[i].size, entries[i].realSize, decomp);
+			std::string ret = std::string((char*)decomp);
+			delete outp;
+			delete decomp;
+			return ret;
+		}
+	}
+	return ret0;
+}

+ 1 - 0
CLodHandler.h

@@ -63,6 +63,7 @@ public:
 	int infs2(unsigned char * in, int size, int realSize, unsigned char*& out, int wBits=15); //zlib fast handler
 	std::vector<CDefHandler *> extractManyFiles(std::vector<std::string> defNamesIn); //extrats given files (defs only)
 	CDefHandler * giveDef(std::string defName);
+	std::string getTextFile(std::string name); //extracts one file
 	void extract(std::string FName);
 	void extractFile(std::string FName, std::string name); //extracts a specific file
 	void init(std::string lodFile);

+ 23 - 18
CPreGameTextHandler.cpp

@@ -1,5 +1,6 @@
 #include "stdafx.h"
 #include "CPreGameTextHandler.h"
+#include "CGameInfo.h"
 std::string CPreGameTextHandler::getTitle(std::string text)
 {
 	std::string ret;
@@ -492,15 +493,17 @@ void CPreGameTextHandler::loadToIt(std::string &dest, std::string &src, int &ite
 
 void CPreGameTextHandler::loadVictoryConditions()
 {
-	std::ifstream inp("H3bitmap.lod\\VCDESC.TXT", std::ios::in|std::ios::binary);
-	inp.seekg(0,std::ios::end); // na koniec
-	int andame = inp.tellg();  // read length
-	inp.seekg(0,std::ios::beg); // wracamy na poczatek
-	char * bufor = new char[andame]; // allocate memory 
-	inp.read((char*)bufor, andame); // read map file to buffer
-	inp.close();
-	std::string buf = std::string(bufor);
-	delete [andame] bufor;
+	//std::ifstream inp("H3bitmap.lod\\VCDESC.TXT", std::ios::in|std::ios::binary);
+	//inp.seekg(0,std::ios::end); // na koniec
+	//int andame = inp.tellg();  // read length
+	//inp.seekg(0,std::ios::beg); // wracamy na poczatek
+	//char * bufor = new char[andame]; // allocate memory 
+	//inp.read((char*)bufor, andame); // read map file to buffer
+	//inp.close();
+	//std::string buf = std::string(bufor);
+	//delete [andame] bufor;
+	std::string buf = CGameInfo::mainObj->bitmaph->getTextFile("VCDESC.TXT");
+	int andame = buf.size();
 	int i=0; //buf iterator
 
 	for(int gg=0; gg<14; ++gg)
@@ -518,15 +521,17 @@ void CPreGameTextHandler::loadVictoryConditions()
 
 void CPreGameTextHandler::loadLossConditions()
 {
-	std::ifstream inp("H3bitmap.lod\\LCDESC.TXT", std::ios::in|std::ios::binary);
-	inp.seekg(0,std::ios::end); // na koniec
-	int andame = inp.tellg();  // read length
-	inp.seekg(0,std::ios::beg); // wracamy na poczatek
-	char * bufor = new char[andame]; // allocate memory 
-	inp.read((char*)bufor, andame); // read map file to buffer
-	inp.close();
-	std::string buf = std::string(bufor);
-	delete [andame] bufor;
+	//std::ifstream inp("H3bitmap.lod\\LCDESC.TXT", std::ios::in|std::ios::binary);
+	//inp.seekg(0,std::ios::end); // na koniec
+	//int andame = inp.tellg();  // read length
+	//inp.seekg(0,std::ios::beg); // wracamy na poczatek
+	//char * bufor = new char[andame]; // allocate memory 
+	//inp.read((char*)bufor, andame); // read map file to buffer
+	//inp.close();
+	//std::string buf = std::string(bufor);
+	//delete [andame] bufor;
+	std::string buf = CGameInfo::mainObj->bitmaph->getTextFile("LCDESC.TXT");
+	int andame = buf.size();
 	int i=0; //buf iterator
 
 	for(int gg=0; gg<4; ++gg)

+ 5 - 9
CSpellHandler.cpp

@@ -1,17 +1,11 @@
 #include "stdafx.h"
 #include "CSpellHandler.h"
+#include "CGameInfo.h"
 
 void CSpellHandler::loadSpells()
 {
-	std::ifstream inp("H3bitmap.lod\\SPTRAITS.TXT", std::ios::in | std::ios::binary);
-	inp.seekg(0,std::ios::end); // na koniec
-	int andame = inp.tellg();  // read length
-	inp.seekg(0,std::ios::beg); // wracamy na poczatek
-	char * bufor = new char[andame]; // allocate memory 
-	inp.read((char*)bufor, andame); // read map file to buffer
-	inp.close();
-	std::string buf = std::string(bufor);
-	delete [andame] bufor;
+	std::string buf = CGameInfo::mainObj->bitmaph->getTextFile("SPTRAITS.TXT");
+	int andame = buf.size();
 	int i=0; //buf iterator
 	int hmcr=0;
 	for(i; i<andame; ++i)
@@ -25,6 +19,8 @@ void CSpellHandler::loadSpells()
 	bool combSpells=false; //true, if we are reading combat spells
 	while(i<andame)
 	{
+		if(spells.size()==81)
+			break;
 		CSpell nsp; //new currently being read spell
 		int befi=i;
 		for(i; i<andame; ++i)

+ 15 - 6
mapHandler.cpp

@@ -353,12 +353,21 @@ SDL_Surface * CMapHandler::terrainRect(int x, int y, int dx, int dy, int level,
 			}
 		}
 	}
-	//std::stable_sort(lowPrObjs.begin(), lowPrObjs.end(), pox);
-	//std::stable_sort(lowPrObjs.begin(), lowPrObjs.end(), poy);
-	//std::stable_sort(highPrObjs.begin(), highPrObjs.end(),pox);
-	//std::stable_sort(highPrObjs.begin(), highPrObjs.end(),poy);
-	//std::stable_sort(highPrObjsVis.begin(), highPrObjsVis.end(),pox);
-	//std::stable_sort(highPrObjsVis.begin(), highPrObjsVis.end(),poy);
+#ifndef _DEBUG
+	std::stable_sort(lowPrObjs.begin(), lowPrObjs.end(), pox);
+	std::stable_sort(lowPrObjs.begin(), lowPrObjs.end(), poy);
+	std::stable_sort(highPrObjs.begin(), highPrObjs.end(),pox);
+	std::stable_sort(highPrObjs.begin(), highPrObjs.end(),poy);
+	std::stable_sort(highPrObjsVis.begin(), highPrObjsVis.end(),pox);
+	std::stable_sort(highPrObjsVis.begin(), highPrObjsVis.end(),poy);
+#else
+	std::sort(lowPrObjs.begin(), lowPrObjs.end(), pox);
+	std::sort(lowPrObjs.begin(), lowPrObjs.end(), poy);
+	std::sort(highPrObjs.begin(), highPrObjs.end(),pox);
+	std::sort(highPrObjs.begin(), highPrObjs.end(),poy);
+	std::sort(highPrObjsVis.begin(), highPrObjsVis.end(),pox);
+	std::sort(highPrObjsVis.begin(), highPrObjsVis.end(),poy);
+#endif
 	for(int yy=0; yy<lowPrObjs.size(); ++yy)
 	{
 		SDL_Rect * sr = new SDL_Rect;

+ 0 - 1
stdafx.h

@@ -5,7 +5,6 @@
 
 #pragma once
 
-
 #define WIN32_LEAN_AND_MEAN		// Exclude rarely-used stuff from Windows headers
 #include <stdio.h>
 #include <tchar.h>