podecaradox / gm1konvertercrossplatform Goto Github PK
View Code? Open in Web Editor NEWA tool to convert strongholds gm1 and tgx files to png.
License: MIT License
A tool to convert strongholds gm1 and tgx files to png.
License: MIT License
make it so that the big image exports can be befined by width to get this result https://i.imgur.com/clw9NUk.png instead of this https://i.imgur.com/zCdlr9Q.png
Good day to you, i noticed that your readme file is poorly translated (as well as containing some broken links). I can fix it if you want.
Great tool btw
Whenever I click anim_castle.gm1 item program crashes.
This place
I was able to reproduce this crash.
It isn't managed .net exception, so there is no callstack. Only this error if I run program under debugger
An unhandled exception of type 'System.AccessViolationException' occurred in SkiaSharp
Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Hi! You have mentioned that you know how to do it, but the process of importing goes very slow. So I wanna say you: if it's working with no bugs, I would wait a whole day. Just please release it. We all thank you and wish you best luck. ^_^
Hi dude !
an error occurs when I want to run program .
"object reference not set to an instance of an object ."
how can I solve this ?
Problem is in a subject. I don't see any log file so I will describe my actions one by one.
After all that my game crashes while loading. What have i done wrong? ¯_(ツ)_/¯
For example when manually editing colortable, color is capped at value 248.
When editing, you are allowed to select any value between 0-255, but after you click save and then select the color again, the value is rounded and capped at 248, though it probably doesnt reflect how game works with the colors.
The color is encoded as A1R5G5B5, which means 5 bytes per color, which means 32 possible values (0-31).
It is assumed that the translation between 0-31 and 0-255 is linear, where 0-31 is simply divided by 8 (or 0-255 divided by 8).
The game renders colors from 0 to 255 though, which means the mapping of values is not as stated above, where 31*8 = 248.
I took some screenshots from game and created a map of rendered values.
The map is not 100% complete, but i think it is already clear how the colors are actually mapped and we can safely assume unknown values.
This should not be an issue as long as the conversion doesnt alter appearance of identical file in game through export/import, though i think we should reflect the colors better when exporting the image or displaying color table editor.
Luckily i dont think exporting and then importing an original image will result in color shift in game, as the maximum difference (7) is less than an unit (8) so the value should be rounded back to what it was.
I will do some tests later to see if there are any issues with the conversion, the above is just an assumption.
Color rendered in game - rrr / ggg / bbb - only found values displayed
rrr / ggg / bbb | linear color value | difference r-g-b | bytes | value
255 / 251 / 255 | 248 | 7-3-7 | 11111 | 31
247 / 243 / 247 | 240 | 7-3-7 | 11110 | 30
239 / 235 / 239 | 232 | 7-3-7 | 11101 | 29
231 / 227 / ? | 224 | 7-3-7 | 11100 | 28
222 / 219 / 222 | 216 | 6-3-6 | 11011 | 27
214 / 211 / 214 | 208 | 6-3-6 | 11010 | 26
? / 203 / 206 | 200 | 6-3-6 | 11001 | 25
? / ? / ? | 192 | 6-3-6 | 11000 | 24
189 / 186 / 189 | 184 | 5-2-5 | 10111 | 23
181 / ? / 181 | 176 | 5-2-5 | 10110 | 22
173 / 170 / 173 | 168 | 5-2-5 | 10101 | 21
165 / 162 / 165 | 160 | 5-2-5 | 10100 | 20
156 / 154 / 156 | 152 | 4-2-4 | 10011 | 19
148 / 146 / 148 | 144 | 4-2-4 | 10010 | 18
140 / 138 / 140 | 136 | 4-2-4 | 10001 | 17
132 / ? / 132 | 128 | 4-2-4 | 10000 | 16
123 / ? / 123 | 120 | 3-1-3 | 01111 | 15
115 / 113 / 115 | 112 | 3-1-3 | 01110 | 14
? / 105 / 107 | 104 | 3-1-3 | 01101 | 13
99 / 97 / 99 | 96 | 3-1-3 | 01100 | 12
90 / 89 / ? | 88 | 2-1-2 | 01011 | 11
82 / 81 / 82 | 80 | 2-1-2 | 01010 | 10
? / 73 / 74 | 72 | 2-1-2 | 01001 | 9
66 / 65 / 66 | 64 | 2-1-2 | 01000 | 8
57 / 56 / 57 | 56 | 1-0-1 | 00111 | 7
49 / 48 / 49 | 48 | 1-0-1 | 00110 | 6
41 / ? / 41 | 40 | 1-0-1 | 00101 | 5
? / 32 / 33 | 32 | 1-0-1 | 00100 | 4
24 / 24 / 24 | 24 | 0-0-0 | 00011 | 3
16 / 16 / 16 | 16 | 0-0-0 | 00010 | 2
8 / 8 / 8 | 8 | 0-0-0 | 00001 | 1
0 / 0 / 0 | 0 | 0-0-0 | 00000 | 0
The program does not read the gm folder
Hi. Very necessary stripes of lives. I will try to redraw them. Kinh if you can already unpacked files. I will redraw from and then post it here so that you pack them.
After some time of switching between gm1 file program crashes. There is no specific pattern and it happens on random file.
PS: game - Stronghold Crusader HD
It would be nice to be able to watch gm1 sprite info by clicking on image. Info like sprite index, its width and height and all other info that game uses. Like this:
Gm1KonverterCrossPlatform/Gm1KonverterCrossPlatform/Files/TGXImage.cs
Lines 21 to 33 in f5f44af
Hello Guys,
if you have some ideas for the Gm1Converter you can write it here Down.
Monsterfish had the idea to export Gm1 Files like tile_sea8 as one big image for editing, i can add this feature for the next update if you want. Also the bug with the black bars in the preview got a fix, i can implement that too.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.