Difference between revisions of "LUA"

From SimsWiki
Jump to: navigation, search
(Auto-inserted from WakkaWikki)
 
(Lua (programming language) (no idea if it's the same here))
Line 1: Line 1:
{{OldWikiEntry}} ==General LUA Text==
+
{{OldWikiEntry}}  
 +
 
 +
'''LUA''' is an imperative programming language, designed in 1993 by Roberto Ierusalimschy, Luiz Henrique de Figueiredo, and Waldemar Celes, members of the Computer Graphics Technology Group (Tecgraf) at PUC-Rio, the Pontifical University of Rio de Janeiro, in Brazil. "Lua" means "Moon" in Portuguese.
 +
 
 +
There is a wikipedia entry on Lua: [http://en.wikipedia.org/wiki/Lua_(programming_language) Lua (programming language)]. <!-- and I have not a slightest idea if this language is used in The Sims... //-->
 +
 
 +
==General LUA Text==
  
 
==Specific Types (Simcity4) (by Karybdis)==
 
==Specific Types (Simcity4) (by Karybdis)==

Revision as of 21:38, 23 February 2009

This article is imported from the old MTS2 wiki. You can help Sims2Wiki by cleaning it up. It's original page with comments can be found at http://old_wiki.modthesims2.com/LUA

LUA is an imperative programming language, designed in 1993 by Roberto Ierusalimschy, Luiz Henrique de Figueiredo, and Waldemar Celes, members of the Computer Graphics Technology Group (Tecgraf) at PUC-Rio, the Pontifical University of Rio de Janeiro, in Brazil. "Lua" means "Moon" in Portuguese.

There is a wikipedia entry on Lua: Lua (programming language).

General LUA Text

Specific Types (Simcity4) (by Karybdis)

Instance by: CRC24Polynomial = 0x01864cfb, CRC24Seed = 0x00b704ce, return (CRC24(from, false) | 0xFF000000)

LUAAdvice LUADefs LUAAdvisors LUAMission LUAObject LUASystem LUATutorials


BINARY LUA - By Quaxi

Here are the first things I found out about the .objLua and .globalObjLua

general Format:

	DWord: 1b 4c 75 61   (ID)
	Byte: Version    
	16-Bytes: Header
	    ---> Root "Function Block"

Function Block:

	Dword: Character count n
	n-Byte: Name of the Function (null terminated)
	5-Byte: unknown
	Byte: argument Count
	Byte: unknown
	Byte: stack Size
	
	12-Byte: 00

	4-Byte: constant counter 
	    ---> Loop Constant Block
	
	4-Byte: functions counter
	    ---> Loop Function Block

	4-Byte: instruction counter
	    ---> Loop Instruction Block

Instruction Block (a=Operand a, b=Operand b, c=Operand c, o=Opcode):

	Dword: aaaa aaaa bbbb bbbb bccc cccc ccoo oooo    

This Document lists the available opcodes: http:www.tecgraf.puc-rio.br/~lhf/ftp/doc/sblp2005.pdf

Constant Block:

	Byte: ConstantType
	    ----> Constant Data

List of know Constant Data Types


-0x00 = Empty, Null This seems to mark an empty block -0x03 = Number

	DWord: Unknown
	DWord: Unknown

-0x04 = Strings

	DWord: Length n of the following PString
	n-Bytes: Instruction Name, null-terminated
Personal tools
Namespaces

Variants
Actions
Navigation
game select
Toolbox