Skip to content
Permalink
Browse files

Flatten include trees

  • Loading branch information...
LBPHacker committed Apr 20, 2019
1 parent 711453a commit 0179cefc78dfe824e222a0591885eb7c4d491d98
Showing 400 changed files with 1,619 additions and 1,117 deletions.
@@ -12,7 +12,7 @@ def generateElements(elementFiles, outputCpp, outputH):
#include <vector>
#include "simulation/Element.h"
#include "simulation/SimulationData.h"
#include "simulation/elements/Element.h"
"""
@@ -106,7 +106,8 @@ class {0}: public {1}
#endif
"""

elementContent = """#include "ElementClasses.h"
elementContent = """#include "simulation/ElementDefs.h"
#include "ElementClasses.h"
std::vector<Element> GetElements()
{
@@ -1,12 +1,13 @@
#include "Format.h"

#include <ctime>
#include "common/String.h"
#include <stdexcept>
#include <iostream>
#include <iterator>
#include <cstring>
#include <zlib.h>
#include <cstdio>
#include "Format.h"

#include "graphics/Graphics.h"

ByteString format::URLEncode(ByteString source)
@@ -1,11 +1,12 @@
#include <cstdio>
#include <cstdlib>
#include "Misc.h"

#include "Config.h"
#include "icondoc.h"

#include <cstring>
#include <sys/types.h>
#include <cmath>
#include "Config.h"
#include "Misc.h"
#include "icondoc.h"

#include "common/tpt-minmax.h"

//Signum function
@@ -1,3 +1,5 @@
#include "Platform.h"

#include <cstdlib>
#include <cstring>
#include <cstdio>
@@ -15,7 +17,7 @@
#ifdef MACOSX
#include <mach-o/dyld.h>
#endif
#include "Platform.h"

#include "Misc.h"

namespace Platform
@@ -1,5 +1,7 @@
#pragma once

#include "common/String.h"

void EngineProcess();
void ClipboardPush(ByteString text);
ByteString ClipboardPull();
@@ -1,5 +1,8 @@
#if defined(RENDERER)

#include "graphics/Graphics.h"
#include "graphics/Renderer.h"

#include <ctime>
#include <iostream>
#include <fstream>
@@ -9,8 +12,6 @@
#include "Config.h"
#include "Format.h"
#include "gui/interface/Engine.h"
#include "graphics/Graphics.h"
#include "graphics/Renderer.h"

#include "client/GameSave.h"
#include "simulation/Simulation.h"
@@ -1,7 +1,6 @@
#ifndef RENDERER

#include <map>
#include "common/String.h"
#include <ctime>
#include <climits>
#ifdef WIN
@@ -18,7 +17,6 @@

#include <iostream>
#include "Config.h"
#include "graphics/Graphics.h"
#if defined(LIN)
#include "icon.h"
#endif
@@ -34,22 +32,23 @@
#endif

#include "Format.h"
#include "Misc.h"

#include "graphics/Graphics.h"

#include "client/SaveInfo.h"
#include "client/GameSave.h"
#include "client/SaveFile.h"
#include "simulation/SaveRenderer.h"
#include "client/Client.h"
#include "Misc.h"

#include "gui/game/GameController.h"
#include "gui/game/GameView.h"

#include "gui/font/FontEditor.h"

#include "gui/dialogues/ErrorMessage.h"
#include "gui/dialogues/ConfirmPrompt.h"
#include "gui/interface/Keys.h"
#include "gui/Style.h"
#include "gui/interface/Engine.h"

using namespace std;

@@ -13,9 +13,10 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#include "Probability.h"

#include <numeric>
#include <cstdlib>
#include "Probability.h"
#include "common/tpt-rand.h"

namespace Probability
@@ -1,3 +1,5 @@
#include "Update.h"

#include <cstdio>
#include <cstdlib>
#ifndef WIN
@@ -21,7 +23,6 @@
#include <errno.h>
#endif

#include "Update.h"
#include "Platform.h"

// returns 1 on failure, 0 on success
@@ -1,11 +1,12 @@
#include "Client.h"

#include <cstdlib>
#include <iostream>
#include <vector>
#include <map>
#include <iostream>
#include <iomanip>
#include <ctime>
#include <cstdio>
#include <deque>
#include <fstream>
#include <dirent.h>

@@ -28,25 +29,23 @@
#include "common/String.h"
#include "Config.h"
#include "Format.h"
#include "Client.h"
#include "MD5.h"
#include "graphics/Graphics.h"
#include "Misc.h"
#include "Platform.h"
#include "Update.h"

#include "simulation/SaveRenderer.h"
#include "gui/interface/Point.h"
#include "ClientListener.h"

#include "graphics/Graphics.h"

#include "gui/preview/Comment.h"

#include "client/SaveInfo.h"
#include "client/SaveFile.h"
#include "client/GameSave.h"
#include "client/UserInfo.h"
#include "gui/preview/Comment.h"
#include "ClientListener.h"
#include "client/http/Request.h"
#include "client/http/RequestManager.h"

#include "json/json.h"

extern "C"
{
@@ -1,18 +1,14 @@
#ifndef CLIENT_H
#define CLIENT_H

#include <queue>
#include <vector>
#include <list>

#include "common/String.h"
#include "Config.h"
#include "common/Singleton.h"
#include "json/json.h"

#include "User.h"
#include "UserInfo.h"

#include "json/json.h"

class SaveInfo;
class SaveFile;
@@ -1,6 +1,8 @@
#ifndef CLIENTLISTENER_H_
#define CLIENTLISTENER_H_

#include "common/String.h"

class Client;
class ClientListener
{
@@ -1,18 +1,20 @@
#include "common/tpt-minmax.h"
#include "GameSave.h"

#include <iostream>
#include <cmath>
#include <climits>
#include <memory>
#include <vector>
#include <set>
#include <bzlib.h>
#include <cmath>

#include "Config.h"
#include "Format.h"
#include "GameSave.h"
#include "simulation/SimulationData.h"
#include "ElementClasses.h"
#include "hmap.h"

#include "simulation/Simulation.h"
#include "ElementClasses.h"

GameSave::GameSave(GameSave & save):
majorVersion(save.majorVersion),
waterEEnabled(save.waterEEnabled),
@@ -2785,3 +2787,19 @@ GameSave::~GameSave()
{
dealloc();
}

GameSave& GameSave::operator << (Particle &v)
{
if(particlesCount<NPART && v.type)
{
particles[particlesCount++] = v;
}
return *this;
}

GameSave& GameSave::operator << (sign &v)
{
if(signs.size()<MAXSIGNS && v.text.length())
signs.push_back(v);
return *this;
}
@@ -8,10 +8,9 @@

#include "bson/BSON.h"
#include "json/json.h"
#include "simulation/Sign.h"
#include "simulation/Particle.h"

//using namespace std;
struct sign;
struct Particle;

struct ParseException: public std::exception {
enum ParseResult { OK = 0, Corrupt, WrongVersion, InvalidDimensions, InternalError, MissingElement };
@@ -134,21 +133,8 @@ class GameSave
static bool TypeInTmp(int type);
static bool TypeInTmp2(int type, int tmp2);

inline GameSave& operator << (Particle v)
{
if(particlesCount<NPART && v.type)
{
particles[particlesCount++] = v;
}
return *this;
}

inline GameSave& operator << (sign v)
{
if(signs.size()<MAXSIGNS && v.text.length())
signs.push_back(v);
return *this;
}
GameSave& operator << (Particle &v);
GameSave& operator << (sign &v);

private:
bool expanded;
@@ -1,6 +1,5 @@
#include "SaveFile.h"
#include "GameSave.h"
#include "Client.h"

SaveFile::SaveFile(SaveFile & save):
gameSave(NULL),
@@ -1,6 +1,5 @@
#include "SaveInfo.h"
#include "GameSave.h"
#include "Client.h"

SaveInfo::SaveInfo(SaveInfo & save):
id(save.id),
@@ -2,10 +2,7 @@
#define SAVE_H

#include <list>
#include <vector>
#include "common/String.h"
#include <cstdlib>
#include <iostream>

#ifdef GetUserName
# undef GetUserName // dammit windows
@@ -1,4 +1,5 @@
#include "AvatarRequest.h"

#include "Config.h"

namespace http
@@ -2,7 +2,6 @@
#define AVATARREQUEST2_H

#include "ImageRequest.h"
#include "common/String.h"

namespace http
{
@@ -1,5 +1,8 @@
#include "GetUserInfoRequest.h"

#include "Config.h"
#include "client/UserInfo.h"

namespace http
{
GetUserInfoRequest::GetUserInfoRequest(ByteString username) :
@@ -1,14 +1,9 @@
#ifndef GETUSERINFOREQUEST2_H
#define GETUSERINFOREQUEST2_H

#include "Request.h"
#include "common/String.h"
#include "json/json.h"
#include "client/Client.h"
#include "APIRequest.h"

#include <memory>
#include <map>
class UserInfo;

namespace http
{
@@ -7,6 +7,7 @@
#include <memory>

class VideoBuffer;

namespace http
{
class ImageRequest : public Request
Oops, something went wrong.

0 comments on commit 0179cef

Please sign in to comment.
You can’t perform that action at this time.