It would make sense for objects to automatically be converted into float pointers, since they already get converted automatically into byte pointers. For example:
Type TVec4
Field x#,y#,z#,w#
EndType
Function Vec4:TVec4(x#,y#,z#,w#)
Local v:TVec4=New TVec4
v.x=x
v.y=y
v.z=z
v.w=w
return v
EndFunction
glColor4fv vec4(1,1,1,1)
Or maybe something like this:
glColor4fv entity.color
It would also be nice if the 8-byte header for objects could be done away with or moved somewhere else, and if null objects had a byte ptr of 0. I do not know if these two things are possible, but it would make it work better with CPP. Right now, if Blitz is passed a null pointer for an object, it thinks the object is valid. I have to detect if the object pointer=8 to see if the object was actually valid or a null pointer.
Type TVec4
Field x#,y#,z#,w#
EndType
Function Vec4:TVec4(x#,y#,z#,w#)
Local v:TVec4=New TVec4
v.x=x
v.y=y
v.z=z
v.w=w
return v
EndFunction
glColor4fv vec4(1,1,1,1)
Or maybe something like this:
glColor4fv entity.color
It would also be nice if the 8-byte header for objects could be done away with or moved somewhere else, and if null objects had a byte ptr of 0. I do not know if these two things are possible, but it would make it work better with CPP. Right now, if Blitz is passed a null pointer for an object, it thinks the object is valid. I have to detect if the object pointer=8 to see if the object was actually valid or a null pointer.