ok i know what the problem is the problem is that
in one function im passing
draw_tile(int x, int y, int identifire, BITMAP * array[3], int array2[2][3])//right here all of my paramaters are pure just prototype int and the function doesnt see them as variables it sees them as "(int, int, int, BITMAP**, int (*)[3]) were as here it sees them as 8 C:\Dev-Cpp\advanced wars\tile.h void tile::draw_tile(int, int, int, BITMAP*, int)
and when i use them externaly i pass them varibles not straght ints
(int&, int&, int&, BITMAP*&, int&)'
so what i need to do is pass int& ect. into my prototype but i dont know how to do that (cant get there from here)
here is my source code
#include "main.h"#include "allegro.h"#include "tile.h"int main(int argc, char *argv[]){ tile the_tile; DATAFILE *datafile; BITMAP * array[3]; int identifire; int array2[2][3]; int x; int y; array2[2][3]= 1,2,0,2,1,0; (BITMAP *) datafile[mountain].dat; (BITMAP *) datafile[plains].dat; array[3]=(BITMAP *)datafile[river_ver].dat,datafile[mountain].dat,datafile[plains].dat; char buf[256]; allegro_init(); install_keyboard(); if (set_gfx_mode(GFX_AUTODETECT_WINDOWED , 320, 200, 0, 0) != 0) { set_gfx_mode(GFX_TEXT , 0, 0, 0, 0); allegro_message("Unable to set any graphic mode\n%s\n", allegro_error); return 1; set_color_depth(32); } /* load the datafile into memory */ replace_filename(buf, argv[0], "datafile.dat", sizeof(buf)); datafile = load_datafile(buf); if (!datafile) { set_gfx_mode(GFX_TEXT, 0, 0, 0, 0); allegro_message("Error loading %s!\n", buf); return 1; } int templat[2][3]={1,0,1,2,2,0}; set_palette((RGB *)datafile[main_palette].dat); /* aha, set a palette and let Allegro convert colors when blitting */ set_color_conversion(COLORCONV_TOTAL); /* display the bitmap from the datafile */ textout(screen, font, "This is the bitmap:", 32, 16, makecol(255, 0, 255)); the_tile.draw_tile(x,y,identifire,array[3],array2[2][3]); /* and use the font from the datafile */ // textout(screen, datafile[BIG_FONT].dat, "And this is a big font!", 32, 128,// makecol(0, 255, 0)); readkey(); /* unload the datafile when we are finished with it */ unload_datafile(datafile); return 0;}END_OF_MAIN();//As you can see array[3] is in fact an array of pointers:
____________________________"This just in, 9 out of 10 americans agree that 1 out of 10 americans will disagree with the other 9"- Colin Mochrie