¿cómo estás Radiosity? nunca te habia visto por este foro, jejeje...Radiosity escribió: ↑12 Jun 2018, 11:02 Yo estoy trasteando con el SecondBasic y tiene pinta de ser bastante inestable. Se hecho he comprobado que tiene bugs a la hora de hacer operaciones con variables, de tal forma que un a++ no te funcione pero si un a=a+1 cuando en teoria deberia valer cualquiera de las 2. De hecho el operador ++ es ta permitido pero no siempre funciona bien al igual que los operadores -= y +=. Creo que al final es buena idea portar lo que llevo a SGDK y seguir desde ahi.
Por cierto, ya que estoy aprevecho para preguntar algo sobre SecondBasic: ¿ que diferencia hay entre drawtiles y drawtileinc? Alguno de ellos dibuja los tiles de forma temporal como se dibujan los sprites?.
Te comento de que en el juego en el que estoy ya llevo más de 15000 lineas. Todo el tiempo estoy utilizando la expresión (a++) ,(a--) y si que funciona.
Second Basic si tiene algunos bugs, de hecho casi siempre estoy reportando a su creador todos los que voy encontrando y él siempre responde en 4hs como mucho, reparando este compilador siempre.
Me gustaría ver tu código ¿puedes mostrarlo? me intriga saber que es lo que te está dando problema. Gracias.
Por otra parte:
Command_DRAWTILES:
Syntax: DrawTiles <label>, <tile vram offset>, <x>, <y>, <width>, <height>, [Data Label Offset]
Description: Draws one or more tiles on the screen at <X> and <Y> that is <Width> and <Height> big. One unit of X, Y, Width, or Height is equal to one 8*8 cell. X and Y start at (0,0), and that is the very upper left part of the screen. <Tile VRAM Offset> is the tile number that will be drawn. One unit of this is equal to one 8*8 tile. <Label> is a data label were the drawing map is located. The data has to be in byte format (using Data). The command draws the map in the order from left to right, up to down.
Con este comando lo que haces es dibujar en una posicion x,y con ancho y largos determinados, una imagen pero con un mapa de tiles, de modo que si algun tile se repite en la imagen, éste no se repetirá en memoria de tiles (vram), así puedes ahorrar los "slots" de tiles o memoria de tiles.
Con los siguientes comandos imprimes una imagen en una posicion x,y con ancho y alto determinados, peero éstos te toman el 'tile vram offset' como primer tile y van utilizando los tiles uno en uno como esten ordenados en vram. Por ejemplo si tu imagen tiene 8 tiles de ancho por 8 de altura tu imagen tendrá si o si 64 tiles sin importar que algun tile se repita. Drawtilesinc dibuja de izquierda hacia derecha y luego hacia abajo. Drawtilesinc2 dibuja de arriba hacia abajo y luego hacia la derecha. 5tt
Command_DRAWTILESINC:
Syntax: DrawTilesInc <tile vram offset>, <x>, <y>, <width>, <height>
Description: Draws one or more tiles on the screen at <X> and <Y> that is <Width> and <Height> big. One unit of X, Y, Width, or Height is equal to one 8*8 cell. X and Y start at (0,0), and that is the very upper left part of the screen. <Tile VRAM Offset> is the tile number that will be drawn. One unit of this is equal to one 8*8 tile. Just like the DrawTiles command, but this one doesn't use any data labels. Instead, it starts drawing using the data from <tile vram offset>, and incrementing it by 1 for each tile drawn. Drawing starts from the left, then goes to the right. When it reaches the maximum width, the command will then move the drawing cursor down, and then start drawing from the left to right again.
Command_DRAWTILESINC2:
Syntax: DrawTilesInc <tile vram offset>, <x>, <y>, <width>, <height>
Description: Draws one or more tiles on the screen at <X> and <Y> that is <Width> and <Height> big. One unit of X, Y, Width, or Height is equal to one 8*8 cell. X and Y start at (0,0), and that is the very upper left part of the screen. <Tile VRAM Offset> is the tile number that will be drawn. One unit of this is equal to one 8*8 tile. Just like the DrawTiles command, but this one doesn't use any data labels. Instead, it starts drawing using the data from <tile vram offset>, and incrementing it by 1 for each tile drawn. Drawing starts from the top, then draws going down. When it reaches the maximum height, the command will then move the drawing cursor right, and then start drawing top to bottem again.
Radiosity, te interesaría participar traducioendo la sintaxis a SGDK de lo que yo vaya exponiendo en SB aqui?
A mi me interesaría muchísimo.
Pronto me pongo al tiro con el hilo, ya he estado preparando varis cosas a la vez, solo me falta tiempo para subirlo.
saludos.