mirror of
https://github.com/moparisthebest/Simba
synced 2025-02-07 02:30:19 -05:00
Mufasa v2 -> Simba!
Did some documentation work, added some comments to some files. Also added another check in Window.pas to help further debugging. git-svn-id: http://www.villavu.com/repositories/merlijn/mufasa@231 3f818213-9676-44b0-a9b4-5e4c4e03d09d
This commit is contained in:
parent
f5aaa1ab9c
commit
46aec15209
@ -353,8 +353,45 @@ implementation. It wouldn't be that hard to add them, however.
|
||||
|
||||
\section{Bitmaps and the Bitmaps Class}
|
||||
|
||||
\subsection{Introduction to Mufasa Bitmaps}
|
||||
To understand how the bitmaps in MML work, we will first make a
|
||||
distinguishment between two different objects; the Bitmap Manager and the
|
||||
Bitmap itself. The bitmap manager contains and manages a pool of bitmaps.
|
||||
|
||||
|
||||
\subsection{The Bitmap}
|
||||
|
||||
Mufasa has it's own implementation of a Bitmap.
|
||||
A bitmap is basically just a piece of bytes, ordered in a certain fashion.
|
||||
We have extended this concept to a full blown Bitmap class: ``TMufasaBitmap''.
|
||||
The data per pixel consists out of 32 bits\footnote{4 bytes}, and is
|
||||
``stored'' in the variable ``FData'', of the type ``TRGB32''.
|
||||
FData is a pointer to the data in memory.
|
||||
The advantage of a 32 bit structure to a 24 bits structure, consists mainly
|
||||
of the fact that 32 bits are more easily accessed that 24 bits. 32 bits are
|
||||
aligned in such a fashion that they are easily accessed, and translated to
|
||||
other formats\footnote{Or just ``Colours''}.
|
||||
|
||||
\subsection{Example of usage}
|
||||
As you can directly access the rawdata, bitmap functions will be fast and
|
||||
easy to use. Since the data is stored as an array you need to do convert your
|
||||
coordinate into a array-index using the following transformation:
|
||||
$$ \{\forall (x, y) \in Points,\ \forall\ i \in Index: i = (x * w) + x \} $$
|
||||
|
||||
With ``w'' as the Bitmap width.
|
||||
|
||||
For example we want to change pixel (5,20) to clWhite and our bitmaps
|
||||
width = 50:
|
||||
\begin{verbatim}
|
||||
Bitmap.FData[20 * 50 + 5].r := 255;
|
||||
Bitmap.FData[20 * 50 + 5].g := 255;
|
||||
Bitmap.FData[20 * 50 + 5].b := 255;
|
||||
\end{verbatim}
|
||||
|
||||
\subsection{Naming a bitmap}
|
||||
You can also name a bitmap by setting the BmpName property.
|
||||
This may come in handy when working with multiple bitmaps.
|
||||
|
||||
\section{Notes on the previously mentioned classes}
|
||||
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
<TargetFileExt Value=""/>
|
||||
<Title Value="Mufasa Stand Alone"/>
|
||||
<UseXPManifest Value="True"/>
|
||||
<ActiveEditorIndexAtStart Value="5"/>
|
||||
<ActiveEditorIndexAtStart Value="3"/>
|
||||
</General>
|
||||
<VersionInfo>
|
||||
<ProjectVersion Value=""/>
|
||||
@ -38,8 +38,8 @@
|
||||
<Filename Value="project1.lpr"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="project1"/>
|
||||
<CursorPos X="62" Y="38"/>
|
||||
<TopLine Value="24"/>
|
||||
<CursorPos X="27" Y="37"/>
|
||||
<TopLine Value="17"/>
|
||||
<UsageCount Value="205"/>
|
||||
</Unit0>
|
||||
<Unit1>
|
||||
@ -162,9 +162,9 @@
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<UnitName Value="TestUnit"/>
|
||||
<CursorPos X="11" Y="1067"/>
|
||||
<TopLine Value="1062"/>
|
||||
<EditorIndex Value="4"/>
|
||||
<CursorPos X="45" Y="290"/>
|
||||
<TopLine Value="286"/>
|
||||
<EditorIndex Value="6"/>
|
||||
<UsageCount Value="202"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit17>
|
||||
@ -219,8 +219,8 @@
|
||||
<Filename Value="../../Units/MMLCore/client.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="Client"/>
|
||||
<CursorPos X="54" Y="45"/>
|
||||
<TopLine Value="44"/>
|
||||
<CursorPos X="24" Y="47"/>
|
||||
<TopLine Value="31"/>
|
||||
<EditorIndex Value="2"/>
|
||||
<UsageCount Value="201"/>
|
||||
<Loaded Value="True"/>
|
||||
@ -246,9 +246,9 @@
|
||||
<Filename Value="../../Units/MMLCore/files.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="files"/>
|
||||
<CursorPos X="56" Y="52"/>
|
||||
<TopLine Value="42"/>
|
||||
<EditorIndex Value="15"/>
|
||||
<CursorPos X="60" Y="285"/>
|
||||
<TopLine Value="91"/>
|
||||
<EditorIndex Value="10"/>
|
||||
<UsageCount Value="202"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit28>
|
||||
@ -256,9 +256,11 @@
|
||||
<Filename Value="../../Units/MMLCore/window.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="Window"/>
|
||||
<CursorPos X="29" Y="676"/>
|
||||
<TopLine Value="670"/>
|
||||
<CursorPos X="32" Y="138"/>
|
||||
<TopLine Value="138"/>
|
||||
<EditorIndex Value="4"/>
|
||||
<UsageCount Value="201"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit29>
|
||||
<Unit30>
|
||||
<Filename Value="../../../cogat/Units/CogatUnits/comptypes.pas"/>
|
||||
@ -277,9 +279,11 @@
|
||||
<Unit32>
|
||||
<Filename Value="../../Units/MMLCore/input.pas"/>
|
||||
<UnitName Value="Input"/>
|
||||
<CursorPos X="34" Y="234"/>
|
||||
<TopLine Value="234"/>
|
||||
<CursorPos X="78" Y="12"/>
|
||||
<TopLine Value="1"/>
|
||||
<EditorIndex Value="3"/>
|
||||
<UsageCount Value="82"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit32>
|
||||
<Unit33>
|
||||
<Filename Value="../../Units/MMLCore/finder.pas"/>
|
||||
@ -347,9 +351,9 @@
|
||||
</Unit41>
|
||||
<Unit42>
|
||||
<Filename Value="project1.lrs"/>
|
||||
<CursorPos X="70" Y="41"/>
|
||||
<TopLine Value="11"/>
|
||||
<UsageCount Value="8"/>
|
||||
<CursorPos X="1" Y="1"/>
|
||||
<TopLine Value="1"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit42>
|
||||
<Unit43>
|
||||
<Filename Value="../../../lazarus/lcl/lresources.pp"/>
|
||||
@ -463,9 +467,7 @@
|
||||
<UnitName Value="LCLIntf"/>
|
||||
<CursorPos X="10" Y="70"/>
|
||||
<TopLine Value="59"/>
|
||||
<EditorIndex Value="9"/>
|
||||
<UsageCount Value="11"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit59>
|
||||
<Unit60>
|
||||
<Filename Value="../../../lazarus/lcl/intfgraphics.pas"/>
|
||||
@ -607,8 +609,8 @@
|
||||
<Filename Value="../../Units/MMLAddon/plugins.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="plugins"/>
|
||||
<CursorPos X="32" Y="80"/>
|
||||
<TopLine Value="80"/>
|
||||
<CursorPos X="36" Y="32"/>
|
||||
<TopLine Value="21"/>
|
||||
<EditorIndex Value="1"/>
|
||||
<UsageCount Value="200"/>
|
||||
<Loaded Value="True"/>
|
||||
@ -688,9 +690,7 @@
|
||||
<UnitName Value="Menus"/>
|
||||
<CursorPos X="10" Y="38"/>
|
||||
<TopLine Value="38"/>
|
||||
<EditorIndex Value="13"/>
|
||||
<UsageCount Value="11"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit93>
|
||||
<Unit94>
|
||||
<Filename Value="../../../cogat/Units/CogatUnits/compdtm.pas"/>
|
||||
@ -703,9 +703,9 @@
|
||||
<Filename Value="../../Units/MMLCore/dtm.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="dtm"/>
|
||||
<CursorPos X="21" Y="38"/>
|
||||
<TopLine Value="27"/>
|
||||
<EditorIndex Value="16"/>
|
||||
<CursorPos X="17" Y="440"/>
|
||||
<TopLine Value="745"/>
|
||||
<EditorIndex Value="11"/>
|
||||
<UsageCount Value="200"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit95>
|
||||
@ -720,9 +720,9 @@
|
||||
<Filename Value="../../Units/MMLAddon/colourpicker.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="colourpicker"/>
|
||||
<CursorPos X="61" Y="229"/>
|
||||
<TopLine Value="218"/>
|
||||
<EditorIndex Value="5"/>
|
||||
<CursorPos X="26" Y="56"/>
|
||||
<TopLine Value="31"/>
|
||||
<EditorIndex Value="7"/>
|
||||
<UsageCount Value="201"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit97>
|
||||
@ -762,9 +762,7 @@
|
||||
<UnitName Value="Forms"/>
|
||||
<CursorPos X="14" Y="651"/>
|
||||
<TopLine Value="641"/>
|
||||
<EditorIndex Value="8"/>
|
||||
<UsageCount Value="13"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit102>
|
||||
<Unit103>
|
||||
<Filename Value="../../../usr/lib64/fpc/2.2.4/source/rtl/unix/cthreads.pp"/>
|
||||
@ -991,7 +989,7 @@
|
||||
<UnitName Value="web"/>
|
||||
<CursorPos X="1" Y="1"/>
|
||||
<TopLine Value="1"/>
|
||||
<UsageCount Value="128"/>
|
||||
<UsageCount Value="129"/>
|
||||
</Unit136>
|
||||
<Unit137>
|
||||
<Filename Value="../../../lazarus/lcl/lazhelphtml.pas"/>
|
||||
@ -1190,8 +1188,8 @@
|
||||
<UnitName Value="framescript"/>
|
||||
<CursorPos X="15" Y="195"/>
|
||||
<TopLine Value="180"/>
|
||||
<EditorIndex Value="3"/>
|
||||
<UsageCount Value="121"/>
|
||||
<EditorIndex Value="5"/>
|
||||
<UsageCount Value="122"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit161>
|
||||
<Unit162>
|
||||
@ -1294,26 +1292,20 @@
|
||||
<Filename Value="../../../lazarus/lcl/include/customactionlist.inc"/>
|
||||
<CursorPos X="1" Y="134"/>
|
||||
<TopLine Value="127"/>
|
||||
<EditorIndex Value="12"/>
|
||||
<UsageCount Value="11"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit176>
|
||||
<Unit177>
|
||||
<Filename Value="../../../lazarus/lcl/actnlist.pas"/>
|
||||
<UnitName Value="ActnList"/>
|
||||
<CursorPos X="14" Y="203"/>
|
||||
<TopLine Value="193"/>
|
||||
<EditorIndex Value="10"/>
|
||||
<UsageCount Value="11"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit177>
|
||||
<Unit178>
|
||||
<Filename Value="../../../lazarus/lcl/include/customaction.inc"/>
|
||||
<CursorPos X="3" Y="247"/>
|
||||
<TopLine Value="245"/>
|
||||
<EditorIndex Value="11"/>
|
||||
<UsageCount Value="11"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit178>
|
||||
<Unit179>
|
||||
<Filename Value="../../../FPC/FPCCheckout/rtl/objpas/classes/lists.inc"/>
|
||||
@ -1510,10 +1502,10 @@
|
||||
<ComponentName Value="ColourHistoryForm"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<UnitName Value="colourhistory"/>
|
||||
<CursorPos X="3" Y="58"/>
|
||||
<TopLine Value="40"/>
|
||||
<EditorIndex Value="6"/>
|
||||
<UsageCount Value="58"/>
|
||||
<CursorPos X="65" Y="46"/>
|
||||
<TopLine Value="168"/>
|
||||
<EditorIndex Value="8"/>
|
||||
<UsageCount Value="59"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit208>
|
||||
<Unit209>
|
||||
@ -1754,9 +1746,7 @@
|
||||
<UnitName Value="Mouse"/>
|
||||
<CursorPos X="40" Y="45"/>
|
||||
<TopLine Value="33"/>
|
||||
<EditorIndex Value="14"/>
|
||||
<UsageCount Value="12"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit244>
|
||||
<Unit245>
|
||||
<Filename Value="about.pas"/>
|
||||
@ -1764,140 +1754,140 @@
|
||||
<ComponentName Value="AboutForm"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<UnitName Value="about"/>
|
||||
<CursorPos X="80" Y="24"/>
|
||||
<TopLine Value="7"/>
|
||||
<EditorIndex Value="7"/>
|
||||
<UsageCount Value="21"/>
|
||||
<CursorPos X="61" Y="6"/>
|
||||
<TopLine Value="2"/>
|
||||
<EditorIndex Value="9"/>
|
||||
<UsageCount Value="22"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit245>
|
||||
</Units>
|
||||
<JumpHistory Count="30" HistoryIndex="29">
|
||||
<Position1>
|
||||
<Filename Value="testunit.pas"/>
|
||||
<Caret Line="976" Column="12" TopLine="966"/>
|
||||
<Filename Value="../../Units/MMLAddon/colourpicker.pas"/>
|
||||
<Caret Line="59" Column="22" TopLine="41"/>
|
||||
</Position1>
|
||||
<Position2>
|
||||
<Filename Value="testunit.pas"/>
|
||||
<Caret Line="979" Column="32" TopLine="966"/>
|
||||
<Filename Value="../../Units/MMLAddon/colourpicker.pas"/>
|
||||
<Caret Line="90" Column="21" TopLine="75"/>
|
||||
</Position2>
|
||||
<Position3>
|
||||
<Filename Value="testunit.pas"/>
|
||||
<Caret Line="983" Column="10" TopLine="969"/>
|
||||
<Filename Value="../../Units/MMLCore/files.pas"/>
|
||||
<Caret Line="35" Column="11" TopLine="21"/>
|
||||
</Position3>
|
||||
<Position4>
|
||||
<Filename Value="testunit.pas"/>
|
||||
<Caret Line="992" Column="22" TopLine="972"/>
|
||||
<Filename Value="../../Units/MMLCore/files.pas"/>
|
||||
<Caret Line="46" Column="35" TopLine="21"/>
|
||||
</Position4>
|
||||
<Position5>
|
||||
<Filename Value="testunit.pas"/>
|
||||
<Caret Line="986" Column="54" TopLine="976"/>
|
||||
<Filename Value="../../Units/MMLCore/files.pas"/>
|
||||
<Caret Line="47" Column="33" TopLine="21"/>
|
||||
</Position5>
|
||||
<Position6>
|
||||
<Filename Value="testunit.pas"/>
|
||||
<Caret Line="989" Column="25" TopLine="973"/>
|
||||
<Filename Value="../../Units/MMLCore/files.pas"/>
|
||||
<Caret Line="48" Column="36" TopLine="21"/>
|
||||
</Position6>
|
||||
<Position7>
|
||||
<Filename Value="testunit.pas"/>
|
||||
<Caret Line="994" Column="10" TopLine="980"/>
|
||||
<Filename Value="../../Units/MMLCore/files.pas"/>
|
||||
<Caret Line="61" Column="45" TopLine="46"/>
|
||||
</Position7>
|
||||
<Position8>
|
||||
<Filename Value="testunit.pas"/>
|
||||
<Caret Line="990" Column="26" TopLine="980"/>
|
||||
<Filename Value="../../Units/MMLCore/files.pas"/>
|
||||
<Caret Line="66" Column="27" TopLine="46"/>
|
||||
</Position8>
|
||||
<Position9>
|
||||
<Filename Value="testunit.pas"/>
|
||||
<Caret Line="976" Column="25" TopLine="966"/>
|
||||
<Filename Value="../../Units/MMLCore/files.pas"/>
|
||||
<Caret Line="74" Column="23" TopLine="46"/>
|
||||
</Position9>
|
||||
<Position10>
|
||||
<Filename Value="../../../lazarus/lcl/actnlist.pas"/>
|
||||
<Caret Line="157" Column="3" TopLine="174"/>
|
||||
<Filename Value="../../Units/MMLCore/files.pas"/>
|
||||
<Caret Line="80" Column="20" TopLine="65"/>
|
||||
</Position10>
|
||||
<Position11>
|
||||
<Filename Value="../../../lazarus/lcl/actnlist.pas"/>
|
||||
<Caret Line="163" Column="23" TopLine="153"/>
|
||||
<Filename Value="../../Units/MMLCore/files.pas"/>
|
||||
<Caret Line="106" Column="80" TopLine="91"/>
|
||||
</Position11>
|
||||
<Position12>
|
||||
<Filename Value="../../../lazarus/lcl/actnlist.pas"/>
|
||||
<Caret Line="196" Column="20" TopLine="186"/>
|
||||
<Filename Value="../../Units/MMLCore/client.pas"/>
|
||||
<Caret Line="46" Column="25" TopLine="21"/>
|
||||
</Position12>
|
||||
<Position13>
|
||||
<Filename Value="../../../lazarus/lcl/actnlist.pas"/>
|
||||
<Caret Line="209" Column="65" TopLine="199"/>
|
||||
<Filename Value="../../Units/MMLCore/window.pas"/>
|
||||
<Caret Line="59" Column="32" TopLine="41"/>
|
||||
</Position13>
|
||||
<Position14>
|
||||
<Filename Value="../../../lazarus/lcl/actnlist.pas"/>
|
||||
<Caret Line="210" Column="65" TopLine="199"/>
|
||||
<Filename Value="../../Units/MMLCore/window.pas"/>
|
||||
<Caret Line="60" Column="37" TopLine="41"/>
|
||||
</Position14>
|
||||
<Position15>
|
||||
<Filename Value="../../../lazarus/lcl/actnlist.pas"/>
|
||||
<Caret Line="37" Column="127" TopLine="33"/>
|
||||
<Filename Value="../../Units/MMLCore/window.pas"/>
|
||||
<Caret Line="83" Column="78" TopLine="68"/>
|
||||
</Position15>
|
||||
<Position16>
|
||||
<Filename Value="../../../lazarus/lcl/actnlist.pas"/>
|
||||
<Caret Line="80" Column="62" TopLine="70"/>
|
||||
<Filename Value="../../Units/MMLCore/window.pas"/>
|
||||
<Caret Line="142" Column="35" TopLine="127"/>
|
||||
</Position16>
|
||||
<Position17>
|
||||
<Filename Value="../../../lazarus/lcl/actnlist.pas"/>
|
||||
<Caret Line="163" Column="23" TopLine="153"/>
|
||||
<Filename Value="../../Units/MMLCore/window.pas"/>
|
||||
<Caret Line="144" Column="45" TopLine="127"/>
|
||||
</Position17>
|
||||
<Position18>
|
||||
<Filename Value="testunit.pas"/>
|
||||
<Caret Line="990" Column="33" TopLine="975"/>
|
||||
<Filename Value="../../Units/MMLCore/window.pas"/>
|
||||
<Caret Line="277" Column="20" TopLine="262"/>
|
||||
</Position18>
|
||||
<Position19>
|
||||
<Filename Value="testunit.pas"/>
|
||||
<Caret Line="991" Column="36" TopLine="975"/>
|
||||
<Filename Value="../../Units/MMLCore/window.pas"/>
|
||||
<Caret Line="279" Column="19" TopLine="262"/>
|
||||
</Position19>
|
||||
<Position20>
|
||||
<Filename Value="testunit.pas"/>
|
||||
<Caret Line="60" Column="123" TopLine="56"/>
|
||||
<Filename Value="../../Units/MMLCore/window.pas"/>
|
||||
<Caret Line="110" Column="39" TopLine="102"/>
|
||||
</Position20>
|
||||
<Position21>
|
||||
<Filename Value="testunit.pas"/>
|
||||
<Caret Line="517" Column="32" TopLine="508"/>
|
||||
<Filename Value="../../Units/MMLCore/window.pas"/>
|
||||
<Caret Line="138" Column="40" TopLine="163"/>
|
||||
</Position21>
|
||||
<Position22>
|
||||
<Filename Value="testunit.pas"/>
|
||||
<Caret Line="658" Column="17" TopLine="612"/>
|
||||
<Filename Value="../../Units/MMLCore/window.pas"/>
|
||||
<Caret Line="139" Column="33" TopLine="124"/>
|
||||
</Position22>
|
||||
<Position23>
|
||||
<Filename Value="testunit.pas"/>
|
||||
<Caret Line="973" Column="16" TopLine="966"/>
|
||||
<Filename Value="../../Units/MMLCore/window.pas"/>
|
||||
<Caret Line="140" Column="66" TopLine="124"/>
|
||||
</Position23>
|
||||
<Position24>
|
||||
<Filename Value="testunit.pas"/>
|
||||
<Caret Line="545" Column="2" TopLine="544"/>
|
||||
<Filename Value="../../Units/MMLCore/window.pas"/>
|
||||
<Caret Line="142" Column="63" TopLine="124"/>
|
||||
</Position24>
|
||||
<Position25>
|
||||
<Filename Value="testunit.pas"/>
|
||||
<Caret Line="866" Column="16" TopLine="862"/>
|
||||
<Filename Value="../../Units/MMLCore/window.pas"/>
|
||||
<Caret Line="144" Column="62" TopLine="124"/>
|
||||
</Position25>
|
||||
<Position26>
|
||||
<Filename Value="about.pas"/>
|
||||
<Caret Line="1" Column="7" TopLine="7"/>
|
||||
<Filename Value="../../Units/MMLCore/window.pas"/>
|
||||
<Caret Line="145" Column="30" TopLine="124"/>
|
||||
</Position26>
|
||||
<Position27>
|
||||
<Filename Value="testunit.pas"/>
|
||||
<Caret Line="866" Column="16" TopLine="862"/>
|
||||
<Filename Value="../../Units/MMLCore/window.pas"/>
|
||||
<Caret Line="193" Column="19" TopLine="178"/>
|
||||
</Position27>
|
||||
<Position28>
|
||||
<Filename Value="testunit.pas"/>
|
||||
<Caret Line="40" Column="47" TopLine="34"/>
|
||||
<Filename Value="../../Units/MMLCore/window.pas"/>
|
||||
<Caret Line="347" Column="23" TopLine="332"/>
|
||||
</Position28>
|
||||
<Position29>
|
||||
<Filename Value="testunit.pas"/>
|
||||
<Caret Line="1043" Column="55" TopLine="1031"/>
|
||||
<Filename Value="../../Units/MMLCore/window.pas"/>
|
||||
<Caret Line="374" Column="26" TopLine="359"/>
|
||||
</Position29>
|
||||
<Position30>
|
||||
<Filename Value="testunit.pas"/>
|
||||
<Caret Line="1067" Column="11" TopLine="1062"/>
|
||||
<Filename Value="../../Units/MMLCore/client.pas"/>
|
||||
<Caret Line="47" Column="24" TopLine="31"/>
|
||||
</Position30>
|
||||
</JumpHistory>
|
||||
</ProjectOptions>
|
||||
<CompilerOptions>
|
||||
<Version Value="8"/>
|
||||
<Target>
|
||||
<Filename Value="SAMufasaGUI"/>
|
||||
<Filename Value="Simba"/>
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<IncludeFiles Value="$(ProjOutDir)/;$(ProjPath)../../Units/MMLAddon/PSInc/"/>
|
||||
|
@ -30,13 +30,12 @@ uses
|
||||
cthreads, cmem,
|
||||
{$ENDIF}{$ENDIF}
|
||||
Interfaces, // this includes the LCL widgetset
|
||||
Forms, LResources, testunit,colourhistory, About;
|
||||
Forms, testunit,colourhistory, About;
|
||||
|
||||
{$IFDEF WINDOWS}{$R project1.rc}{$ENDIF}
|
||||
|
||||
begin
|
||||
Application.Title:='Mufasa Stand Alone';
|
||||
{$I project1.lrs}
|
||||
Application.Initialize;
|
||||
|
||||
Application.CreateForm(TForm1, Form1);
|
||||
|
@ -5,7 +5,7 @@ object Form1: TForm1
|
||||
Width = 731
|
||||
ActiveControl = ScriptPanel
|
||||
Caption = 'THA FUKING MUFASA'
|
||||
ClientHeight = 537
|
||||
ClientHeight = 532
|
||||
ClientWidth = 731
|
||||
KeyPreview = True
|
||||
Menu = MainMenu1
|
||||
@ -166,8 +166,8 @@ object Form1: TForm1
|
||||
end
|
||||
object StatusBar: TStatusBar
|
||||
Left = 0
|
||||
Height = 23
|
||||
Top = 514
|
||||
Height = 21
|
||||
Top = 511
|
||||
Width = 731
|
||||
Panels = <
|
||||
item
|
||||
@ -185,7 +185,7 @@ object Form1: TForm1
|
||||
object PanelMemo: TPanel
|
||||
Left = 0
|
||||
Height = 154
|
||||
Top = 360
|
||||
Top = 357
|
||||
Width = 731
|
||||
Align = alBottom
|
||||
ClientHeight = 154
|
||||
@ -205,25 +205,25 @@ object Form1: TForm1
|
||||
Cursor = crVSplit
|
||||
Left = 0
|
||||
Height = 5
|
||||
Top = 355
|
||||
Top = 352
|
||||
Width = 731
|
||||
Align = alBottom
|
||||
ResizeAnchor = akBottom
|
||||
end
|
||||
object ScriptPanel: TPanel
|
||||
Left = 0
|
||||
Height = 331
|
||||
Height = 328
|
||||
Top = 24
|
||||
Width = 731
|
||||
Align = alClient
|
||||
BevelOuter = bvNone
|
||||
Caption = 'ScriptPanel'
|
||||
ClientHeight = 331
|
||||
ClientHeight = 328
|
||||
ClientWidth = 731
|
||||
TabOrder = 4
|
||||
object PageControl1: TPageControl
|
||||
Left = 0
|
||||
Height = 296
|
||||
Height = 293
|
||||
Top = 0
|
||||
Width = 731
|
||||
Align = alClient
|
||||
@ -240,7 +240,7 @@ object Form1: TForm1
|
||||
object SearchPanel: TPanel
|
||||
Left = 0
|
||||
Height = 35
|
||||
Top = 296
|
||||
Top = 293
|
||||
Width = 731
|
||||
Align = alBottom
|
||||
BevelOuter = bvSpace
|
||||
@ -250,7 +250,7 @@ object Form1: TForm1
|
||||
Visible = False
|
||||
object LabeledEditSearch: TLabeledEdit
|
||||
Left = 104
|
||||
Height = 21
|
||||
Height = 27
|
||||
Top = 6
|
||||
Width = 174
|
||||
AutoSelect = False
|
||||
@ -259,10 +259,10 @@ object Form1: TForm1
|
||||
EditLabel.AnchorSideTop.Side = asrCenter
|
||||
EditLabel.AnchorSideRight.Control = LabeledEditSearch
|
||||
EditLabel.AnchorSideBottom.Control = LabeledEditSearch
|
||||
EditLabel.Left = 73
|
||||
EditLabel.Height = 14
|
||||
EditLabel.Top = 9
|
||||
EditLabel.Width = 28
|
||||
EditLabel.Left = 67
|
||||
EditLabel.Height = 18
|
||||
EditLabel.Top = 10
|
||||
EditLabel.Width = 34
|
||||
EditLabel.Caption = 'Find: '
|
||||
EditLabel.ParentColor = False
|
||||
LabelPosition = lpLeft
|
||||
@ -361,9 +361,9 @@ object Form1: TForm1
|
||||
end
|
||||
object CheckBoxMatchCase: TCheckBox
|
||||
Left = 320
|
||||
Height = 17
|
||||
Height = 22
|
||||
Top = 6
|
||||
Width = 72
|
||||
Width = 97
|
||||
Caption = 'Match case'
|
||||
OnClick = CheckBoxMatchCaseClick
|
||||
TabOrder = 1
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -278,7 +278,9 @@ type
|
||||
procedure formWriteln( S : String);
|
||||
|
||||
const
|
||||
WindowTitle = 'Mufasa v2 - %s';//Title, where %s = the place of the filename.
|
||||
// Rip Mufasa -> Simba ftw
|
||||
//WindowTitle = 'Mufasa v2 - %s';//Title, where %s = the place of the filename.
|
||||
WindowTitle = 'Simba - %s';//Title, where %s = the place of the filename.
|
||||
Panel_State = 0;
|
||||
Panel_ScriptName = 1;
|
||||
Panel_ScriptPath = 2;
|
||||
|
@ -54,8 +54,8 @@ type
|
||||
public
|
||||
// Will give us CopyClientToBitmap
|
||||
Window: TMWindow;
|
||||
ColourHistory: TList; // for colour history
|
||||
|
||||
{ Form components }
|
||||
Form : TForm;
|
||||
Image: TImage;
|
||||
Timor : TTimer;
|
||||
@ -65,10 +65,13 @@ type
|
||||
Text : string;
|
||||
FPickEvent : TPickEvent;
|
||||
|
||||
{ Some temp vars }
|
||||
oldx, oldy, Color, colorx, colory: Integer;
|
||||
targetleft,targettop : integer;
|
||||
|
||||
TheChangedEvent,TheChangingEvent : TNotifyEvent;
|
||||
|
||||
{ Handles }
|
||||
NoteHandle, BitmapHandle, ImageHandle : HDC;
|
||||
public
|
||||
property OnPick: TPickEvent read FPickEvent write FPickEvent;
|
||||
@ -81,14 +84,11 @@ constructor TMColorPicker.Create(aWindow: TMWindow);
|
||||
begin
|
||||
inherited Create;
|
||||
Self.Window := aWindow;
|
||||
Self.ColourHistory := TList.Create;
|
||||
|
||||
end;
|
||||
|
||||
destructor TMColorPicker.Destroy;
|
||||
begin
|
||||
|
||||
Self.ColourHistory.Destroy;
|
||||
inherited Destroy;
|
||||
end;
|
||||
|
||||
@ -107,6 +107,7 @@ var
|
||||
{$ENDIF}
|
||||
|
||||
begin
|
||||
{ We create a Form, with the client image on it. }
|
||||
Form := TForm.Create(Application.MainForm);
|
||||
if Window.GetDimensionBox( box) then
|
||||
begin;
|
||||
|
@ -32,6 +32,11 @@ uses
|
||||
Classes, SysUtils, MufasaTypes,
|
||||
Window, Input, Files, Finder, Bitmaps, dtm, ocr;
|
||||
|
||||
{
|
||||
TClient is a full-blown instance of the MML.
|
||||
It binds all the components together.
|
||||
}
|
||||
|
||||
type
|
||||
TClient = class(TObject)
|
||||
constructor Create;
|
||||
|
@ -69,6 +69,7 @@ implementation
|
||||
uses
|
||||
{$IFDEF MSWINDOWS}Windows,{$ENDIF} IniFiles;
|
||||
|
||||
{ GetFiles in independant of the TMFiles class }
|
||||
|
||||
function GetFiles(Path, Ext: string): TstringArray;
|
||||
var
|
||||
@ -98,21 +99,18 @@ procedure TMFiles.FreeFileList;
|
||||
var
|
||||
I : integer;
|
||||
begin;
|
||||
//WriteLn('Freeing all open Files.');
|
||||
For I := 0 To High(MFiles) Do
|
||||
If MFiles[i].FS <> nil Then
|
||||
Begin
|
||||
WriteLn('You forgot to free a file...');
|
||||
WriteLn('You forgot to free a file... (Path = ' + MFiles[i].Path + ')');
|
||||
Try
|
||||
MFiles[I].FS.Free;
|
||||
Except
|
||||
WriteLn('FreeFileList - Exception when freeing');
|
||||
End;
|
||||
//FileClose(Files[i].Handle);
|
||||
End;
|
||||
SetLength(MFiles, 0);
|
||||
SetLength(FreeSpots, 0);
|
||||
//WriteLn('Done Freeing all Files');
|
||||
end;
|
||||
|
||||
destructor TMFiles.Destroy;
|
||||
@ -147,9 +145,6 @@ Begin
|
||||
End;
|
||||
End;
|
||||
|
||||
{/\
|
||||
Copies content of the file into the result (if no errors occur).
|
||||
/\}
|
||||
Function TMFiles.SetFileCharPointer(FileNum, cChars, Origin: Integer): Integer;
|
||||
Begin
|
||||
If(FileNum < 0) or (FileNum >= Length(MFiles)) Then
|
||||
@ -198,8 +193,9 @@ Begin
|
||||
End;
|
||||
//Result := FileSeek(Files[FileNum].Handle, cChars, Origin);
|
||||
End;
|
||||
|
||||
{/\
|
||||
Opens a file for reading.
|
||||
Creates a file for reading/writing.
|
||||
Returns the handle (index) to the File Array.
|
||||
Returns -1 if unsuccesfull.
|
||||
/\}
|
||||
|
@ -41,7 +41,18 @@ uses
|
||||
|
||||
type
|
||||
|
||||
{ TMWindow }
|
||||
{
|
||||
TMWindow Class handles all interaction with the Operating System Display
|
||||
Getting Window ID's, Window Bitmap Data, Window Size.
|
||||
|
||||
It also abstracts data allocation from the user. Downside is there can't
|
||||
be more than one Data in memory.
|
||||
|
||||
EG: One uses ReturnData, but must Free the data with FreeReturnData;
|
||||
If one calls ReturnData, one must first free the ReturnData, before
|
||||
calling ReturnData again.
|
||||
|
||||
}
|
||||
|
||||
TMWindow = class(TObject)
|
||||
function GetColor(x,y : integer) : TColor;
|
||||
@ -124,15 +135,13 @@ type
|
||||
// The X Image pointer.
|
||||
XWindowImage: PXImage;
|
||||
|
||||
{$IFDEF M_MEMORY_DEBUG}
|
||||
// XImageFreed should be True if there is currently no
|
||||
// XImage loaded. If one is loaded, XImageFreed is true.
|
||||
// XImageFreed should be True if there is currently no
|
||||
// XImage loaded. If one is loaded, XImageFreed is true.
|
||||
|
||||
// If ReturnData is called while XImageFreed is false,
|
||||
// we throw an exception.
|
||||
// Same for FreeReturnData with XImageFreed true.
|
||||
XImageFreed: Boolean;
|
||||
{$ENDIF}
|
||||
// If ReturnData is called while XImageFreed is false,
|
||||
// we throw an exception.
|
||||
// Same for FreeReturnData with XImageFreed true.
|
||||
XImageFreed: Boolean;
|
||||
|
||||
{$ELSE}
|
||||
|
||||
@ -313,6 +322,10 @@ begin
|
||||
w_XWindow:
|
||||
begin
|
||||
{$IFDEF LINUX}
|
||||
if not Self.XImageFreed then
|
||||
Raise Exception.CreateFmt('ReturnData was called again without freeing'+
|
||||
' the previously used data. Do not forget to'+
|
||||
' call FreeReturnData', []);
|
||||
{ Should be this. }
|
||||
Old_Handler := XSetErrorHandler(@MufasaXErrorHandler);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user