diff --git a/src/game/g_panel.pas b/src/game/g_panel.pas
index 5eec8e780a546456cf85a75a25c04b6160b08b62..7f3e35f9a0b4fabe792e93b17e435450c323fad5 100644 (file)
--- a/src/game/g_panel.pas
+++ b/src/game/g_panel.pas
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*)
{$INCLUDE ../shared/a_modes.inc}
+{$M+}
unit g_panel;
interface
FCurTexture: Integer; // Íîìåð òåêóùåé òåêñòóðû
FCurFrame: Integer;
FCurFrameCount: Byte;
- X, Y: Integer;
- Width, Height: Word;
- PanelType: Word;
- SaveIt: Boolean; // Ñîõðàíÿòü ïðè SaveState?
- Enabled: Boolean;
- Door: Boolean;
- Moved: Boolean;
- LiftType: Byte;
- LastAnimLoop: Byte;
+ FX, FY: Integer;
+ FWidth, FHeight: Word;
+ FPanelType: Word;
+ FSaveIt: Boolean; // Ñîõðàíÿòü ïðè SaveState?
+ FEnabled: Boolean;
+ FDoor: Boolean;
+ FMoved: Boolean;
+ FLiftType: Byte;
+ FLastAnimLoop: Byte;
arrIdx: Integer; // index in one of internal arrays; sorry
tag: Integer; // used in coldets and such; sorry
proxyId: Integer; // proxy id in map grid (DO NOT USE!)
procedure SaveState(var Mem: TBinMemoryWriter);
procedure LoadState(var Mem: TBinMemoryReader);
- property x0: Integer read X;
- property y0: Integer read Y;
+ public
+ property visvalid: Boolean read getvisvalid; // panel is "visvalid" when it's width and height are positive
+
+ published
+ property x0: Integer read FX;
+ property y0: Integer read FY;
property x1: Integer read getx1; // inclusive!
property y1: Integer read gety1; // inclusive!
- property visvalid: Boolean read getvisvalid; // panel is "visvalid" when it's width and height are positive
+ property x: Integer read FX write FX;
+ property y: Integer read FY write FY;
+ property width: Word read FWidth write FWidth;
+ property height: Word read FHeight write FHeight;
+ property panelType: Word read FPanelType write FPanelType;
+ property saveIt: Boolean read FSaveIt write FSaveIt; // Ñîõðàíÿòü ïðè SaveState?
+ property enabled: Boolean read FEnabled write FEnabled; // Ñîõðàíÿòü ïðè SaveState?
+ property door: Boolean read FDoor write FDoor; // Ñîõðàíÿòü ïðè SaveState?
+ property moved: Boolean read FMoved write FMoved; // Ñîõðàíÿòü ïðè SaveState?
+ property liftType: Byte read FLiftType write FLiftType; // Ñîõðàíÿòü ïðè SaveState?
+ property lastAnimLoop: Byte read FLastAnimLoop write FLastAnimLoop; // Ñîõðàíÿòü ïðè SaveState?
end;
- PPanel = ^TPanel;
TPanelArray = Array of TPanel;
implementation
sig := PANEL_SIGNATURE; // 'PANL'
Mem.WriteDWORD(sig);
// Îòêðûòà/çàêðûòà, åñëè äâåðü:
- Mem.WriteBoolean(Enabled);
+ Mem.WriteBoolean(FEnabled);
// Íàïðàâëåíèå ëèôòà, åñëè ëèôò:
- Mem.WriteByte(LiftType);
+ Mem.WriteByte(FLiftType);
// Íîìåð òåêóùåé òåêñòóðû:
Mem.WriteInt(FCurTexture);
// Êîîðäû
- Mem.WriteInt(X);
- Mem.WriteInt(Y);
+ Mem.WriteInt(FX);
+ Mem.WriteInt(FY);
// Àíèìèðîâàííàÿ ëè òåêóùàÿ òåêñòóðà:
if (FCurTexture >= 0) and (FTextureIDs[FCurTexture].Anim) then
begin
raise EBinSizeError.Create('TPanel.LoadState: Wrong Panel Signature');
end;
// Îòêðûòà/çàêðûòà, åñëè äâåðü:
- Mem.ReadBoolean(Enabled);
+ Mem.ReadBoolean(FEnabled);
// Íàïðàâëåíèå ëèôòà, åñëè ëèôò:
- Mem.ReadByte(LiftType);
+ Mem.ReadByte(FLiftType);
// Íîìåð òåêóùåé òåêñòóðû:
Mem.ReadInt(FCurTexture);
// Êîîðäû
- Mem.ReadInt(X);
- Mem.ReadInt(Y);
+ Mem.ReadInt(FX);
+ Mem.ReadInt(FY);
// Àíèìèðîâàííàÿ ëè òåêóùàÿ òåêñòóðà:
Mem.ReadBoolean(anim);
// Åñëè äà - çàãðóæàåì àíèìàöèþ: