Skip to content

Commit

Permalink
refactor: use smaller JPGs for images
Browse files Browse the repository at this point in the history
  • Loading branch information
BigJk committed Dec 25, 2023
1 parent 8faa64d commit e99307d
Show file tree
Hide file tree
Showing 48 changed files with 31 additions and 9 deletions.
Binary file added assets/images/alien1.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 assets/images/alien1.png
Binary file not shown.
Binary file added assets/images/alien2.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 assets/images/alien2.png
Binary file not shown.
Binary file added assets/images/alien3.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 assets/images/alien3.png
Binary file not shown.
Binary file added assets/images/alien4.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 assets/images/alien4.png
Binary file not shown.
Binary file added assets/images/artifact_chest.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 assets/images/artifact_chest.png
Binary file not shown.
Binary file added assets/images/core.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 assets/images/core.png
Binary file not shown.
Binary file added assets/images/cryo_start.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 assets/images/cryo_start.png
Binary file not shown.
Binary file added assets/images/dark_city1.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 assets/images/dark_city1.png
Binary file not shown.
Binary file added assets/images/dark_city2.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 assets/images/dark_city2.png
Binary file not shown.
Binary file added assets/images/inner_strange.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 assets/images/inner_strange.png
Binary file not shown.
Binary file added assets/images/inner_workspace.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 assets/images/inner_workspace.png
Binary file not shown.
Binary file added assets/images/merchant.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 assets/images/merchant.png
Binary file not shown.
Binary file added assets/images/people1.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 assets/images/people1.png
Diff not rendered.
Binary file added assets/images/people2.jpg
Binary file removed assets/images/people2.png
Diff not rendered.
Binary file added assets/images/plant_enviroment.jpg
Binary file removed assets/images/plant_enviroment.png
Diff not rendered.
Binary file added assets/images/red_room.jpg
Binary file removed assets/images/red_room.png
Diff not rendered.
Binary file added assets/images/the_egg.jpg
Binary file removed assets/images/the_egg.png
Diff not rendered.
Binary file added assets/images/title.jpg
Binary file removed assets/images/title.png
Diff not rendered.
Binary file added assets/images/underground1.jpg
Binary file removed assets/images/underground1.png
Diff not rendered.
2 changes: 1 addition & 1 deletion assets/scripts/events/base/merchant.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
register_event("MERCHANT", {
name = "A strange figure",
description =
[[!!merchant.png
[[!!merchant.jpg
The merchant is a tall, lanky figure draped in a long, tattered coat made of plant fibers and animal hides. Their face is hidden behind a mask made of twisted roots and vines, giving them an unsettling, almost alien appearance.
Expand Down
2 changes: 1 addition & 1 deletion assets/scripts/events/misc/raising_the_bar.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
register_event("RAISING_THE_BAR", {
name = "Raising The Bar",
description = [[!!red_room.png
description = [[!!red_room.jpg
...]],
choices = {
Expand Down
2 changes: 1 addition & 1 deletion assets/scripts/events/misc/recycle_device.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
register_event("RECYCLE_DEVICE", {
name = "Talking Being",
description = [[!!artifact_chest.png
description = [[!!artifact_chest.jpg
...]],
choices = {
Expand Down
2 changes: 1 addition & 1 deletion assets/scripts/events/misc/talking_being.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
register_event("TALKING_BEING", {
name = "Talking Being",
description = [[!!alien2.png
description = [[!!alien2.jpg
Suddenly, a massive vine with a gaping, tooth-filled maw emerges from the shadows. It towers over you, its presence imposing and otherworldly.
Expand Down
2 changes: 1 addition & 1 deletion assets/scripts/events/stage_0/start.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
register_event("START", {
name = "Waking up...",
description = [[!!cryo_start.png
description = [[!!cryo_start.jpg
You wake up in a dimly lit room, the faint glow of a red emergency light casting an eerie hue over the surroundings. The air is musty and stale, the metallic scent of the cryo-chamber still lingering in your nostrils. You feel groggy and disoriented, your mind struggling to process what's happening.
Expand Down
2 changes: 1 addition & 1 deletion assets/scripts/events/stage_1/bio_kingdom.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
register_event("BIO_KINGDOM", {
name = "Bio Kingdom",
description = [[!!plant_enviroment.png
description = [[!!plant_enviroment.jpg
You finally find a way leading to the outside, and step out of the cryo facility into a world you no longer recognize.
Expand Down
2 changes: 1 addition & 1 deletion assets/scripts/events/stage_1/the_core.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
register_event("THE_CORE", {
name = "The Wasteland",
description = [[!!underground1.png
description = [[!!underground1.jpg
You finally find a way you thought would lead to the outside, only to discover that you're still inside the massive facility known as *"The Core."*
Expand Down
2 changes: 1 addition & 1 deletion assets/scripts/events/stage_1/the_wasteland.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
register_event("THE_WASTELAND", {
name = "The Wasteland",
description = [[!!dark_city1.png
description = [[!!dark_city1.jpg
You finally find a way leading to the outside, and with a deep breath, you step out into the unforgiving wasteland.
Expand Down
22 changes: 22 additions & 0 deletions internal/misc/downsize_pngs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash

input_dir="$1"

if [ ! -d "$input_dir" ]; then
echo "Usage: $0 <input_directory>"
exit 1
fi

# Loop through all PNG files in the specified directory
for file in "$input_dir"/*.png; do
if [ -f "$file" ]; then
filename=$(basename -- "$file")
filename_no_extension="${filename%.*}"
output_file="${file%.png}.jpg"

# Convert PNG to JPG with quality 30 and save in the same directory
convert "$file" -quality 30 "$output_file"

echo "Converted $file to $output_file"
fi
done
2 changes: 1 addition & 1 deletion ui/menus/mainmenu/mainmenu.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ type Model struct {
}

func NewModel(zones *zone.Manager, settings settings.Settings, values []uiset.Value, saver uiset.Saver) Model {
img, _ := image2.Fetch("title.png", image2.WithResize(180, 9))
img, _ := image2.Fetch("title.jpg", image2.WithResize(180, 9))

audio.PlayMusic("planet_mining")

Expand Down

0 comments on commit e99307d

Please sign in to comment.