OBD:BINA/OBJC: Difference between revisions

From OniGalore
Jump to navigation Jump to search
mNo edit summary
m (added family to footer template call)
 
(19 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{OBD BINA Header|align=right|prev=TMBD|type=OBJC|next=ONIE|name=Object Collection|onistuff=bina}}
{{OBD BINA Header|prev=TMBD|type=OBJC|next=ONIE|name=Objects|onistuff=bina}}
;Object Collection
 
*The collection's header structure (first 16 bytes) and collection layout is common to all 16 OBJC types.
==Introduction==
*A collection consists of a variable number of ''objects'', the size of which can also vary.
"OBJC" is short for "Objects", which refers to lists of files which are stored in the [[separate file]] when available (Windows demo, Mac) or in the [[raw file]] otherwise (Windows). OBJC is registered as a tag (and is also a sub-tag of [[BINA]]), but it serves as a wrapper for other tags. OBJCs are lists composed of a standard wrapper with a little header data and then elements of specific data types which have their own tags. Objects listed in OBJCs could be edited in-game by the developers using the GUI which was discovered by fans in the [[European Mac releases]] of Oni. Screenshots of the editing interface are shown on the pages of each type which the interface could edit.
*The size (in bytes) of the next object is announced by the field immediately preceding it (long, 4 bytes)
 
*The total size to the end of the collection is announced in the header.
==File description==
;Blue Box Beta "revelations"
;Example file
:A German Mac Beta version was released as part of a compilation of old Mac games.
:[[OBD:BINA/OBJC/PWRU|BINACJBOPowerUp]] from level3
:The version contained extra [[OBD:WMDD|WMDD]] files, part of Oni's developer GUI.
;Offsets
:Supposedly it allowed developers to edit OBJC files while running the game.
:Offsets are given with respect to the start of the raw file's data part.
:[http://www6.fh-eberswalde.de/user/dkriesch/oni/bina_missing.htm HERE] is the additional information provided by those menus about the structure of a few OBJC types.
 
[[Image:Bin r pu.gif]]
 
{{table}}
{{OBDth}}
{{OBDtr|0x00|char[4]|FF0000|43 4A 42 4F|OBJC|tag}}
{{OBDtr|0x04|int32  |FFFF00|18 02 00 00|536|size to end of object list from 0x08, in bytes}}
{{OBDtr|0x08|int32  |00FF00|27 00 00 00|39|object format version}}
{{OBDtr|0x0C|int32  |00FFFF|28 00 00 00|40|size of next object (black outline)}}
{{OBDtrBK|0x10 - 0x37 : first object (40 bytes)}}
{{OBDtr|0x38|int32  |FFFFFF|28 00 00 00|40|size of next object}}
{{OBDtrBK|0x3C - ... : second object (40 bytes), etc.}}
|}
;General layout
:The list's header (first 16 bytes) and layout is common to all 16 OBJC types (see below).
:*The size of the whole list is announced at 0x04 (int32), followed by the list.
:*Unlike ONIE and TMBD (which are arrays), OBJC announces the size of every object (int32).
:*After the last object, the end of the list is signaled by a null next object size.
 
;Object header
:All objects start with the following header:
 
{{Table}}
{{OBDth}}
{{OBDtr| 0x00 | char[4]  |FFC8C8| 52 52 57 50 | PWRU      | object type }}
{{OBDtr| 0x04 | int32    |FFFFC8| AC 1C 00 00 | 7340      | object ID }}
{{OBDtr| 0x08 | bitset32 |C8FFC8| 00 00 00 00 | 0x00      | object flags, only used at runtime in [[Tool mode]]}}
{{OBDtr| 0x0C | float    |C8FFFF| E8 92 77 44 | 990.254    | x position }}
{{OBDtr| 0x10 | float    |C8FFFF| 00 00 D8 41 | 27.000000  | y position }}
{{OBDtr| 0x14 | float    |C8FFFF| 71 DD 98 43 | 305.73    | z position }}
{{OBDtr| 0x18 | float    |FFC8FF| 00 00 00 00 | 0.000000  | rotation on the x axis in degrees }}
{{OBDtr| 0x1C | float    |FFC8FF| 00 00 00 00 | 0.000000  | rotation on the y axis in degrees }}
{{OBDtr| 0x20 | float    |FFC8FF| 00 00 00 00 | 0.000000  | rotation on the z axis in degrees }}
|}


==OBJC types==
==OBJC types==
A given collection can only hold objects of a specific type, which can be :  
A given list can only hold objects of one type, which can be:  
{|
{|
|
|
{|{{OBDtable}}
{|{{OBDtable}}
|-bgcolor=#FFDDBB
|-bgcolor=#E9E9E9
!Type!!Long name!!Filename
!Type!!Long name!!File name
|-
|-
|[[OBD:BINA/OBJC/CHAR|CHAR]]||Character||CJBO'''Character'''.BINA
|[[OBD:BINA/OBJC/CHAR|CHAR]]||Character||BINACJBO'''Character'''
|-
|-
|[[OBD:BINA/OBJC/CMBT|CMBT]]||Combat profile||CJBO'''Combat'''.BINA
|[[OBD:BINA/OBJC/CMBT|CMBT]]||Combat profile||BINACJBO'''Combat'''
|-
|-
|[[OBD:BINA/OBJC/CONS|CONS]]||Console||CJBO'''Console'''.BINA
|[[OBD:BINA/OBJC/CONS|CONS]]||Console||BINACJBO'''Console'''
|-
|-
|[[OBD:BINA/OBJC/DOOR|DOOR]]||Door||CJBO'''Door'''.BINA
|[[OBD:BINA/OBJC/DOOR|DOOR]]||Door||BINACJBO'''Door'''
|-
|-
|[[OBD:BINA/OBJC/FLAG|FLAG]]||Flag||CJBO'''Flag'''.BINA
|[[OBD:BINA/OBJC/FLAG|FLAG]]||Flag||BINACJBO'''Flag'''
|-
|-
|[[OBD:BINA/OBJC/FURN|FURN]]||Furniture||CJBO'''Furniture'''.BINA
|[[OBD:BINA/OBJC/FURN|FURN]]||Furniture||BINACJBO'''Furniture'''
|-
|-
|[[OBD:BINA/OBJC/MELE|MELE]]||Melee profile||CJBO'''Melee Profile'''.BINA
|[[OBD:BINA/OBJC/MELE|MELE]]||Melee profile||BINACJBO'''Melee Profile'''
|-
|-
|[[OBD:BINA/OBJC/NEUT|NEUT]]||Neutral behaviour||CJBO'''Neutral'''.BINA
|[[OBD:BINA/OBJC/NEUT|NEUT]]||Neutral behaviour||BINACJBO'''Neutral'''
|-
|-
|[[OBD:BINA/OBJC/PART|PART]]||Particle||CJBO'''Particle'''.BINA
|[[OBD:BINA/OBJC/PART|PART]]||Particle||BINACJBO'''Particle'''
|-
|-
|[[OBD:BINA/OBJC/PATR|PATR]]||Patrol path||CJBO'''Patrol_Path'''.BINA
|[[OBD:BINA/OBJC/PATR|PATR]]||Patrol path||BINACJBO'''Patrol_Path'''
|-
|-
|[[OBD:BINA/OBJC/PWRU|PWRU]]||Powerup||CJBO'''PowerUp'''.BINA
|[[OBD:BINA/OBJC/PWRU|PWRU]]||Powerup||BINACJBO'''PowerUp'''
|-
|-
|[[OBD:BINA/OBJC/SNDG|SNDG]]||Sound Group||CJBO'''Sound'''.BINA
|[[OBD:BINA/OBJC/SNDG|SNDG]]||Sound Group||BINACJBO'''Sound'''
|-
|-
|[[OBD:BINA/OBJC/TRGV|TRGV]]||Trigger Volume||CJBO'''Trigger_Volume'''.BINA
|[[OBD:BINA/OBJC/TRGV|TRGV]]||Trigger Volume||BINACJBO'''Trigger_Volume'''
|-
|-
|[[OBD:BINA/OBJC/TRIG|TRIG]]||Trigger||CJBO'''Trigger'''.BINA
|[[OBD:BINA/OBJC/TRIG|TRIG]]||Trigger||BINACJBO'''Trigger'''
|-
|-
|[[OBD:BINA/OBJC/TURR|TURR]]||Turret||CJBO'''Turret'''.BINA
|[[OBD:BINA/OBJC/TURR|TURR]]||Turret||BINACJBO'''Turret'''
|-
|-
|[[OBD:BINA/OBJC/WEAP|WEAP]]||Weapon||CJBO'''Weapon'''.BINA
|[[OBD:BINA/OBJC/WEAP|WEAP]]||Weapon||BINACJBO'''Weapon'''
|}
|}
|}
----
----
==0x00 - 0x0F==
;HEADER
:Example file : [[OBD:BINA/OBJC/PWRU|CJBOPowerUp.BINA]] from dunno where (level 3, probably)
;Offsets
:Offsets are given with respect to RAW part size.
http://www6.fh-eberswalde.de/user/dkriesch/onistuff/images/bin_r_pu.gif
{| BORDER=1 WIDTH=100% CELLPADDING=2 CELLSPACING=0 BGCOLOR="#000000"
|- BGCOLOR="#FFDDBB"
! WIDTH=12% |Offset
! WIDTH=12% |Hex
! WIDTH=12% |Translation
!Meaning
|- VALIGN=TOP ALIGN=CENTER BGCOLOR="#FFEEDD"
|0x00
| BGCOLOR="#FF0000" | 43 4A 42 4F
| OBJC
| ALIGN=LEFT | Object Collection
|- VALIGN=TOP ALIGN=CENTER BGCOLOR="#FFEEDD"
|0x04
| BGCOLOR="#FFFF00" | 18 02 00 00
| 536
| ALIGN=LEFT | size of the collection in bytes, counting from 0x08
|- VALIGN=TOP ALIGN=CENTER BGCOLOR="#FFEEDD"
|0x08
| BGCOLOR="#00FF00" | 27 00 00 00
| 39
| ALIGN=LEFT | identification number for the weapon classes; in every level the same; do not change it
|- VALIGN=TOP ALIGN=CENTER BGCOLOR="#FFEEDD"
|0x0C
| BGCOLOR="#00FFFF" | 28 00 00 00
| 40
| ALIGN=LEFT | size of next (first) object (outlined in black)
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#000000"
|<FONT SIZE=2 COLOR="#FFFFFF">0x10 - 0x37</FONT>
| COLSPAN=3 | <FONT SIZE=2 COLOR="#FFFFFF">First object (40 bytes)</FONT>
|- VALIGN=TOP ALIGN=CENTER BGCOLOR="#FFEEDD"
|0x38
| BGCOLOR="#FFFFFF" | 28 00 00 00
| 40
| ALIGN=LEFT | size of next (second) object
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#000000"
|<FONT SIZE=2 COLOR="#FFFFFF">0x3C - ...</FONT>
| COLSPAN=3 | <FONT SIZE=2 COLOR="#FFFFFF">Second object (40 bytes), etc</FONT>
|}
|}
;Collection end
:After the last object, the end of the collection is signaled by a null next object size.
;"Weapon classes?"
:If anyone can explain me WTF weapon classes have to do with it, I'd be greatly appreciative. [[User:Geyser|geyser]]


{{OBD BINA Footer|prev=TMBD|type=OBJC|next=ONIE|name=Objects|family=General}}


----
{{OBD}}
----
{{OBD BINA Footer|prev=TMBD|type=OBJC|next=ONIE|name=Object Collection}}

Latest revision as of 23:45, 8 December 2023

ONI BINARY DATA
AKVA << Other file types >> CBPI
TMBD << Other BINA >> ONIE
OBJC : Objects
switch to XML:BINA/OBJC page
Overview @ Oni Stuff
OBD.png

Introduction

"OBJC" is short for "Objects", which refers to lists of files which are stored in the separate file when available (Windows demo, Mac) or in the raw file otherwise (Windows). OBJC is registered as a tag (and is also a sub-tag of BINA), but it serves as a wrapper for other tags. OBJCs are lists composed of a standard wrapper with a little header data and then elements of specific data types which have their own tags. Objects listed in OBJCs could be edited in-game by the developers using the GUI which was discovered by fans in the European Mac releases of Oni. Screenshots of the editing interface are shown on the pages of each type which the interface could edit.

File description

Example file
BINACJBOPowerUp from level3
Offsets
Offsets are given with respect to the start of the raw file's data part.

Bin r pu.gif

Offset Type Raw Hex Value Description
0x00 char[4] 43 4A 42 4F OBJC tag
0x04 int32 18 02 00 00 536 size to end of object list from 0x08, in bytes
0x08 int32 27 00 00 00 39 object format version
0x0C int32 28 00 00 00 40 size of next object (black outline)
0x10 - 0x37 : first object (40 bytes)
0x38 int32 28 00 00 00 40 size of next object
0x3C - ... : second object (40 bytes), etc.
General layout
The list's header (first 16 bytes) and layout is common to all 16 OBJC types (see below).
  • The size of the whole list is announced at 0x04 (int32), followed by the list.
  • Unlike ONIE and TMBD (which are arrays), OBJC announces the size of every object (int32).
  • After the last object, the end of the list is signaled by a null next object size.
Object header
All objects start with the following header:
Offset Type Raw Hex Value Description
0x00 char[4] 52 52 57 50 PWRU object type
0x04 int32 AC 1C 00 00 7340 object ID
0x08 bitset32 00 00 00 00 0x00 object flags, only used at runtime in Tool mode
0x0C float E8 92 77 44 990.254 x position
0x10 float 00 00 D8 41 27.000000 y position
0x14 float 71 DD 98 43 305.73 z position
0x18 float 00 00 00 00 0.000000 rotation on the x axis in degrees
0x1C float 00 00 00 00 0.000000 rotation on the y axis in degrees
0x20 float 00 00 00 00 0.000000 rotation on the z axis in degrees

OBJC types

A given list can only hold objects of one type, which can be:

Type Long name File name
CHAR Character BINACJBOCharacter
CMBT Combat profile BINACJBOCombat
CONS Console BINACJBOConsole
DOOR Door BINACJBODoor
FLAG Flag BINACJBOFlag
FURN Furniture BINACJBOFurniture
MELE Melee profile BINACJBOMelee Profile
NEUT Neutral behaviour BINACJBONeutral
PART Particle BINACJBOParticle
PATR Patrol path BINACJBOPatrol_Path
PWRU Powerup BINACJBOPowerUp
SNDG Sound Group BINACJBOSound
TRGV Trigger Volume BINACJBOTrigger_Volume
TRIG Trigger BINACJBOTrigger
TURR Turret BINACJBOTurret
WEAP Weapon BINACJBOWeapon
ONI BINARY DATA
AKVA << Other file types >> CBPI
BINA : Binary data
TMBD << Other BINA >> ONIE
OBJC : Objects
General file