mirror of
https://github.com/dschmenk/PLASMA.git
synced 2025-03-27 18:35:06 +00:00
Formatting (which editor keeps messing up the tabs vs spaces?)
This commit is contained in:
parent
d92d5dd6cd
commit
5e0053569e
@ -402,7 +402,7 @@ export def drawmap(xorg, yorg, viewfield, viewdir, lightdist, viewdist)
|
||||
// Update distance
|
||||
//
|
||||
occluded = 1
|
||||
dist = dist + 1
|
||||
dist = dist + 1
|
||||
fin
|
||||
next
|
||||
break
|
||||
@ -419,12 +419,12 @@ export def drawmap(xorg, yorg, viewfield, viewdir, lightdist, viewdist)
|
||||
if adjtile & OPAQUE_TILE
|
||||
^(viewmap + imap - mapcols) = adjtile | VIEWED_TILE
|
||||
screen.[ycentr-xbeam[l]-1, xcentr+ybeam[l]] = adjtile
|
||||
fin
|
||||
fin
|
||||
fin
|
||||
^(viewmap + imap) = tile | VIEWED_TILE
|
||||
if tile <> PIT_TILE
|
||||
if tile <> PIT_TILE
|
||||
screen.[ycentr-xbeam[l], xcentr+ybeam[l]] = tile & INV_TILE
|
||||
fin
|
||||
fin
|
||||
else
|
||||
vispix[l] = 0
|
||||
fin
|
||||
@ -437,24 +437,24 @@ export def drawmap(xorg, yorg, viewfield, viewdir, lightdist, viewdist)
|
||||
vispix[l] = 0
|
||||
else
|
||||
vispix[l] = 1
|
||||
occluded = 0
|
||||
occluded = 0
|
||||
fin
|
||||
if tile & LIT_TILE
|
||||
if tile & LIT_TILE
|
||||
^(viewmap + imap) = tile | VIEWED_TILE
|
||||
screen.[ycentr-xbeam[l], xcentr+ybeam[l]] = tile & INV_TILE
|
||||
darkness = 0
|
||||
fin
|
||||
fin
|
||||
else
|
||||
vispix[l] = 0
|
||||
fin
|
||||
if l == dbeam[dist]
|
||||
if occluded
|
||||
break
|
||||
fin
|
||||
if l == dbeam[dist]
|
||||
if occluded
|
||||
break
|
||||
fin
|
||||
occluded = 1
|
||||
dist = dist + 1
|
||||
fin
|
||||
next
|
||||
dist = dist + 1
|
||||
fin
|
||||
next
|
||||
break
|
||||
is 2
|
||||
for l = 1 to dbeam[lightdist]
|
||||
@ -464,17 +464,17 @@ export def drawmap(xorg, yorg, viewfield, viewdir, lightdist, viewdist)
|
||||
if tile & OPAQUE_TILE
|
||||
vispix[l] = 0
|
||||
else
|
||||
vispix[l] = 1
|
||||
adjtile = ^(map + imap + mapcols) & INV_TILE
|
||||
vispix[l] = 1
|
||||
adjtile = ^(map + imap + mapcols) & INV_TILE
|
||||
if adjtile & OPAQUE_TILE
|
||||
^(viewmap + imap + mapcols) = adjtile | VIEWED_TILE
|
||||
screen.[ycentr+xbeam[l]+1, xcentr+ybeam[l]] = adjtile
|
||||
fin
|
||||
fin
|
||||
fin
|
||||
^(viewmap + imap) = tile | VIEWED_TILE
|
||||
if tile <> PIT_TILE
|
||||
if tile <> PIT_TILE
|
||||
screen.[ycentr+xbeam[l], xcentr+ybeam[l]] = tile & INV_TILE
|
||||
fin
|
||||
fin
|
||||
else
|
||||
vispix[l] = 0
|
||||
fin
|
||||
@ -486,25 +486,25 @@ export def drawmap(xorg, yorg, viewfield, viewdir, lightdist, viewdist)
|
||||
if tile & OPAQUE_TILE
|
||||
vispix[l] = 0
|
||||
else
|
||||
vispix[l] = 1
|
||||
occluded = 0
|
||||
fin
|
||||
if tile & LIT_TILE
|
||||
vispix[l] = 1
|
||||
occluded = 0
|
||||
fin
|
||||
if tile & LIT_TILE
|
||||
^(viewmap + imap) = tile | VIEWED_TILE
|
||||
screen.[ycentr+xbeam[l], xcentr+ybeam[l]] = tile & INV_TILE
|
||||
darkness = 0
|
||||
fin
|
||||
fin
|
||||
else
|
||||
vispix[l] = 0
|
||||
fin
|
||||
if l == dbeam[dist]
|
||||
if occluded
|
||||
break
|
||||
fin
|
||||
if l == dbeam[dist]
|
||||
if occluded
|
||||
break
|
||||
fin
|
||||
occluded = 1
|
||||
dist = dist + 1
|
||||
fin
|
||||
next
|
||||
dist = dist + 1
|
||||
fin
|
||||
next
|
||||
break
|
||||
is 3
|
||||
for l = 1 to dbeam[lightdist]
|
||||
@ -514,17 +514,17 @@ export def drawmap(xorg, yorg, viewfield, viewdir, lightdist, viewdist)
|
||||
if tile & OPAQUE_TILE
|
||||
vispix[l] = 0
|
||||
else
|
||||
vispix[l] = 1
|
||||
adjtile = ^(map + imap + 1) & INV_TILE
|
||||
vispix[l] = 1
|
||||
adjtile = ^(map + imap + 1) & INV_TILE
|
||||
if adjtile & OPAQUE_TILE
|
||||
^(viewmap + imap + 1) = adjtile | VIEWED_TILE
|
||||
screen.[ycentr+ybeam[l], xcentr+xbeam[l]+1] = adjtile
|
||||
fin
|
||||
fin
|
||||
^(viewmap + imap) = tile | VIEWED_TILE
|
||||
if tile <> PIT_TILE
|
||||
if tile <> PIT_TILE
|
||||
screen.[ycentr+ybeam[l], xcentr+xbeam[l]] = tile & INV_TILE
|
||||
fin
|
||||
fin
|
||||
else
|
||||
vispix[l] = 0
|
||||
fin
|
||||
@ -536,25 +536,25 @@ export def drawmap(xorg, yorg, viewfield, viewdir, lightdist, viewdist)
|
||||
if tile & OPAQUE_TILE
|
||||
vispix[l] = 0
|
||||
else
|
||||
vispix[l] = 1
|
||||
occluded = 0
|
||||
fin
|
||||
if tile & LIT_TILE
|
||||
vispix[l] = 1
|
||||
occluded = 0
|
||||
fin
|
||||
if tile & LIT_TILE
|
||||
^(viewmap + imap) = tile | VIEWED_TILE
|
||||
screen.[ycentr+ybeam[l], xcentr+xbeam[l]] = tile & INV_TILE
|
||||
darkness = 0
|
||||
fin
|
||||
fin
|
||||
else
|
||||
vispix[l] = 0
|
||||
fin
|
||||
if l == dbeam[dist]
|
||||
if occluded
|
||||
break
|
||||
fin
|
||||
if l == dbeam[dist]
|
||||
if occluded
|
||||
break
|
||||
fin
|
||||
occluded = 1
|
||||
dist = dist + 1
|
||||
fin
|
||||
next
|
||||
dist = dist + 1
|
||||
fin
|
||||
next
|
||||
break
|
||||
is 4
|
||||
for l = 1 to dbeam[lightdist]
|
||||
@ -564,17 +564,17 @@ export def drawmap(xorg, yorg, viewfield, viewdir, lightdist, viewdist)
|
||||
if tile & OPAQUE_TILE
|
||||
vispix[l] = 0
|
||||
else
|
||||
vispix[l] = 1
|
||||
adjtile = ^(map + imap - 1) & INV_TILE
|
||||
vispix[l] = 1
|
||||
adjtile = ^(map + imap - 1) & INV_TILE
|
||||
if adjtile & OPAQUE_TILE
|
||||
^(viewmap + imap - 1) = adjtile | VIEWED_TILE
|
||||
screen.[ycentr+ybeam[l], xcentr-xbeam[l]-1] = adjtile
|
||||
fin
|
||||
fin
|
||||
^(viewmap + imap) = tile | VIEWED_TILE
|
||||
if tile <> PIT_TILE
|
||||
if tile <> PIT_TILE
|
||||
screen.[ycentr+ybeam[l], xcentr-xbeam[l]] = tile & INV_TILE
|
||||
fin
|
||||
fin
|
||||
else
|
||||
vispix[l] = 0
|
||||
fin
|
||||
@ -586,25 +586,25 @@ export def drawmap(xorg, yorg, viewfield, viewdir, lightdist, viewdist)
|
||||
if tile & OPAQUE_TILE
|
||||
vispix[l] = 0
|
||||
else
|
||||
vispix[l] = 1
|
||||
occluded = 0
|
||||
fin
|
||||
if tile & LIT_TILE
|
||||
vispix[l] = 1
|
||||
occluded = 0
|
||||
fin
|
||||
if tile & LIT_TILE
|
||||
^(viewmap + imap) = tile | VIEWED_TILE
|
||||
screen.[ycentr+ybeam[l], xcentr-xbeam[l]] = tile & INV_TILE
|
||||
darkness = 0
|
||||
fin
|
||||
fin
|
||||
else
|
||||
vispix[l] = 0
|
||||
fin
|
||||
if l == dbeam[dist]
|
||||
if occluded
|
||||
break
|
||||
fin
|
||||
if l == dbeam[dist]
|
||||
if occluded
|
||||
break
|
||||
fin
|
||||
occluded = 1
|
||||
dist = dist + 1
|
||||
fin
|
||||
next
|
||||
dist = dist + 1
|
||||
fin
|
||||
next
|
||||
break
|
||||
is 5
|
||||
for l = 1 to dbeam[lightdist]
|
||||
@ -614,17 +614,17 @@ export def drawmap(xorg, yorg, viewfield, viewdir, lightdist, viewdist)
|
||||
if tile & OPAQUE_TILE
|
||||
vispix[l] = 0
|
||||
else
|
||||
vispix[l] = 1
|
||||
adjtile = ^(map + imap + mapcols) & INV_TILE
|
||||
vispix[l] = 1
|
||||
adjtile = ^(map + imap + mapcols) & INV_TILE
|
||||
if adjtile & OPAQUE_TILE
|
||||
^(viewmap + imap + mapcols) = adjtile | VIEWED_TILE
|
||||
screen.[ycentr+xbeam[l]+1, xcentr-ybeam[l]] = adjtile
|
||||
fin
|
||||
fin
|
||||
^(viewmap + imap) = tile | VIEWED_TILE
|
||||
if tile <> PIT_TILE
|
||||
if tile <> PIT_TILE
|
||||
screen.[ycentr+xbeam[l], xcentr-ybeam[l]] = tile & INV_TILE
|
||||
fin
|
||||
fin
|
||||
else
|
||||
vispix[l] = 0
|
||||
fin
|
||||
@ -636,26 +636,26 @@ export def drawmap(xorg, yorg, viewfield, viewdir, lightdist, viewdist)
|
||||
if tile & OPAQUE_TILE
|
||||
vispix[l] = 0
|
||||
else
|
||||
vispix[l] = 1
|
||||
occluded = 0
|
||||
fin
|
||||
if tile & LIT_TILE
|
||||
vispix[l] = 1
|
||||
occluded = 0
|
||||
fin
|
||||
if tile & LIT_TILE
|
||||
^(viewmap + imap) = tile | VIEWED_TILE
|
||||
screen.[ycentr+xbeam[l], xcentr-ybeam[l]] = tile & INV_TILE
|
||||
darkness = 0
|
||||
fin
|
||||
fin
|
||||
else
|
||||
vispix[l] = 0
|
||||
fin
|
||||
if l == dbeam[dist]
|
||||
if occluded
|
||||
break
|
||||
fin
|
||||
if l == dbeam[dist]
|
||||
if occluded
|
||||
break
|
||||
fin
|
||||
occluded = 1
|
||||
dist = dist + 1
|
||||
fin
|
||||
next
|
||||
break
|
||||
dist = dist + 1
|
||||
fin
|
||||
next
|
||||
break
|
||||
is 6
|
||||
for l = 1 to dbeam[lightdist]
|
||||
if vispix[vbeam[l]]
|
||||
@ -664,17 +664,17 @@ export def drawmap(xorg, yorg, viewfield, viewdir, lightdist, viewdist)
|
||||
if tile & OPAQUE_TILE
|
||||
vispix[l] = 0
|
||||
else
|
||||
vispix[l] = 1
|
||||
adjtile = ^(map + imap - mapcols) & INV_TILE
|
||||
vispix[l] = 1
|
||||
adjtile = ^(map + imap - mapcols) & INV_TILE
|
||||
if adjtile & OPAQUE_TILE
|
||||
^(viewmap + imap - mapcols) = adjtile | VIEWED_TILE
|
||||
screen.[ycentr-xbeam[l]-1, xcentr-ybeam[l]] = adjtile
|
||||
fin
|
||||
fin
|
||||
^(viewmap + imap) = tile | VIEWED_TILE
|
||||
if tile <> PIT_TILE
|
||||
if tile <> PIT_TILE
|
||||
screen.[ycentr-xbeam[l], xcentr-ybeam[l]] = tile & INV_TILE
|
||||
fin
|
||||
fin
|
||||
else
|
||||
vispix[l] = 0
|
||||
fin
|
||||
@ -686,25 +686,25 @@ export def drawmap(xorg, yorg, viewfield, viewdir, lightdist, viewdist)
|
||||
if tile & OPAQUE_TILE
|
||||
vispix[l] = 0
|
||||
else
|
||||
vispix[l] = 1
|
||||
occluded = 0
|
||||
fin
|
||||
if tile & LIT_TILE
|
||||
vispix[l] = 1
|
||||
occluded = 0
|
||||
fin
|
||||
if tile & LIT_TILE
|
||||
^(viewmap + imap) = tile | VIEWED_TILE
|
||||
screen.[ycentr-xbeam[l], xcentr-ybeam[l]] = tile & INV_TILE
|
||||
darkness = 0
|
||||
fin
|
||||
fin
|
||||
else
|
||||
vispix[l] = 0
|
||||
fin
|
||||
if l == dbeam[dist]
|
||||
if occluded
|
||||
break
|
||||
fin
|
||||
if l == dbeam[dist]
|
||||
if occluded
|
||||
break
|
||||
fin
|
||||
occluded = 1
|
||||
dist = dist + 1
|
||||
fin
|
||||
next
|
||||
dist = dist + 1
|
||||
fin
|
||||
next
|
||||
break
|
||||
is 7
|
||||
for l = 1 to dbeam[lightdist]
|
||||
@ -714,17 +714,17 @@ export def drawmap(xorg, yorg, viewfield, viewdir, lightdist, viewdist)
|
||||
if tile & OPAQUE_TILE
|
||||
vispix[l] = 0
|
||||
else
|
||||
vispix[l] = 1
|
||||
adjtile = ^(map + imap - 1) & INV_TILE
|
||||
vispix[l] = 1
|
||||
adjtile = ^(map + imap - 1) & INV_TILE
|
||||
if adjtile & OPAQUE_TILE
|
||||
^(viewmap + imap - 1) = adjtile | VIEWED_TILE
|
||||
screen.[ycentr-ybeam[l], xcentr-xbeam[l]-1] = adjtile
|
||||
fin
|
||||
fin
|
||||
^(viewmap + imap) = tile | VIEWED_TILE
|
||||
if tile <> PIT_TILE
|
||||
if tile <> PIT_TILE
|
||||
screen.[ycentr-ybeam[l], xcentr-xbeam[l]] = tile & INV_TILE
|
||||
fin
|
||||
fin
|
||||
else
|
||||
vispix[l] = 0
|
||||
fin
|
||||
@ -736,25 +736,25 @@ export def drawmap(xorg, yorg, viewfield, viewdir, lightdist, viewdist)
|
||||
if tile & OPAQUE_TILE
|
||||
vispix[l] = 0
|
||||
else
|
||||
vispix[l] = 1
|
||||
occluded = 0
|
||||
fin
|
||||
if tile & LIT_TILE
|
||||
vispix[l] = 1
|
||||
occluded = 0
|
||||
fin
|
||||
if tile & LIT_TILE
|
||||
^(viewmap + imap) = tile | VIEWED_TILE
|
||||
screen.[ycentr-ybeam[l], xcentr-xbeam[l]] = tile & INV_TILE
|
||||
darkness = 0
|
||||
fin
|
||||
fin
|
||||
else
|
||||
vispix[l] = 0
|
||||
fin
|
||||
if l == dbeam[dist]
|
||||
if occluded
|
||||
break
|
||||
fin
|
||||
if l == dbeam[dist]
|
||||
if occluded
|
||||
break
|
||||
fin
|
||||
occluded = 1
|
||||
dist = dist + 1
|
||||
fin
|
||||
next
|
||||
dist = dist + 1
|
||||
fin
|
||||
next
|
||||
break
|
||||
wend
|
||||
next
|
||||
|
@ -535,47 +535,47 @@ def play
|
||||
is KEY_TILE
|
||||
player.key = 1
|
||||
updtmaptile(player.xpos, player.ypos, FLOOR_TILE)
|
||||
gotit
|
||||
break
|
||||
gotit
|
||||
break
|
||||
is RAFT_TILE
|
||||
player.raft = 1
|
||||
updtmaptile(player.xpos, player.ypos, FLOOR_TILE)
|
||||
gotit
|
||||
break
|
||||
gotit
|
||||
break
|
||||
is GOLD_TILE
|
||||
player.gold = player.gold + 1
|
||||
updtmaptile(player.xpos, player.ypos, FLOOR_TILE)
|
||||
gotit
|
||||
gotit
|
||||
break
|
||||
is TORCH_TILE
|
||||
if player.oil < 1000
|
||||
if player.oil < 1000
|
||||
player:oil = player:oil + TORCH_OIL
|
||||
if player:oil > 1000
|
||||
player:oil = 1000
|
||||
fin
|
||||
if player:oil > 1000
|
||||
player:oil = 1000
|
||||
fin
|
||||
setmaptile(player.xpos, player.ypos, FLOOR_TILE)
|
||||
for yt = player.ypos - 1 to player.ypos + 1
|
||||
for xt = player.xpos - 1 to player.xpos + 1
|
||||
setmaptile(xt, yt, getmaptile(xt, yt) & MAP_TILE)
|
||||
next
|
||||
next
|
||||
gotit
|
||||
fin
|
||||
for xt = player.xpos - 1 to player.xpos + 1
|
||||
setmaptile(xt, yt, getmaptile(xt, yt) & MAP_TILE)
|
||||
next
|
||||
next
|
||||
gotit
|
||||
fin
|
||||
break
|
||||
is FOOD_TILE
|
||||
if player.health < 100 or player.energy < 100
|
||||
if player.health < 100 or player.energy < 100
|
||||
player.health = player.health + MANA/2
|
||||
if player.health > 100
|
||||
player.health = 100
|
||||
fin
|
||||
if player.health > 100
|
||||
player.health = 100
|
||||
fin
|
||||
player.energy = player.energy + MANA
|
||||
if player.energy > 100
|
||||
player.energy = 100
|
||||
fin
|
||||
updtmaptile(player.xpos, player.ypos, FLOOR_TILE)
|
||||
player.fov = 1
|
||||
gotit
|
||||
fin
|
||||
if player.energy > 100
|
||||
player.energy = 100
|
||||
fin
|
||||
updtmaptile(player.xpos, player.ypos, FLOOR_TILE)
|
||||
player.fov = 1
|
||||
gotit
|
||||
fin
|
||||
break
|
||||
wend
|
||||
break
|
||||
|
Loading…
x
Reference in New Issue
Block a user