Commit bcf6029f authored by Collin Eggert's avatar Collin Eggert
Browse files

Patching the list and matrix oddness

parent 517e2603
Pipeline #15 skipped
......@@ -17,8 +17,8 @@ end;
local board=[[7,7,7,7,7,7,7,7],
[7,7,7,7,7,7,7,7],
[1,1,1,1,1,7,7,7],
[9,9,9,9,9,2,1,1],
[4,4,5,9,9,9,9,9],
[12,12,12,12,12,2,1,1],
[4,4,5,12,12,12,12,12],
[7,7,7,4,4,4,4,4],
[7,7,7,7,7,7,7,7],
[7,7,7,7,7,7,7,7]];
......@@ -29,12 +29,13 @@ begin
local W=s[2],H=s[1],X,Y=1;
local newTiles := {};
for X from 1 to W do
//for Y from 1 to H do
newTiles := append(newTiles,32*(W-X));
newTiles := append(newTiles,16*(W-X));
newTiles := append(newTiles,board(X,Y)); // FIXME: Matrix access fails here
//end;
for Y from 1 to H do
for X from 1 to W do
local b=board[Y,X];
newTiles := append(newTiles,32*(X-1)+32*(Y-1));
newTiles := append(newTiles,16*(W-X)+16*(Y));
newTiles := append(newTiles,b);
end;
end;
tiles := newTiles;
......@@ -43,19 +44,19 @@ end;
local m1=[[1,2],[1,1]];
export PoC()
begin
print(string(m1));
print(colDim(m1));
print(string(board));
print(colDim(board));
print(board(1,1));
print;
dimgrob_p(G1,320,240);
rect_p(G1,0,0,320,240,#00);
BoardToTiles();
for I from 1 to length(tiles) step 3 do
local S=size(tiles);
local t=ticks-1;
rect_p(G1,0,0,320,240,#00);
for I from 1 to S step 3 do
DrawTile(I);
end;
blit_p(G0,G1);
wait;
local tps=1000/(ticks-t);
local evt=wait(-1);
print("TPS: " + tps);
end;
ICON asteroidEdge1 89504E470D0A1A0A0000000D494844520000004000000020040300000050B363B70000001B504C5445000000DC9612A16D0D96665D553A34764F47382622E9B03E130E29A413969B0000000974524E53FF00000000000000003A2B97EA000000FB49444154780185D14D6EC320144561B6008A320F8D37504A9405809539BE561780AC4EBB884A2CBB8F105BE5B76FE8F3198C61C570CE86C3F958C43E12FC3216FC98FF7A5BFCED2D91F75AE455CA0BEF7721E59B7A9766D001AD607C677D79B58022B0A1D9053E0CE022B0A8FB373F5B355B384D5B5884C6F956E36E112C043E43A8BA583D12983D024D09A6D5E06622D84CECFB12AF6BE4C2696F35BDFBB38457CF3611124F10F6298E21E5158AC057DE0F212618E336ABCB9E84488777EB01F2CB10A0FF8739827BDD499CE8061C168FCDB63A6311402F5EFB47B33316AFE8093A9DB1F40DF76E27E1F068EFBF4F7DFEB6E8F724463D8AE2C12FA4AD7E111BFB8C3A0000000049454E44AE426082;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment