mirror of
https://github.com/libretro/scummvm.git
synced 2025-03-05 09:49:14 +00:00
LAB: Remove some unnecessary casts
This commit is contained in:
parent
662649319b
commit
a49ffcd87b
@ -379,10 +379,10 @@ void DisplayMan::rectFill(Common::Rect fillRect, byte color) {
|
|||||||
height = _screenHeight - fillRect.top;
|
height = _screenHeight - fillRect.top;
|
||||||
|
|
||||||
if ((width > 0) && (height > 0)) {
|
if ((width > 0) && (height > 0)) {
|
||||||
char *d = (char *)getCurrentDrawingBuffer() + fillRect.top * _screenWidth + fillRect.left;
|
byte *d = getCurrentDrawingBuffer() + fillRect.top * _screenWidth + fillRect.left;
|
||||||
|
|
||||||
while (height-- > 0) {
|
while (height-- > 0) {
|
||||||
char *dd = d;
|
byte *dd = d;
|
||||||
int ww = width;
|
int ww = width;
|
||||||
|
|
||||||
while (ww-- > 0) {
|
while (ww-- > 0) {
|
||||||
|
@ -83,10 +83,10 @@ void Intro::doPictText(const Common::String filename, bool isScreen) {
|
|||||||
bool begin = true;
|
bool begin = true;
|
||||||
|
|
||||||
Common::File *textFile = _vm->_resource->openDataFile(path);
|
Common::File *textFile = _vm->_resource->openDataFile(path);
|
||||||
byte *textBuffer = new byte[textFile->size()];
|
char *textBuffer = new char[textFile->size()];
|
||||||
textFile->read(textBuffer, textFile->size());
|
textFile->read(textBuffer, textFile->size());
|
||||||
delete textFile;
|
delete textFile;
|
||||||
byte *curText = textBuffer;
|
const char *curText = textBuffer;
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
if (drawNextText) {
|
if (drawNextText) {
|
||||||
@ -98,10 +98,10 @@ void Intro::doPictText(const Common::String filename, bool isScreen) {
|
|||||||
if (isScreen) {
|
if (isScreen) {
|
||||||
_vm->_graphics->rectFillScaled(10, 10, 310, 190, 7);
|
_vm->_graphics->rectFillScaled(10, 10, 310, 190, 7);
|
||||||
|
|
||||||
curText += _vm->_graphics->flowText(_font, _vm->_isHiRes ? 0 : -1, 5, 7, false, false, true, true, _vm->_utils->vgaRectScale(14, 11, 306, 189), (char *)curText);
|
curText += _vm->_graphics->flowText(_font, _vm->_isHiRes ? 0 : -1, 5, 7, false, false, true, true, _vm->_utils->vgaRectScale(14, 11, 306, 189), curText);
|
||||||
_vm->_graphics->fade(true);
|
_vm->_graphics->fade(true);
|
||||||
} else
|
} else
|
||||||
curText += _vm->_graphics->longDrawMessage(Common::String((char *)curText), false);
|
curText += _vm->_graphics->longDrawMessage(Common::String(curText), false);
|
||||||
|
|
||||||
doneFl = (*curText == 0);
|
doneFl = (*curText == 0);
|
||||||
|
|
||||||
|
@ -104,7 +104,7 @@ void Music::playSoundEffect(uint16 sampleSpeed, uint32 length, bool loop, Common
|
|||||||
byte *soundData = (byte *)malloc(length);
|
byte *soundData = (byte *)malloc(length);
|
||||||
dataFile->read(soundData, length);
|
dataFile->read(soundData, length);
|
||||||
|
|
||||||
Audio::SeekableAudioStream *audioStream = Audio::makeRawStream((const byte *)soundData, length, sampleSpeed, getSoundFlags());
|
Audio::SeekableAudioStream *audioStream = Audio::makeRawStream(soundData, length, sampleSpeed, getSoundFlags());
|
||||||
uint loops = (loop) ? 0 : 1;
|
uint loops = (loop) ? 0 : 1;
|
||||||
Audio::LoopingAudioStream *loopingAudioStream = new Audio::LoopingAudioStream(audioStream, loops);
|
Audio::LoopingAudioStream *loopingAudioStream = new Audio::LoopingAudioStream(audioStream, loops);
|
||||||
_vm->_mixer->playStream(Audio::Mixer::kSFXSoundType, &_sfxHandle, loopingAudioStream);
|
_vm->_mixer->playStream(Audio::Mixer::kSFXSoundType, &_sfxHandle, loopingAudioStream);
|
||||||
@ -130,7 +130,7 @@ byte *Music::fillBuffer() {
|
|||||||
} else {
|
} else {
|
||||||
_file->read(musicBuffer, _leftInFile);
|
_file->read(musicBuffer, _leftInFile);
|
||||||
|
|
||||||
memset((char *)musicBuffer + _leftInFile, 0, MUSICBUFSIZE - _leftInFile);
|
memset(musicBuffer + _leftInFile, 0, MUSICBUFSIZE - _leftInFile);
|
||||||
|
|
||||||
_file->seek(0);
|
_file->seek(0);
|
||||||
_leftInFile = _file->size();
|
_leftInFile = _file->size();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user