Commit 46433ed

Nick committed on
Add new rows below current one, fix orientatin of wave paintbox
commit 46433edcf68a77744c7b80cd504357cb0b65d661 parent 47019bd
2 changed files +9−19
Modifiedtracker.lfm +2−2
@@ -61,10 +61,10 @@ object frmTracker: TfrmTracker
61 Height = 521 61 Height = 521
62 Top = 0 62 Top = 0
63 Width = 1034 63 Width = 1034
64 ActivePage = PatternTabSheet 64 ActivePage = WavesTabSheet
65 Align = alClient 65 Align = alClient
66 ParentFont = False 66 ParentFont = False
67 TabIndex = 1 67 TabIndex = 3
68 TabOrder = 0 68 TabOrder = 0
69 object GeneralTabSheet: TTabSheet 69 object GeneralTabSheet: TTabSheet
70 Caption = 'General' 70 Caption = 'General'
Modifiedtracker.pas +7−17
@@ -588,7 +588,7 @@ end;
588 588
589 procedure TfrmTracker.DrawWaveform(PB: TPaintBox; Wave: TWave); 589 procedure TfrmTracker.DrawWaveform(PB: TPaintBox; Wave: TWave);
590 var 590 var
591 Interval{, HInterval}: Single; 591 Interval: Single;
592 I: Integer; 592 I: Integer;
593 W, H : Integer; 593 W, H : Integer;
594 begin 594 begin
@@ -596,26 +596,16 @@ begin
596 H := PB.Height-4; 596 H := PB.Height-4;
597 597
598 Interval := W / 32; 598 Interval := W / 32;
599 //HInterval := H div $10;
600 With PB.Canvas do begin 599 With PB.Canvas do begin
601 Brush.Color := clGameboyBlack; 600 Brush.Color := clGameboyBlack;
602 Clear; 601 Clear;
603 602
604 {Pen.Width := 1;
605 Pen.Color := StringToColor('$103800');
606 for I := 0 to 32 do
607 Line(I*Interval, 0, I*Interval, H);
608
609 for I := 0 to $10 do
610 Line(0, I*HInterval, W, I*HInterval);}
611
612 Brush.Color := clGameboyMidGreen;
613 Pen.Color := clGameboyMidGreen; 603 Pen.Color := clGameboyMidGreen;
614 Pen.Width := 2; 604 Pen.Width := 2;
615 MoveTo(0, H); 605 MoveTo(0, H);
616 for I := Low(Wave) to High(Wave) do 606 for I := Low(Wave) to High(Wave) do
617 LineTo(Round(I*Interval), Trunc((Wave[I]/$F)*H)+2); 607 LineTo(Round(I*Interval), H-Trunc((Wave[I]/$F)*H)+2);
618 LineTo(W, Trunc((Wave[0]/$F)*H)); 608 LineTo(W, H-Trunc((Wave[0]/$F)*H));
619 end; 609 end;
620 end; 610 end;
621 611
@@ -2139,7 +2129,7 @@ begin
2139 2129
2140 with OrderEditStringGrid do 2130 with OrderEditStringGrid do
2141 InsertRowWithValues( 2131 InsertRowWithValues(
2142 Row, 2132 Row+1,
2143 ['', 2133 ['',
2144 IntToStr(Highest), 2134 IntToStr(Highest),
2145 IntToStr(Highest+1), 2135 IntToStr(Highest+1),
@@ -2156,7 +2146,7 @@ end;
2156 procedure TfrmTracker.MenuItem18Click(Sender: TObject); 2146 procedure TfrmTracker.MenuItem18Click(Sender: TObject);
2157 begin 2147 begin
2158 with OrderEditStringGrid do 2148 with OrderEditStringGrid do
2159 InsertRowWithValues(Row, ['', '0', '0', '0', '0']); 2149 InsertRowWithValues(Row+1, ['', '0', '0', '0', '0']);
2160 2150
2161 ReloadPatterns; 2151 ReloadPatterns;
2162 end; 2152 end;
@@ -2187,7 +2177,7 @@ begin
2187 2177
2188 with OrderEditStringGrid do begin 2178 with OrderEditStringGrid do begin
2189 InsertRowWithValues( 2179 InsertRowWithValues(
2190 Row, 2180 Row+1,
2191 ['', 2181 ['',
2192 IntToStr(Highest), 2182 IntToStr(Highest),
2193 IntToStr(Highest+1), 2183 IntToStr(Highest+1),
@@ -2574,7 +2564,7 @@ begin
2574 Y := EnsureRange(Y, 0, WaveEditPaintBox.Height); 2564 Y := EnsureRange(Y, 0, WaveEditPaintBox.Height);
2575 if DrawingWave then begin 2565 if DrawingWave then begin
2576 Idx := EnsureRange(Round((X / WaveEditPaintBox.Width)*32), Low(TWave), High(TWave)); 2566 Idx := EnsureRange(Round((X / WaveEditPaintBox.Width)*32), Low(TWave), High(TWave));
2577 CurrentWave^[Idx] := EnsureRange(Round((Y / WaveEditPaintBox.Height)*$F), 0, $F); 2567 CurrentWave^[Idx] := EnsureRange(Round($F-((Y / WaveEditPaintBox.Height)*$F)), 0, $F);
2578 UpdateHexWaveTextbox; 2568 UpdateHexWaveTextbox;
2579 WaveEditPaintBox.Invalidate; 2569 WaveEditPaintBox.Invalidate;
2580 if PlayWaveWhileDrawingCheckbox.Checked then 2570 if PlayWaveWhileDrawingCheckbox.Checked then