diff options
Diffstat (limited to 'src/mmo/ids.cpp')
-rw-r--r-- | src/mmo/ids.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/mmo/ids.cpp b/src/mmo/ids.cpp index d40d5c3..65c470b 100644 --- a/src/mmo/ids.cpp +++ b/src/mmo/ids.cpp @@ -18,9 +18,25 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. +#include "../io/extract.hpp" + #include "../poison.hpp" namespace tmwa { +bool impl_extract(XString str, Species *w) +{ + // lots of data files use this + if (str == "-1"_s) + { + *w = NEGATIVE_SPECIES; + return true; + } + return extract(str, &w->_value); +} +bool impl_extract(XString str, GmLevel *lvl) +{ + return extract(str, &lvl->bits); +} } // namespace tmwa |