https://github.com/lerabot/svg2dc
svg to dreamcast engine exporter.
https://github.com/lerabot/svg2dc
c dreamcast game-engine retrogaming sega
Last synced: 2 months ago
JSON representation
svg to dreamcast engine exporter.
- Host: GitHub
- URL: https://github.com/lerabot/svg2dc
- Owner: lerabot
- Created: 2017-11-11T23:44:38.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-11-12T01:19:15.000Z (almost 8 years ago)
- Last Synced: 2024-12-27T23:42:21.426Z (10 months ago)
- Topics: c, dreamcast, game-engine, retrogaming, sega
- Language: Java
- Size: 4.8 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# svg2dc
svg to dreamcast engine exporter.

This is a small utility that convert our maps (created in [inkscape](https://inkscape.org/en/)) in a C fonction that loads all the asset into our custom Dreamcast engine. It is essentially a XML parser looking for particular data.
The program will check for any incompatible image size and will calculate the memory usage. It also keep tracks of filenames and will only load any duplicated assets once.
### How to use
1. Select the *Output Folder* first. This will be where your asset will be copied along with the *mapdata.c* file.
2. Select your SVG. Once it is selected it will do all the job for you- copying your asset into the *Output Folder*, converting the object position and size into something usable for my unamed DC engine.
### XML special tag

Here's some special XML tags that the software will catch
* u : expects a number between 1.0 and 0.0 - used for UV mapping.
* v : expects a number between 1.0 and 0.0 - used for UV mapping.
* setAnim : if the texture is a spritesheet, will select the appropriate sprite. expects a integer. you also need to set **u** and **v** for this to work
The program also detext if a images has been mirrored and will flip the UV map accordingly.
### Compatibility
You will need [processing](https://processing.org) in order to execute this.
If you're interested in using this for your project and want a less specific output than my custom engine, I'd be happy to try to make this more usable. Please fill an issue in or contact me at r.rabot_at_gmail.com