diff options
author | Max Horn | 2003-09-13 18:06:19 +0000 |
---|---|---|
committer | Max Horn | 2003-09-13 18:06:19 +0000 |
commit | 42bf2a855caf986b26c2ad572ae857c25d0296d3 (patch) | |
tree | 99edc034c7d212fc0d5ee1a6c25d9425288f742d /sword2 | |
parent | 54a6946eee0e8789bf3b9d66b81378119c4852d3 (diff) | |
download | scummvm-rg350-42bf2a855caf986b26c2ad572ae857c25d0296d3.tar.gz scummvm-rg350-42bf2a855caf986b26c2ad572ae857c25d0296d3.tar.bz2 scummvm-rg350-42bf2a855caf986b26c2ad572ae857c25d0296d3.zip |
cleanup
svn-id: r10236
Diffstat (limited to 'sword2')
-rw-r--r-- | sword2/driver/driver96.h | 32 | ||||
-rw-r--r-- | sword2/driver/misc.cpp | 9 | ||||
-rw-r--r-- | sword2/memory.cpp | 37 |
3 files changed, 11 insertions, 67 deletions
diff --git a/sword2/driver/driver96.h b/sword2/driver/driver96.h index 2479142d2f..a669968f42 100644 --- a/sword2/driver/driver96.h +++ b/sword2/driver/driver96.h @@ -1231,15 +1231,15 @@ typedef int BOOL; // --------------------- // -#if !defined(__GNUC__) - #pragma START_PACK_STRUCTS -#endif - typedef struct { uint16 buttons; } _mouseEvent; +#if !defined(__GNUC__) + #pragma START_PACK_STRUCTS +#endif + typedef struct { uint16 w; @@ -1247,6 +1247,11 @@ typedef struct uint32 offset[2]; // 2 is arbitrary } GCC_PACK _parallax; +#if !defined(__GNUC__) + #pragma END_PACK_STRUCTS +#endif + + // The _spriteInfo structure is used to tell the driver96 code what attributes // are linked to a sprite for drawing. These include position, scaling and // compression. @@ -1359,23 +1364,6 @@ typedef struct } _drvKeyStatus; -// should probably remove this struct as it just replaces a windows struct... -typedef struct { - uint32 dwLength; - uint32 dwMemoryLoad; - uint32 dwTotalPhys; - uint32 dwAvailPhys; - uint32 dwTotalPageFile; - uint32 dwAvailPageFile; - uint32 dwTotalVirtual; - uint32 dwAvailVirtual; -} GCC_PACK SVM_MEMORYSTATUS; - -#if !defined(__GNUC__) - #pragma END_PACK_STRUCTS -#endif - - // // Function Prototypes // ------------------- @@ -1496,8 +1484,6 @@ extern int32 CloseMenuImmediately(void); // Misc functions - from misc.cpp //----------------------------------------------------------------------------- extern uint32 SVM_timeGetTime(void); -extern void SVM_VirtualUnlock(uint8 *free_memman, uint32 total_free_memory); -extern void SVM_GlobalMemoryStatus(SVM_MEMORYSTATUS *memo); extern void SVM_SetFileAttributes(char *file, uint32 atrib); extern void SVM_DeleteFile(char *file); extern void SVM_GetCurrentDirectory(uint32 max, char* path); diff --git a/sword2/driver/misc.cpp b/sword2/driver/misc.cpp index ab7232aaf3..574b8877f8 100644 --- a/sword2/driver/misc.cpp +++ b/sword2/driver/misc.cpp @@ -25,15 +25,6 @@ uint32 SVM_timeGetTime(void) { return g_system->get_msecs(); } -void SVM_VirtualUnlock(uint8 *free_memman, uint32 total_free_memory) { - warning("stub VirtualUnlock"); -} - -void SVM_GlobalMemoryStatus(SVM_MEMORYSTATUS *memo) { - warning("stub GlobalMemoryStatus"); - memo->dwTotalPhys = 16000*1024; // hard code 16mb for now -} - void SVM_SetFileAttributes(char *file, uint32 atrib) { warning("stub SetFileAttributes"); } diff --git a/sword2/memory.cpp b/sword2/memory.cpp index 08f1358b7b..8ae7c77989 100644 --- a/sword2/memory.cpp +++ b/sword2/memory.cpp @@ -57,10 +57,6 @@ int32 suggestedStart = 0; // Start position of the Defragger as indicated by i //------------------------------------------------------------------------------------ void Close_memory_manager(void) //Tony2Oct96 { - -//unlock our supposedly locked in memory - SVM_VirtualUnlock(free_memman, total_free_memory); - free(free_memman); } //------------------------------------------------------------------------------------ @@ -68,33 +64,11 @@ void Init_memory_manager(void) //Tony9April96 { uint32 j; uint8 *memory_base; - //BOOL res; - SVM_MEMORYSTATUS memo; - -//find out how much actual physical RAM this computer has - SVM_GlobalMemoryStatus(&memo); - -//now decide how much to grab - 8MB computer are super critical - if (memo.dwTotalPhys<=(8000*1024)) //if 8MB or less :-O - total_free_memory=4500*1024; //4.5MB - - else if (memo.dwTotalPhys<=(12000*1024)) //if 8MB or less :-O - total_free_memory=8000*1024; //8MB - - else if (memo.dwTotalPhys<=(16000*1024)) //if 16MB or less :-) - total_free_memory=10000*1024; //10MB - - else //:-)) loads of RAM - total_free_memory=12000*1024; //12MB + total_free_memory=12000*1024; //12MB - Zdebug("MEM = %d", memo.dwTotalPhys); - Zdebug("Sword 2 grabbed %dk", total_free_memory/1024); - - - -//malloc memory and adjust for long boundaries + //malloc memory and adjust for long boundaries memory_base = (uint8 *) malloc(total_free_memory); if (!memory_base) //could not grab the memory @@ -128,13 +102,6 @@ void Init_memory_manager(void) //Tony9April96 mem_list[0].uid=UID_memman; //init id base_mem_block=0; //for now - - -//supposedly this will stop the memory swapping out?? Well, as much as we're allowed -// res=VirtualLock(free_memman, total_free_memory); - -// if (res!=TRUE) -// Zdebug(" *VirtualLock failed"); } //------------------------------------------------------------------------------------ mem *Talloc(uint32 size, uint32 type, uint32 unique_id) //Tony10Apr96 |