Permalink
Browse files

fixed second half of map preview

  • Loading branch information...
movAX13h committed Sep 2, 2018
1 parent 714278e commit 29c90e3f61493615e45bf3c4a4244c60005cc13b
Showing with 12 additions and 9 deletions.
  1. +6 −2 P8Coder/Core/Cartridge.cs
  2. +1 −1 P8Coder/Core/Project.cs
  3. +1 −1 P8Coder/Properties/AssemblyInfo.cs
  4. +4 −5 README.md
@@ -173,7 +173,11 @@ private void createMapSprite()
int x = 8 * (i % 128);
int y = 8 * (i / 128);
int id = Convert.ToInt32(ids.Substring(i * 2, 2), 16);
int id = 0;
// the second half seems to have bytes reversed
id = Convert.ToInt32(y >= 32 * 8 ? ids.Substring(i * 2 + 1, 1) + ids.Substring(i * 2, 1) : ids.Substring(i * 2, 2), 16);
if (id == 0) g.FillRectangle(Brushes.Black, x,y, 8,8);
else g.DrawImage(Sprites[id], x, y);
}
@@ -206,7 +210,7 @@ private bool readHeader(string text)
private bool readVersion(string text)
{
//NOTE: version changes with every release of pico-8
//NOTE: version number changes with every release of pico-8 even if no change was made to the file format
// This means that we have no simple check to see if the file is compatible.
string[] parts = text.Split(' ');
@@ -96,7 +96,7 @@ public bool Load(string filename)
{
fromXElement(xproject);
}
catch(Exception e)
catch
{
return false;
}
@@ -33,4 +33,4 @@
// übernehmen, indem Sie "*" eingeben:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.4.0.0")]
[assembly: AssemblyFileVersion("1.5.0.0")]
@@ -46,20 +46,19 @@ If you're looking for other tools for pico-8, check the [awesome-PICO-8](https:/
#### WARNING
P8Coder overwrites all lua code of the cartridge you select! Everything else (gfx/map/sfx/music) remains untouched.
### Known bug
Currently the lower half of the map (if used) is not rendered correctly. Will fix this soon (2018-05-07)
## Download
- Binary (v1.4) from author server: http://thrill-project.com/archiv/coding/P8Coder.zip (147kb)
- Binary (v1.5) from author server: http://thrill-project.com/archiv/coding/P8Coder.zip (150kb)
- Upgrade: replace the old exe with the new one
## Source code
- C# .NET4.5, VisualStudio 15 (2017) solution
- uses https://github.com/PavelTorgashov/FastColoredTextBox
- should be easy :)
## Change Log
- **1.5** - 2018-09-02
- fixed: map preview (second half was scrambled)
- **1.4** - 2018-05-07
- added: doubleclick on cart text field opens explorer and selects the cart
- fixed: cart loading for new file format version (p8 sections are optional since pico-8 v0.1.11e)

0 comments on commit 29c90e3

Please sign in to comment.