Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
"Fbc has caused an error in FBC.EXE"
#8
Code:
SUB mapLoad (file$)
        'Read MapW, MapH
        'REDIM Map(1 to MapW, 1 to MapH)
        'REDIM MapOverlay(1 to MapW, 1 to MapH)
        vid.xMin = 0
        vid.yMin = 0
        for r = 1 to MapH
            for c = 1 to MapW
       '         Read Map(r, c)
            next
        next
end sub

1st off, i duno if you can read data from a sub. so if not youre dimming arrays "FROM 1 TO 0" could be ugly. =P




Code:
SUB mapDraw ()

'       r1 = INT(vid.yMin / TileH) + 1
'       r2 = y1 + (vid.yRes / tileH)
'       c1 = INT(vid.xMin / TileW) + 1
'       c2 = x1 + (vid.xRes / TileW)
        'x = (c1 - 1) * TileW - vid.xMin
        'y = (r1 - 1) * TileH - vid.yMin
        for r = r1 to r2
            for c = c1 to c2
               ' bmpGetTile (TerrainBitmap(), 1, 1, TerrainTile(), 32, 32)
'               PUT (x,y), TerrainTile(0)
                x = x + 32
            next
            y = y + 32
        next
end sub

i did a little debugging and found somehing interesting. the first line of mapdraw becomes this

r1 = Int(0 / 32) + 1

that crashes on compilation, however

r1 = Int(0 / 32)' + 1

does not... :o :o :o :o

its frustrating. i Highly recommend posting the entire code. its like maybe 2 pages worth, some people have posted over 1k lines. i would but i dunno if i should without your permission
Reply


Messages In This Thread
"Fbc has caused an error in FBC.EXE" - by pr0gger - 06-19-2005, 04:06 AM
"Fbc has caused an error in FBC.EXE" - by Anonymous - 06-19-2005, 10:04 AM
"Fbc has caused an error in FBC.EXE" - by Sumo Jo - 06-19-2005, 07:29 PM
"Fbc has caused an error in FBC.EXE" - by pr0gger - 06-20-2005, 01:33 AM
"Fbc has caused an error in FBC.EXE" - by Anonymous - 06-20-2005, 02:02 AM
"Fbc has caused an error in FBC.EXE" - by Anonymous - 06-20-2005, 02:15 AM
"Fbc has caused an error in FBC.EXE" - by pr0gger - 06-20-2005, 02:29 AM
"Fbc has caused an error in FBC.EXE" - by pr0gger - 06-20-2005, 02:30 AM
"Fbc has caused an error in FBC.EXE" - by pr0gger - 06-20-2005, 02:31 AM
"Fbc has caused an error in FBC.EXE" - by pr0gger - 06-20-2005, 05:43 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)