Archived

This topic is now archived and is closed to further replies.

Last Attacker

A few questions

Recommended Posts

Hey! I was wondering about the OpenGL demos that gets released but its only an exe file. How do they include images, etc. into their demo through an exe file? Do they hardcode or do they append that data after the exe data? How many of you guys liked Descent? (I mean when it was in its time). I was thinking of creating something like that as a project for the holidays. I''m going to make it a multiplayer game with cool guns, etc. Gimme some comments on that (if you please ). With that of my game, I want to check if your PC has MMX or 3DNow!. First it check for 3DNow! then for MMX otherwise it will use standard computation. I was wondering can I use function pointers or something to use just one function that will use 3DNow! or MMX accordingly (like if I want to copy like 800k of data from one memory location to the other, I want to use the best instruction set available from calling eg. COPY_DATA()) I hope that question is put clearly. Anyway thanks! // Last Attacker \\---=( LA )=---// LA Extreme \\

ICQ Number : 120585863

E-mail: laextr@icqmail.com

Share this post


Link to post
Share on other sites
What OpenGL demos?

Sure you can compile certain types of images as resources, but hard-coding the image data would be pretty much out of the question. It''s better to just load in files outside of your executable, and small resources aren''t completely out of the question. You know that.

Share this post


Link to post
Share on other sites
Check out some of the demos at the download categories at NeHe. Once you''ve downloaded it, you''ll notice that there is only an exe file but the demo features lots of graphics..

// Last Attacker \\---=( LA )=---// LA Extreme \\

ICQ Number : 120585863

E-mail: laextr@icqmail.com

Share this post


Link to post
Share on other sites
Q1:
just write your data to a .h file, and include that.
Q2:
yeah descent was kool, and the source code for one version is available iirc [freespace2 - (im not sure if this is the same game,..) http://www.freespace-2.com/ddn/sources/freespace2/]
Q3:
use the CPUID function

dodgy code:
bool TestMMX(void) {
bool mmxt;
__asm {
mov eax,1
CPUID
mov ebx,edx
shr ebx,23
and ebx,1
mov mmxt,bl
}
return mmxt;
}

bool Test3dNow(void) {
bool amd3dt;
__asm {
mov eax,2147483649
CPUID
mov ebx,edx
shr ebx,31
and ebx,1
mov amd3dt,bl
}
return amd3dt;
}

Share this post


Link to post
Share on other sites