#define MAKE_IRR_ID(c0, c1, c2, c3)

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
bogQ
Posts: 11
Joined: Sat Jan 09, 2010 1:06 pm

#define MAKE_IRR_ID(c0, c1, c2, c3)

Post by bogQ »

Due to change from 1.7x to 1.8 in addZipFileArchive vs addFileArchive
can someone explain to me what is happening with E_FILE_ARCHIVE_TYPE on (irr::u32)(irr::u8)(c0) to (c4)

how do for example 'g' (what is happening with it) from MAKE_IRR_ID('g','z','i','p') is transfered (changed) for usage in Bitwise operators?

shorter version of question
(irr::u32)(irr::u8)("g'") = ?!
randomMesh
Posts: 1186
Joined: Fri Dec 29, 2006 12:04 am

Re: #define MAKE_IRR_ID(c0, c1, c2, c3)

Post by randomMesh »

u8 is a typedef for char, so basically MAKE_IRR_ID uses the ASCII code values of the letters.

So (irr::u32)(irr::u8)('g') = 103.
"Whoops..."
bogQ
Posts: 11
Joined: Sat Jan 09, 2010 1:06 pm

Re: #define MAKE_IRR_ID(c0, c1, c2, c3)

Post by bogQ »

ty randomMesh

just one more question to anyone so i dont mess it up
in case MAKE_IRR_ID('Z','I','P', 0), (irr::u32)(irr::u8)(0) is = 48 and not 0 (aka nul). correct?
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Re: #define MAKE_IRR_ID(c0, c1, c2, c3)

Post by hybrid »

No, that's why it is 0 and not '0'. The ID is ZIP, not ZIP0
Post Reply