Re: SFML2 Demo Dilema - Solved
- Posted by ghaberek (admin) May 10, 2015
- 2583 views
One more.
typedef struct { unsigned int width; unsigned int height; unsigned int bitsPerPixel; } sfVideoMode;
Traditional method..
-- struct sfVideoMode public constant sfVideoMode__width = 0, -- unsigned int sfVideoMode__height = 4, -- unsigned int sfVideoMode__bitsPerPixel = 8, -- unsigned int SIZEOF_SFVIDEOMODE = 12, $ -- example atom mode = allocate_data( SIZEOF_SFVIDEOMODE, 1 ) atom width = peek4u( mode + sfVideoMode__width ) atom height = peek4u( mode + sfVideoMode__heigth ) -- etc.
and 4.1 with memstruct...
public memstruct sfVideoMode unsigned int width unsigned int height unsigned int bitsPerPixel end memstruct -- example: atom mode = allocate_data( sizeof(sfVideoMode) ) atom width = mode.sfVideoMode.width atom height = mode.sfVideoMode.height -- etc.
I think you get the point.
-Greg