sorry there was no propper category for my question..
does anyone has worked with SDL??
sdl_Surface Screen in the class where main fucntion is
i also have anoter sdl_Sufvace BackgroundImage
i blit that image on the Screen surface..
i have another class that also has SDL_Surface smallRectangle
and i create object in main from that class and i blit the smallRectangle on backGrountImage..
works fine until now..
now i have thrd class that has SDL_Surface smallestRectangle.. and i want first to blit it on the object from the second class, and then together blit on mainBackgroundImage SDL_Surface.. THIS IS WHERE MY PROGRAM FAIL
i don't want to write code because i don't know if anyone on this forum usess native c++ so If anyone can help me i will produce code so you can understand my problem better
Loading
Aleksandar IlioskiPosted Aug 11, 2010, 4:47 AM
Sam HobbsPosted Aug 11, 2010, 2:08 AM
It is frustrating when we invest time in software and then discover it has problems. I hope you can solve the problem easily enough. You might need to read the documentation some more to find a problem but I don't have a clue about what to look for. If it is a bug in SDL then I hope you are able to determine that that is the problem and that there is an easy fix or work-around.
I am sorry that I was unable to help any more.
Note that I know about using lib files.
Aleksandar IlioskiPosted Aug 10, 2010, 12:07 PM
probably i make this (how to say.. my english is not good enough haha) more dificult than it shoud be.. the problem is probably in using vector (in HAND class) and i bother you with sdl part.. but i don't know what am i dong wrong with vectors....
i also have other memory problem.. ( i have image that i use like button and when i click with the mouse over the button some accton happends..
some times after 2 clicks program crashs, some times i click 20 times and works fine.. (i have a lot of problems using notGarbidge collected language..)
in the real project i'm trying to clear the memory in destuctors.. but probably i forget something..
and is it possible the sdl files (.dll ones) to be some kind bad?? with bugs in it?? because since i instal it (copy it in windows/system32 sometimes my operating system fals (blue Scren) especaly when i start some application (game, screen saver, and ogher application that use Graphicks in FULLSCREEN)
Sam HobbsPosted Aug 10, 2010, 10:35 AM
Aleksandar IlioskiPosted Aug 10, 2010, 5:23 AM
I've Downloaded SDLFiles.zip from some web sdl tutor.. probably it is written in "sdlFiles.zip's" read me file..
you will need to follow the steps described there so you solve the IMG_Load Problem..
I Will Include some images so you can see what to change in Project Properties..
1. Project Prooerties->General->Character Set- set it to: Use Multi-Byte Character Set. see "Slika1.jpg"
2. Project Properties->Linker->Input->Additional Dependencies - write in it the lib that you are using..
it must be THIS ORDER:
SDL.lib
SDLmain.lib
SDL_mixer.lib
SDL_image.lib
SDL_TTF.lib
see "slika2.jpg" and "slika3.jpg"
The libs sdl_Mixer.lib is for sound, and sdl_ttf.lib is for string rendering witn specific font..
i don't use this in my project but let them be there..
now you should bild the project with no errors..
i am sorry, i should specify what sdl is, and upload sdlFiles.Zip so here it is now..
also you can see the images i've included in the zip file (slika1, slika2 slika3)
Sam HobbsPosted Aug 9, 2010, 10:20 PM
What is SDL? Is it Simple DirectMedia Layer? It really helps to identify things like that, especially when it is not form Microsoft.
I downloaded and installed SDL but there is no sdl_image.h in it and I don't find IMG_Load in any of the h files in the include directory.
I will build the project if possible and if I can it will help very much for determining the problem.
Aleksandar IlioskiPosted Aug 9, 2010, 5:52 PM
it is simple card game.. and still there is lot of classes.. but only class Hand is realy important.. THAT IS WHERE MY PROBLEM IS..
i hope You have some time to look the code and see the problem..
the problem is showing all cards that are in Hand object.. if cards are in Card array it works fine..
but if cards are in Card Vector the program chrashes.. AND I REALY WANT TO BE IN VECTORS BECAUSE THE FEACURES WHAT VECTOR HAS OVER THA ARRAY..
look the code and you will see the problem..
thank you and hope, if not the solution, you have some advice for me, or something.. my aproach is not good or what..
Sam HobbsPosted Aug 8, 2010, 7:14 PM