Danke, ist einleuchtend.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts Menu
LOADFONT "font.png", 1
SETFONT 1
GLOBAL txt1$, txt2$, txt3$, txt4$, txt5$, txt6$, txt7$, txt8$, txt9$, txt10$, txt11$, txt12$, txt13$
GLOBAL room
room = 1
IF room=1 THEN txt1$= "beispieltext"
PRINT txt1$, 10, 10, 1
PRINT txt1$, 10, 25, 1
PRINT txt1$, 10, 40, 1
PRINT txt1$, 10, 55, 1
PRINT txt1$, 10, 70, 1 //5
PRINT txt1$, 10, 85, 1
PRINT txt1$, 10, 100, 1
PRINT txt1$, 10, 115, 1
PRINT txt1$, 10, 130, 1
PRINT txt1$, 10, 145, 1 //10
PRINT txt1$, 10, 160, 1
PRINT txt1$, 10, 175, 1
PRINT txt1$, 10, 190, 1
PRINT txt1$, 10, 205, 1
PRINT txt1$, 10, 220, 1 //15
PRINT txt1$, 10, 235, 1
PRINT txt1$, 10, 250, 1
PRINT txt1$, 10, 265, 1
PRINT txt1$, 10, 280, 1
PRINT txt1$, 10, 295, 1 //20
SHOWSCREEN
MOUSEWAIT
SUB cleartxt:
txt1$=""; txt2$=""; txt3$=""; txt4$=""; txt5$=""; txt6$=""; txt7$=""; txt8$=""; txt9$=""; txt10$=""
txt11$=""; txt12$=""; txt13$=""
ENDSUB
GLOBAL x#, y#, z#, px#, py#, pz#, ma#, mb#
x#=1
y#=1
px#=-10
X_LOADOBJ "world.ddd", 0
WHILE TRUE
X_MAKE3D 1, 50, 45
X_CAMERA x#, y#, z#, px#, py#, pz#
X_DRAWOBJ 0, 0
IF KEY(200)=TRUE; x#=x#-0.1; ENDIF
IF KEY(203)=TRUE; pz#=pz#+1; ENDIF
IF KEY(205)=TRUE; pz#=pz#-1; ENDIF
SHOWSCREEN
WEND
SETSCREEN 1280, 720, 0
GLOBAL map[]
GLOBAL mx, my, b1, b2
GLOBAL mxi%, myi%
GLOBAL maptype
REDIM map[18][14]
LOADSPRITE "media/cursor.png", 1
LOADSPRITE "media/nix.png", 51
LOADSPRITE "media/links.png", 52
LOADSPRITE "media/oben.png", 53
LOADSPRITE "media/rechts.png", 54
LOADSPRITE "media/unten.png", 55
LOADFONT "font.png", 1
SETFONT 1
FOR x = 0 TO 17
FOR y = 0 TO 13
map[x][y]= 1 //1 ist nichts, einfach dass man blank weiss hat
NEXT
NEXT
WHILE TRUE
//mausvaries in 50er teilen und begrenzung
mxi%=mx/50; myi%=my/50 ; IF mxi%>18 THEN mxi%=18; IF myi%>14 THEN myi%=14
//MAPabfrage
FOR x = 0 TO 17
FOR y = 0 TO 13
SELECT map[x][y]
CASE 1
DRAWSPRITE 51, x*50, y*50 //51 nix
CASE 2
DRAWSPRITE 52, x*50, y*50 //52 links
CASE 3
DRAWSPRITE 53, x*50, y*50 //53 oben
CASE 4
DRAWSPRITE 54, x*50, y*50 //54 rechts
CASE 5
DRAWSPRITE 55, x*50, y*50 //55 unten
ENDSELECT
NEXT
NEXT
//auswahl der maptypes
IF mx>950 AND mx<1000 AND my>100 AND my<150 AND b1=1 THEN maptype = 0
IF mx>950 AND mx<1000 AND my>160 AND my<210 AND b1=1 THEN maptype = 1
IF mx>950 AND mx<1000 AND my>220 AND my<270 AND b1=1 THEN maptype = 2
IF mx>950 AND mx<1000 AND my>280 AND my<330 AND b1=1 THEN maptype = 3
IF mx>950 AND mx<1000 AND my>340 AND my<390 AND b1=1 THEN maptype = 4
DRAWSPRITE 51, 950, 100 ; PRINT "Nichts", 1010, 120, 1
DRAWSPRITE 52, 950, 160 ; PRINT "Linke Wand", 1010, 180, 1
DRAWSPRITE 53, 950, 220 ; PRINT "Oben Wand", 1010, 240, 1
DRAWSPRITE 54, 950, 280 ; PRINT "Rechts Wand", 1010, 300, 1
DRAWSPRITE 55, 950, 340 ; PRINT "Unten Wand", 1010, 360, 1
PRINT "Auswahl: "+maptype, 950, 450, 1
PRINT "Maus "+mxi%+"x"+myi%, 950, 470, 1
//map ändern - ACHTUNG hier liegt ev der hund begraben
IF mx<900 AND my<700 AND b1=1
FOR x = 0 TO 17
FOR mxi% = 0 TO 17
FOR y = 0 TO 13
FOR myi% = 0 TO 13
IF maptype=0 THEN map[x][y]= 1
IF maptype=1 THEN map[x][y]= 2
IF maptype=2 THEN map[x][y]= 3
IF maptype=3 THEN map[x][y]= 4
IF maptype=4 THEN map[x][y]= 5
NEXT; NEXT
NEXT; NEXT
ENDIF
DRAWSPRITE 1, mx, my
MOUSESTATE mx, my, b1, b2
SHOWSCREEN
WEND
END
SETSCREEN 1280, 720, 0
GLOBAL wx, wy, wt //13x13 felder mit wt als spätere abfrage was für eine eigenschaft
wx=13; wy=13; wt=1 //wird hier kurz deklariert, dass ers für das dim verwenden kann
LOADSPRITE "media/grass.png", 1
LOADSPRITE "media/erde.png", 2
DIM welt[wx][wy] //also welt[13][13]
WHILE TRUE
FOR wx=1 TO 13
FOR wy=1 TO 13
IF welt[wx][wy]=1 THEN DRAWSPRITE 1, wx*50, wy*50 //hier ist vermutlich der wurm drin. 50 ist die spritegrösse
IF welt[wx][wy]=2 THEN DRAWSPRITE 2, wx*50, wy*50
NEXT
NEXT
SHOWSCREEN
WEND