Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #287 from fmatthew5876/constant
Add support for generated constants in RPG:: classes
- Loading branch information
Showing
12 changed files
with
79 additions
and
11 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#Structure,name,type,value,comment | ||
State,kDeathID,int,1,The ID of the special death state | ||
SavePartyLocation,kPanXDefault,int,9 * 256,Equal to 9 tiles in 1/16th pixels | ||
SavePartyLocation,kPanYDefault,int,7 * 256,Equal to 7 tiles in 1/16th pixels |
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 |
---|---|---|
@@ -1,10 +1,16 @@ | ||
{% include "copyright.tmpl" %} | ||
// Headers | ||
#include "rpg_{{ filename }}.h" | ||
|
||
{% if struct_name in constants -%} | ||
{%- for name, type, value, comment in constants[struct_name] %} | ||
constexpr {{ type }} RPG::{{ struct_name }}::{{ name }}; | ||
{%- endfor %} | ||
{%- endif %} | ||
{% if struct_name is needs_ctor -%} | ||
/** | ||
* Constructor. | ||
*/ | ||
RPG::{{ struct_name }}::{{ struct_name }}() { | ||
Init(); | ||
} | ||
{%- endif %} |
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,17 @@ | ||
/* !!!! GENERATED FILE - DO NOT EDIT !!!! | ||
* -------------------------------------- | ||
* | ||
* This file is part of liblcf. Copyright (c) 2018 liblcf authors. | ||
* https://github.com/EasyRPG/liblcf - https://easyrpg.org | ||
* | ||
* liblcf is Free/Libre Open Source Software, released under the MIT License. | ||
* For the full copyright and license information, please view the COPYING | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
// Headers | ||
#include "rpg_savepartylocation.h" | ||
|
||
constexpr int RPG::SavePartyLocation::kPanXDefault; | ||
constexpr int RPG::SavePartyLocation::kPanYDefault; | ||
|
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,16 @@ | ||
/* !!!! GENERATED FILE - DO NOT EDIT !!!! | ||
* -------------------------------------- | ||
* | ||
* This file is part of liblcf. Copyright (c) 2018 liblcf authors. | ||
* https://github.com/EasyRPG/liblcf - https://easyrpg.org | ||
* | ||
* liblcf is Free/Libre Open Source Software, released under the MIT License. | ||
* For the full copyright and license information, please view the COPYING | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
// Headers | ||
#include "rpg_state.h" | ||
|
||
constexpr int RPG::State::kDeathID; | ||
|
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