Skip to content

Commit

Permalink
Fixed SPUI bug if coordinates were negative, affected 'GlobalUIGGE-9-…
Browse files Browse the repository at this point in the history
…EP1'
  • Loading branch information
emd4600 committed Nov 23, 2019
1 parent 5f17fe8 commit e8c80cc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/sporemodder/ProjectManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -1324,6 +1324,7 @@ public void unpackPresets(List<ProjectPreset> presets) {
// Create the project or override the existing one
final Project project = getOrCreateProject(preset.getName());
project.setReadOnly(true);
project.saveSettings();

// The project is passed to set the 'packageSignature' setting, but we don't want that in presets
final DBPFUnpackingTask task = new DBPFUnpackingTask(files.values(), project.getFolder(), project, converters);
Expand Down
2 changes: 0 additions & 2 deletions src/sporemodder/file/rw4/RWBlendShapeBuffer.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,12 @@ public void read(StreamReader stream) throws IOException {
for (int i = 0; i < data.length; ++i) {
offsets[i] = stream.readLEUInt();
if (offsets[i] != 0) endOffsets.add(offsets[i]);
if (offsets[i] != 0) System.out.println(offsets[i] + baseOffset);
}
endOffsets.add((long) sectionInfo.size);
shapeCount = stream.readLEInt();
vertexCount = stream.readLEInt();
unk = stream.readLEInt();
boneIndicesCount = stream.readLEInt();
System.out.println("vertex count: " + vertexCount);

Iterator<Long> it = endOffsets.iterator();
it.next();
Expand Down
3 changes: 3 additions & 0 deletions src/sporemodder/file/spui/components/DirectImage.java
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ public float getHeight() {
@Override
public void drawImage(GraphicsContext graphics, double sx, double sy, double sw, double sh, double dx, double dy,
double dw, double dh, Color shadeColor) {
if (sx < 0) sx = 0;
if (sy < 0) sy = 0;

if (image == null) {
graphics.setFill(shadeColor);
graphics.fillRect(dx, dy, dw, dh);
Expand Down

0 comments on commit e8c80cc

Please sign in to comment.