Zal0 / ZGB

Game Boy / Color engine with lots of features
MIT License
706 stars 50 forks source link

Fix gbm2c tile path #50

Closed cnolan3 closed 1 year ago

cnolan3 commented 2 years ago

I was getting errors when building new map files I had created using gbmb18, the gbm2c program was using the full path to the tile.gbr file as the name for _bank... which was causing a compilation error.

I added a check to gbm2c to look for the last '\' (or '/' on linux, just to be safe) and only use everything after it as the name.

In one of my commits I replaced the gbm2c exe with a fixed one I built, I made it x86 so let me know if you'd rather I used x64 or something.

gbm2c_error gbm2c_error_output

Zal0 commented 2 years ago

Thanks for the pr You should avoid full paths anyways and use relative paths instead or you'll have problems when moving to a different computer or working with other people in the same project

cnolan3 commented 2 years ago

@Zal0 ah, yeah you're right I see what you mean, good point. I realize now that you don't have to use the full path when setting the tile file in GBMB, but because the tool auto fills that information I assumed at first that it was necessary for GBMB to function, so from a ux perspective I still believe this pr would be an improvement that would reduce frustration from people new to the engine. At the very least I think adding a note to the README or the wiki would help alleviate some confusion around this.

Anyway, loving the project! I think this engine is a great set of tools for development, looking forward to working on a few games with it.

Zal0 commented 1 year ago

This has been fixed here https://github.com/Zal0/ZGB/commit/79705085265793110b28bc8a60c4baa5a7e18dcd