-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
split up memoryview function to it's own lua unit. (not necessary, bu…
…t looks better)
- Loading branch information
cheatengine@gmail.com
committed
Jan 8, 2013
1 parent
09f8595
commit 5474bca
Showing
8 changed files
with
224 additions
and
178 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
unit LuaMemoryView; | ||
|
||
{$mode delphi} | ||
|
||
interface | ||
|
||
uses | ||
forms, Classes, SysUtils, lua; | ||
|
||
procedure initializeLuaMemoryview; | ||
|
||
implementation | ||
|
||
uses luahandler, luaclass, MemoryBrowserFormUnit; | ||
|
||
function createMemoryView(L: PLua_state): integer; cdecl; | ||
begin | ||
luaclass_newClass(L, TMemoryBrowser.Create(application)); | ||
result:=1; | ||
end; | ||
|
||
function memoryview_getHexadecimalView(L: PLua_state): integer; cdecl; | ||
var m: TMemoryBrowser; | ||
begin | ||
m:=luaclass_getClassObject(L); | ||
luaclass_newClass(L, m.hexview); | ||
result:=1; | ||
end; | ||
|
||
function memoryview_getDisassemblerView(L: PLua_state): integer; cdecl; | ||
var m: TMemoryBrowser; | ||
begin | ||
m:=luaclass_getClassObject(L); | ||
luaclass_newClass(L, m.disassemblerview); | ||
result:=1; | ||
end; | ||
|
||
|
||
procedure initializeLuaMemoryView; | ||
begin | ||
lua_register(LuaVM, 'createMemoryView', createMemoryView); | ||
lua_register(LuaVM, 'memoryview_getDisassemblerView', memoryview_getDisassemblerView); | ||
lua_register(LuaVM, 'memoryview_getHexadecimalView', memoryview_getHexadecimalView); | ||
|
||
end; | ||
|
||
end. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.