mirror of
https://github.com/libretro/scummvm.git
synced 2025-03-06 02:10:28 +00:00
CGE: Remove unecessary void pointer usage in resource file I/O.
This commit is contained in:
parent
1e95a49892
commit
4e592c7249
@ -93,8 +93,8 @@ ResourceManager::~ResourceManager() {
|
||||
delete _buff[i]._page;
|
||||
}
|
||||
|
||||
uint16 ResourceManager::XCrypt(void *buf, uint16 length) {
|
||||
byte *b = static_cast<byte *>(buf);
|
||||
uint16 ResourceManager::XCrypt(byte *buf, uint16 length) {
|
||||
byte *b = buf;
|
||||
|
||||
for (uint16 i = 0; i < length; i++)
|
||||
*b++ ^= kCryptSeed;
|
||||
@ -106,7 +106,7 @@ bool ResourceManager::seek(int32 offs, int whence) {
|
||||
return _datFile->seek(offs, whence);
|
||||
}
|
||||
|
||||
uint16 ResourceManager::read(void *buf, uint16 length) {
|
||||
uint16 ResourceManager::read(byte *buf, uint16 length) {
|
||||
if (!_datFile->isOpen())
|
||||
return 0;
|
||||
|
||||
@ -178,7 +178,7 @@ bool ResourceManager::exist(const char *name) {
|
||||
return scumm_stricmp(find(name)->_key, name) == 0;
|
||||
}
|
||||
|
||||
uint16 ResourceManager::catRead(void *buf, uint16 length) {
|
||||
uint16 ResourceManager::catRead(byte *buf, uint16 length) {
|
||||
if (!_catFile->isOpen())
|
||||
return 0;
|
||||
|
||||
@ -225,7 +225,7 @@ EncryptedStream::EncryptedStream(CGEEngine *vm, const char *name) : _vm(vm) {
|
||||
_readStream = new Common::MemoryReadStream(dataBuffer, bufSize, DisposeAfterUse::YES);
|
||||
}
|
||||
|
||||
uint32 EncryptedStream::read(void *dataPtr, uint32 dataSize) {
|
||||
uint32 EncryptedStream::read(byte *dataPtr, uint32 dataSize) {
|
||||
return _readStream->read(dataPtr, dataSize);
|
||||
}
|
||||
|
||||
|
@ -83,15 +83,15 @@ class ResourceManager {
|
||||
} _buff[kBtLevel];
|
||||
|
||||
BtPage *getPage(int level, uint16 pageId);
|
||||
uint16 catRead(void *buf, uint16 length);
|
||||
uint16 catRead(byte *buf, uint16 length);
|
||||
Common::File *_catFile;
|
||||
Common::File *_datFile;
|
||||
uint16 XCrypt(void *buf, uint16 length);
|
||||
uint16 XCrypt(byte *buf, uint16 length);
|
||||
public:
|
||||
|
||||
ResourceManager();
|
||||
~ResourceManager();
|
||||
uint16 read(void *buf, uint16 length);
|
||||
uint16 read(byte *buf, uint16 length);
|
||||
bool seek(int32 offs, int whence = 0);
|
||||
|
||||
BtKeypack *find(const char *key);
|
||||
@ -111,7 +111,7 @@ public:
|
||||
bool seek(int32 offset);
|
||||
int32 pos();
|
||||
int32 size();
|
||||
uint32 read(void *dataPtr, uint32 dataSize);
|
||||
uint32 read(byte *dataPtr, uint32 dataSize);
|
||||
Common::String readLine();
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user