[aquaria] Unofficial PSP port

Andrew Church achurch+aquaria at achurch.org
Thu Jun 17 20:50:45 EDT 2010

>I don't understand the strange effect that is present on the game (see 
>my second screenshot). It seems like there is a "layer" on top of the 
>game screen that avoid to show the game..

There are some "overlay" layers used for things like fadeouts and the
"red-out" effect when Naija is low on health.  It's always possible that
your GL implementation isn't processing alpha correctly for those quads.

>> Beyond that, you'll probably have to dive into the actual rendering code
>> and insert some test GL calls to locate the problem.
>But where? i'm trying to follow the flow that starts to ::addTexture but 
>is not so simply..

The basic rendering flow goes like this:

Core::render() {  // Called from main loop
   for (r = each render layer) {  // See "enum Layers" in DSQ.h
      for (pass = each pass in r) {  // Some layers have multiple passes
         for (robj = each RenderObject in r) {
            robj->render() {  // May be overridden, e.g. by Quad
               if (this RenderObject is visible) {
                  this->onRender();  // Virtual method for actual rendering

Most RenderObjects are also Quads, so you may want to drop some debugging
code into Quad::onRender() and see what's going on.  You could also try
disabling specific layers in Core::render() -- after this line:
    int i = renderObjectLayerOrder[c];
add something like
    if (i == 67) continue;  // 67 == LR_OVERLAY (count lines from LR_ZERO)
to disable a layer and see how that changes the output.

  --Andrew Church
    achurch at achurch.org

More information about the aquaria mailing list