Changeset 115 for trunk/UBFTarget.pas


Ignore:
Timestamp:
Oct 13, 2020, 8:05:14 PM (4 years ago)
Author:
chronos
Message:
  • Fixed: Build with Lazarus 2.0.10.
  • Modified: CoolTranslator package replaced by Translator in Common package.
  • Modified: About dialog moved to Common package.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/UBFTarget.pas

    r114 r115  
    1919    Parameter: Integer;
    2020    RelIndex: Integer;
    21     function Create(Command: TMachineCommand; Parameter, RelIndex: Integer): TMachineOperation;
     21    class function Create(Command: TMachineCommand; Parameter, RelIndex: Integer): TMachineOperation; static;
    2222  end;
    2323
     
    6565{ TMachineOperation }
    6666
    67 function TMachineOperation.Create(Command: TMachineCommand; Parameter,
     67class function TMachineOperation.Create(Command: TMachineCommand; Parameter,
    6868  RelIndex: Integer): TMachineOperation;
    6969begin
     
    150150  PreviousCommand: TMachineCommand;
    151151  FirstIndex: Integer;
    152   NewTextIndex: Integer;
     152  NewTargetIndex: Integer;
    153153begin
    154154  // Merge together cmInc, cmDec, cmSet
     
    159159
    160160  FProgramIndex := 0;
    161   NewTextIndex := 0;
     161  NewTargetIndex := 0;
    162162  while (FProgramIndex < Length(FProgram)) do begin
    163163    FirstIndex := FProgramIndex;
     
    272272    end;
    273273    PreviousCommand := FProgram[FProgramIndex].Command;
    274     DebugSteps.UpdateTargetPos(FirstIndex, FProgramIndex, NewProgramIndex, NewTextIndex);
    275     Inc(NewTextIndex, Length(GetOperationText(NewProgram[NewProgramIndex])));
     274    DebugSteps.UpdateTargetPos(FirstIndex, FProgramIndex, NewProgramIndex, NewTargetIndex);
     275    Inc(NewTargetIndex, Length(GetOperationText(NewProgram[NewProgramIndex])));
    276276    Inc(FProgramIndex);
    277277    Inc(NewProgramIndex);
     
    297297  RelIndex: Integer;
    298298  FirstIndex: Integer;
    299   NewTextIndex: Integer;
     299  NewTargetIndex: Integer;
    300300begin
    301301  NewProgramIndex := 0;
     
    304304  RelIndex := 0;
    305305  FProgramIndex := 0;
    306   NewTextIndex := 0;
     306  NewTargetIndex := 0;
    307307  while (FProgramIndex < Length(FProgram)) do begin
    308308    FirstIndex := FProgramIndex;
     
    338338      else raise Exception.Create(Format('Unsupported command %d', [FProgram[FProgramIndex].Command]));
    339339    end;
    340     DebugSteps.UpdateTargetPos(FirstIndex, FProgramIndex, NewProgramIndex, NewTextIndex);
    341     Inc(NewTextIndex, Length(GetOperationText(NewProgram[NewProgramIndex])));
     340    DebugSteps.UpdateTargetPos(FirstIndex, FProgramIndex, NewProgramIndex, NewTargetIndex);
     341    Inc(NewTargetIndex, Length(GetOperationText(NewProgram[NewProgramIndex])));
    342342    Inc(FProgramIndex);
    343343    Inc(NewProgramIndex);
Note: See TracChangeset for help on using the changeset viewer.