mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-15 22:28:10 +00:00
TOON: fix types + remove unused import
This commit is contained in:
parent
a2a4278c0f
commit
e87e18052c
@ -122,17 +122,17 @@ void Movie::playVideo(bool isFirstIntroVideo) {
|
||||
int32 currentFrame = _decoder->getCurFrame();
|
||||
|
||||
// find unused color key to replace with subtitles color
|
||||
int len = frame->w * frame->h;
|
||||
const byte* pixels = (const byte *)frame->getPixels();
|
||||
byte counts[256];
|
||||
memset(counts, 0, sizeof(counts));
|
||||
for (int i = 0; i < len; i++) {
|
||||
counts[pixels[i]] = 1;
|
||||
uint len = frame->w * frame->h;
|
||||
const byte *pixels = (const byte *)frame->getPixels();
|
||||
bool counts[256];
|
||||
memset(counts, false, sizeof(counts));
|
||||
for (uint i = 0; i < len; i++) {
|
||||
counts[pixels[i]] = true;
|
||||
}
|
||||
|
||||
// 0 is already used for the border color and should not be used here, so it can be skipped over.
|
||||
for (int j = 1; j < 256; j++) {
|
||||
if (counts[j] == 0) {
|
||||
if (!counts[j]) {
|
||||
unused = j;
|
||||
break;
|
||||
}
|
||||
|
@ -53,7 +53,7 @@ void SubtitleRenderer::render(const Graphics::Surface &frame, uint32 frameNumber
|
||||
if (_index > _last) {
|
||||
return;
|
||||
}
|
||||
_currentLine = (char*)_fileData + _tw[_index].foffset;
|
||||
_currentLine = (char *)_fileData + _tw[_index].foffset;
|
||||
}
|
||||
|
||||
if (frameNumber < _tw[_index].fstart) {
|
||||
|
@ -3297,7 +3297,7 @@ void ToonEngine::drawConversationLine() {
|
||||
}
|
||||
}
|
||||
|
||||
void ToonEngine::drawCustomText(int16 x, int16 y, char *line, Graphics::Surface *frame, char color) {
|
||||
void ToonEngine::drawCustomText(int16 x, int16 y, char *line, Graphics::Surface *frame, byte color) {
|
||||
if (line) {
|
||||
byte col = color; // 0xce
|
||||
_fontRenderer->setFontColor(0, col, col);
|
||||
|
@ -33,7 +33,6 @@
|
||||
#include "toon/state.h"
|
||||
#include "toon/picture.h"
|
||||
#include "toon/anim.h"
|
||||
#include "toon/subtitles.h"
|
||||
#include "toon/movie.h"
|
||||
#include "toon/font.h"
|
||||
#include "toon/text.h"
|
||||
@ -212,7 +211,7 @@ public:
|
||||
void playRoomMusic();
|
||||
void waitForScriptStep();
|
||||
void doMagnifierEffect();
|
||||
void drawCustomText(int16 x, int16 y, char *line, Graphics::Surface *frame, char color);
|
||||
void drawCustomText(int16 x, int16 y, char *line, Graphics::Surface *frame, byte color);
|
||||
bool canSaveGameStateCurrently();
|
||||
bool canLoadGameStateCurrently();
|
||||
void pauseEngineIntern(bool pause);
|
||||
|
Loading…
Reference in New Issue
Block a user