GithubHelp home page GithubHelp logo

storm-devs / storm-engine Goto Github PK

View Code? Open in Web Editor NEW
824.0 30.0 116.0 109.68 MB

Game engine behind Sea Dogs, Pirates of the Caribbean and Age of Pirates games.

Home Page: https://storm-devs.github.io/storm-engine

License: GNU General Public License v3.0

C++ 93.70% C 1.42% HLSL 1.45% Batchfile 0.01% CMake 0.81% Python 2.51% JavaScript 0.10%
game-engine cpp sea-dogs storm-engine cmake engine x64 directx 3d-game-engine 3d-engine

storm-engine's People

Contributors

ann0yer avatar antonshalgachev avatar artess999 avatar asapin avatar captainbeltrop avatar dimogrudev avatar espkk avatar evganat avatar hammie avatar heavyredstone avatar kk-se avatar koncord avatar lipsarj avatar mangioneandrea avatar mitrokosta avatar np-c0mp1ete avatar obko avatar olefirenque avatar q4a avatar szymonj99 avatar totalcaesar659 avatar ugeen4 avatar vorot93 avatar willter avatar zeule avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

storm-engine's Issues

If there is no last name, then do not add a space in the dialog box. Ready code

Tiny kernel and script adjustments. As a result, we get this: if the NPC does not have a lastname (for example, it is an Indian), then there will be no space after the name in the dialog box.

  1. In file "libs\dialog\src\dialog.cpp"

You only need to edit one line. Below is the correct version of the function. I moved "m_sTalkPersName += " ";" one line below, in the inner part of the condition.

uint64_t DIALOG::ProcessMessage(MESSAGE &message)
{
    switch (message.Long())
    {
        // get character ID
    case 0:
        persId = message.EntityID();
        persMdl = message.EntityID();
        break;
        // get person ID
    case 1:
        charId = message.EntityID();
        charMdl = message.EntityID();
        const char *attr = nullptr;
        if (attr = core.Entity_GetAttribute(charId, "name"))
            m_sTalkPersName = attr;
        if (m_sTalkPersName.size() > 0)
        if (attr = core.Entity_GetAttribute(charId, "lastname"))
            m_sTalkPersName += " ";
            m_sTalkPersName += attr;
        m_BackParams.fCharacterNameRectCenterWidth =
            4.f +
            RenderService->StringWidth((char *)m_sTalkPersName.c_str(), m_nCharNameTextFont, m_fCharNameTextScale);
        break;
    }
    return 0;
}

  1. In "program\dialog.c" add new if
	dialogRun = true;
	dialogSelf = false;
// start new if
	if(CheckAttribute(Character, "lastname"))
	{	
if(Character.lastname == "" || Character.lastname == "none")
	{
	DeleteAttribute(Character,"lastname");
	}
	}
// end new if
	LAi_Character_StartDialog(mainChr, Character);
	LAi_Character_StartDialog(Character, mainChr);

Crash: CharactersGroups::FindEnemyFromFindList

Sentry Issue: STORM-ENGINE-BM

EXCEPTION_ACCESS_VIOLATION_READ: Fatal Error: EXCEPTION_ACCESS_VIOLATION_READ
  File "CharactersGroups.cpp", line 264, in CharactersGroups::FindEnemyFromFindList
  File "CharactersGroups.cpp", line 242, in CharactersGroups::CharacterVisibleCheck
  File "CharactersGroups.cpp", line 210, in CharactersGroups::Execute
  File "Core.cpp", line 537, in CORE::ProcessExecute
  File "Core.cpp", line 185, in CORE::Run
...
(7 additional frame(s) were not displayed)

[BUG] Crash when calling GetAttributeName

Describe the bug
The game (sometimes) crashes when trying to iterate an objects attribute's names.

To Reproduce
The following (complete) script can reproduce the crash reliably:

object OfficerTypes;

void InitOfficerTypes()
{
	OfficerTypes.Combat.perks.EnemyType = 1;
}

string GetRandomEnemyType()
{
	string type = GetAttributeName(GetAttributeN(OfficerTypes,0));
	if(CheckAttribute(OfficerTypes,type+".EnemyType"))
	{
		return type;
	}
	else
	{
		return "Combat";
	}
}

void Main()
{
	InitOfficerTypes();

	string str = GetRandomEnemyType();

	ExitProgram();
}

The games crashes on string type = GetAttributeName(GetAttributeN(OfficerTypes,0));. I seems like it is trying to access the StringCodec of the object AttributeClass, but the AttributeClass is already destroyed.

Expected behavior
Function returns the attribute name and it does not crash.

Additional context
Discovered while trying to port New Horizons to the new engine. I found 2 functions having this problem: GetRandomEnemyType and getFetchQuestCargo, in my testing at least one of these two crashed every time.

Initial debugging indicates that the value returned from GetAttributeN is destroyed while its stack frame gets cleaned up. Somehow the returned value is also referenced locally from GetAttributeN and destroyed after it returns, invalidating the returned value.

Add the ability to play all tracks from a sound alias in a single location

Is your feature request related to a problem? Please describe.
One of our players, the author of a music mod, requested this feature. He wants to have all sounds from selected alias played in a random sequence instead of just a single random one looped.

Describe the solution you'd like
I think a convenient solution would be to have an ini key for an alias determine if it's going to be played in a random sequence or simply looped, with default value being simple loop.

Describe alternatives you've considered
Perhaps this could be accomplished by script modifications, but it is probably easier and better to implement this from engine side. If you know of a script solution that wouldn't move all music aliases into scripts, that would satisfy the request, please let me know.

Additional context
Google translated feature request text just in case:

Captain Beltrop, Dear and Honorable Developer (as well as your entire team). As a fan of the series, as well as the author of one of the music mods for KKS, I can say with confidence that the Corsairs lack the randomness of the tracks in the locations. And now, if the battle has begun, then even if it lasts a whole day, only 1 track will be played, which the game has chosen. This is not the case. The game should randomly select ALL tracks that are prescribed for a given location. Those. one composition has ended and then the next one is chosen at random. Please do this and your game will only benefit from this innovation. Thanks in advance for your reply.

ToDo: return support for clang on Windows

Is your feature request related to a problem? Please describe.

I would like to keep current problems with clang on Windows in this place.
Current problems clang on Windows:

1 - clang build failed with crashpad

PR: #58
build log: https://github.com/storm-devs/storm-engine/runs/2403689592?check_suite_focus=true#step:5:576
logs_214.zip

  openssl/1.1.1j: ['"VC-conan-Debug-Windows-x86_64-clang-11"', 'no-shared', '--prefix="C:\\Users\\runneradmin\\.conan\\data\\openssl\\1.1.1j\\_\\_\\package\\0778b007b0f73be7de0191eacba7188d2bc2bd5a"', '--openssldir="C:\\Users\\runneradmin\\.conan\\data\\openssl\\1.1.1j\\_\\_\\package\\0778b007b0f73be7de0191eacba7188d2bc2bd5a\\res"', 'no-unit-test', 'threads', 'PERL=C:\\.conan\\18ba5c\\1\\bin\\perl.exe', 'no-tests', '--debug']
  Bareword found where operator expected at (eval 13) line 12, near """C"
  	(Missing operator before C?)
  
  Failure!  build file wasn't produced.
  Please read INSTALL and associated NOTES files.  You may also have to look over
  your available compiler tool chain or change your configuration.
  
  syntax error at (eval 13) line 12, near """C"

This bug may be related: conan-io/conan-center-index#96
But people says, that openssl/1.1.1c works fine with clang 8 + ninja:
https://gist.github.com/uilianries/b114b80aff1c7f8eb5b2e2ae0bd7fd9e

2 - clang build failed with sdl 2.0.14

I replaced old PR, but has tree here: https://github.com/q4a/storm-engine/tree/fb484bbc50dee4f980918b595e633e7da7d6f704
build log: https://github.com/q4a/storm-engine/runs/2312924402?check_suite_focus=true#step:5:470
logs_78.zip

[10/167] Building C object source_subfolder/CMakeFiles/SDL2-static.dir/src/audio/SDL_audiocvt.c.obj
  FAILED: source_subfolder/CMakeFiles/SDL2-static.dir/src/audio/SDL_audiocvt.c.obj 
  C:\PROGRA~2\MICROS~1\2019\ENTERP~1\VC\Tools\Llvm\x64\bin\clang.exe -DUSING_GENERATED_CONFIG_H -Isource_subfolder/include -I../source_subfolder/include -m64 -idirafter "C:/Users/runneradmin/.conan/data/sdl2/2.0.14/bincrafters/stable/build/265cb5137f80e3f8e990f2117e26e7b19cd62076/source_subfolder/src/video/khronos"  "-IC:/Users/runneradmin/.conan/data/sdl2/2.0.14/bincrafters/stable/build/265cb5137f80e3f8e990f2117e26e7b19cd62076/source_subfolder/src/hidapi/hidapi" -msse3 -msse2 -msse -m3dnow -mmmx -Wshadow -Wdeclaration-after-statement -Werror=declaration-after-statement -fno-strict-aliasing -Wall  -g -Xclang -gcodeview -O0 -D_DEBUG -D_DLL -D_MT -Xclang --dependent-lib=msvcrtd -MD -MT source_subfolder/CMakeFiles/SDL2-static.dir/src/audio/SDL_audiocvt.c.obj -MF source_subfolder\CMakeFiles\SDL2-static.dir\src\audio\SDL_audiocvt.c.obj.d -o source_subfolder/CMakeFiles/SDL2-static.dir/src/audio/SDL_audiocvt.c.obj -c ../source_subfolder/src/audio/SDL_audiocvt.c
  ../source_subfolder/src/audio/SDL_audiocvt.c:58:15: error: unknown type name '__m128'
          const __m128 divby2 = _mm_set1_ps(0.5f);
                ^

This bug related and fixed: libsdl-org/SDL#4269
So, I hope to see fix in SDL 2.0.16: https://libsdl.org/next.php

Clang commits to revert:

586c89a - return clang to CMakeSettings.json
adf1553 - return clang to cibuild.yml

Describe the solution you'd like

I would like to:

  1. Wait for SDL 2.0.16 release.
  2. Add SDL 2.0.16 to bincrafters like this: bincrafters/community@a60c4af
  3. Return clang build on Windows and check errors. May be I can found some fix for crashpad/openssl build.

Is there an example project/test sandbox?

I wanted to build a sandbox-like game in which all possible game modes (like walking, sailing on the ship, fighting, etc..) can be run
I tried to run engine, config but no luck

Tracking issue: Linux port using dxvk / gallium nine

Here will be current lists of needed fixes for Linux port of engine using dxvk.

Current source code of dxvk port is here: https://github.com/storm-devs/storm-engine/tree/dxvk

Started status: there is 113 #ifdef marked with FIX_LINUX which should be replaces with proper implementations, but engine already build fine with CLANG 11 and partially show main menu background
storm-linux-main-screen

Current status:
cur-status

113 marked FIX_LINUX tasks (from most important to less):

  • 19 for FIX_LINUX ID3DXEffect. Pushed workaround: CTechnique: + precompiled shaders. Check FIX_LINUX Effects
  • 01 for FIX_LINUX D3DXCreateTextureFromFileA: is it used at least somehow?
  • 01 for FIX_LINUX D3DXCreateTextureFromFileInMemoryEx: unused, created PR: #347
  • 04 for FIX_LINUX HBITMAP: unused, created PR: #347
  • 04 for FIX_LINUX Screenshot: I hope that SDL has some useful funcs for taking screenshots
  • 02 for FIX_LINUX ReleaseDC: not sure, but may be important
  • 04 for FIX_LINUX VirtualKey: There is dilemma: we can keep VirtualKeys for c-files in PROGRAM folder to maintain old mods or replace all VirtualKeys, because less code == less errors. Current decision - keep VirtualKeys: #328
  • 04 for FIX_LINUX HINSTANCE: for correct handling window and other: #366
  • 04 for FIX_LINUX Cursor: port all Cursor stuff to SDL
  • 10 for FIX_LINUX GetTickCount: I hope that we will find old branch/changes where is this changes already made
  • 03 for FIX_LINUX sentry_options: few Windows only direct calls to crashpad_handler.exe
  • 01 for FIX_LINUX WideCharToMultiByte: some old conversation
  • 01 for FIX_LINUX MultiByteToWideChar: some old conversation
  • 08 for FIX_LINUX DirectXMath: one DirectXMath call in AVX/SSE2 ifdef. I created quick workaround (this increased 08 for FIX_LINUX DirectXMath from 2 to 8), but I'll need to replace it with this lib: https://github.com/nfrechette/rtm
  • 04 for FIX_LINUX DxErr.h: few error handling, may be already in DXVK?
  • 02 for FIX_LINUX _flushall: not sure
  • 01 for FIX_LINUX RDTSC_*: need to test SDL_GetPerformanceCounter and use it (if it passes tests)
  • 10 for FIX_LINUX __debugbreak: need to create one place with debugbreak for all platforms/archs
  • 02 for FIX_LINUX GetWindowRect: I used SDL functions for Linux part, but it did not work well in Windows (why?)
  • 08 for FIX_LINUX ddraw.h and amstream.h: It need only for play avi into and other videos. Will require to use ffmpeg or something like that
  • 01 for FIX_LINUX ExitProcess: I used "exit(0)" for Linux port, but it is part of SailorsEditor, which should be moved from engine IMHO.
  • 02 for FIX_LINUX SHGetKnownFolderPath: I used SDL_GetPrefPath for Linux port. Should I keep SHGetKnownFolderPath for compatibility?
  • 02 for FIX_LINUX 7za.exe: one direct call to 7za.exe
  • 01 for FIX_LINUX CreateEventA: not sure if I need to prevent multiple instances of game
  • 03 for FIX_LINUX Beep: I'm fine if my pc speaker will not beep when I'm playng game)
  • 17 for FIX_LINUX s_debug.h: part for debugging user mods in compiler.cpp and s_dbg_*

[BUG]Cmake Conan 1.63 ERROR

conan climbs onto a third-party site and gets an error

Cmake 3.29.0 rc3
Conan 1.63

Existing package recipes:
7zip/19.00
catch2/2.13.7
directx/9.0@storm/prebuilt
fast_float/3.4.0
fmod/2.02.05@storm/prebuilt
fmt/8.0.1
libcurl/7.86.0
mimalloc/2.0.3
nasm/2.15.05
openssl/3.2.1
sdl/2.0.18
sentry-crashpad/0.5.0
sentry-native/0.5.0
sentry-native/0.6.5
spdlog/1.9.2
strawberryperl/5.32.1.1
zlib/1.2.11
zlib/1.2.13

CmakeLog.txt
image
image

Help me pls (T_T)

Need to case-convert non-ascii text

LegacyDialog needs to convert the character name to uppercase.

Currently it is using std::toupper but this does not work correctly with non-ascii (i.e. Russian) characters.

[BUG] Can't load texture resource\textures\.tx

Sometimes the game tries to load a texture without a name. It looks like there is a bug in the code that puts coats of arms on ships. As a result, you can get something like this

[2022-10-11 13:42:13.718] [system] [info] Can't load texture resource\textures.tx

Connecting alpha textures to characters

Hey, guys.
Need to connect the use of alpha textures to the characters, so that you can make more realistic hair, as well as belts.
I hope that there will be those who want to solve this issue.
Thanks!

[BUG] CMake Error

Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19045.
Conan: Adding storm remote repository (https://storm.jfrog.io/artifactory/api/conan/conan-remote) verify ssl (True)
usage: conan remote [-h] [-v [V]] {add} ...
conan remote: error: unrecognized arguments: True
ERROR: Exiting with code: 2

CMake Error at cmake/conan.cmake:853 (message):
Conan remote failed='2'
Call Stack (most recent call first):
CMakeLists.txt:31 (conan_add_remote)

Configuring incomplete, errors occurred!
See also "F:/work/git/storm-engine/build_vs2019_x64/CMakeFiles/CMakeOutput.log".

Crash on quick saving (F6)

I tested on develop branch with clang-debug config. This commit: 808dbb4
Step to reproduce:

  • start new game;
  • talk to the first guard who will lead you forward;
  • then do 2-5 quick save (F6).

The error is floating. It appears more often if you load this save and then do 2-5 quick save (F6).
save.zip

error

[BUG] Time is not accelerated after exiting dialogue

Describe the bug
The time acceleration is turned off when entering dialogue, but isn't enabled when dialogue stops. Pressing the r key to change time acceleration says that the acceleration is turned off, even though it was turned off by the dialogue already, meaning the r key has to be pressed twice to re-activate time acceleration

To Reproduce
Steps to reproduce the behavior:

  1. Start a new game
  2. Talk to the first NPC
  3. When following the NPC, press r to speed up time.
  4. When entering dialogue with the NPC, time acceleration will stop. Press r key twice to activate time acceleration again.

Expected behavior
When exiting the dialogue, time acceleration should be activated again or the r key would activate time acceleration on the first key press.

Restore the logic of vanilla CoAS MSGIDs

Some messages had been changed during TEHO development. For consistency, they shall be reverted. If some logic is used in TEHO it shall be moved to newly created MSGIDs which shall not intersect with the original ones.

Convert Float to String

Good afternoon. Please add a function to translate floating values into text. Scripts have a similar function, but it rounds the value and discards the final numbers. The kernel has a translation of a variable into a floating value. Now I need a function that does the opposite. Thank you.

ShipMan::SetAnimation

Sentry Issue: STORM-ENGINE-B8

EXCEPTION_ACCESS_VIOLATION_READ: Fatal Error: EXCEPTION_ACCESS_VIOLATION_READ
  File "Sailors.cpp", line 458, in ShipMan::SetAnimation
  File "Sailors.cpp", line 1100, in Sailors::Realize
  File "Core.cpp", line 555, in CORE::ProcessRealize
  File "Core.cpp", line 186, in CORE::Run
  File "Main.cpp", line 31, in `anonymous namespace'::RunFrame
...
(6 additional frame(s) were not displayed)

Use DXVK instead of DXVK Native

Describe the solution you'd like
In CMakeLists.txt, I think it could be possible to now use https://github.com/doitsujin/dxvk as opposed to https://github.com/Joshua-Ashton/dxvk-native, seeing how DXVK Native has now been included in the former as of this comment.
That would result in being able to now get updates as opposed to an archived repository from November 2022.

Let me know if I am incorrect about this 👍

std::vector<T>::size

Sentry Issue: STORM-ENGINE-BG

EXCEPTION_ACCESS_VIOLATION_READ: Fatal Error: EXCEPTION_ACCESS_VIOLATION_READ
  File "vector", line 1549, in std::vector<T>::size
  File "Supervisor.cpp", line 327, in Supervisor::FindCharacters
  File "Character.cpp", line 4784, in Character::CheckAttackHit
  File "AnimationImp.h", line 238, in AnimationImp::AteExtern
  File "ActionPlayerImp.cpp", line 463, in ActionPlayerImp::CheckEvents
...
(13 additional frame(s) were not displayed)

[BUG] SoundService::GetRandomName

Looks like there's a bug in SoundService::GetRandomName
If there are more than 2 tracks in a section, the first one is never played
e.g. music_alias.ini in COAS

[music_shop]
prior = 192
name = MUSIC\07-Town.ogg
name = MUSIC\11-Town2.ogg

MUSIC\07-Town.ogg is never playing

FYI: as I know, it was fixed in DMC

C++ standard

If this repo is built with the latest VS, please consider choosing C++17 or even C++20 standard.
You'll get a lot of potential code upgrades with reduced possibility of bugs/issues.
Modern code is easier to maintain as well.

[BUG] dutch gambit terks navy battle message vector out of range

Describe the bug
When I kill Richard Fleetwood on Terks island I'll need to go sea and catch his ship. I kill Richard than I went to sea but after ~1 minute the game crashed. I tried to debug and found that MSG_SHIP_LIGHTSRESET message was invalid
image
Index bigger than vector size

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

I'll try how to reproduce it something else than with dutch gambit

Expected behavior
No crash

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
dump https://drive.google.com/file/d/1_8oebzMI8TD1s_jbxswdjLrbTaq1WNhR/view?usp=sharing

[BUG] Empty save names after commit 1ca2b122a90460

After latest commit 1ca2b12 I have bug in save_load interface : empty save names
Also in error.log i see :
[2021-05-31 21:35:07.490] [error] [error] RUNTIME ERROR in interface\save_load.c(909): internal: buffer too small

to reproduce

  1. Start the game
  2. Press load game

[BUG] Static analyzer found bugs.

I checked your project with the PVS-Studio static analyzer.

Some analyzer warnings seemed interesting to me, so I wrote an article about them: https://habr.com/ru/company/pvs-studio/blog/564698/. I think it will be useful to you.

Part of the warnings pointed to lines of code marked with special comments. Seems like you are aware of problems in your code.

Note. As open project developers, you can use one of free licensing options. If you find the analyzer interesting, you can use it regularly. Ways to Get a Free PVS-Studio License: https://pvs-studio.com/en/blog/posts/0614/

[BUG] Game crashes because of empty variable name

Describe the bug
CoAS contains the following line of script code:
string sTemp,;
This causes the engine to crash. This used to work before the hashtable refactor (#75).

To Reproduce
Steps to reproduce the behavior:

  1. Add an extra comma to a variable declaration list
  2. Run the game

Expected behavior
The game runs without crashing.

We can improve it further by adding a clear warning to the log, so developers/modders can easily fix it.

Static initialization of non-trivial global objects

We have multiple non-trivial static global variables that depend on each other, which causes issues because the order of initialization is not specified.

Currently my Release build crashes due to core being initialized before fio.

Strange code when creating ships

When executing MSG_SHIP_CREATE the following bit of code is getting run:

if (pAP && pAP->GetAttributeAsDword("index", -1) >= 0)
{
auto pVDat = static_cast<VDATA *>(core.GetScriptVariable("Characters"));
if (pVDat)
pVDat->Set(GetId(), pAP->GetAttributeAsDword("index", 0));
}

Which appears to be replacing the entry for the character data with the character index?!?

Anyone has any idea why or how this is ever needed?

RaiseException

Sentry Issue: STORM-ENGINE-AS

Unhandled C++ Exception: Fatal Error: Unhandled C++ Exception
  ?, in RaiseException
  File "throw.cpp", line 74, in _CxxThrowException
  File "xiosbase", line 257, in std::ios_base::clear
  File "xiosbase", line 262, in std::ios_base::clear
  File "file_service.cpp", line 83, in FILE_SERVICE::_ReadFile
...
(19 additional frame(s) were not displayed)

[BUG] Game needs to be restarted to reload interface configuration

Describe the bug
The game does not reload the interface ini files.

To Reproduce
Steps to reproduce the behavior:

  1. Start the game
  2. Edit some interface ini file
  3. Close and reopen the relevant interface
  4. Interface does not reflect changed config

Expected behavior
The game should reload the ini file and show the interface with the changed config

Additional context
In the past the game reloaded interface configs every time the interface was openend. A better solution might be to make this behavior configurable or possibly use a debug key to reload ini files.

Can't start game due russian letters in logs path

For russain users logs path can contain russain letters. For example : "C:\Users\VasyaPupkin\OneDrive\Документы\My Games\Sea Dogs\
After game start i see exception : An unhandled exception was thrown at 0x00007FFCDE2AD759 in engine.exe: Microsoft C ++ exception: std :: system_error at memory address 0x0000000D226FD610.

Call stack (sorry, some strings are in russian):
KernelBase.dll!00007ffcde2ad759() Нет данных
vcruntime140.dll!00007ffcd3996480() Нет данных
engine.exe!std::filesystem::_Throw_system_error_from_std_win_error(const __std_win_error _Errno) Строка 50 C++
[Внедренный фрейм] engine.exe!std::filesystem::_Check_convert_result(const __std_fs_convert_result) Строка 55 C++
[Внедренный фрейм] engine.exe!std::filesystem::_Convert_narrow_to_wide(const __std_code_page) Строка 69 C++
[Внедренный фрейм] engine.exe!std::filesystem::_Convert_stringoid_to_wide(const std::basic_string_view<char,std::char_traits>) Строка 260 C++
[Внедренный фрейм] engine.exe!std::filesystem::_Convert_Source_to_wide(const char * const &) Строка 342 C++
engine.exe!std::filesystem::u8path<char const *,0>(const char * const & _Source) Строка 1432 C++

engine.exe!FILE_SERVICE::DeleteFile(const char * filename) Строка 61 C++
engine.exe!WinMain(HINSTANCE
_ * hInstance, HINSTANCE__ * hPrevInstance, char * szCmdLine, int iCmdShow) Строка 79 C++

[BUG] EqMultiply(const CMatrix &m1, const CMatrix &m2) can be called with invalid m1 matrix

Describe the bug
inline void CMatrix::EqMultiply(const CMatrix &m1, const CMatrix &m2) can be called with invalid m1 matrix
To Reproduce
Steps to reproduce the behavior:

  1. I just build the latest commit from develop
  2. Use resources from sd-teho-public/develop-rus
  3. Start executable from vs or not
  4. See error

Expected behavior
No access violation

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Dump https://drive.google.com/file/d/1fCB38Vgj_xGfKV40thK0qDD7U9jXjLnI/view?usp=sharing

Ship icon instead of Sea on world map

Hello. I noticed, that in original COAS code textures for World Map Actions are confused. Exit to ship has sea icon's number and Exit to sea has ship icon's number. And I have bug on latest engine version. I always see Ship icon on world map instead of Sea icon. I tested it alot, and by logging WM_UpdateCurrentAction method I find that when we see sea icon, game logs out 1 in string sti(worldMap.encounter_type), but 1 means ShipEnc. And I find 3 ways to fix it: first one is changing 235 and 223 strings in file wdm_player_ship.cpp. I've replaced -1 by 0. The second one is adding Log_info in WM_UpdateCurrentAction method. And the last one is adding Log_info in WM_SetPossibleCommands method and pressing Enter once I on world map. Also, I find doubtful code in BI_MSG_REFRESH:
if (m_pShipIcon) m_pShipIcon->SetUpdate(); It seems like bad way to fix Ship icon on world map.

To Reproduce
Just change icons number to normal in WM_InitializeCommands method. Normal numeration u can see in /Textures/BATTLE_INTERFACE/WorldMapCommands.tga.tx.

Expected behavior
Fix this problem by replacing -1 by 0 in engine scripts that I described. Also game developers should change texture numbers in scripts. Ship is 4 12 and Sea is 1 9.
Screenshots
https://drive.google.com/file/d/1V-2snzaKKnyuelkuzuybK9Gd9m-Ee0QT/view?usp=sharing
https://drive.google.com/file/d/1UOjUk0rjMJzwLFDfBRg_axS7b4-3asUW/view?usp=sharing

Crash in COMPILER::GetSaveState

Sentry Issue: STORM-ENGINE-AK

Unhandled C++ Exception: Fatal Error: Unhandled C++ Exception
  ?, in RaiseException
  File "throw.cpp", line 74, in _CxxThrowException
  File "xiosbase", line 261, in unknown::clear
  File "xiosbase", line 266, in std::ios_base::clear
  File "file_service.cpp", line 83, in FILE_SERVICE::_ReadFile
...
(19 additional frame(s) were not displayed)

Most likely caused by someone putting something that is not a save file into a save profile, a zip archive for example. I think this is caused by not checking the save file header.

Feature: understand why bPostProcessEnabled is false and what will happen after enabling it

I would like to understand:

  • why bPostProcessEnabled is false?
  • should I rewrite it from asm to HLSL?
  • what will happen after enabling it?

Some log from discord - already known information:

q4a — 03.05.2021
I wanted to understand what current shaders do and started with small one:
https://github.com/storm-devs/storm-engine/blob/develop/src/techniques/postprocess/postprocess_shader.h
But looks like it was disabled and newer calls because of this line commented out:
https://github.com/storm-devs/storm-engine/blob/develop/src/libs/renderer/sdevice.cpp#L361
It was modified in this commit:
02d86a9#diff-d19d7f5cf5224e1c43653497eae01f143fa786809b3c5bcf651d98e13db8720aL391
and I would like to know - should I ignore this shader or better remove it?

kb31 — 03.05.2021
Honestly, I do not remember why did I disable it
Likely it was causing issues
I think we should try to turn it back anyway

q4a — 03.05.2021
when I turned on it in code and engine.ini - I got black screen instead of intro video

kb31 — 03.05.2021
That might be because some code is missing from dx9render.cpp...

cooodesloth — 03.05.2021
@q4a you could also try to find a related commit in the thunderstorm fork to know exactly why it was disabled

q4a — 03.05.2021
I found: storm-devs/thunderstorm-engine@696d2eb

cooodesloth — 03.05.2021
seems like it was disabled even before storm-devs/thunderstorm-engine@696d2eb#diff-7baa1c729b48852f3fa56b26eb0338225e2071f7e2ae4697c86835bccb8348e7L736

kb31 — 03.05.2021
Yeah as I said I disabled it long time ago
As I recall now, I likely tried to achieve correct sequence of directx device free
So this was not meant to be disabled forever, that's why the shader was not removed

[BUG] Linux build: _DEBUG macro is not set

Describe the bug
When building the project on Linux without any IDE, the _DEBUG macro is not set. This prevents some features, in particular, Breakpoint() function in game scripts doesn't work.

To Reproduce
Steps to reproduce the behavior:

  1. Build the project as described in Linux workflow
  2. Verify that _DEBUG code has not been compiled
    • In the game's scripts, put Breakpoint() at the start of ./PROGRAM/seadogs.c and run the engine
    • Also can directly check that by looking on the code through a debugger
      • E.g. disas/m on apps/engine/src/main.cpp:main in gdb

Expected behavior
As I understand it, debug build should allow for triggering breakpoints through scripts and other features (I think special controls can be set?) that are enabled when _DEBUG macro is active.

Additional context
AFAIK _DEBUG macro is specific to Microsoft Visual Studio.

SKY::GetPixelColor

Sentry Issue: STORM-ENGINE-C0

EXCEPTION_ACCESS_VIOLATION_READ: Fatal Error: EXCEPTION_ACCESS_VIOLATION_READ
  File "SKY.cpp", line 741, in SKY::GetPixelColor
  File "SKY.cpp", line 711, in SKY::CalculateAlphaForSun
  File "SunGlow.cpp", line 747, in SUNGLOW::GetSunFadeoutFactor
  File "SunGlow.cpp", line 240, in SUNGLOW::Realize
  File "Core.cpp", line 555, in CORE::ProcessRealize
...
(8 additional frame(s) were not displayed)

Particles-Editor

Приветствую!
Меня интересует возможность в партикл-эдиторе назначить текстуру большего размера. Такое возможно? И как в целом это можно сделать?

crashpad::CrashpadClient::DumpAndCrash

Sentry Issue: STORM-ENGINE-CQ

0x40000015 / 0x00000001: Fatal Error: 0x40000015 / 0x00000001
  ?, in crashpad::CrashpadClient::DumpAndCrash
  ?, in raise
  ?, in abort
  File "purevirt.cpp", line 29, in _purecall
  File "ship.cpp", line 1275, in SHIP::ProcessMessage
...
(20 additional frame(s) were not displayed)

as @mitrokosta noticed, there is a common misusage of raw pointer to the entity that should be queried from EntityManager

[BUG] [CoAS] Strange behavior when fading to a new location

Describe the bug
After the cure the lord during the main Peter Blood questline in CoAS, the camera is positioned above the scene and the game gets stuck. Saving and reloading the game fixes the issue.

To Reproduce
Steps to reproduce the behavior:

  1. Start the Peter Blood quest line
  2. Follow the quest and cure the lord
  3. Wait for the screen to fade to black and the new location to be loaded
  4. Camera is stuck (and other potential issues)

Expected behavior
The new scene is loaded (estate office), with you facing the desk.

Screenshots
afbeelding

Additional context
This seems to be a problem with the original game scripts, where two faders are created. One for the fade-to-black effect and one for the loading screen. This causes issues with the various fader event handlers.

Rewriting the fader scripts might be necessary.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.