-
Notifications
You must be signed in to change notification settings - Fork 116
SDLHelloWord
Zhao Yipeng edited this page Dec 6, 2017
·
11 revisions
原文地址:http://twinklebeardev.blogspot.com/2012/07/lesson-0-setting-up-sdl.html
这一节我们将学习简单的将一张图片绘制到屏幕上的方法。具体来讲是绘制下面这张图片。

你可以通过右键另存为下载这张图片。如果你丢了资源或者想要偷看一下我的代码,就从这里抓好了。但切忌复制粘贴!
首先在delphi当中File->New->Other,创建一个Console Application,保存为SDLHelloWorld,添加一个新的单元,保存为App.pas,修改SDLHelloWorld.dpr:
program SDLHelloWorld;
{$APPTYPE CONSOLE}
{$R *.res}
uses
System.SysUtils,
sdl2 in '..\..\Pascal-SDL-2-Headers-master\sdl2.pas',
App in 'App.pas';
begin
MyApp := TMyApp.Create;
MyApp.Run;
MyApp.Free;
end.App.pas如下: