Skip to content

Commit d8266d8

Browse files
committed
Minor changes
1 parent 8a6a725 commit d8266d8

File tree

7 files changed

+32
-12
lines changed

7 files changed

+32
-12
lines changed

README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Jazz² Resurrection is reimplementation of the game **Jazz Jackrabbit 2** releas
4040
* Copy contents of original *Jazz Jackrabbit 2* directory to `‹Game›\Source\`
4141
* Run `‹Game›\Jazz2.exe`, `‹Game›\Jazz2_avx2.exe` or `‹Game›\Jazz2_sdl2.exe` application
4242

43-
`‹Game›` *denotes path to Jazz² Resurrection. The game requires **Windows 7** (or newer) and GPU with **OpenGL 3.0** support. Game files should **not** be copied to* `Program Files`*. Cache is recreated during intro cinematics on the first startup, so it can't be skipped.*
43+
`‹Game›` *denotes path to Jazz² Resurrection. The game requires **Windows 7** (or newer) and GPU with **OpenGL 3.0** support. Game files should **not** be copied to* `Program Files`*. Cache is recreated during the intro cinematics on the first startup, so it can't be skipped. Also, the sound effects in the intro cinematics require the cache, so they will be missing the first time the game is started up.*
4444

4545
### Linux
4646
* Download the game
@@ -51,7 +51,7 @@ Jazz² Resurrection is reimplementation of the game **Jazz Jackrabbit 2** releas
5151
* Run `‹Game›/jazz2` or `‹Game›/jazz2_sdl2` application
5252
* If packages are used, the game should be visible in application list
5353

54-
`‹Game›` *denotes path to Jazz² Resurrection.* `~` *denotes user's home directory. The game requires GPU with **OpenGL 3.0** or **OpenGL ES 3.0** (ARM) support. Cache is recreated during intro cinematics on the first startup, so it can't be skipped.*
54+
`‹Game›` *denotes path to Jazz² Resurrection.* `~` *denotes user's home directory. The game requires GPU with **OpenGL 3.0** or **OpenGL ES 3.0** (ARM) support. Cache is recreated during the intro cinematics on the first startup, so it can't be skipped. Also, the sound effects in the intro cinematics require the cache, so they will be missing the first time the game is started up.*
5555

5656
<sup>Alternatively, you can use package repository for your Linux distribution:</sup><br>
5757
[![ArchLinux](https://img.shields.io/badge/Arch%20Linux-grey?logo=archlinux&logoColor=ffffff)](https://aur.archlinux.org/packages/jazz2-bin)
@@ -66,7 +66,7 @@ Jazz² Resurrection is reimplementation of the game **Jazz Jackrabbit 2** releas
6666
* Copy contents of original *Jazz Jackrabbit 2* directory to `~/Library/Application Support/Jazz² Resurrection/Source/`
6767
* Run the newly installed application
6868

69-
`~` *denotes user's home directory. Cache is recreated during intro cinematics on the first startup, so it can't be skipped.*
69+
`~` *denotes user's home directory. Cache is recreated during the intro cinematics on the first startup, so it can't be skipped. Also, the sound effects in the intro cinematics require the cache, so they will be missing the first time the game is started up.*
7070

7171
Alternatively, you can install it using <sub><sub>[![Homebrew](https://img.shields.io/homebrew/cask/v/jazz2-resurrection?logo=homebrew&logoColor=ffffff&label=Homebrew&color=b56b2b)](https://formulae.brew.sh/cask/jazz2-resurrection)</sub></sub> `brew install --cask jazz2-resurrection`
7272

@@ -79,15 +79,15 @@ Alternatively, you can install it using <sub><sub>[![Homebrew](https://img.shiel
7979
* `‹Storage›/Download/Jazz² Resurrection/Source/`
8080
* Run the newly installed application
8181

82-
`‹Storage›` *usually denotes internal storage on your device.* `Content` *directory is included directly in APK file, no action is needed. The game requires **Android 5.0** (or newer) and GPU with **OpenGL ES 3.0** support. Cache is recreated during intro cinematics on the first startup.*
82+
`‹Storage›` *usually denotes internal storage on your device.* `Content` *directory is included directly in APK file, no action is needed. The game requires **Android 5.0** (or newer) and GPU with **OpenGL ES 3.0** support. Cache is recreated during the intro cinematics on the first startup. Also, the sound effects in the intro cinematics require the cache, so they will be missing the first time the game is started up.*
8383

8484
### Nintendo Switch
8585
* Download the game
8686
* Install `Jazz2.nro` package (custom firmware is needed)
8787
* Copy contents of original *Jazz Jackrabbit 2* directory to `/Games/Jazz2/Source/` on SD card
8888
* Run the newly installed application with enabled full RAM access
8989

90-
*Cache is recreated during intro cinematics on the first startup, so it can't be skipped. It may take more time, so white screen could be shown longer than expected.*
90+
*Cache is recreated during the intro cinematics on the first startup, so it can't be skipped. It may take more time, so white screen could be shown longer than expected. Also, the sound effects in the intro cinematics require the cache, so they will be missing the first time the game is started up.*
9191

9292
### Web (Emscripten)
9393
* Go to https://deat.tk/jazz2/wasm/
@@ -104,6 +104,8 @@ Alternatively, you can install it using <sub><sub>[![Homebrew](https://img.shiel
104104
* Alternatively, copy the files to `\Games\Jazz² Resurrection\Source\` on an external drive to preserve settings across installations, the application must be set to `Game` type, `exFAT` is recommended or correct read/write permissions must be assigned
105105
* Run the application again
106106

107+
*Cache is recreated during the intro cinematics on the first startup, so it can't be skipped. It may take more time, so white screen could be shown longer than expected. Also, the sound effects in the intro cinematics require the cache, so they will be missing the first time the game is started up.*
108+
107109

108110
## Building the application
109111

Sources/Jazz2/Compatibility/JJ2Anims.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@ namespace Jazz2::Compatibility
2020
SmallVector<SampleSection, 0> samples;
2121

2222
auto s = fs::Open(path, FileAccess::Read);
23-
DEATH_ASSERT(s->IsValid(), "Cannot open file for reading", JJ2Version::Unknown);
23+
if (!s->IsValid()) {
24+
LOGE("Cannot open file \"{}\" for reading", path);
25+
return JJ2Version::Unknown;
26+
}
2427

2528
bool seemsLikeCC = false;
2629

Sources/Jazz2/Compatibility/JJ2Data.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@ namespace Jazz2::Compatibility
2222
bool JJ2Data::Open(StringView path, bool strictParser)
2323
{
2424
auto s = fs::Open(path, FileAccess::Read);
25-
DEATH_ASSERT(s->IsValid(), "Cannot open file for reading", false);
25+
if (!s->IsValid()) {
26+
LOGE("Cannot open file \"{}\" for reading", path);
27+
return false;
28+
}
2629

2730
std::uint32_t magic = s->ReadValue<std::uint32_t>();
2831
std::uint32_t signature = s->ReadValue<std::uint32_t>();

Sources/Jazz2/Compatibility/JJ2Episode.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,10 @@ namespace Jazz2::Compatibility
2525
bool JJ2Episode::Open(StringView path)
2626
{
2727
auto s = fs::Open(path, FileAccess::Read);
28-
DEATH_ASSERT(s->IsValid(), "Cannot open file for reading", false);
28+
if (!s->IsValid()) {
29+
LOGE("Cannot open file \"{}\" for reading", path);
30+
return false;
31+
}
2932

3033
Name = fs::GetFileNameWithoutExtension(path);
3134
StringUtils::lowercaseInPlace(Name);

Sources/Jazz2/Compatibility/JJ2Level.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,11 @@ namespace Jazz2::Compatibility
2020
{
2121
bool JJ2Level::Open(StringView path, bool strictParser)
2222
{
23-
auto s = fs::Open(path, FileAccess::Read);
24-
DEATH_ASSERT(s->IsValid(), "Cannot open file for reading", false);
23+
auto s = fs::Open(path, FileAccess::Read);
24+
if (!s->IsValid()) {
25+
LOGE("Cannot open file \"{}\" for reading", path);
26+
return false;
27+
}
2528

2629
// Skip copyright notice
2730
s->Seek(180, SeekOrigin::Current);

Sources/Jazz2/Compatibility/JJ2Strings.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,10 @@ namespace Jazz2::Compatibility
4545
bool JJ2Strings::Open(StringView path)
4646
{
4747
auto s = fs::Open(path, FileAccess::Read);
48-
DEATH_ASSERT(s->IsValid(), "Cannot open file for reading", false);
48+
if (!s->IsValid()) {
49+
LOGE("Cannot open file \"{}\" for reading", path);
50+
return false;
51+
}
4952

5053
Name = fs::GetFileNameWithoutExtension(path);
5154
StringUtils::lowercaseInPlace(Name);

Sources/Jazz2/Compatibility/JJ2Tileset.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@ namespace Jazz2::Compatibility
1414
bool JJ2Tileset::Open(StringView path, bool strictParser)
1515
{
1616
auto s = fs::Open(path, FileAccess::Read);
17-
DEATH_ASSERT(s->IsValid(), "Cannot open file for reading", false);
17+
if (!s->IsValid()) {
18+
LOGE("Cannot open file \"{}\" for reading", path);
19+
return false;
20+
}
1821

1922
// Skip copyright notice
2023
s->Seek(180, SeekOrigin::Current);

0 commit comments

Comments
 (0)