From f906959a09d58c85d87b445fd1791d91bf278bfa Mon Sep 17 00:00:00 2001 From: Ben Longbons Date: Fri, 15 Nov 2013 17:51:29 -0800 Subject: Use new IO classes --- src/map/mob.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/map/mob.cpp') diff --git a/src/map/mob.cpp b/src/map/mob.cpp index 1885fbd..34374a7 100644 --- a/src/map/mob.cpp +++ b/src/map/mob.cpp @@ -7,14 +7,14 @@ #include #include -#include #include "../strings/fstring.hpp" #include "../strings/xstring.hpp" +#include "../io/read.hpp" + #include "../common/cxxstdio.hpp" #include "../common/extract.hpp" -#include "../common/io.hpp" #include "../common/nullpo.hpp" #include "../common/random.hpp" #include "../common/socket.hpp" @@ -3415,19 +3415,19 @@ bool extract(XString str, LevelElement *le) static int mob_readdb(void) { - const char *filename = "db/mob_db.txt"; + ZString filename = "db/mob_db.txt"; for (mob_db_& e : mob_db) e = mob_db_{}; { - std::ifstream in(filename); + io::ReadFile in(filename); if (!in.is_open()) { return -1; } FString line; - while (io::getline(in, line)) + while (in.getline(line)) { int mob_class; @@ -3632,17 +3632,17 @@ bool extract(XString str, MobSkillTarget *mst) static int mob_readskilldb(void) { - const char *filename = "db/mob_skill_db.txt"; + ZString filename = "db/mob_skill_db.txt"; { - std::ifstream in(filename); + io::ReadFile in(filename); if (!in.is_open()) { PRINTF("can't read %s\n", filename); return 0; } FString line; - while (io::getline(in, line)) + while (in.getline(line)) { int mob_id; -- cgit v1.2.3-70-g09d2