Skip to content

Commit ac1e965

Browse files
authored
Merge pull request #70 from boriel-basic/features/map-editor
ZXBSInstaller update for NEXT ROM on MAME
2 parents fe6de7f + 9e8fb6d commit ac1e965

81 files changed

Lines changed: 9920 additions & 375 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎README.md‎

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,23 +46,21 @@ This solution contains several projects that work together to provide the ZX Bas
4646

4747
## Credits
4848
- Icons from [SVG REPO](https://www.svgrepo.com/):
49+
- <a href="https://www.svgrepo.com" target="_blank">SVG Repo</a> CC0 License
50+
- <a href="https://www.figma.com/community/file/1071678557813409125?ref=svgrepo.com" target="_blank">Ananthanath A X Kalaiism</a> in PD License
4951
- <a href="https://github.com/blivesta/flexicon?ref=svgrepo.com" target="_blank">Blivesta</a> in MIT License
5052
- <a href="https://dazzleui.gumroad.com/l/dazzleiconsfree?ref=svgrepo.com" target="_blank">Dazzle Ui</a> in CC Attribution License
5153
- <a href="https://github.com/KDE/krita?ref=svgrepo.com" target="_blank">Kde</a> in GPL License
52-
- <a href="https://www.figma.com/@thinkcly?ref=svgrepo.com" target="_blank">Konstantin Filatov</a> in CC Attribution
54+
- <a href="https://www.figma.com/@thinkcly?ref=svgrepo.com" target="_blank">Konstantin Filatov</a> in CC Attribution License
55+
- <a href="https://github.com/krystonschwarze/coolicons?ref=svgrepo.com" target="_blank">Krystonschwarze</a> in CC Attribution License
5356
- <a href="https://dribbble.com/Mohamed_Raouf?ref=svgrepo.com" target="_blank">Mohamed Raouf</a> in CC Attribution License
57+
- <a href="https://github.com/neuicons/neu?ref=svgrepo.com" target="_blank">Neuicons</a> in MIT License via
5458
- <a href="https://github.com/phosphor-icons/phosphor-icons?ref=svgrepo.com" target="_blank">Phosphor</a> in MIT License
5559
- <a href="https://www.zondicons.com/?ref=svgrepo.com" target="_blank">Steve Schoger</a> in PD License
60+
- <a href="https://github.com/siemens/ix-icons?ref=svgrepo.com" target="_blank">Siemens</a> in MIT License
5661
- <a href="https://www.figma.com/@thewolfkit?ref=svgrepo.com" target="_blank">Thewolfkit</a> in CC Attribution License
5762
- <a href="https://github.com/UXAspects/UXAspects?ref=svgrepo.com" target="_blank">Uxaspects</a> in Apache License
5863
- <a href="https://github.com/uxwb/icons?ref=svgrepo.com" target="_blank">Uxwb</a> in GPL License
5964
- <a href="https://www.wishforge.games/?ref=svgrepo.com" target="_blank">Wishforge.games</a> in CC Attribution License
6065
- <a href="https://github.com/yamatsum/nonicons?ref=svgrepo.com" target="_blank">Yamatsum</a> in MIT License
6166
- <a href="https://github.com/32pixelsCo/zest-icons/blob/master/packages/zest-free/LICENSE.md?ref=svgrepo.com" target="_blank">Zest</a> in MIT License
62-
- <a href="https://github.com/neuicons/neu?ref=svgrepo.com" target="_blank">Neuicons</a> in MIT License via
63-
- <a href="https://dazzleui.gumroad.com/l/dazzleiconsfree?ref=svgrepo.com" target="_blank">Dazzle Ui</a> in CC Attribution License
64-
- <a href="https://github.com/siemens/ix-icons?ref=svgrepo.com" target="_blank">Siemens</a> in MIT License
65-
- <a href="https://github.com/32pixelsCo/zest-icons/blob/master/packages/zest-free/LICENSE.md?ref=svgrepo.com" target="_blank">Zest</a> in MIT License
66-
- <a href="https://www.figma.com/community/file/1071678557813409125?ref=svgrepo.com" target="_blank">Ananthanath A X Kalaiism</a> in PD License
67-
- <a href="https://github.com/siemens/ix-icons?ref=svgrepo.com" target="_blank">Siemens</a> in MIT License
68-
- <a href="https://www.svgrepo.com" target="_blank">SVG Repo</a> CC0 License

‎ZXBSInstaller.Log/ServiceLayer.cs‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1905,7 +1905,8 @@ private static ExternalTools_Version[] GetTBBLueMAMEVersions()
19051905
// All versions
19061906
var v = new ExternalTools_Version()
19071907
{
1908-
DownloadUrl = "https://github.com/Threetwosevensixseven/NexCreator/raw/master/bootroms/tbblue.zip",
1908+
//DownloadUrl = "https://github.com/Threetwosevensixseven/NexCreator/raw/master/bootroms/tbblue.zip",
1909+
DownloadUrl = "https://www.specnext.com/forum/download/file.php?id=1164",
19091910
OperatingSystem = OperatingSystems.All,
19101911
Version = "3.02.03",
19111912
};

‎ZXBSInstaller/ZXBSInstaller.csproj‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<ApplicationManifest>app.manifest</ApplicationManifest>
77
<AvaloniaUseCompiledBindingsByDefault>true</AvaloniaUseCompiledBindingsByDefault>
88
<ApplicationIcon>zxbs.ico</ApplicationIcon>
9-
<Version>1.0.2.0</Version>
9+
<Version>1.0.3</Version>
1010
</PropertyGroup>
1111
<ItemGroup>
1212
<None Remove="Assets\cancel.svg" />
195 Bytes
Loading

‎ZXBStudio/Assets/zxmaps_map.png‎

715 Bytes
Loading
Loading

‎ZXBStudio/DocumentEditors/ZXGraphics/FontGDUExportDialog.axaml.cs‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ private void CreateExample_BIN()
175175
{
176176
case FileTypes.Font:
177177
sb.AppendLine("' Example of use of custom font type");
178-
sb.AppendLine("POKE (uinteger 23606, @MyFont-256)");
178+
sb.AppendLine("POKE (uinteger 23606, @MyFont(0,0)-256)");
179179
sb.AppendLine("PRINT \"Hello World!\"");
180180
sb.AppendLine("STOP");
181181
sb.AppendLine("");
@@ -189,7 +189,7 @@ private void CreateExample_BIN()
189189
break;
190190
case FileTypes.UDG:
191191
sb.AppendLine("' Example of use of UDG/GDU");
192-
sb.AppendLine("POKE (uinteger 23675, @MyUDG)");
192+
sb.AppendLine("POKE (uinteger 23675, @MyUDG(0,0))");
193193
sb.AppendLine("PRINT \"UDG/GDU Table\"");
194194
sb.AppendLine("FOR n=0 TO 20");
195195
sb.AppendLine(" PRINT (144+n);\" - \";CHR(n+65);\": \";CHR(144+n)");
@@ -245,13 +245,13 @@ private void CreateExample_ASM()
245245
sb.AppendLine("' Example of use of the asm format");
246246
if (fileType.FileType == FileTypes.Font)
247247
{
248-
sb.AppendLine(string.Format("POKE (uinteger 23606, @{0}-256)", txtLabelName.Text));
248+
sb.AppendLine(string.Format("POKE (uinteger 23606, @{0}(0,0)-256)", txtLabelName.Text));
249249
sb.AppendLine("PRINT \"Hello World!\"");
250250
sb.AppendLine("STOP");
251251
}
252252
else
253253
{
254-
sb.AppendLine(string.Format("POKE (uinteger 23675, @{0})", txtLabelName.Text));
254+
sb.AppendLine(string.Format("POKE (uinteger 23675, @{0}(0,0))", txtLabelName.Text));
255255
sb.AppendLine("PRINT \"UDG/GDU Table\"");
256256
sb.AppendLine("FOR n=0 TO 20");
257257
sb.AppendLine(" PRINT (144+n);\" - \";CHR(n+65);\": \";CHR(144+n)");
@@ -275,15 +275,15 @@ private void CreateExample_DIM()
275275
switch (fileType.FileType)
276276
{
277277
case FileTypes.UDG:
278-
sb.AppendLine(string.Format("POKE (uinteger 23675, @{0})", txtLabelName.Text));
278+
sb.AppendLine(string.Format("POKE (uinteger 23675, @{0}(0))", txtLabelName.Text));
279279
sb.AppendLine("PRINT \"UDG/GDU Table\"");
280280
sb.AppendLine("FOR n=0 TO 20");
281281
sb.AppendLine(" PRINT (144+n);\" - \";CHR(n+65);\": \";CHR(144+n)");
282282
sb.AppendLine("NEXT n");
283283
sb.AppendLine("STOP");
284284
break;
285285
case FileTypes.Font:
286-
sb.AppendLine(string.Format("POKE (uinteger 23606, @{0}-256)", txtLabelName.Text));
286+
sb.AppendLine(string.Format("POKE (uinteger 23606, @{0}(0,0)-256)", txtLabelName.Text));
287287
sb.AppendLine("PRINT \"Hello World!\"");
288288
sb.AppendLine("STOP");
289289
break;

‎ZXBStudio/DocumentEditors/ZXGraphics/ImageViewImportControl.cs‎

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,15 @@
99
using SixLabors.ImageSharp.PixelFormats;
1010
using System;
1111
using System.Collections.Generic;
12+
using System.Diagnostics;
1213
using System.Linq;
1314
using System.Net;
1415
using System.Runtime.Intrinsics.X86;
1516
using System.Text;
1617
using System.Threading;
1718
using System.Threading.Tasks;
19+
using ZXBasicStudio.DocumentEditors.NextDows.log;
20+
using ZXBasicStudio.DocumentEditors.ZXGraphics.neg;
1821

1922
namespace ZXBasicStudio.DocumentEditors.ZXGraphics
2023
{
@@ -136,20 +139,12 @@ public ImageViewImportControl()
136139

137140
public async void LoadImage(IStorageFile file)
138141
{
139-
try
140-
{
141-
await using (var stream = await file.OpenReadAsync())
142-
{
143-
imageData = SixLabors.ImageSharp.Image.Load<Rgba32>(stream);
144-
}
145-
this.InvalidateVisual();
146-
}
147-
catch (Exception ex)
148-
{
149-
}
142+
imageData = ZXGraphics.log.ServiceLayer.LoadImage(file);
143+
this.InvalidateVisual();
150144
}
151145

152146

147+
153148
public void Refresh()
154149
{
155150
this.InvalidateVisual();
@@ -200,7 +195,7 @@ public override void Render(DrawingContext context)
200195
}
201196
else
202197
{
203-
context.FillRectangle(brushWhite, r0);
198+
context.FillRectangle(brushWhite, r0);
204199
}
205200
pair = !pair;
206201
}
@@ -268,21 +263,21 @@ public override void Render(DrawingContext context)
268263
int x2 = SpriteWidth * _Zoom;
269264
int y2 = SpriteHeight * _Zoom;
270265

271-
var r0 = new Rect(x2, 0, 400-x2, 400);
266+
var r0 = new Rect(x2, 0, 400 - x2, 400);
272267
context.FillRectangle(brushMask, r0);
273-
var r1 = new Rect(0, y2, x2, 400-y2);
268+
var r1 = new Rect(0, y2, x2, 400 - y2);
274269
context.FillRectangle(brushMask, r1);
275270

276271
context.DrawRectangle(penRed, new Rect(-1, -1, x2, y2));
277-
}
272+
}
278273
}
279274
catch (Exception ex)
280275
{
281276

282277
}
283278
}
284279

285-
#endregion
280+
#endregion
286281

287282

288283
#region Mouse

‎ZXBStudio/DocumentEditors/ZXGraphics/SelectExportTypeControl.axaml.cs‎

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,38 @@ public SelectExportTypeControl()
4646
}
4747

4848

49+
public bool InitializeTile()
50+
{
51+
ExportTypesList = new List<ExportTypeDescrioptionItem>();
52+
ExportTypesList.Add(new ExportTypeDescrioptionItem()
53+
{
54+
Description = "Boriel Basic's PutChars embeded library.",
55+
ExportType = ExportTypes.PutChars,
56+
Image = "/Svg/Seal.svg",
57+
Name = "PutChars"
58+
});
59+
lstOptions.ItemsSource = ExportTypesList;
60+
lstOptions.SelectionChanged += LstOptions_SelectionChanged;
61+
return true;
62+
}
63+
64+
65+
public bool InitializeMap()
66+
{
67+
ExportTypesList = new List<ExportTypeDescrioptionItem>();
68+
ExportTypesList.Add(new ExportTypeDescrioptionItem()
69+
{
70+
Description = "Raw array of bytes, one byte for tile",
71+
ExportType = ExportTypes.Array,
72+
Image = "/Svg/boxes-stacked-solid.svg",
73+
Name = "Array"
74+
});
75+
lstOptions.ItemsSource = ExportTypesList;
76+
lstOptions.SelectionChanged += LstOptions_SelectionChanged;
77+
return true;
78+
}
79+
80+
4981
public bool InitializeSprite()
5082
{
5183
ExportTypesList = new List<ExportTypeDescrioptionItem>();

0 commit comments

Comments
 (0)