-
Notifications
You must be signed in to change notification settings - Fork 178
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
AngelScript: added API for placing icons on surveymap
New funcs in TerrainClass (the demo_script.as was updated to showcase it): ``` /** * Adds an icon with description to survey map (minimap). * @param type informational, optional * @param filename The file name. Don't forget to specify the resource group! * @param resource_group Leave empty to use TexturesRG ('icons.zip/famicons.zip'), otherwise use `BeamClass/TerrainClass getResourceGroup()` to read from actor/terrain ZIP. * @param caption optional * @param pos The world position of the point of interest, in meters. * @param angle The world yaw in radians. * @param id The race ID of the icon (>=0), or -1 if not a race icon. You can use larger negative numbers for custom IDs. */ void addSurveyMapEntity(const std::string& type, const std::string& filename, const std::string& resource_group, const std::string& caption, const Ogre::Vector3& pos, float angle, int id); /** * Removes all survey map icons with the given ID. * @param id The race ID of the icon (>=0), or -1 if not a race icon. You can use larger negative numbers for custom IDs. */ void delSurveyMapEntities(int id); ``` Internal changes: * new file 'SurveyMapEntity.h' - moved out from TerrainObjectManager * map icon filename is no longer constructed from 'type', instead specified fuly in SurveyMapEntity * added optional resource group string to SurveyMapEntity
- Loading branch information
Showing
10 changed files
with
147 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/* | ||
This source file is part of Rigs of Rods | ||
Copyright 2005-2012 Pierre-Michel Ricordel | ||
Copyright 2007-2012 Thomas Fischer | ||
Copyright 2013-2023 Petr Ohlidal | ||
For more information, see http://www.rigsofrods.org/ | ||
Rigs of Rods is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License version 3, as | ||
published by the Free Software Foundation. | ||
Rigs of Rods 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 Rigs of Rods. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
/// @file | ||
|
||
#pragma once | ||
|
||
#include <Ogre.h> | ||
#include <string> | ||
#include <vector> | ||
|
||
namespace RoR { | ||
|
||
/// @addtogroup Terrain | ||
/// @{ | ||
|
||
struct SurveyMapEntity | ||
{ | ||
std::string type; //!< informational | ||
std::string caption; //!< display caption | ||
std::string filename; | ||
std::string resource_group; //!< if empty, defaults to TexturesRG | ||
Ogre::Vector3 pos; //!< world pos in meters | ||
float rot; //!< world yaw in radians | ||
int id; //!< race ID (>=0), or -1 if not a race icon. You can use larger negative numbers for custom IDs. | ||
}; | ||
|
||
typedef std::vector<SurveyMapEntity> SurveyMapEntityVec; | ||
|
||
/// @} // addtogroup Terrain | ||
|
||
} // namespace RoR |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters