Skip to content

Commit

Permalink
fix: scene points position not normalised
Browse files Browse the repository at this point in the history
  • Loading branch information
xesf committed Jul 31, 2023
1 parent f671708 commit 8f5bf39
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ _2023_
- LBA1 3D Model Shading
- Extra bonus speed
- Behavioiur Menu Icons CSS
- Fixed Sprites out of place caused by wrong scene point coordinates


## [v0.6.0](https://github.com/LBALab/lba2remake/compare/v0.5.0...v0.5.1) Big update!
Expand Down
4 changes: 3 additions & 1 deletion TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Below are some ideas we want to work on. Feel free to contribute with your own i

## 🐛 Bugs
- [ ] Voices volume too low
- [ ] LBA1: 3D Model Shading
- [x] LBA1: 3D Model Shading
- [ ] LBA1: 3D Model Quad Strips
- [x] LBA1: Ladders not working
- [ ] LBA1: Sprites out of place
Expand All @@ -22,6 +22,7 @@ Below are some ideas we want to work on. Feel free to contribute with your own i
- [ ] Weird Colors on Island Ground Textures (Ex: Otringal or Undergas)

## 🎮 Gameplay
- [ ] Intro Images/Scripting Images
- [ ] Save & Load Games
- [ ] Load Original Saved Games
- [ ] Fight System / Weapons
Expand All @@ -47,6 +48,7 @@ Below are some ideas we want to work on. Feel free to contribute with your own i
- [ ] Add Sun

## 🖥️ GUI
- [ ] Game Selection Menu
- [ ] Support Existing Additional Fan Translations
- [ ] Language Selection Menu
- [ ] Menu Options to Change Audio Volumes
Expand Down
5 changes: 3 additions & 2 deletions src/resources/parsers/scene1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -317,10 +317,11 @@ function loadPoints(scene, offset) {
const point = {
sceneIndex: scene.index,
index: i,
// normalise position
pos: [
((0x8000 - data.getInt16(offset + 4, true)) + 512) * WORLD_SCALE,
(((0x8000 - data.getInt16(offset + 4, true)) + 512) - 256) * WORLD_SCALE,
data.getInt16(offset + 2, true) * WORLD_SCALE,
data.getInt16(offset, true) * WORLD_SCALE
(data.getInt16(offset, true) + 256) * WORLD_SCALE
]
};
offset += 6;
Expand Down
5 changes: 3 additions & 2 deletions src/resources/parsers/scene2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -390,10 +390,11 @@ function loadPoints(scene, offset) {
const point = {
sceneIndex: scene.index,
index: i,
// normalize position
pos: [
((0x8000 - data.getInt32(offset + 8, true)) + 512) * WORLD_SCALE,
(((0x8000 - data.getInt32(offset + 8, true)) + 512) - 256) * WORLD_SCALE,
data.getInt32(offset + 4, true) * WORLD_SCALE,
data.getInt32(offset, true) * WORLD_SCALE
(data.getInt32(offset, true) + 256) * WORLD_SCALE
]
};
offset += 12;
Expand Down

0 comments on commit 8f5bf39

Please sign in to comment.