'---------------------- settings -----------------------------------
room_c = 4 'how many rooms should be in the game?
spider_c = 8 * room_c 'how many spiders should be in the game?
diamant_c = 10 'average number of diamonds / room
room_doormin = 2 'there must be at least as many doors in a room
room_doormax = 3 'there should be a maximum of this number of doors in a room
me_speed = .15 'my speed
mouse_sens = .5
'-----ADVANCED SETTINGS ----------------------------------------------------------------------------------------------------------------
diamant_speed_min = .05 'diamant speed 1. room
diamant_speed_max = .15 'diamant speed last room
room_buffsize = 100
room_relsize = 20
room_boxmin_c = 4
room_boxmax_c = 6
shdw_c = 40
Const pip180
= 3.141592 / 180 cheat_active = 1
'make colors
'shadows
'make textures
dia_text_c
= 20:
Dim dia_text
(dia_text_c
- 1, shdw_c
- 1), sp_text
(shdw_c
- 1, 1)dt_c = 10
For t
= 0 To shdw_c
- 1: tmax
= 40: tmin
= 40: size
= Int(tmax
- (tmax
- tmin
) / (shdw_c
- 1) * t
): dark
= 1 - 1 / (shdw_c
- 1) * t
Line (size
* marg
, size
* marg
)-(size
- size
* marg
, size
- size
* marg
), _RGB32(180, 180, 180), BF:
_Source stand_temp
noise
= 5 + 5 * (1 / (shdw_c
- 1) * t
) ^ 1.2:
For tx
= 0 To size
- 1:
For ty
= 0 To size
- 1: temp_color
(0) = Point(tx
, ty
)
'make wall
'make door-flash
temp_color
(0) = _RGB32(255, 100, 100): temp_color
(1) = _RGB32(100, 100, 255) 'door 2 colors For t2
= 0 To dt_c
- 1: a
= 1 / (dt_c
- 1) * t2: temp
= _NewImage(3, 3, 32):
_Dest temp: m
= .5 * dark
cr
= (_Red32(temp_color
(0)) * a
+ _Red32(temp_color
(1)) * (1 - a
)) * m: cg
= (_Green32(temp_color
(0)) * a
+ _Green32(temp_color
(1)) * (1 - a
)) * m
'make diamants
tmax
= 100: tmin
= 40: size
= Int(tmax
- (tmax
- tmin
) / (shdw_c
- 1) * t
) temp_color
(0) = _RGB32(2 + dark
* 186 * Rnd(1), 2 + dark
* 186 * Rnd(1), 2 + dark
* 186 * Rnd(1)) Color temp_color
(0):
Circle (size
/ 2, size
/ 2), size
/ 2 * .95:
Paint (size
/ 2, size
/ 2), temp_color
(0), temp_color
(0)
'make spider textures
temp_color
(0) = _RGB32(63, 63, 63): temp_color
(1) = _RGB32(255, 255, 194) 'spiders 2 colors
'white flash
wf_c
= 20:
Dim wf_text
(wf_c
- 1): sizex
= Int(monx
* .3): sizey
= Int(mony
* .3) PSet (tx
, ty
), _RGBA32(255, 255, 255, ((255 / (sizex
/ 2) * Sqr((sizex
/ 2 - tx
) ^ 2 + (sizey
/ 2 - ty
) ^ 2) + 200) * (1 / (wf_c
- 1) * t
)) * .6)
d(0, 1) = -1: d(1, 0) = 1: d(1, 1) = -1: d(2, 0) = 1: d(3, 0) = 1: d(3, 1) = 1
d(4, 1) = 1: d(5, 0) = -1: d(5, 1) = 1: d(6, 0) = -1: d(7, 0) = -1: d(7, 1) = -1
'ROOM array
'0,1,2,3 x1,y1,x2,y2 position in room_map array
'4 number of doors
'20+ ,21+ door coordinates (step5)
'22+ door exit direction
'ROOM_MAP array (room,x,y)
'nothing
'bit 0-walking area
'bit 1,2,3,4-wall
'bit 5 door
Dim Shared me
(9), cam
(9) '0,1,2 XYZ 3,4 angAB , 5 room
'make rooms
mapsize0
= 20: room
(0, 1) = mapsize0: room
(0, 3) = mapsize0:
For tx
= 0 To mapsize0
- 1:
For ty
= 0 To mapsize0
- 1room_map
(0, tx
, ty
) = 1 + Abs(tx
= 0 Or tx
= mapsize0
- 1 Or ty
= 0 Or ty
= mapsize0
- 1) * 3:
Next ty
, tx
room_map
(ar
, Int(room_buffsize
/ 2), Int(room_buffsize
/ 2)) = 1: reg_minmax_reset
0: reg_minmax_reset
1 For t
= 0 To Int(randscale
(room_boxmin_c
, room_boxmax_c
)) - 1 For t2
= 0 To 1: box
(t2
) = Int(randscale
(Int(room_relsize
* (.4 + .2 * t2
)), Int(room_relsize
* (.5 + .2 * t2
)))):
Next t2
px2
= Int(box
(0) * Rnd(1) / 2): py2
= Int(box
(1) * Rnd(1) / 2):
For tx
= 0 To box
(0) - 1:
For ty
= 0 To box
(1) - 1 wx
= tx
+ px
- px2: wy
= ty
+ py
- py2: room_map
(ar
, wx
, wy
) = 1: reg_minmax
0, wx: reg_minmax
1, wy:
Next ty
, tx
, t
room(ar, 0) = rm(0, 0) - 2: room(ar, 1) = rm(0, 1) + 2: room(ar, 2) = rm(1, 0) - 2: room(ar, 3) = rm(1, 1) + 2
'make doors
room
(ar
, 4) = Int(randscale
(room_doormin
, room_doormax
)):
For ad
= 0 To room
(ar
, 4) - 1: agent
= 0 Do: px
= Int((room_buffsize
- 2) * Rnd(1)) + 1: py
= Int((room_buffsize
- 2) * Rnd(1)) + 1:
ReDim cnt
(1, 1): dis_nook
= 0 For t2
= 0 To 1:
For t
= 0 To 7 Step 2 - t2: c
= room_map
(ar
, px
+ d
(t
, 0), py
+ d
(t
, 1)): cnt
(t2
, c
) = cnt
(t2
, c
) + 1:
Next t
, t2
For ad2
= 0 To ad: dis_nook
= dis_nook
Or (Sqr((room
(ar
, 20 + ad2
* 5) - px
) ^ 2 + (room
(ar
, 21 + ad2
* 5) - py
) ^ 2) < 5 And (ad2
<> ad
)) agent
= agent
+ 1:
If agent
> 100000 Then room
(ar
, 4) = ad
+ 0: agent2
= 1:
GoTo exitroom
room(ar, 20 + ad * 5) = px: room(ar, 21 + ad * 5) = py
For t
= 0 To 7 Step 2: room
(ar
, 22 + ad
* 5) = room
(ar
, 22 + ad
* 5) Or room_map
(ar
, px
+ d
(t
, 0), py
+ d
(t
, 1)) * t:
Next t
, ad
'door exit dir exitroom:
'make wall type
For t
= 0 To 7 Step 2: room_map
(ar
, tx
, ty
) = room_map
(ar
, tx
, ty
) Or (2 ^ (t
/ 2) * 2) * Abs(room_map
(ar
, tx
+ d
(t
, 0), ty
+ d
(t
, 1)) = 1)
'add door to the room interior
For t
= 0 To add_room_c
- 1: agent
= 0 Do:
For t2
= 0 To 1: box
(t2
) = randscale
(room
(ar
, t2
* 2), room
(ar
, 1 + t2
* 2) - 1):
Next t2: room_ok
= 1 For tx
= 0 To 4:
For ty
= 0 To 4:
If room_map
(ar
, tx
+ box
(0), ty
+ box
(1)) <> 1 Then room_ok
= 0 For t2
= 0 To 1: room
(ar
, 20 + room
(ar
, 4) * 5 + t2
) = box
(t2
) + 2:
Next t2: room
(ar
, 22 + room
(ar
, 4) * 5) = Int(4 * Rnd(1)) * 2 room_map(ar, box(0) + 2 + d(room(ar, 22 + room(ar, 4) * 5), 0), box(1) + 2 + d(room(ar, 22 + room(ar, 4) * 5), 1)) = 1
room
(ar
, 4) = room
(ar
, 4) + 1:
Next t
exitroom2:
'doors to map
For ad
= 0 To room
(ar
, 4) - 1: room_map
(ar
, room
(ar
, 20 + ad
* 5), room
(ar
, 21 + ad
* 5)) = 2 ^ 5:
Next ad
'spider install
Dim Shared spani$:
Dim spider
(spider_c
- 1, 19), xy
(1) 'SPIDER array '0-active 1-room 2,3,4 XYZ 5,6 ANG A,B spani$ = "LNKOJKGJDKMNMNQLROSQNNOOPKSMSPPNPNUMWOYRLNKOJKGKDMMNMONJNNNPNNOOOKPMPPPNQNTKXNZPLNKOJLHNFQMNMOLKKNLPNNOOOKNONQPNQOSLXMZPLNKOILGOGRMNMNLJILIO"
spani$ = spani$ + "NNOOOLPOPRPNQNQKUNUQLNKOJKHOIRMNMNMKJMHPNNOORKUNURPNPOQKTNSQLNKOILHOIRMNMOLKKOJQNNPORLUOVRPNQOQKRNRRLNLOJMIOKRMNMOLKLOMRNNNOLMK"
spani$ = spani$ + "PMRPNQORLRORRLNLOLKHMHOMNMNOJPNOQNNNONLJMJPPNPNSLUOTRLNLOKLGKFNMNMNPKQNQRNNPOQKTMTPPNPNTLWNXQ"
For asp
= 0 To spider_c
- 1: spider
(asp
, 8) = randscale
(.2, 1): spider
(asp
, 5) = 360 * Rnd(1): spider
(asp
, 1) = 0 'INT(room_c * RND(1)) Do:
For t
= 0 To 1: spider
(asp
, 2 + t
) = randscale
(room
(spider
(asp
, 1), t
* 2), room
(spider
(asp
, 1), 1 + t
* 2)):
Next t
Loop Until room_map
(spider
(asp
, 1), spider
(asp
, 2), spider
(asp
, 3)) = 1: spider
(asp
, 4) = 4: spider
(asp
, 0) = 1:
Next asp
'draw sphere function
da
= 15: db
= 5:
Dim Shared spk_c: spk_c
= da
* db:
Dim Shared spk_p
(spk_c
- 1, 9), sqs
(spk_c
- 1, 7)For da2
= 0 To da
- 1: dega
= 360 / (da
- 1) * da2
* pip180:
For db2
= 0 To db
- 1: degb
= 180 / (db
- 1) * db2
* pip180: ap
= da2
* db
+ db2
spk_p
(ap
, 0) = Sin(degb
) * Cos(dega
): spk_p
(ap
, 1) = Sin(degb
) * Sin(dega
): spk_p
(ap
, 2) = Cos(degb
):
Next db2
, da2
For da2
= 0 To da
- 2:
For db2
= 0 To db
- 2: sqa
= da2
* db
+ db2
sqs
(sqa
, 0) = sqa: sqs
(sqa
, 1) = sqs
(sqa
, 0) + 1: sqs
(sqa
, 2) = sqs
(sqa
, 0) + db: sqs
(sqa
, 3) = sqs
(sqa
, 2) + 1:
Next db2
, da2
'diamants location
dia_c
= diamant_c
* (room_c
- 1):
Dim dia
(dia_c
- 1, 9):
For ad
= 0 To dia_c
- 1: dia
(ad
, 3) = Int((room_c
- 1) * Rnd(1)) + 1 Do:
For t
= 0 To 1: dia
(ad
, t
) = randscale
(room
(dia
(ad
, 3), t
* 2), room
(dia
(ad
, 3), 1 + t
* 2)):
Next t
Loop Until room_map
(dia
(ad
, 3), dia
(ad
, 0), dia
(ad
, 1)) = 1: dia
(ad
, 2) = .5 dv
= (1 + Rnd(1)) * (diamant_speed_min
+ (diamant_speed_max
- diamant_speed_min
) / (room_c
- 1) * dia
(ad
, 3)) dega
= 360 * Rnd(1) * pip180: degb
= 360 * Rnd(1) * pip180: dia
(ad
, 8) = 1dia
(ad
, 4) = Sin(degb
) * Cos(dega
) * dv: dia
(ad
, 5) = Sin(degb
) * Sin(dega
) * dv: dia
(ad
, 6) = Cos(degb
) * dv
/ 2:
Next ad
'my start position
me
(5) = 0:
Do:
For t
= 0 To 1: me
(t
) = randscale
(room
(me
(5), t
* 2), room
(me
(5), 1 + t
* 2)):
Next t:
Loop Until room_map
(me
(5), me
(0), me
(1)) = 1
'allocation of doors
Dim adoor
(room_c
- 1, room_doormax
+ 10, 9) '9-present 0-trans to room 1-trans to door,8 -the only route For ar
= 0 To room_c
- 2 'create only route adoor(ar, door1, 0) = ar + 1: adoor(ar, door1, 1) = door2: adoor(ar, door1, 8) = 1: adoor(ar, door1, 9) = 1
adoor
(ar
+ 1, door2
, 0) = ar: adoor
(ar
+ 1, door2
, 1) = door1: adoor
(ar
+ 1, door2
, 9) = 1:
Next ar
adoor
(ar
, ad
, 0) = Int(ar
* Rnd(1)): adoor
(ar
, ad
, 1) = Int(room
(adoor
(ar
, ad
, 0), 4) * Rnd(1)): adoor
(ar
, ad
, 9) = 1:
Next ad
, ar
'mon2 = _NEWIMAGE(800, 800, 32): SCREEN mon2: PRINT "DOORS ALLOCATION ": FOR ar = 0 TO room_c - 1: FOR ad = 0 TO room(ar, 4) - 1
' IF adoor(ar, ad, 8) THEN COLOR _RGB32(255, 255, 255) ELSE COLOR _RGB32(100, 100, 100)
'PRINT ar; ".room,"; ad; ".door TRANS TO room:"; adoor(ar, ad, 0); ",door:"; adoor(ar, ad, 1): NEXT ad: PRINT: NEXT ar
'COLOR _RGB32(50, 50, 50): PRINT "Press any key !": DO: _LIMIT 30: LOOP WHILE INKEY$ = ""
door_clip_d = 1: crash_active = 1: me(2) = .2 'my height in the game 0-1
'----------------------------------------- BOSS CYCLE -------------------------------------------------------------------------
'cheat keys
boss_limit
= boss_limit
Xor Abs(cheat_active
And inkey2$
= "l"): crash_active
= crash_active
Xor Abs(cheat_active
And inkey2$
= "c")
'control me
me
(3) = me
(3) + mousex
* mouse_sens: me
(4) = me
(4) + mousey
* mouse_sens:
If Abs(me
(4)) > 80 Then me
(4) = 80 * Sgn(me
(4))
try_ang_sc
= 85:
For try_ang
= 0 To try_ang_sc
Step 6:
For try_ang_dir
= 0 To 1 go
= me_speed
* Abs((k_left
+ k_right
+ k_up
+ k_down
) = -1) * (1 / try_ang_sc
* (try_ang_sc
- try_ang
)) go_ang = k_down * 180 + 90 * (k_left - k_right) + (me(3) + (try_ang_dir * 2 - 1) * try_ang): kit = .2
go_xa
= Sin(go_ang
* pip180
) * kit
+ me
(0): go_ya
= -Cos(go_ang
* pip180
) * kit
+ me
(1): go_xg
= Sin(go_ang
* pip180
) * go
+ me
(0) go_yg
= -Cos(go_ang
* pip180
) * go
+ me
(1):
If crash
(go_xa
, go_ya
) = 0 Then me
(0) = go_xg: me
(1) = go_yg:
GoTo ok
Next try_ang_dir
, try_ang
ok:
For t
= 0 To 9: cam
(t
) = me
(t
):
Next t: door_clip
= door_clip
+ door_clip_d:
If Int(door_clip
) < 1 Or Int(door_clip
) > dt_c
- 2 Then door_clip_d
= -door_clip_d
'draw objects
For tx
= 0 To room
(me
(5), 1) - room
(me
(5), 0):
For ty
= 0 To room
(me
(5), 3) - room
(me
(5), 2) l = room_map(me(5), room(me(5), 0) + tx, room(me(5), 2) + ty)
roof = 0 '(1 - ABS(me(5) = 0))
For t2
= 0 To roof:
For t
= 0 To 3: p
(t
, 0) = tx
+ (Sgn(t
And 1) * 2 - 1) * .5: p
(t
, 2) = ty
+ (Sgn(t
And 2) * 2 - 1) * .5: p
(t
, 1) = t2
point_3d p
(t
, 0), p
(t
, 1), p
(t
, 2):
Next t: draw_square p
(), text_tile
(me
(5), shdw
(Abs(Int((p
(0, 2) + p
(1, 2) + p
(2, 2) + p
(3, 2)) / 4)))) If l
/ 2 And 15 Then draw_brick_3d tx
, ty
'WALL dt
= 0:
For t2
= 0 To 7 Step 2: dt
= dt
Or (t2
* Abs(room_map
(me
(5), room
(me
(5), 0) + tx
+ d
(t2
, 0), room
(me
(5), 2) + ty
+ d
(t2
, 1)) = 1)) Next t2:
For t
= 0 To 3: p
(t
, 0) = (Sgn(t
And 1) * 2 - 1) * .5: p
(t
, 2) = 0: p
(t
, 1) = (Sgn(t
And 2) * 2 - 1) * .5 + .5 rotate_2d p
(t
, 0), p
(t
, 2), 90 * pip180
* Sgn(dt
And 2) p(t, 0) = p(t, 0) + tx: p(t, 2) = p(t, 2) + ty: point_3d p(t, 0), p(t, 1), p(t, 2)
Next t: draw_square p
(), door_text
(Int(door_clip
), shdw
(Abs(Int((p
(0, 2) + p
(1, 2) + p
(2, 2) + p
(3, 2)) / 4))))
'SPIDER array '0-active 1-room 2,3,4-XYZ 5,6-ANGA,B 7-animation 8-size 9-abdomen size
'draw spiders
sp_thick = 2.5 * spider(asp, 8): sp_width = .2 * spider(asp, 8): sp_zoom = .09 * spider(asp, 8)
If spider
(asp
, 4) > .5 * spider
(asp
, 8) Then spider
(asp
, 4) = spider
(asp
, 4) - .1
spider(asp, 7) = spider(asp, 7) + (1 - spider(asp, 8)) * .8
spider(asp, 5) = spider(asp, 5) + 0
For side
= 0 To 1:
For leg
= 0 To 3:
For bre
= 0 To 3:
For p
= 0 To 1: sl_read xy
(), spider
(asp
, 7) + side
* 4.5, leg
, bre
+ p
p(p, 0) = xy(0) * sp_zoom: p(p, 1) = -xy(1) * sp_zoom: p(p, 2) = (bre + p) * sp_width * (side * 2 - 1)
rotate_2d p(p, 0), p(p, 2), spider(asp, 5) * pip180
p(p, 0) = p(p, 0) + spider(asp, 2): p(p, 1) = p(p, 1) + spider(asp, 4): p(p, 2) = p(p, 2) + spider(asp, 3)
point_3d p
(p
, 0), p
(p
, 1), p
(p
, 2):
Next p
For t1
= 0 To 1:
For t2
= 0 To 2: p
(t1
, t2
) = p
(t1
, t2
) - sp_thick
* .5: p
(2 + t1
, t2
) = p
(t1
, t2
) + sp_thick:
Next t2
, t1
draw_square p
(), sp_text
(shdw
(Abs(Int((p
(0, 2) + p
(1, 2) + p
(2, 2) + p
(3, 2)) / 4))), 0)
spider(asp, 9) = spider(asp, 9) + (1 - spider(asp, 8)) * (.2 - (spider(asp, 9) > 0) * .15)
size
= .22 * spider
(asp
, 8) * (1 + .2 * Abs(Sin(spider
(asp
, 9)))) draw_sphere spider
(asp
, 2), spider
(asp
, 3), spider
(asp
, 4), size
, sp_text
(shdw
(Abs(Int((p
(0, 2) + p
(1, 2) + p
(2, 2) + p
(3, 2)) / 4))), 0), spider
(asp
, 5)
'white flash
mindis
= 999999:
For ad
= 0 To room
(me
(5), 4) - 1: dis
= Sqr((me
(0) - (room
(me
(5), 20 + 5 * ad
))) ^ 2 + (me
(1) - (room
(me
(5), 21 + 5 * ad
))) ^ 2) If dis
< mindis
Then mindis
= dis: trans_door
= ad
Next ad:
If mindis
> .8 Then awf_add
= -.5: trans_door
= -1
'near door / trans to another room
ndoor = adoor(me(5), trans_door, 1): me(5) = adoor(me(5), trans_door, 0)
For t
= 0 To 1: q
(t
) = d
(room
(me
(5), 22 + ndoor
* 5), t
): me
(t
) = room
(me
(5), 20 + t
+ ndoor
* 5) + q
(t
):
Next t
me(3) = -degree(q(0), q(1)) + 180: awf = wf_c - 1
'draw diamants
'DIAMANT array
'0,1,2 XYZ-location
'3,room-location
'4,5,6 XYZ vector
'8 active status 1-active
diar = 10
'catch
catch
= Abs((k_left
+ k_right
+ k_up
+ k_down
) = -1) And Sqr((dia
(ad
, 0) - me
(0)) ^ 2 + (dia
(ad
, 1) - me
(1)) ^ 2) < .5
'diamants move
newpos
= dia
(ad
, 2) + dia
(ad
, 6):
If newpos
< 0 Or newpos
> 1 Then dia
(ad
, 6) = -dia
(ad
, 6) newpos
= dia
(ad
, 0) + dia
(ad
, 4):
If room_map
(me
(5), newpos
, dia
(ad
, 1)) <> 1 Then dia
(ad
, 4) = -dia
(ad
, 4) newpos
= dia
(ad
, 1) + dia
(ad
, 5):
If room_map
(me
(5), dia
(ad
, 0), newpos
) <> 1 Then dia
(ad
, 5) = -dia
(ad
, 5) For t
= 0 To 2: dia
(ad
, t
) = dia
(ad
, t
) + dia
(ad
, 4 + t
):
Next t
'diamants draw
x = dia(ad, 0) - room(me(5), 0): z = dia(ad, 1) - room(me(5), 2): y = dia(ad, 2): point_3d x, y, z
For t
= 0 To 3: p
(t
, 0) = (Sgn(t
And 1) * 2 - 1) * diar
+ x: p
(t
, 2) = z: p
(t
, 1) = (Sgn(t
And 2) * 2 - 1) * diar
+ y:
Next t
draw_square p
(), dia_text
(Int(dia_text_c
* Rnd(1)), shdw
(Abs(Int((p
(0, 2) + p
(1, 2) + p
(2, 2) + p
(3, 2)) / 4))))
'stroryline
ReDim sum
(room_c
- 1): my_dia
= 0:
For ad
= 0 To dia_c
- 1: my_dia
= my_dia
+ dia
(ad
, 8): sum
(dia
(ad
, 3)) = sum
(dia
(ad
, 3)) + dia
(ad
, 8):
Next ad
If my_dia
Then mess$
= "Get all diamant !" Else If me
(5) = 0 Then mess$
= "CONGRATULATION !" Else mess$
= "Go back to the START-ROOM !"
Sub reg_minmax_reset
(n
): rm
(n
, 0) = 9999999: rm
(n
, 1) = -rm
(n
, 0):
End Sub Sub reg_minmax
(n
, a
):
If a
< rm
(n
, 0) Then rm
(n
, 0) = a
Else If a
> rm
(n
, 1) Then rm
(n
, 1) = a
Function degree
(a
, b
): degreex
= Atn(a
/ (b
+ .00001)) / pip180: degreex
= degreex
- 180 * Abs(0 > b
): degreex
= degreex
- 360 * (degreex
< 0): degree
= degreex:
End Function Sub rotate_2d
(x
, y
, ang
): x1
= -(x
* Cos(ang
) - y
* Sin(ang
)): y1
= -(x
* Sin(ang
) + y
* Cos(ang
)): x
= x1: y
= y1:
End Sub
Sub point_3d
(x
, y
, z
): x
= (x
- cam
(0) + room
(cam
(5), 0)) * 100: y
= (y
- cam
(2)) * 100: z
= (z
- cam
(1) + room
(cam
(5), 2)) * 100 rotate_2d x
, z
, -(cam
(3) + 180) * pip180: rotate_2d y
, z
, (cam
(4) + 180) * pip180:
End Sub
Sub draw_square
(p
(), text
) _MapTriangle (0, 0)-(wtext
, 0)-(0, htext
), text
To(p
(0, 0), p
(0, 1), p
(0, 2))-(p
(1, 0), p
(1, 1), p
(1, 2))-(p
(2, 0), p
(2, 1), p
(2, 2)), , _Smooth _MapTriangle (wtext
, htext
)-(wtext
, 0)-(0, htext
), text
To(p
(3, 0), p
(3, 1), p
(3, 2))-(p
(1, 0), p
(1, 1), p
(1, 2))-(p
(2, 0), p
(2, 1), p
(2, 2)), , _Smooth
ReDim pc
(7, 2):
For t
= 0 To 7: pc
(t
, 0) = .5 * (Sgn(t
And 1) * 2 - 1) + x: pc
(t
, 2) = .5 * (Sgn(t
And 2) * 2 - 1) + y: pc
(t
, 1) = .5 * Sgn(t
And 4) * 2 point_3d pc
(t
, 0), pc
(t
, 1), pc
(t
, 2):
Next t:
For t
= 0 To 4:
For t2
= 0 To 3: side
= Val(Mid$("-0246-2367-3175-1054-4567", 2 + t
* 5 + t2
, 1)) For t3
= 0 To 2: p
(t2
, t3
) = pc
(side
, t3
):
Next t3
, t2: draw_square p
(), text_tile
(me
(5), shdw
(Abs(Int((p
(0, 2) + p
(1, 2) + p
(2, 2) + p
(3, 2)) / 4))))
Sub sl_read
(xy
(), ani
, leg
, bre
): n1
= Int(ani
) Mod 9: n2
= (n1
+ 1) Mod 9: n3
= ani
- Int(ani
): pre
= 1 + bre
* 2 + leg
* 10 For t
= 0 To 1: a
= Asc(Mid$(spani$
, t
+ pre
+ n1
* 40, 1)) - 78: b
= Asc(Mid$(spani$
, t
+ pre
+ n2
* 40, 1)) - 78: xy
(t
) = a
+ (b
- a
) * n3:
Next t:
End Sub
Sub draw_sphere
(x
, z
, y
, size
, text
, rotate_a
) For ap
= 0 To spk_c
- 1: spk_p
(ap
, 3) = spk_p
(ap
, 2) * size: spk_p
(ap
, 4) = spk_p
(ap
, 1) * size: spk_p
(ap
, 5) = spk_p
(ap
, 0) * size
* 1.2 rotate_2d spk_p(ap, 3), spk_p(ap, 5), rotate_a * pip180: spk_p(ap, 3) = spk_p(ap, 3) + x: spk_p(ap, 4) = spk_p(ap, 4) + y
spk_p
(ap
, 5) = spk_p
(ap
, 5) + z: point_3d spk_p
(ap
, 3), spk_p
(ap
, 4), spk_p
(ap
, 5):
Next ap
For ap
= 0 To spk_c
- 1:
For p2
= 0 To 3:
For p1
= 0 To 2: p
(p2
, p1
) = spk_p
(sqs
(ap
, p2
), 3 + p1
):
Next p1
, p2: draw_square p
(), text:
Next ap