Skip to content

Clean the xml more #7

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

chronicsilly
Copy link
Contributor

I already do this with my xmls manually, but having it be automatic would be nice too.

An xml called "rodriguez-phase2" that looks like this:

<!DOCTYPE codename-engine-character>
<character sprite="rodriguez-phase2" icon="rodriguez-phase2">
	<anim name="idle" anim="idle" x="0" y="0" fps="24" loop="false"/>
	<anim name="singUP" anim="up" x="0" y="0" fps="24" loop="false"/>
	<anim name="singLEFT" anim="left" x="0" y="0" fps="24" loop="false"/>
	<anim name="singRIGHT" anim="right" x="0" y="0" fps="24" loop="false"/>
	<anim name="singDOWN" anim="down" x="0" y="0" fps="24" loop="false"/>
</character>

Would now look like this when saving (If pretty print is disabled):

<!DOCTYPE codename-engine-character>
<character>
	<anim name="idle" anim="idle"/>
	<anim name="singUP" anim="up"/>
	<anim name="singLEFT" anim="left"/>
	<anim name="singRIGHT" anim="right"/>
	<anim name="singDOWN" anim="down"/>
</character>

@chronicsilly
Copy link
Contributor Author

Also added pretty print stuff that would compress the xml to one line

@chronicsilly
Copy link
Contributor Author

^ the buildXML function does something similar but only for the node, not the anim nodes so yea

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant