Bugs fixed:
- Improper bytes count for 16 or 32 bit numbers export - Exception on Code Shift when nothing is selected in Symbols List
This commit is contained in:
10
McBitFont/CodeShift.Designer.cs
generated
10
McBitFont/CodeShift.Designer.cs
generated
@@ -76,17 +76,17 @@
|
|||||||
// lblValue
|
// lblValue
|
||||||
//
|
//
|
||||||
lblValue.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right;
|
lblValue.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right;
|
||||||
lblValue.AutoSize = true;
|
lblValue.Location = new System.Drawing.Point(156, 8);
|
||||||
lblValue.Location = new System.Drawing.Point(206, 8);
|
|
||||||
lblValue.Name = "lblValue";
|
lblValue.Name = "lblValue";
|
||||||
lblValue.Size = new System.Drawing.Size(50, 15);
|
lblValue.Size = new System.Drawing.Size(110, 15);
|
||||||
lblValue.TabIndex = 3;
|
lblValue.TabIndex = 3;
|
||||||
lblValue.Text = "Shift by:";
|
lblValue.Text = "Shift by:";
|
||||||
|
lblValue.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||||
//
|
//
|
||||||
// nudValue
|
// nudValue
|
||||||
//
|
//
|
||||||
nudValue.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right;
|
nudValue.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right;
|
||||||
nudValue.Location = new System.Drawing.Point(206, 27);
|
nudValue.Location = new System.Drawing.Point(185, 27);
|
||||||
nudValue.Maximum = new decimal(new int[] { 254, 0, 0, 0 });
|
nudValue.Maximum = new decimal(new int[] { 254, 0, 0, 0 });
|
||||||
nudValue.Minimum = new decimal(new int[] { 1, 0, 0, 0 });
|
nudValue.Minimum = new decimal(new int[] { 1, 0, 0, 0 });
|
||||||
nudValue.Name = "nudValue";
|
nudValue.Name = "nudValue";
|
||||||
@@ -130,7 +130,7 @@
|
|||||||
// lblRange
|
// lblRange
|
||||||
//
|
//
|
||||||
lblRange.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right;
|
lblRange.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right;
|
||||||
lblRange.Location = new System.Drawing.Point(204, 53);
|
lblRange.Location = new System.Drawing.Point(183, 53);
|
||||||
lblRange.Name = "lblRange";
|
lblRange.Name = "lblRange";
|
||||||
lblRange.Size = new System.Drawing.Size(62, 31);
|
lblRange.Size = new System.Drawing.Size(62, 31);
|
||||||
lblRange.TabIndex = 9;
|
lblRange.TabIndex = 9;
|
||||||
|
@@ -33,7 +33,7 @@ namespace McBitFont {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
comments.Add("header",
|
comments.Add("header",
|
||||||
"// File generated by McBitFont " + MainForm.version + "\n" +
|
"// File generated by McBitFont v" + MainForm.version + "\n" +
|
||||||
"// made by Anton Mukhin (mcfly@mcflyer.ru)\n" +
|
"// made by Anton Mukhin (mcfly@mcflyer.ru)\n" +
|
||||||
"//\n" +
|
"//\n" +
|
||||||
"//\n"
|
"//\n"
|
||||||
@@ -51,7 +51,8 @@ namespace McBitFont {
|
|||||||
|
|
||||||
comments.Add("font_header_map",
|
comments.Add("font_header_map",
|
||||||
"// Font header map:\n" +
|
"// Font header map:\n" +
|
||||||
"// width; // Font width in pixels\n" +
|
"// packed; // Flag for packed font" +
|
||||||
|
"// width; // Font width in pixels (0 - variable width)\n" +
|
||||||
"// height; // Font height in pixels\n" +
|
"// height; // Font height in pixels\n" +
|
||||||
"// space; // Font space in pixels\n" +
|
"// space; // Font space in pixels\n" +
|
||||||
"// first; // First character code\n" +
|
"// first; // First character code\n" +
|
||||||
@@ -212,7 +213,7 @@ namespace McBitFont {
|
|||||||
" " + mainForm.frames.First().code.ToString() + ", // First character code\n" +
|
" " + mainForm.frames.First().code.ToString() + ", // First character code\n" +
|
||||||
" " + mainForm.frames.Last().code.ToString() + ", // Last character code\n"
|
" " + mainForm.frames.Last().code.ToString() + ", // Last character code\n"
|
||||||
;
|
;
|
||||||
bTotal += 6; // Count bytes total
|
bTotal += 6*bits / 8; // Count bytes total
|
||||||
}
|
}
|
||||||
|
|
||||||
// Brackets for 2D array definition
|
// Brackets for 2D array definition
|
||||||
@@ -245,7 +246,7 @@ namespace McBitFont {
|
|||||||
// Should we post a prefix to the number?
|
// Should we post a prefix to the number?
|
||||||
pref = (!cbZeroes.Checked && ((f.width < 10 && nbase == 16) || (f.width < 2 && nbase == 2))) ? "" : prefix;
|
pref = (!cbZeroes.Checked && ((f.width < 10 && nbase == 16) || (f.width < 2 && nbase == 2))) ? "" : prefix;
|
||||||
output += (lines != 1 ? " " : "") + pref + Convert.ToString(f.width, nbase).PadLeft(pad, '0') + (lines != 0 ? (lines == 1 ? ", " : "") : ",\n");
|
output += (lines != 1 ? " " : "") + pref + Convert.ToString(f.width, nbase).PadLeft(pad, '0') + (lines != 0 ? (lines == 1 ? ", " : "") : ",\n");
|
||||||
bTotal++; // Count bytes total
|
bTotal += bits / 8; // Count bytes total
|
||||||
// Count posted numbers
|
// Count posted numbers
|
||||||
numcount++;
|
numcount++;
|
||||||
if (lines != 2) numcount = 0;
|
if (lines != 2) numcount = 0;
|
||||||
@@ -336,7 +337,7 @@ namespace McBitFont {
|
|||||||
// should we post a prefix to the number?
|
// should we post a prefix to the number?
|
||||||
pref = (!cbZeroes.Checked && ((b < 10 && nbase == 16) || (b < 2 && nbase == 2))) ? "" : prefix;
|
pref = (!cbZeroes.Checked && ((b < 10 && nbase == 16) || (b < 2 && nbase == 2))) ? "" : prefix;
|
||||||
output += pref + Convert.ToString(b, nbase).PadLeft(pad, '0');
|
output += pref + Convert.ToString(b, nbase).PadLeft(pad, '0');
|
||||||
bTotal++; // Count bytes total
|
bTotal += bits / 8; // Count bytes total
|
||||||
|
|
||||||
// count posted numbers
|
// count posted numbers
|
||||||
numcount++;
|
numcount++;
|
||||||
@@ -353,12 +354,12 @@ namespace McBitFont {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (packed && (f.width * f.height / 8) % bits > 0) {
|
if (packed && (f.width * f.height / 8) % bits > 0) {
|
||||||
// post leftovers in last byte
|
// post leftovers in last number
|
||||||
|
|
||||||
// should we post a prefix to the number?
|
// should we post a prefix to the number?
|
||||||
pref = (!cbZeroes.Checked && ((b < 10 && nbase == 16) || (b < 2 && nbase == 2))) ? "" : prefix;
|
pref = (!cbZeroes.Checked && ((b < 10 && nbase == 16) || (b < 2 && nbase == 2))) ? "" : prefix;
|
||||||
output += (numcount > 0? ", " : "") + pref + Convert.ToString(b, nbase).PadLeft(pad, '0');
|
output += (numcount > 0? ", " : "") + pref + Convert.ToString(b, nbase).PadLeft(pad, '0');
|
||||||
bTotal++; // Count bytes total
|
bTotal += bits / 8; // Count bytes total
|
||||||
|
|
||||||
// count posted numbers
|
// count posted numbers
|
||||||
numcount++;
|
numcount++;
|
||||||
@@ -384,7 +385,7 @@ namespace McBitFont {
|
|||||||
|
|
||||||
// Add header and bytes total counter
|
// Add header and bytes total counter
|
||||||
if (com) {
|
if (com) {
|
||||||
output = "// Bytes total: " + bTotal.ToString() + "\n" + output;
|
output = "// Bytes total: " + bTotal.ToString() + "\n" + output;
|
||||||
output = comments["header"] + output;
|
output = comments["header"] + output;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -776,6 +776,9 @@ namespace McBitFont {
|
|||||||
prjFileName = filename;
|
prjFileName = filename;
|
||||||
prjName = Path.GetFileNameWithoutExtension(filename);
|
prjName = Path.GetFileNameWithoutExtension(filename);
|
||||||
this.Text = "McBitFont " + version + " - " + prjName;
|
this.Text = "McBitFont " + version + " - " + prjName;
|
||||||
|
|
||||||
|
miniList.Items[0].Selected = true;
|
||||||
|
|
||||||
CheckForAdd();
|
CheckForAdd();
|
||||||
fbuffer = false;
|
fbuffer = false;
|
||||||
|
|
||||||
@@ -1019,7 +1022,9 @@ namespace McBitFont {
|
|||||||
Cursor.Current = Cursors.WaitCursor;
|
Cursor.Current = Cursors.WaitCursor;
|
||||||
|
|
||||||
FrameMiniature ff;
|
FrameMiniature ff;
|
||||||
var sel = miniList.SelectedItems[0].Index;
|
int sel;
|
||||||
|
if (miniList.SelectedItems.Count > 0) sel = miniList.SelectedItems[0].Index;
|
||||||
|
else sel = 0;
|
||||||
var val = Convert.ToInt32(csform.nudValue.Value);
|
var val = Convert.ToInt32(csform.nudValue.Value);
|
||||||
if (csform.rbSpecify.Checked) val -= csform.sc;
|
if (csform.rbSpecify.Checked) val -= csform.sc;
|
||||||
if (csform.rbShiftLeft.Checked) val *= -1;
|
if (csform.rbShiftLeft.Checked) val *= -1;
|
||||||
|
4
TODO.txt
4
TODO.txt
@@ -5,6 +5,8 @@ V Better quality pictures in symbol list
|
|||||||
V Spinning cursor when application is busy
|
V Spinning cursor when application is busy
|
||||||
V Change Menu icons
|
V Change Menu icons
|
||||||
V Re-arranged menu items
|
V Re-arranged menu items
|
||||||
|
- Option to display codes in Hex numbers
|
||||||
|
- Make symbol list wider to display 8 characters instead of 7
|
||||||
|
|
||||||
Functionality:
|
Functionality:
|
||||||
V Context menu in symbol navigator
|
V Context menu in symbol navigator
|
||||||
@@ -20,3 +22,5 @@ V "Packed" fonts export
|
|||||||
V "Bytes total comment in export
|
V "Bytes total comment in export
|
||||||
|
|
||||||
Bugs:
|
Bugs:
|
||||||
|
V Improper bytes count for 16 or 32 bit numbers export
|
||||||
|
V Exception on Code Shift when nothing is selected in Symbols List
|
||||||
|
Reference in New Issue
Block a user