Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


#ActualSoulSharer

Posted 13 June 2013 - 02:41 PM

Problem #2 - continuation

 

Object declarations are now added to the script source code before the compilation. And to initialize a variable I found out that I can get a pointer to a variable and it seems to work, but hell, it looks like a hack that asks for trouble, is it intended use?

int index = mod->GetGlobalVarIndexByName("topCloth");
GraphicsObject** adr = ((GraphicsObject**)mod->GetAddressOfGlobalVar(index));
*adr = (GraphicsObject*)(topClothObject);

#5SoulSharer

Posted 13 June 2013 - 02:41 PM

Problem #2 - continuation

 

Object declarations are now added to the script source code before the compilation. And to initialize a variable I found out that I can get a pointer to a variable and it seems to work, but hell, it looks like a hack that asks for trouble, is it intended use?



int index = mod->GetGlobalVarIndexByName("topCloth");
GraphicsObject** adr = ((GraphicsObject**)mod->GetAddressOfGlobalVar(index));
*adr = (GraphicsObject*)(topClothObject);

#4SoulSharer

Posted 13 June 2013 - 06:22 AM

Object declarations are now added to the script source code before the compilation. And to initialize a variable I found out that I can get a pointer to a variable and it seems to work, but hell, it looks like a hack that asks for trouble, is it intended use?

int index = mod->GetGlobalVarIndexByName("topCloth");
GraphicsObject** adr = ((GraphicsObject**)mod->GetAddressOfGlobalVar(index));
*adr = (GraphicsObject*)(topClothObject);

#3SoulSharer

Posted 13 June 2013 - 06:21 AM

Object declarations are now added to the script source code before the compile. And to initialize I found out that I can get a pointer to a variable and it seems to work, but hell, it looks like a hack that asks for trouble, is it intended use?





int index = mod->GetGlobalVarIndexByName("topCloth");
GraphicsObject** adr = ((GraphicsObject**)mod->GetAddressOfGlobalVar(index));
*adr = (GraphicsObject*)(topClothObject);

#2SoulSharer

Posted 13 June 2013 - 06:21 AM

Object declarations are now added to the script text before the compile. And to initialize I found out that I can get a pointer to a variable and it seems to work, but hell, it looks like a hack that asks for trouble, is it intended use?



int index = mod->GetGlobalVarIndexByName("topCloth");
GraphicsObject** adr = ((GraphicsObject**)mod->GetAddressOfGlobalVar(index));
*adr = (GraphicsObject*)(topClothObject);

#1SoulSharer

Posted 13 June 2013 - 06:16 AM

So far I've made it so object declarations are added to the script text before the compile. And to initialize I found out that I can get a pointer to a variable and it seems to work, but hell, it looks like a hack that asks for trouble, is it intended use?

int index = mod->GetGlobalVarIndexByName("topCloth");
GraphicsObject** adr = ((GraphicsObject**)mod->GetAddressOfGlobalVar(index));
*adr = (GraphicsObject*)(topClothObject);

PARTNERS