3DZ!Studio Beta M Patch
==================

This patch add the following features:
* Automatic Normal Calculation - Just open and save the plane. All textured polygons will have they normal recalculated.
* Internal Drivers to 3DFX Banshee/Voodoo3/4/5;
* Test BST/Rendering Sequence - <F9> key - This draws your model using the stored Rendering Sequence. Please note this version NOT fixes bad issues. The next version  of 3dz!Studio will do it. Press <D> to have a some more nfo about the current model, saved in the files:
       * dumpin.txt    - the element data about the last modelloaded;
       * MeshTable.txt - enumerates the meshes of the last loaded model;  
       * RenderSeq.txt - shows the rendering sequence of the last loaded model;
       * BSPDebug.txt  - shows elements draw and not draw, of the last loaded model, using the aboce RenderSeq.txt info.Press <D> to have this file, and exit the editor. 


[code]
      TRSTable1=Record
        Back,
        front:byte;
        end;

      TRSTable=Record
        Entry1,Entry2:byte;
        MAX:integer;
        RS:array[0..255] of TRSTable1;
        end;
Procedure SetRSTable;
var i,iseq,NEle:integer;
begin
Fillchar(RSTable,SizeOf(RSTable),$FF); // just for safe ;)
with RSTable,b3dz do begin
  NEle  := _header._ele;
  Entry1:= _seq[0];            // _seq holds the RS values
  Entry2:= _seq[1];            // Entry1 and Entry2 holds the 2 first bytes of RS
  Max   := (_header._ele-1);   

  for I:=0 to (NEle-1) do begin
      iseq:=i*2+2;
      RS[i].front  := _seq[iseq];
      RS[i].back   := _seq[Iseq+1];
  end;//for
end;//with
end; // procedure SetRSTAble

Procedure DisplayBSP(B:longint);
var yt:integer;
begin
if (B<>255) then begin

        if IsVisible(B)  then
                begin
                DisplayBSP(RSTable.RS[B].back);
                SmallDraw(MeshTable[B].inicio,MeshTable[B].Fim);
                DisplayBSP(RSTable.RS[B].front);
                end
        else
                begin
                DisplayBSP(RSTable.RS[B].front);
        // the next line is not needed since the polygon is not visible ;)
// DISABLED ;)   SmallDraw(MeshTable[B].inicio,Meshtable[B].fim); 
                 DisplayBSP(RSTable.RS[B].back);
                end;


end; // iff
end; //procedure DisplayBSP

I like to say a big Thank You to 
Paulo Morais, Cordlein and Cap. Manduca. Your comments, info and cool stuff made this patch possible.

Alessandro Borges 
July/2001