Ignore:
Timestamp:
Jan 27, 2016, 10:32:48 PM (9 years ago)
Author:
chronos
Message:
  • Added: Classes for decoding MAP, CPS, SHP and ENG file formats.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormMain.pas

    r2 r3  
    1616    PaintBox1: TPaintBox;
    1717    procedure FormActivate(Sender: TObject);
     18    procedure FormKeyPress(Sender: TObject; var Key: char);
    1819    procedure PaintBox1Click(Sender: TObject);
     20    procedure PaintBox1Paint(Sender: TObject);
    1921  private
    2022    Initialized: Boolean;
     
    4042end;
    4143
     44procedure TFormMain.PaintBox1Paint(Sender: TObject);
     45begin
     46  Core.Game.Paint(PaintBox1.Canvas);
     47end;
     48
    4249procedure TFormMain.FormActivate(Sender: TObject);
    4350begin
     
    4552    Initialized := True;
    4653    Core.Init;
     54  end;
     55end;
     56
     57procedure TFormMain.FormKeyPress(Sender: TObject; var Key: char);
     58begin
     59  Caption := IntToStr(Ord(Key));
     60  if Key = #63 then begin
     61    Inc(Core.Game.IW);
     62    core.Game.LoadData;
     63    PaintBox1.Repaint;
     64  end;
     65  if Key = #41 then begin
     66    Dec(Core.Game.IW);
     67    core.Game.LoadData;
     68    PaintBox1.Repaint;
    4769  end;
    4870end;
Note: See TracChangeset for help on using the changeset viewer.