[Ohrrpgce] [Bug 619] gfx_sdl broken

James Paige Bob at HamsterRepublic.com
Thu Nov 13 08:23:54 PST 2008


On Thu, Nov 13, 2008 at 08:15:58PM +1300, Ralph Versteegen wrote:
> 2008/11/12  <bugzilla-daemon at karnov.dreamhost.com>:
> > http://rpg.hamsterrepublic.com/bugzilla/show_bug.cgi?id=619
> >
> >
> >
> >
> >
> > --- Comment #3 from Bob the Hamster <Bob at HamsterRepublic.com>  2008-11-11 19:18:39 ---
> > I fixed the double-buffering issue in gfx_sdl. TMC, can you re-test and let me
> > know if you are still seeing the problems you reported before?
> 
> I'm actually still mired in exams, so not going to do any testing or
> other time consuming OHR stuff for another week...
> But looking at the diff, I'm going to have to say that you've totally
> misunderstood the problem and done some else completely. This might
> work (and is similar to something I wanted to do anyway), but I'm
> pretty sure there's some code that this will break.

Yeah, what I did is kind of a quick hack. The fact that I made page 0 
and 1 the same may have some unintended consequences in cases where 
pages 0 and 1 are used for some purpose other than double-buffering-- 
but I would consider those cases to be bugs themselves, so maybe this 
will help me locate them.

Here is my (rough) plan for screen pages.

* In allmodex, make all drawing functions that accept a page number
  accept -1, which would automatically swap between page 1 and page 2
* Make the "page" argument default to -1 for all drawing functions.
* Update all code that draws to dpage so that it no longer needs to pass 
dpage
* Now vpage and dpage can cease to be globals, and can become local to 
allmodex. This will mean that all double-buffer flipping will be 
localized to allmodex, so it will be easy to factor out, or move to 
backends, or whatever is best.
* Remaining code that works with pages 2 and 3 can be changed to 
allocate pages as needed.
* No more screen page numbers!

The above plan is subject to revision depending on what makes sense, and 
will be implemented on a schedule of 
when-I-feel-motivated-and-have-nothing-better-to-do :)

Anyway, back on the subject of gfx_sdl, I'm not making it default or 
anything like that, but I will be testing it a lot myself, so hopefully 
I will spot any unintended consequences of my recent changes.

Good luck with exams!

---
James Paige




More information about the Ohrrpgce mailing list