Alright so I'm new to DarkGDK and relatively new to c++ and I'm having problems with a few things following reaperman's tutorial. The first problem is that when I get to the scrolling part of the text for the pregame story type thing it's black at the bottom instead of showing the water. The second problem is that it freezes up when I click the Lishom icon to load his stats and whatever.
Here's my code:
// 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"
// Variables Loaded Now
int spx, y, wo, wi, six, noc, click, mx, my, ucm;
int lis, toc, mar, kya, gar;
int lishom;
void clickingon() {
if(mx >= 107 && mx <= 157 && my >= 170 && my <= 220 && lishom != 2) {
lis = 1;
lishom = 1;
click = 1;
}
return;
}
void lisinfo() {
dbSetCurrentBitmap(1);
dbGetImage(98, 0, 0, 535, 175);
dbSprite(10000, 60, 240, 98);
lis = 0;
return;
}
void DarkGDK ( void )
{
// turn on sync rate and set maximum rate to 60 fps
dbSyncOn ( );
dbSyncRate ( 60 );
dbSetDisplayMode ( 640 , 480, 32 );
dbMaximiseWindow ( );
// Color the backdrop black
dbColorBackdrop ( 0 );
// Hide the mouse
dbHideMouse ( );
// Load our music and sounds
dbLoadMusic( "Music/intro.mid", 1 );
dbLoadMusic( "Music/ff1world.mid", 2 );
dbLoadSound( "Music/close.wav", 1 );
dbSetSoundVolume( 1, 100 );
dbPlayMusic( 1 );
// Title screen now
dbLoadBitmap ( "images/dsp2rpg.bmp", 0 );
dbSync ( ); dbSync ( );
dbWait ( 3000 );
dbLoadBitmap ( "Images/dblogo.bmp", 0 );
dbSync ( ); dbSync ( );
dbWait ( 3000 );
dbSync ( ); dbSync ( );
dbLoadBitmap ( "Images/tl.bmp", 0 );
dbSync ( ); dbSync ( );
dbLoadBitmap ( "Images/textintro2.bmp", 1 );
dbSuspendForMouse ( );
dbWait ( 1 );
// Introduction
dbLoadBitmap( "images/waterback.bmp", 0 );
dbGetImage(2, 0, 0, 640, 255);
// Other Images
dbLoadImage ( "images/parchmentfin.bmp", 96 );
dbLoadImage ( "images/alltext1.bmp", 97 );
dbLoadImage ( "images/mouse.bmp", 100 );
dbLoadImage ( "images/hannanoia.bmp", 103 );
dbLoadImage ( "images/garanak.bmp", 104 );
dbLoadImage ( "images/kyacca.bmp", 105 );
dbLoadImage ( "images/lishom.bmp", 106 );
dbLoadImage ( "images/marinda.bmp", 107 );
dbLoadImage ( "images/Toceda.bmp", 108 );
dbLoadImage ( "images/xmark.bmp", 109 );
dbLoadImage ( "images/g1.bmp", 110 );
spx = 700; y = 500; wo = 103; wi = 108; six = -200; noc = 0; click = 0;
dbSprite ( 101, 0, 0, 101 );
dbSprite ( 1000, 0, 0, 2 );
dbSprite ( 97, 0, 500, 97 );
dbSync ( ); dbSync ( );
// Scroll Text Loop
while ( y > 100 ) {
dbSprite ( 97, 0, y, 97 );
y--;
dbSync ( ); dbSync ( );
}
// Delete the Text Sprite
dbDeleteSprite ( 1000 );
dbDeleteSprite ( 97 );
dbSyncRate ( 30 );
// Load Character Screen
y = -480;
while ( y < 0 ) {
dbSprite ( 96, 0, y, 96 );
y = y + 8;
dbSync ( ); dbSync ( );
}
while ( noc != 2 ) {
mx = dbMouseX();
my = dbMouseY();
if ( my > 240 ) my = 240;
if ( mx > 600 ) mx = 600;
dbSprite ( 1, mx, my, 100 );
ucm = dbMouseClick();
if(ucm == 1) clickingon();
if(lis == 1) lisinfo();
dbSync ( ); dbSync ( );
}
// our main loop
while ( LoopGDK ( ) )
{
// update the screen
dbSync ( );
}
// return back to windows
return;
}