|
@@ -5,7 +5,7 @@ This code uses a lot of drummyfish's `img2map.py` code as-is; I simply wrapped i
|
|
|
|
|
|
The plan is to get this app to a point where you point it at an assets folder and either create a new map or edit an existing map image. From that point, it can export classes or images, whichever is preferred.
|
|
The plan is to get this app to a point where you point it at an assets folder and either create a new map or edit an existing map image. From that point, it can export classes or images, whichever is preferred.
|
|
|
|
|
|
-To use the C generator by itself, just create a python script with the following:
|
|
|
|
|
|
+To use the C generator by itself, you can use the following code:
|
|
|
|
|
|
```Python
|
|
```Python
|
|
from anarchmap import AnarchMap
|
|
from anarchmap import AnarchMap
|
|
@@ -14,7 +14,7 @@ map = AnarchMap('./level0.gif')
|
|
map.printC()
|
|
map.printC()
|
|
```
|
|
```
|
|
|
|
|
|
-You can then use that file similar to drummyfish's original script: `python3 myscript.py > level0.c`
|
|
|
|
|
|
+The above code is included as `example-printc.py`, and can be used like so: `python3 example-printc.py > level0.c`.
|
|
|
|
|
|
## License
|
|
## License
|
|
I release everything in this repository under CC0 1.0 (public domain, https://creativecommons.org/publicdomain/zero/1.0/) + a waiver of all other IP rights (including patents), which is as follows:
|
|
I release everything in this repository under CC0 1.0 (public domain, https://creativecommons.org/publicdomain/zero/1.0/) + a waiver of all other IP rights (including patents), which is as follows:
|