DIM SHARED lX
, lY
, rXx
, rY
, mX
, mY
, ballX
AS INTEGER, ballY
AS INTEGER, m&
, leftplr
, rightplr
lX = 10: lY = 10: rxX = 310: rY = 10
ballX
= 160: ballY
= 10: mY
= -1:
IF RND * 10 > 5 THEN mX
= 1 ELSE mX
= -1
print "Loading textures..." extractpmf ("textures.pmf")
aluminium& = hload("alum.jpg")
podl& = Hload("plovoucka.jpg")
str& = strop&
tokno& = okno&
dvere& = spajz_dvere&
lednice& = Hload("lednice2.jpg")
orech& = Hload("dekor orech.jpg")
orechsv& = Zesvetli("dekor orech.jpg")
polstr& = Hload("polstr.jpg")
dub& = Hload("dub.jpg")
tdub& = Ztmav("dub.jpg")
pc& = SHload("pccs.png")
kbd& = SHload("kbd.jpg")
mys& = SHload("mys.jpg")
woof& = SHload("repro.png")
speak& = Hload("speaker.jpg")
dlazba& = Hload("obklad.jpg")
dlazba2& = Hload("obklad 2.jpg")
sporakcelo = Hload("sporak-celo.jpg")
sporakvrch = Hload("sporak-vrch.jpg")
mikro& = SHload("mikro2.jpg")
CX = 0: CY = 0: CZ = -1 '
N = 1116 'used quads (also this room contains 2232 triangles)
X
AS SINGLE ' source X points in standard view Y
AS SINGLE ' source Y points in standard view pi
AS SINGLE ' start draw position on radius Radius
AS SINGLE ' radius (every point use own, but if is CX and CY in middle, are all the same)
T
AS LONG ' texture number for current triangle Tm
AS SINGLE ' texture multiplicier. 1 for one.
' A B C D
DATA -10,-2,-5,-10,-2,10,10,-2,-5,10,-2,10:
' floor coordinates DATA -10,2,-5,-10,2,10,10,2,-5,10,2,10:
' roof coordinates DATA -10,-2,-5,-10,-2,10,-10,2,-5,-10,2,10:
' wall + window DATA -5,-2,8,-10,-2,8,-5,2,8,-10,2,8 'refrigerator
DATA -5,-2,8,-5,-2.1,10,-5,2.1,8,-5,2,10 DATA -5,-3,10,10,-3,10,-5,3,10,10,3,10 DATA -4.8,-2,8,-3,-2,8,-4.8,1,8,-3,1,8 DATA -5,1,8,-3,1,8,-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8,5,-1.5,8 'monitor
DATA 9.7,-.3,8.5, 7.7,-.3,9.6, 9.7,1,8.5, 7.7,1,9.6 DATA 9.7,-.3,8.6,9.7,1,8.6,7.7,-.3,9.7,7.7,1,9.7 DATA 7.7,-.3,9.6,7.7,1,9.6,7.7,-.3,9.7,7.7,1,9.7 DATA 9.7,-.3,8.6,9.7,-.5,8.6,7.7,-.3,9.7,7.7,-.5,9.7 DATA 9.2,-.49,8.6,8.2,-.49,8.6,9.2,-.49,10,8.2,-.49,10 'keyboard
DATA 6.5,-.45,7.9,5.7,-.45,7.9,6.5,-.39,8.2,5.7,-.39,8.2:
'just shifted in space a 2D texture, not really 3D DATA 5.3,-.45,7.9,5,-.45,7.9,5.3,-.39,8,5,-.39,8:
'mouse - as keyboard 'subwoofer
DATA 7.4,-2,9.8,7.4,-2,9,7.4,-1.5,9.8,7.4,-1.5,9 DATA 7,-2,9.8,7,-2,9,7,-1.5,9.8,7,-1.5,9 DATA 7.4,-2,9.8,7,-2,9.8,7.4,-1.5,9.8,7,-1.5,9.8 DATA 7.4,-1.5,9.8,7,-1.5,9.8,7.4,-1.5,9,7,-1.5,9 DATA 7.4,-2,9,7,-2,9,7.4,-1.5,9,7,-1.5,9 'speaker right
DATA 4.7,-.5,10,4.7,0,10,4.7,-.5,9.7,4.7,0,9.7 DATA 4.41,-.5,10,4.41,0,10,4.41,-.5,9.7,4.41,0,9.7 DATA 4.41,0,10,4.41,0,9.7,4.7,0,10,4.7,0,9.7 DATA 4.7,-.5,9.7,4.41,-.5,9.7,4.7,0,9.7,4.41,0,9.7 'speaker left
DATA 6.7,-.5,10,6.7,0,10,6.7,-.5,9.7,6.7,0,9.7 DATA 6.41,-.5,10,6.41,0,10,6.41,-.5,9.7,6.41,0,9.7 DATA 6.41,0,10,6.41,0,9.7,6.7,0,10,6.7,0,9.7 DATA 6.7,-.5,9.7,6.41,-.5,9.7,6.7,0,9.7,6.41,0,9.7
'wall with kitchen unit, again walls with doors first
DATA 10,-2,-5,5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
DATA -3.2,-.1,-4.89,-3.5,-.1,-4.89,-3.2,-.1,-4.69,-3.5,-.1,-4.69 DATA -3.2,-.2,-4.89,-3.5,-.2,-4.89,-3.2,-.2,-4.69,-3.5,-.2,-4.69 DATA -3.2,-.1,-4.69,-3.5,-.1,-4.69,-3.2,-.2,-4.69,-3.5,-.2,-4.69 DATA -3.2,-.1,-4.69,-3.2,-.2,-4.69,-3.2,-.1,-4.89,-3.2,-.2,-4.89 DATA -3.5,-.1,-4.69,-3.5,-.2,-4.69,-3.5,-.1,-4.89,-3.5,-.2,-4.89
DATA -10.1,-2,-4.9,4.9,-2,-4.9,-10.1,-.49,-4.9,4.9,-.49,-4.9 DATA -10.1,-1.99,-5,4.9,-1.99,-5,-10.1,-1.99,-3.7,4.9,-1.99,-3.7 DATA -10.1,.8,-4.9,4.9,.8,-4.9,-10.1,1.6,-4.9,4.9,1.6,-4.9 'cabinet doors
DATA 1.85,1.55,-3.71,1.85,0.6,-3.71,2.8,1.55,-3.71,2.8,0.6,-3.71 DATA 1.85,-1.9,-3.71,1.85,-0.6,-3.71,2.8,-1.9,-3.71,2.8,-.6,-3.71 DATA 2.85,1.55,-3.71,2.85,0.6,-3.71,3.8,1.55,-3.71,3.8,0.6,-3.71 DATA 2.85,-1.9,-3.71,2.85,-0.6,-3.71,3.8,-1.9,-3.7,3.8,-.6,-3.71 DATA 3.85,1.55,-3.71,3.85,0.6,-3.71,4.8,1.55,-3.71,4.8,0.6,-3.71 DATA 3.85,-1.9,-3.71,3.85,-0.6,-3.71,4.8,-1.9,-3.71,4.8,-.6,-3.71 DATA .85,1.55,-3.71,.85,0.6,-3.71,1.8,1.55,-3.71,1.8,0.6,-3.71 DATA .85,-1.9,-3.71,.85,-0.6,-3.71,1.8,-1.9,-3.71,1.8,-.6,-3.71 DATA -1.85,1.55,-3.71,-1.85,0.6,-3.71,-2.8,1.55,-3.71,-2.8,0.6,-3.71 DATA -1.85,-1.9,-3.71,-1.85,-0.6,-3.71,-2.8,-1.9,-3.71,-2.8,-.6,-3.71 DATA -2.85,1.55,-3.71,-2.85,0.6,-3.71,-3.8,1.55,-3.71,-3.8,0.6,-3.71 DATA -2.85,-1.9,-3.71,-2.85,-0.6,-3.71,-3.8,-1.9,-3.7,-3.8,-.6,-3.71 DATA -3.85,1.55,-3.71,-3.85,0.6,-3.71,-4.8,1.55,-3.71,-4.8,0.6,-3.71 DATA -3.85,-1.9,-3.71,-3.85,-0.6,-3.71,-4.8,-1.9,-3.71,-4.8,-.6,-3.71 DATA -.85,1.55,-3.71,-.85,0.6,-3.71,-1.8,1.55,-3.71,-1.8,0.6,-3.71 DATA -.85,-1.9,-3.71,-.85,-0.6,-3.71,-1.8,-1.9,-3.71,-1.8,-.6,-3.71 DATA -4.85,1.55,-3.71,-4.85,0.6,-3.71,-5.8,1.55,-3.71,-5.8,0.6,-3.71 DATA -4.85,-1.9,-3.71,-4.85,-0.6,-3.71,-5.8,-1.9,-3.7,-5.8,-.6,-3.71 DATA -5.85,1.55,-3.71,-5.85,0.6,-3.71,-6.8,1.55,-3.71,-6.8,0.6,-3.71 DATA -5.85,-1.9,-3.71,-5.85,-0.6,-3.71,-6.8,-1.9,-3.71,-6.8,-.6,-3.71 DATA -6.85,1.55,-3.71,-6.85,0.6,-3.71,-7.8,1.55,-3.71,-7.8,0.6,-3.71 DATA -6.85,-1.9,-3.71,-6.85,-0.6,-3.71,-7.8,-1.9,-3.71,-7.8,-.6,-3.71 DATA -9.98,-2,-5,-9.98,1,-5,-9.98,-2,0,-9.98,1,0 DATA -9.97,-0.5,-3.4,-8.47,-.5,-3.4,-9.97,-0.5,0,-8.47,-.5,0 DATA -9.97,-0.6,-3.4,-8.47,-.6,-3.4,-9.97,-0.6,0,-8.47,-.6,0 DATA -9.97,.6,-3.7,-8.77,.6,-3.7,-9.97,.6,0,-8.77,.6,0 DATA -9.97,.7,-3.7,-8.77,.7,-3.7,-9.97,.7,0,-8.77,.7,0 DATA -9.97,1.6,-3.7,-8.77,1.6,-3.7,-9.97,1.6,0,-8.77,1.6,0 DATA -9.97,1.7,-3.7,-8.77,1.7,-3.7,-9.97,1.7,0,-8.77,1.7,0 DATA -9.97,-2,0,-8.77,-2,0,-9.97,-0.6,0,-8.77,-0.6,0 DATA -9.97,1.6,0,-8.77,1.6,0,-9.97,0.7,0,-8.77,0.7,0 DATA -9.97,-2,-.2,-8.77,-2,-.2,-9.97,-0.6,-.2,-8.77,-0.6,-.2 DATA -9.97,1.6,-.2,-8.77,1.6,-.2,-9.97,0.7,-.2,-8.77,0.7,-.2 DATA -9.97,1.7,0,-8.77,1.7,0,-9.97,1.6,0,-8.77,1.6,0 DATA -9.97,-.5,0,-8.47,-.5,0,-9.97,-.6,0,-8.47,-.6,0 DATA -9.97,.6,0,-8.77,.6,0,-9.97,.7,0,-8.77,.7,0 DATA -8.77,1.7,0,-8.77,1.6,0,-8.77,1.7,-3.7,-8.77,1.6,-3.7 DATA -8.47,-.5,0,-8.47,-.6,0,-8.47,-0.5,-3.7,-8.47,-0.6,-3.7 DATA -8.77,.7,0,-8.77,.6,0,-8.77,.7,-3.7,-8.77,.6,-3.7 DATA -8.77,-2,0,-8.77,-.6,0,-8.77,-2,-0.2,-8.77,-.6,-0.2 DATA -8.77,1.6,0,-8.77,.7,0,-8.77,1.6,-0.2,-8.77,.7,-0.2 DATA -8.77,-2,-1.9,-8.77,-.6,-1.9,-8.77,-2,-2,-8.77,-.6,-2 DATA -8.77,1.6,-1.9,-8.77,.7,-1.9,-8.77,1.6,-2,-8.77,.7,-2 DATA -8.77,-1.99,0,-9.97,-1.99,0,-8.77,-1.99,-3.7,-9.97,-1.99,-3.7 DATA -9.97,-2,0,-9.97,-2,-4.9,-9.97,-.5,0,-9.97,-.5,-4.9 dATA -9.97,1.6,0,-9.97,1.6,-4.9,-9.97,.6,0,-9.97,.6,-4.9 DATA -8.77,-2,-3.7,-8.77,-.6,-3.7,-8.77,-2,-3.6,-8.77,-.6,-3.6 DATA -8.77,1.6,-3.7,-8.77,.7,-3.7,-8.77,1.6,-3.6,-8.77,.7,-3.6
DATA -8.77,-1.9,-2,-8.77,-.6,-2,-8.77,-1.9,-3.6,-8.77,-.6,-3.6 DATA -8.77,1.6,-2,-8.77,.7,-2,-8.77,1.6,-3.6,-8.77,.7,-3.6
DATA -8.77,-1.9,-.2,-8.77,-.6,-.2,-8.77,-1.9,-1.9,-8.77,-.6,-1.9 DATA -8.77,1.6,-.2,-8.77,.7,-.2,-8.77,1.6,-1.9,-8.77,.7,-1.9:
'glased doors dATA -7.85,1.55,-3.71,-7.85,0.6,-3.71,-8.8,1.55,-3.71,-8.8,0.6,-3.71 DATA -7.85,-1.9,-3.71,-7.85,-0.6,-3.71,-8.8,-1.9,-3.71,-8.8,-.6,-3.71 DATA .85,1.55,-3.71,.85,0.6,-3.71,-.85,1.55,-3.71,-.85,0.6,-3.71 DATA .85,-1.9,-3.71,.85,-0.6,-3.71,-.85,-1.9,-3.71,-.85,-.6,-3.71
'microwave
DATA -9,-.5,-4.1,-8,-.5,-4.1,-9,0,-4.1,-8,0,-4.1 DATA -9,-.5,-4.9,-8,-.5,-4.9,-9,0,-4.9,-8,0,-4.9 DATA -9,0,-4.1,-8,0,-4.1,-9,0,-4.9,-8,0,-4.9 DATA -9,0,-4.1,-9,-.5,-4.1,-9,0,-4.9,-9,-.5,-4.9 DATA -8,0,-4.1,-8,-.5,-4.1,-8,0,-4.9,-8,-.5,-4.9
READ v
(r
).X
, v
(r
).Y
, v
(r
).Z
'all is placed on the same Y = the same floor
Set_texture podl&, 1, 4, 15 'set image img as texture for bottom (triangles 1 to 4)
Set_texture str&, 5, 8, 3
Set_texture tokno&, 9, 12, 1
Set_texture dvere&, 13, 16, 1
Set_texture white&, 17, 20, 1
Set_texture white&, 21, 24, 1 'wall at pc
Set_texture lednice&, 25, 28, 1
Set_texture white&, 29, 32, 1
Set_texture Swhite&, 33, 36, 1
Set_texture Swhite&, 37, 40, 1
Set_texture orech&, 41, 44, 10
Set_texture orech&, 45, 48, 10
Set_texture orech&, 49, 52, 10
Set_texture orech&, 53, 56, 10
Set_texture orech&, 57, 60, 10
Set_texture orech&, 61, 64, 10
Set_texture polstr&, 65, 68, 3
Set_texture polstr&, 69, 72, 3
Set_texture polstr&, 73, 76, 3
Set_texture polstr&, 77, 80, 3
Set_texture orech&, 81, 84, 10
Set_texture orech&, 85, 88, 10
Set_texture orech&, 89, 92, 10
Set_texture orech&, 93, 96, 3
Set_texture orech&, 97, 100, 3
Set_texture orech&, 101, 104, 1
Set_texture orech&, 105, 108, 1
Set_texture orech&, 109, 112, 1
Set_texture orech&, 113, 116, 7
Set_texture orech&, 117, 120, 1
Set_texture orech&, 121, 204, 2
Set_texture orechsv&, 205, 220, 1
Set_texture orech&, 221, 292, 1
Set_texture orechsv&, 293, 308, 1
Set_texture orech&, 309, 316, 1
Set_texture orechsv&, 317, 328, 1
Set_texture orech&, 329, 400, 1
Set_texture orechsv&, 401, 416, 1
Set_texture orech&, 417, 424, 1
Set_texture orechsv&, 425, 432, 1
'po upgradu
Set_texture white&, 433, 437, 1 'wall
Set_texture dvere&, 437, 440, 1
Set_texture white&, 441, 444, 1
Set_texture dub&, 445, 453, 1 'pc desk
Set_texture tdub&, 454, 462, 1 'pc desk back
Set_texture dub&, 463, 480, 1
Set_texture tdub&, 481, 484, 1
Set_texture dub&, 485, 492, 1
Set_texture tdub&, 493, 512, 1
Set_texture dub&, 513, 520, 1
Set_texture Black&, 521, 524, 1
Set_texture SBlack&, 525, 528, 1
Set_texture Black&, 529, 532, 1
Set_texture pc&, 533, 536, 1
Set_texture SBlack&, 537, 540, 1 'MONITOR
Set_texture Black&, 541, 548, 1 'MONITOR
Set_texture Noha&, 549, 552, 1 'MONITOR
Set_texture Black&, 553, 556, 1
Set_texture kbd&, 557, 560, 1 'keyboard
Set_texture mys&, 561, 564, 1 'keyboard
Set_texture Black, 565, 576, 1 'woof
Set_texture SBlack, 577, 580, 1 'subwoofer
Set_texture woof&, 581, 584, 1 'subwoofer
Set_texture Black, 585, 596, 1 'speakers
Set_texture speak&, 597, 600, 1
Set_texture Black, 601, 612, 1
Set_texture speak&, 613, 616, 1
'strana s linkou
Set_texture dvere&, 617, 620, 1 'doors
Set_texture dlazba&, 621, 624, 10
Set_texture white&, 625, 628, 1
Set_texture sporakcelo, 629, 632, 1
Set_texture sporakvrch, 633, 636, 1
Set_texture white&, 637, 648, 1
Set_texture dub&, 649, 652, 1
Set_texture tdub&, 653, 656, 5
Set_texture dub&, 657, 676, 5
Set_texture tdub&, 677, 680, 5
Set_texture dub&, 681, 796, 5
Set_texture tdub&, 797, 800, 5
Set_texture dub&, 801, 809, 5
Set_texture dub&, 809, 812, 5
Set_texture tdub&, 813, 816, 5
Set_texture tdub&, 817, 820, 5
Set_texture Silver&, 821, 836, 1
Set_texture SilverC&, 837, 840, 1
Set_texture SilverB&, 841, 860, 1
Set_texture dub&, 861, 872, 1
Set_texture tdub&, 873, 960, 1
Set_texture dlazba2&, 961, 964, 10
Set_texture tdub&, 965, 1004, 1
Set_texture dub&, 1005, 1064, 1
Set_texture tdub&, 1065, 1076, 1
Set_texture Sklo&, 1077, 1080, 1
Set_texture tdub&, 1081, 1096, 1
Set_texture mikro&, 1097, 1100, 1
Set_texture SilverB&, 1101, 1116, 1
valec -1, -.8, 4.7, -.6, 10, SilverB& ' vase
valec 6, -.5, 9, -.35, 10, Silver&
valec -3.35, -.2, -4.8, -.3, 40, SilverB& 'water pipe
Zvalec -3.35, -.3, -4.8, -4.1, 40, SilverB& 'water pipe
valec -3.35, -.29, -4.1, -.4, 40, SilverB& 'water pipe
'this three vase are in cabinet with glased door
talir -9.1, .8, -1.45
talir -9.1, .8, -1.05
talir -9.1, .8, -.65
'cabinet handles
madlo -7.9, .8, -3.6
madlo -7.45, .8, -3.6
madlo -7.9, -.8, -3.4
madlo -7.45,-.8, -3.4
madlo -6, -.8, -3.4
madlo -5.45,-.8, -3.4
madlo -6, .8, -3.6
madlo -5.45, .8, -3.6
madlo -4.1, -.8 ,-3.4
madlo -3.45,-.8, -3.4
madlo -4.1, .8, -3.6
madlo -3.45, .8, -3.6
madlo -2.2, -.8 ,-3.4
madlo -1.45,-.8, -3.4
madlo -2.2, .8, -3.6
madlo -1.45, .8, -3.6
madlo -.3, -.8 ,-3.4
madlo -.3, .8, -3.6
madlo 1,-.8, -3.4
madlo 1, .8, -3.6
madlo 2,-.8, -3.4
madlo 2, .8, -3.6
madlo 3,-.8, -3.4
madlo 3, .8, -3.6
madlo 4,-.8, -3.4
madlo 4, .8, -3.6
madlo 8.5, -1, 7.9
madlo 8.5, -1.3, 7.9
zmadlo -8.77,.8,-1
zmadlo -8.77,.8,-2.75
zmadlo -8.77,-.8,-1
zmadlo -8.77,-.8,-2.75
minRadius = 1000
start = 0
LenX = v(r).X - CX
LenY = v(r).Y - CY
LenZ = v(r).Z - CZ
radius
= SQR(LenX
^ 2 + LenZ
^ 2) if minradius
< .4 then minradius
= 1000 if minradius
> radius
then minradius
= radius
radiusH
= sqr(lenY
^2 + lenz
^2) v(r).Radius = radius
v(r).radiusH = radiusH
v(r).pi = JK!(CX, CZ, v(r).X, v(r).Z, radius)
v(r).pih = jk! (cy,cz,v(r).y, v(r).z, radiusH)
oldposZ = posZ
oldposX = posX
CASE CHR$(0) + CHR$(72): posz
= posz
+ COS(rot
) / 2: posx
= posx
+ -sin(rot
) / 2: posy
= posy
+ -sin(roth
)/2 'up CASE CHR$(0) + CHR$(80): posz
= posz
- COS(rot
) / 2: posx
= posx
- -sin(rot
) / 2 : posy
= posy
- -sin(roth
)/2 'dn
'------------------------------
case -7 to -5:
if posZ
< -7 then posX
= oldposx: posz
= oldposz
case -5 to 3:
if posZ
< -2 then posX
= oldposx: posz
= oldposz
case 3 to 6:
if posZ
< -7 then posX
= oldposx: posz
= oldposz
'-----------------------------
CZ = -posz
CX = -posx
CY = -posY
x
= CX
+ SIN(rot
+ v
(r
).pi
) * v
(r
).Radius
y
= CY
+ sin (rotH
+ v
(r
).piH
) * v
(r
).radiusH
z
= CZ
+ cos(rot
+v
(r
).pi
) * v
(r
).Radius
v(r).wX = x + posx
v(r).wY = y + posY
v(r).wZ = z + posz
minigame
Set_texture m33&, 537, 540, 1
img& = v(zz).T
num = v(zz).Tm
_MAPTRIANGLE (0, h
* num
)-(w
* num
, h
* num
)-(0, 0), img&
TO(v
(zz
).wX
, v
(zz
).wY
, v
(zz
).wZ
)-(v
(zz
+ 1).wX
, v
(zz
+ 1).wY
, v
(zz
+ 1).wZ
)-(v
(zz
+ 2).wX
, v
(zz
+ 2).wY
, v
(zz
+ 2).wZ
), 0, _SMOOTH _MAPTRIANGLE (w
* num
, h
* num
)-(0, 0)-(w
* num
, 0), img&
TO(v
(zz
+ 1).wX
, v
(zz
+ 1).wY
, v
(zz
+ 1).wZ
)-(v
(zz
+ 2).wX
, v
(zz
+ 2).wY
, v
(zz
+ 2).wZ
)-(v
(zz
+ 3).wX
, v
(zz
+ 3).wY
, v
(zz
+ 3).wZ
), 0, _SMOOTH
REM infobox posx
, posy
, posz
, rot
, minradius
sub INFOBOX
(posx
, posy
, posz
, rot
, u
) W = 639 : H = 479: X = -.5: Y = 0 : Z = -1
print "Position X: "; posx
print "Position Y: "; posy
print "Position Z: "; posz
_maptriangle (0,0) - (w
, 0) - (0, h
), hnfo&
to (-2+x
, 2+Y
, -2+z
) - (2+x
, 2+y
, -2+z
) - (-2+x
, -2+y
, -2+z
) _maptriangle (w
, 0) - (0, h
) - (w
,h
), hnfo&
to (2+x
, 2+y
, -2+z
) - (-2+x
, -2+y
, -2+z
) - (2+x
, -2+y
, -2+z
)
N = N + 12
v(tt).x = x
v(tt).y = y
v(tt).z = z
v(tt+1).x = x
v(tt+1).y = y2
v(tt+1).z = z
v(tt+2).x = x2
v(tt+2).y = y
v(tt+2).z = z
v(tt+3).x = x2
v(tt+3).y = y2
v(tt+3).z = z
'------------
v(tt+4).x = x
v(tt+4).y = y
v(tt+4).z = z
v(tt+5).x = x
v(tt+5).y = y2
v(tt+5).z = z
v(tt+6).x = x
v(tt+6).y = y
v(tt+6).z = z2
v(tt+7).x = x
v(tt+7).y = y2
v(tt+7).z = z2
'------------
v(tt+8).x = x2
v(tt+8).y = y
v(tt+8).z = z
v(tt+9).x = x2
v(tt+9).y = y2
v(tt+9).z = z
v(tt+10).x = x2
v(tt+10).y = y
v(tt+10).z = z2
v(tt+11).x = x2
v(tt+11).y = y2
v(tt+11).z = z2
set_texture aluminium&, tt-1, tt+11,1
N = N + 12
'predni obdelnik
v(tt).x = x2
v(tt).y = y
v(tt).z = z
v(tt+1).x = x2
v(tt+1).y = y2
v(tt+1).z = z
v(tt+2).x = x2
v(tt+2).y = y
v(tt+2).z = z2
v(tt+3).x = x2
v(tt+3).y = y2
v(tt+3).z = z2
'------------
v(tt+4).x = x
v(tt+4).y = y2
v(tt+4).z = z
v(tt+5).x = x2
v(tt+5).y = y2
v(tt+5).z = z
v(tt+6).x = x
v(tt+6).y = y
v(tt+6).z = z
v(tt+7).x = x2
v(tt+7).y = y
v(tt+7).z = z
'------------
v(tt+8).x = x
v(tt+8).y = y2
v(tt+8).z = z2
v(tt+9).x = x2
v(tt+9).y = y2
v(tt+9).z = z2
v(tt+10).x = x
v(tt+10).y = y
v(tt+10).z = z2
v(tt+11).x = x2
v(tt+11).y = y
v(tt+11).z = z2
set_texture aluminium&, tt-1, tt+11,1
SUB Set_texture
(num
, start
, eend
, much
) v(s).T = num
v(s).Tm = much
rX = 1024 / 4
rY = 768 / 3
e = 127 / 100
LINE (0, l
)-(99, l
), _RGB32(255 - f
, 255 - f
, 255 - f
) f = f + e
e = 127 / 50
LINE (l
, l
)-(100 - l
, 100 - l
), _RGB32(127 + f
, 127 + f
, 127 + f
), B
f = f + e
e = 127 / 50
LINE (l
, l
)-(100 - l
, 100 - l
), _RGB32(255 - f
, 255 - f
, 255 - f
), B
f = f + e
LINE (0, 0)-(w
- 1, h
- 1), _RGBA32(255, 255, 255, 30), BF
FUNCTION JK!
(cx
, cy
, px
, py
, R
)' based on binary circle definition LenX = cx - px
LenY = cy - py
jR = 1 / R
jX = LenX * jR
jY = LenY * jR
sinusAlfa = jX
Q = 1
IF px
>= cx
AND py
=< cy
THEN Q
= 1 ' select angle to quadrant JK! = alfaB
SUB valec
(xs
, ys
, zs
, ye
, R
, t&
) polomer = R
N = N + 64
ott = tt
v
(tt
).X
= xs
+ SIN(s
) / polomer
v(tt).Y = ys
v
(tt
).Z
= zs
+ COS(s
) / polomer
tt = tt + 1
v
(tt
).X
= xs
+ SIN(s
) / polomer
v(tt).Y = ye
v
(tt
).Z
= zs
+ COS(s
) / polomer
tt = tt + 1
v
(tt
).X
= xs
+ SIN(s
+ polo
) / polomer
v(tt).Y = ys
v
(tt
).Z
= zs
+ COS(s
+ polo
) / polomer
tt = tt + 1
v
(tt
).X
= xs
+ SIN(s
+ polo
) / polomer
v(tt).Y = ye
v
(tt
).Z
= zs
+ COS(s
+ polo
) / polomer
Set_texture t&, ott, tt, 1
tt = tt + 1
SUB Zvalec
(xs
, ys
, zs
, ze
, R
, t&
) polomer = R
N = N + 64
ott = tt
v
(tt
).X
= xs
+ SIN(s
) / polomer
v
(tt
).Y
= ys
+ COS(s
) / polomer
v(tt).Z = zs
tt = tt + 1
v
(tt
).X
= xs
+ SIN(s
) / polomer
v
(tt
).Y
= ys
+ COS(s
) / polomer
v(tt).Z = ze
tt = tt + 1
v
(tt
).X
= xs
+ SIN(s
+ polo
) / polomer
v
(tt
).Y
= ys
+ COS(s
+ polo
) / polomer
v(tt).Z = zs
tt = tt + 1
v
(tt
).X
= xs
+ SIN(s
+ polo
) / polomer
v
(tt
).Y
= ys
+ COS(s
+ polo
) / polomer
v(tt).Z = ze
Set_texture t&, ott, tt, 1
tt = tt + 1
radius0 = 0
radius1 = .05
radius2 = .1
radius3 = .2
ye = y - .1
ys2 = ye
ye2 = y + .2
N = N + 64
ott = tt
IF SGN(x
) >= 0 THEN v
(tt
).X
= x
+ (SIN(s
) * radius2
+ SIN(s
) * radius0
) ELSE v
(tt
).X
= x
- (SIN(s
) * radius2
- SIN(s
) * radius0
) v(tt).Y = ys2
IF SGN(z
) >= 0 THEN v
(tt
).Z
= z
+ (COS(s
) * radius2
+ COS(s
) * radius0
) ELSE v
(tt
).Z
= z
- (COS(s
) * radius2
- COS(s
) * radius0
) tt = tt + 1
IF SGN(x
) >= 0 THEN v
(tt
).X
= x
+ (SIN(s
) * radius3
+ SIN(s
) * radius1
) ELSE v
(tt
).X
= x
- (SIN(s
) * radius3
- SIN(s
) * radius1
) v(tt).Y = ye2
IF SGN(z
) >= 0 THEN v
(tt
).Z
= z
+ (COS(s
) * radius3
+ COS(s
) * radius1
) ELSE v
(tt
).Z
= z
- (COS(s
) * radius3
- COS(s
) * radius1
) tt = tt + 1
IF SGN(x
) >= 0 THEN v
(tt
).X
= x
+ (SIN(s
+ polo
) * radius2
+ SIN(s
+ polo
) * radius0
) ELSE v
(tt
).X
= x
- (SIN(s
+ polo
) * radius2
- SIN(s
+ polo
) * radius0
) v(tt).Y = ys2
IF SGN(z
) >= 0 THEN v
(tt
).Z
= z
+ (COS(s
+ polo
) * radius2
+ COS(s
+ polo
) * radius0
) ELSE v
(tt
).Z
= z
- (COS(s
+ polo
) * radius2
- COS(s
+ polo
) * radius0
) tt = tt + 1
IF SGN(x
) >= 0 THEN v
(tt
).X
= x
+ (SIN(s
+ polo
) * radius3
+ SIN(s
+ polo
) * radius1
) ELSE v
(tt
).X
= x
- (SIN(s
+ polo
) * radius3
- SIN(s
+ polo
) * radius1
) v(tt).Y = ye2
IF SGN(z
) >= 0 THEN v
(tt
).Z
= z
+ (COS(s
+ polo
) * radius3
+ COS(s
+ polo
) * radius1
) ELSE v
(tt
).Z
= z
- (COS(s
+ polo
) * radius3
- COS(s
+ polo
) * radius1
) tt = tt + 1
Set_texture SilverC&, ott, tt - 1, 1
alfa = 127 / 25
a = 120
a = a - alfa
a = a + alfa
IF rY
+ 25 < ballY
THEN rY
= rY
+ 1 ELSE rY
= rY
- 1 IF ballY
> rY
AND ballY
< rY
+ 50 THEN mX
= mX
* -1
IF lY
+ 25 < ballY
THEN lY
= lY
+ 1 ELSE lY
= lY
- 1
IF ballY
> lY
AND ballY
< lY
+ 50 THEN mX
= mX
* -1
ballX = ballX + mX
ballY = ballY + mY
IF ballX
> 315 THEN mX
= mX
* -1: rightplr
= rightplr
+ 1: ballX
= ballX
+ mX
+ SIN(_ATAN2(ballY
, ballX
)) IF ballX
< 5 THEN mX
= mX
* -1: leftplr
= leftplr
+ 1: ballY
= ballY
+ mY
+ COS(_ATAN2(ballY
, ballX
))
IF ballY
> 235 THEN mY
= mY
* -1 - _ATAN2(ballY
, ballX
) / 2: ballY
= ballY
+ mY
IF ballY
< 5 THEN mY
= mY
* -1 + _ATAN2(ballY
, ballX
) / 2: ballY
= ballY
+ mY
IF ballY
>= lY
AND ballY
<= lY
+ 60 AND ballX
<= 10 THEN mY
= mY
* -1: ballY
= ballY
+ mY
- _ATAN2(ballY
, ballX
) IF ballY
>= rY
AND ballY
<= rY
+ 60 AND ballX
>= 300 THEN mY
= mY
* -1: ballY
= ballY
+ mY
+ _ACOS(_ATAN2(ballY
, ballX
))
IF ballY
> 60 AND ballY
< 180 THEN mX
= mX
* -1 IF ballY
= 64 OR ballY
= 180 THEN mY
= mY
* -1 LINE (ballX
- 2, ballY
- 2)-(ballX
+ 2, ballY
+ 2), , B
LINE (3, 3)-(317, 237), , B
LINE (lX
, lY
)-(lX
+ 10, lY
+ 50), , B
LINE (rXx
, rY
)-(rxX
- 10, rY
+ 50), , B
LINE (160, 60)-(160, 180)
SUB ExtractPMF
(Vystup
AS STRING) ' here insert PMF file name for extracting files PRINT "Extracting files from "; Vystup$
PRINT "Total records in file:"; head.much
FOR celek
= 1 TO head.much
SEEK #e
, 21 + head.much
* 4 ' start DATA area FOR total
= 1 TO head.much
IF total
= 1 THEN velikost&
= starts
(1) - (21 + head.much
* 4) ELSE velikost&
= starts
(total
) - starts
(total
- 1)
FOR NameIt
= 1 TO head.much
GET #e
, , NamesLenght
(NameIt
)
FOR Name2
= 1 TO head.much
s$
= SPACE$(NamesLenght
(Name2
)) erh:
BEEP:
INPUT "Warnig! Extracted file the same name already exists!!!! (O)verwrite, (R)ename or (E)xit? "; er$
print "File "; vystup$;
" not found.":
end
SUB Destructor
(vystup
AS STRING) 'delete files created by ExtractPMF
FOR celek
= 1 TO head.much
SEEK #e
, starts
(head.much
) ' start DATA area FOR NameIt
= 1 TO head.much
GET #e
, , NamesLenght
(NameIt
) FOR Name2
= 1 TO head.much
s$
= SPACE$(NamesLenght
(Name2
))