Iso-prob
Übersicht

![]() |
rambo256Betreff: Iso-prob |
![]() Antworten mit Zitat ![]() |
---|---|---|
Hi leutz,hab da mal wieder en prob,hier erstmal mein Quellcode:
Code: [AUSKLAPPEN] ; Test proggi zum öffnen von iso_maps und zeichnen
Graphics 800,600,32,2 SetBuffer BackBuffer() Const Tile_Width = 64 Const Tile_Height = 48 Const Tile_Map_Width_max = 12 Const Tile_Map_Height_max = 12 ; GFX laden Tile_map_gfx = LoadAnimImage("world.bmp",Tile_width,Tile_Height,0,250) Mouse_gfx = LoadImage("pointer.bmp") MaskImage Mouse_gfx,255,0,255 ;Dim-Array für die Map,mit den Werten von Test.txt Dim Tile_matrix(11,11) For i = 0 To 11 For e = 0 To 11 test = ReadFile("Test.txt") Tile_matrix(i,e) = ReadInt(test) CloseFile test Next Next ;Hauptschleife Repeat Cls ; Iso-map wird gezeichnet,nach den Daten der tile_matrix For x = 0 To 11 For y = 0 To 11 plotX = (x-y)*TILEWIDTH/2 ploty = (x+y)*TILEHEIGHT/2 DrawImage Tile_map_gfx,plotx+350,ploty,Tile_matrix(x,y) Next Next Flip Until KeyDown(1) Wieso zeichnet das prog nur 1 tile?! ![]() THX,for help |
||
![]() |
hamZtaAdministratorBetreff: hm |
![]() Antworten mit Zitat ![]() |
---|---|---|
wie hast du denn die datei geschrieben?
einfach per hand? das geht nicht, weil bb integer binär in dateien schreibt/liest! du musst die datei also mit einem bb programm erstellen! |
||
Blog. |
![]() |
rambo256 |
![]() Antworten mit Zitat ![]() |
---|---|---|
sorry,hab mein prob jetzt schon gelöst,trotzdem danke ![]() Nein ich hab meine Txt-datei nicht von Hand geschrieben,ich habse mit Writeint geschriben ![]() hier der richtige Quellcode: Code: [AUSKLAPPEN] ; Test proggi zum öffnen von iso_maps und zeichnen
Graphics 800,600,32,2 SetBuffer BackBuffer() Const Tile_Width = 64 Const Tile_Height = 48 Const Tile_Map_Width_max = 12 Const Tile_Map_Height_max = 12 ; GFX laden Tile_map_gfx = LoadAnimImage("world.bmp",Tile_width,Tile_Height,0,250) Mouse_gfx = LoadImage("pointer.bmp") MaskImage Mouse_gfx,255,0,255 ;Dim-Array für die Map,mit den Werten von Test.txt Dim Tile_matrix(11,11) test = ReadFile("test.txt") For tile_x = 0 To 11 For tile_y = 0 To 11 tile_matrix(tile_x,tile_y)= ReadInt (test) Next Next CloseFile test ;Hauptschleife Repeat Cls ; Iso-map wird gezeichnet,nach den Daten der tile_matrix ig = True For x_tile = 0 To 11 ig = 1-ig For y_tile = 0 To 11 plotx = (x_tile-y_tile)*Tile_width/2 ploty = (x_tile+y_tile)*tileheight/2 DrawImage tile_map_gfx,x_tile*Tile_Width,y_tile*Tile_Height,tile_matrix(x_tile,y_tile) Next Next Flip Until KeyDown(1) |
||
Übersicht


Powered by phpBB © 2001 - 2006, phpBB Group