|
|
|
|
|
|
|
|
| Re: RII Light v1[message #226409]
|
Thu, 09 July 2009 13:39 
|
|
BirdFlu |
 |
Messages:438
Registered:September 2007 Location: Lampukistan |
|
|
Here is a short "API" documentation :
table Env :
Env.quit() : quits the game
Env.renderoldgui(boolean)
Env.rendernewgui(boolean) : toggles rendering of old/new gui
table gui :
gui.createNode(table) :
- table must have field 'parent'
- value of parent must be a node
gui.createImage(table) :
- table must have field 'parent'
- field 'image' is optional, but eventually the image filename must be set, here or with image.setImage()
gui.createRegion(table) :
- table must have field 'parent'
gui.createTextNode(table) :
- table must have field 'parent'
- fields 'text', 'font', 'foreground', 'background' are optional
- default values are "" for 'text', "BLOCKFONT2" for 'font', 255 for foreground, 0 for 'background'
gui.getScreen(string) : returns screen with specified name, only "MainMenu" works for now
gui node classes :
'node',
'surface' is-a 'node'
'image' is-a 'surface' is-a 'node'
'region' is-a 'surface' is-a 'node'
'textNode' is-a 'surface' is-a 'node'
So, when i say "parent must be a node", that means parent can also be a region, as it is a node too.
node :
'type : read-only property, returns string "Node" for node, "Image" for image etc.
'position' : read/write property, table with two elements { x, y }, describes global position on screen
'offset' : save as 'position', but describes displacement to parent node
'active' : read/write property, toggles node's and its children's visibility
surface :
'size' : read/write property
inherits all properties of 'node'
image :
setImage(string) : function sets filename of image
setImage(table) : table must have field 'file' = string, integer field 'subimage' is optional (defaults to 0)
inherits all properties of 'surface' and 'node'
- image file must be set, either with 'setImage()' or during creation (gui.createImage(table))
- image file can be reset any time
region :
define(button_callback, move_callback) : callbacks must be function values (closures)
inherits all properties of 'surface' and node
- must set 'size' of region before 'define' it
screen :
'root_node' : read-only property, is a 'node'
- 'root_node' must be a parent to some other node, as rendering starts from here
Report message to a moderator
|
|
|
|
|
|
|
| Re: RII Light v1[message #226713]
|
Sat, 11 July 2009 08:12 
|
|
usrbid |
  |
Messages:1502
Registered:December 2008 |
|
|
We had a discussion around RPCs, where we sort of decided the approach that makes the most sense is to create a folder for each RPC and put all resources into it.
I feel the same principle applies to items.
How about making a folder per item (yeah, I know there will be 2000 folders) and put all resources (e.g. XML, tile pic, interface pic, big pic etc.) into it?
The idea is that adding, replacing, removing an item will be much easier because everything is packaged in one folder.
In case you don't like the idea of 2000 folders, this is a virtual concept, think of a folder as being a zip file for example, kind of like OpenDoc does it with pics in an OpenWord doc.
Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
|
|
| Re: RII Light v1[message #226877]
|
Sun, 12 July 2009 11:48 
|
|
BirdFlu |
 |
Messages:438
Registered:September 2007 Location: Lampukistan |
|
|
KaerarBirdFluKaerarAlso what about having the Bigitems folder as a container rather than lots of individual containers, or would that limit palettes to a single palette per container? Are you by chance mixing up 7z containers with STI containers?
Not really. When you run the Convert.bat it creates a Bigitems folder with every single STI converted to PNG in their own Gunxxx.jpc.7z or P1xxx.jpc.7z etc...
If the Bigitems folder was converted into the container (Bigitems.jpc.7z) with all the images in it, it would make editing easier and faster is all.
Ok, now i see what you mean. But one single jpc.7z is probably not what you want, as it would be the same as one big sti file. All images would share one palette. What you want, i think, is to put all png files (previously stis file with one subimage each) in a 7z or jdc.7z container, which conceptually are equal to a SLF container. So, although both are 7z containers, they are handled differently. This is the reason why i asked some time ago to "vote" for extension names other than just .7z. Because people would be confused why one 7z file works as intended and another one doesn't.
To use the jdc.7z files, you would have to "mount" them via your vfs_config*.ini file.
Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
| Re: RII Light v1[message #226999]
|
Mon, 13 July 2009 14:06 
|
|
The_Bob |
 |
Messages:415
Registered:May 2009 Location: Behind you. |
|
|
Hard-coded stuff will (almost) always be faster then script based, especially in a case where the UI is rewritten from hard-coded areas and images to generic elements that will puzzle together a similar interface.
Rather then just drawing, say, the backdrop for the merc list in tactical, we have to parse a Lua script that defines it as a generic area (nested inside of another area probably) containing an image (the backdrop), meaning we need to pass a lot more parameters and likely calculate more values to display a simple image. Also the image display code is wrapped in a class, the class derived from a whole class hierarchy with virtual functions and... It's basically a lot of overhead when it comes to drawing a simple image.
However the effective speed penalty isn't that bad on current hardware, it probably wouldn't be that bad on a 180MHz Pentium either, back in 1998. It's still nothing compared to drawing the animations, plying sounds and calculating sight in real time.
Report message to a moderator
|
|
|
|
|
|
|
| Re: RII Light v1[message #232705]
|
Mon, 07 September 2009 13:34 
|
|
ohnoitsever |
Messages:2
Registered:September 2009 |
|
|
Hello
The download link is not working, would someone please be so kind as to upload this mod on a new host.
Thanks in advance,
ohnoitsever
*lurks away*
Report message to a moderator
|
Civilian
|
|
|
|
|
|
| Re: RII Light v1[message #232932]
|
Thu, 10 September 2009 12:01 
|
|
ohnoitsever |
Messages:2
Registered:September 2009 |
|
|
Hello
The mod contains some sprite draw problems.
http://img16.imageshack.us/img16/5628/corruptiondrawproblem.png
I also get this error report which is evidently not related, but because it shows up here you are
*** Thu Sep 10 18:57:12 2009 ***
The value [JA2 HAM Settings][BOBBY_RAY_TOOLTIPS_SHOW_POSSIBLE_ATTACHMENTS] = "" in file [Ja2_Options.ini] is neither TRUE nor FALSE. The value FALSE will be used.
I am using a fresh copy of the latest one click installer on top of a fresh install of JA2 Gold
Report message to a moderator
|
Civilian
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|