ドラゴンクエストクローンを作ろうat GAMEDEVドラゴンクエストクローンを作ろう - 暇つぶし2ch■コピペモード□スレを通常表示□オプションモード□このスレッドのURL■項目テキスト20:名前は開発中のものです。 03/03/03 07:05 pxhSxl9y.net 開業多すぎうざい。連投規制に引っかかるかも知れんので続きは後になるかも { 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; 21:名前は開発中のものです。 03/03/03 07:08 pxhSxl9y.net 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; 次ページ最新レス表示レスジャンプ類似スレ一覧スレッドの検索話題のニュースおまかせリストオプションしおりを挟むスレッドに書込スレッドの一覧暇つぶし2ch