First: don't use texture sizes that are not "power of two" values. They will be rescaled internally to the next bigger power of two size.
EG:
100*200 will be scaled to 128*256
100*100 to 128*128
400*400 to 512*512
80*900 to 128*1024
Power of two values are boolen Bit values, eg: 1,2,4,8,16,32,64,128,256,512...
width and hight don't have to be the same.
When you use animated textures (LoadAnimTex) you don't have to care about the calcultion of the frames on the multi texture. Just assume frame 1 is the whole texture and set the UVs this way (from 0.0 to 1.0, as usual).
When you want to use some selfmade animation system,or multitexture on singlesurface system, you will have to calculate the true UVs, as you did.
EG:
100*200 will be scaled to 128*256
100*100 to 128*128
400*400 to 512*512
80*900 to 128*1024
Power of two values are boolen Bit values, eg: 1,2,4,8,16,32,64,128,256,512...
width and hight don't have to be the same.
When you use animated textures (LoadAnimTex) you don't have to care about the calcultion of the frames on the multi texture. Just assume frame 1 is the whole texture and set the UVs this way (from 0.0 to 1.0, as usual).
When you want to use some selfmade animation system,or multitexture on singlesurface system, you will have to calculate the true UVs, as you did.