Jump to content

  • Log In with Google      Sign In   
  • Create Account


lride

Member Since 16 Aug 2012
Offline Last Active Jan 18 2014 12:59 PM
-----

Posts I've Made

In Topic: std::bind and function

27 May 2013 - 05:39 PM

Im so dumb... but how would that even compile...?


In Topic: Entity-component systems and animations

24 May 2013 - 04:22 PM



If I implement that, the code will work just fine, but I feel like I'd have broken some golden NO-OBJECTS rule of entity design. I've implemented animations in other fashions but they don't have quite the capability --- I've not been able to put multiple animations on a single altas, or have animations where the frame width and height could change.

 

I don't understand why you can't have a resizable container and objects inside a component. 

Containers and objects are good way to encapsulate and store data.

Raw data doesn't mean that you only can have primitive types in a component. What you want to stay away from is having lots of functions in a component. That's system's job.

Use a vector to store each frame.


In Topic: typedef a primitive type

22 May 2013 - 07:48 PM

Thank you all. I now understand it.

So a typedef header cannot be cross platform. Am I right?

You make these headers be cross platform like:

 

#if defined(PLATFORM_ONE)
typedef foo int32;
#elif defined(PLATFORM_TWO)
typedef bar int32;
#else
#error "this platform not supported"'
#endif

Oh I see, I didn't think of conditional compilation


In Topic: typedef a primitive type

22 May 2013 - 05:00 PM

Thank you all. I now understand it.

So a typedef header cannot be cross platform. Am I right?


In Topic: Calling member function via nullptr

24 March 2013 - 02:50 PM

From a practical implementation point of view, no actual memory access may be performed to actually cause a crash, but your code is nevertheless ill-defined.

I think this is why it doesn't crash... If I use a member variable inside the function, it crashes


PARTNERS