aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code/Classes/UTexture.pas (follow)
Commit message (Collapse)AuthorAgeFilesLines
* final removal of Macresources, indentationk-m_schindler2008-05-241-39/+45
| | | | git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1134 b956fd51-792f-4845-bead-9b4dfca2ff2c
* unused variables removed, nicer code, eol-style set to nativek-m_schindler2008-05-211-129/+125
| | | | git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1115 b956fd51-792f-4845-bead-9b4dfca2ff2c
* MacResources commented out for now, property eol-style set to nativek-m_schindler2008-05-161-0/+3
| | | | git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1105 b956fd51-792f-4845-bead-9b4dfca2ff2c
* - bugfix: LoadTexture() did not initialize the TTexture result before it was ↵tobigun2008-05-141-65/+67
| | | | | | | | returned in an error case, so for example the TexNum field was set to some undefined result. This bugfix also fixes the videoBG whitescreen bug. Probably it is better to convert TTexture from a record to a class, so we can do the initialization stuff in a constructor and free assigned textures (TexNum) in the destructor with glDeleteTextures. This may help with theme-switching too. - added glext in UVideo.pas for GL_BGR, needed for accelerated colorspace conversion with swscale. This is disabled by default because it did not speed up that much in windows (also it was not slower). In Linux it seems to speeds up very well. 3ms instead of 7ms per frame. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1091 b956fd51-792f-4845-bead-9b4dfca2ff2c
* cleanuptobigun2008-05-131-12/+2
| | | | git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1086 b956fd51-792f-4845-bead-9b4dfca2ff2c
* Replaced OpenGL12 with SDL's gl/glu/glext units because OpenGL12 was removed ↵tobigun2008-05-021-9/+12
| | | | | | | | from SDL (several years ago? Last update was done in 2004). In addition OpenGL12 was very buggy (see last commit). The new units support OpenGL up to version 2.0 (extensions must be loaded first, see UGraphic.LoadOpenGLExtensions). At the moment, only 1.2 extensions are loaded. Some constants, that were introduced in OpenGL 1.2 and above (like GL_BGR or GL_CLAMP_TO_EDGE) are in glext.pas, so check this file first for missing constants. The MacOS build depends on OpenGL12.pas but has its own file in the MacOSX/Wrapper folder instead of using the JEDI-SDL one. Sorry, that I broke MacOSX build for now but it should be no problem to get this working again. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1052 b956fd51-792f-4845-bead-9b4dfca2ff2c
* - title-bar icon working again in windowed modetobigun2008-04-301-993/+874
| | | | | | | | - moved LoadImage to UImage.pas - added RWopsFromStream() to get an SDL RWops handle from a TStream - removed some German comments git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1041 b956fd51-792f-4845-bead-9b4dfca2ff2c
* Fixed some range-check errors. Explicitly disable range-checks {$R-} should ↵tobigun2008-04-301-991/+991
| | | | | | | | | not be necessary for the MacOSX build anymore. Note: Texture-numbers (e.g. texnum) are unsigned (GLuint) so do not init them to -1. Use 0 instead. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1040 b956fd51-792f-4845-bead-9b4dfca2ff2c
* - reverted some stuff that was erroneously commited by one of the last commits.tobigun2008-04-241-45/+6
| | | | | | | | | - moved DEBUG define from config-*.inc back to switches.inc - APPTYPE is needed by FPC (for Windows) too. Fixed some crashes with Writeln in FPC (Win) if no console is available. - Moved thread-safe ULog.SafeWriteln() to UCommon.ConsoleWriteln(), this is used by DebugWriteln() now, so this is thread-safe too - Added log-levels (sorted by severity): DEBUG, INFO, STATUS, WARN, ERROR, CRITICAL. Default log-level is LOG_LEVEL_ERROR, so warnings and less important logs are not printed by default. You can change this by LOG_LEVEL_DEFAULT or Log.SetLogLevel(Level). Please use Log.LogError/Warn/Status/Info/Debug/... instead of DebugWriteln() to avoid spamming the console. See ULog.pas for further info. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1036 b956fd51-792f-4845-bead-9b4dfca2ff2c
* tried to make songloading working with the old loader and keep all changes ↵s_alexander2008-04-191-47/+126
| | | | | | | | | | | that were made since starting to work on a new one *hope that worked* you may delete your existing cover.cache (the cover cache is still NOT working) git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1024 b956fd51-792f-4845-bead-9b4dfca2ff2c
* - Removed lrs resource usage in linux. Resources are copied to ↵tobigun2008-04-071-118/+43
| | | | | | | | | | /usr/share/resources now. - Unified resource handling: call GetResourceStream (UCommon) to retrieve a resource. - Removed the lazarus dependency in the Makefile (it will also use the main .dpr-file now) - Now that the lazarus dependency is gone, the MacOSX and Linux version might use a shared codebase. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1013 b956fd51-792f-4845-bead-9b4dfca2ff2c
* New Covers.Cache Texture loading finishedwhiteshark02008-04-061-27/+114
| | | | | | There is some bug rescaling the textures, but i'm not sure where. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1010 b956fd51-792f-4845-bead-9b4dfca2ff2c
* - removed (linux incompatible) PngImage. In addition it was rather outdated ↵tobigun2008-04-061-47/+8
| | | | | | | | | | | (from 2003, newest version is from 2006) - introduced UImage-unit for JPG/PNG/BMP image saving - the png part uses the libpng12-0.dll (part of SDL_Image) so - the jpg part uses either Delphi's Jpeg unit or FPC's base/pasjpeg unit -> so no additional libs are needed. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1007 b956fd51-792f-4845-bead-9b4dfca2ff2c
* removed lazarus dependenciestobigun2008-04-061-8/+6
| | | | | | | | | | | | - added an implementation of AllocateHWnd/DeallocateHWnd to UCommon for the Win32 only units DirWatch and Midi... (do not use AllocateHWnd somewhere else) - added an own implementation of ShowMessage to UCommon (uses MessageBox in Windows, console-output otherwise) - linux still needs lresources for the lrs-file (will be removed soon) - the FPC windows version uses windows resources now (instead of lrs ones). compile them with windres (in FPC's "bin" dir) or delphi (a batch-file for windres will follow soon) - changed path-separator from '\' to '/' in RC-file for windres compatibility git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1006 b956fd51-792f-4845-bead-9b4dfca2ff2c
* UTexture not committed correctlywhiteshark02008-04-041-81/+48
| | | | git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1002 b956fd51-792f-4845-bead-9b4dfca2ff2c
* shortened Log Outputb1indy2008-04-011-2/+2
| | | | git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@995 b956fd51-792f-4845-bead-9b4dfca2ff2c
* ColorizePixel now uses fixed point mathb1indy2008-03-311-42/+77
| | | | git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@993 b956fd51-792f-4845-bead-9b4dfca2ff2c
* Now colorized textures are appended to the TTextureDatabase too. This will ↵tobigun2008-03-311-16/+54
| | | | | | | | prevent USDX from loading textures for buttons, statics etc. multiple times. This saves approx. 100MB of memory (100MB instead of 200MB, which is still too many) and speeds-up the loading process (starts in 3-6secs now instead of 12secs). git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@992 b956fd51-792f-4845-bead-9b4dfca2ff2c
* Removed unused Format-parameter in LoadTexture() and Add...()tobigun2008-03-311-9/+9
| | | | git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@990 b956fd51-792f-4845-bead-9b4dfca2ff2c
* beep() removedtobigun2008-03-311-7/+2
| | | | git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@989 b956fd51-792f-4845-bead-9b4dfca2ff2c
* - removed "Font Black" and "Font" texture typetobigun2008-03-311-138/+128
| | | | | | | | - use TEXTURE_TYPE_TRANSPARENT/COLORIZED/PLAIN in the future - texture-type is an enum now (not a string as before) -> pros: less memory consumption, compiler-check, case-insensitive, ... git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@988 b956fd51-792f-4845-bead-9b4dfca2ff2c
* - Select(Slide) textures should work now ('Font Black' -> 'Colorized')tobigun2008-03-281-306/+89
| | | | | | | | - Added constants for texture types (TEXTURE_TYPE_PLAIN/TEXTURE_TYPE_TRANSPARENT/TEXTURE_TYPE_COLORIZED) - RGBFloatToInt() helper function - rgb2hls clean-up (it is not even hls, it is hsv) git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@980 b956fd51-792f-4845-bead-9b4dfca2ff2c
* Fixed some warnings ("missing result-values", "0 instead of nil", ↵tobigun2008-03-091-2/+2
| | | | | | "comparison is always true", "range check errors") git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@947 b956fd51-792f-4845-bead-9b4dfca2ff2c
* Fixed compilation on Mac OS X (XCode).eddie-08152008-02-241-2/+2
| | | | git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@885 b956fd51-792f-4845-bead-9b4dfca2ff2c
* Fixed a compiler error: "FindDiskFileCaseInsensitive() is unknown". tobigun2008-02-151-1/+1
| | | | | | | jaybinks: did you forget to commit any changes? As a quick fix I commented this out because it is just used in a log-output. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@858 b956fd51-792f-4845-bead-9b4dfca2ff2c
* Fixed popUpBg image not displaying in game.jaybinks2008-02-131-1145/+1174
| | | | | | | | | | | this was not so much a problem with loading this type of texture, more so it was the fact that the file name had incorrect capitialization in the theme.ini file causing the png file to be not found on *nix systems. Ive implemented a workaround that will solve this without the theme files needing to be changed. so the game is now tolerant of themes having incorrect case in the filenames. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@849 b956fd51-792f-4845-bead-9b4dfca2ff2c
* TTexture.Z was never initialized (TTextureUnit.LoadTexture). In FPC (not in ↵tobigun2008-01-281-1144/+1145
| | | | | | delphi) this resulted in a floating-point error when calling glVertex3f(x1, y1, z) in DrawTexture (UDrawTexture.pas) git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@807 b956fd51-792f-4845-bead-9b4dfca2ff2c
* fixed a "typo"b1indy2007-12-221-1/+1
| | | | git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@740 b956fd51-792f-4845-bead-9b4dfca2ff2c
* removed a bunch of debugging from usdx startup.jaybinks2007-12-201-1/+1
| | | | git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@738 b956fd51-792f-4845-bead-9b4dfca2ff2c
* Added a missing override for the destroy-destructortobigun2007-12-181-1/+1
| | | | git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@730 b956fd51-792f-4845-bead-9b4dfca2ff2c
* checking for delta=0 in col2hb1indy2007-11-231-0/+2
| | | | git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@652 b956fd51-792f-4845-bead-9b4dfca2ff2c
* Added MacResources.pas. Fixed some resource loading issues on OS X. The main ↵eddie-08152007-11-041-1139/+1142
| | | | | | screen is still not loading. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@581 b956fd51-792f-4845-bead-9b4dfca2ff2c
* Changed DELPHI define to IFDEF LAZARUS ... ELSE ... ENDIF. This should work ↵eddie-08152007-11-031-36/+32
| | | | | | on all Platforms now (I hope). git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@564 b956fd51-792f-4845-bead-9b4dfca2ff2c
* Windows Lazarus Build working again...jaybinks2007-11-031-1143/+1143
| | | | | | | | | Lazarus Project file includes the DPR, so that we have a unified Uses Clause ( keep this in mind please ) added "Delphi" to switches git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@560 b956fd51-792f-4845-bead-9b4dfca2ff2c
* fixed failed buildsjaybinks2007-11-011-0/+4
| | | | | | | | | | | | | | build:USDX-LAZLIN-75 build:USDX-LAZLIN-76 for some reason we can not use {$MODE Delphi} in an included file. ( Probably because of the way the compier scopes this switch to each pas file ) ive had to revert this part of eddies changes. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@548 b956fd51-792f-4845-bead-9b4dfca2ff2c
* Mac OS X version compiles and links. I hope I didn't break too many files on ↵eddie-08152007-11-011-8/+4
| | | | | | | | | | windows/linux. Added switches.inc to all files. Changed many IFDEFs. For Windows-only code please use MSWINDOWS instead of WIN32 now. WIN32 is also used by the Mac port. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@546 b956fd51-792f-4845-bead-9b4dfca2ff2c
* fixed some stuff for linux build...jaybinks2007-10-081-22/+14
| | | | | | | | | now its getting close to the look of the windows build... YAY ! see http://www.flickr.com/photos/31428768@N00/sets/72157602234125005/ git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@468 b956fd51-792f-4845-bead-9b4dfca2ff2c
* git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@461 ↵jaybinks2007-10-021-1/+1
| | | | b956fd51-792f-4845-bead-9b4dfca2ff2c
* Fixed linux compilation.jaybinks2007-10-021-1098/+1151
| | | | | | | | | | | | | Linux is now running in the main loop fine. * no audio playback or input yet... * Timing hack inplace.. that must be replace * bunch of textures not working.. however the play screen is looking similar to windows builds. I hope this dosnt break windows builds to much. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@460 b956fd51-792f-4845-bead-9b4dfca2ff2c
* fixed credits screen in lazarus build.jaybinks2007-09-301-1/+1
| | | | | | | ( now looks and operates the same as delphi build ) git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@450 b956fd51-792f-4845-bead-9b4dfca2ff2c
* small fixes for lazarus build.jaybinks2007-09-291-1/+2
| | | | | | cleanup on some code. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@445 b956fd51-792f-4845-bead-9b4dfca2ff2c
* Loading of Covers should now work (should be tested)b1indy2007-09-271-31/+91
| | | | git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@441 b956fd51-792f-4845-bead-9b4dfca2ff2c
* fixed song loading in Lazarus..jaybinks2007-09-241-5/+6
| | | | | | | cant assume variables are initialized as 0 :) in UFile "Done: byte;" was no initialized on lazarus compiler. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@431 b956fd51-792f-4845-bead-9b4dfca2ff2c
* minor bug fixes to have lazarus build load resources into SDL_Image jaybinks2007-09-221-78/+172
| | | | | | | | | correctly... ( lazarus Resources are weak compared to delphi :( ) also Laz build will now run, and main loop works properly. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@429 b956fd51-792f-4845-bead-9b4dfca2ff2c
* first try to load textures with SDL_Imageb1indy2007-09-211-561/+381
| | | | | | | | | | supported texture types are: Plain, Transparent and Colorized (textures in the resource file must be typed TEX) everything else (Font Black, ...) is not implemented. So beware - it looks really broken. There seems to be a problem with The covers - I just didn't understand, what's going on there. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@428 b956fd51-792f-4845-bead-9b4dfca2ff2c
* Adding new Resource compiler for lazarus projects..jaybinks2007-09-201-8/+14
| | | | | | | | | | | (other one did not name resources correctly) this resource compiler could be expanded by someone to Parse Ultrastar.rc and compile the lrs file, rather than having it hardcoded in USDXResCompiler other changes, include ability to read the Resource String properly in code generated by lazarus. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@422 b956fd51-792f-4845-bead-9b4dfca2ff2c
* tidy texture loading.jaybinks2007-09-201-7/+10
| | | | git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@421 b956fd51-792f-4845-bead-9b4dfca2ff2c
* remove loggingjaybinks2007-09-201-11/+4
| | | | git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@420 b956fd51-792f-4845-bead-9b4dfca2ff2c
* fixed nasty bug I introduced... jaybinks2007-09-201-5/+18
| | | | | | sorry.. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@419 b956fd51-792f-4845-bead-9b4dfca2ff2c
* started re-factoring TTextureUnit.LoadTexturejaybinks2007-09-201-31/+38
| | | | | | | | only done BPM and JPEG for now. will do more as I add support for it to lazarus. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@418 b956fd51-792f-4845-bead-9b4dfca2ff2c