forked from BASLQC/kc-vita-translation
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
parse additional non-label asset files
- Loading branch information
1 parent
01d7291
commit 6fc02e6
Showing
9 changed files
with
287 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,13 @@ | ||
package label; | ||
use strictures 2; | ||
use parent 'Parse::Binary'; | ||
use parsehelper qw' string '; | ||
use constant FORMAT => ( | ||
magic => 'a136', | ||
width => 'L', | ||
height => 'L', | ||
eh => 'a48', | ||
length => 'L', | ||
text => 'a{$length}', | ||
pad => 'a{($length % 4) ? 4 - ($length % 4) : 0}', | ||
text => string(), | ||
tail => 'a*', | ||
); | ||
1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package motionlist; | ||
use strictures 2; | ||
use parent 'Parse::Binary'; | ||
use constant; | ||
use parsehelper qw' string header '; | ||
use motionship; | ||
|
||
constant->import( FORMAT => header(), motionship => [ 'L L/a x!4 a16', '*', 3 ] ); | ||
|
||
1; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package motionship; | ||
use strictures 2; | ||
use parent 'Parse::Binary'; | ||
use constant; | ||
use parsehelper 'string'; | ||
|
||
constant->import( | ||
FORMAT => ( | ||
"id" => "L", | ||
"name" => "L/a x!4", | ||
"pad" => "a16", | ||
) | ||
); | ||
|
||
1; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package parsehelper; | ||
use 5.020; | ||
use strictures 2; | ||
use Exporter 'import'; | ||
our @EXPORT_OK = qw( header string ); | ||
|
||
sub header { | ||
( | ||
game_object_file_id => 'L', | ||
game_object_path_id => 'Q', | ||
enabled => 'L', | ||
script_file_id => 'L', | ||
script_path_id => 'Q', | ||
object_name => "L/a x!4", | ||
sheet_count => 'L', | ||
sheet_name => "L/a x!4", | ||
obj_count => 'L', | ||
); | ||
} | ||
|
||
sub string { "L/a x!4" } | ||
|
||
sub pad4 { ( $_[0] % 4 ) ? 4 - ( $_[0] % 4 ) : 0 } | ||
|
||
1; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package presetdata; | ||
use strictures 2; | ||
use parent 'Parse::Binary'; | ||
use constant; | ||
use parsehelper qw' string header '; | ||
|
||
constant->import( | ||
FORMAT => header(), # | ||
map +( "preset_${_}_id" => "L", "preset_${_}_name" => string, "preset_${_}_pad" => "a172" ), 1 .. 20 | ||
); | ||
1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package presetdeck; | ||
use strictures 2; | ||
use parent 'Parse::Binary'; | ||
use constant; | ||
use parsehelper qw' string header '; | ||
|
||
constant->import( | ||
FORMAT => header(), | ||
map { | ||
my $deck = $_; | ||
( | ||
"deck_${_}_id" => "L", | ||
"deck_${_}_name" => string, | ||
"deck_${_}_ship_count" => "L", | ||
map +( "deck_${deck}_ship_${_}_name" => string ), 1 .. 6, | ||
) | ||
} 1 .. 19 | ||
); | ||
|
||
1; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package presetship; | ||
use strictures 2; | ||
use parent 'Parse::Binary'; | ||
use constant; | ||
use parsehelper qw' string header '; | ||
|
||
constant->import( | ||
FORMAT => header(), | ||
map +( "ship_${_}_id" => "L", "ship_${_}_name" => string, "ship_${_}_pad" => "a24" ), 1 .. 39 | ||
); | ||
|
||
1; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters