Object type bit shift too large...
by Daniel Buckmaster · in Torque Game Engine · 03/29/2008 (8:50 am) · 4 replies
I seem to be making a lot of forum posts at the moment.
Anyway.
I was implementing a resource which involved adding a new object type. So I did the usual thing in objectTypes.h. However, when I compiled, I got a large number of errors saying
So is that it? Can I no longer add any resources that need a new object type? Are there ways around this? I'm going to remove the AtlasObjectType (with shameful plug for TSE), which will give me this last bit I need, but I'm worried for the future...
Anyway.
I was implementing a resource which involved adding a new object type. So I did the usual thing in objectTypes.h. However, when I compiled, I got a large number of errors saying
Quote:warning C4293: '<<' : shift count negative or too big, undefined behaviorI went back, and saw that the most recent object I had added was defined as BIT(32). Obviously that's too large.
So is that it? Can I no longer add any resources that need a new object type? Are there ways around this? I'm going to remove the AtlasObjectType (with shameful plug for TSE), which will give me this last bit I need, but I'm worried for the future...
About the author
Studying mechatronic engineering and computer science at the University of Sydney. Game development is probably my most time-consuming hobby!
#2
03/30/2008 (8:59 am)
Not in my copy of the engine - the only free bit I found was 21.
#3
03/30/2008 (9:31 am)
Shapebase declares a few masks that you probably don't need (like cloaking, repair, etc). You can also look into consolidating multiple masks into one.
#4
Anyway, I got rid of AtlasObjectType (shame on the programmers...), so I have one free mask left.
03/30/2008 (2:00 pm)
I don't think the problem is in the masks - it's in the object type definitions. Like ProjectileObjectType, ShapeBaseObjectType, DamageableObjectType, TerrainObjectType, etc. Masks aren't a problem (yet...).Anyway, I got rid of AtlasObjectType (shame on the programmers...), so I have one free mask left.
Torque 3D Owner Robert Blanchet Jr.