actually its 4224=4096+128 objects, but whos counting anyways? lol
i realize this defeats the purpose of having no extra files to load, yet...
u can reuse object ID numbers, and can save infinite amounts of objects to drive.
INC num, 1 ////etc etc etc
CreateCube(num, sz)
// ------------------------------------------------------------- //
// -=# CREATECUBE_NO_TEXTURE: Fast but without texture #=-
// ------------------------------------------------------------- //
FUNCTION CreateCube_no_texture: num, sz
// Diese Variablen sind als LOCAL definiert:
// num, sz,
// 2-4-3-1
// | | | |
// 6-8-7-5
// | |
// 6-5
// | |
// 2-1
// | |
// 4-3 Strip: 4 3 8 7 5 3 1 4 2 8 6 5 2 1
// Normals + culling is wrong!!
LOCAL s[], n, m, x,y,z
DIM s[14]
s[0]=4; s[1]=3; s[2]=8; s[3]=7; s[4]=5
s[5]=3; s[6]=1; s[7]=4; s[8]=2; s[9]=8
s[10]=6;s[11]=5;s[12]=2;s[13]=1
X_OBJSTART 0
FOR m=0 TO 13
n=s[m]-1
x = MOD(n, 2)
y = 1-INTEGER(n/4)
z = 1-MOD(INTEGER(n/2), 2)
X_OBJADDVERTEX x-.5, y-.5, z-.5, 0, 0, RGB(255,255,255)
NEXT
X_OBJEND
X_SAVEOBJ "Filename" + num + ".png", 0
ENDFUNCTION