Am Montag, 29. Januar 2007 schrieb The Watermelon: > On 1/29/07, Dennis Schridde <[EMAIL PROTECTED]> wrote: > > display3d.c @@ -1607,9 +1607,9 @@ > > Can't > > p.x = tileScreenInfo[i+0][j+0].sx; p.y = > > tileScreenInfo[i+0][j+0].sy; > > p.z = tileScreenInfo[i+0][j+0].sz; > > be replaced with > > p = tileScreenInfo[i+0][j+0]; > > or is that not possible because of different data types? > > tileScreenInfo is a SVMESH while p is a Vector3f... Yes, but it "contains" something that can be seen as a Vector3...
> Similar things are done in several other locations, too. > > > Maybe some more types can get their x,y,z and u,v coordinates replaced by > > Vector3 and Vector2 ? > > > > Another suggestion would also be to replace "pos" with "position". > > But I don't exactly know if that's a correct naming anyway. Is the x,y,z > > in a > > vertex a "position"? This is nothing really important. The name > > "position" doesn't seem to fit for me, but it may very well be that I am > > totally wrong. > > > > Can iVertex and PIEVERTEX be merged? It seems to me that they are mostly > > the > > same. (What does the g field in iVertex mean?) > > I dont know what the 'g' field is in iVertex either...havent looked at > functions that use it...seems to be some color byte... > > There is also a PIEVECTORF, can't that be replaced by Vector3, too? > > > yes i think it can be safely replaced by Vector3f too... > > And iVectorf? Replace it with Vector3d? Ohwowow... I just saw that you > > > replaced iVectorf with Vector3f... That doesn't look good, since iVectorf > > used doubles, while Vector3f is about floats... > > iVectorf is useless because it will eventually get abused to integer in > imdload.c,which is the only instance of iVectorf iirc. > > I am currently looking into the possibility to change all those x,y,z in > PIEVERTEX and other pie structs to float from sint32 to increase the > precision of pie point coords like someone suggested in forum,and change > imdload function to use '%5.5f'(just a random number) to sscanf imd points > in pie files,though all exist pie files will need to be changed to cope > with such changes i think... > > I will change it to Vector3d for better readability anyways. Well, if that Vector3x stores floats, then it should be named Vector3f. My Vector3d was not because it is a vector in 3 dimensional space, but because it is a vector of 3 doubles. So if this vector is never used as a double, but only to store ints, then it should be removed and replaced by Vector3i and not Vector3f... But if it gets to store floats, then it should sure be named Vector3f, as you did it. My name was only for a third Vector3, which should store doubles, because the old iVectorf stored doubles, too. And I don't think it is safe to replace something that assumes to be double with a float. > Typedefinitions should go with the SDL types, if they are providing an API, > > > IMO. Makes it more obvious what they are representing and in the long run > > I > > wanted to replace all Win types with SDL types anyway. > > > > iVertex is missing a space in the list. Looks better if it gets it. ;) > > (Yes, this is a bit nitpicking, but I would forget to change it myself > > before > > applying or after someone else applied it.) > > > > The name MakeVector3fInt should be improved IMO... Vector3_Float2Int > > maybe? Is > > there a commonly used name for such conversions? > > > > --Dennis > > not sure about the naming stuff Me neither. ;) I just think that MakeVector3fInt is not a very good name. ;)
Description: PGP signature
_______________________________________________ Warzone-dev mailing list Warzoneemail@example.com https://mail.gna.org/listinfo/warzone-dev