Skip to content

Commit

Permalink
Release 4.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
FakelsHub committed Oct 14, 2021
1 parent af35f04 commit 8ec794d
Show file tree
Hide file tree
Showing 16 changed files with 147 additions and 62 deletions.
1 change: 0 additions & 1 deletion artifacts/config_files/Translations.ini
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,3 @@ StyleText=Style
;HipKick=Hip kick:
;HookKick=Hook kick:
;PiercingKick=Piercing kick:

2 changes: 1 addition & 1 deletion artifacts/translations/brazilian_portuguese.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ KarmaGain=Voc
KarmaLoss=Você perdeu %d de karma.
HighlightFail1=Você não está carregando um sensor de movimento.
HighlightFail2=Seu sensor de movimento está sem cargas.
SuperStimExploitMsg=Você não pode usar um super stim em alguém que não está ferido!
SuperStimExploitMsg=Você não pode usar este item em alguém que não esteja ferido!
BlockedCombat=Você não pode entrar em combate desta vez.
SaveSfallDataFail=ERRO ao salvar a informação extendida do jogo salvo! Verifique se outros programas interferem com os arquivos/pastas do jogo salvo e tente de novo.
PartyLvlMsg=Nvl:
Expand Down
19 changes: 18 additions & 1 deletion artifacts/translations/chs.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ KarmaGain=
KarmaLoss=你失去了%d点道德。
HighlightFail1=你没有携带动态感应器。
HighlightFail2=你的动态感应器没电了。
SuperStimExploitMsg=你不能对没受伤的人使用超级治疗针
SuperStimExploitMsg=你不能对没受伤的角色使用这个物品
BlockedCombat=你现在不能进入战斗。
SaveSfallDataFail=储存存档延展信息时发生错误!检查是否有其他程序占用存档文件/文件夾之后再试一次。
PartyLvlMsg=等级:
Expand All @@ -20,3 +20,20 @@ PartyOrderAttackRobot=::
RaceText=种族
StyleText=风格
DoneBtn=完成

;玩家空手攻击招式的自定名称(最长为16个字元,8个中文字)
[Unarmed]
;Punch=拳击:
;Kick=踢击:
;StrongPunch=重拳:
;HammerPunch=榔头拳:
;Haymaker=强拳:
;Jab=刺拳:
;PalmStrike=掌击:
;PiercingStrike=刺击:
;StrongKick=重踢:
;SnapKick=快踢:
;PowerKick=强踢:
;HipKick=背踢:
;HookKick=勾踢:
;PiercingKick=刺踢:
19 changes: 18 additions & 1 deletion artifacts/translations/cht.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ KarmaGain=
KarmaLoss=你失去了%d點道德。
HighlightFail1=你沒有攜帶動態感應器。
HighlightFail2=你的動態感應器沒電了。
SuperStimExploitMsg=你不能對沒受傷的角色使用超級治療針
SuperStimExploitMsg=你不能對沒受傷的角色使用這個物品
BlockedCombat=你現在不能進入戰鬥。
SaveSfallDataFail=儲存存檔延伸資訊時發生錯誤!檢查是否有其他程式占用存檔檔案/資料夾之後再試一次。
PartyLvlMsg=等級:
Expand All @@ -20,3 +20,20 @@ PartyOrderAttackRobot=::
RaceText=種族
StyleText=風格
DoneBtn=完成

;玩家空手攻擊招式的自定名稱(最長為16個字元,8個中文字)
[Unarmed]
;Punch=拳擊:
;Kick=踢擊:
;StrongPunch=重拳:
;HammerPunch=榔頭拳:
;Haymaker=強拳:
;Jab=刺拳:
;PalmStrike=掌擊:
;PiercingStrike=刺擊:
;StrongKick=重踢:
;SnapKick=快踢:
;PowerKick=強踢:
;HipKick=背踢:
;HookKick=勾踢:
;PiercingKick=刺踢:
2 changes: 1 addition & 1 deletion artifacts/translations/french.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ KarmaGain=Tu gagnes %d points de Karma.
KarmaLoss=Tu perds %d points de Karma.
HighlightFail1=Tu ne porte pas de Capteur de mouvement.
HighlightFail2=Ton Capteur de mouvement est vide.
SuperStimExploitMsg=Tu ne peux pas utiliser un Super Stimpak sur une personne qui n'est pas blessée!
SuperStimExploitMsg=Tu ne peux pas utiliser cet objet sur une personne qui n'est pas blessée!
BlockedCombat=Tu ne peux pas entrer en combat actuellement.
SaveSfallDataFail=ERROR à la sauvegarde! Vérifiez que d'autres programmes n'interferent pas avec les fichiers ou les dossiers de sauvegarde et essayez à nouveau.
PartyLvlMsg=Niveau:
Expand Down
2 changes: 1 addition & 1 deletion artifacts/translations/german.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ KarmaGain=Du erh
KarmaLoss=Du verlierst %d Karma.
HighlightFail1=Du trägst keinen Bewegungssensor.
HighlightFail2=Dein Bewegungssensor ist entladen.
SuperStimExploitMsg=Du kannst einem Unverletzten kein Super-Stimpak verabreichen!
SuperStimExploitMsg=Du kannst diesen Gegenstand nicht auf Unverletzte anwenden!
BlockedCombat=Kampfmodus momentan nicht verfügbar.
SaveSfallDataFail=FEHLER beim Speichern des Spielstandes! Prüfe, ob andere Programme darauf zugreifen und probiere es erneut.
PartyLvlMsg=Lvl:
Expand Down
22 changes: 22 additions & 0 deletions artifacts/translations/polish.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[sfall]
SaveInCombat=Nie możesz zapisać gry w tym momencie.
KarmaGain=Zdobyłeś %d karmy.
KarmaLoss=Straciłeś %d karmy.
HighlightFail1=Nie masz przy sobie detektora ruchu.
HighlightFail2=Twój detektor ruchu jest rozładowany.
SuperStimExploitMsg=Nie możesz użyć tego przedmiotu na w pełni zdrowej osobie!
BlockedCombat=Nie możesz obecnie wejść w tryb walki.
SaveSfallDataFail=BŁĄD Zapisujesz rozszerzone informacje w zapisie gry! Sprawdź, czy inne programy nie kolidują z plikami/folderami zapisu gry i spróbuj ponownie.
PartyLvlMsg=Lvl:
PartyACMsg=AC:
PartyAddictMsg=Uzależniony
NPCPickupFail=%s nie może podnieść przedmiotu.

PartyOrderAttackHuman=Zajmę się tym.|Okej, zrozumiałem.|No to mamy plan.
PartyOrderAttackCreature=::Warknięcie::
PartyOrderAttackRobot=::Bip::

[AppearanceMod]
RaceText=Rasa
StyleText=Styl
DoneBtn=Gotowe
17 changes: 17 additions & 0 deletions artifacts/translations/russian.ini
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,20 @@ PartyOrderAttackRobot=::
RaceText=Раса
StyleText=Стиль
DoneBtn=Закрыть

;Имена для невооруженных атак игрока (макс. 16 символов)
[Hits]
;Punch=Удар рукой:
;Kick=Удар ногой:
;StrongPunch=
;HammerPunch=
;Haymaker=
;Jab=
;PalmStrike=
;PiercingStrike=
;StrongKick=
;SnapKick=
;PowerKick=
;HipKick=
;HookKick=
;PiercingKick=
17 changes: 17 additions & 0 deletions artifacts/translations/russian_oem.ini
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,20 @@ PartyOrderAttackRobot=::
RaceText= á 
StyleText=‘⨫ì
DoneBtn=‡ ªàëâì

;ˆ¬¥­  ¤«ï ­¥¢®®à㦥­­ëå  â ª ¨£à®ª  (¬ ªá. 16 ᨬ¢®«®¢)
[Hits]
;Punch=“¤ à à㪮©:
;Kick=“¤ à ­®£®©:
;StrongPunch=
;HammerPunch=
;Haymaker=
;Jab=
;PalmStrike=
;PiercingStrike=
;StrongKick=
;SnapKick=
;PowerKick=
;HipKick=
;HookKick=
;PiercingKick=
2 changes: 2 additions & 0 deletions sfall/FalloutEngine/Functions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,7 @@ void __cdecl buf_to_buf(BYTE* src, long width, long height, long src_width, BYTE
mov esi, src;
mov edi, dst;
mov eax, height;

startLoop:
mov ecx, blockCount;
test ecx, ecx;
Expand Down Expand Up @@ -325,6 +326,7 @@ void __cdecl buf_to_buf(BYTE* src, long width, long height, long src_width, BYTE
dec eax; // height
jnz startLoop;
jmp end;

copySmall: // copies the small size data
mov ecx, sizeD;
rep movsd;
Expand Down
10 changes: 9 additions & 1 deletion sfall/Game/GUI/render.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ static void Draw(fo::Window* win, BYTE* surface, long width, long height, long w
}

void __fastcall Render::GNW_win_refresh(fo::Window* win, RECT* updateRect, BYTE* toBuffer) {
///fo::func::GNW_win_refresh(win, (fo::BoundRect*)updateRect, (long*)toBuffer);
///return;

if (win->flags & fo::WinFlags::Hidden) return;
fo::RectList* rects;

Expand Down Expand Up @@ -138,7 +141,7 @@ void __fastcall Render::GNW_win_refresh(fo::Window* win, RECT* updateRect, BYTE*
}
surface = &win->surface[currRect->wRect.left - win->rect.x] + ((currRect->wRect.top - win->rect.y) * win->width);
} else {
surface = new BYTE[height * width](); // black background
surface = new BYTE[height * width](); // black background (for main menu)
widthFrom = width; // replace with rectangle
}

Expand Down Expand Up @@ -188,6 +191,11 @@ void Render::init() {
sf::MakeJump(0x4D6FD9, GNW_win_refresh_hack, 1);
// replace _screendump_buf to _screen_buffer for create screenshot
sf::SafeWriteBatch<DWORD>(FO_VAR_screen_buffer, { 0x4C8FD1, 0x4C900D });

// dev test
//sf::BlockCall(0x4CA506);
//sf::SafeWrite8(0x4CA50B, 0x90);
//sf::BlockCall(0x4D764C);
}

}
Expand Down
14 changes: 9 additions & 5 deletions sfall/Game/ImprovedAI/AI.Behavior.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,7 @@ static fo::AttackType AISearchBestWeaponOnBeginAttack(fo::GameObject* source, fo
return hitMode;
}

#ifndef NDEBUG
static void PrintShootResult(long result) {
const char* type;
switch (result) {
Expand All @@ -570,6 +571,9 @@ static void PrintShootResult(long result) {
}
fo::func::debug_printf("\n[AI] Try Attack: Check bad shot result: %s", type);
}
#else
static void PrintShootResult(long result) {}
#endif

static bool weaponIsSwitched = false; // true - смена оружия уже была произведена

Expand Down Expand Up @@ -606,9 +610,8 @@ static CombatShootResult __fastcall AICheckAttack(fo::GameObject* &weapon, fo::G

CombatShootResult result = AICombat::combat_check_bad_shot(source, target, hitMode, 0);

#ifndef NDEBUG
// for debug
PrintShootResult((long)result); // "Try Attack: Check bad shot result:"
#endif

switch (result)
{
Expand Down Expand Up @@ -1002,7 +1005,7 @@ static fo::GameObject* ClearMovePathSub(fo::GameObject* source, fo::GameObject*
if (obj) {
if (lastCritter) {
// проверить путь до текущего криттера
if (game::Tilemap::make_path_func(obj, obj->tile, target->tile, 0, 0, 0, (void*)fo::funcoffs::obj_blocking_at_) == 0) {
if (game::Tilemap::make_path_func(source, source->tile, obj->tile, 0, 0, 0, (void*)fo::funcoffs::obj_blocking_at_) == 0) {
// путь блокирован, передвинуть предыдущего криттера
if (MoveCritter(source, lastCritter, pathTiles[lastStep - 1])) return lastCritter;
}
Expand Down Expand Up @@ -1109,6 +1112,7 @@ long __fastcall AIBehavior::AIMoveStepsCloser(long flags, fo::GameObject* target

if (!fo::func::make_path_func(source, source->tile, target->tile, 0, 0, (void*)fo::funcoffs::obj_blocking_at_)) {
// [ADD-EXT] Реализация функции освобождения пути криттера блокирующего путь к цели
if (fo::func::critter_body_type(source) != fo::BodyType::Biped) goto block;
long gotoTile = -1;
fo::GameObject* object = ClearMovePath(source, target, gotoTile);
if (object) {
Expand All @@ -1118,8 +1122,8 @@ long __fastcall AIBehavior::AIMoveStepsCloser(long flags, fo::GameObject* target
else if (gotoTile != -1) {
destinationTile = gotoTile;
} else {
// не удалось построить путь, найти ближайщего криттера
fo::var::moveBlockObj = 0;
block: // не удалось построить путь, найти ближайщего криттера
fo::var::moveBlockObj = nullptr;
if (!fo::func::make_path_func(source, source->tile, target->tile, 0, 0, (void*)fo::funcoffs::obj_ai_blocking_at_)
&& fo::var::moveBlockObj && fo::var::moveBlockObj->IsCritter())
{
Expand Down
20 changes: 0 additions & 20 deletions sfall/Game/ImprovedAI/AI.Combat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1015,25 +1015,6 @@ static void __declspec(naked) combat_attack_hook() {
*/
/////////////////////////////////////////////////////////////////////////////////////////

//#ifndef NDEBUG
//static void __declspec(naked) ai_move_steps_closer_debug() {
// static const char* move_steps_closer_fail = "\nERROR: ai_move_steps_closer.";
// __asm {
// test eax, eax;
// jns skip;
// push move_steps_closer_fail;
// call fo::funcoffs::debug_printf_;
// add esp, 4;
//skip:
// add esp, 0x10;
// pop ebp;
// pop edi;
// pop esi;
// retn;
// }
//}
//#endif

void AICombat::init(bool smartBehavior) {

// Enables the use of the RunAwayMode value from the AI-packet for the NPC
Expand All @@ -1056,7 +1037,6 @@ void AICombat::init(bool smartBehavior) {

#ifndef NDEBUG
combatDebug = (sf::IniReader::GetConfigInt("CombatAI", "Debug", 0) != 0);
//sf::MakeJump(0x42A1B6, ai_move_steps_closer_debug);
#endif
}
}
Expand Down
9 changes: 9 additions & 0 deletions sfall/Modules/Tiles.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,15 @@ static int ProcessTile(fo::Art* tiles, int tile, int listPos) {
}
overrides[tile] = new OverrideEntry(xSize, ySize, listPos);

// Test
///sprintf(&buf[10], "z_%s", &tiles->names[13 * tile]);
///fo::func::db_fseek(artFile, 0, SEEK_SET);
///fo::func::db_freadByteCount(artFile, (BYTE*)&frame, 74);
///fo::DbFile* file = fo::func::db_fopen(buf, "wb");
///fo::func::db_fwriteByteCount(file, (BYTE*)&frame, 74);
///fo::func::db_fwriteByteCount(file, pixelData, bytes);
///fo::func::db_fclose(file);

fo::func::db_fclose(artFile);
delete[] pixelData;

Expand Down
Loading

2 comments on commit 8ec794d

@NovaRain
Copy link

@NovaRain NovaRain commented on 8ec794d Oct 15, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the use of setting the base address to 0x11000000? To give space to HRP (which uses the default base addr of 0x10000000)?

@FakelsHub
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, just to see that the error occurs in sfall and not somewhere in the system libraries. (unless, of course, the system transfers it to another address space.)

Please sign in to comment.