Skip to content

Commit

Permalink
Version 1.3.1, reworked map viewer pins, updated map
Browse files Browse the repository at this point in the history
  • Loading branch information
maciej-trebacz committed Feb 16, 2025
1 parent 9c7252c commit 3f4ff1c
Show file tree
Hide file tree
Showing 31 changed files with 86 additions and 31 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Change Log

## 1.3.1 (2025-02-16)

### World

* Reworked map viewer pins, added pins for all controllable models and weapons
* Updated the static world map image

## 1.3.0 (2025-02-15)

### World
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "ff7-ultima",
"private": true,
"version": "1.3.0",
"version": "1.3.1",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ff7-ultima"
version = "1.3.0"
version = "1.3.1"
description = "Real-time editor for Final Fantasy VII"
authors = ["m4v3r"]
edition = "2021"
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"productName": "FF7 Ultima",
"version": "1.3.0",
"version": "1.3.1",
"identifier": "org.m4v3r.ff7-ultima",
"build": {
"beforeDevCommand": "npm run dev",
Expand Down
Binary file removed src/assets/map-model-0.png
Binary file not shown.
Binary file removed src/assets/map-model-13.png
Binary file not shown.
Binary file removed src/assets/map-model-3.png
Binary file not shown.
Binary file removed src/assets/map-model-4.png
Binary file not shown.
Binary file removed src/assets/map-model-40.png
Binary file not shown.
Binary file removed src/assets/map-model-5.png
Binary file not shown.
Binary file removed src/assets/map-model-6.png
Binary file not shown.
Binary file added src/assets/pin-buggy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/pin-chocobo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/pin-cid.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/pin-cloud.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/pin-diamond.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/pin-emerald.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/pin-highwind.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/pin-redsubmarine.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/pin-ruby.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/pin-submarine.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/pin-tifa.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/pin-tinybronco.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/pin-ultimate.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/pin-zolom.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/worldmap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 11 additions & 7 deletions src/components/map/ModelOverlay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,20 @@ const ModelOverlay: React.FC<ModelOverlayProps> = ({ zoomRef, visible = true })
models.push(...gameState.worldModels);
models.push(...additionalModels);
} else if (gameState.worldMapType === 2) {
const submarine = gameState.worldModels.find(model => model.model_id === 13 && model.y < -2000);
const submarine = gameState.worldModels.find(model => [13, 28].includes(model.model_id) && model.y < -2000);
if (submarine) {
models.push(submarine);
}
MIN_SIZE = 100;
const emerald = gameState.worldModels.find(model => model.model_id === 30);
if (emerald) {
models.push(emerald);
}
MIN_SIZE = 250;
MAX_SIZE = 750;
} else if (gameState.worldMapType === 3) {
models.push(...gameState.worldModels.filter(model => model.model_id === 0));
MIN_SIZE = 100;
MAX_SIZE = 750;
models.push(...gameState.worldModels.filter(model => [0, 1, 2].includes(model.model_id)));
MIN_SIZE = 150;
MAX_SIZE = 600;
}

if (gameState.worldMapType === 2) {
Expand All @@ -65,12 +69,12 @@ const ModelOverlay: React.FC<ModelOverlayProps> = ({ zoomRef, visible = true })
});
}

const quadSize = Math.min(MAX_SIZE, Math.max(MIN_SIZE, MAX_SIZE / zoomRef.current));

// Filter out models that don't have textures
const availableModelIds = MODEL_TEXTURES.map(config => config.id);
const filteredModels = models.filter(model => availableModelIds.includes(model.model_id));

const quadSize = Math.min(MAX_SIZE, Math.max(MIN_SIZE, MAX_SIZE / zoomRef.current));

return (
<>
{filteredModels.map((model, index) => (
Expand Down
72 changes: 57 additions & 15 deletions src/components/map/modelTextures.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
import { Texture } from 'three';
import Model0Pin from '@/assets/map-model-0.png';
import Model3Pin from '@/assets/map-model-3.png';
import Model40Pin from '@/assets/map-model-40.png';
import Model13Pin from '@/assets/map-model-13.png';
import Model6Pin from '@/assets/map-model-6.png';
import Model4Pin from '@/assets/map-model-4.png';
import Model5Pin from '@/assets/map-model-5.png';
import CloudPin from '@/assets/pin-cloud.png';
import TifaPin from '@/assets/pin-tifa.png';
import CidPin from '@/assets/pin-cid.png';
import DiamondPin from '@/assets/pin-diamond.png';
import EmeraldPin from '@/assets/pin-emerald.png';
import RubyPin from '@/assets/pin-ruby.png';
import UltimatePin from '@/assets/pin-ultimate.png';
import HighwindPin from '@/assets/pin-highwind.png';
import SubmarinePin from '@/assets/pin-submarine.png';
import BuggyPin from '@/assets/pin-buggy.png';
import ChocoboPin from '@/assets/pin-chocobo.png';
import TinyBroncoPin from '@/assets/pin-tinybronco.png';
import ZolomPin from '@/assets/pin-zolom.png';
import RedSubmarinePin from '@/assets/pin-redsubmarine.png';

export interface ModelTextureConfig {
id: number;
Expand All @@ -16,42 +23,77 @@ export interface ModelTextureConfig {
export const MODEL_TEXTURES: ModelTextureConfig[] = [
{
id: 0,
texture: Model0Pin,
texture: CloudPin,
name: 'Cloud',
},
{
id: 1,
texture: TifaPin,
name: 'Tifa',
},
{
id: 2,
texture: CidPin,
name: 'Cid',
},
{
id: 3,
texture: Model3Pin,
texture: HighwindPin,
name: 'Highwind',
},
{
id: 4,
texture: Model4Pin,
texture: ChocoboPin,
name: 'Wild Chocobo',
},
{
id: 5,
texture: Model5Pin,
texture: TinyBroncoPin,
name: 'Tiny Bronco',
},
{
id: 6,
texture: Model6Pin,
texture: BuggyPin,
name: 'Buggy',
},
{
id: 10,
texture: DiamondPin,
name: 'Diamond Weapon',
},
{
id: 11,
texture: UltimatePin,
name: 'Ultimate Weapon',
},
{
id: 13,
texture: Model13Pin,
texture: SubmarinePin,
name: 'Submarine',
},
{
id: 19,
texture: Model4Pin,
texture: ChocoboPin,
name: 'Chocobo',
},
{
id: 28,
texture: RedSubmarinePin,
name: 'Red Submarine',
},
{
id: 29,
texture: RubyPin,
name: 'Ruby Weapon',
},
{
id: 30,
texture: EmeraldPin,
name: 'Emerald Weapon',
},
{
id: 40,
texture: Model40Pin,
texture: ZolomPin,
name: 'Zolom',
},
];
Expand Down
4 changes: 3 additions & 1 deletion src/components/modals/VariablesEditorModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,8 @@ export function VariablesEditorModal({ isOpen, setIsOpen, ff7 }: VariablesEditor
await loadVariables();
};

const bankTitles = ["1/2", "3/4", "B/C", "D/E", "7/F"]

return (
<Modal
open={isOpen}
Expand All @@ -174,7 +176,7 @@ export function VariablesEditorModal({ isOpen, setIsOpen, ff7 }: VariablesEditor
<SelectContent>
{[1, 2, 3, 4, 5].map((bank) => (
<SelectItem key={bank} value={bank.toString()} className="text-xs">
Bank {bank}
Bank {bank} ({bankTitles[bank - 1]})
</SelectItem>
))}
</SelectContent>
Expand Down
8 changes: 4 additions & 4 deletions updater.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"version": "1.3.0",
"notes": "Added map viewer feature",
"version": "1.3.1",
"notes": "Reworked map viewer pins",
"pub_date": "2025-02-12T12:00:00Z",
"platforms": {
"windows-x86_64": {
"signature": "dW50cnVzdGVkIGNvbW1lbnQ6IHNpZ25hdHVyZSBmcm9tIHRhdXJpIHNlY3JldCBrZXkKUlVRWktFU284d290Tis5Sjl6T0NJbWs0TGN4cUZuaStZNWRmNUVxb205RVlVWU5jbkJBV2tkaDQva0oyaTREb1dueitncVdCdWNqQkVIOEZqZmZ5eVdLWURzRlphb3gyVXdnPQp0cnVzdGVkIGNvbW1lbnQ6IHRpbWVzdGFtcDoxNzM5NjQ1NDI0CWZpbGU6RkY3IFVsdGltYV8xLjMuMF94NjQtc2V0dXAuZXhlCk5zNk42bm1wTW4xbW1ua2tZOE54Z1dvTmN6RitwOFYwWGt0QXR2U1drS1RVOFc4N3ZCU1p3SDRvdWJPMXVkNmRxTHU3TWMyRUtwR05FMzRpNmVmOERBPT0K",
"url": "https://github.com/maciej-trebacz/ff7-ultima/releases/download/1.3.0/FF7.Ultima_1.3.0_x64-setup.exe"
"signature": "dW50cnVzdGVkIGNvbW1lbnQ6IHNpZ25hdHVyZSBmcm9tIHRhdXJpIHNlY3JldCBrZXkKUlVRWktFU284d290Tis0dzZ4bmpLQSt3QlZTUXpmbnN6R0ZOd3IzUHo1a1RUTk9SdlVsQlUrcmdLT3hOZHNtMUUvUmhaNkwzVTZFSERxOUprNS9Gd1M3YTQ4Z2VrVjNVdFEwPQp0cnVzdGVkIGNvbW1lbnQ6IHRpbWVzdGFtcDoxNzM5NzE4ODAzCWZpbGU6RkY3IFVsdGltYV8xLjMuMV94NjQtc2V0dXAuZXhlCnIyQXA5Y3IySS9qSnFlaVA2WXZGMDhIVnZaRG5oQlVyQnhiT0hsTGRpUTlpZEFyMWJYTHo5OWtmMENUQlpTWnUyRmhhL0xFY0orUEhaVEMzR2h3ckJ3PT0K",
"url": "https://github.com/maciej-trebacz/ff7-ultima/releases/download/1.3.1/FF7.Ultima_1.3.1_x64-setup.exe"
}
}
}

0 comments on commit 3f4ff1c

Please sign in to comment.