ASYLUM: add const qualifier to silence a warning

This commit is contained in:
alxpnv 2021-04-27 15:00:10 +03:00 committed by Eugene Sandulenko
parent b905953e5f
commit 7c53e7560d
No known key found for this signature in database
GPG Key ID: 014D387312D34F08
3 changed files with 3 additions and 3 deletions

View File

@ -1189,7 +1189,7 @@ void Screen::bltFast(int16 dX, int16 dY, GraphicFrame* frame, Common::Rect *sour
}
}
void Screen::copyToBackBuffer(byte *buffer, int32 pitch, int16 x, int16 y, uint16 width, uint16 height, bool mirrored) {
void Screen::copyToBackBuffer(const byte *buffer, int32 pitch, int16 x, int16 y, uint16 width, uint16 height, bool mirrored) {
byte *dest = (byte *)_backBuffer.getPixels();
if (!mirrored) {

View File

@ -124,7 +124,7 @@ public:
void deleteGraphicFromQueue(ResourceId resourceId);
// Used by Video
void copyToBackBuffer(byte *buffer, int32 pitch, int16 x, int16 y, uint16 width, uint16 height, bool mirrored = false);
void copyToBackBuffer(const byte *buffer, int32 pitch, int16 x, int16 y, uint16 width, uint16 height, bool mirrored = false);
// Debug
void drawLine(const Common::Point &origin, const Common::Point &destination, uint32 color = 0xFF);

View File

@ -166,7 +166,7 @@ void VideoPlayer::play(Common::String filename, bool showSubtitles) {
if (_smkDecoder->hasDirtyPalette())
setupPalette();
getScreen()->copyToBackBuffer((byte *)frame->getPixels(), frame->pitch, x, y, frame->w, frame->h);
getScreen()->copyToBackBuffer((const byte *)frame->getPixels(), frame->pitch, x, y, frame->w, frame->h);
if (showSubtitles) {
int32 currentFrame = _smkDecoder->getCurFrame() + 1;