Refactor artLockFrameData with FrmImage
This commit is contained in:
parent
109dc6680c
commit
463968d798
|
@ -1141,13 +1141,11 @@ static void showHelp()
|
||||||
if (win != -1) {
|
if (win != -1) {
|
||||||
unsigned char* windowBuffer = windowGetBuffer(win);
|
unsigned char* windowBuffer = windowGetBuffer(win);
|
||||||
if (windowBuffer != NULL) {
|
if (windowBuffer != NULL) {
|
||||||
|
FrmImage backgroundFrmImage;
|
||||||
int backgroundFid = buildFid(OBJ_TYPE_INTERFACE, 297, 0, 0, 0);
|
int backgroundFid = buildFid(OBJ_TYPE_INTERFACE, 297, 0, 0, 0);
|
||||||
CacheEntry* backgroundHandle;
|
if (backgroundFrmImage.lock(backgroundFid)) {
|
||||||
unsigned char* backgroundData = artLockFrameData(backgroundFid, 0, 0, &backgroundHandle);
|
|
||||||
if (backgroundData != NULL) {
|
|
||||||
paletteSetEntries(gPaletteBlack);
|
paletteSetEntries(gPaletteBlack);
|
||||||
blitBufferToBuffer(backgroundData, HELP_SCREEN_WIDTH, HELP_SCREEN_HEIGHT, HELP_SCREEN_WIDTH, windowBuffer, HELP_SCREEN_WIDTH);
|
blitBufferToBuffer(backgroundFrmImage.getData(), HELP_SCREEN_WIDTH, HELP_SCREEN_HEIGHT, HELP_SCREEN_WIDTH, windowBuffer, HELP_SCREEN_WIDTH);
|
||||||
artUnlock(backgroundHandle);
|
|
||||||
windowUnhide(win);
|
windowUnhide(win);
|
||||||
colorPaletteLoad("art\\intrface\\helpscrn.pal");
|
colorPaletteLoad("art\\intrface\\helpscrn.pal");
|
||||||
paletteSetEntries(_cmap);
|
paletteSetEntries(_cmap);
|
||||||
|
|
Loading…
Reference in New Issue