From: Michael H. <mh...@us...> - 2000-10-14 19:37:28
|
Update of /cvsroot/pythianproject/PythianProject/Source/Units In directory slayer.i.sourceforge.net:/tmp/cvs-serv16116 Modified Files: glfd.pas Log Message: bug fixes Index: glfd.pas =================================================================== RCS file: /cvsroot/pythianproject/PythianProject/Source/Units/glfd.pas,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** glfd.pas 2000/10/13 19:28:28 1.1 --- glfd.pas 2000/10/14 19:37:24 1.2 *************** *** 3,6 **** --- 3,31 ---- interface + { + ============================================================================== + | GLF Library + | Version 1.0 (Release) + | + | Author: Roman Podobedov + | Email: ro...@ut... + | WEB: www.ut.ee/~romka + | Date: 17 August 2000 + | + | Copyright (C) 2000, Romka Graphics + | This library is freely distributable without any license or permissions. + | You can use this library in any program (commercial, educational + | or individual), but in each program, where You use this library, You + | should to keep this header (author name and coordinates)! + ============================================================================== + + Translation to Delphi: + - Kamil Krauspe (main guy) + - Michael Hearn (minor changes) + + For the Pythian Project + } + + uses Windows, SysUtils, OpenGL; *************** *** 43,47 **** procedure glfDrawWiredString(s: string); //* Draw wired string */ procedure glfDrawSolidSymbol(s: Char); //* Draw solid symbol */ ! procedure glfDrawSolidString(s: string); //* Draw wired string */ procedure glfDraw3DWiredSymbol(s: Char); //* Draw 3D wired symbol */ procedure glfDraw3DWiredString(s: string); //* Draw 3D wired string */ --- 68,72 ---- procedure glfDrawWiredString(s: string); //* Draw wired string */ procedure glfDrawSolidSymbol(s: Char); //* Draw solid symbol */ ! procedure glfDrawSolidString(s: string); //* Draw solid string */ procedure glfDraw3DWiredSymbol(s: Char); //* Draw 3D wired symbol */ procedure glfDraw3DWiredString(s: string); //* Draw 3D wired string */ *************** *** 163,173 **** conCursorCount: Integer; //* Console cursor blink counter */ // is OK??? procedure anchor_proc(var x, y: Single; aap: Integer); begin case aap of ! GLF_LEFT_UP: begin x := x + 1; y := y - 1; end; GLF_LEFT_CENTER: x := x + 1; ! GLF_LEFT_DOWN: begin x := x + 1; y := y + 1; end; GLF_CENTER_UP: y := y - 1; GLF_CENTER_DOWN: y := y + 1; --- 188,200 ---- conCursorCount: Integer; //* Console cursor blink counter */ + // is OK??? + // @@mike - GLF_LEFT_UP: changed 1 to 2. Probably should do the same for GLF_LEFT_DOWN procedure anchor_proc(var x, y: Single; aap: Integer); begin case aap of ! GLF_LEFT_UP: begin x := x + 1; y := y - 2; end; GLF_LEFT_CENTER: x := x + 1; ! GLF_LEFT_DOWN: begin x := x + 1; y := y + 2; end; GLF_CENTER_UP: y := y - 1; GLF_CENTER_DOWN: y := y + 1; *************** *** 190,193 **** --- 217,224 ---- FillChar(contouring_color, SizeOf(TRGBAColor), 0); SetLength(conData, 0); + // @@mike - added to set to GLF defaults + glfSetSymbolSpace(0.2); + glfSetSpaceSize(2.0); + glfSetSymbolDepth(0.2); glfSetConsoleParam(40, 20); glfConsoleClear; *************** *** 360,364 **** if fonts[i] <> nil then begin ! FreeAndNil(fonts[i]); end; end; --- 391,397 ---- if fonts[i] <> nil then begin ! // @@mike - FreeAndNil? Don't know about that one. ! //FreeAndNil(fonts[i]); ! Dispose(fonts[i]); fonts[i] := nil; end; end; *************** *** 379,389 **** if fonts[curfont]^.symbols[i] <> nil then begin ! FreeAndNil(fonts[curfont]^.symbols[i]^.vdata); ! FreeAndNil(fonts[curfont]^.symbols[i]^.fdata); ! FreeAndNil(fonts[curfont]^.symbols[i]^.ldata); ! FreeAndNil(fonts[curfont]^.symbols[i]); end; ! FreeAndNil(fonts[curfont]); curfont := -1; Result := GLF_OK; --- 412,426 ---- if fonts[curfont]^.symbols[i] <> nil then begin ! //FreeAndNil(fonts[curfont]^.symbols[i]^.vdata); ! fonts[curfont]^.symbols[i]^.vdata := nil; ! //FreeAndNil(fonts[curfont]^.symbols[i]^.fdata); ! fonts[curfont]^.symbols[i]^.fdata := nil; ! //FreeAndNil(fonts[curfont]^.symbols[i]^.ldata); ! fonts[curfont]^.symbols[i]^.ldata := nil; ! //FreeAndNil(fonts[curfont]^.symbols[i]); ! Dispose(fonts[curfont]^.symbols[i]); fonts[curfont]^.symbols[i] := nil; end; ! Dispose(fonts[curfont]); fonts[curfont] := nil; curfont := -1; Result := GLF_OK; |