1
0
forked from 0ad/0ad

Further header & precompiled cleanup, fix no-PCH builds.

GUIObjectBase is made a IGUIObject* to avoid including those headers
un-necessarily. Subsequent diffs ought to clean up the various of
pointers for that with a similar type with reference semantics.

Also:
- Add standard C and C++ headers (mostly cstring for memcpy, string and
vector) where needed.
- Swap out some includes for forward declarations
- Clean up un-necessary boost includes in precompiled and other headers.
- Clean up precompiled headers, including fewer things.
- Move ACPI to the windows-specific folder as it's included there only
and mostly specific to that platform.

Thanks Stan for the testing.

Differential Revision: https://code.wildfiregames.com/D3129
This was SVN commit r24352.
This commit is contained in:
wraitii 2020-12-09 14:39:14 +00:00
parent 715f441fbb
commit 369c2e8801
124 changed files with 346 additions and 195 deletions

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2012 Wildfire Games.
/* Copyright (C) 2020 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -24,6 +24,8 @@
#ifndef INCLUDED_HEIGHTMIPMAP
#define INCLUDED_HEIGHTMIPMAP
#include <vector>
class Path;
using VfsPath = Path;

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2010 Wildfire Games.
/* Copyright (C) 2020 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -24,7 +24,7 @@
#include "lib/res/handle.h"
#include "graphics/TerrainTextureEntry.h"
class CTerrainTextureEntry;
///////////////////////////////////////////////////////////////////////////////
// CMiniPatch: definition of a single terrain tile

View File

@ -25,6 +25,8 @@
#include "maths/FixedVector3D.h"
#include "ps/CStrIntern.h"
#include <vector>
class CFrustum;
class CTerrain;
class CSimContext;

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2019 Wildfire Games.
/* Copyright (C) 2020 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -24,6 +24,7 @@
#include <map>
#include <unordered_map>
#include <vector>
class CVector4D;

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2019 Wildfire Games.
/* Copyright (C) 2020 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -23,6 +23,7 @@
#include "graphics/PreprocessorWrapper.h"
#include "graphics/ShaderManager.h"
#include "graphics/TextureManager.h"
#include "lib/timer.h"
#include "lib/res/graphics/ogl_tex.h"
#include "maths/Matrix3D.h"
#include "maths/Vector3D.h"

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2012 Wildfire Games.
/* Copyright (C) 2020 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -22,6 +22,8 @@
#include "graphics/ShaderTechniquePtr.h"
#include "lib/ogl.h"
#include <vector>
/**
* Implements a render pass consisting of various GL state changes and a shader,
* used by CShaderTechnique.

View File

@ -22,6 +22,7 @@
#include "lib/utf8.h"
#include "lib/ogl.h"
#include "lib/allocators/shared_ptr.h"
#include "lib/file/io/io.h"
#include "lib/res/graphics/ogl_tex.h"
#include "ps/CLogger.h"

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2018 Wildfire Games.
/* Copyright (C) 2020 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -27,6 +27,8 @@
#include "ps/GameSetup/Config.h"
#include "renderer/Renderer.h"
#include <errno.h>
CTextRenderer::CTextRenderer(const CShaderProgramPtr& shader) :
m_Shader(shader)
{

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2019 Wildfire Games.
/* Copyright (C) 2020 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -24,6 +24,8 @@
#include "ps/CStrIntern.h"
#include "ps/Shapes.h"
#include <list>
class CFont;
class CTextRenderer

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2019 Wildfire Games.
/* Copyright (C) 2020 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -32,6 +32,8 @@
#include "ps/Filesystem.h"
#include "ps/Profile.h"
#include <boost/filesystem.hpp>
#include <iomanip>
#include <unordered_map>
#include <unordered_set>

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2018 Wildfire Games.
/* Copyright (C) 2020 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -22,6 +22,8 @@
#include "simulation2/system/Entity.h"
#include <vector>
class CUnit;
class CModel;
class CSkeletonAnim;

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2009 Wildfire Games.
/* Copyright (C) 2020 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -19,6 +19,8 @@
#include "graphics/Color.h"
#include <cstring>
class TestColor : public CxxTest::TestSuite
{
public:

View File

@ -20,6 +20,7 @@
#include "CGUI.h"
#include "gui/IGUIScrollBar.h"
#include "gui/ObjectTypes/CGUIDummyObject.h"
#include "gui/ObjectTypes/CTooltip.h"
#include "gui/Scripting/ScriptFunctions.h"
#include "i18n/L10n.h"
@ -63,7 +64,7 @@ const CStr CGUI::EventNameMouseRightDoubleClick = "MouseRightDoubleClick";
const CStr CGUI::EventNameMouseRightRelease = "MouseRightRelease";
CGUI::CGUI(const shared_ptr<ScriptContext>& context)
: m_BaseObject(*this),
: m_BaseObject(new CGUIDummyObject(*this)),
m_FocusedObject(nullptr),
m_InternalNameNumber(0),
m_MouseButtons(0)
@ -126,7 +127,7 @@ InReaction CGUI::HandleEvent(const SDL_Event_* ev)
m_MousePos = CPos((float)ev->ev.motion.x / g_GuiScale, (float)ev->ev.motion.y / g_GuiScale);
SGUIMessage msg(GUIM_MOUSE_MOTION);
m_BaseObject.RecurseObject(&IGUIObject::IsHiddenOrGhost, &IGUIObject::HandleMessage, msg);
m_BaseObject->RecurseObject(&IGUIObject::IsHiddenOrGhost, &IGUIObject::HandleMessage, msg);
}
// Update m_MouseButtons. (BUTTONUP is handled later.)
@ -164,7 +165,7 @@ InReaction CGUI::HandleEvent(const SDL_Event_* ev)
// Now we'll call UpdateMouseOver on *all* objects,
// we'll input the one hovered, and they will each
// update their own data and send messages accordingly
m_BaseObject.RecurseObject(&IGUIObject::IsHiddenOrGhost, &IGUIObject::UpdateMouseOver, static_cast<IGUIObject* const&>(pNearest));
m_BaseObject->RecurseObject(&IGUIObject::IsHiddenOrGhost, &IGUIObject::UpdateMouseOver, static_cast<IGUIObject* const&>(pNearest));
if (ev->ev.type == SDL_MOUSEBUTTONDOWN)
{
@ -223,10 +224,10 @@ InReaction CGUI::HandleEvent(const SDL_Event_* ev)
}
// Reset all states on all visible objects
m_BaseObject.RecurseObject(&IGUIObject::IsHidden, &IGUIObject::ResetStates);
m_BaseObject->RecurseObject(&IGUIObject::IsHidden, &IGUIObject::ResetStates);
// Since the hover state will have been reset, we reload it.
m_BaseObject.RecurseObject(&IGUIObject::IsHiddenOrGhost, &IGUIObject::UpdateMouseOver, static_cast<IGUIObject* const&>(pNearest));
m_BaseObject->RecurseObject(&IGUIObject::IsHiddenOrGhost, &IGUIObject::UpdateMouseOver, static_cast<IGUIObject* const&>(pNearest));
}
}
@ -266,7 +267,7 @@ InReaction CGUI::HandleEvent(const SDL_Event_* ev)
void CGUI::TickObjects()
{
m_BaseObject.RecurseObject(&IGUIObject::IsHiddenOrGhost, &IGUIObject::Tick);
m_BaseObject->RecurseObject(&IGUIObject::IsHiddenOrGhost, &IGUIObject::Tick);
SendEventToAll(EventNameTick);
m_Tooltip.Update(FindObjectUnderMouse(), m_MousePos, *this);
}
@ -299,7 +300,7 @@ void CGUI::Draw()
// drawn on top of everything else
glClear(GL_DEPTH_BUFFER_BIT);
m_BaseObject.RecurseObject(&IGUIObject::IsHidden, &IGUIObject::Draw);
m_BaseObject->RecurseObject(&IGUIObject::IsHidden, &IGUIObject::Draw);
}
void CGUI::DrawSprite(const CGUISpriteInstance& Sprite, int CellID, const float& Z, const CRect& Rect, const CRect& UNUSED(Clipping))
@ -315,7 +316,7 @@ void CGUI::DrawSprite(const CGUISpriteInstance& Sprite, int CellID, const float&
void CGUI::UpdateResolution()
{
m_BaseObject.RecurseObject(nullptr, &IGUIObject::UpdateCachedSize);
m_BaseObject->RecurseObject(nullptr, &IGUIObject::UpdateCachedSize);
}
IGUIObject* CGUI::ConstructObject(const CStr& str)
@ -347,6 +348,11 @@ bool CGUI::AddObject(IGUIObject& parent, IGUIObject& child)
return true;
}
IGUIObject* CGUI::GetBaseObject()
{
return m_BaseObject.get();
};
bool CGUI::ObjectExists(const CStr& Name) const
{
return m_pAllObjects.find(Name) != m_pAllObjects.end();
@ -365,7 +371,7 @@ IGUIObject* CGUI::FindObjectByName(const CStr& Name) const
IGUIObject* CGUI::FindObjectUnderMouse()
{
IGUIObject* pNearest = nullptr;
m_BaseObject.RecurseObject(&IGUIObject::IsHiddenOrGhost, &IGUIObject::ChooseMouseOverAndClosest, pNearest);
m_BaseObject->RecurseObject(&IGUIObject::IsHiddenOrGhost, &IGUIObject::ChooseMouseOverAndClosest, pNearest);
return pNearest;
}
@ -500,10 +506,10 @@ void CGUI::LoadXmlFile(const VfsPath& Filename, std::unordered_set<VfsPath>& Pat
void CGUI::LoadedXmlFiles()
{
m_BaseObject.RecurseObject(nullptr, &IGUIObject::UpdateCachedSize);
m_BaseObject->RecurseObject(nullptr, &IGUIObject::UpdateCachedSize);
SGUIMessage msg(GUIM_LOAD);
m_BaseObject.RecurseObject(nullptr, &IGUIObject::HandleMessage, msg);
m_BaseObject->RecurseObject(nullptr, &IGUIObject::HandleMessage, msg);
SendEventToAll(EventNameLoad);
}
@ -527,7 +533,7 @@ void CGUI::Xeromyces_ReadRootObjects(XMBElement Element, CXeromyces* pFile, std:
Xeromyces_ReadScript(child, pFile, Paths);
else
// Read in this whole object into the GUI
Xeromyces_ReadObject(child, pFile, &m_BaseObject, subst, Paths, 0);
Xeromyces_ReadObject(child, pFile, m_BaseObject.get(), subst, Paths, 0);
}
}
@ -1265,7 +1271,7 @@ void CGUI::Xeromyces_ReadTooltip(XMBElement Element, CXeromyces* pFile)
object->SetSettingFromString(attr_name, attr_value.FromUTF8(), true);
}
if (!AddObject(m_BaseObject, *object))
if (!AddObject(*m_BaseObject, *object))
delete object;
}

View File

@ -24,7 +24,6 @@
#define INCLUDED_CGUI
#include "gui/GUITooltip.h"
#include "gui/ObjectTypes/CGUIDummyObject.h"
#include "gui/SettingTypes/CGUIColor.h"
#include "gui/SGUIIcon.h"
#include "gui/SGUIStyle.h"
@ -49,6 +48,8 @@ struct SGUIScrollBarStyle;
namespace js { class BaseProxyHandler; }
using map_pObjects = std::map<CStr, IGUIObject*>;
/**
* The main object that represents a whole GUI page.
*/
@ -152,7 +153,7 @@ public:
/**
* Return the object which is an ancestor of every other GUI object.
*/
CGUIDummyObject& GetBaseObject() { return m_BaseObject; };
IGUIObject* GetBaseObject();
/**
* Checks if object exists and return true or false accordingly
@ -576,7 +577,7 @@ private:
* Base Object, all its children are considered parentless
* because this is not a real object per se.
*/
CGUIDummyObject m_BaseObject;
std::unique_ptr<IGUIObject> m_BaseObject;
/**
* Focused object!

View File

@ -21,6 +21,7 @@
#include "gui/ObjectTypes/CChart.h"
#include "gui/ObjectTypes/CCheckBox.h"
#include "gui/ObjectTypes/CDropDown.h"
#include "gui/ObjectTypes/CGUIDummyObject.h"
#include "gui/ObjectTypes/CHotkeyPicker.h"
#include "gui/ObjectTypes/CImage.h"
#include "gui/ObjectTypes/CInput.h"

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2019 Wildfire Games.
/* Copyright (C) 2020 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -20,6 +20,7 @@
#include "IGUIScrollBar.h"
#include "gui/CGUI.h"
#include "gui/SGUIMessage.h"
#include "gui/ObjectBases/IGUIScrollBarOwner.h"
#include "maths/MathUtil.h"

View File

@ -554,12 +554,12 @@ bool IGUIObject::IsFocused() const
bool IGUIObject::IsBaseObject() const
{
return this == &m_pGUI.GetBaseObject();
return this == m_pGUI.GetBaseObject();
}
bool IGUIObject::IsRootObject() const
{
return m_pParent == &m_pGUI.GetBaseObject();
return m_pParent == m_pGUI.GetBaseObject();
}
void IGUIObject::TraceMember(JSTracer* trc)

View File

@ -42,8 +42,6 @@ class IGUISetting;
template <typename T>
class JSI_GUIProxy;
using map_pObjects = std::map<CStr, IGUIObject*>;
#define GUI_OBJECT(obj) \
public: \
static IGUIObject* ConstructObject(CGUI& pGUI) \

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2019 Wildfire Games.
/* Copyright (C) 2020 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -21,6 +21,7 @@
#include "gui/CGUI.h"
#include "gui/IGUIScrollBar.h"
#include "gui/ObjectBases/IGUIObject.h"
IGUIScrollBarOwner::IGUIScrollBarOwner(IGUIObject& pObject)
: m_pObject(pObject)

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2019 Wildfire Games.
/* Copyright (C) 2020 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -18,12 +18,13 @@
#ifndef INCLUDED_IGUISCROLLBAROWNER
#define INCLUDED_IGUISCROLLBAROWNER
#include "gui/ObjectBases/IGUIObject.h"
#include <vector>
class CStr8;
struct SGUIMessage;
struct SGUIScrollBarStyle;
class IGUIScrollBar;
class IGUIObject;
/**
* Base-class this if you want an object to contain
@ -54,7 +55,7 @@ public:
/**
* Interface for the m_ScrollBar to use.
*/
virtual const SGUIScrollBarStyle* GetScrollBarStyle(const CStr& style) const;
virtual const SGUIScrollBarStyle* GetScrollBarStyle(const CStr8& style) const;
/**
* Add a scroll-bar

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2019 Wildfire Games.
/* Copyright (C) 2020 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -20,6 +20,8 @@
#include "IGUITextOwner.h"
#include "gui/CGUI.h"
#include "gui/SGUIMessage.h"
#include "gui/ObjectBases/IGUIObject.h"
#include "gui/SettingTypes/CGUIString.h"
#include <math.h>

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2019 Wildfire Games.
/* Copyright (C) 2020 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -30,13 +30,16 @@ GUI Object Base - Text Owner
#ifndef INCLUDED_IGUITEXTOWNER
#define INCLUDED_IGUITEXTOWNER
#include "gui/ObjectBases/IGUIObject.h"
#include "ps/Shapes.h"
#include <vector>
class CStrW;
struct CGUIColor;
struct SGUIMessage;
class CGUIText;
class CGUIString;
class IGUIObject;
/**
* Framework for handling Output text.

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2019 Wildfire Games.
/* Copyright (C) 2020 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -19,6 +19,7 @@
#define INCLUDED_CCHART
#include "graphics/ShaderProgramPtr.h"
#include "gui/ObjectBases/IGUIObject.h"
#include "gui/ObjectBases/IGUITextOwner.h"
#include "gui/SettingTypes/CGUIColor.h"
#include "gui/SettingTypes/CGUIList.h"

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2019 Wildfire Games.
/* Copyright (C) 2020 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -19,6 +19,7 @@
#define INCLUDED_CCHECKBOX
#include "gui/CGUISprite.h"
#include "gui/ObjectBases/IGUIObject.h"
#include "gui/ObjectBases/IGUIButtonBehavior.h"
class CCheckBox : public IGUIObject, public IGUIButtonBehavior

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2019 Wildfire Games.
/* Copyright (C) 2020 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -29,6 +29,7 @@ GUI Object - Drop Down (list)
#define INCLUDED_CDROPDOWN
#include "gui/CGUISprite.h"
#include "gui/ObjectBases/IGUIObject.h"
#include "gui/ObjectTypes/CList.h"
#include <string>

View File

@ -19,6 +19,7 @@
#define INCLUDED_CHOTKEYPICKER
#include "gui/CGUI.h"
#include "gui/ObjectBases/IGUIObject.h"
#include "lib/external_libraries/libsdl.h"
#include "ps/CStr.h"

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2019 Wildfire Games.
/* Copyright (C) 2020 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -19,9 +19,11 @@
#define INCLUDED_CINPUT
#include "gui/CGUISprite.h"
#include "gui/ObjectBases/IGUIObject.h"
#include "gui/ObjectBases/IGUIScrollBarOwner.h"
#include "lib/external_libraries/libsdl.h"
#include <list>
#include <vector>
/**

View File

@ -19,6 +19,7 @@
#define INCLUDED_CLIST
#include "gui/CGUISprite.h"
#include "gui/ObjectBases/IGUIObject.h"
#include "gui/ObjectBases/IGUIScrollBarOwner.h"
#include "gui/ObjectBases/IGUITextOwner.h"
#include "gui/SettingTypes/CGUIList.h"

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2019 Wildfire Games.
/* Copyright (C) 2020 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -19,6 +19,7 @@
#define INCLUDED_CTEXT
#include "gui/CGUISprite.h"
#include "gui/ObjectBases/IGUIObject.h"
#include "gui/ObjectBases/IGUIScrollBarOwner.h"
#include "gui/ObjectBases/IGUITextOwner.h"
#include "gui/SettingTypes/CGUIString.h"

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2019 Wildfire Games.
/* Copyright (C) 2020 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -18,8 +18,9 @@
#ifndef INCLUDED_CTOOLTIP
#define INCLUDED_CTOOLTIP
#include "gui/ObjectBases/IGUITextOwner.h"
#include "gui/CGUISprite.h"
#include "gui/ObjectBases/IGUIObject.h"
#include "gui/ObjectBases/IGUITextOwner.h"
#include "gui/SettingTypes/CGUIString.h"
/**

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2019 Wildfire Games.
/* Copyright (C) 2020 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -21,6 +21,7 @@
#include "graphics/FontMetrics.h"
#include "gui/CGUI.h"
#include "gui/ObjectBases/IGUIObject.h"
#include "lib/utf8.h"
#include "ps/CLogger.h"

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2018 Wildfire Games.
/* Copyright (C) 2020 Wildfire Games.
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
@ -31,6 +31,7 @@
#include "lib/allocators/allocator_adapters.h"
#include "lib/allocators/freelist.h"
#include <cstring>
namespace Allocators {

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2018 Wildfire Games.
/* Copyright (C) 2020 Wildfire Games.
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
@ -30,6 +30,8 @@
#include "lib/alignment.h"
#include "lib/sysdep/vm.h"
#include <cstring>
#include <string>
static Status validate_da(DynArray* da)
{

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2011 Wildfire Games.
/* Copyright (C) 2020 Wildfire Games.
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
@ -23,6 +23,8 @@
#ifndef INCLUDED_ALLOCATORS_FREELIST
#define INCLUDED_ALLOCATORS_FREELIST
#include <cstring>
// "freelist" is a pointer to the first unused element or a sentinel.
// their memory holds a pointer to the previous element in the freelist
// (or its own address in the case of sentinels to avoid branches)

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2010 Wildfire Games.
/* Copyright (C) 2020 Wildfire Games.
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
@ -27,6 +27,8 @@
#include "precompiled.h"
#include "lib/bits.h"
#include <cstring>
static inline u32 get_float_bits(const float x)
{
u32 ret;

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2010 Wildfire Games.
/* Copyright (C) 2020 Wildfire Games.
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
@ -29,6 +29,8 @@
#include "lib/bits.h"
#include <cstring>
#ifndef swap16
u16 swap16(const u16 x)
{

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2015 Wildfire Games.
/* Copyright (C) 2020 Wildfire Games.
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
@ -27,13 +27,14 @@
#include "precompiled.h"
#include "lib/debug_stl.h"
#include "lib/regex.h"
#include <cassert>
#include <deque>
#include <list>
#include <map>
#include <set>
#include <cassert>
#include <list>
#include "lib/regex.h"
#include <vector>
static const StatusDefinition debugStlStatusDefinitions[] = {
{ ERR::STL_CNT_UNKNOWN, L"Unknown STL container type_name" },

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2010 Wildfire Games.
/* Copyright (C) 2020 Wildfire Games.
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
@ -29,6 +29,7 @@
#include "lib/sysdep/cpu.h"
#include <cstring>
class Codec_ZLib : public ICodec
{

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2018 Wildfire Games.
/* Copyright (C) 2020 Wildfire Games.
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
@ -33,6 +33,7 @@
#include "lib/sysdep/filesystem.h"
#include <boost/filesystem.hpp>
bool DirectoryExists(const OsPath& path)
{

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2018 Wildfire Games.
/* Copyright (C) 2020 Wildfire Games.
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
@ -30,6 +30,7 @@
#include "lib/os_path.h"
#include "lib/posix/posix_filesystem.h" // mode_t
#include <vector>
LIB_API bool DirectoryExists(const OsPath& path);
LIB_API bool FileExists(const OsPath& pathname);

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2010 Wildfire Games.
/* Copyright (C) 2020 Wildfire Games.
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
@ -25,6 +25,8 @@
#include "lib/path.h"
#include <vector>
/**
* VFS path of the form "(dir/)*file?"
*

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2016 Wildfire Games.
/* Copyright (C) 2020 Wildfire Games.
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
@ -32,7 +32,6 @@
#include "lib/file/vfs/vfs_lookup.h"
#include "lib/file/vfs/vfs.h" // error codes
struct CompareFileInfoByName
{
bool operator()(const CFileInfo& a, const CFileInfo& b)

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2016 Wildfire Games.
/* Copyright (C) 2020 Wildfire Games.
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
@ -28,6 +28,7 @@
#include "lib/file/vfs/vfs_tree.h"
#include <cstdio>
#include <ctime>
#include "lib/file/common/file_stats.h"
#include "lib/sysdep/cpu.h"

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2017 Wildfire Games.
/* Copyright (C) 2020 Wildfire Games.
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
@ -27,11 +27,12 @@
#include "precompiled.h"
#include "input.h"
#include "lib/external_libraries/libsdl.h"
#include <list>
#include <stdio.h>
#include <stdlib.h>
#include "lib/external_libraries/libsdl.h"
const size_t MAX_HANDLERS = 9;
static InHandler handler_stack[MAX_HANDLERS];
static size_t handler_stack_top = 0;

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2019 Wildfire Games.
/* Copyright (C) 2020 Wildfire Games.
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
@ -39,6 +39,7 @@
#include "lib/utf8.h"
#include <algorithm>
#include <cstring>
#include <functional>
@ -247,7 +248,7 @@ public:
// Convert the separator to allow for string comparison
if(other.separator != ret.separator)
replace(other.path.begin(), other.path.end(), other.separator, ret.separator);
std::replace(other.path.begin(), other.path.end(), other.separator, ret.separator);
const size_t idx = ret.path.rfind(other.path);
if(idx == String::npos)

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2015 Wildfire Games.
/* Copyright (C) 2020 Wildfire Games.
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
@ -54,7 +54,13 @@
#else
# define BOOST_FILESYSTEM_VERSION 2
#endif
#include <boost/filesystem.hpp>
namespace boost{
namespace filesystem {
class path;
typedef path wpath;
};
}
namespace fs = boost::filesystem;
#endif // #ifndef INCLUDED_PCH_BOOST

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2015 Wildfire Games.
/* Copyright (C) 2020 Wildfire Games.
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
@ -45,25 +45,26 @@
#include <cwctype>
#endif // !MINIMAL_PCH
#if MINIMAL_PCH < 2
#if MINIMAL_PCH < 3
// common C++98 STL headers
#include <algorithm>
#include <vector>
#endif
#if MINIMAL_PCH < 3
// all other C++98 STL headers
#include <deque>
#include <functional>
#include <iterator>
#include <list>
#include <map>
#include <memory>
#include <set>
#include <string>
#include <utility>
#include <vector>
#endif
#if MINIMAL_PCH < 2
// all other C++98 STL headers
#include <deque>
#include <functional>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <utility>
#endif
#if !MINIMAL_PCH
@ -84,7 +85,6 @@
#include <sstream>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <sstream>
#include <typeinfo>
#include <valarray>

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2010 Wildfire Games.
/* Copyright (C) 2020 Wildfire Games.
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
@ -24,6 +24,7 @@
#include "precompiled.h"
#include <cwctype>
int match_wildcard(const wchar_t* s, const wchar_t* w)
{

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2010 Wildfire Games.
/* Copyright (C) 2020 Wildfire Games.
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
@ -26,6 +26,8 @@
#include "lib/tex/tex_codec.h"
#include "lib/allocators/shared_ptr.h"
#include <cstring>
class TestTex : public CxxTest::TestSuite
{
public:

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2010 Wildfire Games.
/* Copyright (C) 2020 Wildfire Games.
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
@ -26,9 +26,10 @@
#include "precompiled.h"
#include <stdio.h>
#include <errno.h>
#include <stdarg.h>
#include <cstdio>
#include <cstring>
#include <cerrno>
#include <cstdarg>
#include "lib/secure_crt.h"

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2018 Wildfire Games.
/* Copyright (C) 2020 Wildfire Games.
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
@ -27,8 +27,9 @@
#include "precompiled.h"
#include "lib/snd.h"
#include <stdio.h>
#include <stdlib.h>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include "lib/external_libraries/openal.h"

View File

@ -29,6 +29,7 @@
#include "lib/sysdep/os_cpu.h"
#include "lib/sysdep/arch/x86_x64/x86_x64.h"
#include <algorithm>
ApicId GetApicId()
{

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2018 Wildfire Games.
/* Copyright (C) 2020 Wildfire Games.
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
@ -29,6 +29,8 @@
#include "lib/sysdep/os_cpu.h"
#include "lib/sysdep/arch/x86_x64/x86_x64.h"
#include <vector>
namespace x86_x64 {
static const size_t maxTLBs = 2*2*4; // (level0, level1) x (D,I) x (4K, 2M, 4M, 1G)

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2018 Wildfire Games.
/* Copyright (C) 2020 Wildfire Games.
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
@ -27,8 +27,6 @@
#include "precompiled.h"
#include "lib/sysdep/arch/x86_x64/topology.h"
#include <bitset>
#include "lib/bits.h"
#include "lib/module_init.h"
#include "lib/sysdep/cpu.h" // ERR::CPU_FEATURE_MISSING
@ -38,6 +36,9 @@
#include "lib/sysdep/arch/x86_x64/cache.h"
#include "lib/sysdep/arch/x86_x64/apic.h"
#include <bitset>
#include <vector>
namespace topology {
//---------------------------------------------------------------------------------------------------------------------

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2010 Wildfire Games.
/* Copyright (C) 2020 Wildfire Games.
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
@ -29,8 +29,11 @@
#include "lib/os_path.h"
#include <vector>
#include <memory>
struct DirWatch;
typedef shared_ptr<DirWatch> PDirWatch;
typedef std::shared_ptr<DirWatch> PDirWatch;
/**
* start watching a single directory for changes.

View File

@ -34,6 +34,7 @@
# include "lib/sysdep/os/win/wgfx.h"
#endif
#include <string>
namespace gfx {

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2014 Wildfire Games.
/* Copyright (C) 2020 Wildfire Games.
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
@ -30,12 +30,13 @@
#include "lib/file/file.h"
#include "lib/posix/posix_filesystem.h" // mode_t
#include "ps/CLogger.h"
#include <AvailabilityMacros.h> // MAC_OS_X_VERSION_MIN_REQUIRED
#include <CoreFoundation/CoreFoundation.h>
#include <CoreServices/CoreServices.h>
#include "ps/CLogger.h"
#include <vector>
static FSEventStreamRef g_Stream = NULL;

View File

@ -21,13 +21,13 @@
*/
#include "precompiled.h"
#include "lib/sysdep/acpi.h"
#include "lib/sysdep/os/win/acpi.h"
#include "lib/byte_order.h"
#include "lib/sysdep/cpu.h"
#include "lib/module_init.h"
# include "lib/sysdep/os/win/wfirmware.h"
#include "lib/sysdep/os/win/wfirmware.h"
#pragma pack(1)

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2015 Wildfire Games.
/* Copyright (C) 2020 Wildfire Games.
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
@ -23,6 +23,8 @@
#ifndef INCLUDED_WFIRMWARE
#define INCLUDED_WFIRMWARE
#include <vector>
namespace wfirmware {
typedef u32 Provider;

View File

@ -29,8 +29,8 @@
#include "lib/timer.h"
#include "lib/module_init.h"
#include "lib/sysdep/vm.h"
#include "lib/sysdep/acpi.h"
#include "lib/sysdep/os_cpu.h"
#include "lib/sysdep/os/win/acpi.h"
#include "lib/sysdep/os/win/win.h"
#include "lib/sysdep/os/win/wutil.h"
#include "lib/sysdep/os/win/wcpu.h"

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2018 Wildfire Games.
/* Copyright (C) 2020 Wildfire Games.
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
@ -42,6 +42,8 @@
#include "lib/sysdep/os/win/winit.h"
#include "lib/sysdep/os/win/wposix/crt_posix.h" // _get_osfhandle
#include <ctime>
WINIT_REGISTER_MAIN_SHUTDOWN(waio_Shutdown);
// (dynamic linking preserves compatibility with previous Windows versions)

View File

@ -30,6 +30,8 @@
#include "lib/sysdep/os/win/wposix/wposix_internal.h"
#include <ctime>
WINIT_REGISTER_MAIN_INIT(wtime_Init); // whrt -> wtime
// NT system time and FILETIME are hectonanoseconds since Jan. 1, 1601 UTC.

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2018 Wildfire Games.
/* Copyright (C) 2020 Wildfire Games.
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
@ -37,7 +37,9 @@
# include "lib/sysdep/os/win/wfirmware.h"
#endif
#include <cstring>
#include <sstream>
#include <vector>
namespace SMBIOS {

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2010 Wildfire Games.
/* Copyright (C) 2020 Wildfire Games.
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
@ -24,6 +24,8 @@
#include "lib/byte_order.h"
#include <cstring>
class TestByteOrder : public CxxTest::TestSuite
{
public:

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2016 Wildfire Games.
/* Copyright (C) 2020 Wildfire Games.
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
@ -24,6 +24,8 @@
#include "lib/secure_crt.h"
#include <cstring>
// note: we only test the char version. this avoids having to
// expose secure_crt.cpp's tchar / tcpy etc. macros in the header and/or
// writing a copy of this test for the unicode version.

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2010 Wildfire Games.
/* Copyright (C) 2020 Wildfire Games.
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
@ -36,6 +36,8 @@
#include "lib/utf8.h"
#include <cstring>
/**
* timer_Time will subsequently return values relative to the current time.
**/

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2010 Wildfire Games.
/* Copyright (C) 2020 Wildfire Games.
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
@ -23,6 +23,8 @@
#ifndef INCLUDED_UTF8
#define INCLUDED_UTF8
#include <string>
// note: error codes are returned via optional output parameter.
namespace ERR
{

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2018 Wildfire Games.
/* Copyright (C) 2020 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -19,6 +19,8 @@
#include "glooxwrapper/glooxwrapper.h"
#include <vector>
/// Global Gamelist Extension
#define EXTGAMELISTQUERY 1403
#define XMLNS_GAMELIST "jabber:iq:gamelist"

View File

@ -37,6 +37,8 @@
#include <gloox/gloox.h>
#include <iostream>
//debug
#if 1
#define DbgXMPP(x)

View File

@ -20,10 +20,13 @@
#include "IXmppClient.h"
#include <deque>
#include "glooxwrapper/glooxwrapper.h"
#include <ctime>
#include <deque>
#include <string>
#include <vector>
class ScriptInterface;
namespace glooxwrapper

View File

@ -31,8 +31,6 @@ that of Atlas depending on commandline parameters.
#define MINIMAL_PCH 2
#include "lib/precompiled.h"
#include <chrono>
#include "lib/debug.h"
#include "lib/status.h"
#include "lib/secure_crt.h"
@ -95,6 +93,9 @@ that of Atlas depending on commandline parameters.
#define getpid _getpid // Use the non-deprecated function name
#endif
#include <chrono>
#include <iostream>
extern CmdLineArgs g_args;
extern CStrW g_UniqueLogPostfix;

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2012 Wildfire Games.
/* Copyright (C) 2020 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -26,6 +26,8 @@
#include "graphics/ShaderProgramPtr.h"
#include <vector>
class CBoundingBoxAligned;
class CFrustum;
class CPlane;

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2016 Wildfire Games.
/* Copyright (C) 2020 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -29,6 +29,8 @@
#include "FixedVector3D.h"
#include "Vector3D.h"
#include <vector>
/**
* Describes a node of the spline
*/

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2019 Wildfire Games.
/* Copyright (C) 2020 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -28,6 +28,7 @@
#include "FixedVector3D.h"
#include <cmath>
#include <algorithm>
#include <limits>
CVector3D::CVector3D(const CFixedVector3D& v) :

View File

@ -25,6 +25,7 @@
#include "ps/CStr.h"
#include <ctime>
#include <deque>
class CGame;

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2019 Wildfire Games.
/* Copyright (C) 2020 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -19,6 +19,7 @@
#define NETFILETRANSFER_H
#include <map>
#include <string>
class CNetMessage;
class CFileTransferResponseMessage;

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2019 Wildfire Games.
/* Copyright (C) 2020 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -24,6 +24,7 @@
#include "lib/types.h"
#include "scriptinterface/ScriptTypes.h"
#include <ctime>
#include <mutex>
#include <string>
#include <utility>

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2019 Wildfire Games.
/* Copyright (C) 2020 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -21,6 +21,7 @@
#include "ps/ProfileViewer.h"
#include <mutex>
#include <vector>
typedef struct _ENetPeer ENetPeer;
typedef struct _ENetHost ENetHost;

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2019 Wildfire Games.
/* Copyright (C) 2020 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -19,11 +19,10 @@
// "engine"-specific PCH:
#include "ps/Pyrogenesis.h" // old error system
#if CONFIG_ENABLE_PCH
#include "SDL.h"
#include "SDL_endian.h"
#include "ps/CStr.h"
#include "ps/Errors.h"
#include "lib/file/vfs/vfs_path.h"
#include "lib/file/vfs/vfs_util.h"
#include "scriptinterface/ScriptTypes.h"
#endif // CONFIG_ENABLE_PCH

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2009 Wildfire Games.
/* Copyright (C) 2020 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -18,3 +18,8 @@
#include "lib/precompiled.h" // common precompiled header
// "graphics"-specific PCH:
#include "scriptinterface/ScriptTypes.h"
#include "lib/ogl.h"
#include "ps/CStr.h"
#include "ps/CStrIntern.h"
#include "maths/Matrix3D.h"

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2019 Wildfire Games.
/* Copyright (C) 2020 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -23,7 +23,6 @@
#endif
#if CONFIG_ENABLE_PCH
#include "gui/CGUI.h"
#include "gui/ObjectBases/IGUIObject.h"
#include "ps/CStr.h"

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2019 Wildfire Games.
/* Copyright (C) 2020 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -23,5 +23,6 @@
// These headers are included by almost all compilation units.
#include "ps/CStr.h"
#include "ps/ThreadUtil.h"
#include "network/NetMessage.h"
#include "scriptinterface/ScriptInterface.h"
#endif // CONFIG_ENABLE_PCH

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2019 Wildfire Games.
/* Copyright (C) 2020 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -15,12 +15,9 @@
* along with 0 A.D. If not, see <http://www.gnu.org/licenses/>.
*/
#define MINIMAL_PCH 1
#define MINIMAL_PCH 2
#include "lib/precompiled.h" // common precompiled header
// Minimal is a bit *too* minimal to let things compile, so include a few more headers
#include "lib/debug.h"
#if CONFIG_ENABLE_PCH
// The simulation has many header files (component interfaces) which are quick to compile on their own
@ -29,5 +26,7 @@
#include "simulation2/system/Component.h"
#include "simulation2/system/Interface.h"
#include "simulation2/system/InterfaceScripted.h"
#include "maths/FixedVector2D.h"
#include "maths/FixedVector3D.h"
#endif // CONFIG_ENABLE_PCH

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2012 Wildfire Games.
/* Copyright (C) 2020 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -18,6 +18,8 @@
#ifndef INCLUDED_COMPRESS
#define INCLUDED_COMPRESS
#include <string>
/**
* @file
* Simple (non-streaming) compression functions.

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2015 Wildfire Games.
/* Copyright (C) 2020 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -26,6 +26,7 @@
#include "lib/sysdep/dir_watch.h"
#include "lib/utf8.h"
#include <boost/filesystem.hpp>
PIVFS g_VFS;

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2015 Wildfire Games.
/* Copyright (C) 2020 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -19,7 +19,6 @@
#define INCLUDED_PS_FILESYSTEM
#include "lib/file/file.h"
#include "lib/file/io/io.h"
#include "lib/file/io/write_buffer.h"
#include "lib/file/vfs/vfs_util.h"

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2018 Wildfire Games.
/* Copyright (C) 2020 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -21,6 +21,8 @@
#include "ps/CStr.h"
#include "lib/os_path.h"
#include <vector>
class CmdLineArgs
{
public:

View File

@ -35,6 +35,7 @@
#include "lib/input.h"
#include <unordered_map>
#include <vector>
// SDL_Scancode is an enum, we'll use an explicit int to avoid including SDL in this header.
using SDL_Scancode_ = int;

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2015 Wildfire Games.
/* Copyright (C) 2020 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -25,6 +25,7 @@
#include "ps/CStr.h"
#include <unordered_map>
#include <vector>
// Some scancodes <-> names that SDL doesn't recognise.
// Those are tested first so they override SDL defaults (useful for UNIFIED keys).

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2019 Wildfire Games.
/* Copyright (C) 2020 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -29,10 +29,6 @@
#include "ps/Profiler2.h"
#include "ps/Singleton.h"
#include <boost/flyweight.hpp>
#include <boost/flyweight/key_value.hpp>
#include <boost/flyweight/no_locking.hpp>
#include <boost/flyweight/no_tracking.hpp>
#define PROFILE_AMORTIZE_FRAMES 30
#define PROFILE_AMORTIZE_TURNS 1
@ -49,15 +45,6 @@ class CProfileNodeTable;
//
// TODO: Check again how much the overhead for getting filename and line really is and if
// it has increased with the new approach after the SpiderMonkey 31 upgrade.
//
// Flyweight types (with no_locking because the call hooks are only used in the
// main thread, and no_tracking because we mustn't delete values the profiler is
// using and it's not going to waste much memory)
typedef boost::flyweight<
std::string,
boost::flyweights::no_tracking,
boost::flyweights::no_locking
> StringFlyweight;
class CProfileNode
{

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2018 Wildfire Games.
/* Copyright (C) 2020 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -26,6 +26,8 @@
#include "ps/CStr.h"
#include "ps/Singleton.h"
#include <vector>
class ScriptInterface;
/**

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2019 Wildfire Games.
/* Copyright (C) 2020 Wildfire Games.
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
@ -78,13 +78,14 @@
#ifndef INCLUDED_PROFILER2
#define INCLUDED_PROFILER2
#include <map>
#include <thread>
#include "lib/timer.h"
#include "ps/ThreadUtil.h"
#include <cstring>
#include <map>
#include <mutex>
#include <vector>
#include <thread>
struct mg_context;

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2019 Wildfire Games.
/* Copyright (C) 2020 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -24,7 +24,8 @@ Standard declarations which are included in all projects.
#ifndef INCLUDED_PYROGENESIS
#define INCLUDED_PYROGENESIS
#include "lib/os_path.h"
class Path;
using OsPath = Path;
extern const char* engine_version;

View File

@ -23,6 +23,7 @@
#include "i18n/L10n.h"
#include "lib/allocators/shared_ptr.h"
#include "lib/file/archive/archive_zip.h"
#include "lib/file/io/io.h"
#include "lib/utf8.h"
#include "maths/Vector3D.h"
#include "ps/CLogger.h"

View File

@ -19,9 +19,10 @@
#include "VisualReplay.h"
#include "graphics/GameView.h"
#include "lib/timer.h"
#include "lib/utf8.h"
#include "lib/allocators/shared_ptr.h"
#include "lib/external_libraries/libsdl.h"
#include "lib/utf8.h"
#include "network/NetClient.h"
#include "network/NetServer.h"
#include "ps/CLogger.h"

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2019 Wildfire Games.
/* Copyright (C) 2020 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -24,6 +24,7 @@
#include "lib/debug.h"
#include "scriptinterface/ScriptInterface.h"
#include <ctime>
#include <string>
/**

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2009 Wildfire Games.
/* Copyright (C) 2020 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -25,9 +25,11 @@
// On Linux, wchar_t is 32-bit, so define a new version of it.
// We now use this code on Windows as well, because wchar_t is a
// native type and distinct from utf16_t.
#include <string>
#include <memory.h>
#include <algorithm>
#include <cstring>
#include <memory>
#include <string>
typedef uint16_t utf16_t;

View File

@ -18,7 +18,6 @@
#ifndef INCLUDED_DECALRDATA
#define INCLUDED_DECALRDATA
#include "graphics/Camera.h"
#include "graphics/RenderableObject.h"
#include "graphics/ShaderProgramPtr.h"
#include "renderer/VertexArray.h"

View File

@ -25,6 +25,7 @@
#include "graphics/Patch.h"
#include "graphics/ShaderManager.h"
#include "graphics/Terrain.h"
#include "graphics/TerrainTextureEntry.h"
#include "graphics/TextRenderer.h"
#include "lib/alignment.h"
#include "lib/allocators/arena.h"

Some files were not shown because too many files have changed in this diff Show More