Opened 17 years ago

Closed 17 years ago

Last modified 5 years ago

#8619 closed patch

AGI: AGIPAL Support

Reported by: SF/mthreepwood Owned by: SF/mthreepwood
Priority: normal Component: Engine: AGI
Version: Keywords:
Cc: Game:

Description

Hey all,

Yes. I know what you're thinking. clone2727 is making a patch, so it can't be good. :P

Anyway, I've added AGIPAL support to ScummVM. I'm attaching the patch. I added some comments to show the format of the file.

I would like to commit it, but sev has asked me to post it here first. I will commit it if someone gives me the go ahead. I am assigning this to myself, but change it if you feel like it.

So, have fun playing AGIMouse 1.1 with AGIPAL!

-clone2727

Ticket imported from: #1684685. Ticket imported from: patches/724.

Attachments (3)

agipal.diff (2.8 KB ) - added by SF/mthreepwood 17 years ago.
Patch for AGIPAL
agipal.2.diff (2.8 KB ) - added by SF/mthreepwood 17 years ago.
Updated Patch
agipalNew.diff (2.1 KB ) - added by SF/mthreepwood 17 years ago.
Updated Patch x2

Download all attachments as: .zip

Change History (10)

by SF/mthreepwood, 17 years ago

Attachment: agipal.diff added

Patch for AGIPAL

by SF/mthreepwood, 17 years ago

Attachment: agipal.2.diff added

Updated Patch

comment:1 by SF/mthreepwood, 17 years ago

Fixed issues with spacing=>tabs and some variable name changes with _ File Added: agipal.diff

comment:2 by sev-, 17 years ago

Some notes. First, look at spaces around operators, i.e. instead of

for (int j=0; j<48; j++)

you should write

for (int j = 0; j < 48; j++)

Also I recommend you to use instead of those magic values something like:

pos = 0;

for (int i = 0; i < 8 * 3; i++)

pos = 8 * 3 * 2; // chunk 3 for (int i = 0; i < 8 * 3; i++) _agipalPalette[i] = palData[pos + i];

This immediately shows logical error in your second loop since you're read twice more data as required.

Next important thing. Why are you writing deinitVideo(), initVideo()? This is complete overhead. Correct way would be just to set palette:

initPalette(_agipalPalette);

Next question. Why do you reset palette after you set it? I.e. what is the purpose of it? Also you will need to store it in savegame later, so it will be not possible if you blindly clear it.

by SF/mthreepwood, 17 years ago

Attachment: agipalNew.diff added

Updated Patch x2

comment:3 by SF/mthreepwood, 17 years ago

Ok. Uploading updated patch with changes File Added: agipalNew.diff

comment:4 by sev-, 17 years ago

Looks ok now. Please, commit.

comment:5 by SF/mthreepwood, 17 years ago

Committed :D

comment:6 by SF/mthreepwood, 17 years ago

Status: newclosed

comment:7 by digitall, 5 years ago

Component: Engine: AGI
Note: See TracTickets for help on using tickets.