From 5eb1217cb41a4967897636a0c1fd8109a5b334f2 Mon Sep 17 00:00:00 2001 From: Peter Veenstra Date: Wed, 26 Dec 2012 16:14:19 +0000 Subject: [PATCH] Move buffer to class for upcomming multiple floppy support (rcblanke). Remove heavy bios_disk dependency from drives.h Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3806 --- src/dos/dos_programs.cpp | 1 + src/dos/drive_fat.cpp | 4 +--- src/dos/drives.h | 7 +++++-- src/ints/bios_disk.cpp | 1 + src/shell/shell_cmds.cpp | 1 + 5 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/dos/dos_programs.cpp b/src/dos/dos_programs.cpp index 856825a5..632efac1 100644 --- a/src/dos/dos_programs.cpp +++ b/src/dos/dos_programs.cpp @@ -33,6 +33,7 @@ #include "dos_system.h" #include "dos_inc.h" #include "bios.h" +#include "bios_disk.h" #include "setup.h" #include "control.h" diff --git a/src/dos/drive_fat.cpp b/src/dos/drive_fat.cpp index 052d9769..44d23ada 100644 --- a/src/dos/drive_fat.cpp +++ b/src/dos/drive_fat.cpp @@ -27,6 +27,7 @@ #include "support.h" #include "cross.h" #include "bios.h" +#include "bios_disk.h" #define IMGTYPE_FLOPPY 0 #define IMGTYPE_ISO 1 @@ -36,9 +37,6 @@ #define FAT16 1 #define FAT32 2 -Bit8u fatSectBuffer[1024]; -Bit32u curFatSect; - class fatFile : public DOS_File { public: fatFile(const char* name, Bit32u startCluster, Bit32u fileLen, fatDrive *useDrive); diff --git a/src/dos/drives.h b/src/dos/drives.h index d3c47bdb..18ff21d0 100644 --- a/src/dos/drives.h +++ b/src/dos/drives.h @@ -24,7 +24,6 @@ #include #include "dos_system.h" #include "shell.h" /* for DOS_Shell */ -#include "bios_disk.h" /* for fatDrive */ bool WildFileCmp(const char * file, const char * wild); void Set_Label(char const * const input, char * const output, bool cdrom); @@ -142,7 +141,8 @@ struct partTable { #ifdef _MSC_VER #pragma pack () #endif - +//Forward +class imageDisk; class fatDrive : public DOS_Drive { public: fatDrive(const char * sysFilename, Bit32u bytesector, Bit32u cylsector, Bit32u headscyl, Bit32u cylinders, Bit32u startSector); @@ -207,6 +207,9 @@ private: Bit32u cwdDirCluster; Bit32u dirPosition; /* Position in directory search */ + + Bit8u fatSectBuffer[1024]; + Bit32u curFatSect; }; diff --git a/src/ints/bios_disk.cpp b/src/ints/bios_disk.cpp index 952987ed..f3d3e9ae 100644 --- a/src/ints/bios_disk.cpp +++ b/src/ints/bios_disk.cpp @@ -20,6 +20,7 @@ #include "dosbox.h" #include "callback.h" #include "bios.h" +#include "bios_disk.h" #include "regs.h" #include "mem.h" #include "dos_inc.h" /* for Drives[] */ diff --git a/src/shell/shell_cmds.cpp b/src/shell/shell_cmds.cpp index 222c090c..314cf25e 100644 --- a/src/shell/shell_cmds.cpp +++ b/src/shell/shell_cmds.cpp @@ -21,6 +21,7 @@ #include "shell.h" #include "callback.h" #include "regs.h" +#include "bios.h" #include "../dos/drives.h" #include "support.h" #include "control.h"