From afa2d853d20ee7f406c8e418cebbdac2841c3e35 Mon Sep 17 00:00:00 2001 From: Nick's Hardware Youtube Channel <56885781+nickshardware@users.noreply.github.com> Date: Wed, 28 Dec 2022 19:00:21 -0500 Subject: [PATCH] R71 bug fix --- mapeditor.lfm | 201 +++++++++++++++++++++++++---------------------- rmabout.pas | 2 +- rmmain.lfm | 93 +++++++++++----------- rwxgf.pas | 8 +- spriteimport.lfm | 118 +++++++++++++++------------- 5 files changed, 223 insertions(+), 199 deletions(-) diff --git a/mapeditor.lfm b/mapeditor.lfm index a9f58da..95d3187 100644 --- a/mapeditor.lfm +++ b/mapeditor.lfm @@ -1,12 +1,11 @@ object MapEdit: TMapEdit - Left = 279 - Height = 832 + Left = 271 + Height = 682 Top = 159 - Width = 1402 + Width = 1130 Caption = 'Map Edititor' - ClientHeight = 807 - ClientWidth = 1402 - DesignTimePPI = 120 + ClientHeight = 662 + ClientWidth = 1130 Menu = MainMenu1 OnClose = FormClose OnCreate = FormCreate @@ -19,13 +18,14 @@ object MapEdit: TMapEdit AnchorSideBottom.Control = Owner AnchorSideBottom.Side = asrBottom Left = 0 - Height = 807 + Height = 662 Top = 0 - Width = 272 + Width = 218 Anchors = [akTop, akLeft, akRight, akBottom] Caption = 'LeftPanel' - ClientHeight = 807 - ClientWidth = 272 + ClientHeight = 662 + ClientWidth = 218 + ParentFont = False TabOrder = 3 object SelectedTilePanel: TPanel AnchorSideLeft.Control = LeftPanel @@ -34,22 +34,23 @@ object MapEdit: TMapEdit AnchorSideRight.Side = asrBottom AnchorSideBottom.Control = LeftVertSplitter Left = 1 - Height = 207 + Height = 169 Top = 1 - Width = 270 + Width = 216 Anchors = [akTop, akLeft, akRight, akBottom] - ClientHeight = 207 - ClientWidth = 270 + ClientHeight = 169 + ClientWidth = 216 + ParentFont = False TabOrder = 0 object SelectedTileImage: TImage AnchorSideLeft.Control = SelectedTilePanel AnchorSideTop.Control = SelectedTilePanel - Left = 16 - Height = 113 - Top = 16 - Width = 113 - BorderSpacing.Left = 15 - BorderSpacing.Top = 15 + Left = 13 + Height = 90 + Top = 13 + Width = 90 + BorderSpacing.Left = 12 + BorderSpacing.Top = 12 end end object LeftVertSplitter: TSplitter @@ -60,9 +61,9 @@ object MapEdit: TMapEdit AnchorSideRight.Side = asrBottom Cursor = crVSplit Left = 1 - Height = 11 - Top = 208 - Width = 270 + Height = 9 + Top = 170 + Width = 216 Align = alNone Anchors = [akLeft, akRight] AutoSnap = False @@ -79,25 +80,27 @@ object MapEdit: TMapEdit AnchorSideBottom.Control = LeftPanel AnchorSideBottom.Side = asrBottom Left = 1 - Height = 587 - Top = 219 - Width = 270 + Height = 482 + Top = 179 + Width = 216 Anchors = [akTop, akLeft, akRight, akBottom] Caption = 'LeftBottomPanel' - ClientHeight = 587 - ClientWidth = 270 + ClientHeight = 482 + ClientWidth = 216 + ParentFont = False TabOrder = 2 object TileListView: TListView Left = 1 - Height = 585 + Height = 480 Top = 1 - Width = 268 + Width = 214 Align = alClient Color = 15790320 Columns = <> IconOptions.AutoArrange = True LargeImages = RMMainForm.ImageList1 LargeImagesWidth = 128 + ParentFont = False ReadOnly = True TabOrder = 0 ViewStyle = vsIcon @@ -113,23 +116,25 @@ object MapEdit: TMapEdit AnchorSideRight.Side = asrBottom AnchorSideBottom.Control = Owner AnchorSideBottom.Side = asrBottom - Left = 1170 - Height = 807 + Left = 942 + Height = 662 Top = 0 - Width = 232 + Width = 188 Anchors = [akTop, akLeft, akRight, akBottom] Caption = 'RightPanel' - ClientHeight = 807 - ClientWidth = 232 + ClientHeight = 662 + ClientWidth = 188 + ParentFont = False TabOrder = 0 object MapListView: TListView Left = 1 - Height = 805 + Height = 660 Top = 1 - Width = 230 + Width = 186 Align = alClient Color = 15790320 Columns = <> + ParentFont = False PopupMenu = ExportMapsPropsMenu ReadOnly = True TabOrder = 0 @@ -140,10 +145,10 @@ object MapEdit: TMapEdit AnchorSideTop.Control = Owner AnchorSideBottom.Control = Owner AnchorSideBottom.Side = asrBottom - Left = 272 - Height = 807 + Left = 218 + Height = 662 Top = 0 - Width = 11 + Width = 9 Align = alNone Anchors = [akTop, akBottom] Color = 11625216 @@ -153,10 +158,10 @@ object MapEdit: TMapEdit AnchorSideTop.Control = Owner AnchorSideBottom.Control = Owner AnchorSideBottom.Side = asrBottom - Left = 1159 - Height = 807 + Left = 933 + Height = 662 Top = 0 - Width = 11 + Width = 9 Align = alNone Anchors = [akTop, akBottom] Color = 11625216 @@ -167,27 +172,29 @@ object MapEdit: TMapEdit AnchorSideLeft.Side = asrBottom AnchorSideTop.Control = Owner AnchorSideRight.Control = RightSplitter - Left = 283 - Height = 128 + Left = 227 + Height = 102 Top = 0 - Width = 876 + Width = 706 Anchors = [akTop, akLeft, akRight] - ClientHeight = 128 - ClientWidth = 876 + ClientHeight = 102 + ClientWidth = 706 + ParentFont = False TabOrder = 4 object MapInfoLabel: TLabel - Left = 16 - Height = 20 - Top = 16 - Width = 92 + Left = 13 + Height = 15 + Top = 13 + Width = 73 Caption = 'MapInfoLabel' ParentColor = False + ParentFont = False end object TileZoom: TTrackBar - Left = 832 - Height = 109 - Top = 8 - Width = 31 + Left = 671 + Height = 87 + Top = 6 + Width = 25 Max = 6 Min = 1 OnChange = TileZoomChange @@ -195,35 +202,39 @@ object MapEdit: TMapEdit Position = 4 TickMarks = tmTopLeft Anchors = [akTop, akRight] + ParentFont = False TabOrder = 0 end object ToolPanel: TPanel - Left = 536 - Height = 92 - Top = 16 - Width = 296 + Left = 434 + Height = 74 + Top = 13 + Width = 237 Anchors = [akTop, akRight] - ClientHeight = 92 - ClientWidth = 296 + ClientHeight = 74 + ClientWidth = 237 + ParentFont = False TabOrder = 1 object RadioDraw: TRadioButton - Left = 64 - Height = 24 - Top = 32 - Width = 59 + Left = 51 + Height = 19 + Top = 26 + Width = 47 Caption = 'Draw' Checked = True OnClick = RadioDrawClick + ParentFont = False TabOrder = 1 TabStop = True end object RadioErase: TRadioButton - Left = 184 - Height = 24 - Top = 32 - Width = 59 + Left = 147 + Height = 19 + Top = 26 + Width = 47 Caption = 'Erase' OnClick = RadioEraseClick + ParentFont = False TabOrder = 0 end end @@ -236,36 +247,38 @@ object MapEdit: TMapEdit AnchorSideRight.Control = RightSplitter AnchorSideBottom.Control = Owner AnchorSideBottom.Side = asrBottom - Left = 283 - Height = 679 - Top = 128 - Width = 876 + Left = 227 + Height = 560 + Top = 102 + Width = 706 Anchors = [akTop, akLeft, akRight, akBottom] Caption = 'MiddlePanel' - ClientHeight = 679 - ClientWidth = 876 + ClientHeight = 560 + ClientWidth = 706 + ParentFont = False TabOrder = 5 object MapScrollBox: TScrollBox Left = 1 - Height = 677 + Height = 558 Top = 1 - Width = 874 - HorzScrollBar.Page = 113 + Width = 704 + HorzScrollBar.Page = 90 HorzScrollBar.Tracking = True - VertScrollBar.Page = 113 + VertScrollBar.Page = 90 VertScrollBar.Tracking = True Align = alClient BorderStyle = bsNone - ClientHeight = 677 - ClientWidth = 874 + ClientHeight = 558 + ClientWidth = 704 + ParentFont = False TabOrder = 0 object MapImage: TImage AnchorSideLeft.Control = MapScrollBox AnchorSideTop.Control = MapScrollBox Left = 0 - Height = 113 + Height = 90 Top = 0 - Width = 113 + Width = 90 OnMouseDown = MapImageMouseDown OnMouseLeave = MapImageMouseLeave OnMouseMove = MapImageMouseMove @@ -274,12 +287,12 @@ object MapEdit: TMapEdit end end object ImageList1: TImageList - Left = 88 - Top = 240 + Left = 70 + Top = 192 end object MainMenu1: TMainMenu - Left = 88 - Top = 344 + Left = 70 + Top = 275 object FileMenuItem: TMenuItem Caption = 'File' object MenuNew: TMenuItem @@ -402,16 +415,16 @@ object MapEdit: TMapEdit end end object SaveDialog1: TSaveDialog - Left = 80 - Top = 440 + Left = 64 + Top = 352 end object OpenDialog1: TOpenDialog - Left = 80 - Top = 528 + Left = 64 + Top = 422 end object ExportMapsPropsMenu: TPopupMenu - Left = 80 - Top = 632 + Left = 64 + Top = 506 object MenuMapProps: TMenuItem Caption = 'Properties' OnClick = MenuMapPropsClick diff --git a/rmabout.pas b/rmabout.pas index 27092e5..dbc09ed 100644 --- a/rmabout.pas +++ b/rmabout.pas @@ -8,7 +8,7 @@ interface Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls, ExtCtrls,lclintf; Const - ProgramName ='Raster Master v1.4 R70'; + ProgramName ='Raster Master v1.4 R71'; ProgramLicense = 'Released under MIT License'; type diff --git a/rmmain.lfm b/rmmain.lfm index 5dc05be..531cf5d 100644 --- a/rmmain.lfm +++ b/rmmain.lfm @@ -1,12 +1,12 @@ object RMMainForm: TRMMainForm - Left = -8 - Height = 1177 - Top = -8 - Width = 1920 + Left = 29 + Height = 1118 + Top = 0 + Width = 1828 Anchors = [akTop, akLeft, akRight, akBottom] Caption = 'Raster Master' - ClientHeight = 1157 - ClientWidth = 1920 + ClientHeight = 1098 + ClientWidth = 1828 DefaultMonitor = dmDesktop Menu = MainMenu1 OnClose = FormClose @@ -14,7 +14,6 @@ object RMMainForm: TRMMainForm Position = poDefault LCLVersion = '2.0.10.0' Scaled = False - WindowState = wsFullScreen object MiddleBottomPanel: TPanel AnchorSideLeft.Control = LeftHSplitter AnchorSideLeft.Side = asrBottom @@ -23,14 +22,14 @@ object RMMainForm: TRMMainForm AnchorSideRight.Control = RightHSplitter AnchorSideBottom.Control = Owner AnchorSideBottom.Side = asrBottom - Left = 296 - Height = 1045 + Left = 283 + Height = 986 Top = 112 - Width = 1366 + Width = 1299 Anchors = [akTop, akLeft, akRight, akBottom] BevelOuter = bvNone - ClientHeight = 1045 - ClientWidth = 1366 + ClientHeight = 986 + ClientWidth = 1299 TabOrder = 1 object ScrollBox1: TScrollBox AnchorSideLeft.Control = MiddleBottomPanel @@ -39,23 +38,23 @@ object RMMainForm: TRMMainForm AnchorSideBottom.Control = MiddleBottomPanel AnchorSideBottom.Side = asrBottom Left = 0 - Height = 1045 + Height = 986 Top = 0 - Width = 1366 + Width = 1299 HorzScrollBar.Page = 90 HorzScrollBar.Tracking = True VertScrollBar.Page = 90 VertScrollBar.Tracking = True Align = alClient BorderStyle = bsNone - ClientHeight = 1045 - ClientWidth = 1366 + ClientHeight = 986 + ClientWidth = 1299 TabOrder = 0 object ZoomBox: TImage Left = 0 - Height = 1045 + Height = 986 Top = 0 - Width = 1366 + Width = 1299 Align = alClient OnMouseDown = ZoomBoxMouseDown OnMouseMove = ZoomBoxMouseMove @@ -72,13 +71,13 @@ object RMMainForm: TRMMainForm AnchorSideBottom.Control = Owner AnchorSideBottom.Side = asrBottom Left = 0 - Height = 1157 + Height = 1098 Top = 0 - Width = 296 + Width = 283 Anchors = [akTop, akLeft, akRight, akBottom] BevelOuter = bvNone - ClientHeight = 1157 - ClientWidth = 296 + ClientHeight = 1098 + ClientWidth = 283 TabOrder = 0 object LeftVSplitter: TSplitter AnchorSideLeft.Control = LeftPanel @@ -90,8 +89,8 @@ object RMMainForm: TRMMainForm Cursor = crVSplit Left = 0 Height = 13 - Top = 309 - Width = 295 + Top = 293 + Width = 281 Align = alNone Anchors = [akLeft, akRight] Color = 11625216 @@ -107,9 +106,9 @@ object RMMainForm: TRMMainForm AnchorSideBottom.Control = LeftPanel AnchorSideBottom.Side = asrBottom Left = 0 - Height = 835 - Top = 322 - Width = 285 + Height = 792 + Top = 306 + Width = 272 Anchors = [akTop, akLeft, akRight, akBottom] BorderSpacing.Right = 11 Color = 15790320 @@ -130,14 +129,14 @@ object RMMainForm: TRMMainForm AnchorSideRight.Side = asrBottom AnchorSideBottom.Control = LeftVSplitter Left = 0 - Height = 309 + Height = 293 Top = 0 - Width = 281 + Width = 268 Anchors = [akTop, akLeft, akRight, akBottom] BorderSpacing.Right = 15 BevelOuter = bvNone - ClientHeight = 309 - ClientWidth = 281 + ClientHeight = 293 + ClientWidth = 268 TabOrder = 0 object ActualBox: TImage Left = 16 @@ -152,8 +151,8 @@ object RMMainForm: TRMMainForm AnchorSideTop.Control = Owner AnchorSideBottom.Control = Owner AnchorSideBottom.Side = asrBottom - Left = 285 - Height = 1157 + Left = 272 + Height = 1098 Top = 0 Width = 11 Align = alNone @@ -166,8 +165,8 @@ object RMMainForm: TRMMainForm AnchorSideTop.Control = Owner AnchorSideBottom.Control = Owner AnchorSideBottom.Side = asrBottom - Left = 1662 - Height = 1157 + Left = 1582 + Height = 1098 Top = 0 Width = 11 Align = alNone @@ -180,19 +179,19 @@ object RMMainForm: TRMMainForm AnchorSideLeft.Side = asrBottom AnchorSideTop.Control = Owner AnchorSideRight.Control = RightHSplitter - Left = 296 + Left = 283 Height = 112 Top = 0 - Width = 1366 + Width = 1299 Anchors = [akTop, akLeft, akRight] ClientHeight = 112 - ClientWidth = 1366 + ClientWidth = 1299 TabOrder = 4 object ToolPanel: TPanel AnchorSideTop.Control = MiddleTopPanel AnchorSideRight.Control = MiddleTopPanel AnchorSideRight.Side = asrBottom - Left = 881 + Left = 814 Height = 88 Top = 8 Width = 434 @@ -407,7 +406,7 @@ object RMMainForm: TRMMainForm WordWrap = True end object TrackBar1: TTrackBar - Left = 1330 + Left = 1263 Height = 110 Top = 1 Width = 30 @@ -429,13 +428,13 @@ object RMMainForm: TRMMainForm AnchorSideRight.Side = asrBottom AnchorSideBottom.Control = Owner AnchorSideBottom.Side = asrBottom - Left = 1673 - Height = 1157 + Left = 1593 + Height = 1098 Top = 0 - Width = 247 + Width = 235 Anchors = [akTop, akLeft, akRight, akBottom] - ClientHeight = 1157 - ClientWidth = 247 + ClientHeight = 1098 + ClientWidth = 235 TabOrder = 5 OnClick = RightPanelClick object RMPanel: TPanel @@ -444,9 +443,9 @@ object RMMainForm: TRMMainForm AnchorSideBottom.Control = RightPanel AnchorSideBottom.Side = asrBottom Cursor = crNo - Left = 73 + Left = 61 Height = 121 - Top = 1025 + Top = 966 Width = 158 Anchors = [akRight, akBottom] BorderSpacing.Right = 15 diff --git a/rwxgf.pas b/rwxgf.pas index 1343689..e3ac16b 100644 --- a/rwxgf.pas +++ b/rwxgf.pas @@ -433,8 +433,9 @@ function GetXImageSizeFB(width,height : integer) : longint; nColors:=GetMaxColor+1; BPL:=GetBPLSize(Width,nColors); BTW:=BPL; - if nColors = 16 then BTW:=BPL*4; + if nColors = 16 then BTW:=BPL*4; + //BitplaneWriter(0,data,0); //patch correct widht height for language/compiler - Microsoft and Borland did some wierd things to a simple bitmap format FixHead(Head,Width,Height,LanType); Move(Head,tempBuf,sizeof(tempBuf)); @@ -1070,7 +1071,10 @@ procedure WriteXgfToBufferFP(x,y,x2,y2,Mask : word;var data : BufferRec); Assign(data.f,filename); {$I-} Rewrite(data.f,1); - WriteXGFBuffer(@BitPlaneWriterFile,data,x,y,x2,y2,LanType); + //BitplaneWriterFile(0,data,0); + //WriteXGFBuffer(@BitPlaneWriterFile,data,x,y,x2,y2,LanType); + + WriteXGFToBuffer(x,y,x2,y2,LanType,0,data); Close(data.f); {$I+} WriteXgfToFile:=IOResult; diff --git a/spriteimport.lfm b/spriteimport.lfm index 0751ad6..7e500d7 100644 --- a/spriteimport.lfm +++ b/spriteimport.lfm @@ -1,53 +1,55 @@ object SpriteImportForm: TSpriteImportForm Left = 222 - Height = 737 + Height = 620 Top = 133 - Width = 1438 + Width = 1106 Caption = 'Sprite Import' - ClientHeight = 737 - ClientWidth = 1438 - DesignTimePPI = 120 + ClientHeight = 620 + ClientWidth = 1106 OnCreate = FormCreate LCLVersion = '2.0.10.0' object TopPanel: TPanel AnchorSideBottom.Control = ScrollBox1 Left = 0 - Height = 184 + Height = 147 Top = 0 - Width = 1357 + Width = 1041 Anchors = [akTop, akLeft, akRight, akBottom] - ClientHeight = 184 - ClientWidth = 1357 + ClientHeight = 147 + ClientWidth = 1041 + ParentFont = False TabOrder = 0 object SpriteImage: TImage - Left = 24 - Height = 128 - Top = 16 - Width = 128 + Left = 19 + Height = 102 + Top = 13 + Width = 102 end object OpenSpriteSheet: TButton - Left = 184 - Height = 31 - Top = 16 - Width = 208 + Left = 147 + Height = 25 + Top = 13 + Width = 166 Caption = 'Open Sprite Sheet' OnClick = OpenSpriteSheetClick + ParentFont = False TabOrder = 0 end object SpriteSizeLabel: TLabel - Left = 424 - Height = 20 - Top = 24 - Width = 70 + Left = 339 + Height = 15 + Top = 19 + Width = 53 Caption = 'Sprite Size' ParentColor = False + ParentFont = False end object SpriteSizeComboBox: TComboBox - Left = 520 - Height = 28 - Top = 19 - Width = 125 - ItemHeight = 20 + Left = 416 + Height = 23 + Top = 15 + Width = 100 + ItemHeight = 15 ItemIndex = 2 Items.Strings = ( '8 X 8' @@ -58,16 +60,17 @@ object SpriteImportForm: TSpriteImportForm '256 X 256' ) OnChange = SpriteSizeComboBoxChange + ParentFont = False Style = csDropDownList TabOrder = 1 Text = '32 X 32' end object NewPaletteComboBox: TComboBox - Left = 688 - Height = 28 - Top = 19 - Width = 296 - ItemHeight = 20 + Left = 550 + Height = 23 + Top = 15 + Width = 237 + ItemHeight = 15 ItemIndex = 1 Items.Strings = ( 'New Palette(From Clip Area)' @@ -75,16 +78,17 @@ object SpriteImportForm: TSpriteImportForm 'Use Current Sprite Palette' ) OnChange = NewPaletteComboBoxChange + ParentFont = False Style = csDropDownList TabOrder = 2 Text = 'New Palette(From Entire Image)' end object PaletteComboBox: TComboBox - Left = 1016 - Height = 28 - Top = 16 - Width = 168 - ItemHeight = 20 + Left = 813 + Height = 23 + Top = 13 + Width = 134 + ItemHeight = 15 ItemIndex = 1 Items.Strings = ( 'EGA Palette' @@ -92,18 +96,20 @@ object SpriteImportForm: TSpriteImportForm 'VGA Palette 256' ) OnChange = PaletteComboBoxChange + ParentFont = False Style = csDropDownList TabOrder = 3 Text = 'VGA Palette' end object InfoLabel: TLabel - Left = 1280 - Height = 20 - Top = 144 - Width = 62 + Left = 980 + Height = 15 + Top = 116 + Width = 49 Anchors = [akRight, akBottom] Caption = 'InfoLabel' ParentColor = False + ParentFont = False end end object ScrollBox1: TScrollBox @@ -113,43 +119,45 @@ object SpriteImportForm: TSpriteImportForm AnchorSideBottom.Control = Owner AnchorSideBottom.Side = asrBottom Left = 0 - Height = 553 - Top = 184 - Width = 1438 - HorzScrollBar.Page = 792 + Height = 473 + Top = 147 + Width = 1106 + HorzScrollBar.Page = 634 HorzScrollBar.Tracking = True - VertScrollBar.Page = 504 + VertScrollBar.Page = 403 VertScrollBar.Tracking = True Anchors = [akTop, akLeft, akRight, akBottom] - ClientHeight = 549 - ClientWidth = 1434 + ClientHeight = 469 + ClientWidth = 1102 + ParentFont = False TabOrder = 1 object SourceImage: TImage AnchorSideLeft.Control = ScrollBox1 AnchorSideTop.Control = ScrollBox1 Left = 0 - Height = 504 + Height = 403 Top = 0 - Width = 792 + Width = 634 OnClick = SourceImageClick OnMouseMove = SourceImageMouseMove end end object ZoomTrackBar: TTrackBar - Left = 1376 - Height = 125 - Top = 24 - Width = 31 + Left = 1056 + Height = 100 + Top = 19 + Width = 25 Min = 1 OnChange = ZoomTrackBarChange Orientation = trVertical Position = 5 TickMarks = tmTopLeft Anchors = [akTop, akRight] + ParentFont = False TabOrder = 2 end object OpenDialog1: TOpenDialog - Left = 1368 - Top = 232 + Left = 1094 + Top = 186 end end