C# Класс AGS.Editor.NativeProxy

Наследование: IDisposable
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
ChangeSpriteNumber ( Sprite sprite, int newNumber ) : void
ClearUndoBuffer ( ) : void
CompileScript ( Script script, string preProcessedData, Game game, bool isRoomScript ) : void
CopyWalkableAreaMaskToRegions ( Room room ) : void
CreateBuffer ( int width, int height ) : void
CreateDataFile ( string fileList, int splitSize, string baseFileName, bool isGameEXE ) : void
CreateDebugMiniEXE ( string fileList, string exeFileName ) : void
CreateSpriteFromBitmap ( Bitmap bmp, SpriteImportMethod transparency, bool remapColours, bool useRoomBackgroundColours, bool alphaChannel ) : Sprite
CreateTemplateFile ( string templateFileName, string fileList ) : void
CreateUndoBuffer ( Room room, RoomAreaMaskType mask ) : void
CreateVOXFile ( string fileName, string fileList ) : void
CropSpriteEdges ( IList sprites, bool symettric ) : bool
DeleteBackground ( Room room, int backgroundNumber ) : void
DeleteSprite ( Sprite sprite ) : void
Dispose ( ) : void

Obsolete: Use Utilities.IsShiftPressed instead

Obsolete: Use Utilities.IsControlPressed instead

DoesSpriteExist ( int spriteNumber ) : bool
DoesUndoBufferExist ( ) : bool
DrawBlockOfColour ( IntPtr hdc, int x, int y, int width, int height, int colourNum ) : void
DrawFillOntoMask ( Room room, RoomAreaMaskType mask, int x1, int y1, int color ) : void
DrawFilledRectOntoMask ( Room room, RoomAreaMaskType mask, int x1, int y1, int x2, int y2, int color ) : void
DrawFont ( IntPtr hdc, int x, int y, int fontNum ) : void
DrawGUI ( IntPtr hdc, int x, int y, AGS.Types.GUI gui, int scaleFactor, int selectedControl ) : void
DrawLineOntoMask ( Room room, RoomAreaMaskType mask, int x1, int y1, int x2, int y2, int color ) : void
DrawRoomBackground ( IntPtr hDC, Room room, int x, int y, int backgroundNumber, float scaleFactor, RoomAreaMaskType maskType, int selectedArea, int maskTransparency ) : void
DrawSprite ( IntPtr hdc, int x, int y, int spriteNum ) : void
DrawSprite ( IntPtr hdc, int x, int y, int spriteNum, bool flipImage ) : void
DrawSprite ( IntPtr hdc, int x, int y, int width, int height, int spriteNum ) : void
DrawSpriteToBuffer ( int spriteNum, int x, int y, int scaleFactor ) : void
DrawViewLoop ( IntPtr hdc, AGS.Types.ViewLoop loop, int x, int y, int sizeInPixels, int selectedFrame ) : void
ExtractRoomTemplateFiles ( string templateFileName, int newRoomNumber ) : void
ExtractTemplateFiles ( string templateFileName ) : void
GameSettingsChanged ( Game game ) : void
GetActualSpriteHeight ( int spriteSlot ) : int
GetActualSpriteWidth ( int spriteSlot ) : int
GetAreaMaskPixel ( Room room, RoomAreaMaskType mask, int x, int y ) : int
GetBitmapForBackground ( Room room, int backgroundNumber ) : Bitmap
GetBitmapForSprite ( int spriteSlot ) : Bitmap
GetBitmapForSprite ( int spriteSlot, int width, int height ) : Bitmap
GetNativeConstant ( string name ) : object

Allows the Editor to reuse constants from the native code. If a constant required by the Editor is not also required by the Engine, then it should instead by moved into AGS.Types (AGS.Native references the AGS.Types assembly). Note that this method returns only System::Int32 and System::String objects -- it is up to the user to determine if the value should be used as a smaller integral type (additional casting may be required to cast to a non-int integral type).

GetRelativeSpriteHeight ( int spriteSlot ) : int
GetRelativeSpriteWidth ( int spriteSlot ) : int
GetSpriteResolutionMultiplier ( int spriteSlot ) : int

Returns the multiplier necessary to display this sprite at the "standard" size. (ie. 1 if 640x400 sprite, 2 if 320x200)

ImportAreaMask ( Room room, RoomAreaMaskType mask, Bitmap bmp ) : void
ImportBackground ( Room room, int backgroundNumber, Bitmap bmp, bool useExactPalette, bool sharePalette ) : void
ImportOldGame ( string fileName ) : Game
ImportSCIFont ( string fileName, int fontSlot ) : void
LoadNewSpriteFile ( ) : void
LoadRoom ( AGS.Types.UnloadedRoom roomToLoad ) : Room
LoadRoomScript ( string roomFileName ) : string
LoadRoomTemplateFile ( string fileName ) : AGS.Types.RoomTemplate
LoadSpriteDimensions ( ) : Sprite>.Dictionary
LoadTemplateFile ( string fileName ) : AGS.Types.GameTemplate
NewGameLoaded ( Game game ) : void
PaletteColoursChanged ( Game game ) : void
ReloadTTFFont ( int fontSlot ) : void
RenderBufferToHDC ( IntPtr hDC ) : void
ReplaceSpriteWithBitmap ( Sprite spr, Bitmap bmp, SpriteImportMethod transparency, bool remapColours, bool useRoomBackgroundColours, bool alphaChannel ) : void
RestoreFromUndoBuffer ( Room room, RoomAreaMaskType mask ) : void
SaveGame ( Game game ) : void
SaveRoom ( Room roomToSave ) : void
SpriteResolutionsChanged ( Sprite sprites ) : void
TransformStringToBytes ( string text ) : byte[]
UpdateFileIcon ( string fileToUpdate, string newIconToUse ) : void
UpdateFileVersionInfo ( string fileToUpdate, string authorName, string gameName ) : void
UpdateGameExplorerThumbnail ( string fileToUpdate, byte newData ) : void
UpdateGameExplorerXML ( string fileToUpdate, byte newData ) : void

Приватные методы

Метод Описание
FreeLibrary ( IntPtr hModule ) : bool
GetAsyncKeyState ( int keyCode ) : short
GetPrivateProfileString ( string section, string key, string def, System retVal, int size, string filePath ) : int
GetProcAddress ( IntPtr hModule, string procedureName ) : IntPtr
LoadLibrary ( string dllToLoad ) : IntPtr
NativeProxy ( ) : System
SetForegroundWindow ( IntPtr hWnd ) : bool
WritePrivateProfileString ( string section, string key, string val, string filePath ) : long

Описание методов

ChangeSpriteNumber() публичный метод

public ChangeSpriteNumber ( Sprite sprite, int newNumber ) : void
sprite Sprite
newNumber int
Результат void

ClearUndoBuffer() публичный метод

public ClearUndoBuffer ( ) : void
Результат void

CompileScript() публичный метод

public CompileScript ( Script script, string preProcessedData, Game game, bool isRoomScript ) : void
script Script
preProcessedData string
game AGS.Types.Game
isRoomScript bool
Результат void

CopyWalkableAreaMaskToRegions() публичный метод

public CopyWalkableAreaMaskToRegions ( Room room ) : void
room AGS.Types.Room
Результат void

CreateBuffer() публичный метод

public CreateBuffer ( int width, int height ) : void
width int
height int
Результат void

CreateDataFile() публичный метод

public CreateDataFile ( string fileList, int splitSize, string baseFileName, bool isGameEXE ) : void
fileList string
splitSize int
baseFileName string
isGameEXE bool
Результат void

CreateDebugMiniEXE() публичный метод

public CreateDebugMiniEXE ( string fileList, string exeFileName ) : void
fileList string
exeFileName string
Результат void

CreateSpriteFromBitmap() публичный метод

public CreateSpriteFromBitmap ( Bitmap bmp, SpriteImportMethod transparency, bool remapColours, bool useRoomBackgroundColours, bool alphaChannel ) : Sprite
bmp System.Drawing.Bitmap
transparency SpriteImportMethod
remapColours bool
useRoomBackgroundColours bool
alphaChannel bool
Результат Sprite

CreateTemplateFile() публичный метод

public CreateTemplateFile ( string templateFileName, string fileList ) : void
templateFileName string
fileList string
Результат void

CreateUndoBuffer() публичный метод

public CreateUndoBuffer ( Room room, RoomAreaMaskType mask ) : void
room AGS.Types.Room
mask RoomAreaMaskType
Результат void

CreateVOXFile() публичный метод

public CreateVOXFile ( string fileName, string fileList ) : void
fileName string
fileList string
Результат void

CropSpriteEdges() публичный метод

public CropSpriteEdges ( IList sprites, bool symettric ) : bool
sprites IList
symettric bool
Результат bool

DeleteBackground() публичный метод

public DeleteBackground ( Room room, int backgroundNumber ) : void
room AGS.Types.Room
backgroundNumber int
Результат void

DeleteSprite() публичный метод

public DeleteSprite ( Sprite sprite ) : void
sprite Sprite
Результат void

Dispose() публичный метод

Obsolete: Use Utilities.IsShiftPressed instead Obsolete: Use Utilities.IsControlPressed instead
public Dispose ( ) : void
Результат void

DoesSpriteExist() публичный метод

public DoesSpriteExist ( int spriteNumber ) : bool
spriteNumber int
Результат bool

DoesUndoBufferExist() публичный метод

public DoesUndoBufferExist ( ) : bool
Результат bool

DrawBlockOfColour() публичный метод

public DrawBlockOfColour ( IntPtr hdc, int x, int y, int width, int height, int colourNum ) : void
hdc System.IntPtr
x int
y int
width int
height int
colourNum int
Результат void

DrawFillOntoMask() публичный метод

public DrawFillOntoMask ( Room room, RoomAreaMaskType mask, int x1, int y1, int color ) : void
room AGS.Types.Room
mask RoomAreaMaskType
x1 int
y1 int
color int
Результат void

DrawFilledRectOntoMask() публичный метод

public DrawFilledRectOntoMask ( Room room, RoomAreaMaskType mask, int x1, int y1, int x2, int y2, int color ) : void
room AGS.Types.Room
mask RoomAreaMaskType
x1 int
y1 int
x2 int
y2 int
color int
Результат void

DrawFont() публичный метод

public DrawFont ( IntPtr hdc, int x, int y, int fontNum ) : void
hdc System.IntPtr
x int
y int
fontNum int
Результат void

DrawGUI() публичный метод

public DrawGUI ( IntPtr hdc, int x, int y, AGS.Types.GUI gui, int scaleFactor, int selectedControl ) : void
hdc System.IntPtr
x int
y int
gui AGS.Types.GUI
scaleFactor int
selectedControl int
Результат void

DrawLineOntoMask() публичный метод

public DrawLineOntoMask ( Room room, RoomAreaMaskType mask, int x1, int y1, int x2, int y2, int color ) : void
room AGS.Types.Room
mask RoomAreaMaskType
x1 int
y1 int
x2 int
y2 int
color int
Результат void

DrawRoomBackground() публичный метод

public DrawRoomBackground ( IntPtr hDC, Room room, int x, int y, int backgroundNumber, float scaleFactor, RoomAreaMaskType maskType, int selectedArea, int maskTransparency ) : void
hDC System.IntPtr
room AGS.Types.Room
x int
y int
backgroundNumber int
scaleFactor float
maskType RoomAreaMaskType
selectedArea int
maskTransparency int
Результат void

DrawSprite() публичный метод

public DrawSprite ( IntPtr hdc, int x, int y, int spriteNum ) : void
hdc System.IntPtr
x int
y int
spriteNum int
Результат void

DrawSprite() публичный метод

public DrawSprite ( IntPtr hdc, int x, int y, int spriteNum, bool flipImage ) : void
hdc System.IntPtr
x int
y int
spriteNum int
flipImage bool
Результат void

DrawSprite() публичный метод

public DrawSprite ( IntPtr hdc, int x, int y, int width, int height, int spriteNum ) : void
hdc System.IntPtr
x int
y int
width int
height int
spriteNum int
Результат void

DrawSpriteToBuffer() публичный метод

public DrawSpriteToBuffer ( int spriteNum, int x, int y, int scaleFactor ) : void
spriteNum int
x int
y int
scaleFactor int
Результат void

DrawViewLoop() публичный метод

public DrawViewLoop ( IntPtr hdc, AGS.Types.ViewLoop loop, int x, int y, int sizeInPixels, int selectedFrame ) : void
hdc System.IntPtr
loop AGS.Types.ViewLoop
x int
y int
sizeInPixels int
selectedFrame int
Результат void

ExtractRoomTemplateFiles() публичный метод

public ExtractRoomTemplateFiles ( string templateFileName, int newRoomNumber ) : void
templateFileName string
newRoomNumber int
Результат void

ExtractTemplateFiles() публичный метод

public ExtractTemplateFiles ( string templateFileName ) : void
templateFileName string
Результат void

GameSettingsChanged() публичный метод

public GameSettingsChanged ( Game game ) : void
game AGS.Types.Game
Результат void

GetActualSpriteHeight() публичный метод

public GetActualSpriteHeight ( int spriteSlot ) : int
spriteSlot int
Результат int

GetActualSpriteWidth() публичный метод

public GetActualSpriteWidth ( int spriteSlot ) : int
spriteSlot int
Результат int

GetAreaMaskPixel() публичный метод

public GetAreaMaskPixel ( Room room, RoomAreaMaskType mask, int x, int y ) : int
room AGS.Types.Room
mask RoomAreaMaskType
x int
y int
Результат int

GetBitmapForBackground() публичный метод

public GetBitmapForBackground ( Room room, int backgroundNumber ) : Bitmap
room AGS.Types.Room
backgroundNumber int
Результат System.Drawing.Bitmap

GetBitmapForSprite() публичный метод

public GetBitmapForSprite ( int spriteSlot ) : Bitmap
spriteSlot int
Результат System.Drawing.Bitmap

GetBitmapForSprite() публичный метод

public GetBitmapForSprite ( int spriteSlot, int width, int height ) : Bitmap
spriteSlot int
width int
height int
Результат System.Drawing.Bitmap

GetNativeConstant() публичный метод

Allows the Editor to reuse constants from the native code. If a constant required by the Editor is not also required by the Engine, then it should instead by moved into AGS.Types (AGS.Native references the AGS.Types assembly). Note that this method returns only System::Int32 and System::String objects -- it is up to the user to determine if the value should be used as a smaller integral type (additional casting may be required to cast to a non-int integral type).
public GetNativeConstant ( string name ) : object
name string
Результат object

GetRelativeSpriteHeight() публичный метод

public GetRelativeSpriteHeight ( int spriteSlot ) : int
spriteSlot int
Результат int

GetRelativeSpriteWidth() публичный метод

public GetRelativeSpriteWidth ( int spriteSlot ) : int
spriteSlot int
Результат int

GetSpriteResolutionMultiplier() публичный метод

Returns the multiplier necessary to display this sprite at the "standard" size. (ie. 1 if 640x400 sprite, 2 if 320x200)
public GetSpriteResolutionMultiplier ( int spriteSlot ) : int
spriteSlot int
Результат int

ImportAreaMask() публичный метод

public ImportAreaMask ( Room room, RoomAreaMaskType mask, Bitmap bmp ) : void
room AGS.Types.Room
mask RoomAreaMaskType
bmp System.Drawing.Bitmap
Результат void

ImportBackground() публичный метод

public ImportBackground ( Room room, int backgroundNumber, Bitmap bmp, bool useExactPalette, bool sharePalette ) : void
room AGS.Types.Room
backgroundNumber int
bmp System.Drawing.Bitmap
useExactPalette bool
sharePalette bool
Результат void

ImportOldGame() публичный метод

public ImportOldGame ( string fileName ) : Game
fileName string
Результат AGS.Types.Game

ImportSCIFont() публичный метод

public ImportSCIFont ( string fileName, int fontSlot ) : void
fileName string
fontSlot int
Результат void

LoadNewSpriteFile() публичный метод

public LoadNewSpriteFile ( ) : void
Результат void

LoadRoom() публичный метод

public LoadRoom ( AGS.Types.UnloadedRoom roomToLoad ) : Room
roomToLoad AGS.Types.UnloadedRoom
Результат AGS.Types.Room

LoadRoomScript() публичный метод

public LoadRoomScript ( string roomFileName ) : string
roomFileName string
Результат string

LoadRoomTemplateFile() публичный метод

public LoadRoomTemplateFile ( string fileName ) : AGS.Types.RoomTemplate
fileName string
Результат AGS.Types.RoomTemplate

LoadSpriteDimensions() публичный метод

public LoadSpriteDimensions ( ) : Sprite>.Dictionary
Результат Sprite>.Dictionary

LoadTemplateFile() публичный метод

public LoadTemplateFile ( string fileName ) : AGS.Types.GameTemplate
fileName string
Результат AGS.Types.GameTemplate

NewGameLoaded() публичный метод

public NewGameLoaded ( Game game ) : void
game AGS.Types.Game
Результат void

PaletteColoursChanged() публичный метод

public PaletteColoursChanged ( Game game ) : void
game AGS.Types.Game
Результат void

ReloadTTFFont() публичный метод

public ReloadTTFFont ( int fontSlot ) : void
fontSlot int
Результат void

RenderBufferToHDC() публичный метод

public RenderBufferToHDC ( IntPtr hDC ) : void
hDC System.IntPtr
Результат void

ReplaceSpriteWithBitmap() публичный метод

public ReplaceSpriteWithBitmap ( Sprite spr, Bitmap bmp, SpriteImportMethod transparency, bool remapColours, bool useRoomBackgroundColours, bool alphaChannel ) : void
spr Sprite
bmp System.Drawing.Bitmap
transparency SpriteImportMethod
remapColours bool
useRoomBackgroundColours bool
alphaChannel bool
Результат void

RestoreFromUndoBuffer() публичный метод

public RestoreFromUndoBuffer ( Room room, RoomAreaMaskType mask ) : void
room AGS.Types.Room
mask RoomAreaMaskType
Результат void

SaveGame() публичный метод

public SaveGame ( Game game ) : void
game AGS.Types.Game
Результат void

SaveRoom() публичный метод

public SaveRoom ( Room roomToSave ) : void
roomToSave AGS.Types.Room
Результат void

SpriteResolutionsChanged() публичный метод

public SpriteResolutionsChanged ( Sprite sprites ) : void
sprites Sprite
Результат void

TransformStringToBytes() публичный метод

public TransformStringToBytes ( string text ) : byte[]
text string
Результат byte[]

UpdateFileIcon() публичный метод

public UpdateFileIcon ( string fileToUpdate, string newIconToUse ) : void
fileToUpdate string
newIconToUse string
Результат void

UpdateFileVersionInfo() публичный метод

public UpdateFileVersionInfo ( string fileToUpdate, string authorName, string gameName ) : void
fileToUpdate string
authorName string
gameName string
Результат void

UpdateGameExplorerThumbnail() публичный метод

public UpdateGameExplorerThumbnail ( string fileToUpdate, byte newData ) : void
fileToUpdate string
newData byte
Результат void

UpdateGameExplorerXML() публичный метод

public UpdateGameExplorerXML ( string fileToUpdate, byte newData ) : void
fileToUpdate string
newData byte
Результат void