diff options
author | Ben Longbons <b.r.longbons@gmail.com> | 2013-11-15 17:51:29 -0800 |
---|---|---|
committer | Ben Longbons <b.r.longbons@gmail.com> | 2013-11-15 17:51:29 -0800 |
commit | f906959a09d58c85d87b445fd1791d91bf278bfa (patch) | |
tree | b65282b2c731d4eb2157ae719828cddf6b086943 /src/map/battle.cpp | |
parent | 1fb7ce5a604db78c4d02f719053827269705ce13 (diff) | |
download | tmwa-f906959a09d58c85d87b445fd1791d91bf278bfa.tar.gz tmwa-f906959a09d58c85d87b445fd1791d91bf278bfa.tar.bz2 tmwa-f906959a09d58c85d87b445fd1791d91bf278bfa.tar.xz tmwa-f906959a09d58c85d87b445fd1791d91bf278bfa.zip |
Use new IO classes
Diffstat (limited to 'src/map/battle.cpp')
-rw-r--r-- | src/map/battle.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/map/battle.cpp b/src/map/battle.cpp index c95ad61..457c37a 100644 --- a/src/map/battle.cpp +++ b/src/map/battle.cpp @@ -2,13 +2,12 @@ #include <cstring> -#include <fstream> - #include "../strings/fstring.hpp" #include "../strings/zstring.hpp" +#include "../io/read.hpp" + #include "../common/cxxstdio.hpp" -#include "../common/io.hpp" #include "../common/nullpo.hpp" #include "../common/random.hpp" @@ -2405,7 +2404,7 @@ int battle_config_read(ZString cfgName) battle_config.mob_splash_radius = -1; } - std::ifstream in(cfgName.c_str()); + io::ReadFile in(cfgName); if (!in.is_open()) { PRINTF("file not found: %s\n", cfgName); @@ -2413,7 +2412,7 @@ int battle_config_read(ZString cfgName) } FString line; - while (io::getline(in, line)) + while (in.getline(line)) { #define BATTLE_CONFIG_VAR(name) {{#name}, &battle_config.name} const struct |