Skip to content

Commit

Permalink
renderer: LBA1 3D Model Spheres and Lines Colours
Browse files Browse the repository at this point in the history
  • Loading branch information
xesf committed Aug 1, 2023
1 parent 3854e7d commit 93e7bcf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 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 Climbing Ladders
- LBA1 3D Model Shading
- LBA1 3D Model Spheres and Lines Colours
- Extra bonus speed
- Behavioiur Menu Icons CSS
- Fixed Sprites out of place caused by wrong scene point coordinates
Expand Down
8 changes: 4 additions & 4 deletions src/resources/parsers/body1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,8 @@ function loadLines(object: any, data: DataView, offset: number) {
object.lines = [];
for (let i = 0; i < object.linesSize; i += 1) {
object.lines.push({
unk1: data.getUint16(offset, true),
colour: Math.floor((data.getUint16(offset + 2, true)) / 16),
unk1: data.getUint8(offset),
colour: Math.floor((data.getUint8(offset + 1)) / 16),
vertex1: data.getUint16(offset + 4, true) / 6,
vertex2: data.getUint16(offset + 6, true) / 6
});
Expand All @@ -190,8 +190,8 @@ function loadSpheres(object: any, data: DataView, offset: number) {
object.spheres = [];
for (let i = 0; i < object.spheresSize; i += 1) {
object.spheres.push({
unk1: data.getUint16(offset, true),
colour: Math.floor((data.getUint16(offset + 2, true)) / 16),
unk1: data.getUint8(offset),
colour: Math.floor((data.getUint8(offset + 1)) / 16),
size: data.getUint16(offset + 4, true) * WORLD_SCALE,
vertex: data.getUint16(offset + 6, true) / 6
});
Expand Down

0 comments on commit 93e7bcf

Please sign in to comment.