- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
- 69
- 70
- 71
- 72
- 73
- 74
- 75
- 76
- 77
- 78
- 79
- 80
- 81
- 82
- 83
- 84
- 85
- 86
- 87
- 88
- 89
- 90
- 91
- 92
- 93
- 94
- 95
- 96
- 97
- 98
DataSection
Data.f 0.0025,0.0026,0.00235
EndDataSection
Global SCREENWIDTH,SCREENHEIGHT
Define .f:bitplanes.b=32
SCREENWIDTH=GetSystemMetrics_(#SM_CXSCREEN)
SCREENHEIGHT=GetSystemMetrics_(#SM_CYSCREEN)
If InitSprite()=0 Or InitSprite3D()=0 Or InitKeyboard()=0
MessageRequester("Error","Can't access DirectX",0)
End
EndIf
desktop.l = CreateImage(0,DesktopWidth(0),DesktopHeight(0))
hdc.l = StartDrawing(ImageOutput(0))
SelectObject_(hdc,desktop)
BitBlt_(hdc,0,0,DesktopWidth(0),DesktopHeight(0),GetDC_(GetDesktopWindow_()),0,0,#SRCCOPY)
StopDrawing()
DeleteDC_(hdc)
While OpenScreen(SCREENWIDTH,SCREENHEIGHT,bitplanes.b,"FullScreen")=0
If bitplanes.b>16
bitplanes.b-8
ElseIf SCREENHEIGHT>600
SCREENWIDTH=800
SCREENHEIGHT=600
ElseIf SCREENHEIGHT>480
SCREENWIDTH=640
SCREENHEIGHT=480
ElseIf SCREENHEIGHT>400
SCREENWIDTH=640
SCREENHEIGHT=400
ElseIf SCREENHEIGHT>240
SCREENWIDTH=320
SCREENHEIGHT=240
ElseIf SCREENHEIGHT>200
SCREENWIDTH=320
SCREENHEIGHT=200
Else
MessageRequester("Listen:","Can't open Screen!",0)
End
EndIf
Wend
w=DesktopWidth(0)
h=DesktopHeight(0)
z=1000/Sqr(3)
perspw=w
PerspectiveAngle.d=#PI/16
CreateSprite(0,w,h,#PB_Sprite_Texture)
StartDrawing(SpriteOutput(0))
DrawImage(ImageID(0),0,0)
StopDrawing()
DisplaySprite(0,0,0)
FlipBuffers()
DisplaySprite(0,0,0)
CreateSprite3D(0,0)
x3=w-1
x4=0
y3=h
y4=h
z3=z
z4=z
For t.b=1 To 3
omega=-omega
Read alfa
Repeat
ExamineKeyboard()
ClearScreen(0)
Incrz=h*Sin(Angle)
x1=Incrz*Tan(PerspectiveAngle)
x2=x3-x1
y1=h-h*Cos(Angle)
y2=y1
z1=z+Incrz/4.75
z2=z1:Start3D()
TransformSprite3D(0,x1,y1,z1,x2,y2,z2,x3,y3,z3,x4,y4,z4)
DisplaySprite3D(0,0,0,255)
Stop3D()
omega+alfa
If omega<0
Angle-Pow(omega,2)
Else
Angle+Pow(omega,2)
EndIf
If Angle<0 Or Angle>4/5*#PI
Break
EndIf
FlipBuffers()
Delay(10)
Until KeyboardPushed(#PB_Key_Escape)
Next
DisplaySprite(0,0,0)
FlipBuffers()
Delay(10)
DisplaySprite(0,0,0)
hometwo 01.05.2014 15:07 # −6
brutushafens 01.05.2014 15:19 # −3
guest 02.05.2014 12:40 # −4
brutushafens 02.05.2014 12:42 # −2
tirinox 02.05.2014 09:53 # +1
brutushafens 02.05.2014 10:10 # +2
bjbAMvU 25.08.2021 01:34 # 0