Merge commit 'a5d252f19bcacd7487ed82f6275b345f23605842' into fallout2-ce-main-pick-changes-from-alex-3

This commit is contained in:
Vasilii Rogin
2025-03-05 19:12:49 +02:00
+8 -74
View File
@@ -49,7 +49,7 @@ static int syncWaitLevel(int wait);
static void _CallsSndBuff_Loc(unsigned char* a1, int a2);
static int _MVE_sndAdd(unsigned char* dest, unsigned char** src_ptr, int a3, int a4, int a5);
static void _MVE_sndResume();
static int _nfConfig(int a1, int a2, int a3, int a4);
static int _nfConfig(int a1, int a2, int a3, int is_16_bpp);
static bool movieLockSurfaces();
static void movieUnlockSurfaces();
static void movieSwapSurfaces();
@@ -404,9 +404,6 @@ static int dword_6B401F;
// 0x6B4023
static int dword_6B4023;
// 0x6B4027
static int dword_6B4027;
// 0x6B402B
static int dword_6B402B;
@@ -747,9 +744,6 @@ LABEL_5:
}
v11 = 4 * _mveBW / dword_51EBDC & 0xFFFFFFF0;
if (dword_6B4027) {
v11 >>= 1;
}
v12 = rm_dx;
if (v12 < 0) {
@@ -771,11 +765,6 @@ LABEL_5:
break;
}
if (dword_6B4027) {
v6 = -6;
break;
}
continue;
case 7:
++rm_FrameCount;
@@ -852,27 +841,6 @@ LABEL_5:
movieSwapSurfaces();
}
if (dword_6B4027) {
if (dword_51EBD8) {
v6 = -8;
break;
}
// lock
if (!movieLockSurfaces()) {
v6 = -12;
break;
}
// TODO: Incomplete.
assert(false);
// _nfHPkDecomp(v3, v1[7], v1[2], v1[3], v1[4], v1[5]);
// unlock
movieUnlockSurfaces();
continue;
}
if ((dword_51EBD8 & 3) == 1) {
// lock
if (!movieLockSurfaces()) {
@@ -1299,7 +1267,7 @@ static void _MVE_sndResume()
}
// 0x4F5CB0
static int _nfConfig(int a1, int a2, int a3, int a4)
static int _nfConfig(int a1, int a2, int a3, int is_16_bpp)
{
if (gMovieSdlSurface1 != nullptr) {
SDL_FreeSurface(gMovieSdlSurface1);
@@ -1319,38 +1287,16 @@ static int _nfConfig(int a1, int a2, int a3, int a4)
_mveBH >>= 1;
}
int depth;
int rmask;
int gmask;
int bmask;
if (a4) {
depth = 16;
rmask = 0x7C00;
gmask = 0x3E0;
bmask = 0x1F;
} else {
depth = 8;
rmask = 0;
gmask = 0;
bmask = 0;
}
gMovieSdlSurface1 = SDL_CreateRGBSurface(0, _mveBW, _mveBH, depth, rmask, gmask, bmask, 0);
gMovieSdlSurface1 = SDL_CreateRGBSurface(0, _mveBW, _mveBH, 8, 0, 0, 0, 0);
if (gMovieSdlSurface1 == nullptr) {
return 0;
}
gMovieSdlSurface2 = SDL_CreateRGBSurface(0, _mveBW, _mveBH, depth, rmask, gmask, bmask, 0);
gMovieSdlSurface2 = SDL_CreateRGBSurface(0, _mveBW, _mveBH, 8, 0, 0, 0, 0);
if (gMovieSdlSurface2 == nullptr) {
return 0;
}
dword_6B4027 = a4;
if (a4) {
_mveBW *= 2;
}
dword_6B3D00 = 8 * a3 * _mveBW;
dword_6B3CEC = 7 * a3 * _mveBW;
@@ -1409,15 +1355,7 @@ static void _sfShowFrame(int a1, int a2, int a3)
v3 = a1;
if (a1 < 0) {
if (dword_6B4027) {
v3 = (sf_ScreenWidth - (v4 >> 1)) >> 1;
} else {
v3 = (sf_ScreenWidth - v4) >> 1;
}
}
if (dword_6B4027) {
v3 *= 2;
v3 = (sf_ScreenWidth - v4) >> 1;
}
v5 = a2;
@@ -1455,9 +1393,7 @@ static void _do_nothing_(int a1, int a2, unsigned short* a3)
// 0x4F6090
static void palSetPalette(int start, int count)
{
if (!dword_6B4027) {
pal_SetPalette(pal_tbl, start, count);
}
pal_SetPalette(pal_tbl, start, count);
}
// 0x4F60C0
@@ -1465,10 +1401,8 @@ static void palClrPalette(int start, int count)
{
unsigned char palette[768];
if (!dword_6B4027) {
memset(palette, 0, sizeof(palette));
pal_SetPalette(palette, start, count);
}
memset(palette, 0, sizeof(palette));
pal_SetPalette(palette, start, count);
}
// 0x4F60F0