[Scummvm-git-logs] scummvm master -> 32f10e16f48b02b1c72733abd1a07c137ae8c81d
aquadran
noreply at scummvm.org
Sat Jul 30 19:25:34 UTC 2022
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
32f10e16f4 ICB: Few endian code fixes
Commit: 32f10e16f48b02b1c72733abd1a07c137ae8c81d
https://github.com/scummvm/scummvm/commit/32f10e16f48b02b1c72733abd1a07c137ae8c81d
Author: PaweÅ KoÅodziejski (aquadran at gmail.com)
Date: 2022-07-30T21:25:28+02:00
Commit Message:
ICB: Few endian code fixes
Changed paths:
engines/icb/general_npc_animation.cpp
engines/icb/text_sprites_pc.cpp
diff --git a/engines/icb/general_npc_animation.cpp b/engines/icb/general_npc_animation.cpp
index 88d6881c5f4..6ca486c11bf 100644
--- a/engines/icb/general_npc_animation.cpp
+++ b/engines/icb/general_npc_animation.cpp
@@ -698,7 +698,7 @@ int32 _game_session::Soften_up_anim_file(__mega_set_names link, int32 diff) {
PXanim *pCur_Anim = (PXanim *)rs_anims->Res_open(I->get_info_name(L->cur_anim_type), I->info_name_hash[L->cur_anim_type], I->base_path, I->base_path_hash);
// find out leg position for current frame
- old_leg_pos = PXFrameEnOfAnim(L->anim_pc, pCur_Anim)->left_foot_distance;
+ old_leg_pos = FROM_LE_16(PXFrameEnOfAnim(L->anim_pc, pCur_Anim)->left_foot_distance);
// Jake check the link anim exists / make its name
ANIM_CHECK(link);
@@ -712,7 +712,7 @@ int32 _game_session::Soften_up_anim_file(__mega_set_names link, int32 diff) {
// see which has the closest leg position
for (j = 0; j < (pLnk_Anim->frame_qty - 1); j++) {
- int32 foot = PXFrameEnOfAnim(j, pLnk_Anim)->left_foot_distance;
+ int32 foot = FROM_LE_16(PXFrameEnOfAnim(j, pLnk_Anim)->left_foot_distance);
int32 d = twabs(foot - old_leg_pos);
if (d < diff) {
diff --git a/engines/icb/text_sprites_pc.cpp b/engines/icb/text_sprites_pc.cpp
index 55f16956cb0..38e9eb84948 100644
--- a/engines/icb/text_sprites_pc.cpp
+++ b/engines/icb/text_sprites_pc.cpp
@@ -83,8 +83,8 @@ _TSrtn text_sprite::BuildTextSprite(int32 stopAtLine, bool8 bRemoraLeftFormattin
pxString font_cluster = FONT_CLUSTER_PATH;
charSet = (_pxBitmap *)rs_font->Res_open(const_cast<char *>(params.fontResource), params.fontResource_hash, font_cluster, font_cluster_hash); // open font file
- if (charSet->schema != PC_BITMAP_SCHEMA)
- Fatal_error("Incorrect versions loading [%s] (engine has %d, data has %d", const_cast<char *>(params.fontResource), PC_BITMAP_SCHEMA, charSet->schema);
+ if (FROM_LE_32(charSet->schema) != PC_BITMAP_SCHEMA)
+ Fatal_error("Incorrect versions loading [%s] (engine has %d, data has %d", const_cast<char *>(params.fontResource), PC_BITMAP_SCHEMA, FROM_LE_32(charSet->schema));
pal = (uint8 *)&charSet->palette[0];
More information about the Scummvm-git-logs
mailing list