If you are just using standard features which are also available with VS2005, just change version number to 8.0 and also do relative changes and apply the same for vcproj file (just version number change,etc.). I learnt this in here from someone couple of weeks ago and it is working for me so far.
As a quick note, I've never worked with SDL before.
Basically, what I'm trying to play a movie file, and it slowed down way too much by converting a frame to a PPM file, loading it up using freeimage, and then displaying it. (most of the performance hit actually came from freeimage loading the PPM, and I tried converting to BMP and loading the BMP file into an HIMAGE but that took even longer)
Anyways, I don't want to rewrite the rest of my code to use SDL if I don't have to, so is there any way I can use SDL to output to an HDC instead of an SDL_Surface?
I don't think you will be able to mix GDI and SDL to draw on the same window. But, I'm not sure about it.
Anyway, what I wanted to point out is why is this a problem ? Are you loading your image each frame ? If the load time is long, this is not really a problem because it happens only once, when your image is first loaded in memory. If you reload the image for each frame, then you are doing something seriously wrong...
Well, it's an MPG file, and the only way I could find that works well with my program so far is to rip one frame at a time to a PPM file, then display that file to the screen. All my other sprites are loaded just once, but the only way I could preload the video is if I ripped every single frame ahead of time and loaded them all into a giant array of HBITMAPs (which would take longer to load than the video actually lasts.) The next best thing I could find was to use VMR9 to display the movie, but it doesn't get along with GDI at all, so that plan was out.
Although I did realize that I was actually loading the frame every time the game updated, rather than just when there's a new frame. I think I'll try fixing that before I port everything to SDL.
I have a project with so many static variables accessed from one class to another class. I access these static variables by threads.
For example, I access one variable in one thread to change the value and another thread to access it. Both threads are running concurrently. But sometime abruptly the static variable value got changed and it holds a very big value which results in some problem.
I know that I use more static variables and I do mistake in programming but can anyone tell me avoid this kind of problem and why the variable is suddenly holding huge values.
It sounds like you read the variable halfway through being changed. So, the variable is not a trivial type (ie, BOOL).
Look at CCriticalSection, it's probably what you need. There's a million and one way to do this though. You could wrap the variable in a class including the CCriticalSection, and write get / set routines that use the critsect.
It really depends on the fine details.
If you have loads of static variables, it makes me suspect your initial design though. May be worth a second look. Does PlaceA need to know details of PlaceB?
In the process of moving to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), give me a job! http://cv.imcsoft.co.uk/[^]