diff options
Diffstat (limited to '')
-rw-r--r-- | src/lib/freetype/demo/engine-test.bdsproj | 175 | ||||
-rw-r--r-- | src/lib/freetype/demo/engine-test.dpr | 338 | ||||
-rw-r--r-- | src/lib/freetype/demo/engine-test.lpi | 182 | ||||
-rw-r--r-- | src/lib/freetype/demo/nehe/lesson43.bdsproj | 175 | ||||
-rw-r--r-- | src/lib/freetype/demo/nehe/lesson43.dpr | 289 | ||||
-rw-r--r-- | src/lib/freetype/demo/nehe/readme.txt | 9 | ||||
-rw-r--r-- | src/lib/freetype/demo/switches.inc | 1 |
7 files changed, 0 insertions, 1169 deletions
diff --git a/src/lib/freetype/demo/engine-test.bdsproj b/src/lib/freetype/demo/engine-test.bdsproj deleted file mode 100644 index e5b3e97d..00000000 --- a/src/lib/freetype/demo/engine-test.bdsproj +++ /dev/null @@ -1,175 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?>
-<BorlandProject>
- <PersonalityInfo>
- <Option>
- <Option Name="Personality">Delphi.Personality</Option>
- <Option Name="ProjectType">VCLApplication</Option>
- <Option Name="Version">1.0</Option>
- <Option Name="GUID">{41656F26-D552-4948-B9DB-E184B77C3993}</Option>
- </Option>
- </PersonalityInfo>
- <Delphi.Personality>
- <Source>
- <Source Name="MainSource">engine-test.dpr</Source>
- </Source>
- <FileVersion>
- <FileVersion Name="Version">7.0</FileVersion>
- </FileVersion>
- <Compiler>
- <Compiler Name="A">8</Compiler>
- <Compiler Name="B">0</Compiler>
- <Compiler Name="C">1</Compiler>
- <Compiler Name="D">1</Compiler>
- <Compiler Name="E">0</Compiler>
- <Compiler Name="F">0</Compiler>
- <Compiler Name="G">1</Compiler>
- <Compiler Name="H">1</Compiler>
- <Compiler Name="I">1</Compiler>
- <Compiler Name="J">0</Compiler>
- <Compiler Name="K">0</Compiler>
- <Compiler Name="L">1</Compiler> - <Compiler Name="M">0</Compiler> - <Compiler Name="N">1</Compiler> - <Compiler Name="O">1</Compiler> - <Compiler Name="P">1</Compiler> - <Compiler Name="Q">0</Compiler> - <Compiler Name="R">0</Compiler> - <Compiler Name="S">0</Compiler>
- <Compiler Name="T">0</Compiler>
- <Compiler Name="U">0</Compiler>
- <Compiler Name="V">1</Compiler>
- <Compiler Name="W">0</Compiler>
- <Compiler Name="X">1</Compiler>
- <Compiler Name="Y">1</Compiler>
- <Compiler Name="Z">1</Compiler>
- <Compiler Name="ShowHints">True</Compiler>
- <Compiler Name="ShowWarnings">True</Compiler>
- <Compiler Name="UnitAliases">WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;</Compiler>
- <Compiler Name="NamespacePrefix"></Compiler>
- <Compiler Name="GenerateDocumentation">False</Compiler>
- <Compiler Name="DefaultNamespace"></Compiler>
- <Compiler Name="SymbolDeprecated">True</Compiler>
- <Compiler Name="SymbolLibrary">True</Compiler>
- <Compiler Name="SymbolPlatform">True</Compiler>
- <Compiler Name="SymbolExperimental">True</Compiler>
- <Compiler Name="UnitLibrary">True</Compiler>
- <Compiler Name="UnitPlatform">True</Compiler>
- <Compiler Name="UnitDeprecated">True</Compiler>
- <Compiler Name="UnitExperimental">True</Compiler>
- <Compiler Name="HResultCompat">True</Compiler>
- <Compiler Name="HidingMember">True</Compiler>
- <Compiler Name="HiddenVirtual">True</Compiler>
- <Compiler Name="Garbage">True</Compiler>
- <Compiler Name="BoundsError">True</Compiler>
- <Compiler Name="ZeroNilCompat">True</Compiler>
- <Compiler Name="StringConstTruncated">True</Compiler>
- <Compiler Name="ForLoopVarVarPar">True</Compiler>
- <Compiler Name="TypedConstVarPar">True</Compiler>
- <Compiler Name="AsgToTypedConst">True</Compiler>
- <Compiler Name="CaseLabelRange">True</Compiler>
- <Compiler Name="ForVariable">True</Compiler>
- <Compiler Name="ConstructingAbstract">True</Compiler>
- <Compiler Name="ComparisonFalse">True</Compiler>
- <Compiler Name="ComparisonTrue">True</Compiler>
- <Compiler Name="ComparingSignedUnsigned">True</Compiler>
- <Compiler Name="CombiningSignedUnsigned">True</Compiler>
- <Compiler Name="UnsupportedConstruct">True</Compiler>
- <Compiler Name="FileOpen">True</Compiler>
- <Compiler Name="FileOpenUnitSrc">True</Compiler>
- <Compiler Name="BadGlobalSymbol">True</Compiler>
- <Compiler Name="DuplicateConstructorDestructor">True</Compiler>
- <Compiler Name="InvalidDirective">True</Compiler>
- <Compiler Name="PackageNoLink">True</Compiler>
- <Compiler Name="PackageThreadVar">True</Compiler>
- <Compiler Name="ImplicitImport">True</Compiler>
- <Compiler Name="HPPEMITIgnored">True</Compiler>
- <Compiler Name="NoRetVal">True</Compiler>
- <Compiler Name="UseBeforeDef">True</Compiler>
- <Compiler Name="ForLoopVarUndef">True</Compiler>
- <Compiler Name="UnitNameMismatch">True</Compiler>
- <Compiler Name="NoCFGFileFound">True</Compiler>
- <Compiler Name="ImplicitVariants">True</Compiler>
- <Compiler Name="UnicodeToLocale">True</Compiler>
- <Compiler Name="LocaleToUnicode">True</Compiler>
- <Compiler Name="ImagebaseMultiple">True</Compiler>
- <Compiler Name="SuspiciousTypecast">True</Compiler>
- <Compiler Name="PrivatePropAccessor">True</Compiler>
- <Compiler Name="UnsafeType">False</Compiler>
- <Compiler Name="UnsafeCode">False</Compiler>
- <Compiler Name="UnsafeCast">False</Compiler>
- <Compiler Name="OptionTruncated">True</Compiler>
- <Compiler Name="WideCharReduced">True</Compiler>
- <Compiler Name="DuplicatesIgnored">True</Compiler>
- <Compiler Name="UnitInitSeq">True</Compiler>
- <Compiler Name="LocalPInvoke">True</Compiler>
- <Compiler Name="MessageDirective">True</Compiler>
- <Compiler Name="CodePage"></Compiler>
- </Compiler>
- <Linker>
- <Linker Name="MapFile">0</Linker>
- <Linker Name="OutputObjs">0</Linker>
- <Linker Name="GenerateHpps">False</Linker>
- <Linker Name="ConsoleApp">1</Linker>
- <Linker Name="DebugInfo">False</Linker>
- <Linker Name="RemoteSymbols">False</Linker>
- <Linker Name="GenerateDRC">False</Linker>
- <Linker Name="MinStackSize">16384</Linker>
- <Linker Name="MaxStackSize">1048576</Linker>
- <Linker Name="ImageBase">4194304</Linker>
- <Linker Name="ExeDescription"></Linker>
- </Linker>
- <Directories>
- <Directories Name="OutputDir"></Directories>
- <Directories Name="UnitOutputDir"></Directories>
- <Directories Name="PackageDLLOutputDir"></Directories>
- <Directories Name="PackageDCPOutputDir"></Directories>
- <Directories Name="SearchPath">..\..\JEDI-SDL\SDL\Pas</Directories>
- <Directories Name="Packages">vclx;vcl;rtl;vclactnband</Directories>
- <Directories Name="Conditionals"></Directories>
- <Directories Name="DebugSourceDirs"></Directories>
- <Directories Name="UsePackages">False</Directories>
- </Directories>
- <Parameters>
- <Parameters Name="RunParams"></Parameters>
- <Parameters Name="HostApplication"></Parameters>
- <Parameters Name="Launcher"></Parameters>
- <Parameters Name="UseLauncher">False</Parameters>
- <Parameters Name="DebugCWD"></Parameters>
- <Parameters Name="Debug Symbols Search Path"></Parameters>
- <Parameters Name="LoadAllSymbols">True</Parameters>
- <Parameters Name="LoadUnspecifiedSymbols">False</Parameters>
- </Parameters>
- <Language>
- <Language Name="ActiveLang"></Language>
- <Language Name="ProjectLang">$00000000</Language>
- <Language Name="RootDir"></Language>
- </Language>
- <VersionInfo>
- <VersionInfo Name="IncludeVerInfo">False</VersionInfo>
- <VersionInfo Name="AutoIncBuild">False</VersionInfo>
- <VersionInfo Name="MajorVer">1</VersionInfo>
- <VersionInfo Name="MinorVer">0</VersionInfo>
- <VersionInfo Name="Release">0</VersionInfo>
- <VersionInfo Name="Build">0</VersionInfo>
- <VersionInfo Name="Debug">False</VersionInfo>
- <VersionInfo Name="PreRelease">False</VersionInfo>
- <VersionInfo Name="Special">False</VersionInfo>
- <VersionInfo Name="Private">False</VersionInfo>
- <VersionInfo Name="DLL">False</VersionInfo>
- <VersionInfo Name="Locale">1031</VersionInfo>
- <VersionInfo Name="CodePage">1252</VersionInfo>
- </VersionInfo>
- <VersionInfoKeys>
- <VersionInfoKeys Name="CompanyName"></VersionInfoKeys>
- <VersionInfoKeys Name="FileDescription"></VersionInfoKeys>
- <VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys>
- <VersionInfoKeys Name="InternalName"></VersionInfoKeys>
- <VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys>
- <VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys>
- <VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys>
- <VersionInfoKeys Name="ProductName"></VersionInfoKeys>
- <VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys>
- <VersionInfoKeys Name="Comments"></VersionInfoKeys>
- </VersionInfoKeys>
- </Delphi.Personality>
-</BorlandProject>
diff --git a/src/lib/freetype/demo/engine-test.dpr b/src/lib/freetype/demo/engine-test.dpr deleted file mode 100644 index bbd7d890..00000000 --- a/src/lib/freetype/demo/engine-test.dpr +++ /dev/null @@ -1,338 +0,0 @@ -program engine_test; -(* - * This code was created by Jeff Molofee '99 - * (ported to Linux/SDL by Ti Leggett '01) - * - * If you've found this code useful, please let me know. - * - * Visit Jeff at http://nehe.gamedev.net/ - * - * or for port-specific comments, questions, bugreports etc. - * email to leggett@eecs.tulane.edu - *) - -{$IFDEF FPC} - {$mode delphi}{$H+} -{$ENDIF} - -{$APPTYPE Console} - -uses - moduleloader in '../../JEDI-SDL/SDL/Pas/moduleloader.pas', - SDL in '../../JEDI-SDL/SDL/Pas/sdl.pas', - gl in '../../JEDI-SDL/OpenGL/Pas/gl.pas', - glext in '../../JEDI-SDL/OpenGL/Pas/glext.pas', - glu in '../../JEDI-SDL/OpenGL/Pas/glu.pas', - {$IFNDEF FPC} - ctypes in '../../ctypes/ctypes.pas', - {$ENDIF} - FreeType in '../freetype.pas', - UFont in 'UFont.pas', - //UFont in '../../../base/UFont.pas', - UUnicodeUtils in '../../../base/UUnicodeUtils.pas', - math, - sysutils; - -const - // screen width, height, and bit depth - SCREEN_WIDTH = 640; - SCREEN_HEIGHT = 480; - SCREEN_BPP = 16; - - //FONT_FILE = 'Test.ttf'; - //FONT_FILE = 'C:/Windows/Fonts/Arial.ttf'; - //FONT_FILE = 'C:/Windows/Fonts/SimSun.ttf'; - //FONT_FILE = 'eurostarregularextended.ttf'; - FONT_FILE = '../../../../game/fonts/FreeSans/FreeSans.ttf'; - -var - OurFont: TScalableFont; - // This is our SDL surface - surface: PSDL_Surface; - cnt1, cnt2: GLfloat; - -(* function to release/destroy our resources and restoring the old desktop *) -procedure Quit(returnCode: integer); -begin - OurFont.Free; - - // clean up the window - SDL_Quit( ); - - // and exit appropriately - Halt( returnCode ); -end; - -(* function to reset our viewport after a window resize *) -function resizeWindow(width: integer; height: integer): boolean; -begin - // Protect against a divide by zero - if ( height = 0 ) then - height := 1; - - // Setup our viewport. - glViewport( 0, 0, GLsizei(width), GLsizei(height) ); - - // change to the projection matrix and set our viewing volume. - glMatrixMode( GL_PROJECTION ); - glLoadIdentity( ); - - // Set our perspective - //gluOrtho2D(0, width, 0, height); - gluOrtho2D(0, 800, 0, 600); - - // Make sure we're chaning the model view and not the projection - glMatrixMode( GL_MODELVIEW ); - - // Reset The View - glLoadIdentity( ); - - Result := true; -end; - -(* function to handle key press events *) -procedure handleKeyPress(keysym: PSDL_keysym); -begin - case ( keysym^.sym ) of - SDLK_ESCAPE: - begin - // ESC key was pressed - Quit( 0 ); - end; - SDLK_F1: - begin - // F1 key was pressed - // this toggles fullscreen mode - SDL_WM_ToggleFullScreen( surface ); - end; - end; -end; - -(* general OpenGL initialization function *) -function initGL(): boolean; -begin - // Enable smooth shading - glShadeModel( GL_SMOOTH ); - - // Set the background black - //glClearColor( 1, 1, 1.0, 1.0 ); - //glClearColor( 0.3, 0.7, 1.0, 1.0 ); - glClearColor( 0.0, 0.0, 0.0, 1.0 ); - - // Depth buffer setup - glClearDepth( 1.0 ); - - // Enables Depth Testing - glEnable( GL_DEPTH_TEST ); - - // The Type Of Depth Test To Do - glDepthFunc( GL_LEQUAL ); - - // Really Nice Perspective Calculations - glHint( GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST ); - - OurFont := TFTScalableFont.Create(FONT_FILE, 64, 0.03); - //OurFont := TFTFont.Create(FONT_FILE, 128); - //OurFont := TFTScalableOutlineFont.Create(FONT_FILE, 64, 0.03); - //OurFont.UseKerning := false; - //TFTScalableOutlineFont(OurFont).SetOutlineColor(1, 0, 0, 1); - //OurFont := TOutlineFont.Create(FONT_FILE, 32, 2); - //OurFont.LineSpacing := OurFont.LineSpacing * 0.5; - - Result := true; -end; - -var - NextTime: cardinal; - Counter: integer; - -type - TVector4d = array[0..3] of GLdouble; - -function NewVector4d(a, b, c, d: GLdouble): TVector4d; -begin - Result[0] := a; - Result[1] := b; - Result[2] := c; - Result[3] := d; -end; - -(* Here goes our drawing code *) -function drawGLScene(): boolean; -var - msg: WideString; - bounds: TBoundsDbl; -begin - glClear(GL_COLOR_BUFFER_BIT or GL_DEPTH_BUFFER_BIT); // Clear Screen And Depth Buffer - - //msg := 'Here'#13'there'#13'be'#13#13'newlines'#13'.'; - //msg := 'Here'#13'newlines'; - msg := 'Active FreeType Text - ' + FloatToStr(cnt1); - //msg := 'Hören'#13'其自诞生至今'#13'спецификация'; - - // Red text - glLoadIdentity(); - glTranslatef(cnt2, 240, 0); - if (cnt2 > 800) then - cnt2 := 0; - glTranslatef(30, 40, 0); - //glTranslatef(320, 240, 0); - //glRotatef(cnt1, 0, 0, 1); - //glScalef(1, 0.8 + 0.3*cos(cnt1/5), 1); - - OurFont.Style := [Italic, {Underline,} Reflect]; - //OurFont.GlyphSpacing := 10; - //OurFont.SetOutlineColor(0.5, 0.5, 0.5); - //OurFont.ReflectionSpacing := -4; - //OurFont.UseKerning := false; - OurFont.Height := 150;//cnt2; - //OurFont.Reset; - //OurFont.Aspect := 2; - - glColor3f(1, 1, 0); - bounds := OurFont.BBox(msg); - //glRectf(bounds.Left, OurFont.Ascender, bounds.Right, OurFont.Ascender-OurFont.Height); - - glColor4f(1, 1, 1, 1); - //OurFont.ReflectionSpacing := 0; - OurFont.Print(msg); - - cnt1 := cnt1 + 0.051; // Increase The First Counter - cnt2 := cnt2 + 0.005; // Increase The First Counter - - SDL_GL_SwapBuffers( ); - - Inc(Counter); - - if (NextTime < SDL_GetTicks()) then - begin - NextTime := SDL_GetTicks() + 2000; - writeln('FPS: ' + floattostr(Counter / 2.0)); - Counter := 0; - end; - - Result := true; -end; - -var - // Flags to pass to SDL_SetVideoMode - videoFlags: integer; - // main loop variable - done: boolean = false; - // used to collect events - event: TSDL_Event; - // this holds some info about our display - videoInfo: PSDL_VideoInfo; - // whether or not the window is active - isActive: boolean = true; - -begin - // initialize SDL - if ( SDL_Init( SDL_INIT_VIDEO or SDL_INIT_TIMER ) < 0 ) then - begin - writeln( ErrOutput, 'Video initialization failed: ' + SDL_GetError() ); - Quit( 1 ); - end; - - // Fetch the video info - videoInfo := SDL_GetVideoInfo( ); - - if ( videoInfo = nil ) then - begin - writeln( ErrOutput, 'Video query failed: ' + SDL_GetError() ); - Quit( 1 ); - end; - - SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER, 1 ); // Enable double buffering - - // the flags to pass to SDL_SetVideoMode - videoFlags := SDL_OPENGL; // Enable OpenGL in SDL - videoFlags := videoFlags or SDL_HWPALETTE; // Store the palette in hardware - videoFlags := videoFlags or SDL_RESIZABLE; // Enable window resizing - - // This checks to see if surfaces can be stored in memory - if ( videoInfo^.hw_available <> 0 ) then - videoFlags := videoFlags or SDL_HWSURFACE - else - videoFlags := videoFlags or SDL_SWSURFACE; - - // This checks if hardware blits can be done - if ( videoInfo^.blit_hw <> 0 ) then - videoFlags := videoFlags or SDL_HWACCEL; - - // Sets up OpenGL double buffering - SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER, 1 ); - - // get a SDL surface - surface := SDL_SetVideoMode( SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_BPP, - videoFlags ); - - // Verify there is a surface - if ( surface = nil ) then - begin - writeln( ErrOutput, 'Video mode set failed: ' + SDL_GetError() ); - Quit( 1 ); - end; - - // initialize OpenGL - initGL(); - - // resize the initial window - resizeWindow( SCREEN_WIDTH, SCREEN_HEIGHT ); - - // wait for events - while ( not done ) do - begin - { handle the events in the queue } - - while ( SDL_PollEvent( @event ) <> 0 ) do - begin - case( event.type_ ) of - SDL_ACTIVEEVENT: - begin - // Something's happend with our focus - // If we are iconified, we shouldn't draw the screen - if ( (event.active.state and SDL_APPACTIVE) <> 0 ) then - begin - if ( event.active.gain = 0 ) then - isActive := false - else - isActive := true; - end; - end; - SDL_VIDEORESIZE: - begin - // handle resize event - {$IFDEF UNIX} - surface := SDL_SetVideoMode( event.resize.w, - event.resize.h, - 16, videoFlags ); - if ( surface = nil ) then - begin - writeln( ErrOutput, 'Could not get a surface after resize: ' + SDL_GetError( ) ); - Quit( 1 ); - end; - {$ENDIF} - resizeWindow( event.resize.w, event.resize.h ); - end; - SDL_KEYDOWN: - begin - // handle key presses - handleKeyPress( @event.key.keysym ); - end; - SDL_QUITEV: - begin - // handle quit requests - done := true; - end; - end; - end; - - // draw the scene - if ( isActive ) then - drawGLScene( ); - end; - - // clean ourselves up and exit - Quit( 0 ); -end. diff --git a/src/lib/freetype/demo/engine-test.lpi b/src/lib/freetype/demo/engine-test.lpi deleted file mode 100644 index 45483a56..00000000 --- a/src/lib/freetype/demo/engine-test.lpi +++ /dev/null @@ -1,182 +0,0 @@ -<?xml version="1.0"?>
-<CONFIG>
- <ProjectOptions>
- <PathDelim Value="\"/>
- <Version Value="6"/>
- <General>
- <MainUnit Value="0"/>
- <IconPath Value=".\"/>
- <TargetFileExt Value=""/>
- <ActiveEditorIndexAtStart Value="0"/>
- </General>
- <VersionInfo>
- <ProjectVersion Value=""/>
- <Language Value=""/>
- <CharSet Value=""/>
- </VersionInfo>
- <PublishOptions>
- <Version Value="2"/>
- <DestinationDirectory Value="$(TestDir)\publishedproject\"/>
- <IgnoreBinaries Value="False"/>
- <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
- <ExcludeFileFilter Value="*.(bak|ppu|ppw|o|so);*~;backup"/>
- </PublishOptions>
- <RunParams>
- <local>
- <FormatVersion Value="1"/>
- <LaunchingApplication PathPlusParams="\usr\X11R6\bin\xterm -T 'Lazarus Run Output' -e $(LazarusDir)\tools\runwait.sh $(TargetCmdLine)"/>
- </local>
- </RunParams>
- <Units Count="16">
- <Unit0> - <Filename Value="engine-test.dpr"/> - <IsPartOfProject Value="True"/> - <CursorPos X="18" Y="25"/> - <TopLine Value="1"/> - <EditorIndex Value="0"/> - <UsageCount Value="72"/> - <Loaded Value="True"/> - </Unit0>
- <Unit1>
- <Filename Value="JEDI-SDL\OpenGL\Pas\opengl12.pas"/>
- <UnitName Value="opengl12"/>
- <CursorPos X="20" Y="9922"/>
- <TopLine Value="9889"/>
- <UsageCount Value="5"/>
- </Unit1>
- <Unit2>
- <Filename Value="JEDI-SDL\SDL\Pas\sdl.pas"/>
- <UnitName Value="sdl"/>
- <CursorPos X="29" Y="3569"/>
- <TopLine Value="3547"/>
- <UsageCount Value="5"/>
- </Unit2>
- <Unit3>
- <Filename Value="FreeType.pas"/>
- <UnitName Value="FreeType"/>
- <CursorPos X="6" Y="1"/>
- <TopLine Value="1"/>
- <UsageCount Value="5"/>
- </Unit3>
- <Unit4>
- <Filename Value="UFreeType.pas"/>
- <UnitName Value="UFreeType"/>
- <CursorPos X="47" Y="111"/>
- <TopLine Value="76"/>
- <UsageCount Value="35"/>
- </Unit4>
- <Unit5>
- <Filename Value="freetype"/>
- <CursorPos X="1" Y="1"/>
- <TopLine Value="1"/>
- <UsageCount Value="8"/>
- <SyntaxHighlighter Value="None"/>
- </Unit5>
- <Unit6>
- <Filename Value="freetype\freetype.pas"/>
- <UnitName Value="freetype"/>
- <CursorPos X="31" Y="807"/>
- <TopLine Value="14"/>
- <UsageCount Value="15"/>
- </Unit6>
- <Unit7>
- <Filename Value="..\..\daten\Projekte\UltraStarDX\trunk\Game\Code\lib\ffmpeg\avcodec.pas"/>
- <UnitName Value="avcodec"/>
- <CursorPos X="1" Y="38"/>
- <TopLine Value="1"/>
- <UsageCount Value="6"/>
- </Unit7>
- <Unit8>
- <Filename Value="..\..\JEDI-SDL\OpenGL\Pas\gl.pas"/>
- <UnitName Value="gl"/>
- <CursorPos X="2" Y="89"/>
- <TopLine Value="69"/>
- <UsageCount Value="9"/>
- </Unit8>
- <Unit9>
- <Filename Value="..\..\ctypes\ctypes.pas"/>
- <UnitName Value="ctypes"/>
- <CursorPos X="8" Y="25"/>
- <TopLine Value="51"/>
- <UsageCount Value="9"/>
- </Unit9>
- <Unit10>
- <Filename Value="..\..\JEDI-SDL\OpenGL\Pas\glu.pas"/>
- <UnitName Value="glu"/>
- <CursorPos X="14" Y="155"/>
- <TopLine Value="135"/>
- <UsageCount Value="9"/>
- </Unit10>
- <Unit11>
- <Filename Value="..\..\JEDI-SDL\SDL\Pas\sdl.pas"/>
- <UnitName Value="sdl"/>
- <CursorPos X="12" Y="1418"/>
- <TopLine Value="1398"/>
- <UsageCount Value="9"/>
- </Unit11>
- <Unit12>
- <Filename Value="..\freetype.pas"/>
- <UnitName Value="freetype"/>
- <CursorPos X="3" Y="1985"/>
- <TopLine Value="1965"/>
- <UsageCount Value="10"/>
- </Unit12>
- <Unit13>
- <Filename Value="C:\Programme\lazarus\fpc\2.2.0\source\rtl\objpas\classes\classesh.inc"/>
- <CursorPos X="13" Y="26"/>
- <TopLine Value="6"/>
- <UsageCount Value="13"/>
- </Unit13>
- <Unit14>
- <Filename Value="C:\Programme\lazarus\fpc\2.2.0\source\rtl\objpas\types.pp"/>
- <UnitName Value="types"/>
- <CursorPos X="7" Y="105"/>
- <TopLine Value="73"/>
- <UsageCount Value="12"/>
- </Unit14>
- <Unit15>
- <Filename Value="UFont.pas"/>
- <UnitName Value="UFont"/>
- <CursorPos X="15" Y="1752"/>
- <TopLine Value="1734"/>
- <UsageCount Value="10"/> - </Unit15> - </Units> - <JumpHistory Count="2" HistoryIndex="1"> - <Position1> - <Filename Value="engine-test.dpr"/> - <Caret Line="52" Column="10" TopLine="37"/> - </Position1> - <Position2> - <Filename Value="engine-test.dpr"/> - <Caret Line="1" Column="1" TopLine="1"/> - </Position2> - </JumpHistory> - </ProjectOptions> - <CompilerOptions> - <Version Value="8"/> - <PathDelim Value="\"/>
- <SearchPaths>
- <IncludeFiles Value="..\..\JEDI-SDL\SDL\Pas\"/>
- </SearchPaths>
- <Other>
- <CompilerPath Value="$(CompPath)"/>
- </Other>
- </CompilerOptions>
- <Debugging>
- <BreakPoints Count="1">
- <Item1>
- <Source Value="lesson43.dpr"/>
- <Line Value="138"/>
- </Item1>
- </BreakPoints>
- <Exceptions Count="2">
- <Item1>
- <Name Value="ECodetoolError"/>
- </Item1>
- <Item2>
- <Name Value="EFOpenError"/>
- </Item2>
- </Exceptions>
- </Debugging>
-</CONFIG>
diff --git a/src/lib/freetype/demo/nehe/lesson43.bdsproj b/src/lib/freetype/demo/nehe/lesson43.bdsproj deleted file mode 100644 index 9d3851c4..00000000 --- a/src/lib/freetype/demo/nehe/lesson43.bdsproj +++ /dev/null @@ -1,175 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?>
-<BorlandProject>
- <PersonalityInfo>
- <Option>
- <Option Name="Personality">Delphi.Personality</Option>
- <Option Name="ProjectType">VCLApplication</Option>
- <Option Name="Version">1.0</Option>
- <Option Name="GUID">{3306FA70-362B-4647-A969-BCEA731F436C}</Option>
- </Option>
- </PersonalityInfo>
- <Delphi.Personality>
- <Source>
- <Source Name="MainSource">lesson43.dpr</Source>
- </Source>
- <FileVersion>
- <FileVersion Name="Version">7.0</FileVersion>
- </FileVersion>
- <Compiler>
- <Compiler Name="A">8</Compiler>
- <Compiler Name="B">0</Compiler>
- <Compiler Name="C">1</Compiler>
- <Compiler Name="D">1</Compiler>
- <Compiler Name="E">0</Compiler>
- <Compiler Name="F">0</Compiler>
- <Compiler Name="G">1</Compiler>
- <Compiler Name="H">1</Compiler>
- <Compiler Name="I">1</Compiler>
- <Compiler Name="J">0</Compiler>
- <Compiler Name="K">0</Compiler>
- <Compiler Name="L">1</Compiler>
- <Compiler Name="M">0</Compiler>
- <Compiler Name="N">1</Compiler>
- <Compiler Name="O">1</Compiler>
- <Compiler Name="P">1</Compiler>
- <Compiler Name="Q">0</Compiler>
- <Compiler Name="R">0</Compiler>
- <Compiler Name="S">0</Compiler>
- <Compiler Name="T">0</Compiler>
- <Compiler Name="U">0</Compiler>
- <Compiler Name="V">1</Compiler>
- <Compiler Name="W">0</Compiler>
- <Compiler Name="X">1</Compiler>
- <Compiler Name="Y">1</Compiler>
- <Compiler Name="Z">1</Compiler>
- <Compiler Name="ShowHints">True</Compiler>
- <Compiler Name="ShowWarnings">True</Compiler>
- <Compiler Name="UnitAliases">WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;</Compiler>
- <Compiler Name="NamespacePrefix"></Compiler>
- <Compiler Name="GenerateDocumentation">False</Compiler>
- <Compiler Name="DefaultNamespace"></Compiler>
- <Compiler Name="SymbolDeprecated">True</Compiler>
- <Compiler Name="SymbolLibrary">True</Compiler>
- <Compiler Name="SymbolPlatform">True</Compiler>
- <Compiler Name="SymbolExperimental">True</Compiler>
- <Compiler Name="UnitLibrary">True</Compiler>
- <Compiler Name="UnitPlatform">True</Compiler>
- <Compiler Name="UnitDeprecated">True</Compiler>
- <Compiler Name="UnitExperimental">True</Compiler>
- <Compiler Name="HResultCompat">True</Compiler>
- <Compiler Name="HidingMember">True</Compiler>
- <Compiler Name="HiddenVirtual">True</Compiler>
- <Compiler Name="Garbage">True</Compiler>
- <Compiler Name="BoundsError">True</Compiler>
- <Compiler Name="ZeroNilCompat">True</Compiler>
- <Compiler Name="StringConstTruncated">True</Compiler>
- <Compiler Name="ForLoopVarVarPar">True</Compiler>
- <Compiler Name="TypedConstVarPar">True</Compiler>
- <Compiler Name="AsgToTypedConst">True</Compiler>
- <Compiler Name="CaseLabelRange">True</Compiler>
- <Compiler Name="ForVariable">True</Compiler>
- <Compiler Name="ConstructingAbstract">True</Compiler>
- <Compiler Name="ComparisonFalse">True</Compiler>
- <Compiler Name="ComparisonTrue">True</Compiler>
- <Compiler Name="ComparingSignedUnsigned">True</Compiler>
- <Compiler Name="CombiningSignedUnsigned">True</Compiler>
- <Compiler Name="UnsupportedConstruct">True</Compiler>
- <Compiler Name="FileOpen">True</Compiler>
- <Compiler Name="FileOpenUnitSrc">True</Compiler>
- <Compiler Name="BadGlobalSymbol">True</Compiler>
- <Compiler Name="DuplicateConstructorDestructor">True</Compiler>
- <Compiler Name="InvalidDirective">True</Compiler>
- <Compiler Name="PackageNoLink">True</Compiler>
- <Compiler Name="PackageThreadVar">True</Compiler>
- <Compiler Name="ImplicitImport">True</Compiler>
- <Compiler Name="HPPEMITIgnored">True</Compiler>
- <Compiler Name="NoRetVal">True</Compiler>
- <Compiler Name="UseBeforeDef">True</Compiler>
- <Compiler Name="ForLoopVarUndef">True</Compiler>
- <Compiler Name="UnitNameMismatch">True</Compiler>
- <Compiler Name="NoCFGFileFound">True</Compiler>
- <Compiler Name="ImplicitVariants">True</Compiler>
- <Compiler Name="UnicodeToLocale">True</Compiler>
- <Compiler Name="LocaleToUnicode">True</Compiler>
- <Compiler Name="ImagebaseMultiple">True</Compiler>
- <Compiler Name="SuspiciousTypecast">True</Compiler>
- <Compiler Name="PrivatePropAccessor">True</Compiler>
- <Compiler Name="UnsafeType">False</Compiler>
- <Compiler Name="UnsafeCode">False</Compiler>
- <Compiler Name="UnsafeCast">False</Compiler>
- <Compiler Name="OptionTruncated">True</Compiler>
- <Compiler Name="WideCharReduced">True</Compiler>
- <Compiler Name="DuplicatesIgnored">True</Compiler>
- <Compiler Name="UnitInitSeq">True</Compiler>
- <Compiler Name="LocalPInvoke">True</Compiler>
- <Compiler Name="MessageDirective">True</Compiler>
- <Compiler Name="CodePage"></Compiler>
- </Compiler>
- <Linker>
- <Linker Name="MapFile">0</Linker>
- <Linker Name="OutputObjs">0</Linker>
- <Linker Name="GenerateHpps">False</Linker>
- <Linker Name="ConsoleApp">1</Linker>
- <Linker Name="DebugInfo">False</Linker>
- <Linker Name="RemoteSymbols">False</Linker>
- <Linker Name="GenerateDRC">False</Linker>
- <Linker Name="MinStackSize">16384</Linker>
- <Linker Name="MaxStackSize">1048576</Linker>
- <Linker Name="ImageBase">4194304</Linker>
- <Linker Name="ExeDescription"></Linker>
- </Linker>
- <Directories>
- <Directories Name="OutputDir"></Directories>
- <Directories Name="UnitOutputDir"></Directories>
- <Directories Name="PackageDLLOutputDir"></Directories>
- <Directories Name="PackageDCPOutputDir"></Directories>
- <Directories Name="SearchPath">../../../JEDI-SDL/SDL/Pas</Directories>
- <Directories Name="Packages"></Directories>
- <Directories Name="Conditionals"></Directories>
- <Directories Name="DebugSourceDirs"></Directories>
- <Directories Name="UsePackages">False</Directories>
- </Directories>
- <Parameters>
- <Parameters Name="RunParams"></Parameters>
- <Parameters Name="HostApplication"></Parameters>
- <Parameters Name="Launcher"></Parameters>
- <Parameters Name="UseLauncher">False</Parameters>
- <Parameters Name="DebugCWD"></Parameters>
- <Parameters Name="Debug Symbols Search Path"></Parameters>
- <Parameters Name="LoadAllSymbols">True</Parameters>
- <Parameters Name="LoadUnspecifiedSymbols">False</Parameters>
- </Parameters>
- <Language>
- <Language Name="ActiveLang"></Language>
- <Language Name="ProjectLang">$00000000</Language>
- <Language Name="RootDir"></Language>
- </Language>
- <VersionInfo>
- <VersionInfo Name="IncludeVerInfo">False</VersionInfo>
- <VersionInfo Name="AutoIncBuild">False</VersionInfo>
- <VersionInfo Name="MajorVer">1</VersionInfo>
- <VersionInfo Name="MinorVer">0</VersionInfo>
- <VersionInfo Name="Release">0</VersionInfo>
- <VersionInfo Name="Build">0</VersionInfo>
- <VersionInfo Name="Debug">False</VersionInfo>
- <VersionInfo Name="PreRelease">False</VersionInfo>
- <VersionInfo Name="Special">False</VersionInfo>
- <VersionInfo Name="Private">False</VersionInfo>
- <VersionInfo Name="DLL">False</VersionInfo>
- <VersionInfo Name="Locale">1031</VersionInfo>
- <VersionInfo Name="CodePage">1252</VersionInfo>
- </VersionInfo>
- <VersionInfoKeys>
- <VersionInfoKeys Name="CompanyName"></VersionInfoKeys>
- <VersionInfoKeys Name="FileDescription"></VersionInfoKeys>
- <VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys>
- <VersionInfoKeys Name="InternalName"></VersionInfoKeys>
- <VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys>
- <VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys>
- <VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys>
- <VersionInfoKeys Name="ProductName"></VersionInfoKeys>
- <VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys>
- <VersionInfoKeys Name="Comments"></VersionInfoKeys>
- </VersionInfoKeys>
- </Delphi.Personality>
-</BorlandProject>
diff --git a/src/lib/freetype/demo/nehe/lesson43.dpr b/src/lib/freetype/demo/nehe/lesson43.dpr deleted file mode 100644 index fe296fb5..00000000 --- a/src/lib/freetype/demo/nehe/lesson43.dpr +++ /dev/null @@ -1,289 +0,0 @@ -program lesson43; -(* - * This code was created by Jeff Molofee '99 - * (ported to Linux/SDL by Ti Leggett '01) - * - * If you've found this code useful, please let me know. - * - * Visit Jeff at http://nehe.gamedev.net/ - * - * or for port-specific comments, questions, bugreports etc. - * email to leggett@eecs.tulane.edu - *) - -{$IFDEF FPC} - {$mode delphi}{$H+} -{$ENDIF} - -{$APPTYPE Console} - -uses - moduleloader in '../../../JEDI-SDL/SDL/Pas/moduleloader.pas', - SDL in '../../../JEDI-SDL/SDL/Pas/sdl.pas', - gl in '../../../JEDI-SDL/OpenGL/Pas/gl.pas', - glu in '../../../JEDI-SDL/OpenGL/Pas/glu.pas', - ctypes in '../../../ctypes/ctypes.pas', - FreeType in '../../freetype.pas', - UFreeType in 'UFreeType.pas', - math, - sysutils; - -const - // screen width, height, and bit depth - SCREEN_WIDTH = 640; - SCREEN_HEIGHT = 480; - SCREEN_BPP = 16; - -var - our_font: TFontData; - // This is our SDL surface - surface: PSDL_Surface; - cnt1, cnt2: GLfloat; - -(* function to release/destroy our resources and restoring the old desktop *) -procedure Quit(returnCode: integer); -begin - // clean up the window - SDL_Quit( ); - - // and exit appropriately - Halt( returnCode ); -end; - -(* function to reset our viewport after a window resize *) -function resizeWindow(width: integer; height: integer): boolean; -var - // Height / width ration - ratio: GLfloat; -begin - // Protect against a divide by zero - if ( height = 0 ) then - height := 1; - - ratio := width / height; - - // Setup our viewport. - glViewport( 0, 0, GLsizei(width), GLsizei(height) ); - - // change to the projection matrix and set our viewing volume. - glMatrixMode( GL_PROJECTION ); - glLoadIdentity( ); - - // Set our perspective - gluPerspective( 45.0, ratio, 0.1, 100.0 ); - - // Make sure we're chaning the model view and not the projection - glMatrixMode( GL_MODELVIEW ); - - // Reset The View - glLoadIdentity( ); - - Result := true; -end; - -(* function to handle key press events *) -procedure handleKeyPress(keysym: PSDL_keysym); -begin - case ( keysym^.sym ) of - SDLK_ESCAPE: - begin - // ESC key was pressed - Quit( 0 ); - end; - SDLK_F1: - begin - // F1 key was pressed - // this toggles fullscreen mode - SDL_WM_ToggleFullScreen( surface ); - end; - end; -end; - -(* general OpenGL initialization function *) -function initGL(): boolean; -begin - // Enable smooth shading - glShadeModel( GL_SMOOTH ); - - // Set the background black - glClearColor( 0.0, 0.0, 0.0, 0.0 ); - - // Depth buffer setup - glClearDepth( 1.0 ); - - // Enables Depth Testing - glEnable( GL_DEPTH_TEST ); - - // The Type Of Depth Test To Do - glDepthFunc( GL_LEQUAL ); - - // Really Nice Perspective Calculations - glHint( GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST ); - - our_font := TFontData.Create('Test.ttf', 16); - - Result := true; -end; - -(* Here goes our drawing code *) -function drawGLScene(): boolean; -begin - glClear(GL_COLOR_BUFFER_BIT or GL_DEPTH_BUFFER_BIT); // Clear Screen And Depth Buffer - glLoadIdentity(); // Reset The Current Modelview Matrix - glTranslatef(0.0, 0.0, -1.0); // Move One Unit Into The Screen - - // Blue Text - glColor3ub(0, 0, $ff); - - // Position The WGL Text On The Screen - glRasterPos2f(-0.40, 0.35); - - // Here We Print Some Text Using Our FreeType Font - // The only really important command is the actual print() call, - // but for the sake of making the results a bit more interesting - // I have put in some code to rotate and scale the text. - - // Red text - glColor3ub($ff, 0, 0); - - glPushMatrix(); - glLoadIdentity(); - glRotatef(cnt1, 0, 0,1); - glScalef(1, 0.8 + 0.3*cos(cnt1/5) ,1); - glTranslatef(-180, 0, 0); - TFreeType.print(our_font, 320, 240, 'Active FreeType Text - ' + FloatToStr(cnt1)); - glPopMatrix(); - - //Uncomment this to test out print's ability to handle newlines. - //TFreeType.print(our_font, 320, 200, 'Here'#13'there'#13'be'#13#13'newlines'#13'.'); - - cnt1 := cnt1 + 0.051; // Increase The First Counter - cnt2 := cnt2 + 0.005; // Increase The First Counter - - SDL_GL_SwapBuffers( ); - - Result := true; -end; - -var - // Flags to pass to SDL_SetVideoMode - videoFlags: integer; - // main loop variable - done: boolean = false; - // used to collect events - event: TSDL_Event; - // this holds some info about our display - videoInfo: PSDL_VideoInfo; - // whether or not the window is active - isActive: boolean = true; - -begin - // initialize SDL - if ( SDL_Init( SDL_INIT_VIDEO ) < 0 ) then - begin - writeln( ErrOutput, 'Video initialization failed: ' + SDL_GetError() ); - Quit( 1 ); - end; - - // Fetch the video info - videoInfo := SDL_GetVideoInfo( ); - - if ( videoInfo = nil ) then - begin - writeln( ErrOutput, 'Video query failed: ' + SDL_GetError() ); - Quit( 1 ); - end; - - SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER, 1 ); // Enable double buffering - - // the flags to pass to SDL_SetVideoMode - videoFlags := SDL_OPENGL; // Enable OpenGL in SDL - videoFlags := videoFlags or SDL_HWPALETTE; // Store the palette in hardware - videoFlags := videoFlags or SDL_RESIZABLE; // Enable window resizing - - // This checks to see if surfaces can be stored in memory - if ( videoInfo^.hw_available <> 0 ) then - videoFlags := videoFlags or SDL_HWSURFACE - else - videoFlags := videoFlags or SDL_SWSURFACE; - - // This checks if hardware blits can be done - if ( videoInfo^.blit_hw <> 0 ) then - videoFlags := videoFlags or SDL_HWACCEL; - - // Sets up OpenGL double buffering - SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER, 1 ); - - // get a SDL surface - surface := SDL_SetVideoMode( SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_BPP, - videoFlags ); - - // Verify there is a surface - if ( surface = nil ) then - begin - writeln( ErrOutput, 'Video mode set failed: ' + SDL_GetError() ); - Quit( 1 ); - end; - - // initialize OpenGL - initGL(); - - // resize the initial window - resizeWindow( SCREEN_WIDTH, SCREEN_HEIGHT ); - - // wait for events - while ( not done ) do - begin - { handle the events in the queue } - - while ( SDL_PollEvent( @event ) <> 0 ) do - begin - case( event.type_ ) of - SDL_ACTIVEEVENT: - begin - // Something's happend with our focus - // If we are iconified, we shouldn't draw the screen - if ( (event.active.state and SDL_APPACTIVE) <> 0 ) then - begin - if ( event.active.gain = 0 ) then - isActive := false - else - isActive := true; - end; - end; - SDL_VIDEORESIZE: - begin - // handle resize event - {$IFDEF UNIX} - surface := SDL_SetVideoMode( event.resize.w, - event.resize.h, - 16, videoFlags ); - if ( surface = nil ) then - begin - writeln( ErrOutput, 'Could not get a surface after resize: ' + SDL_GetError( ) ); - Quit( 1 ); - end; - {$ENDIF} - resizeWindow( event.resize.w, event.resize.h ); - end; - SDL_KEYDOWN: - begin - // handle key presses - handleKeyPress( @event.key.keysym ); - end; - SDL_QUITEV: - begin - // handle quit requests - done := true; - end; - end; - end; - - // draw the scene - if ( isActive ) then - drawGLScene( ); - end; - - // clean ourselves up and exit - Quit( 0 ); -end. diff --git a/src/lib/freetype/demo/nehe/readme.txt b/src/lib/freetype/demo/nehe/readme.txt deleted file mode 100644 index 1186ef0e..00000000 --- a/src/lib/freetype/demo/nehe/readme.txt +++ /dev/null @@ -1,9 +0,0 @@ -Pascal conversion of the NeHe tutorial lesson 43 (Tutorial on using FreeType Fonts in OpenGL) -http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=43 - -Put the following DLLs into this directory: -- libfreetype-6.dll -- SDL.dll -- zlib1.dll - -and copy a TrueType font to this directory and rename it into "Test.ttf". diff --git a/src/lib/freetype/demo/switches.inc b/src/lib/freetype/demo/switches.inc deleted file mode 100644 index 0a940004..00000000 --- a/src/lib/freetype/demo/switches.inc +++ /dev/null @@ -1 +0,0 @@ -{$DEFINE FREETYPE_DEMO} |