1 /* ScummVM - Graphic Adventure Engine 2 * 3 * ScummVM is the legal property of its developers, whose names 4 * are too numerous to list here. Please refer to the COPYRIGHT 5 * file distributed with this source distribution. 6 * 7 * This program is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU General Public License 9 * as published by the Free Software Foundation; either version 2 10 * of the License, or (at your option) any later version. 11 * 12 * This program is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with this program; if not, write to the Free Software 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 20 * 21 */ 22 23 #ifndef AGS_ENGINE_AC_GLOBALFILE_H 24 #define AGS_ENGINE_AC_GLOBALFILE_H 25 26 #include "ags/shared/util/file.h" 27 28 namespace AGS3 { 29 30 namespace AGS { 31 namespace Shared { 32 class Stream; 33 } // namespace Shared 34 } // namespace AGS 35 36 using namespace AGS; // FIXME later 37 38 int32_t FileOpen(const char *fnmm, Shared::FileOpenMode open_mode, Shared::FileWorkMode work_mode); 39 // NOTE: FileOpenCMode is a backwards-compatible replacement for old-style global script function FileOpen 40 int32_t FileOpenCMode(const char *fnmm, const char *cmode); 41 void FileClose(int32_t handle); 42 void FileWrite(int32_t handle, const char *towrite); 43 void FileWriteRawLine(int32_t handle, const char *towrite); 44 void FileRead(int32_t handle, char *toread); 45 int FileIsEOF(int32_t handle); 46 int FileIsError(int32_t handle); 47 void FileWriteInt(int32_t handle, int into); 48 int FileReadInt(int32_t handle); 49 int8 FileReadRawChar(int32_t handle); 50 int FileReadRawInt(int32_t handle); 51 void FileWriteRawChar(int32_t handle, int chartoWrite); 52 53 } // namespace AGS3 54 55 #endif 56