Merge branch 'main' into sfall-menuoffset

This commit is contained in:
Wipe 2022-06-10 08:41:09 +02:00 committed by GitHub
commit 015bdac295
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 26 additions and 26 deletions

View File

@ -1454,7 +1454,7 @@ int _pick_fall(Object* obj, int anim)
}
}
} else if (anim == ANIM_FALL_BACK) {
rotation = (obj->rotation + 3) % 6u;
rotation = (obj->rotation + 3) % ROTATION_COUNT;
for (i = 1; i < 3; i++) {
tile_num = tileGetTileInDirection(obj->tile, rotation, i);
if (_obj_blocking_at(obj, tile_num, obj->elevation) != NULL) {

View File

@ -1870,12 +1870,12 @@ int animateMoveObjectToObject(Object* from, Object* to, int a3, int anim, int an
int v13;
STRUCT_530014* ptr;
int hidden = (to->flags & OBJECT_HIDDEN);
bool hidden = (to->flags & OBJECT_HIDDEN);
to->flags |= OBJECT_HIDDEN;
v10 = _anim_move(from, to->tile, to->elevation, -1, anim, 0, animationSequenceIndex);
if (hidden == 0) {
if (!hidden) {
to->flags &= ~OBJECT_HIDDEN;
}

View File

@ -257,15 +257,15 @@ int _idist(int a1, int a2, int a3, int a4);
int _tile_idistance(int tile1, int tile2);
int _make_straight_path(Object* a1, int from, int to, STRUCT_530014_28* pathNodes, Object** a5, int a6);
int _make_straight_path_func(Object* a1, int from, int to, STRUCT_530014_28* a4, Object** a5, int a6, Object* (*a7)(Object*, int, int));
int animateMoveObjectToObject(Object* from, Object* to, int a3, int a4, int a5);
int animateMoveObjectToTile(Object* obj, int tile_num, int elev, int a4, int a5, int a6);
int _anim_move(Object* obj, int tile, int elev, int a3, int a4, int a5, int animationSequenceIndex);
int _anim_move_straight_to_tile(Object* obj, int a2, int a3, int fid, int a5, int a6);
int _anim_move_on_stairs(Object* obj, int a2, int a3, int fid, int a5);
int _check_for_falling(Object* obj, int a2, int a3);
int animateMoveObjectToObject(Object* from, Object* to, int a3, int anim, int animationSequenceIndex);
int animateMoveObjectToTile(Object* obj, int tile_num, int elev, int a4, int anim, int animationSequenceIndex);
int _anim_move(Object* obj, int tile, int elev, int a3, int anim, int a5, int animationSequenceIndex);
int _anim_move_straight_to_tile(Object* obj, int tile, int elevation, int anim, int animationSequenceIndex, int flags);
int _anim_move_on_stairs(Object* obj, int tile, int elevation, int anim, int animationSequenceIndex);
int _check_for_falling(Object* obj, int anim, int a3);
void _object_move(int index);
void _object_straight_move(int a1);
int _anim_animate(Object* obj, int a2, int a3, int a4);
void _object_straight_move(int index);
int _anim_animate(Object* obj, int anim, int animationSequenceIndex, int flags);
void _object_animate();
void _object_anim_compact();
int _check_move(int* a1);
@ -274,8 +274,8 @@ int _dude_run(int a1);
void _dude_fidget();
void _dude_stand(Object* obj, int rotation, int fid);
void _dude_standup(Object* a1);
int actionRotate(Object* obj, int a2, int a3);
int _anim_change_fid(Object* obj, int a2, int fid);
int actionRotate(Object* obj, int delta, int animationSequenceIndex);
int _anim_change_fid(Object* obj, int animationSequenceIndex, int fid);
void _anim_stop();
int _check_gravity(int tile, int elevation);
unsigned int _compute_tpf(Object* object, int fid);

View File

@ -646,11 +646,11 @@ int mainMenuWindowInit()
// SFALL: Allow to change font color/flags of copyright/version text
// It's the last byte ('3C' by default) that picks the colour used. The first byte supplies additional flags for this option
// 0x1 - change the color for version string only
// 0x2 - underline text (only for the version string)
// 0x4 - monospace font (only for the version string)
// 0x010000 - change the color for version string only
// 0x020000 - underline text (only for the version string)
// 0x040000 - monospace font (only for the version string)
int fontSettings = _colorTable[21091], fontSettingsSFall = 0;
configGetInt(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_MAIN_MENU_FONT_COLOR, &fontSettingsSFall);
configGetInt(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_MAIN_MENU_FONT_COLOR_KEY, &fontSettingsSFall);
if (fontSettingsSFall && !(fontSettingsSFall & 0x010000))
fontSettings = fontSettingsSFall & 0xFF;
@ -665,7 +665,7 @@ int mainMenuWindowInit()
windowDrawText(gMainMenuWindow, msg.text, 0, offsetX + 15, offsetY + 460, fontSettings | 0x06000000);
}
// SFALL: Make sure font settings are applied when using 0x1 flag
// SFALL: Make sure font settings are applied when using 0x010000 flag
if (fontSettingsSFall)
fontSettings = fontSettingsSFall;
@ -716,7 +716,7 @@ int mainMenuWindowInit()
// SFALL: Allow to change font color of buttons
fontSettings = _colorTable[21091];
fontSettingsSFall = 0;
configGetInt(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_MAIN_MENU_BIG_FONT_COLOR, &fontSettingsSFall);
configGetInt(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_MAIN_MENU_BIG_FONT_COLOR_KEY, &fontSettingsSFall);
if (fontSettingsSFall)
fontSettings = fontSettingsSFall & 0xFF;

View File

@ -3438,11 +3438,11 @@ void _obj_light_table_init()
{
for (int s = 0; s < 2; s++) {
int v4 = gCenterTile + s;
for (int i = 0; i < 6; i++) {
for (int i = 0; i < ROTATION_COUNT; i++) {
int v15 = 8;
int* p = _light_offsets[v4 & 1][i];
for (int j = 0; j < 8; j++) {
int tile = tileGetTileInDirection(v4, (i + 1) % 6, j);
int tile = tileGetTileInDirection(v4, (i + 1) % ROTATION_COUNT, j);
for (int m = 0; m < v15; m++) {
*p++ = tileGetTileInDirection(tile, i, m + 1) - v4;

View File

@ -2198,7 +2198,7 @@ int _objPMAttemptPlacement(Object* obj, int tile, int elevation)
for (int v4 = 1; v4 <= 100; v4++) {
// TODO: Check.
v7++;
v9 = tileGetTileInDirection(v9, v7 % 6, 1);
v9 = tileGetTileInDirection(v9, v7 % ROTATION_COUNT, 1);
if (_wmEvalTileNumForPlacement(v9) != 0) {
break;
}

View File

@ -25,10 +25,10 @@ bool sfallConfigInit(int argc, char** argv)
configSetString(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_DUDE_NATIVE_LOOK_JUMPSUIT_FEMALE_KEY, "");
configSetString(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_DUDE_NATIVE_LOOK_TRIBAL_MALE_KEY, "");
configSetString(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_DUDE_NATIVE_LOOK_TRIBAL_FEMALE_KEY, "");
configSetInt(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_MAIN_MENU_BIG_FONT_COLOR, 0);
configSetInt(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_MAIN_MENU_BIG_FONT_COLOR_KEY, 0);
configSetInt(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_MAIN_MENU_CREDITS_OFFSET_X_KEY, 0);
configSetInt(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_MAIN_MENU_CREDITS_OFFSET_Y_KEY, 0);
configSetInt(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_MAIN_MENU_FONT_COLOR, 0);
configSetInt(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_MAIN_MENU_FONT_COLOR_KEY, 0);
configSetInt(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_MAIN_MENU_OFFSET_X_KEY, 0);
configSetInt(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_MAIN_MENU_OFFSET_Y_KEY, 0);
configSetInt(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_SKIP_OPENING_MOVIES_KEY, 0);

View File

@ -11,10 +11,10 @@
#define SFALL_CONFIG_DUDE_NATIVE_LOOK_JUMPSUIT_FEMALE_KEY "FemaleDefaultModel"
#define SFALL_CONFIG_DUDE_NATIVE_LOOK_TRIBAL_MALE_KEY "MaleStartModel"
#define SFALL_CONFIG_DUDE_NATIVE_LOOK_TRIBAL_FEMALE_KEY "FemaleStartModel"
#define SFALL_CONFIG_MAIN_MENU_BIG_FONT_COLOR "MainMenuBigFontColour"
#define SFALL_CONFIG_MAIN_MENU_BIG_FONT_COLOR_KEY "MainMenuBigFontColour"
#define SFALL_CONFIG_MAIN_MENU_CREDITS_OFFSET_X_KEY "MainMenuCreditsOffsetX"
#define SFALL_CONFIG_MAIN_MENU_CREDITS_OFFSET_Y_KEY "MainMenuCreditsOffsetY"
#define SFALL_CONFIG_MAIN_MENU_FONT_COLOR "MainMenuFontColour"
#define SFALL_CONFIG_MAIN_MENU_FONT_COLOR_KEY "MainMenuFontColour"
#define SFALL_CONFIG_MAIN_MENU_OFFSET_X_KEY "MainMenuOffsetX"
#define SFALL_CONFIG_MAIN_MENU_OFFSET_Y_KEY "MainMenuOffsetY"
#define SFALL_CONFIG_SKIP_OPENING_MOVIES_KEY "SkipOpeningMovies"