From a5b86bd0fbbfd59f3c00c4df1d521ca362790b9b Mon Sep 17 00:00:00 2001 From: "Azamat H. Hackimov" Date: Sat, 4 May 2024 12:02:23 +0300 Subject: [PATCH] MVE: convert libmve files to C++ --- libmve/CMakeLists.txt | 10 +++++----- libmve/{decoder16.c => decoder16.cpp} | 0 libmve/{decoder8.c => decoder8.cpp} | 0 libmve/{mve_audio.c => mve_audio.cpp} | 0 libmve/{mvelib.c => mvelib.cpp} | 0 libmve/{mveplay.c => mveplay.cpp} | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) rename libmve/{decoder16.c => decoder16.cpp} (100%) rename libmve/{decoder8.c => decoder8.cpp} (100%) rename libmve/{mve_audio.c => mve_audio.cpp} (100%) rename libmve/{mvelib.c => mvelib.cpp} (100%) rename libmve/{mveplay.c => mveplay.cpp} (98%) diff --git a/libmve/CMakeLists.txt b/libmve/CMakeLists.txt index 178cf79c..c8891be2 100644 --- a/libmve/CMakeLists.txt +++ b/libmve/CMakeLists.txt @@ -5,11 +5,11 @@ set(CPPS platform.cpp # d2x implementation - decoder8.c - decoder16.c - mve_audio.c - mvelib.c - mveplay.c + decoder8.cpp + decoder16.cpp + mve_audio.cpp + mvelib.cpp + mveplay.cpp ) add_library(libmve STATIC ${CPPS}) diff --git a/libmve/decoder16.c b/libmve/decoder16.cpp similarity index 100% rename from libmve/decoder16.c rename to libmve/decoder16.cpp diff --git a/libmve/decoder8.c b/libmve/decoder8.cpp similarity index 100% rename from libmve/decoder8.c rename to libmve/decoder8.cpp diff --git a/libmve/mve_audio.c b/libmve/mve_audio.cpp similarity index 100% rename from libmve/mve_audio.c rename to libmve/mve_audio.cpp diff --git a/libmve/mvelib.c b/libmve/mvelib.cpp similarity index 100% rename from libmve/mvelib.c rename to libmve/mvelib.cpp diff --git a/libmve/mveplay.c b/libmve/mveplay.cpp similarity index 98% rename from libmve/mveplay.c rename to libmve/mveplay.cpp index 9a533d86..220fdcb7 100644 --- a/libmve/mveplay.c +++ b/libmve/mveplay.cpp @@ -493,7 +493,7 @@ static int display_video_handler(unsigned char major, unsigned char minor, unsig if (g_destY == -1) // center it 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; @@ -563,7 +563,7 @@ static int video_data_handler(unsigned char major, unsigned char minor, unsigned if (g_truecolor) { decodeFrame16((unsigned char *)g_vBackBuf1, g_pCurMap, g_nMapLength, data + 14, len - 14); } 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;