ドラゴンクエストクローンを作ろう (746レス)
ドラゴンクエストクローンを作ろう http://mevius.5ch.net/test/read.cgi/gamedev/1046454251/
上
下
前次
1-
新
通常表示
512バイト分割
レス栞
抽出解除
必死チェッカー(本家)
(べ)
自ID
レス栞
あぼーん
リロード規制
です。10分ほどで解除するので、
他のブラウザ
へ避難してください。
19: 名前は開発中のものです。 [sage] 03/03/03 07:04 ID:pxhSxl9y >>15 DirectDrawでのTCanvasの使い方がなっていない。 WindowsAPIを使うなどとは・・・。 以下のようなクラスを作って interface uses Windows, Graphics, DirectX; type TDirectDrawCanvas = class(TCanvas) protected FSurface: IDirectDrawSurface; FDeviceContext: HDC; FEnabled: Boolean; procedure CreateHandle; override; public constructor Create(ASurface: IDirectDrawSurface); destructor Destroy; override; procedure Release; property Enabled: Boolean read FEnabled; end; implementation http://mevius.5ch.net/test/read.cgi/gamedev/1046454251/19
20: 名前は開発中のものです。 [sage] 03/03/03 07:05 ID:pxhSxl9y 開業多すぎうざい。連投規制に引っかかるかも知れんので続きは後になるかも { TDirectDrawCanvas } constructor TDirectDrawCanvas.Create(ASurface: IDirectDrawSurface); begin inherited Create; FSurface := ASurface; FDeviceContext := 0; FEnabled := ASurface.IsLost = DD_OK; end; destructor TDirectDrawCanvas.Destroy; begin Release; inherited; end; procedure TDirectDrawCanvas.Release; begin if FDeviceContext <> 0 then begin Handle := 0; FSurface.ReleaseDC(FDeviceContext); FDeviceContext := 0; end; end; http://mevius.5ch.net/test/read.cgi/gamedev/1046454251/20
21: 名前は開発中のものです。 [sage] 03/03/03 07:08 ID:pxhSxl9y procedure TDirectDrawCanvas.CreateHandle; begin if FDeviceContext = 0 then begin FEnabled := FSurface.GetDC(FDeviceContext) = DD_OK; if FEnabled then Handle := FDeviceContext else begin Handle := 0; FDeviceContext := 0; end; end; end; 使い方は Canvas := TCanvas.Create(BackBufferSurface); しておいて with Canvas do if Enabled then try Pen.Style := psSolid; : finally Release; end; http://mevius.5ch.net/test/read.cgi/gamedev/1046454251/21
メモ帳
(0/65535文字)
上
下
前次
1-
新
書
関
写
板
覧
索
設
栞
歴
スレ情報
赤レス抽出
画像レス抽出
歴の未読スレ
AAサムネイル
Google検索
Wikipedia
ぬこの手
ぬこTOP
0.031s