Help File:8 ptAutoAssembler

From Cheat Engine
Revision as of 10:50, 30 July 2021 by LeFiXER (talk | contribs) (Created page with "==ptAutoAssembler== With this PluginType you get a callback when an Auto Assembler script is about to be executed, for each line on the first stage, and for each line on th...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

ptAutoAssembler[edit]

With this PluginType you get a callback when an Auto Assembler script is about to be executed, for each line on the first stage, and for each line on the second stage and when the auto assembler is finished. Because the Auto Assembler can be called from multiple threads, you will have to make sure that you keep all allocated variables separated (e.g. by the hand of ThreadID).


Callback Definition

typedef void ( __stdcall *CEP_PLUGINTYPE8)( char **line, AutoAssemblerPhase phase, int aaID);

Returns nothing.

Phase can be one of the following
0: aaInitialize - When the Auto Assembler is about to start. Use this to initialize your internal structures.
1: aaPhase1     - First stage when the syntax is being checked. Use this to configure whatever declarations the script requires you to save.
2: aaPhase2     - When the code is actually being assembled into instructions.
3: aaFinalize   - When the Auto Assembler is finished, either with an error or not.

If you replace 'line' with an empty line it will not be handled in Phase2. This is useful for internal commands.

aaID is a unique ID identifying the Auto Assembler script currently being executed. This can come in handy when an Auto Assembler script launches another Auto Assembler script.


Pointer to structure of init you have to pass

typedef struct _PLUGINTYPE8_INIT
{
  CEP_PLUGINTYPE8 callbackroutine; //pointer to a callback routine of the type 8 plugin
} PLUGINTYPE8_INIT, AUTOASSEMBLERPLUGIN_INIT, *PPLUGINTYPE8_INIT, *PAUTOASSEMBLERPLUGIN_INIT;