I'll need to make a note of this somewhere

release build still works fine so i've probably screwed something up

This doesn't appear to work for the bytes mentioned yesterday
Using the same statements in the KEnv func, it's not returning any correct numbers
Also in the LE format from PC build
got this fixed; i was stupid and had the addFactory calls for CAnimationManager and CSectorAnimation commented out

Yea, loading into a level with CMaterial registered, it crashes in this file line 919 (assert clid is not higher than objects list size)
That's not good

surely theres classes already registered for Alice that go through this function? which means that this is probably not a kobjref in this game?
it does seem to be a "pointer" or reference of some kind though, but the bits at least arent right for this
The big problem especially with CMaterial is that the format changes for almost every game, so the CMaterial class in the editor needs to be adapted.
could that also be the reason theres just big chunks of red and green floor for Alice in the main editor? cus they aren't that colour in game lmao
Probably the crash is that it was trying to read a pointer from the file even though it got something else, as the format changes.
My guess is that the game uses vertex colors as a way to perform multitexturing: the level model has some faces that are assigned to at most 4 textures, and the vertex color selects which one to render: red=first texture, green=second texture, ... and you can combine colors to blend between textures.
The editor doesn't support multitexturing yet, so that's why it just presents the model as if they had regular vertex colors and one texture.
I actually think I've just figured part of this out
The bytes `00 8A 00 00` are for the first instance of CGeometry
Just for the byte `8A`, it's bits are `10001010`
The first 2 bits `10` equal int 2 (class ID), the remaining bits `001010` equal 10 (class group)
Same for CParticleGeometry, bytes are `00 4A 00 00`
Bits are `01001010`
First 2 bits `01` equal 1 (class ID), remaining bits are the same as CGeometry, `001010`, equal 10 (class Group)
Still need to find the obj number bits, but i reckon it'll be somewhere in the last byte since it's the only one that changes
Something that I just realized: the first byte could be something else, and the next 4 bytes are a reference
Example: (00) 4A 00 02 -> 2004A
category: 10
class id: 1
obj #: 1