Hey so I am making a vertical sprite generator that allows me to draw and convert the image into a displayable vertical text sprite, mostly for my personal use. It is 93 by 55 which is the size of the image I want to display on the graph screen (I am using it to display maps).
btw |L is the small L for lists
I am 85% sure that the scanning code works, but not 100% sure. This is the code:
Code:
A and B are the coordinates for pxl-Test and it goes from left to right, bottom to top.
Z shows how many pixels have been checked (so I can calculate when a row ends)
(Z/V) basically checks if the amount of pixels tested is a multiple of 93 so I know when the row ends. I then store the coordinate of where a new row ends into List PDG.
If there is anything wrong with the scanning code let me know! thanks
The main problem that I have is the displaying part. I'm not sure why but eventually it throws me a dimension error.
Displaying code:
Code:
sub(Str1 just removes a space I added at the beginning of str1.
the length of str1 is 5208
The code does sub(Str1 and it goes from character 1 to character # (stored in List PDG)
I don't know why I'm getting a dimension error or why it doesn't completely work
I probably might have left some things out so if you need more information on code or clarification then just ask
Thanks!
btw |L is the small L for lists
I am 85% sure that the scanning code works, but not 100% sure. This is the code:
Code:
" ->Str1
62->A
0->Z
0->Y
0->X
0->V
56->dim(|LPDG
While A!=6
A-1->A
V+1->V
For(B,1,93
If pxl-Test(A,B
Then
If pxl-Test(A,B+1
Then
If pxl-Test(A,B+2
Then
Str1+"|L"->Str1
Else
Str1+"["->Str1
End
B+2->B
Pxl-On(A,B
Z+3->Z
Else
Str1+"."->Str1
B+1->B
Pxl-On(A,B
Z+2->Z
End
Else
Str1+" "->Str1
Pxl-On(A,B
Z+1->Z
End
(Z/V)->Y
If Y=93:Then
X+1->X
Z->|LPDG(X)
End
End
End
A and B are the coordinates for pxl-Test and it goes from left to right, bottom to top.
Z shows how many pixels have been checked (so I can calculate when a row ends)
(Z/V) basically checks if the amount of pixels tested is a multiple of 93 so I know when the row ends. I then store the coordinate of where a new row ends into List PDG.
If there is anything wrong with the scanning code let me know! thanks
The main problem that I have is the displaying part. I'm not sure why but eventually it throws me a dimension error.
Displaying code:
Code:
sub(Str1,2,length(Str1)-1->Str1
0->C
For(A,56,1,~1
For(B,1,dim(|LPDG
If B=1
Text(A,1,sub(Str1,1,|LPDG(1)
If B!=1
Text(A,1,sub(Str1,|LPDG(B-1)+1,|LPDG(B)
End
End
Pause
sub(Str1 just removes a space I added at the beginning of str1.
the length of str1 is 5208
The code does sub(Str1 and it goes from character 1 to character # (stored in List PDG)
I don't know why I'm getting a dimension error or why it doesn't completely work
I probably might have left some things out so if you need more information on code or clarification then just ask
Thanks!