now this runs ok, what I would like to find out is how to have it so that the int are in one file the loadpictures in another and main calling all these bit.
// Dark GDK - The Game Creators - www.thegamecreators.com
// the wizard has created a very simple 3D project that uses Dark GDK
// it can be used as a starting point in making your own 3D games
// whenever using Dark GDK you must ensure you include the header file
#include "DarkGDK.h"
//globals and dims //
int moon [ 30 ];
int moonpic = 0;
int WeatherBanner = 1;
int Temp_Gauge = 2;
int North_0 = 3;
int NNE_1 = 4;
int NE_2 = 5;
int ENE_3 = 6;
int E_4 = 7;
int ESE_5 = 8;
int SE_6 = 9;
int SSE_7 = 10;
int S_8 = 11;
int SSW_9 = 12;
int SW_10 = 13;
int WSW_11 = 14;
int W_12 = 15;
int WNW_13 = 16;
int NW_14 = 17;
int NNW_15 = 18;
// the main entry point for the application is this function
void DarkGDK ( void )
//#include "loadstationpictures.ccp"
{
// bit that loads in images //
// load innumbers for moonimages //
for(moonpic = 0; moonpic < 30 ; moonpic++ )
{
moon[moonpic] = 1000 + moonpic ;
}
dbLoadImage ( "media\\WeatherStationBanner.bmp" , WeatherBanner );
dbLoadImage ( "media\\Windcompass1.png", North_0 );
dbLoadImage ( "media\\Windcompass2.png", NNE_1 );
dbLoadImage ( "media\\Windcompass3.png",NE_2);
dbLoadImage ( "media\\Windcompass4.png",ENE_3);
dbLoadImage ( "media\\Windcompass5.png",E_4);
dbLoadImage ( "media\\Windcompass6.png",ESE_5);
dbLoadImage ( "media\\Windcompass7.png",SE_6);
dbLoadImage ( "media\\Windcompass8.png",SSE_7);
dbLoadImage ( "media\\Windcompass9.png",S_8);
dbLoadImage ( "media\\Windcompass10.png",SSW_9);
dbLoadImage ( "media\\Windcompass11.png",SW_10);
dbLoadImage ( "media\\Windcompass12.png",WSW_11);
dbLoadImage ( "media\\Windcompass13.png",W_12);
dbLoadImage ( "media\\Windcompass14.png",WNW_13);
dbLoadImage ( "media\\Windcompass15.png",NW_14);
dbLoadImage ( "media\\Windcompass16.png",NNW_15);
// dbloadimage ( "media\\clockface.bmp",Clock_Face,1);
// dbloadimage ("media\\windspeed3.png",Wind_Speed_Gauge,1);
//`Wind_Speed_Gauge_WIDTH=image width(Wind_Speed_Gauge)
//`Wind_Speed_Gauge_height= image height(Wind_Speed_Gauge)
//`paste image 7001,object screen x(2)-(156/2) ,object screen y(2)-(156/2),1
// dbloadimage ("media\\wallpaper_1.bmp",flag_image,1);
dbLoadImage ("media\\moonphase\\moon-day0.bmp",moon[0],1);
dbLoadImage ("media\\moonphase\\moon-day1.bmp",moon[1],1);
dbLoadImage ("media\\moonphase\\moon-day2.bmp",moon[2],1);
dbLoadImage ("media\\moonphase\\moon-day3.bmp",moon[3],1);
dbLoadImage ("media\\moonphase\\moon-day4.bmp",moon[4],1);
dbLoadImage ("media\\moonphase\\moon-day5.bmp",moon[5],1);
dbLoadImage ("media\\moonphase\\moon-day6.bmp",moon[6],1);
dbLoadImage ("media\\moonphase\\moon-day7.bmp",moon[7],1);
dbLoadImage ("media\\moonphase\\moon-day8.bmp",moon[8],1);
dbLoadImage ("media\\moonphase\\moon-day9.bmp",moon[9],1);
dbLoadImage ("media\\moonphase\\moon-day10.bmp",moon[10],1);
dbLoadImage ("media\\moonphase\\moon-day11.bmp",moon[11],1);
dbLoadImage ("media\\moonphase\\moon-day12.bmp",moon[12],1);
dbLoadImage ("media\\moonphase\\moon-day13.bmp",moon[13],1);
dbLoadImage ("media\\moonphase\\moon-day14.bmp",moon[14],1);
dbLoadImage ("media\\moonphase\\moon-day15.bmp",moon[15],1);
dbLoadImage ("media\\moonphase\\moon-day16.bmp",moon[16],1);
dbLoadImage ("media\\moonphase\\moon-day17.bmp",moon[17],1);
dbLoadImage ("media\\moonphase\\moon-day18.bmp",moon[18],1);
dbLoadImage ("media\\moonphase\\moon-day19.bmp",moon[19],1);
dbLoadImage ("media\\moonphase\\moon-day20.bmp",moon[20],1);
dbLoadImage ("media\\moonphase\\moon-day21.bmp",moon[21],1);
dbLoadImage ("media\\moonphase\\moon-day22.bmp",moon[22],1);
dbLoadImage ("media\\moonphase\\moon-day23.bmp",moon[23],1);
dbLoadImage ("media\\moonphase\\moon-day24.bmp",moon[24],1);
dbLoadImage ("media\\moonphase\\moon-day25.bmp",moon[25],1);
dbLoadImage ("media\\moonphase\\moon-day26.bmp",moon[26],1);
dbLoadImage ("media\\moonphase\\moon-day27.png",moon[27],1);
dbLoadImage ("media\\moonphase\\moon-day28.bmp",moon[28],1);
dbLoadImage ("media\\moonphase\\moon-day29.bmp",moon[29],1);
// in this application we are going to create some 3D objects
// and position them on screen
//this will hopfuly load all the images in //
// ready for the station to use.//
// set up numbers for compass directions//
// when starting a Dark GDK program it is useful to set global
// application properties, we begin by turning the sync rate on,
// this means we control when the screen is updated, we also set
// the maximum rate to 60 which means the maximum frame rate will
// be set at 60 frames per second
dbSyncOn ( );
dbSyncRate ( 60 );
// set our random seed to a value from the timer, this will help
// to ensure each time we run our program the random values appear
// more random
//dbRandomize ( dbTimer ( ) );
// make some 3D objects
// for ( int i = 1; i < 50; i++ )
// {
// make a sphere
// dbMakeObjectSphere ( i, 1 );
// position the object in a random location
// dbPositionObject ( i, dbRnd ( 20 ), dbRnd ( 20 ), dbRnd ( 20 ) );
// adjust scaling
// dbScaleObject ( i, 100 + dbRnd ( 400 ), 100 + dbRnd ( 400 ), 100 + dbRnd ( 400 ) );
// give the object a color
// dbColorObject ( i, dbRgb ( dbRnd ( 255 ), dbRnd ( 255 ), dbRnd ( 255 ) ) );
// increase specular power
// dbSetObjectSpecularPower ( i, 255 );
// turn off ambient lighting for this object
// dbSetObjectAmbient ( i, 0 );
// }
// move our camera back so we can view the objects
// dbPositionCamera ( 10, 10, -20 );
// now we come to our main loop, we call LoopGDK so some internal
// work can be carried out by the GDK
while ( LoopGDK ( ) )
{
// display some text on screen
// dbText ( 0, 0, "Use the up and down arrow keys to move the camera" );
for (int gh = 0; gh < 30 ; gh++ )
{
dbPasteImage ( gh, 0, 0 );
dbSync ( );
dbWait ( 1000 );
}
for (int gh = 0; gh < 30 ; gh++ )
{
dbPasteImage ( moon[gh], 0, 0 );
dbSync ( );
dbWait ( 1000 );
}
// move the camera forwards
// if ( dbUpKey ( ) )
// dbMoveCamera ( 1 );
// move the camera backwards
// if ( dbDownKey ( ) )
// dbMoveCamera ( -1 );
// rotate all of our objects
// for ( int i = 1; i < 50; i++ )
// dbRotateObject ( i, dbObjectAngleX ( i ) + 0.1, dbObjectAngleY ( i ) + 0.2, dbObjectAngleZ ( i ) + 0.3 );
// here we make a call to update the contents of the screen
dbSync ( );
}
// before quitting delete our objects
for ( int i = 1; i < 50; i++ )
dbDeleteObject ( i );
// and now everything is ready to return back to Windows
return;
}
Dark Physics makes any hot drink go cold.