forked from 0ad/0ad
Fix lineendings.
This was SVN commit r22460.
This commit is contained in:
parent
d5a3437882
commit
3c2f15ee8b
@ -1,6 +1,6 @@
|
||||
@ECHO OFF
|
||||
REM Generate a Unicode string constant from svnversion's output and
|
||||
REM write it to svn_revision.txt
|
||||
FOR /F "tokens=*" %%i IN ('..\bin\svnversion ..\..\source -n') DO SET output=%%i
|
||||
SET output=L"%output%"
|
||||
ECHO %output% > svn_revision.txt
|
||||
@ECHO OFF
|
||||
REM Generate a Unicode string constant from svnversion's output and
|
||||
REM write it to svn_revision.txt
|
||||
FOR /F "tokens=*" %%i IN ('..\bin\svnversion ..\..\source -n') DO SET output=%%i
|
||||
SET output=L"%output%"
|
||||
ECHO %output% > svn_revision.txt
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2019 Wildfire Games.
|
||||
/* Copyright (C) 2019 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
|
@ -1,72 +1,72 @@
|
||||
/* Copyright (C) 2019 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* 0 A.D. is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with 0 A.D. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "precompiled.h"
|
||||
|
||||
#include "Common/Tools.h"
|
||||
#include "Common/MiscState.h"
|
||||
#include "GameInterface/Messages.h"
|
||||
#include "ScenarioEditor/Sections/Environment/Environment.h"
|
||||
#include "ScenarioEditor/ScenarioEditor.h"
|
||||
|
||||
using AtlasMessage::Position;
|
||||
|
||||
class PickWaterHeight : public StateDrivenTool<PickWaterHeight>
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(PickWaterHeight);
|
||||
|
||||
// Uses a workaround to notify the environment settings directly, because
|
||||
// we don't have any way to update them on the engine state change.
|
||||
EnvironmentSidebar* m_Sidebar;
|
||||
|
||||
public:
|
||||
PickWaterHeight()
|
||||
: m_Sidebar(nullptr)
|
||||
{
|
||||
SetState(&Waiting);
|
||||
}
|
||||
|
||||
virtual void Init(void* initData, ScenarioEditor* scenarioEditor)
|
||||
{
|
||||
StateDrivenTool<PickWaterHeight>::Init(initData, scenarioEditor);
|
||||
|
||||
wxASSERT(initData);
|
||||
m_Sidebar = static_cast<EnvironmentSidebar*>(initData);
|
||||
}
|
||||
|
||||
void OnDisable()
|
||||
{
|
||||
if (m_Sidebar)
|
||||
m_Sidebar->UpdateEnvironmentSettings();
|
||||
}
|
||||
|
||||
struct sWaiting : public State
|
||||
{
|
||||
bool OnMouse(PickWaterHeight* WXUNUSED(obj), wxMouseEvent& evt)
|
||||
{
|
||||
if (evt.LeftDown())
|
||||
{
|
||||
POST_COMMAND(PickWaterHeight, (evt.GetPosition()));
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Waiting;
|
||||
};
|
||||
|
||||
IMPLEMENT_DYNAMIC_CLASS(PickWaterHeight, StateDrivenTool<PickWaterHeight>);
|
||||
/* Copyright (C) 2019 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* 0 A.D. is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with 0 A.D. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "precompiled.h"
|
||||
|
||||
#include "Common/Tools.h"
|
||||
#include "Common/MiscState.h"
|
||||
#include "GameInterface/Messages.h"
|
||||
#include "ScenarioEditor/Sections/Environment/Environment.h"
|
||||
#include "ScenarioEditor/ScenarioEditor.h"
|
||||
|
||||
using AtlasMessage::Position;
|
||||
|
||||
class PickWaterHeight : public StateDrivenTool<PickWaterHeight>
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(PickWaterHeight);
|
||||
|
||||
// Uses a workaround to notify the environment settings directly, because
|
||||
// we don't have any way to update them on the engine state change.
|
||||
EnvironmentSidebar* m_Sidebar;
|
||||
|
||||
public:
|
||||
PickWaterHeight()
|
||||
: m_Sidebar(nullptr)
|
||||
{
|
||||
SetState(&Waiting);
|
||||
}
|
||||
|
||||
virtual void Init(void* initData, ScenarioEditor* scenarioEditor)
|
||||
{
|
||||
StateDrivenTool<PickWaterHeight>::Init(initData, scenarioEditor);
|
||||
|
||||
wxASSERT(initData);
|
||||
m_Sidebar = static_cast<EnvironmentSidebar*>(initData);
|
||||
}
|
||||
|
||||
void OnDisable()
|
||||
{
|
||||
if (m_Sidebar)
|
||||
m_Sidebar->UpdateEnvironmentSettings();
|
||||
}
|
||||
|
||||
struct sWaiting : public State
|
||||
{
|
||||
bool OnMouse(PickWaterHeight* WXUNUSED(obj), wxMouseEvent& evt)
|
||||
{
|
||||
if (evt.LeftDown())
|
||||
{
|
||||
POST_COMMAND(PickWaterHeight, (evt.GetPosition()));
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Waiting;
|
||||
};
|
||||
|
||||
IMPLEMENT_DYNAMIC_CLASS(PickWaterHeight, StateDrivenTool<PickWaterHeight>);
|
||||
|
@ -1,29 +1,29 @@
|
||||
# Checkrefs.pl
|
||||
|
||||
## Description
|
||||
|
||||
This script checks the game files for missing dependencies, unused files, and for file integrity. If mods are specified, all their dependencies are also checked recursively. This script is particularly useful to detect broken actors or templates.
|
||||
|
||||
## Requirements
|
||||
|
||||
- Perl interpreter installed
|
||||
- Dependencies:
|
||||
- XML::Parser
|
||||
- XML::Simple
|
||||
- Getopt::Long
|
||||
- File::Find
|
||||
- Data::Dumper
|
||||
- JSON
|
||||
|
||||
## Usage
|
||||
|
||||
- cd in source/tools/entity and run the script.
|
||||
|
||||
```
|
||||
Usage: perl checkrefs.pl [OPTION]...
|
||||
Checks the game files for missing dependencies, unused files, and for file integrity.
|
||||
--check-unused check for all the unused files in the given mods and their dependencies. Implies --check-map-xml. Currently yields a lot of false positives.
|
||||
--check-map-xml check maps for missing actor and templates.
|
||||
--validate-templates run the validate.pl script to check if the xml files match their (.rng) grammar file. This currently only works for the public mod.
|
||||
--mod-to-check=mods specify which mods to check. 'mods' should be a list of mods separated by '|'. Default value: 'public|mod'.
|
||||
```
|
||||
# Checkrefs.pl
|
||||
|
||||
## Description
|
||||
|
||||
This script checks the game files for missing dependencies, unused files, and for file integrity. If mods are specified, all their dependencies are also checked recursively. This script is particularly useful to detect broken actors or templates.
|
||||
|
||||
## Requirements
|
||||
|
||||
- Perl interpreter installed
|
||||
- Dependencies:
|
||||
- XML::Parser
|
||||
- XML::Simple
|
||||
- Getopt::Long
|
||||
- File::Find
|
||||
- Data::Dumper
|
||||
- JSON
|
||||
|
||||
## Usage
|
||||
|
||||
- cd in source/tools/entity and run the script.
|
||||
|
||||
```
|
||||
Usage: perl checkrefs.pl [OPTION]...
|
||||
Checks the game files for missing dependencies, unused files, and for file integrity.
|
||||
--check-unused check for all the unused files in the given mods and their dependencies. Implies --check-map-xml. Currently yields a lot of false positives.
|
||||
--check-map-xml check maps for missing actor and templates.
|
||||
--validate-templates run the validate.pl script to check if the xml files match their (.rng) grammar file. This currently only works for the public mod.
|
||||
--mod-to-check=mods specify which mods to check. 'mods' should be a list of mods separated by '|'. Default value: 'public|mod'.
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user