mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-31 16:03:24 +00:00
MADE: Cleanup
This commit is contained in:
parent
62142e5add
commit
298ea1a76e
@ -40,6 +40,7 @@ namespace Made {
|
||||
*/
|
||||
|
||||
Object::Object() : _objData(NULL), _freeData(false) {
|
||||
_objSize = 0;
|
||||
}
|
||||
|
||||
Object::~Object() {
|
||||
|
@ -223,7 +223,10 @@ bool PmvPlayer::play(const char *filename) {
|
||||
|
||||
//delete _audioStream;
|
||||
delete _fd;
|
||||
_surface->free();
|
||||
|
||||
if(_surface)
|
||||
_surface->free();
|
||||
|
||||
delete _surface;
|
||||
|
||||
return !_aborted;
|
||||
|
@ -102,7 +102,7 @@ int LzhDecompressor::decompress(Common::SeekableReadStream &source, byte *dest,
|
||||
int bufsize;
|
||||
byte* buffer;
|
||||
|
||||
buffer = (byte *) malloc(DICSIZ);
|
||||
buffer = (byte *)calloc(DICSIZ, 1);
|
||||
|
||||
_source = &source;
|
||||
_compSize = sourceLen;
|
||||
|
@ -43,6 +43,7 @@ Resource::~Resource() {
|
||||
|
||||
PictureResource::PictureResource() : _picture(NULL), _picturePalette(NULL) {
|
||||
_hasPalette = false;
|
||||
_paletteColorCount = 0;
|
||||
}
|
||||
|
||||
PictureResource::~PictureResource() {
|
||||
@ -182,6 +183,9 @@ void PictureResource::loadChunked(byte *source, int size) {
|
||||
/* AnimationResource */
|
||||
|
||||
AnimationResource::AnimationResource() {
|
||||
_flags = 0;
|
||||
_width = 0;
|
||||
_height = 0;
|
||||
}
|
||||
|
||||
AnimationResource::~AnimationResource() {
|
||||
|
@ -91,6 +91,8 @@ Screen::Screen(MadeEngine *vm) : _vm(vm) {
|
||||
_currentFontNum = 0;
|
||||
_fontDrawCtx.clipRect = Common::Rect(320, 200);
|
||||
_fontDrawCtx.destSurface = _backgroundScreen;
|
||||
_outlineColor = 0;
|
||||
_dropShadowColor = 0;
|
||||
|
||||
clearChannels();
|
||||
}
|
||||
|
@ -248,6 +248,9 @@ void decompressSound(byte *source, byte *dest, uint16 chunkSize, uint16 chunkCou
|
||||
// soundBuffer.
|
||||
soundBuffer[workChunkSize] = soundBuffer[workChunkSize - 1];
|
||||
|
||||
for (i = 0; i < chunkSize; i++)
|
||||
soundBuffer[i] = 0;
|
||||
|
||||
if (deltaType == 1) {
|
||||
for (i = 0; i < chunkSize - 1; i += 2) {
|
||||
l = i / 2;
|
||||
|
Loading…
x
Reference in New Issue
Block a user