🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

tutorial 6 problem! :) help please!

Started by
3 comments, last by ryerider 23 years, 11 months ago
hi -- i''m working on tutorial 6, and i''m not quite sure where in my file directory to put the bmp. -- do i bring the data folder into the other folder that contains the include folder? i''m getting an Initilization error and i don''t know why. any help would be appreciated -- thanks so much! -aron
Advertisement
Ok... you unzip tutorial6 to some directory let say OGL.
then you should have in it a DATA subdirectory ( bitmaps there ) and other files ...
however thats not necassery... make sure that when you load bitmaps in LoadBitmap ( or something like that in the tutorial ) you have proper path to them like : LoadBitmap("data/ggg.bmp")
got it ? make sure you save your project and know where you saved it ! if you have you dir with tutorial and you saved your project in directory like PROJECTS ( borland opens as default )
it wont''t work...
hope you understood ... sorry if it didn''t help...

Pet
Pet
oh yea... and you can check where the error is by running your program step by step ( F7 or F8 ) ...
Pet
The path used by the program ( .\data\nehe.bmp) is relative.
When you run the executable via the explorer, the directory structure must look like the following:

+ tutorial
- tutorial.exe
+ data
- nehe.bmp

But when you start the executable from within Visual C++, the data directory must be one level higer:

+ tutorial
- stuff.cpp
- stuff.h
+ debug
- tutorial.exe
+ data
- nehe.bmp

Hope this helps
I think you''re confused about the fact that VC++ initially puts the EXE in a ''Debug'' or ''Release'' directory.

Let''s imagine your project directory (which contains source and header files) is C:\PROGRAMMING\TUTORIAL6\

So, by default, your EXE will be built in C:\PROGRAMMING\TUTORIAL6\RELEASE\ - you understand?

Change your project settings (under link) so that the exe just builds in C:\PROGRAMMING\TUTORIAL6\

Put the bmp''s and other data in the subfolder C:\PROGRAMMING\TUTORIAL6\DATA\ - note that this subdirectory is directly one level past the build directory, so when the filename says ''Data\Thingie.bmp'' it redirects to that directory.

Ok!



========
Smidge
www.smidge-tech.co.uk
========
--Mr Smidge

This topic is closed to new replies.

Advertisement