 |
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
jgoemat Master Cheater
Reputation: 23
Joined: 25 Sep 2011 Posts: 264
|
Posted: Mon Jul 08, 2013 2:11 am Post subject: Can it be made easier to register a symbol (labels too)? |
|
|
When creating scripts that use AOBSCAN or that make data available for use in tables (enable flag, pointer to structure, etc.) a symbol has to be registered, but it is a lot more difficult than it needs to be. Right now I need to write the name on 4 lines (just the first two for a local label):
1) label(GlobalName) // define the label
2) GlobalName: // set address of label to current assembler pointer
3) registersymbol(GlobalName) // register symbol so it can be seen in the table and disable section)
4) unregistersymbol(GlobalName) // in the disable section when memory is no longer allocated so we don't have invalid pointers
First I think that labels shouldn't have to be declared. When playing with a new complicated script especially it is a pain to add and remove labels for everything I'm adding. Not having to use the label() statement would make me more productive and I don't think it would cause any problems. The first time a label is used it could treated as if it was declared there. If begin used in an instruction it would be no different than a label declaration, if begin used to set the address associated with the label then that would work as well. AA still wouldn't prevent multiple declarations and every label used would still have to be defined. The only possible problem would be when you were attempting to change the assembling address to a user-defined symbol defined in another script and mis-typed the name. Instead of giving you an error it would happily create a new label and assign the current AA address to it. I think it's a small tradeoff though, and maybe could be enabled with a directive of some kind or a define so it's not the default (i.e. "// define(LABELSNOTREQUIRED,1)")
I don't see any problem with making something work with user-defined symbols though that are defined in the script. I'm thinking something like a character when they're set or something in the comments that makes it treat the line like a label/definition/register all in one and that marks it so the disable section will unregister it:
Code: | %GodModeFlag:
dd 0
GodModeFlag: // AUTOREGISTER
dd 0
|
I'd be happy to write code for it if it would make it into CE...
|
|
Back to top |
|
 |
Dark Byte Site Admin
Reputation: 470
Joined: 09 May 2003 Posts: 25785 Location: The netherlands
|
Posted: Mon Jul 08, 2013 5:38 am Post subject: |
|
|
sure, you can try adding it. It's probably going to require quite an overhaul of the current code though
Keep in mind that errors must still show a line number, so mov eax,esb must show that mov eax,esb is invalid and show the line number
(I haven't spend much time on this yet)
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
|