aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code/Classes/UCommon.pas (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Reordering of the directories[1]: moving Game/Code to srck-m_schindler2008-08-271-774/+0
| | | | git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1302 b956fd51-792f-4845-bead-9b4dfca2ff2c
* FPC 2.2.2 compatibility fix.tobigun2008-08-251-19/+6
| | | | | | setlocale in the clocale unit is not available in the interface section as expected, just in the implementation-section, so it cannot be used. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1288 b956fd51-792f-4845-bead-9b4dfca2ff2c
* warnings suppressedtobigun2008-08-081-0/+4
| | | | git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1235 b956fd51-792f-4845-bead-9b4dfca2ff2c
* somw warnings removedtobigun2008-08-081-0/+4
| | | | git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1231 b956fd51-792f-4845-bead-9b4dfca2ff2c
* moved AllocateHWnd/DeallocateHWnd from UCommon.pas to WinAllocation.pas. Do ↵tobigun2008-08-061-89/+0
| | | | | | NOT use them in USDX code. They are just by the DirWatch and Midi... libs in FPC (Windows). git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1224 b956fd51-792f-4845-bead-9b4dfca2ff2c
* fpc 2.2.2 fix, clocale is not available for windowstobigun2008-07-211-0/+2
| | | | git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1218 b956fd51-792f-4845-bead-9b4dfca2ff2c
* Audio/Video engine update:tobigun2008-07-021-1/+60
| | | | | | | | | | | | | | | - lyrics<->audio synchronisation (TSyncSource) - better resampling (optional support for libsamplerate) - cleaner termination of audio/video streams/devices - improved decoders and decoder infrastructure - many other improvements/cleanups Currently just for testing (not enabled by default): - Background music - Voice-Passthrough (hear what you sing) - Video VSync git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1157 b956fd51-792f-4845-bead-9b4dfca2ff2c
* Delphi 7 compatibility fix:tobigun2008-06-161-15/+38
| | | | | | | - "in"-operator does not work with WideChar operands, e.g. "mychar in ['a..z'] - FPC_VERSION/RELEASE/PATCH (e.g. {$IF FPC_VERSION > 2}) must be defined as constants because delphi 7 does not care about {$IFDEF FPC} sections and complains about undefined constant expressions. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1150 b956fd51-792f-4845-bead-9b4dfca2ff2c
* code improvement: conversion of case statements to boolean assignmentsk-m_schindler2008-06-141-30/+11
| | | | git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1149 b956fd51-792f-4845-bead-9b4dfca2ff2c
* corrected String index to start from 1 and not from 0k-m_schindler2008-06-131-4/+4
| | | | git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1146 b956fd51-792f-4845-bead-9b4dfca2ff2c
* - all references to the libc unit removed. The Libc unit (not the library) ↵tobigun2008-06-091-6/+18
| | | | | | | | | was for kylix compatibility and should not be used anymore. In addition it seems the libc unit is not available on 64bit systems. - added some functions that will be introduced with FPC 2.2.2 git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1145 b956fd51-792f-4845-bead-9b4dfca2ff2c
* - set svn:eol-style to nativetobigun2008-06-081-791/+791
| | | | | | - removed some svn:executable properties from non-executable files git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1144 b956fd51-792f-4845-bead-9b4dfca2ff2c
* inconsistent line endings unifiedtobigun2008-06-081-3/+3
| | | | git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1143 b956fd51-792f-4845-bead-9b4dfca2ff2c
* Change IFDEF LINUX to UNIX in order to include darwink-m_schindler2008-05-161-3/+3
| | | | git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1101 b956fd51-792f-4845-bead-9b4dfca2ff2c
* Update to Bass 2.4. Do not forget to replace the old with the new dll.tobigun2008-05-101-3/+16
| | | | git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1080 b956fd51-792f-4845-bead-9b4dfca2ff2c
* added "inherited ..." to all constructors to assure that the base-class ↵tobigun2008-05-081-2/+2
| | | | | | | | constructor is called. Different to C or Java, the constructor or destructor of the base class (except that of TObject) is not called by default if "inherited ..." is not given (very strange). This is no problem with classes inherited directly from TObject, because the TObject constructor is always called (and sets the values of the fields to 0-values) but i added inherited to these constructors too because the base class may change from TObject to something different and the "inherited" will probably not added in this case and causing problems. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1070 b956fd51-792f-4845-bead-9b4dfca2ff2c
* SDL-free implementation of ConsoleWriteLn. The handler for thread-safe ↵tobigun2008-04-301-19/+19
| | | | | | console output is created in the initialization section of ucommon.pas. At this time SDL is not yet initialized. Normally this is not necessary for threading and synchronization functions but who knows. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1047 b956fd51-792f-4845-bead-9b4dfca2ff2c
* - title-bar icon working again in windowed modetobigun2008-04-301-3/+72
| | | | | | | | - 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-1/+1
| | | | | | | | | 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
* - Fixed several bugs with tabbed browsing (Tabs: on) which occurred after ↵tobigun2008-04-271-0/+87
| | | | | | | | | | TSong was changed from a record to a class. - Replaced BubbleSort with MergeSort for song sorting (QuickSort is not applicable here because it is instable) - Added a constructor to TSong for Category-Buttons (this is a bad solution because category-buttons are not songs, a common super-class TCatItem would be nicer) - Some cleanup git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1039 b956fd51-792f-4845-bead-9b4dfca2ff2c
* - reverted some stuff that was erroneously commited by one of the last commits.tobigun2008-04-241-470/+622
| | | | | | | | | - 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
* SSE floating-point-exception (FPE) fix. Occured when playing ogg-files or ↵tobigun2008-04-221-4/+121
| | | | | | with projectM. See UCommon.pas for more information. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1034 b956fd51-792f-4845-bead-9b4dfca2ff2c
* - Removed lrs resource usage in linux. Resources are copied to ↵tobigun2008-04-071-300/+353
| | | | | | | | | | /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
* removed lazarus dependenciestobigun2008-04-061-293/+300
| | | | | | | | | | | | - 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
* Fixed compilation on the mac.eddie-08152008-03-251-281/+293
| | | | git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@972 b956fd51-792f-4845-bead-9b4dfca2ff2c
* Added functions to determine to which character-class (alpha(=letter), ↵tobigun2008-03-221-1/+65
| | | | | | numeric, punctuation etc.) a character belongs. Neither delphi's nor fpc's RTL (in contrast to Java) has such a function, has it? git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@968 b956fd51-792f-4845-bead-9b4dfca2ff2c
* - actual.. -> current..tobigun2008-03-031-0/+2
| | | | | | | | - USDX version-numbers in UConfig - some windows/lclintf dependencies removed - some indentation git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@898 b956fd51-792f-4845-bead-9b4dfca2ff2c
* Changed Platform from Interface to Class.eddie-08152007-11-201-89/+3
| | | | | | | Added TerminateIfAlreadyRunning and GetGamePath to UPlatform.pas. Fixed a bug in THookManager.Create ("SpacetoAllocate-1"). git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@617 b956fd51-792f-4845-bead-9b4dfca2ff2c
* Windows Lazarus Build working again...jaybinks2007-11-031-302/+301
| | | | | | | | | 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-91/+105
| | | | | | | | | | 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
* made some major progress with ffmpeg audio playback !!!jaybinks2007-10-271-0/+88
| | | | | | | | | | | | | | YAY !!! still a little choppy, so I suspect incorrect buffer sizes or something like that. also made some mods to support Unicode song file iteration on windows, this is no worse than what we had before, but is not complete.. oh this code only supports win 2000 and up .. no Win 98... git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@533 b956fd51-792f-4845-bead-9b4dfca2ff2c
* fixed bug in StringReplaceW...jaybinks2007-10-021-5/+17
| | | | | | oops :) git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@463 b956fd51-792f-4845-bead-9b4dfca2ff2c
* oops AdaptFilePaths was meant to be available to any compiler.jaybinks2007-10-021-5/+6
| | | | git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@462 b956fd51-792f-4845-bead-9b4dfca2ff2c
* Fixed linux compilation.jaybinks2007-10-021-158/+183
| | | | | | | | | | | | | 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
* minor bug fixes to have lazarus build load resources into SDL_Image jaybinks2007-09-221-2/+24
| | | | | | | | | 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
* renamed Ulyrics.bak.pas hack to Ulyrics_bak.pas for lazarus compatiblity.jaybinks2007-09-201-132/+136
| | | | | | minor changes to get code base compiling in Lazarus(win) and Delphi git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@415 b956fd51-792f-4845-bead-9b4dfca2ff2c
* Ultrastar-DX now compiles in linux jaybinks2007-09-201-98/+132
| | | | | | | | | (using lazarus) Bass etc is commented out.. but it compiles, and im working through the runtime errors. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@408 b956fd51-792f-4845-bead-9b4dfca2ff2c
* added UCommon ( in classes ) for lazarus...jaybinks2007-09-191-0/+98
common functions needed for lazarus ( and others ) can be put in here. also this now compiles on lazarus.. ( dosnt link yet... but I dont get any critical compiler errors ) tested to compile in my delphi, and basic functionality is fine. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@395 b956fd51-792f-4845-bead-9b4dfca2ff2c