Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Createing a bmp image for Darkgdk

Author
Message
DennisW
16
Years of Service
User Offline
Joined: 15th Jun 2008
Location: Ohio
Posted: 15th Jun 2008 19:28
Ok I give up

I have tride to create my own image and load it but in dark gdk. I have been using mspaint. Is there a reason that I can't use mspaint? I see I don't get the same icon on the project list of images. So what is the proper way to create your own image.
Codger
21
Years of Service
User Offline
Joined: 23rd Nov 2002
Location:
Posted: 15th Jun 2008 21:52
mspaint should / does work fine
make sure when you load image that you include the full name i.e. "myimage.bmp" in the command also make sure the image is in the same folder as your project

throw in a code snippit and someone will help

System
MacBook Pro
Windows XP Home on Boot Camp
DennisW
16
Years of Service
User Offline
Joined: 15th Jun 2008
Location: Ohio
Posted: 16th Jun 2008 01:38


// Dark GDK - The Game Creators - www.thegamecreators.com

// the wizard has created a very simple project that uses Dark GDK
// it contains the basic code for a GDK application

// whenever using Dark GDK you must ensure you include the header file
#include "DarkGDK.h"

// the main entry point for the application is this function
void DarkGDK ( void )
{
// turn on sync rate and set maximum rate to 60 fps
dbSyncOn ( );
dbSyncRate ( 60 );
dbloadbitmap ("red.bmp",1);

// our main loop
while ( LoopGDK ( ) );
{
// update the screen
dbSync ( );
}

// return back to windows
return;
}

This is the simple code that I have and when I try to build I get

1>Main.cpp
1>c:\visual_c++\load_bitmap\load_bitmap\main.cpp(16) : error C3861: 'dbloadbitmap': identifier not found
jinzai
18
Years of Service
User Offline
Joined: 19th Aug 2006
Location: USA
Posted: 16th Jun 2008 03:24 Edited at: 16th Jun 2008 03:25
Make sure that you save it as a 24-bit BMP/DIB. When you load the image for use as anything other than a texture with mip-maps...use the overloaded dbLoadImage that accepts a flag, and give it a value of 1:

void dbLoadImage ( char* szFilename, int iImage, int iFlag )
manu
16
Years of Service
User Offline
Joined: 7th Jun 2008
Location:
Posted: 16th Jun 2008 11:01 Edited at: 16th Jun 2008 11:01
dbloadbitmap vs dbLoadBitmap
It is case sensitive.

error C3861: 'dbloadbitmap': identifier not found
says that there is something wrong with the word dbloadbitmap not the image file.
DennisW
16
Years of Service
User Offline
Joined: 15th Jun 2008
Location: Ohio
Posted: 17th Jun 2008 03:12
Thanks that was it. Keen eye. I feel like I am back working on the Vic 20 learning new Keywords. Do you by chance know if I can still get Dark GDK.net. I dont find it on the web site.

Thanks again

Login to post a reply

Server time is: 2024-11-20 13:29:40
Your offset time is: 2024-11-20 13:29:40