Jump to content
Tuts 4 You

X-88's Blog

Sign in to follow this  
  • entries
    2
  • comments
    10
  • views
    30,587

About this blog

Just 4 Fun

Entries in this blog

 

A simple way to make animations with Delphi.

I've made ​​more simple, I include source manually code with different code as well, Example + Source Code. This time I just use my 4-layer stacking horizontally so easy to understand, [120x80] [120x80] [120x80] [120x80] = [480 x 80] may can help. Download Source Code + Example ----------> ZNP Easy.zip Have Fun.

X-88

X-88

 

Played 6 File [*. Xm] with Delphi.

Not for the Expert, just for amateur programmers. ~~~~~~~~~~~~~~~~~~~~~~~~~~BeGiN~~~~~~~~~~~~~~~~~~~~~~~~~~~ unit Unit1; interface uses Forms, uFMOD, Sfx, Sfx2, Sfx3, Sfx4, Sfx5, Sfx6, Classes, Controls, StdCtrls; type TForm1 = class(TForm) Label1: TLabel; procedure FormActivate(Sender: TObject); procedure FormDestroy(Sender: TObject); procedure FormKeyPress(Sender: TObject; var Key: Char); procedure FormCreate(Sender: TObject); private { By : X-88 } public { hmm.... } end; var Form1: TForm1; implementation {$R *.dfm} procedure TForm1.FormActivate(Sender: TObject); begin uFMOD_SetVolume(256); uFMOD_PlaySong(@SfxData, SfxSize, XM_MEMORY); Label1.Caption := 'Title : '+uFMOD.uFMOD_GetTitle; end; procedure TForm1.FormDestroy(Sender: TObject); begin uFMOD_StopSong; end; procedure TForm1.FormKeyPress(Sender: TObject; var Key: Char); begin if (Key = '1') then begin uFMOD_StopSong; uFMOD_PlaySong(@SfxData, SfxSize, XM_MEMORY); Label1.Caption := 'Title : '+uFMOD.uFMOD_GetTitle; end else if (Key = '2') then begin uFMOD_StopSong; uFMOD_PlaySong(@Sfx2Data, Sfx2Size, XM_MEMORY); Label1.Caption := 'Title : '+uFMOD.uFMOD_GetTitle; end else if (Key = '3') then begin uFMOD_StopSong; uFMOD_PlaySong(@Sfx3Data, Sfx3Size, XM_MEMORY); Label1.Caption := 'Title : '+uFMOD.uFMOD_GetTitle; end else if (Key = '4') then begin uFMOD_StopSong; uFMOD_PlaySong(@Sfx4Data, Sfx4Size, XM_MEMORY); Label1.Caption := 'Title : '+uFMOD.uFMOD_GetTitle; end else if (Key = '5') then begin uFMOD_StopSong; uFMOD_PlaySong(@Sfx5Data, Sfx5Size, XM_MEMORY); Label1.Caption := 'Title : '+uFMOD.uFMOD_GetTitle; end else if (Key = '6') then begin uFMOD_StopSong; uFMOD_PlaySong(@Sfx6Data, Sfx6Size, XM_MEMORY); Label1.Caption := 'Title : '+uFMOD.uFMOD_GetTitle; end else if (Key = '7') then begin uFMOD_StopSong; Label1.Caption := 'Press 1-6 to Change Sfx' +#13#10+ '7 = Stop'; end; end; procedure TForm1.FormCreate(Sender: TObject); begin Application.Title := 'Test'; end; end. ~~~~~~~~~~~~~~~~~~~~~~~~~~EnD~~~~~~~~~~~~~~~~~~~~~~~~~~ NB : Uses Sfx, Sfx2, Sfx3, Sfx4, Sfx5, Sfx6 if (Key = '1') then begin uFMOD_StopSong; uFMOD_PlaySong(@SfxData, SfxSize, XM_MEMORY); Label1.Caption := 'Title : '+uFMOD.uFMOD_GetTitle; end else if (Key = '2') then begin uFMOD_StopSong; uFMOD_PlaySong(@Sfx2Data, Sfx2Size, XM_MEMORY); Label1.Caption := 'Title : '+uFMOD.uFMOD_GetTitle; end else if (Key = '3') then begin uFMOD_StopSong; uFMOD_PlaySong(@Sfx3Data, Sfx3Size, XM_MEMORY); Label1.Caption := 'Title : '+uFMOD.uFMOD_GetTitle; end else if (Key = '4') then begin uFMOD_StopSong; uFMOD_PlaySong(@Sfx4Data, Sfx4Size, XM_MEMORY); Label1.Caption := 'Title : '+uFMOD.uFMOD_GetTitle; end else if (Key = '5') then begin uFMOD_StopSong; uFMOD_PlaySong(@Sfx5Data, Sfx5Size, XM_MEMORY); Label1.Caption := 'Title : '+uFMOD.uFMOD_GetTitle; end else if (Key = '6') then begin uFMOD_StopSong; uFMOD_PlaySong(@Sfx6Data, Sfx6Size, XM_MEMORY); Label1.Caption := 'Title : '+uFMOD.uFMOD_GetTitle; end ----------------------------------------------------------------> Unit Sfx2; Interface Const Sfx2Size = 268215; Sfx2Data : Array[1..Sfx2Size] of Byte = ( 69,120,116,101,110,100,101,100,32,77,111, .., .., .., .., .., .., .., .., .., .., .., .., .., .., .., .., .., Etc Done.

X-88

X-88

Sign in to follow this  
×