czwartek, 28 czerwca 2007

A jednak

A jednak Hrabal, a jednak Czechy, a jednak. Lubię tak. Zdania wielokrotnie złożone się czyta miło. Dziś napisze prosto i krótko. Za to z ilustracją. A kiedyś tę myśl rozwinę.



5 komentarzy:

Tomasz pisze...

Najpierw kawa teraz piwo, ogólnie blog z napojami:D

ula pisze...

ty widzisz piwo a ja widzę dzieło.

Tomasz pisze...

No w sumie jakbym napisał ci o to:
Begin VB.Form Form1
Caption = "Rozdział 2: Jestem sobie czajniczkiem!"
ClientHeight = 7590
ClientLeft = 2070
ClientTop = 960
ClientWidth = 8790.001
LinkTopic = "Form1"
ScaleHeight = 7590
ScaleWidth = 8790.001
Begin VB.CommandButton ExitButton
Caption = "Wyjście"
Height = 495
Left = 0
TabIndex = 11
Top = 2400
Width = 1215
End
Begin VB.CommandButton Command10
Caption = "Info"
Height = 495
Left = 600
TabIndex = 10
Top = 1920
Width = 615
End
Begin VB.CommandButton Command9
Caption = "Zeruj"
Height = 495
Left = 0
TabIndex = 9
Top = 1920
Width = 615
End
Begin VB.CommandButton Command8
Caption = "Góra"
Height = 495
Left = 600
TabIndex = 8
Top = 1440
Width = 615
End
Begin VB.CommandButton Command7
Caption = "Dół"
Height = 495
Left = 0
TabIndex = 7
Top = 1440
Width = 615
End
Begin VB.CommandButton Command6
Caption = "Prawo"
Height = 495
Left = 600
TabIndex = 6
Top = 960
Width = 615
End
Begin VB.CommandButton Command5
Caption = "Lewo"
Height = 495
Left = 0
TabIndex = 5
Top = 960
Width = 615
End
Begin VB.CommandButton Command4
Caption = "-"
Height = 495
Left = 600
TabIndex = 4
Top = 480
Width = 615
End
Begin VB.CommandButton Command3
Caption = "+"
Height = 495
Left = 0
TabIndex = 3
Top = 480
Width = 615
End
Begin VB.PictureBox Picture1
Height = 7500
Left = 1200
ScaleHeight = 7440
ScaleWidth = 7440
TabIndex = 2
Top = 0
Width = 7500
End
Begin VB.CommandButton Command2
Caption = "->"
Height = 495
Left = 600
TabIndex = 1
Top = 0
Width = 615
End
Begin VB.CommandButton Command1
Caption = "<-"
Height = 495
Left = 0
TabIndex = 0
Top = 0
Width = 615
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Const formheight = 8000
Const FormWidth = 8900

Dim dx As DXGraphics
Dim GameDebugger As Debugger
Dim GameActive As Boolean

Function InitGraphics() As Long

Dim Result As Long

Set dx = New DXGraphics
Set dx.DebugObject = GameDebugger

dx.hWnd = Picture1.hWnd
dx.ShowFrameRate = True

Result = dx.InitDX
If Result <> 0 Then
GameDebugger.WriteLong "Inicjalizacja DirectX nie powiodła się.", Result
InitGraphics = Result

End If

dx.CreateTeapotMesh

InitGraphics = 0

End Function

Sub InitGame()

Dim Result As Long

Set GameDebugger = New Debugger
GameDebugger.Enable

Result = InitGraphics
If Result <> 0 Then
MsgBox "Nie można zainicjalizować grafiki DirectX! Program został zakończony!"
Unload Me

End If

GameActive = True

End Sub

Sub PlayGame()

Do While GameActive
dx.Render
DoEvents

Loop

EndGame

Unload Me

End Sub

Sub EndGame()

GameDebugger.WriteLine "Wyjście z programu"

End Sub


Private Sub Command1_Click()

dx.Rotate pi / 4

End Sub

Private Sub Command10_Click()

dx.ShowFrameRate = Not dx.ShowFrameRate

End Sub

Private Sub Command2_Click()

dx.Rotate -pi / 4

End Sub

Private Sub Command3_Click()

dx.Zoom -0.5

End Sub

Private Sub Command4_Click()

dx.Zoom 0.5

End Sub

Private Sub Command5_Click()

dx.View -0.5, 0, 0.5

End Sub

Private Sub Command6_Click()

dx.View 0.5, 0, -0.5

End Sub

Private Sub Command7_Click()

dx.View -0.5, 0, -0.5

End Sub

Private Sub Command8_Click()

dx.View 0.5, 0, 0.5

End Sub

Private Sub Command9_Click()

dx.ResetView

End Sub

Private Sub ExitButton_Click()

Unload Me

End Sub

Private Sub Form_Load()

Me.Show
DoEvents
InitGame
PlayGame

End Sub

Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)

If GameActive Then
GameActive = False
Cancel = True

End If

End Sub

Private Sub Form_Resize()

Me.Height = formheight
Me.Width = FormWidth

End Sub

Private Sub Form_Unload(Cancel As Integer)

Set dx = Nothing
GameDebugger.Disable

End Sub



To dla ciebie będzie to ciąg nic nie znaczących znaków, a ja widzę możliwość stworzenia wirtualnego czajnika:D

ula pisze...

dla mnie to troszke zaśmiecanie miejsca na trafne komentarze:D

Tomasz pisze...

Czy czajnik nie jest trafnym komentarzem do napojowego nastroju?:D