Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhanced singlefile conversion and support for DE1 formats #1148

Merged
merged 11 commits into from
Oct 6, 2019

Conversation

heinezen
Copy link
Member

Adds more options to the "singlefile" conversion to support newer game versions and SLPs outside of DRS archives. Specifically:

  • New option to convert single SLPs
  • Support for SLP 3.0, 4.0X, 4.1 (+ documentation)
  • Some preparation for DE2

@heinezen heinezen requested review from TheJJ and mic-e August 27, 2019 21:43
@heinezen heinezen added area: assets Involved with assets (images, sounds, ...) nice new thing ☺ A new feature that was not there before lang: python Done in Python code labels Aug 27, 2019
@heinezen heinezen mentioned this pull request Sep 2, 2019
17 tasks
Copy link
Member

@TheJJ TheJJ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome work!

doc/media/slp-files.md Outdated Show resolved Hide resolved
doc/media/slp-files.md Outdated Show resolved Hide resolved
doc/media/slp-files.md Outdated Show resolved Hide resolved
doc/media/slp-files.md Outdated Show resolved Hide resolved
doc/media/slp-files.md Outdated Show resolved Hide resolved
"""
return determine_rgba_matrix(self.pcolor, palette, player_number)
# fetch drawing instruction
cmd = self.get_byte_at(dpos)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we have to make sure this is properly resolved to a c++-only call. we can see that in the cythonized html file. otherwise this will really slow down the conversion.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't the function declaration with cdef ensure that?

openage/convert/smp.pyx Outdated Show resolved Hide resolved
Comment on lines +603 to +606
cdef class SMPOutlineFrame(SMPFrame):
"""
SMPFrame for the outline graphics.
"""
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hm, i wonder why they are doing that. in any way, if the outline information is separate from the graphics info, we have to merge them in order to do our alpha-encoding.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably because they wanted a smaller number of commands (?) Or something to do with their expanded rendering. Merging should work fine, since he outlines does not overlay with any other pixels in the main graphic.

openage/convert/smp.pyx Outdated Show resolved Hide resolved
Comment on lines 177 to +178
subtex = TextureImage(
frame.get_picture_data(palette, self.player_id),
frame.get_picture_data(main_palette, player_palette),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here we have to do the merging of the outline info and the graphics i think.
what do we do about the damage graphics? (we should likely discuss that in the chat :)

Copy link
Member

@TheJJ TheJJ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whee

@TheJJ TheJJ merged commit 0cc4ec6 into SFTtech:master Oct 6, 2019
@heinezen heinezen deleted the slp-single branch October 13, 2021 19:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: assets Involved with assets (images, sounds, ...) lang: python Done in Python code nice new thing ☺ A new feature that was not there before
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants