MVE: convert libmve files to C++

This commit is contained in:
Azamat H. Hackimov 2024-05-04 12:02:23 +03:00
parent ce74c43b44
commit a5b86bd0fb
6 changed files with 7 additions and 7 deletions

View File

@ -5,11 +5,11 @@ set(CPPS
platform.cpp platform.cpp
# d2x implementation # d2x implementation
decoder8.c decoder8.cpp
decoder16.c decoder16.cpp
mve_audio.c mve_audio.cpp
mvelib.c mvelib.cpp
mveplay.c mveplay.cpp
) )
add_library(libmve STATIC ${CPPS}) add_library(libmve STATIC ${CPPS})

View File

@ -493,7 +493,7 @@ static int display_video_handler(unsigned char major, unsigned char minor, unsig
if (g_destY == -1) // center it if (g_destY == -1) // center it
g_destY = (g_screenHeight - g_height) >> 1; g_destY = (g_screenHeight - g_height) >> 1;
mve_showframe(g_vBackBuf1, g_width, g_height, 0, 0, g_width, g_height, g_destX, g_destY); mve_showframe((unsigned char *)g_vBackBuf1, g_width, g_height, 0, 0, g_width, g_height, g_destX, g_destY);
g_frameUpdated = 1; g_frameUpdated = 1;
@ -563,7 +563,7 @@ static int video_data_handler(unsigned char major, unsigned char minor, unsigned
if (g_truecolor) { if (g_truecolor) {
decodeFrame16((unsigned char *)g_vBackBuf1, g_pCurMap, g_nMapLength, data + 14, len - 14); decodeFrame16((unsigned char *)g_vBackBuf1, g_pCurMap, g_nMapLength, data + 14, len - 14);
} else { } else {
decodeFrame8(g_vBackBuf1, g_pCurMap, g_nMapLength, data + 14, len - 14); decodeFrame8((unsigned char *)g_vBackBuf1, g_pCurMap, g_nMapLength, data + 14, len - 14);
} }
return 1; return 1;