Opened 12 years ago

Closed 12 years ago

Last modified 7 months ago

#8636 closed patch

Correct some graphical glitches for Brocken Sword 1 Mac

Reported by: criezy Owned by: sev-
Priority: normal Component: Engine: Sword1
Keywords: Cc:
Game: Broken Sword 1


In several screen there were graphical glitches with the original patch for BS1 Mac support (see this patch submission for snapshots). These come from the fact that the mac version of BS1 uses the last color of the palette for the background while the PC version uses the first color of the palette. Consequently, there were two parts in the code that needed to be adapted (both in engines/sword1/screen.cpp):

In Screen::fnSetPalette(), in addation to setting the first color to black, I am also setting the last one to black. I am not sure of this. Maybe it would be better to set either the firt one or the last one to black depending on the BS1 version instead of setting both colors to black.

In Screen::draw(), for the screen 54 (Syria, outside of the cave) a background parallax layer is used and then the _layerBlcoks[0] is written above for the blocks that do not use the background color (0 or 255, while only 0 was tested). Here again, I am not sure if we should test for both 0 and 255 or only one of them depending on the BS1 version.

This patch works fine with the mac version, but should be tested with the PC versions, especially in the screens 10 and 78 (Nico's flat in Paris and final scene in scotland before the tower is blown apart, where we see this background color) and of course screen 54. I can provide save games for all three locations if needed.

Ticket imported from: #1701058. Ticket imported from: patches/741.

Attachments (1)

bs1mac_graphics.patch (1.2 KB) - added by criezy 12 years ago.
Correct glitches with BS1 mac

Download all attachments as: .zip

Change History (7)

Changed 12 years ago by criezy

Attachment: bs1mac_graphics.patch added

Correct glitches with BS1 mac

comment:1 Changed 12 years ago by fingolfin

Owner: set to lavosspawn

comment:2 Changed 12 years ago by fingolfin

It should actually be tested in more rooms, I'd tend to think -- maybe the PC and mac version simply *swapped* the role of color 0 and 255, in which case it would be wrong to force both to be black / transparent all the time.
I.e. maybe we have to add a _transparancyColor member, and set it to 0 / 255 depending on which version of the game is used, then adapt the code to use that.

Robert, what do you think?

comment:3 Changed 12 years ago by criezy

Actually both the Mac and the PC versions are using color 0 for the color of the top and bottom bars (when the inventory is not visible and we are not in a conversation). So this is not a simple swap of the role of color 0 and 255. This also means that the mac version require both colors 0 and 255 to be set to black.

comment:4 Changed 12 years ago by sev-

Instead of putting risk to PC version I just restricted these changes to Mac version only and applied the patch.

comment:5 Changed 12 years ago by sev-

Owner: changed from lavosspawn to sev-
Status: newclosed

comment:6 Changed 7 months ago by digitall

Component: Engine: Sword1
Game: Broken Sword 1
Note: See TracTickets for help on using tickets.