Problems using DX Surfaces draw methods
Hi
I am at the final stages of a game and have just put in the score and a bit of drawing in using a Direct Draw surface and the DrawText and DrawBox methods.
All works fine for a while but after a length of time I get the following exception.
System.ArgumentNullException: Value cannot be null.
at Microsoft.DirectX.DirectDraw.Surface.set_ForeColor(Color value)
at BCQuest.GameManager.drawScores(Surface surface) in c:\documents and settings\nick\my documents\visual studio projects\bcquest\gamemanager.cs:line 273
Does anyone know what could be causing this. I can't see why this would happen as the game seems to run for a good 10 minutes before getting upset!!!
The surfaces are all ok.
Should I be doing a bit of memory management after using the fonts and colors to perfrom this operation??
Yours hopefully
Nick James

MykonineRank #2,671 · 521 reputationPosted Sep 30, 2004, 2:07 PM EDT
nick 018 reputationPosted Oct 2, 2004, 4:23 AM EDT
MykonineRank #2,671 · 521 reputationPosted Oct 2, 2004, 1:59 PM EDT
nick 018 reputationPosted Oct 4, 2004, 1:28 AM EDT