aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code/lib
diff options
context:
space:
mode:
authorbrunzelchen <brunzelchen@b956fd51-792f-4845-bead-9b4dfca2ff2c>2010-04-28 19:54:31 +0000
committerbrunzelchen <brunzelchen@b956fd51-792f-4845-bead-9b4dfca2ff2c>2010-04-28 19:54:31 +0000
commit60e6d3f9904a8114e985fccd14454b9b604ea275 (patch)
treec3dc298e5c81272f3df8e80171ae0f60d8774f2e /Game/Code/lib
parent58a47541955f5010269d72a06e307bbb945211ea (diff)
downloadusdx-60e6d3f9904a8114e985fccd14454b9b604ea275.tar.gz
usdx-60e6d3f9904a8114e985fccd14454b9b604ea275.tar.xz
usdx-60e6d3f9904a8114e985fccd14454b9b604ea275.zip
- new SDL.dll (with a quick and dirty workaround for the hanging-mouse problem)
- changing of sorting and folder-option (on/off) does not need any restart now - a lot of code clean up - some bugfixes... i hope... dont't know which... git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/1.0.1 Challenge MOD@2316 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'Game/Code/lib')
-rw-r--r--Game/Code/lib/SQLite/SQLiteTable3.pas3
-rw-r--r--Game/Code/lib/midi/MidiFile.pas28
-rw-r--r--Game/Code/lib/midi/Midiin.pas7
-rw-r--r--Game/Code/lib/midi/Midiout.pas12
4 files changed, 24 insertions, 26 deletions
diff --git a/Game/Code/lib/SQLite/SQLiteTable3.pas b/Game/Code/lib/SQLite/SQLiteTable3.pas
index 9f2b86b3..4cbcf5c0 100644
--- a/Game/Code/lib/SQLite/SQLiteTable3.pas
+++ b/Game/Code/lib/SQLite/SQLiteTable3.pas
@@ -380,7 +380,7 @@ function TSQLiteDatabase.ContainsColumn(Table: String; Column: String) : boolean
var
sql: string;
ds: TSqliteTable;
- i : integer;
+
begin
sql := 'PRAGMA TABLE_INFO('+Table+');';
ds := self.GetTable(sql);
@@ -802,4 +802,3 @@ end;
end.
-
diff --git a/Game/Code/lib/midi/MidiFile.pas b/Game/Code/lib/midi/MidiFile.pas
index 10b64a80..0a848eda 100644
--- a/Game/Code/lib/midi/MidiFile.pas
+++ b/Game/Code/lib/midi/MidiFile.pas
@@ -183,8 +183,8 @@ type
// playing attributes
playing: boolean;
- PlayStartTime: integer;
- currentTime: integer; // Current playtime in msec
+ PlayStartTime: Cardinal;
+ currentTime: Cardinal; // Current playtime in msec
currentPos: Double; // Current Position in ticks
procedure OnTrackReady;
@@ -210,9 +210,9 @@ type
procedure StopPlaying;
procedure ContinuePlaying;
- procedure PlayToTime(time: integer);
- procedure GoToTime(time: integer);
- function GetCurrentTime: integer;
+ procedure PlayToTime(time: Cardinal);
+ procedure GoToTime(time: Cardinal);
+ function GetCurrentTime: Cardinal;
function GetFusPerTick : Double;
function GetTrackLength:integer;
function Ready: boolean;
@@ -424,7 +424,7 @@ end;
constructor TMidifile.Create(AOwner: TComponent);
begin
inherited Create(AOWner);
- MIDIFileHandle:=AllocateHWnd(WndProc);
+ MIDIFileHandle:=Classes.AllocateHWnd(WndProc);
chunkData := nil;
chunkType := illegal;
Tracks := TList.Create;
@@ -444,7 +444,7 @@ begin
if MIDITimerID<>0 then KillMIDITimer;
- DeallocateHWnd(MIDIFileHandle);
+ Classes.DeallocateHWnd(MIDIFileHandle);
inherited Destroy;
end;
@@ -514,17 +514,17 @@ begin
SetPriorityClass(MIDIFileHandle,FPriority);
end;
-function TMidiFile.GetCurrentTime: integer;
+function TMidiFile.GetCurrentTime: Cardinal;
begin
Result := currentTime;
end;
-procedure TMidifile.PlayToTime(time: integer);
+procedure TMidifile.PlayToTime(time: Cardinal);
var
i: integer;
- track: TMidiTrack;
pos: integer;
deltaTime: integer;
+
begin
// calculate the pos in the file.
// pos is actually tick
@@ -541,11 +541,11 @@ begin
currentTime := time;
end;
-procedure TMidifile.GoToTime(time: integer);
+procedure TMidifile.GoToTime(time: Cardinal);
var
i: integer;
- track: TMidiTrack;
pos: integer;
+
begin
// this function should be changed because FusPerTick might not be constant
pos := round((time * 1000) / FusPerTick);
@@ -639,10 +639,9 @@ var
dTime: integer;
event: integer;
len: integer;
- str: string;
midiEvent: PMidiEvent;
- i: integer;
us_per_quarter: integer;
+
begin
chunkIndex := chunkData;
// inc(chunkIndex);
@@ -953,4 +952,3 @@ begin
end;
end.
-
diff --git a/Game/Code/lib/midi/Midiin.pas b/Game/Code/lib/midi/Midiin.pas
index 32a17c51..2ed8d619 100644
--- a/Game/Code/lib/midi/Midiin.pas
+++ b/Game/Code/lib/midi/Midiin.pas
@@ -102,7 +102,8 @@ unit MidiIn;
interface
uses
- Classes, SysUtils, WinTypes, Messages, WinProcs, MMSystem, MidiDefs, MidiType,
+ Classes, SysUtils, WinTypes, Messages, WinProcs, MMSystem,
+ MidiDefs, MidiType,
MidiCons, Circbuf, Delphmcb;
type
@@ -259,7 +260,7 @@ begin
{ Create the window for callback notification }
if not (csDesigning in ComponentState) then
begin
- Handle := AllocateHwnd(MidiInput);
+ Handle := Classes.AllocateHwnd(MidiInput);
end;
FState := misClosed;
@@ -280,7 +281,7 @@ begin
if (PCtlInfo <> nil) then
GlobalSharedLockedFree(PCtlinfo^.hMem, PCtlInfo);
- DeallocateHwnd(Handle);
+ Classes.DeallocateHwnd(Handle);
inherited Destroy;
end;
diff --git a/Game/Code/lib/midi/Midiout.pas b/Game/Code/lib/midi/Midiout.pas
index 91b75073..ba5f7697 100644
--- a/Game/Code/lib/midi/Midiout.pas
+++ b/Game/Code/lib/midi/Midiout.pas
@@ -126,7 +126,7 @@ type
TMidiOutput = class(TComponent)
protected
Handle: THandle; { Window handle used for callback notification }
- FDeviceID: Integer; { MIDI device ID }
+ FDeviceID: Cardinal; { MIDI device ID }
FMIDIHandle: Hmidiout; { Handle to output device }
FState: midioutputState; { Current device state }
PCtlInfo: PMidiCtlInfo; { Pointer to control info for DLL }
@@ -151,7 +151,7 @@ type
FOnMIDIOutput: TNotifyEvent; { Sysex output finished }
procedure MidiOutput(var Message: TMessage);
- procedure SetDeviceID(DeviceID: Integer);
+ procedure SetDeviceID(DeviceID: Cardinal);
procedure SetProductName(NewProductName: string);
procedure SetTechnology(NewTechnology: OutPortTech);
function midioutErrorString(WError: Word): string;
@@ -192,7 +192,7 @@ type
{ TODO: Property editor with dropdown list of product names }
property ProductName: string read FProductName write SetProductName;
- property DeviceID: Integer read FDeviceID write SetDeviceID default 0;
+ property DeviceID: Cardinal read FDeviceID write SetDeviceID default 0;
{ TODO: midiOutGetVolume? Or two properties for Left and Right volume?
Is it worth it??
midiOutMessage?? Does anyone use this? }
@@ -243,7 +243,7 @@ begin
{ Create the window for callback notification }
if not (csDesigning in ComponentState) then
begin
- Handle := AllocateHwnd(MidiOutput);
+ Handle := Classes.AllocateHwnd(MidiOutput);
end;
end;
@@ -256,7 +256,7 @@ begin
Close;
if (PCtlInfo <> nil) then
GlobalSharedLockedFree(PCtlinfo^.hMem, PCtlInfo);
- DeallocateHwnd(Handle);
+ Classes.DeallocateHwnd(Handle);
inherited Destroy;
end;
@@ -286,7 +286,7 @@ end;
{-------------------------------------------------------------------}
{ Set the output device ID and change the other properties to match }
-procedure Tmidioutput.SetDeviceID(DeviceID: Integer);
+procedure Tmidioutput.SetDeviceID(DeviceID: Cardinal);
var
midioutCaps: TmidioutCaps;
begin