C# Class AGS.Editor.NativeProxy

Inheritance: IDisposable
Show file Open project: adventuregamestudio/ags Class Usage Examples

Public Methods

Method Description
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

Private Methods

Method Description
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

Method Details

ChangeSpriteNumber() public method

public ChangeSpriteNumber ( Sprite sprite, int newNumber ) : void
sprite Sprite
newNumber int
return void

ClearUndoBuffer() public method

public ClearUndoBuffer ( ) : void
return void

CompileScript() public method

public CompileScript ( Script script, string preProcessedData, Game game, bool isRoomScript ) : void
script Script
preProcessedData string
game AGS.Types.Game
isRoomScript bool
return void

CopyWalkableAreaMaskToRegions() public method

public CopyWalkableAreaMaskToRegions ( Room room ) : void
room AGS.Types.Room
return void

CreateBuffer() public method

public CreateBuffer ( int width, int height ) : void
width int
height int
return void

CreateDataFile() public method

public CreateDataFile ( string fileList, int splitSize, string baseFileName, bool isGameEXE ) : void
fileList string
splitSize int
baseFileName string
isGameEXE bool
return void

CreateDebugMiniEXE() public method

public CreateDebugMiniEXE ( string fileList, string exeFileName ) : void
fileList string
exeFileName string
return void

CreateSpriteFromBitmap() public method

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
return Sprite

CreateTemplateFile() public method

public CreateTemplateFile ( string templateFileName, string fileList ) : void
templateFileName string
fileList string
return void

CreateUndoBuffer() public method

public CreateUndoBuffer ( Room room, RoomAreaMaskType mask ) : void
room AGS.Types.Room
mask RoomAreaMaskType
return void

CreateVOXFile() public method

public CreateVOXFile ( string fileName, string fileList ) : void
fileName string
fileList string
return void

CropSpriteEdges() public method

public CropSpriteEdges ( IList sprites, bool symettric ) : bool
sprites IList
symettric bool
return bool

DeleteBackground() public method

public DeleteBackground ( Room room, int backgroundNumber ) : void
room AGS.Types.Room
backgroundNumber int
return void

DeleteSprite() public method

public DeleteSprite ( Sprite sprite ) : void
sprite Sprite
return void

Dispose() public method

Obsolete: Use Utilities.IsShiftPressed instead Obsolete: Use Utilities.IsControlPressed instead
public Dispose ( ) : void
return void

DoesSpriteExist() public method

public DoesSpriteExist ( int spriteNumber ) : bool
spriteNumber int
return bool

DoesUndoBufferExist() public method

public DoesUndoBufferExist ( ) : bool
return bool

DrawBlockOfColour() public method

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
return void

DrawFillOntoMask() public method

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
return void

DrawFilledRectOntoMask() public method

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
return void

DrawFont() public method

public DrawFont ( IntPtr hdc, int x, int y, int fontNum ) : void
hdc System.IntPtr
x int
y int
fontNum int
return void

DrawGUI() public method

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
return void

DrawLineOntoMask() public method

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
return void

DrawRoomBackground() public method

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
return void

DrawSprite() public method

public DrawSprite ( IntPtr hdc, int x, int y, int spriteNum ) : void
hdc System.IntPtr
x int
y int
spriteNum int
return void

DrawSprite() public method

public DrawSprite ( IntPtr hdc, int x, int y, int spriteNum, bool flipImage ) : void
hdc System.IntPtr
x int
y int
spriteNum int
flipImage bool
return void

DrawSprite() public method

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
return void

DrawSpriteToBuffer() public method

public DrawSpriteToBuffer ( int spriteNum, int x, int y, int scaleFactor ) : void
spriteNum int
x int
y int
scaleFactor int
return void

DrawViewLoop() public method

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
return void

ExtractRoomTemplateFiles() public method

public ExtractRoomTemplateFiles ( string templateFileName, int newRoomNumber ) : void
templateFileName string
newRoomNumber int
return void

ExtractTemplateFiles() public method

public ExtractTemplateFiles ( string templateFileName ) : void
templateFileName string
return void

GameSettingsChanged() public method

public GameSettingsChanged ( Game game ) : void
game AGS.Types.Game
return void

GetActualSpriteHeight() public method

public GetActualSpriteHeight ( int spriteSlot ) : int
spriteSlot int
return int

GetActualSpriteWidth() public method

public GetActualSpriteWidth ( int spriteSlot ) : int
spriteSlot int
return int

GetAreaMaskPixel() public method

public GetAreaMaskPixel ( Room room, RoomAreaMaskType mask, int x, int y ) : int
room AGS.Types.Room
mask RoomAreaMaskType
x int
y int
return int

GetBitmapForBackground() public method

public GetBitmapForBackground ( Room room, int backgroundNumber ) : Bitmap
room AGS.Types.Room
backgroundNumber int
return System.Drawing.Bitmap

GetBitmapForSprite() public method

public GetBitmapForSprite ( int spriteSlot ) : Bitmap
spriteSlot int
return System.Drawing.Bitmap

GetBitmapForSprite() public method

public GetBitmapForSprite ( int spriteSlot, int width, int height ) : Bitmap
spriteSlot int
width int
height int
return System.Drawing.Bitmap

GetNativeConstant() public method

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
return object

GetRelativeSpriteHeight() public method

public GetRelativeSpriteHeight ( int spriteSlot ) : int
spriteSlot int
return int

GetRelativeSpriteWidth() public method

public GetRelativeSpriteWidth ( int spriteSlot ) : int
spriteSlot int
return int

GetSpriteResolutionMultiplier() public method

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
return int

ImportAreaMask() public method

public ImportAreaMask ( Room room, RoomAreaMaskType mask, Bitmap bmp ) : void
room AGS.Types.Room
mask RoomAreaMaskType
bmp System.Drawing.Bitmap
return void

ImportBackground() public method

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
return void

ImportOldGame() public method

public ImportOldGame ( string fileName ) : Game
fileName string
return AGS.Types.Game

ImportSCIFont() public method

public ImportSCIFont ( string fileName, int fontSlot ) : void
fileName string
fontSlot int
return void

LoadNewSpriteFile() public method

public LoadNewSpriteFile ( ) : void
return void

LoadRoom() public method

public LoadRoom ( AGS.Types.UnloadedRoom roomToLoad ) : Room
roomToLoad AGS.Types.UnloadedRoom
return AGS.Types.Room

LoadRoomScript() public method

public LoadRoomScript ( string roomFileName ) : string
roomFileName string
return string

LoadRoomTemplateFile() public method

public LoadRoomTemplateFile ( string fileName ) : AGS.Types.RoomTemplate
fileName string
return AGS.Types.RoomTemplate

LoadSpriteDimensions() public method

public LoadSpriteDimensions ( ) : Sprite>.Dictionary
return Sprite>.Dictionary

LoadTemplateFile() public method

public LoadTemplateFile ( string fileName ) : AGS.Types.GameTemplate
fileName string
return AGS.Types.GameTemplate

NewGameLoaded() public method

public NewGameLoaded ( Game game ) : void
game AGS.Types.Game
return void

PaletteColoursChanged() public method

public PaletteColoursChanged ( Game game ) : void
game AGS.Types.Game
return void

ReloadTTFFont() public method

public ReloadTTFFont ( int fontSlot ) : void
fontSlot int
return void

RenderBufferToHDC() public method

public RenderBufferToHDC ( IntPtr hDC ) : void
hDC System.IntPtr
return void

ReplaceSpriteWithBitmap() public method

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
return void

RestoreFromUndoBuffer() public method

public RestoreFromUndoBuffer ( Room room, RoomAreaMaskType mask ) : void
room AGS.Types.Room
mask RoomAreaMaskType
return void

SaveGame() public method

public SaveGame ( Game game ) : void
game AGS.Types.Game
return void

SaveRoom() public method

public SaveRoom ( Room roomToSave ) : void
roomToSave AGS.Types.Room
return void

SpriteResolutionsChanged() public method

public SpriteResolutionsChanged ( Sprite sprites ) : void
sprites Sprite
return void

TransformStringToBytes() public method

public TransformStringToBytes ( string text ) : byte[]
text string
return byte[]

UpdateFileIcon() public method

public UpdateFileIcon ( string fileToUpdate, string newIconToUse ) : void
fileToUpdate string
newIconToUse string
return void

UpdateFileVersionInfo() public method

public UpdateFileVersionInfo ( string fileToUpdate, string authorName, string gameName ) : void
fileToUpdate string
authorName string
gameName string
return void

UpdateGameExplorerThumbnail() public method

public UpdateGameExplorerThumbnail ( string fileToUpdate, byte newData ) : void
fileToUpdate string
newData byte
return void

UpdateGameExplorerXML() public method

public UpdateGameExplorerXML ( string fileToUpdate, byte newData ) : void
fileToUpdate string
newData byte
return void