diff --git a/SourceGen/RuntimeData/Atari/VisAtari2600.cs b/SourceGen/RuntimeData/Atari/VisAtari2600.cs index 214df79..09ad412 100644 --- a/SourceGen/RuntimeData/Atari/VisAtari2600.cs +++ b/SourceGen/RuntimeData/Atari/VisAtari2600.cs @@ -36,7 +36,7 @@ namespace RuntimeData.Atari { private const string P_OFFSET = "offset"; private const string P_HEIGHT = "height"; - private const string P_ROW_DUP = "rowDup"; + private const string P_ROW_THICKNESS = "rowThickness"; private const string P_REFLECTED = "reflected"; private const int MAX_HEIGHT = 192; @@ -57,8 +57,8 @@ namespace RuntimeData.Atari { P_OFFSET, typeof(int), 0, 0x00ffffff, VisParamDescr.SpecialMode.Offset, 0), new VisParamDescr("Height", P_HEIGHT, typeof(int), 1, 192, 0, 1), - new VisParamDescr("Row duplication", - P_ROW_DUP, typeof(int), 0, 10, 0, 3), + new VisParamDescr("Row thickness", + P_ROW_THICKNESS, typeof(int), 1, 20, 0, 4), new VisParamDescr("Reflected", P_REFLECTED, typeof(bool), 0, 0, 0, false), }), @@ -143,11 +143,12 @@ namespace RuntimeData.Atari { int offset = Util.GetFromObjDict(parms, P_OFFSET, 0); int height = Util.GetFromObjDict(parms, P_HEIGHT, 1); - int rowDup = Util.GetFromObjDict(parms, P_ROW_DUP, 3); + int rowThick = Util.GetFromObjDict(parms, P_ROW_THICKNESS, 4); bool isReflected = Util.GetFromObjDict(parms, P_REFLECTED, false); if (offset < 0 || offset >= mFileData.Length || - height <= 0 || height > MAX_HEIGHT) { + height <= 0 || height > MAX_HEIGHT || + rowThick <= 0 || rowThick > MAX_HEIGHT) { // the UI should flag these based on range (and ideally wouldn't have called us) mAppRef.ReportError("Invalid parameter"); return null; @@ -160,10 +161,8 @@ namespace RuntimeData.Atari { return null; } - int rowHeight = rowDup + 1; - // Each half of the playfield is 20 bits wide. - VisBitmap8 vb = new VisBitmap8(40, height * rowHeight); + VisBitmap8 vb = new VisBitmap8(40, height * rowThick); SetPalette(vb); for (int row = 0; row < height; row++) { @@ -177,10 +176,10 @@ namespace RuntimeData.Atari { int fwd = RevBits(rev, 20); // Render the first part of the line forward. - RenderHalfField(vb, row * rowHeight, rowHeight, 0, + RenderHalfField(vb, row * rowThick, rowThick, 0, fwd, Color.White); // Render the second half forward or reversed, in grey. - RenderHalfField(vb, row * rowHeight, rowHeight, HALF_WIDTH, + RenderHalfField(vb, row * rowThick, rowThick, HALF_WIDTH, isReflected ? rev : fwd, Color.Grey); } return vb; diff --git a/SourceGen/RuntimeData/Help/visualization.html b/SourceGen/RuntimeData/Help/visualization.html index 1521598..da59cdc 100644 --- a/SourceGen/RuntimeData/Help/visualization.html +++ b/SourceGen/RuntimeData/Help/visualization.html @@ -152,8 +152,8 @@ generator works for data stored in a straightforward fashion.

multiple entries following each other. Specify the number of 3-byte entries as the height. Since most playfields aren't the full height of the screen, - it will tend to look squashed. Use the "row duplication" feature - to repeat each row N times to make it look more like it should. + it will tend to look squashed. Use the "row thickness" feature + to repeat each row N times to adjust the proportions. diff --git a/SourceGen/SGTestData/Visualization/atari2600-sprite-test.dis65 b/SourceGen/SGTestData/Visualization/atari2600-sprite-test.dis65 index 3e5ccfa..09122cf 100644 --- a/SourceGen/SGTestData/Visualization/atari2600-sprite-test.dis65 +++ b/SourceGen/SGTestData/Visualization/atari2600-sprite-test.dis65 @@ -60,12 +60,12 @@ "68":{ "Items":[{ "Tag":"Black Maze 3","VisGenIdent":"atari2600-playfield","VisGenParams":{ -"offset":68,"height":7,"rowDup":3,"reflected":false}}]}, +"offset":68,"height":7,"rowThickness":4,"reflected":false}}]}, "89":{ "Items":[{ "Tag":"Red Maze (bottom)","VisGenIdent":"atari2600-playfield","VisGenParams":{ -"offset":89,"height":7,"rowDup":3,"reflected":true}}]}, +"offset":89,"height":7,"rowThickness":4,"reflected":true}}]}, "110":{ "Items":[{ "Tag":"Castle Def","VisGenIdent":"atari2600-playfield","VisGenParams":{ -"offset":110,"height":7,"rowDup":3,"reflected":true}}]}}} +"offset":110,"height":7,"rowThickness":4,"reflected":true}}]}}}