Doom III ".proc" map loader

Hitting the very limits of my Gf2MX:
Multi colored lights, each one casting shadows

Slow like hell on my GF2MX (like Doom3 in the same condition =)

                           

With soft shadows

         

First shots

             

Source code removed. It was too crappy.

, the .proc text file format is basically:
//several models defined like this:
model { "name" int_number_of_surfaces
    { "shader_name" int_number_of_vertices int_number_of_indexes
        ( x y z dS dT nx ny nz ) //a vertex structure, repeated int_number_of_vertices times
        p1 p2 p3 p1 p2 p3... //int_number_of_indexes indexes. Each group of 3 define a triangle
    }
}
// (no strip, no fans, just plain triangles)
// A model called "_area" something defines an area used for culling using portals

// Portals
interAreaPortals { nb_areas nb_portal
// Portals seem to always be quads.
    nbvertex area1 area2 ( x y z ) ...
}
// Nodes
nodes { nb_node
    ( x y z d ) child1 child2
}
//Other stuff about shadow volumes

Nodes define something like a bsp tree, to quickly know in which area a point is (for example: the camera).
To render the level: