Skip to content

Commit

Permalink
data: switch from WEBP to JPEG
Browse files Browse the repository at this point in the history
  • Loading branch information
rr- committed Aug 30, 2024
1 parent 8c8204b commit 2083dfd
Show file tree
Hide file tree
Showing 40 changed files with 36 additions and 35 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
- fixed `/give` console command confusing logging around mismatched items (#1463, regression from 3.0)
- fixed `/flip` console command misreporting an already enabled flipmap as off (regression from 4.0)
- fixed console commands causing improper ring shutdown with selected inventory item (#1460, regression from 3.0)
- changed WEBP images to JPEG with 95% quality (no visual difference, but the title menu loads significantly faster)
- improved level load times
- improved logs module names readability
- improved crash debug information on Windows
Expand Down
46 changes: 23 additions & 23 deletions data/ship/cfg/TR1X_gameflow.json5
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// Refer to https://github.com/LostArtefacts/TR1X/blob/stable/GAMEFLOW.md
// for usage.

"main_menu_picture": "data/images/title.webp",
"main_menu_picture": "data/images/title.jpg",
"savegame_fmt_legacy": "saveati.%d",
"savegame_fmt_bson": "save_tr1_%02d.dat",
"force_game_modes": null,
Expand Down Expand Up @@ -40,7 +40,7 @@
],
"sequence": [
{"type": "play_fmv", "fmv_path": "fmv/mansion.avi"},
{"type": "loading_screen", "picture_path": "data/images/gym.webp", "display_time": 5},
{"type": "loading_screen", "picture_path": "data/images/gym.jpg", "display_time": 5},
{"type": "start_game"},
{"type": "loop_game"},
{"type": "stop_game"},
Expand All @@ -63,7 +63,7 @@
],
"sequence": [
{"type": "play_fmv", "fmv_path": "fmv/snow.avi"},
{"type": "loading_screen", "picture_path": "data/images/peru.webp", "display_time": 5},
{"type": "loading_screen", "picture_path": "data/images/peru.jpg", "display_time": 5},
{"type": "start_game"},
{"type": "loop_game"},
{"type": "stop_game"},
Expand All @@ -84,7 +84,7 @@
"data/injections/vilcabamba_textures.bin",
],
"sequence": [
{"type": "loading_screen", "picture_path": "data/images/peru.webp", "display_time": 5},
{"type": "loading_screen", "picture_path": "data/images/peru.jpg", "display_time": 5},
{"type": "start_game"},
{"type": "loop_game"},
{"type": "stop_game"},
Expand All @@ -110,7 +110,7 @@
"data/injections/valley_textures.bin",
],
"sequence": [
{"type": "loading_screen", "picture_path": "data/images/peru.webp", "display_time": 5},
{"type": "loading_screen", "picture_path": "data/images/peru.jpg", "display_time": 5},
{"type": "start_game"},
{"type": "loop_game"},
{"type": "stop_game"},
Expand All @@ -136,7 +136,7 @@
"data/injections/qualopec_textures.bin",
],
"sequence": [
{"type": "loading_screen", "picture_path": "data/images/peru.webp", "display_time": 5},
{"type": "loading_screen", "picture_path": "data/images/peru.jpg", "display_time": 5},
{"type": "start_game"},
{"type": "loop_game"},
{"type": "stop_game"},
Expand All @@ -158,7 +158,7 @@
],
"sequence": [
{"type": "play_fmv", "fmv_path": "fmv/lift.avi"},
{"type": "loading_screen", "picture_path": "data/images/greece.webp", "display_time": 5},
{"type": "loading_screen", "picture_path": "data/images/greece.jpg", "display_time": 5},
{"type": "start_game"},
{"type": "loop_game"},
{"type": "stop_game"},
Expand Down Expand Up @@ -187,7 +187,7 @@
"data/injections/colosseum_textures.bin",
],
"sequence": [
{"type": "loading_screen", "picture_path": "data/images/greece.webp", "display_time": 5},
{"type": "loading_screen", "picture_path": "data/images/greece.jpg", "display_time": 5},
{"type": "start_game"},
{"type": "loop_game"},
{"type": "stop_game"},
Expand All @@ -210,7 +210,7 @@
"data/injections/midas_textures.bin",
],
"sequence": [
{"type": "loading_screen", "picture_path": "data/images/greece.webp", "display_time": 5},
{"type": "loading_screen", "picture_path": "data/images/greece.jpg", "display_time": 5},
{"type": "start_game"},
{"type": "loop_game"},
{"type": "stop_game"},
Expand All @@ -236,7 +236,7 @@
"data/injections/cistern_textures.bin",
],
"sequence": [
{"type": "loading_screen", "picture_path": "data/images/greece.webp", "display_time": 5},
{"type": "loading_screen", "picture_path": "data/images/greece.jpg", "display_time": 5},
{"type": "start_game"},
{"type": "loop_game"},
{"type": "stop_game"},
Expand Down Expand Up @@ -266,7 +266,7 @@
{"enemy_num": 82, "object_ids": [86, 144, 129]},
],
"sequence": [
{"type": "loading_screen", "picture_path": "data/images/greece.webp", "display_time": 5},
{"type": "loading_screen", "picture_path": "data/images/greece.jpg", "display_time": 5},
{"type": "start_game"},
{"type": "loop_game"},
{"type": "stop_game"},
Expand All @@ -292,7 +292,7 @@
],
"sequence": [
{"type": "play_fmv", "fmv_path": "fmv/vision.avi"},
{"type": "loading_screen", "picture_path": "data/images/egypt.webp", "display_time": 5},
{"type": "loading_screen", "picture_path": "data/images/egypt.jpg", "display_time": 5},
{"type": "start_game"},
{"type": "loop_game"},
{"type": "stop_game"},
Expand All @@ -317,7 +317,7 @@
"data/injections/obelisk_textures.bin",
],
"sequence": [
{"type": "loading_screen", "picture_path": "data/images/egypt.webp", "display_time": 5},
{"type": "loading_screen", "picture_path": "data/images/egypt.jpg", "display_time": 5},
{"type": "start_game"},
{"type": "loop_game"},
{"type": "stop_game"},
Expand Down Expand Up @@ -345,7 +345,7 @@
"data/injections/sanctuary_textures.bin",
],
"sequence": [
{"type": "loading_screen", "picture_path": "data/images/egypt.webp", "display_time": 5},
{"type": "loading_screen", "picture_path": "data/images/egypt.jpg", "display_time": 5},
{"type": "start_game"},
{"type": "loop_game"},
{"type": "stop_game"},
Expand Down Expand Up @@ -380,7 +380,7 @@
],
"sequence": [
{"type": "play_fmv", "fmv_path": "fmv/canyon.avi"},
{"type": "loading_screen", "picture_path": "data/images/atlantis.webp", "display_time": 5},
{"type": "loading_screen", "picture_path": "data/images/atlantis.jpg", "display_time": 5},
{"type": "remove_guns"},
{"type": "remove_scions"},
{"type": "start_game"},
Expand All @@ -407,7 +407,7 @@
],
"sequence": [
{"type": "play_fmv", "fmv_path": "fmv/pyramid.avi"},
{"type": "loading_screen", "picture_path": "data/images/atlantis.webp", "display_time": 5},
{"type": "loading_screen", "picture_path": "data/images/atlantis.jpg", "display_time": 5},
{"type": "start_game"},
{"type": "give_item", "object_id": 84, "quantity": 1},
{"type": "setup_bacon_lara", "anchor_room": 10},
Expand All @@ -432,18 +432,18 @@
"data/injections/scion_collision.bin",
],
"sequence": [
{"type": "loading_screen", "picture_path": "data/images/atlantis.webp", "display_time": 5},
{"type": "loading_screen", "picture_path": "data/images/atlantis.jpg", "display_time": 5},
{"type": "start_game"},
{"type": "loop_game"},
{"type": "stop_game"},
{"type": "level_stats", "level_id": 15},
{"type": "play_fmv", "fmv_path": "fmv/end.avi"},
{"type": "play_synced_audio", "audio_id": 19},
{"type": "display_picture", "picture_path": "data/images/end.webp", "display_time": 7.5},
{"type": "display_picture", "picture_path": "data/images/credits_1.webp", "display_time": 7.5},
{"type": "display_picture", "picture_path": "data/images/credits_2.webp", "display_time": 7.5},
{"type": "display_picture", "picture_path": "data/images/credits_3.webp", "display_time": 7.5},
{"type": "total_stats", "picture_path": "data/images/install.webp"},
{"type": "display_picture", "picture_path": "data/images/end.jpg", "display_time": 7.5},
{"type": "display_picture", "picture_path": "data/images/credits_1.jpg", "display_time": 7.5},
{"type": "display_picture", "picture_path": "data/images/credits_2.jpg", "display_time": 7.5},
{"type": "display_picture", "picture_path": "data/images/credits_3.jpg", "display_time": 7.5},
{"type": "total_stats", "picture_path": "data/images/install.jpg"},
{"type": "exit_to_title"},
],
"strings": {},
Expand Down Expand Up @@ -561,7 +561,7 @@
"data/injections/pda_model.bin",
],
"sequence": [
{"type": "display_picture", "picture_path": "data/images/eidos.webp", "display_time": 1},
{"type": "display_picture", "picture_path": "data/images/eidos.jpg", "display_time": 1},
{"type": "play_fmv", "fmv_path": "fmv/core.avi"},
{"type": "play_fmv", "fmv_path": "fmv/escape.avi"},
{"type": "play_fmv", "fmv_path": "fmv/cafe.avi"},
Expand Down
16 changes: 8 additions & 8 deletions data/ship/cfg/TR1X_gameflow_ub.json5
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// Refer to https://github.com/LostArtefacts/TR1X/blob/stable/GAMEFLOW.md
// for usage.

"main_menu_picture": "data/images/title_ub.webp",
"main_menu_picture": "data/images/title_ub.jpg",
"savegame_fmt_legacy": "saveuba.%d",
"savegame_fmt_bson": "save_trub_%02d.dat",
"force_game_modes": null,
Expand Down Expand Up @@ -105,12 +105,12 @@
{"type": "stop_game"},
{"type": "level_stats", "level_id": 3},
{"type": "play_synced_audio", "audio_id": 19},
{"type": "display_picture", "picture_path": "data/images/end.webp", "display_time": 7.5},
{"type": "display_picture", "picture_path": "data/images/credits_ub.webp", "display_time": 7.5},
{"type": "display_picture", "picture_path": "data/images/credits_1.webp", "display_time": 7.5},
{"type": "display_picture", "picture_path": "data/images/credits_2.webp", "display_time": 7.5},
{"type": "display_picture", "picture_path": "data/images/credits_3.webp", "display_time": 7.5},
{"type": "total_stats", "picture_path": "data/images/install.webp"},
{"type": "display_picture", "picture_path": "data/images/end.jpg", "display_time": 7.5},
{"type": "display_picture", "picture_path": "data/images/credits_ub.jpg", "display_time": 7.5},
{"type": "display_picture", "picture_path": "data/images/credits_1.jpg", "display_time": 7.5},
{"type": "display_picture", "picture_path": "data/images/credits_2.jpg", "display_time": 7.5},
{"type": "display_picture", "picture_path": "data/images/credits_3.jpg", "display_time": 7.5},
{"type": "total_stats", "picture_path": "data/images/install.jpg"},
{"type": "exit_to_title"},
],
"strings": {},
Expand All @@ -127,7 +127,7 @@
"data/injections/pda_model.bin",
],
"sequence": [
{"type": "display_picture", "picture_path": "data/images/eidos.webp", "display_time": 1},
{"type": "display_picture", "picture_path": "data/images/eidos.jpg", "display_time": 1},
{"type": "play_fmv", "fmv_path": "fmv/core.avi"},
{"type": "play_fmv", "fmv_path": "fmv/escape.avi"},
{"type": "exit_to_title"},
Expand Down
Binary file added data/ship/data/images/atlantis.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed data/ship/data/images/atlantis.webp
Binary file not shown.
Binary file added data/ship/data/images/credits_1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed data/ship/data/images/credits_1.webp
Binary file not shown.
Binary file added data/ship/data/images/credits_2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed data/ship/data/images/credits_2.webp
Binary file not shown.
Binary file added data/ship/data/images/credits_3.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed data/ship/data/images/credits_3.webp
Binary file not shown.
Binary file added data/ship/data/images/credits_3_alt.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed data/ship/data/images/credits_3_alt.webp
Binary file not shown.
Binary file added data/ship/data/images/credits_ps1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed data/ship/data/images/credits_ps1.webp
Binary file not shown.
Binary file added data/ship/data/images/credits_ub.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed data/ship/data/images/credits_ub.webp
Binary file not shown.
Binary file added data/ship/data/images/egypt.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed data/ship/data/images/egypt.webp
Binary file not shown.
Binary file added data/ship/data/images/eidos.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed data/ship/data/images/eidos.webp
Binary file not shown.
Binary file added data/ship/data/images/end.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed data/ship/data/images/end.webp
Binary file not shown.
Binary file added data/ship/data/images/greece.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed data/ship/data/images/greece.webp
Binary file not shown.
Binary file added data/ship/data/images/greece_saturn.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed data/ship/data/images/greece_saturn.webp
Binary file not shown.
Binary file added data/ship/data/images/gym.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed data/ship/data/images/gym.webp
Binary file not shown.
Binary file added data/ship/data/images/install.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed data/ship/data/images/install.webp
Binary file not shown.
Binary file added data/ship/data/images/peru.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed data/ship/data/images/peru.webp
Binary file not shown.
Binary file added data/ship/data/images/title.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed data/ship/data/images/title.webp
Binary file not shown.
Binary file added data/ship/data/images/title_og_alt.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed data/ship/data/images/title_og_alt.webp
Binary file not shown.
Binary file added data/ship/data/images/title_ub.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed data/ship/data/images/title_ub.webp
Binary file not shown.
8 changes: 4 additions & 4 deletions tools/generate_images
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ def format_size_change(source_size: int, target_size: int) -> str:

def parse_args() -> argparse.Namespace:
parser = argparse.ArgumentParser(
description="Converts image assets to WEBP format for better file sizes"
description="Converts image assets to JPG format for better file sizes"
)
parser.add_argument(
"quality",
type=int,
default=100,
default=95,
nargs="?",
help="output quality (100 for lossless)",
)
Expand All @@ -50,7 +50,7 @@ def main() -> None:
total_target_size = 0

for source_path in SOURCE_DIR.rglob("*.png"):
target_path = TARGET_DIR / f"{source_path.stem}.webp"
target_path = TARGET_DIR / f"{source_path.stem}.jpg"

print(
f"Converting {source_path.relative_to(SOURCE_DIR)} "
Expand All @@ -63,7 +63,7 @@ def main() -> None:

check_call(
[
"convert",
"magick",
str(source_path),
"-quality",
str(args.quality),
Expand Down

0 comments on commit 2083dfd

Please sign in to comment.