WiiLink24 / ForecastChannel

File generator for the Forecast Channel
Mozilla Public License 2.0
24 stars 6 forks source link

Consolidate location text #14

Open larsenv opened 4 months ago

larsenv commented 4 months ago

This changes the function used to write location text, making it write a location to the file only once. For example, rather than writing United States each time a city is defined, it will write it once and the offset to the text will point to it. This will save 30 kb of data in the US file, but much less is saved when you compress it. I figured that this PR once @noahpistilli merges it will help bring some of the data files uncompressed to less than 0x20000 byte (is that the limit?) because luna told me that any game which uses the forecast channel is broken because of the limit. This has been tested

noahpistilli commented 4 months ago

I really like the idea but I don't like the implementation. There are multiple ways you can condense the code.

larsenv commented 4 months ago

Sorry bout that, I'm not as good with the language as you are, if you want to fix it go ahead