Page MenuHomePhabricator (Chris)

No OneTemporary

Authored By
Unknown
Size
149 KB
Referenced Files
None
Subscribers
None
This document is not UTF8. It was detected as ISO-8859-1 (Latin 1) and converted to UTF8 for display.
diff --git a/data/script/Backend.pl b/data/script/Backend.pl
index ee3f7a8..d228c72 100644
--- a/data/script/Backend.pl
+++ b/data/script/Backend.pl
@@ -1,594 +1,603 @@
#!/usr/bin/perl -w
# PERL backend for the game
=comment
This is the main perl backend for Mortal Szombat. It loads the other files,
compiles characters, creates shared variables.
1. FIGHTER ACTIONS
1.1. BASIC MOVEMENT 1.2. OFFENSIVE MOVES 1.3. HURT MOVES
Start KneelingPunch Falling
Stand KneelingKick Laying
Walk KneelingUppercut Getup
Back HighPunch HighPunched
Turn LowPunch LowPunched
Hurt HighKick GroinKicked
Block LowKick KneelingPunched
Kneeling Sweep KneelingKicked
Onknees GroinKick Thrown
Jump KneeKick Dead
JumpFW Elbow
JumpBW Grenade
Fun Uppercut
Threat Throw
[fighter-specific stuff]
=cut
=comment
MAIN CONSTANTS
=cut
$GAMEBITS = 3; # Number of oversampling bits in coordinates
$GAMEBITS2 = 1 << $GAMEBITS; # 2^(oversampling)
$SCRWIDTH = 640; # The physical horizontal screen resolution
$SCRHEIGHT = 480; # The physical vertical screen resolution
$SCRWIDTH2 = ($SCRWIDTH << $GAMEBITS); # The logical horizontal screen resolution
$SCRHEIGHT2 = ($SCRHEIGHT << $GAMEBITS); # The logical vertical screen resolution
$MOVEMARGIN2= 50 << $GAMEBITS; # The logical border for fighters.
$BGWIDTH2 = 1920 << $GAMEBITS; # The logical background width
$BGHEIGHT2 = 480 << $GAMEBITS; # The logical background height
$GROUND2 = 160 << $GAMEBITS; # The logical ground level.
$DELMULTIPLIER = 1; # DEL values in states are multiplied by this.
$MAXCOMBO = 5; # Maximum combo count.
$BgMax = $BGWIDTH2 - $SCRWIDTH2; # The logical maximum camera position
$BgSpeed = 0; # The current speed of the background movement
$BgPosition = $BgMax >> 1; # The logical camera position
$BgScrollEnabled = 1; # Can the background scroll?
$HitPointScale = 10; # Scale the hit points by this.
$NextDoodad = 0; # The next doodad to process
$Debug = 0;
require 'PlayerInput.pl';
require 'Fighter.pl';
require 'FighterStats.pl';
require 'Doodad.pl';
require 'Keys.pl';
require 'State.pl';
require 'Translate.pl';
+require 'Rewind.pl';
=comment
MAIN OBJECTS
=cut
$Fighter1 = Fighter->new();
$Fighter2 = Fighter->new();
$Fighter1->{NUMBER} = 0;
$Fighter1->{OTHER} = $Fighter2;
$Fighter2->{NUMBER} = 1;
$Fighter2->{OTHER} = $Fighter1;
@Fighters = ( $Fighter1, $Fighter2 );
-
-
=comment
VARIABLES FOR DRAWING THE SCENE
=cut
+$gametick = 0; # Number of Advance()'s called since the start.
$p1x = 10; # Player 1 X position
$p1y = 100; # Player 1 Y position
$p1f = 10; # Player 1 frame
$p1h = 100; # Player 1 HP
$p2x = 400; # Player 2 X position
$p2y = 100; # Player 2 Y position
$p2f = -40; # Player 2 frame. Negative means flipped.
$p2h = 100; # Player 2 HP
$bgx = 0; # Background X position
$bgy = 0; # Background Y position
$over = 0; # Is the game over?
$ko = 0; # Is one fighter knocked down?
$doodad_x = -1; # Doodad X position
$doodad_y = -1; # Doodad Y position
$doodad_t = -1; # Doodad type
$doodad_f = -1; # Doodad frame number
$doodad_dir = 0; # The direction of the doodad; 1: normal; -1: flipped
$doodad_gfxowner = -1; # 0: first player; 1: second player; 2: Global doodad
$doodad_text = ''; # The text of type 0 doodads.
+sub ResetGame
+{
+ $gametick = 0;
+ $over = 0;
+ $ko = 0;
+
+ $bgx = 0;
+ $bgy = 0;
+ $BgSpeed = 0;
+ $BgPosition = 0;
+ $BgScrollEnabled = 0;
+
+ $OverTimer = 0;
+ $JudgementMode = 0;
+ $Debug = 0;
+
+ @Doodads = ();
+ @Sounds = ();
+
+ ResetEarthquake();
+ ResetRewind();
+
+ $Fighter1->Reset() if $Fighter1->{OK};
+ $Fighter2->Reset() if $Fighter2->{OK};
+ $Input1->Reset();
+ $Input2->Reset();
+}
+
+
=comment
JUDGEMENT METHODS
=cut
-sub JudgementStart
+sub JudgementStart($)
{
- $bgx = 0;
- $bgy = ( $SCRHEIGHT2 - $BGHEIGHT2 ) >> 1;
- $BgSpeed = 0;
- $BgPosition = 0;
- $BgScrollEnabled = 0;
- $OverTimer = 0;
+ ResetGame();
+ # $bgy = ( $SCRHEIGHT2 - $BGHEIGHT2 ) >> 1;
$JudgementMode = 1;
- $Debug = 0;
($JudgementWinner) = @_;
- ResetEarthquake();
-
- $over = 0;
- $Fighter1->Reset();
$Fighter1->{X} = ($JudgementWinner ? 150 : 520 ) * $GAMEBITS2;
$Fighter1->{DIR} = ($JudgementWinner ? 1 : -1 );
$Fighter1->{NEXTST} = 'Stand';
$Fighter1->Update();
- $Fighter2->Reset();
$Fighter2->{X} = ($JudgementWinner ? 520 : 150 ) * $GAMEBITS2;
$Fighter2->{DIR} = ($JudgementWinner ? -1 : 1 );
$Fighter2->{NEXTST} = 'Stand';
$Fighter2->Update();
-
- $Input1->Reset();
- $Input2->Reset();
}
=comment
PLAYER SELECTION METHODS
=cut
sub SelectStart
{
- $bgx = 0;
- $bgy = ( $SCRHEIGHT2 - $BGHEIGHT2 ) >> 1;
- $BgSpeed = 0;
- $BgPosition = 0;
- $BgScrollEnabled = 0;
- $OverTimer = 0;
- $JudgementMode = 0;
- $Debug = 0;
- ResetEarthquake();
+ ResetGame();
- $over = 0;
-
if ( $Fighter1->{OK} )
{
- $Fighter1->Reset();
$Fighter1->{X} = 80 * $GAMEBITS2;
$Fighter1->{NEXTST} = 'Stand';
$Fighter1->Update();
}
if ( $Fighter2->{OK} )
{
- $Fighter2->Reset();
$Fighter2->{X} = 560 * $GAMEBITS2;
$Fighter2->{NEXTST} = 'Stand';
$Fighter2->Update();
}
-
- $Input1->Reset();
- $Input2->Reset();
}
sub SetPlayerNumber
{
my ($player, $fighterenum) = @_;
my ($f);
DeleteDoodadsOf( $player );
$f = $player ? $Fighter2 : $Fighter1;
$f->Reset($fighterenum);
$f->{NEXTST} = 'Stand';
$f->Update();
GetFighterStats($fighterenum);
$::PlayerName = $::Name
}
sub PlayerSelected
{
my ($number) = @_;
my ($f) = $number ? $Fighter2 : $Fighter1;
$f->Event( 'Won' );
$f->Update();
}
=comment
EARTHQUAKE RELATED METHODS
=cut
@QUAKEOFFSET = ( 0, 6, 11, 15,
16, 15, 11, 6,
0, -6,-11,-15,
-16,-15,-11, -6, 0, 6 );
sub ResetEarthquake
{
$QuakeAmplitude = 0;
$QuakeOffset = 0;
$QuakeX = 0;
$QuakeY = 0;
}
sub AddEarthquake
{
my ($amplitude) = @_;
$QuakeAmplitude += $amplitude;
$QuakeAmplitude = 20 if ( $QuakeAmplitude > 20 );
}
sub AdvanceEarthquake
{
if ( $QuakeAmplitude <= 0.2 )
{
$QuakeAmplitude = $QuakeX = $QuakeY = 0;
return;
}
$QuakeAmplitude -= $QuakeAmplitude / 30 + 0.1;
$QuakeOffset = ( $QuakeOffset + 1 ) % 16;
$QuakeX = $QUAKEOFFSET[$QuakeOffset] * $QuakeAmplitude / 16;
$QuakeY = $QUAKEOFFSET[$QuakeOffset + 1] * $QuakeAmplitude / 16; # 1/1
$bgx -= $QuakeX;
$bgy -= $QuakeY;
$p1x += $QuakeX;
$p1y += $QuakeY;
$p2x += $QuakeX;
$p2y += $QuakeY;
# Do not quake doodads for now.
}
=comment
GAME BACKEND METHODS
=cut
-sub GameStart
+sub GameStart($$)
{
my ( $MaxHP, $debug ) = @_;
+
+ ResetGame();
- @Doodads = ();
- @Sounds = ();
$bgx = ( $SCRWIDTH2 - $BGWIDTH2) >> 1;
$bgy = ( $SCRHEIGHT2 - $BGHEIGHT2 ) >> 1;
- $BgSpeed = 0;
$BgPosition = $BgMax >> 1;
$BgScrollEnabled = 1;
$HitPointScale = 1000 / $MaxHP; # 1/1
$Debug = $debug;
- ResetEarthquake();
-
+
$Fighter1->Reset();
$Fighter1->{HP} = $MaxHP;
- $Input1->Reset();
$Fighter2->Reset();
$Fighter2->{HP} = $MaxHP;
- $Input2->Reset();
- $over = 0;
- $ko = 0;
- $OverTimer = 0;
- $JudgementMode = 0;
-
+
$p1h = $p2h = 0;
}
-sub GetFighterData
+=comment
+
+Takes a Fighter object, and returns the data relevant for the frontend.
+
+Parameters:
+$fighter The fighter which is to be converted to frontend data.
+
+Returns:
+$x The physical X coordinate of the fighter
+$y The physical Y coordinate of the fighter
+$fnum The frame number of the fighter. A negative sign means the
+ fighter is flipped horizontally (facing left)
+
+=cut
+
+sub GetFighterData($)
{
my ($fighter) = @_;
my ($x, $y, $fnum, $f, $hp);
$fnum = $fighter->{FR};
$f = $fighter->{FRAMES}->[$fnum];
$x = $fighter->{X} / $GAMEBITS2 + $f->{'x'};
$y = $fighter->{Y} / $GAMEBITS2 + $f->{'y'};
if ($fighter->{DIR}<0)
{
$fnum = -$fnum;
$x -= $f->{x}*2 + $f->{w};
}
return ($x, $y, $fnum);
}
sub GetNextDoodadData
{
if ( $NextDoodad >= scalar @Doodads )
{
$doodad_x = $doodad_y = $doodad_t = $doodad_f = $doodad_dir = $doodad_gfxowner = -1;
$doodad_text = '';
return;
}
my ($doodad) = $Doodads[$NextDoodad];
$doodad_x = $doodad->{POS}->[0] / $GAMEBITS2 - $bgx;
$doodad_y = $doodad->{POS}->[1] / $GAMEBITS2 - $bgy;
$doodad_t = $doodad->{T};
$doodad_f = $doodad->{F};
$doodad_dir = $doodad->{DIR};
$doodad_gfxowner = $doodad->{GFXOWNER};
$doodad_text = $doodad->{TEXT};
if ($doodad_gfxowner < 2 )
{
$doodad_x += $Fighters[$doodad_gfxowner]->{FRAMES}->[$doodad_f]->{'x'} * $doodad_dir;
$doodad_y += $Fighters[$doodad_gfxowner]->{FRAMES}->[$doodad_f]->{'y'};
}
++$NextDoodad;
}
sub UpdateDoodads
{
my ($i, $j, $doodad);
for ($i=0; $i<scalar @Doodads; ++$i)
{
$doodad = $Doodads[$i];
$j = Doodad::UpdateDoodad( $doodad );
if ( $j )
{
# Remove this Doodad
splice @Doodads, $i, 1;
--$i;
}
}
}
sub DeleteDoodadsOf($)
{
my ($owner) = @_;
my ($i, $doodad);
for ($i=0; $i<scalar @Doodads; ++$i)
{
$doodad = $Doodads[$i];
if ( $doodad->{OWNER} == $owner )
{
# Remove this Doodad
splice @Doodads, $i, 1;
--$i;
}
}
}
sub GetNextSoundData()
{
# print "GetSoundData: ", scalar @Sounds, join ' ,', @Sounds, "\n";
$sound = pop @Sounds;
$sound = '' unless defined $sound;
}
sub DoFighterEvents
{
my ($fighter, $hit) = @_;
if ( $JudgementMode )
{
if ( $fighter->{NUMBER} == $JudgementWinner )
{
$fighter->Event("Won");
}
else
{
$fighter->Event("Hurt");
}
return;
}
if ( $hit )
{
$fighter->HitEvent( $fighter->{OTHER}->GetCurrentState()->{HIT}, $hit );
return;
}
#if ( ($fighter->{X} - $fighter->{OTHER}->{X}) * ($fighter->{DIR}) > 0 )
if ( $fighter->IsBackTurned )
{
$fighter->Event("Turn");
}
if ( $fighter->{OTHER}->{ST} eq 'Dead' )
{
$fighter->Event("Won");
}
- if ( ($fighter->{IDLE} > 150) and (rand(350) < 1) )
+ if ( $fighter->{IDLE} > 150 )
{
- $fighter->Event("Fun");
- }
- if ( ($fighter->{IDLE} > 150) and (rand(350) < 1) )
- {
- $fighter->Event("Threat");
+ my ($r) = $fighter->QuasiRandom( 353 );
+ $fighter->Event("Fun") if $r==1;
+ $fighter->Event("Threat") if $r==2;
}
}
+
sub GameAdvance
{
my ($hit1, $hit2);
+ $gametick += 1;
+
$NextDoodad = 0;
$NextSound = 0;
# 1. ADVANCE THE PLAYERS
$Input1->Advance();
$Input2->Advance();
$Fighter1->Advance( $Input1 ) if $Fighter1->{OK};
$Fighter2->Advance( $Input2 ) if $Fighter2->{OK};
$hit2 = $Fighter1->CheckHit() if $Fighter1->{OK};
$hit1 = $Fighter2->CheckHit() if $Fighter2->{OK};
# 2. Events come here
DoFighterEvents( $Fighter1, $hit1 ) if $Fighter1->{OK};
DoFighterEvents( $Fighter2, $hit2 ) if $Fighter2->{OK};
UpdateDoodads();
$Fighter1->Update() if $Fighter1->{OK};
$Fighter2->Update() if $Fighter2->{OK};
if ( $OverTimer == 0 and
($Fighter1->{ST} eq 'Dead' or $Fighter1->{ST} eq 'Won2') and
($Fighter2->{ST} eq 'Dead' or $Fighter2->{ST} eq 'Won2') )
{
$OverTimer = 1;
}
elsif ( $OverTimer > 0 )
{
$OverTimer++;
$over = 1 if ( $OverTimer > 200 )
}
# 3. DO THE BACKGROUND SCROLLING THING
if ( $BgScrollEnabled )
{
$BgOpt = ($Fighter1->{X} + $Fighter2->{X}) / 2; # 1/1 Stupid kdevelop syntax hightlight.
if ( ($BgOpt - $BgSpeed*50 - $BgPosition) > (320 << $GAMEBITS)) { $BgSpeed++; }
if ( ($BgOpt - $BgSpeed*50 - $BgPosition) < (320 << $GAMEBITS)) { $BgSpeed--; }
$BgPosition+=$BgSpeed;
if ($BgPosition<0) { $BgPosition = $BgSpeed = 0; }
if ($BgPosition>$BgMax) { $BgPosition = $BgMax; $BgSpeed = 0; }
# print "Pos:$BgPosition\tOpt:$BgOpt\tSpd:$BgSpeed\t";
}
# 4. SET GLOBAL VARIABLES FOR THE C++ DRAWING TO READ
($p1x, $p1y, $p1f) = GetFighterData( $Fighter1 );
($p2x, $p2y, $p2f) = GetFighterData( $Fighter2 );
$phTarget = $Fighter1->{HP}*$HitPointScale;
if ( $p1h < $phTarget ) { $p1h += 5; }
if ( $p1h > $phTarget ) { $p1h -= 3; }
$p1h = $phTarget if abs($p1h - $phTarget) < 3;
$p1h = 0 if $p1h < 0;
$phTarget = $Fighter2->{HP}*$HitPointScale;
if ( $p2h < $phTarget ) { $p2h += 5; }
if ( $p2h > $phTarget ) { $p2h -= 3; }
$p2h = $phTarget if abs($p2h - $phTarget) < 3;
$p2h = 0 if $p2h < 0;
$bgx = $BgPosition >> $GAMEBITS;
$p1x -= $bgx;
$p2x -= $bgx;
$bgy = 0;
AdvanceEarthquake();
# 5. DEBUG POLYGONS
- return unless $Debug;
-
- $fr1 = $Fighter1->{FRAMES}->[ $Fighter1->{FR} ];
- @p1head = @{ $fr1->{head} };
- MirrorPolygon( \@p1head ) if $Fighter1->{DIR} < 0;
- OffsetPolygon( \@p1head, $Fighter1->{X} / $GAMEBITS2 - $bgx, $Fighter1->{Y} / $GAMEBITS2 - $bgy );
- @p1body = @{ $fr1->{body} };
- MirrorPolygon( \@p1body ) if $Fighter1->{DIR} < 0;
- OffsetPolygon( \@p1body, $Fighter1->{X} / $GAMEBITS2 - $bgx, $Fighter1->{Y} / $GAMEBITS2 - $bgy );
- @p1legs = @{ $fr1->{legs} };
- MirrorPolygon( \@p1legs) if $Fighter1->{DIR} < 0;
- OffsetPolygon( \@p1legs, $Fighter1->{X} / $GAMEBITS2 - $bgx, $Fighter1->{Y} / $GAMEBITS2 - $bgy );
- if ( defined $fr1->{hit} )
- {
- @p1hit = @{ $fr1->{hit} };
- MirrorPolygon( \@p1hit ) if $Fighter1->{DIR} < 0;
- OffsetPolygon( \@p1hit, $Fighter1->{X} / $GAMEBITS2 - $bgx, $Fighter1->{Y} / $GAMEBITS2 - $bgy );
- }
- else
+ if ( $Debug )
{
- undef @p1hit;
+ $fr1 = $Fighter1->{FRAMES}->[ $Fighter1->{FR} ];
+ @p1head = @{ $fr1->{head} };
+ MirrorPolygon( \@p1head ) if $Fighter1->{DIR} < 0;
+ OffsetPolygon( \@p1head, $Fighter1->{X} / $GAMEBITS2 - $bgx, $Fighter1->{Y} / $GAMEBITS2 - $bgy );
+ @p1body = @{ $fr1->{body} };
+ MirrorPolygon( \@p1body ) if $Fighter1->{DIR} < 0;
+ OffsetPolygon( \@p1body, $Fighter1->{X} / $GAMEBITS2 - $bgx, $Fighter1->{Y} / $GAMEBITS2 - $bgy );
+ @p1legs = @{ $fr1->{legs} };
+ MirrorPolygon( \@p1legs) if $Fighter1->{DIR} < 0;
+ OffsetPolygon( \@p1legs, $Fighter1->{X} / $GAMEBITS2 - $bgx, $Fighter1->{Y} / $GAMEBITS2 - $bgy );
+ if ( defined $fr1->{hit} )
+ {
+ @p1hit = @{ $fr1->{hit} };
+ MirrorPolygon( \@p1hit ) if $Fighter1->{DIR} < 0;
+ OffsetPolygon( \@p1hit, $Fighter1->{X} / $GAMEBITS2 - $bgx, $Fighter1->{Y} / $GAMEBITS2 - $bgy );
+ }
+ else
+ {
+ undef @p1hit;
+ }
+
+ $fr2 = $Fighter2->{FRAMES}->[ $Fighter2->{FR} ];
+ @p2head = @{ $fr2->{head} };
+ MirrorPolygon( \@p2head ) if $Fighter2->{DIR} < 0;
+ OffsetPolygon( \@p2head, $Fighter2->{X} / $GAMEBITS2 - $bgx, $Fighter2->{Y} / $GAMEBITS2 - $bgy );
+ @p2body = @{ $fr2->{body} };
+ MirrorPolygon( \@p2body ) if $Fighter2->{DIR} < 0;
+ OffsetPolygon( \@p2body, $Fighter2->{X} / $GAMEBITS2 - $bgx, $Fighter2->{Y} / $GAMEBITS2 - $bgy );
+ @p2legs = @{ $fr2->{legs} };
+ MirrorPolygon( \@p2legs) if $Fighter2->{DIR} < 0;
+ OffsetPolygon( \@p2legs, $Fighter2->{X} / $GAMEBITS2 - $bgx, $Fighter2->{Y} / $GAMEBITS2 - $bgy );
+ if ( defined $fr2->{hit} )
+ {
+ @p2hit = @{ $fr2->{hit} };
+ MirrorPolygon( \@p2hit ) if $Fighter2->{DIR} < 0;
+ OffsetPolygon( \@p2hit, $Fighter2->{X} / $GAMEBITS2 - $bgx, $Fighter2->{Y} / $GAMEBITS2 - $bgy );
+ }
+ else
+ {
+ undef @p2hit;
+ }
}
- $fr2 = $Fighter2->{FRAMES}->[ $Fighter2->{FR} ];
- @p2head = @{ $fr2->{head} };
- MirrorPolygon( \@p2head ) if $Fighter2->{DIR} < 0;
- OffsetPolygon( \@p2head, $Fighter2->{X} / $GAMEBITS2 - $bgx, $Fighter2->{Y} / $GAMEBITS2 - $bgy );
- @p2body = @{ $fr2->{body} };
- MirrorPolygon( \@p2body ) if $Fighter2->{DIR} < 0;
- OffsetPolygon( \@p2body, $Fighter2->{X} / $GAMEBITS2 - $bgx, $Fighter2->{Y} / $GAMEBITS2 - $bgy );
- @p2legs = @{ $fr2->{legs} };
- MirrorPolygon( \@p2legs) if $Fighter2->{DIR} < 0;
- OffsetPolygon( \@p2legs, $Fighter2->{X} / $GAMEBITS2 - $bgx, $Fighter2->{Y} / $GAMEBITS2 - $bgy );
- if ( defined $fr2->{hit} )
- {
- @p2hit = @{ $fr2->{hit} };
- MirrorPolygon( \@p2hit ) if $Fighter2->{DIR} < 0;
- OffsetPolygon( \@p2hit, $Fighter2->{X} / $GAMEBITS2 - $bgx, $Fighter2->{Y} / $GAMEBITS2 - $bgy );
- }
- else
- {
- undef @p2hit;
- }
-
-
}
diff --git a/data/script/CollectStats.pl b/data/script/CollectStats.pl
new file mode 100644
index 0000000..c5d5898
--- /dev/null
+++ b/data/script/CollectStats.pl
@@ -0,0 +1,35 @@
+#!/usr/bin/perl -w
+
+require 'FighterStats.pl';
+require 'QuickSave.pl';
+
+sub RegisterFighter($)
+{
+ my ($reginfo) = @_;
+ print "Registering: ", $reginfo->{ID}, "\n";
+}
+
+@chars = `ls ../characters/*.pl`;
+chomp @chars;
+
+print join (',',@chars), "\n";
+
+foreach $char (@chars) {
+ require $char;
+}
+
+while (($key,$val) = each %FighterStats ) {
+ delete $val->{STATES};
+ delete $val->{FRAMES};
+ delete $val->{STARTCODE};
+}
+
+$allstats = store( \%::FighterStats );
+$allstats =~ s/^{/\(/s;
+$allstats =~ s/}$/\)/s;
+
+open OUTPUT, ">CollectedStats.pl";
+print OUTPUT "%::FighterStats = ";
+print OUTPUT $allstats;
+print OUTPUT ";";
+close OUTPUT;
diff --git a/data/script/CollectedStats.pl b/data/script/CollectedStats.pl
new file mode 100644
index 0000000..fd33750
--- /dev/null
+++ b/data/script/CollectedStats.pl
@@ -0,0 +1,577 @@
+%::FighterStats = ( '103' => { 'DATAVERSION' => '1',
+ 'CODENAME' => 'Mrsmith',
+ 'WEIGHT' => '80kg',
+ 'DATAFILE' => 'Mrsmith.dat',
+ 'STORY' => 'Mr. Smith comes from the shadows, where he and his evil, disgraced family of de
+mons resided for such a dementing long time. Now, as the last member of his inge
+nious breed, Mr. Smith takes on the tournament to reclaim every of all possessio
+ns his family lost under the dark ages of The Returning Of The Good Wizards. Uns
+toppable and strong enough to beat a Black Dragon by his own hands, Mr. Smith se
+eks trouble wherever he thinks there could be one.',
+ 'SHOE' => '44',
+ 'NAME' => 'Mr. Smith',
+ 'TEAM' => 'Spontán',
+ 'STYLE' => 'beer-fu',
+ 'ID' => '103',
+ 'AGE' => '23',
+ 'EMAIL' => 'zaphir@sch.bme.hu',
+ 'GENDER' => '1',
+ 'DATASIZE' => '6259470',
+ 'HEIGHT' => '185cm',
+ },
+ '7' => { 'WEIGHT-hu' => '85',
+ 'AGE-hu' => '20',
+ 'NAME-hu' => 'Taka Ito',
+ 'DATAVERSION' => '1',
+ 'CODENAME' => 'Bence',
+ 'WEIGHT' => '85kg',
+ 'SHOE' => '39',
+ 'STORY' => 'The "Japanese giant" is a sworn enemy of Descant... after he left
+muddy boot marks all over the freshly mopped porch of the pub, er,
+dojo which has belonged to his ancestors for 16 generations. Since
+he has turned to the dark side of the janitor. His knowledge of
+the "way of the concierge" matches his deep hatred towards army
+boots.',
+ 'DATAFILE' => 'Bence.dat',
+ 'KEYS' => 'Down Back LPunch - Soap Throw
+Back Fw Back Fw LPunch - Stick Spin
+Back Forward HPunc - Pierce',
+ 'SHOE-hu' => '39',
+ 'NAME' => 'Jan Ito',
+ 'HEIGHT-hu' => '172',
+ 'TEAM' => 'Evil',
+ 'STYLE' => 'Kururin-do',
+ 'ID' => '7',
+ 'AGE' => '20',
+ 'STYLE-hu' => 'Kururin-do',
+ 'STORY-hu' => 'A japán óriás Descant esküdt ellensége, mióta összejárta az általa frissen felmosott
+verandát a 16 generáció óta családja által birtokolt foga-do-ban. Tudását a sötét
+oldal szolgálatába állította. Tudását a "gondnok útján" csak mélységes megvetése a
+vasaltorrú bakancsok iránt szárnyalja túl.',
+ 'GENDER' => '1',
+ 'DATASIZE' => '6750636',
+ 'TEAM-hu' => 'Gonosz',
+ 'HEIGHT' => '172cm',
+ },
+ '15' => { 'TEAM' => 'Good',
+ 'STYLE' => 'Glamour',
+ 'ID' => '15',
+ 'AGE' => '140',
+ 'WEIGHT' => '1',
+ 'CODENAME' => 'Elf',
+ 'STORY' => '...',
+ 'SHOE' => '1',
+ 'NAME' => 'Pixie',
+ 'HEIGHT' => '1',
+ },
+ '10' => { 'WEIGHT-hu' => 'N/A',
+ 'AGE-hu' => '500',
+ 'NAME-hu' => 'Rising-san',
+ 'WEIGHT' => 'N/A',
+ 'CODENAME' => 'Surba',
+ 'STORY' => 'Mistically disappeared Aeons ago.. on a Saturday! Now he is back, and
+brought back his destructive techique, unmatched on Earth. Noone knows
+why he joined the Dark Evil Mage...',
+ 'SHOE' => 'N/A',
+ 'SHOE-hu' => 'Nem visel',
+ 'NAME' => 'Rising-san',
+ 'HEIGHT-hu' => '50',
+ 'TEAM' => 'Evil',
+ 'STYLE' => 'Flick-fu',
+ 'ID' => '10',
+ 'AGE' => '500',
+ 'STORY-hu' => 'Sok-sok évvel ezel"ott eltûnt misztikus körülmények között... egy szombati napon!
+És most visszatért. Senki sem tudja honnan jött, de magával hozta pusztító technikáját
+melynek nincs párja a földön. Senki sem érti miért fogadta el a gonosz varázsl
+megbízását...',
+ 'STYLE-hu' => 'Pöcc-fu',
+ 'TEAM-hu' => 'Gonosz',
+ 'HEIGHT' => '50',
+ },
+ '102' => { 'DATAVERSION' => '1',
+ 'CODENAME' => 'Jacint',
+ 'WEIGHT' => '200kg',
+ 'DATAFILE' => 'Jacint.dat',
+ 'STORY' => 'Eats grass. Wanna win the qpa.',
+ 'SHOE' => 'don\'t wear shoes',
+ 'NAME' => 'Jacint',
+ 'TEAM' => 'Schiman',
+ 'STYLE' => 'thei-fu',
+ 'ID' => '102',
+ 'AGE' => '13',
+ 'EMAIL' => 'jimmi@sch.bme.hu',
+ 'GENDER' => '1',
+ 'DATASIZE' => '5534158',
+ 'HEIGHT' => '140 cm',
+ },
+ '1' => { 'WEIGHT-hu' => '50kg + vaságy',
+ 'DATAVERSION' => '1',
+ 'CODENAME' => 'Ulmar',
+ 'WEIGHT' => '50kg',
+ 'SHOE' => '51',
+ 'STORY' => 'After Wastasiwa baka janajo took possession of his time\'s most advanced
+technogadget (read: by accident he was punched so hard that he flew fight into
+a high-tech lab, and got tangled with the WrISt(tm)),
+
+he used all his knowledge to travel to the past (read: he started mashing the buttons, and
+this is how it ended).
+
+Then he knew immediately that he had to destroy
+Saturday! (Read: He has absolutely no idea where he is, or what he is doing...)',
+ 'DATAFILE' => 'Ulmar.dat',
+ 'KEYS' => 'Back HPunch - Spinning headbutt
+Down Back LPunch - WrISt shot
+Forward Back Forward LPunch - WrISt mash',
+ 'SHOE-hu' => '51',
+ 'NAME' => 'Watasiwa baka janajo',
+ 'HEIGHT-hu' => '168cm',
+ 'TEAM' => 'Evil',
+ 'STYLE' => 'Clown-fu',
+ 'ID' => '1',
+ 'AGE' => '15',
+ 'STYLE-hu' => 'Bohóc-fu',
+ 'STORY-hu' => 'Miután Wasaiwa baka janaijo elszajrézta a kora legfejletebb tudományos cuccosát
+(véletlenül úgy behúztak neki, hogy berepült a laboratoriumba és rátekeredett a CsUKlo(tm)),
+
+azután minden tudását latba vetve vissza utazott a múltba (elkezdte nyomkodni a gombokat a
+CsUKlo(tm)-en és ez lett belõle).
+
+Ezekután már rögtön tudta, hogy itt el kell pusztitania a Szombatot! (õ sem tudja, hogy hol
+is van éppen illetve mit is csinál...)',
+ 'GENDER' => '1',
+ 'DATASIZE' => '6316271',
+ 'TEAM-hu' => 'Gonosz',
+ 'HEIGHT' => '168cm',
+ },
+ '11' => { 'WEIGHT-hu' => '110',
+ 'AGE-hu' => '35',
+ 'NAME-hu' => 'Fûrészes Õrült',
+ 'DATAVERSION' => '1',
+ 'CODENAME' => 'Ambrus',
+ 'WEIGHT' => '110',
+ 'SHOE' => '49',
+ 'STORY' => 'His cradle was found on a tree. Later he chopped up the family that
+took him and fed them to the bears. He has been roaming the Canadian
+forests, chopping trees and heads alike. On hot summer nights his
+maniac laughter echoes far.',
+ 'DATAFILE' => 'Ambrus.dat',
+ 'KEYS' => 'Down Back LPunch - Axe Toss
+Back Forward HKick - Chop Chop
+Forward Forward LKick - Bonesaw',
+ 'SHOE-hu' => '49',
+ 'NAME' => 'Mad Sawman',
+ 'HEIGHT-hu' => '120',
+ 'TEAM' => 'Evil',
+ 'STYLE' => 'Sawing',
+ 'ID' => '11',
+ 'AGE' => '35',
+ 'STYLE-hu' => 'Fanyûvõ',
+ 'STORY-hu' => 'Bölcsõjét egy fán találták meg. Késõbb felaprította az egész befogadó családját, és
+megetette a medvékkel. Azóta a kanadai erdõkben bolyongva vágja a fákat és az
+emberfejeket. Forró nyári éjszakákon mindig hallatszik õrült kacaja.',
+ 'GENDER' => '1',
+ 'DATASIZE' => '6462957',
+ 'TEAM-hu' => 'Gonosz',
+ 'HEIGHT' => '120',
+ },
+ '6' => { 'TEAM' => 'Good',
+ 'STYLE' => 'Macy-fu',
+ 'ID' => '6',
+ 'AGE' => '17',
+ 'DATAVERSION' => '1',
+ 'CODENAME' => 'Macy',
+ 'WEIGHT' => '41kg',
+ 'STORY-hu' => 'kb. néhány évvel ezelõtt, (vagy talán egy kicsit korábban, esetleg
+késõbb) a felhõk között egy pólyában találtak rá (zuhanás közben).
+
+A bátor
+Songokutól elleste a harcmûvészet mesteri fortélyait, igy talpra esett és
+nem halt meg. Azóta is halhatatlan. Ki tudja, még meddig? Talán a
+következõ harcig a gonosz ellen...',
+ 'GENDER' => '2',
+ 'DATASIZE' => '5151824',
+ 'SHOE' => '37',
+ 'STORY' => 'A few years ago (perhaps a little earlier, or maybe later) she was
+found among the clouds in a cradle (falling, of course). She learned
+martial art from brave Son Goku, so she landed on her feet and didn\'t
+die. She\'s been immortal ever since. Who knows for how long? Maybe
+it won\'t be until the next fight agains Evil...',
+ 'DATAFILE' => 'Macy.dat',
+ 'KEYS' => 'Down Back LPunch - Toss
+Forward Forward HKick - Scissor Kick',
+ 'NAME' => 'Macy',
+ 'HEIGHT' => '175cm',
+ },
+ '100' => { 'NAME.hu' => 'Agent Krampusz',
+ 'STYLE.hu' => 'Neo-puff-fu',
+ 'DATAVERSION' => '1',
+ 'CODENAME' => 'Agent',
+ 'WEIGHT' => '80kg',
+ 'DATAFILE' => 'Agent.dat',
+ 'STORY' => 'Once upon a time, there was a competition named after the infamous hostel Schonherz. In this competition
+several hundred different tasks are sent out to be solved by a similar number of students. Creating this
+character was part of such a task.',
+ 'SHOE' => '44',
+ 'GAMEVERSION' => '0.4',
+ 'NAME' => 'Agent Boogie',
+ 'WEIGHT.hu' => '80kg',
+ 'TEAM' => 'Schonherz',
+ 'STYLE' => 'Neo-bang-fu',
+ 'ID' => '100',
+ 'AGE' => '22',
+ 'AGE.hu' => '22',
+ 'GENDER' => '1',
+ 'DATASIZE' => '4542272',
+ 'TEAM.hu' => 'Schonherz',
+ 'HEIGHT.hu' => '180cm',
+ 'SHOE.hu' => '44',
+ 'STORY.hu' => 'Once upon a time, there was a competition named after the infamous hostel Schonherz. In this competition
+several hundred different tasks are sent out to be solved by a similar number of students. Creating this
+character was part of such a task.',
+ 'HEIGHT' => '180cm',
+ },
+ '9' => { 'WEIGHT-hu' => '89',
+ 'AGE-hu' => '58',
+ 'NAME-hu' => 'Descant',
+ 'DATAVERSION' => '1',
+ 'CODENAME' => 'Descant',
+ 'WEIGHT' => '89kg',
+ 'SHOE' => '44',
+ 'STORY' => 'He was trained in \'Nam in every known weapon and martial art form.
+He fought there on the side of the Americans and the Russians...
+whoever paid more at the moment. Then he used the money to hybernate
+himself until the next great war.. or until the Saturday is in
+trouble. He joined the side with the more CASH...',
+ 'DATAFILE' => 'Descant.dat',
+ 'KEYS' => 'Down Back LPunch - Aimed Shot
+Back Back LPunch - Hip Shot
+Forward Down HPunch - Knife Throw
+Forward Forward HPunch - Gun Hit',
+ 'SHOE-hu' => '44',
+ 'NAME' => 'Descant',
+ 'HEIGHT-hu' => '180',
+ 'TEAM' => 'Good',
+ 'STYLE' => 'Murderization',
+ 'ID' => '9',
+ 'AGE' => '58',
+ 'STYLE-hu' => '+halol',
+ 'STORY-hu' => 'A Vietnámi háború során képezték ki minden ismert fegyverre és harcm~uvészetre. Már ott
+is az Oroszok és az Amerikaik oldalán harcolt, már aki éppen többet fizetett. Ezután a pénzb"ol
+hibernáltatta magát és csak háborúk esetén olvasztatja föl magát, vagy most mikor a szombat
+bajba kerül most is azon az oldalon van, ahol vastagabb a BUKSZA, most épp a...',
+ 'GENDER' => '1',
+ 'DATASIZE' => '5877193',
+ 'TEAM-hu' => 'Jó',
+ 'HEIGHT' => '180cm',
+ },
+ '2' => { 'WEIGHT-hu' => '70kg',
+ 'AGE-hu' => '30',
+ 'NAME-hu' => 'Sötét Fekete Gonosz Mágus',
+ 'DATAVERSION' => '1',
+ 'CODENAME' => 'UPi',
+ 'WEIGHT' => '70kg',
+ 'SHOE' => '42',
+ 'STORY' => 'Member of the Evil Killer Black Antipathic Dim (witted) Fire Mages Leage.
+He was sent to destroy Saturday now and forever! Or maybe he has a secret
+agenda that noone knows about..? Nah...',
+ 'DATAFILE' => 'UPi.dat',
+ 'KEYS' => 'Back HKick - Spinkick
+Forward Forward HKick - Crane kick
+Down Back LPunch - Fireball
+(also works while crouching)
+Back Up HPunch - Burning Hands',
+ 'SHOE-hu' => '42',
+ 'NAME' => 'Dark Black Evil Mage',
+ 'HEIGHT-hu' => '180cm',
+ 'TEAM' => 'Evil leader',
+ 'STYLE' => 'Piro-fu',
+ 'ID' => '2',
+ 'AGE' => '30',
+ 'STYLE-hu' => 'Piro-fu',
+ 'STORY-hu' => 'A Gonosz Gyilkos Fekete Ellenszenves Sötét (elméjü) tüzvarázslók ligájának
+tagja, kit azzal bíztak meg, hogy elpusztítsa a szombatot egyszer, s
+mindörökre. Talán van valami hátsó szándéka, amirõl senki sem tud? Nincs!',
+ 'GENDER' => '1',
+ 'DATASIZE' => '6462957',
+ 'TEAM-hu' => 'Gonosz vezér',
+ 'HEIGHT' => '180cm',
+ },
+ '3' => { 'WEIGHT-hu' => '80kg',
+ 'AGE-hu' => '16',
+ 'NAME-hu' => 'Boxer',
+ 'DATAVERSION' => '1',
+ 'CODENAME' => 'Zoli',
+ 'WEIGHT' => '80kg',
+ 'SHOE' => '43',
+ 'STORY' => 'Boxer joined the Mortal Szombat team for the sole purpose to punch as
+many people as hard as he possibly can. He has no other purpose
+whatsoever, but at least this keeps him entertained for the time being.',
+ 'DATAFILE' => 'Zoli.dat',
+ 'KEYS' => 'Back HPunch - Spinning punch
+Down Back LPunch - Weight toss
+Forward Forward HPunch - Leaping punch',
+ 'SHOE-hu' => '43',
+ 'NAME' => 'Boxer',
+ 'HEIGHT-hu' => '180cm',
+ 'TEAM' => 'Evil',
+ 'STYLE' => 'Kickbox-fu',
+ 'ID' => '3',
+ 'AGE' => '16',
+ 'STYLE-hu' => 'Kickbox-fu',
+ 'STORY-hu' => 'Boxer azért csatlakozott a Mortál Szombat csapathoz, hogy minél több
+embernek besomhasson, minél többször, és minél nagyobbat. Más célja ezen
+kívül nincs, de ez is remekül elszórakoztatja középtávon',
+ 'GENDER' => '1',
+ 'DATASIZE' => '4486206',
+ 'TEAM-hu' => 'Gonosz',
+ 'HEIGHT' => '180cm',
+ },
+ '5' => { 'TEAM' => 'Good',
+ 'STYLE' => 'Don\'tHurtMe-FU',
+ 'ID' => '5',
+ 'AGE' => '24',
+ 'DATAVERSION' => '1',
+ 'CODENAME' => 'Sirpi',
+ 'WEIGHT' => '76kg',
+ 'STYLE-hu' => 'Nebánts-FU',
+ 'STORY-hu' => 'Sok évnyi hardcore gamerkedés után, miközben el is hízott jól,
+kikapcsolták nála a villanyt.
+
+Erre nagyon hülye pofát vágott, és ez igy is
+marad mindaddig, amíg le nem számol õsellenségével (vagy még utána is).
+Ezért csatlakozott a jók kicsiny csapatához... Meg amúgy is fél egyedül.',
+ 'GENDER' => '1',
+ 'DATASIZE' => '5587262',
+ 'SHOE' => '41',
+ 'STORY' => 'After being a "hardcore" gamer for several years and consuming a
+great amount of food, his electricity was turned off. This has caused
+him to make a very stupid face which lasts till this day, and will
+last until he has defeated his archenemy. This is why he resolved to
+join the good team... also he is frightened alone.',
+ 'DATAFILE' => 'Sirpi.dat',
+ 'KEYS' => 'Down Forward LPunch - Surprise
+Forward Forward HPunch - Applause',
+ 'NAME' => 'Sirpi',
+ 'HEIGHT' => '170cm',
+ },
+ '12' => { 'WEIGHT-hu' => '100',
+ 'AGE-hu' => '50',
+ 'NAME-hu' => 'Tökéletlen Katona',
+ 'DATAVERSION' => '1',
+ 'CODENAME' => 'Dani',
+ 'WEIGHT' => '100',
+ 'SHOE' => '44',
+ 'STORY' => 'His childhood was determined by Drezda\'s bombing. This trauma has
+caused him to join the army. For the last 30 years he is corporal
+without the slightest hope for advancement. He annoys his
+subordinates with a constant flow of stories of pub fights, until
+they ask for relocation.',
+ 'DATAFILE' => 'Dani.dat',
+ 'KEYS' => 'Down Back LPunch - Hat
+Forward Forward HPunch - Ramming Attack
+Back Down Back LPunch - Stab
+Back Forward LKick - Poke',
+ 'SHOE-hu' => '44',
+ 'NAME' => 'Imperfect Soldier',
+ 'HEIGHT-hu' => '180',
+ 'TEAM' => 'Good',
+ 'STYLE' => 'Pub Fight',
+ 'ID' => '12',
+ 'AGE' => '50',
+ 'STYLE-hu' => 'Kocsmabunyó',
+ 'STORY-hu' => 'Gyermekkorát meghatározta Drezda lebombázása. E trauma hatására katonai
+pályára állt. Immáron 30 éve a Bundeswehr kötelékében tizedes az
+elõléptetés bárminem~u esélye nélkül.
+
+Alantasait folytonosan kocsmai bunyóinak történeteivel traktálja, amíg azok
+áthelyezésüket nem kérik.',
+ 'GENDER' => '1',
+ 'DATASIZE' => '6462957',
+ 'TEAM-hu' => 'Jó',
+ 'HEIGHT' => '180',
+ },
+ '8' => { 'WEIGHT-hu' => '50000000',
+ 'AGE-hu' => '21',
+ 'NAME-hu' => 'Grizli',
+ 'DATAVERSION' => '1',
+ 'CODENAME' => 'Grizli',
+ 'WEIGHT' => 'Several tons',
+ 'SHOE' => '49',
+ 'STORY' => 'Grizzly has been long famous for his laziness. He has made laziness a
+form of art. In the past 5 years he has been to lazy to watch TV. Every
+Saturday he trains in his own special fighting style, one not unlike
+that of Bud Spencer, whom he holds as his honorary master. Though,
+since he found out that Bud WORKS on Saturdays, he has revoked his
+title, and keeps it for himself. He has joined the Good team to fight
+to protect the Saturday.',
+ 'DATAFILE' => 'Grizli.dat',
+ 'KEYS' => 'Down Back LPunch - Bear Shot
+Forward Forward HPunch - Poke
+Down Down LKick - Earthquake
+Back Forward Back HPunch - Nunchaku',
+ 'SHOE-hu' => '49',
+ 'NAME' => 'Grizzly',
+ 'HEIGHT-hu' => '170',
+ 'TEAM' => 'Good',
+ 'STYLE' => 'Bear dance',
+ 'ID' => '8',
+ 'AGE' => '21',
+ 'STYLE-hu' => 'Gyakás ala Medve',
+ 'STORY-hu' => 'Grili a lustaságáról volt hires mindig. Olyannyira, hogy amilyen szinten
+azt csinálja, az már mûvészet. Az utóbbi 5 évben már a TV
+nézéshez is lusta lett.
+
+Minden Szobaton tart edzést a Különbenmegintdühbejövünk do
+stilusból, amit még kezdõ korában a TV-bõl sajátított el. A stilus
+tiszteletbeli nagymestere maga Bád Szpencer, de sajnos miután Bád-ról
+kiderült, hogy szombatonként dolgozik, Grizli elvette tõle a cimet, s
+azóta magának tartogatja.
+
+Grizli a szombat ellenesek ádáz gyûlölõje, a jó csapat oszlopos tagja.',
+ 'GENDER' => '1',
+ 'DATASIZE' => '7138871',
+ 'TEAM-hu' => 'Jó',
+ 'HEIGHT' => '170cm',
+ },
+ '4' => { 'WEIGHT-hu' => '55',
+ 'AGE-hu' => '15',
+ 'NAME-hu' => 'Cumi',
+ 'DATAVERSION' => '1',
+ 'CODENAME' => 'Cumi',
+ 'WEIGHT' => '55kg',
+ 'SHOE' => '41.5',
+ 'STORY' => 'His life ambition was to drive a car. Now that this was accomplished,
+he has turned to his second greatest ambition: to be a great martial
+artist superhero. As a start, he has watched the TV series "Kung fu"
+from beginning to end, in one session. His current training consists
+of but this.',
+ 'DATAFILE' => 'Cumi.dat',
+ 'KEYS' => 'Down Back LPunch - Finger Shot
+Forward Forward HPunch - Spit
+Back Down Forward - Baseball',
+ 'SHOE-hu' => '41.5',
+ 'NAME' => 'Cumi',
+ 'HEIGHT-hu' => '170',
+ 'TEAM' => 'Good Leader',
+ 'STYLE' => 'N/A',
+ 'ID' => '4',
+ 'AGE' => '15',
+ 'STYLE-hu' => 'N/A',
+ 'STORY-hu' => 'Elete fo ambicioja volt, hogy autot vezessen. Most hogy ezt teljesitette, masodik fo
+amibicioja fele fordult: hogy nagy harcmuvessze valjon. Kezdetben ehhez megnezte
+a Kung fu sorozatot elejetol vegeig egyulteben. Kepzettsege jelenleg ebbol all.',
+ 'GENDER' => '1',
+ 'DATASIZE' => '5365949',
+ 'TEAM-hu' => 'Jo vezer',
+ 'HEIGHT' => '170cm',
+ },
+ '101' => { 'DATAVERSION' => '1',
+ 'CODENAME' => 'Tejszin',
+ 'WEIGHT' => '130kg',
+ 'DATAFILE' => 'Tejszin.dat',
+ 'STORY' => 'long,long, time ago....:)',
+ 'SHOE' => '45',
+ 'NAME' => '[10g] Tej-szin',
+ 'TEAM' => '[10g]',
+ 'STYLE' => 'ultrabrutal',
+ 'ID' => '101',
+ 'AGE' => '160',
+ 'EMAIL' => 'lameron@sch.bme.hu',
+ 'GENDER' => '1',
+ 'DATASIZE' => '9469281',
+ 'HEIGHT' => '180cm',
+ },
+ '105' => { 'DATAVERSION' => '1',
+ 'CODENAME' => 'Sleepy',
+ 'WEIGHT' => '80kg',
+ 'DATAFILE' => 'Sleepy.dat',
+ 'STORY' => 'az most nincs',
+ 'SHOE' => 'Atlagmamusz',
+ 'NAME' => 'Sleepy',
+ 'TEAM' => 'Mindegy',
+ 'STYLE' => 'sleep-fu',
+ 'ID' => '105',
+ 'AGE' => '25',
+ 'EMAIL' => 'orca@wap.hu',
+ 'GENDER' => '1',
+ 'DATASIZE' => '6809466',
+ 'HEIGHT' => '185cm',
+ },
+ '104' => { 'TEAM' => 'Good',
+ 'STYLE' => 'cserno-fu',
+ 'ID' => '104',
+ 'AGE' => '60',
+ 'DATAVERSION' => '1',
+ 'CODENAME' => 'Jozsi',
+ 'WEIGHT' => '70kg',
+ 'DATASIZE' => '6004229',
+ 'GENDER' => '1',
+ 'DATAFILE' => 'Jozsi.dat',
+ 'STORY' => 'Jozsi, the ex-designer, after 56hours of non-stop image-editing unexpectedly ju
+st broke down, left his office, and went to live in the mountains. He tried to l
+ive in peace with the nature, far from the civilization, but he couldn\'t defeat
+a voice in his head: REVENGE!
+So now he\'s here...',
+ 'SHOE' => '45',
+ 'NAME' => 'Jozsi a hegyrol',
+ 'HEIGHT' => '185cm',
+ },
+ '14' => { 'WEIGHT-hu' => 'Nagyon súlyos!',
+ 'AGE-hu' => 'Feudális közép...',
+ 'TEAM' => 'Evil',
+ 'STYLE' => 'Gloom',
+ 'NAME-hu' => 'Apatsuka Anyatsuba',
+ 'ID' => '14',
+ 'AGE' => 'Feudal Middle',
+ 'STORY-hu' => 'Apatsukát 4 éves kora óta nevelték szülei a szamuráj életmódra, szigor
+keretek között. Apja az elmúlt 20 év leghíresebb harcosa volt. Amint
+minden harci fogást elsajátított apjától, megskalpolta és a skalpját
+fejére illesztette, ezzel megfélemlítve ellenségeit.
+
+Hétközben nõket
+hajszolt, szombaton szívott és berugott. Aztán úgy döntött, hogy ezen a
+szombaton csak õ érezheti jól magát...',
+ 'STYLE-hu' => 'Komor',
+ 'WEIGHT' => 'Dead',
+ 'CODENAME' => 'Misi',
+ 'STORY' => 'Papastuka has been raised strictly in the way of the samurai since age 4.
+His father was the most famous warrior of the past 20 years. After he
+learned all the jutsu from dad, he skalped him, and put the skalp on his head
+to scare his enemies.
+
+On weekdays he is seen chasing women, saturdays he
+drinks a lot. Then he decided, that enjoying saturday should belong to him
+alone...',
+ 'SHOE' => '43,12748252',
+ 'TEAM-hu' => 'Gonosz',
+ 'NAME' => 'Papatsuka Mamatsuba',
+ 'HEIGHT' => '178 cm',
+ },
+ '13' => { 'TEAM' => 'Good',
+ 'STYLE' => 'Death Dance',
+ 'ID' => '13',
+ 'AGE' => '21',
+ 'DATAVERSION' => '1',
+ 'CODENAME' => 'Kinga',
+ 'WEIGHT' => '43.5',
+ 'STORY-hu' => 'A megprobaltatasok akkor kezdodtek, amikor anyukaja a szive alatt hordta.
+Egyetlen koldokzsinoron fuggott az elete! De megszuletett vegul, ezert
+kapta az Aisha ("mindent tulelo") nevet. Aztan gyermekkoratol fogva sok
+termeszeti katasztrofat, terrortamadast atveszelt, es mar kezdett elege
+lenni az egeszbol, igy hat az egyik alkalommal kijelentette, hogy ha ezt
+tulelem, csatlakozom azokhoz a hulye Mortalosokhoz!',
+ 'GENDER' => '2',
+ 'DATASIZE' => '6462957',
+ 'SHOE' => '35',
+ 'STORY' => 'Her trials started right in the womb.. her life hung on a single
+umbilical cord! But she was finally born, and got the name
+Aisha ("survives everything"). Since her childhood she survived
+natural disasters and terrorist attacks, and got frankly fed up.
+So one time she said:
+
+"If I survive this, I swear, I\'ll join those stupid Mortal guys!"',
+ 'DATAFILE' => 'Kinga.dat',
+ 'NAME' => 'Aisha',
+ 'HEIGHT' => '155',
+ },
+ );
\ No newline at end of file
diff --git a/data/script/DataHelper.pl b/data/script/DataHelper.pl
index 0d021b6..a6aebd6 100644
--- a/data/script/DataHelper.pl
+++ b/data/script/DataHelper.pl
@@ -1,661 +1,661 @@
# DataHelper contains subroutines useful for loading a character's
# frames, and creating his states.
use strict;
require 'FighterStats.pl';
=comment
SITUATIONS ARE:
Ready, Stand, Crouch, (Midair = any + character is flying), Falling
SITUATION DEPENDENT EVENTS ARE:
Highhit, Uppercut, Hit, Groinhit, Leghit, Fall
STANDBY EVENTS ARE:
Won, Hurt, Threat, Fun, Turn
________|___Ready___________Block___Stand___________Crouch______________Midair______Falling
Highhit | HighPunched - HighPunched KneelingPunched (...) (...)
Uppercut| Falling - Falling KneelingPunched (...) (...)
Hit | LowPunched - LowPunched KneelingKicked
Groinhit| GroinKicked - GroinKicked KneelingKicked
Leghit | Swept - Swept KneelingKicked
Fall | Falling - Falling KneelingPunched
FRAME MEMBER DESCRIPTION IS:
x int X coordinate offset of the image relative to the character's anchor.
y int Y coordinate offset of the image relative to the character's anchor.
w int The width of the image.
h int The height of the image.
head array The coordinates of a polygon marking the head within the image, relative to the anchor.
body array The coordinates of a polygon marking the body within the image, relative to the anchor.
legs array The coordinates of a polygon marking the legs within the image, relative to the anchor.
hit array The coordinates of a polygon marking the hit within the image, relative to the anchor.
STATE MEMBER DESCRIPTION IS:
F int The number of the visible frame.
SITU string The situation associated with this state (Ready, Stand, Crouch, Falling)
DEL int The delay before moving to the next state.
NEXTST string The name of the state which follows this state, if none of the CONs is used.
CON hash Connections from this state. The keys are either events or keyboard input.
HIT ? The hit delivered at the beginning of this state.
BLOCK int If true, the character is blocking in his current state.
MOVE int The character's anchor should continously move this much during this state.
DELTAX int The character's anchor should immediately change by this much after this state.
PUSHX int The character is pushed, with this much momentum upon entering this state.
TURN int If true, the character's facing direction changes after this state.
JUMP int The character leaps into the air, with this much initial momentum upon entering this state.
DOODAD string A doodad is created at the beginning of this state. The string contains the doodad's type and speed.
SOUND string The sound effect associated with this state (if any);
HITSND string The sound effect if the HIT is successful.
MISSSND string The sound effect if the HIT fails.
CODE string This code will be evaled at the beginning of this state.
LAYER int The "priority" of the graphics. 5: hurt; 10: block; 15: kneeling; 20: normal; 25: attack
=cut
# Loads the frame data (x, y, w, h) from the given datafile.
# The path to the datafile is inserted automatically. The frame data will
# be shifted by (-PivotX,-PivotY).
#
# Returns an array of frame data. The first element in the array is
# a dummy entry, the second is the first real entry. This is because
# the first thing in the datafile is a PAL entry.
#
# Example: LoadFrames( "ZOLIDATA.DAT.txt" );
sub LoadFrames ($$$)
{
my ($DataName, $PivotX, $PivotY) = @_;
my (@Frames, $data, $frame, $DatName);
# Make sure that Whatever.dat also exists.
$DatName = $DataName;
$DatName =~ s/\.txt$//;
open DATFILE, "../characters/$DatName" || die ("Couldn't open ../characters/$DatName");
close DATFILE;
open DATAFILE, "../characters/$DataName" || die ("Couldn't open ../characters/$DataName");
$data = '';
while ( read DATAFILE, $data, 16384, length($data) )
{
}
close DATAFILE;
print "$DataName file is ", length($data), " bytes long.\n";
# Insert a dummy first row for the palette entry
eval ("\@Frames = ( {}, $data);");
die $@ if $@;
foreach $frame (@Frames)
{
OffsetFrame( $frame, -$PivotX, -$PivotY );
}
print "$DataName loaded, ", scalar @Frames, " frames.\n";
return @Frames;
}
# Creates a frame lookup from a descriptor array.
# The first parameter is the expected number of frames.
# The descriptor array should have frame base names in even positions,
# and lengths at odd. positions. For example:
# ("start", 6, "stand", 4, ... )
#
# The routine will return a lookup which will contain the frame's logical
# name as a key, and its physical index as a value. The logical names are
# simply the basename plus a number. The example above would return:
# ("start1"=>1, "start2"=>2, ..., "start6"=>6, "stand1"=>6, "stand2"=>7, ...)
sub CreateFrameLookup
{
my ($ExpectedCount, @FrameDesc) = @_;
my ($FrameName, $NumFrames);
my ($i, $j);
my (%FrameLookup);
for ( $i=0; $i<scalar @FrameDesc; $i +=2 )
{
$FrameName = $FrameDesc[$i];
$NumFrames = $FrameDesc[$i+1];
for ( $j = 1; $j<=$NumFrames; ++$j )
{
# print "Frame ", (scalar keys %FrameLookup) + 1, " is now called $FrameName$j\n";
$FrameLookup{ "$FrameName$j" } = (scalar keys %FrameLookup) + 1;
}
}
if ( $ExpectedCount != scalar keys( %FrameLookup ) )
{
die( "Expected number of frames ($ExpectedCount) doesn't equal the actual number of frames: ".
scalar keys(%FrameLookup) );
}
return %FrameLookup;
}
# Helper function. Finds the last frame with a given name in a frame
# lookup structure. Return the index of the last frame (1-based), or
# 0 if none with the given name were found.
#
# Example: If there are 6 "highpunch" frames (highpunch1 to highpunch6),
# FindLastFrame(\%FrameLookup, "highpunch") returns 6.
sub FindLastFrame($$) {
my ($FrameLookup, $FrameName) = @_;
my ($i) = (1);
while ( exists ${$FrameLookup}{"$FrameName$i"} ) { $i++; }
return $i-1;
}
sub OffsetPolygon($$$)
{
my ($poly, $dx, $dy) = @_;
my ($i, $n);
$n = scalar @{$poly};
for ( $i=0; $i < $n; $i+=2 )
{
$poly->[$i] += $dx;
$poly->[$i+1] += $dy;
}
}
sub MirrorPolygon($)
{
my ($poly) = @_;
my ($i, $n);
$n = scalar @{$poly};
for ( $i=0; $i < $n; $i+=2 )
{
$poly->[$i] = - $poly->[$i];
}
}
sub OffsetFrame($$$) {
my ($frame, $dx, $dy) = @_;
$frame->{'x'} += $dx;
$frame->{'y'} += $dy;
OffsetPolygon( $frame->{head}, $dx, $dy ) if defined ($frame->{head});
OffsetPolygon( $frame->{body}, $dx, $dy ) if defined ($frame->{body});
OffsetPolygon( $frame->{legs}, $dx, $dy ) if defined ($frame->{legs});
OffsetPolygon( $frame->{hit}, $dx, $dy ) if defined ($frame->{hit});
}
# FindLastState returns the last index of a given state.
# For example, if Punch4 is the last in Punch, FindLastState("Punch") is 4.
sub FindLastState($$) {
my ( $States, $StateName ) = @_;
my ( $i ) = ( 1 );
while ( exists ${$States}{ "$StateName $i" } ) { $i++; }
return $i-1;
}
# Translates an abbreviated sequence to a full sequence.
# "-punch" is every punch frame backwards.
# "_punch" is every punch frame except the last one backwards.
# "+punch" is every punch frame forwards.
sub TranslateSequence($$) {
my ($FrameLookup, $Sequence) = @_;
my ($pre, $frame) = $Sequence =~ /^([+-_]{0,1})(\w+)/;
my ($LastFrame) = (FindLastFrame( $FrameLookup, $frame ) );
#$LastFrame = (FindLastFrame( $FrameLookup, "$pre$frame" ) ) if $LastFrame == 0;
#print "Last frame of $frame is $LastFrame.\n";
return "$frame 1-$LastFrame" if ( $pre eq '+' );
return "$frame $LastFrame-1" if ( $pre eq '-' );
return "$frame " . ($LastFrame-1) . "-1" if ( $pre eq '_' );
$Sequence =~ s/\sn(-{0,1})/ $LastFrame$1/; # Replace n- with last frame
$Sequence =~ s/-n/-$LastFrame/; # Replace -n with last frame
return $Sequence;
}
sub SetStateData($$$)
{
my ($state, $FrameDesc, $suffix) = @_;
$state->{DEL} = $FrameDesc->{"DEL$suffix"} if defined $FrameDesc->{"DEL$suffix"};
$state->{HIT} = $FrameDesc->{"HIT$suffix"} if defined $FrameDesc->{"HIT$suffix"};
$state->{CON} = $FrameDesc->{"CON$suffix"} if defined $FrameDesc->{"CON$suffix"};
$state->{BLOCK} = $FrameDesc->{"BLOCK$suffix"} if defined $FrameDesc->{"BLOCK$suffix"};
$state->{NEXTST} = $FrameDesc->{"NEXTST$suffix"} if defined $FrameDesc->{"NEXTST$suffix"};
$state->{MOVE} = $FrameDesc->{"MOVE$suffix"} if defined $FrameDesc->{"MOVE$suffix"};
$state->{DELTAX} = $FrameDesc->{"DELTAX$suffix"} if defined $FrameDesc->{"DELTAX$suffix"};
$state->{PUSHX} = $FrameDesc->{"PUSHX$suffix"} if defined $FrameDesc->{"PUSHX$suffix"};
$state->{TURN} = $FrameDesc->{"TURN$suffix"} if defined $FrameDesc->{"TURN$suffix"};
$state->{JUMP} = $FrameDesc->{"JUMP$suffix"} if defined $FrameDesc->{"JUMP$suffix"};
$state->{SITU} = $FrameDesc->{"SITU$suffix"} if defined $FrameDesc->{"SITU$suffix"};
$state->{DOODAD} = $FrameDesc->{"DOODAD$suffix"} if defined $FrameDesc->{"DOODAD$suffix"};
$state->{SOUND} = $FrameDesc->{"SOUND$suffix"} if defined $FrameDesc->{"SOUND$suffix"};
$state->{CODE} = $FrameDesc->{"CODE$suffix"} if defined $FrameDesc->{"CODE$suffix"};
}
# Adds a sequence to the end of a state
# Sequences are: e.g. "throw 10-14, throw 16, throw 14-10"
# Each piece of the sequence will have $Delay delay.
sub AddStates($$$) {
my ( $States, $Frames, $FrameDesc ) = @_;
my ( $StateName, $SequenceString, $LastState, $i, $sloop, $s, @Sequences );
my ( $from, $to, $frame, $state );
$StateName = $FrameDesc->{'N'};
$SequenceString = $FrameDesc->{'S'};
$FrameDesc->{SITU} = 'Stand' unless defined $FrameDesc->{SITU};
$LastState = FindLastState($States,$StateName)+1;
@Sequences = split ( /\s*,\s*/, $SequenceString );
for ( $sloop = 0; $sloop < scalar @Sequences; ++$sloop )
{
$s = TranslateSequence( $Frames, $Sequences[$sloop] );
#print "Sequence is $s\n";
if ( $s =~ /^\s*(\w+)\s+(\d+)-(\d+)\s*$/ )
{
# Sequence is '<frame> <from>-<to>'
$frame = $1;
$from = $2;
$to = $3;
}
elsif ( $s =~ /^\s*(\w+)\s+(\d+)\s*$/ )
{
# Sequence is '<frame> <number>'
$frame = $1;
$from = $to = $2;
}
else
{
die "Sequence '$s' incorrect.\n";
}
$i = $from;
while (1)
{
die "Error: Frame $frame$i doesn't exist.\n"
unless defined ${$Frames}{"$frame$i"};
$state = { 'F'=>"$frame$i" };
SetStateData( $state, $FrameDesc, '' );
SetStateData( $state, $FrameDesc, $LastState );
if ( ( $sloop == scalar @Sequences -1 ) and ( $i == $to ) )
{
SetStateData( $state, $FrameDesc, 'N' );
}
$States->{"$StateName $LastState"} = $state;
# print "Added state '$StateName $LastState' as frame '$frame$i', delay $Delay\n";
$LastState++;
if ( $from < $to )
{
$i++;
last if $i > $to;
}
else
{
$i--;
last if $i < $to;
}
}
}
}
sub BlockStates($$)
{
my ( $frames, $del) = @_;
my ( $retval, $i );
# We need to make sure that blocking is the same speed for every character.
# Typical is 5 frames, +- 1 frame
$del = int( 25 / $frames ); # 1/1
$retval = { 'N'=>'Block', 'DEL'=>$del, 'S'=>'+block', };
for ($i = 1; $i <= $frames; ++$i )
{
$retval->{"NEXTST$i"} = "Block " . ($i-1);
$retval->{"CON$i"} = { 'block'=> "Block " . ($i+1) };
$retval->{"BLOCK$i"} = 1 if $i*$del > 10;
}
$retval->{'NEXTST1'} = 'Stand';
$retval->{"CON$frames"} = { 'block'=> "Block " . $frames };
return $retval;
}
sub KneelingStates($$$$)
{
my ( $frames, $frames2, $del, $con ) = @_;
my ( $retval, $retval2, $i, $j );
$retval = { 'N'=>'Kneeling', 'DEL'=> $del, 'S' => '+kneeling', 'SITU'=>'Crouch' };
for ( $i = 1; $i <= $frames; ++$i )
{
$retval->{"NEXTST$i"} = "Kneeling " . ($i-1);
$retval->{"CON$i"} = { 'down' => "Kneeling " . ($i+1) };
}
$retval->{'NEXTST1'} = 'Stand';
$retval->{"CON$frames"} = { 'down' => "Onknees" };
$retval2 = { 'N'=>'Onknees', 'DEL'=>$del, 'S' => '+onknees,-onknees', 'SITU'=>'Crouch',
'NEXTST' => "Kneeling $frames" };
$frames2 *= 2;
for ( $i = 1; $i <= $frames2; ++$i )
{
$j = ($i % $frames2) + 1;
$retval2->{"CON$i"} = { %{$con}, 'down'=>"Onknees $j", 'forw'=>"Onknees $j", 'back'=>"Onknees $j" };
}
return ($retval, $retval2);
}
sub JumpStates($$)
{
my ( $frames, $con ) = @_;
my ( $kneelingframes, $onkneesframes,
$kickframes, $punchframes ) = (
FindLastFrame( $frames, 'kneeling' ),
FindLastFrame( $frames, 'onknees' ),
FindLastFrame( $frames, 'kneelingkick' ),
FindLastFrame( $frames, 'kneelingpunch' ) );
my ( $jump ) = 120;
my ( $i, $j, $statestotal, $statesdown, $statesknees, $deldown,
$jumpfw, $jumpbw, $flying, $flyingsequence, $jumpkick, $jumppunch );
# The jump's first part is going down on knees, second part is
# on knees, third part is getting up.
if ( $::DELMULTIPLIER )
{
$statestotal = $jump * 2 / 3 / $::DELMULTIPLIER; # 1/1
}
else
{
$statestotal = $jump * 2 / 3;
}
$statesdown = $statestotal / 4;
$deldown = int($statesdown / $kneelingframes + 0.1); # 1/1
$statesdown = $deldown * $kneelingframes;
$statesknees = $statestotal - $statesdown * 2;
$jump = { 'N'=>'Jump', 'DEL'=> $deldown, 'S'=>'kneeling 1-2, kneeling 1',
'JUMPN'=>$jump, NEXTSTN=>'JumpFly', 'SOUND1'=>'slip4.voc', };
$jumpfw = { %{$jump}, 'N'=>'JumpFW', 'PUSHX3'=>18*16 };
$jumpbw = { %{$jump}, 'N'=>'JumpBW', 'PUSHX3'=>-9*16 };
$flyingsequence = '';
$flying = {};
for ( $i = 0; $i < $statesknees / $deldown; ++$i ) #1/1
{
$j = $i + $statesdown / $deldown; #1/1
$flyingsequence .= 'onknees 1,';
$flying->{"CON$j"} = $con;
# $flying->{"DEL$j"} = 1;
}
$flyingsequence = "+kneeling, $flyingsequence -kneeling";
$flying = { %{$flying}, 'N'=>'JumpFly', 'DEL'=> $deldown, 'S'=>$flyingsequence,
'DELN'=>100 };
print join( ',', %{$flying}), "\n";
$jumpkick = { 'N'=>'JumpKick', 'HIT'=>'Fall',
'DEL'=> int( $statestotal * 2 / 3 / ( $kickframes + $kneelingframes*2 + 3 ) ), # 1/1
'S'=> '+kneelingkick,kneelingkick n, kneelingkick n, kneelingkick n,-kneelingkick,-kneeling',
'HIT'=>'Fall', 'DELN'=>100 };
$jumppunch = { 'N'=>'JumpPunch', 'HIT'=>'Highhit',
'DEL'=> int( $statestotal * 2 / 3 / ( $punchframes + $kneelingframes*2 + 3 ) ), # 1/1
'S'=> '+kneelingpunch,kneelingpunch n, kneelingpunch n, kneelingpunch n,-kneelingpunch,-kneeling',
'HIT'=>'Fall', 'DELN'=>100 };
return ($jump, $jumpfw, $jumpbw, $flying, $jumpkick, $jumppunch);
}
sub WalkingFrames($$$$$)
{
my ( $frameLookup, $frameArray, $preFrames, $distance, $con ) = @_;
my ( $walkFrames, $totalFrames, $seq, $seq2, $distPerFrame,
$walk, $back, $walkNextst, $backNextst,
$i, $j, );
$totalFrames = FindLastFrame( $frameLookup, 'walk' );
$walkFrames = $totalFrames - $preFrames;
if ( $preFrames > 0 ) {
$seq = "+walk, walk $preFrames-1";
$seq2 = "walk 1-$preFrames, -walk";
} else {
$seq = "+walk";
$seq2 = "-walk";
}
$walk = { 'N'=>'Walk', 'S'=>$seq, 'DEL'=>5, 'CON'=>$con };
$back = { 'N'=>'Back', 'S'=>$seq2, 'DEL'=>5, };
# Add attributes for the 'pre' states.
for ( $i=1; $i <= $preFrames; ++$i )
{
$j = $i + 1;
$walk->{"CON$i"} = { %{$con}, 'forw' => "Walk $j" };
$walk->{"NEXTST$i"} = 'Stand';
$back->{"CON$i"} = { %{$con}, 'back' => "Back $j" };
$back->{"NEXTST$i"} = 'Stand';
}
# Add attributes for the 'walk' states.
$walkNextst = $preFrames ? 'Walk ' . ($totalFrames+1) : 'Stand';
$backNextst = $preFrames ? 'Back ' . ($totalFrames+1) : 'Stand';
$distPerFrame = $distance / $walkFrames; # 1/1
print "*** $preFrames $walkFrames $totalFrames $walkNextst $backNextst\n";
for ( $i=$preFrames+1; $i <= $totalFrames; ++$i )
{
$j = ($i == $totalFrames) ? $preFrames+1 : $i+1;
$walk->{"MOVE$i"} = 4;
$walk->{"NEXTST$i"} = $walkNextst;
$walk->{"CON$i"} = { %{$con}, 'forw' => "Walk $j" };
$back->{"MOVE$i"} = -4;
$back->{"NEXTST$i"} = $backNextst;
$back->{"CON$i"} = { %{$con}, 'back' => "Back $j" };
OffsetFrame( $frameArray->[$frameLookup->{"walk$i"}],
- ($i-$preFrames-1) * $distPerFrame, 0 );
}
return ( $walk, $back );
}
sub TravelingStates( $$$$$$ )
{
my ( $frameLookup, $frameArray, $states, $frameName, $from, $to ) = @_;
$from = 1 unless $from;
unless ( $to )
{
$to = FindLastFrame( $frameLookup, $frameName );
$to += 1 if $frameName eq 'falling';
}
my ( $fromIndex, $toIndex, $fromFrame, $toFrame, $fromOffset, $toOffset,
$deltax, $i, $state, $nextst );
# 1. Calculate the 'deltax' and 'fromOffset'.
$fromIndex = $frameLookup->{"$frameName$from"};
die "couldn't find frame $frameName$from" unless defined $fromIndex;
$toIndex = $fromIndex - $from + $to;
$fromFrame = $frameArray-> [ $fromIndex ];
$toFrame = $frameArray-> [ $toIndex ];
$fromOffset = $fromFrame->{x} + ($fromFrame->{w} >> 1);
$toOffset = $toFrame->{x} + ($toFrame->{w} >> 1);
$deltax = ( $toOffset - $fromOffset ) / ( $to - $from ); #1/1
# print "Offsets: $fromOffset $toOffset $deltax\n";
# 2. Offset every relevant frame.
for ( $i=$fromIndex; $i<=$toIndex; ++$i )
{
# print "Offsetting frame $i by ", - $fromOffset - $deltax * ($i-$fromIndex), "\n";
OffsetFrame( $frameArray->[$i],
- $fromOffset - $deltax * ($i-$fromIndex), 0 );
}
# 3. Apply deltax to every relevant state.
while ( ($i, $state) = each %{$states} )
{
if ( $state->{F} >= $fromIndex and $state->{F} <= $toIndex )
{
$nextst = $states->{$state->{NEXTST}};
- if ( $nextst->{F} >= $fromIndex and $nextst->{F} <= $toIndex )
+ if ( defined($nextst) and $nextst->{F} >= $fromIndex and $nextst->{F} <= $toIndex )
{
$state->{DELTAX} = $deltax * ($nextst->{F} - $state->{F});
# print "Fixing state $i : deltax = ", $state->{DELTAX}, "\n";
}
}
}
}
sub FixStates($$)
{
my ( $frameLookup, $states ) = @_;
my ( $framename, $st, $lastchar, $key, $value, $nextchar, $nextst );
while (($key, $value) = each %{$states})
{
$framename = $value->{'F'};
unless ( $framename =~/^\d+$/ )
{
# Convert non-numeric frames to their numeric counterparts.
die "Can't find image $framename in frame $key" unless defined $frameLookup->{ $framename };
$value->{'F'} = $frameLookup->{ $framename };
}
($st,$lastchar) = $key =~ /(\w+)\s+(\d+)/;
unless ( defined $value->{'NEXTST'} )
{
$nextchar = $lastchar + 1;
$nextst = "$st $nextchar";
unless ( defined $states->{$nextst} ) {
# print "Go to Standby after $key\n";
$nextst = 'Stand';
}
$value->{'NEXTST'} = $nextst;
}
}
}
sub FindShorthands($)
{
my ( $states ) = @_;
my ( $key, $value, $st, $lastchar, %Shorthands );
while (($key, $value) = each %{$states})
{
($st,$lastchar) = $key =~ /(\w+)\s+(\d+)/;
print "$key has no lastchar" unless defined $lastchar;
if ( $lastchar == 1 )
{
$Shorthands{$st} = $states->{$key};
}
}
return %Shorthands;
}
sub CheckStates($$)
{
my ( $fightername, $states ) = @_;
my ( $key,$state, $con );
my ( $seq,$nextst );
while (($key, $state) = each %{$states})
{
die "Bad connection in fighter $fightername to '$state->{NEXTST} from $key!'" unless exists $states->{ $state->{NEXTST} };
next unless $state->{CON};
$con = $state->{CON};
while (($seq, $nextst) = each %{$con})
{
die "Bad connection in fighter $fightername to '$nextst' from $key!" unless exists $states->{$nextst};
}
}
}
return 1;
diff --git a/data/script/Doodad.pl b/data/script/Doodad.pl
index c50be61..10c2ea4 100644
--- a/data/script/Doodad.pl
+++ b/data/script/Doodad.pl
@@ -1,315 +1,329 @@
=comment
Doodad members are:
T int The Doodad's type. 0 means text.
OWNER int The Doodad's owner (0 for player 1, 1 for player 2, other means no owner)
HOSTILE int 1 if the doodad can collision with players and damage them.
LIFETIME int The amount of time before this doodad dies. -1 means infinite.
POS (int,int) The Doodad's logical position.
SIZE (int,int) The Doodad's physical size.
SPEED (int,int) The Doodad's logical speed.
ACCEL (int,int) The Doodad's logical acceleration.
DIR int 1: heading right; -1: heading left (implies flipped state)
GFXOWNER int The Doodad's graphics owner (0 for player 1, 1 for player 2, other means global)
FIRSTFRAME int The first frame of the doodad (only meaningful if GFXOWNER is a player).
FRAMES int The number of frames.
SA int Animation speed
F int The Doodad's frame.
TEXT string The text displayed in a text doodad.
UPDATECODE sub This will be ran instead of MoveDoodad if defined.
Doodad types are:
0 Text
1 Zoli's shot
2 UPi's shot
3 UPi's explosion
4 UPi's familiar
=cut
use strict;
require 'Collision.pl';
package Doodad;
%Doodad::DoodadDefinitions = (
'ZoliShot' => {
'T' => 1, 'HOSTILE' => 1, 'LIFETIME' => -1,
'SIZE' => [ 64, 64 ], 'SPEED' => [ 48, -25 ], 'ACCEL' => [ 0, 2 ],
'GFXOWNER' => 2, 'FIRSTFRAME' => 0, 'FRAMES' => 6,
'SA' => 1/10,
},
'UPiShot' => {
'T' => 2, 'HOSTILE' => 1, 'LIFETIME' => -1,
'SIZE' => [170, 22], 'SPEED' => [ 48, 0 ], 'ACCEL' => [ 0, 0 ],
'GFXOWNER' => 0, 'FIRSTFRAME' => 340, 'FRAMES' => 5,
'SA' => 1/5,
},
'UPiExplosion' => {
'T' => 3, 'HOSTILE' => 0, 'LIFETIME' => 30,
'SIZE' => [ 58, 80], 'SPEED' => [ 0, 0 ], 'ACCEL' => [ 0, 0 ],
'GFXOWNER' => 0, 'FIRSTFRAME' => 345, 'FRAMES' => 15,
'SA' => 1/2,
},
'UPiFamiliar' => {
'T' => 3, 'HOSTILE' => 0, 'LIFETIME' => -1,
'SIZE' => [ 20, 20], 'SPEED' => [ 0, 0 ], 'ACCEL' => [ 0, 0 ],
'GFXOWNER' => 0, 'FIRSTFRAME' => 360, 'FRAMES' => 3,
'SA' => 1/10,
'ANGLE' => 0,
'UPDATECODE' => sub {
my ($self) = @_;
my ($fighter, $frame, $head, $targetposx, $targetposy);
$fighter = $self->{OWNER} ? $::Fighter2 : $::Fighter1;
$frame = $fighter->{FRAMES}->[$fighter->{FR}];
$head = $frame->{head};
$self->{ANGLE} += 0.05 * $self->{DIR};
$targetposx = $fighter->{X} + $head->[0] * $::GAMEBITS2 * $fighter->{DIR} + sin( $self->{ANGLE} ) * 300;
$targetposy = $fighter->{Y} + $head->[1] * $::GAMEBITS2 + cos( $self->{ANGLE} ) * 300;
if ( $fighter->{HP} > 0 )
{
$self->{ACCEL}->[0] = ($targetposx - $self->{POS}->[0] ) / 200;
$self->{ACCEL}->[1] = ($targetposy - $self->{POS}->[1] ) / 200;
$self->{SPEED}->[0] += $self->{ACCEL}->[0];
$self->{SPEED}->[1] += $self->{ACCEL}->[1];
$self->{SPEED}->[0] *= 0.95;
$self->{SPEED}->[1] *= 0.95;
}
#$self->{SPEED}->[0] = ($targetposx - $self->{POS}->[0]) / 30;
#$self->{SPEED}->[1] = ($targetposy - $self->{POS}->[1]) / 30;
$self->{POS}->[0] += $self->{SPEED}->[0];
$self->{POS}->[1] += $self->{SPEED}->[1];
$self->{F} += $self->{SA};
$self->{F} -= $self->{FRAMES} if $self->{F} > ($self->{FRAMES} + $self->{FIRSTFRAME});
return 0;
},
},
);
=comment
CreateDoodad creates a new doodad, and appends it to the global doodad list,
@Doodads. The parameters are:
x int The logical horizontal position of the center of the doodad
y int The logical vertical position of the center of the doodad
t string The type of the doodad (doodad types are described above)
dir int 1 or -1
owner int The number of the player who 'owns' the doodad (0 or 1, anything else means no owner)
=cut
sub CreateDoodad
{
my ($x, $y, $t, $dir, $owner) = @_;
my ($doodad, $doodaddef, $w, $h);
$doodaddef = $Doodad::DoodadDefinitions{$t};
if ( ( not defined $doodaddef ) and $t != 0 )
{
print "CreateDoodad: Doodad $doodaddef doesn't exist!\n";
return
}
if ( defined $doodaddef )
{
$w = $doodaddef->{SIZE}->[0];
$h = $doodaddef->{SIZE}->[1];
$t = $doodaddef->{T};
}
else
{
$w = $h = $t = 0;
$doodaddef = {};
}
$doodad = {
'T' => $t,
'OWNER' => $owner,
'HOSTILE' => 0,
'LIFETIME' => -1,
'POS' => [ $x - $w * $::GAMEBITS2 / 2, $y - $h * $::GAMEBITS2 / 2 ],
'SIZE' => [ $w, $h ],
'SPEED' => [ 0, 0 ],
'ACCEL' => [ 0, 0 ],
'DIR' => $dir,
'GFXOWNER' => $owner,
'FIRSTFRAME'=> 0,
'FRAMES' => 1,
'SA' => 0,
'F' => 0,
'TEXT' => '',
%{$doodaddef},
};
$doodad->{SIZE} = [@{$doodaddef->{SIZE}} ] if defined $doodaddef->{SIZE};
$doodad->{SPEED} = [@{$doodaddef->{SPEED}}] if defined $doodaddef->{SPEED};
$doodad->{ACCEL} = [@{$doodaddef->{ACCEL}}] if defined $doodaddef->{ACCEL};
$doodad->{F} = $doodad->{FIRSTFRAME};
$doodad->{SPEED}->[0] *= $doodad->{DIR};
$doodad->{ACCEL}->[0] *= $doodad->{DIR};
$doodad->{GFXOWNER} = $owner if $doodad->{GFXOWNER} < 2;
push @::Doodads, ($doodad);
return $doodad;
}
sub CreateTextDoodad
{
my ($x, $y, $owner, $text) = @_;
my ($self);
$self = CreateDoodad($x, $y, 0, 0, $owner);
$self->{'TEXT'} = $text;
$self->{'GFXOWNER'} = 2;
return $self;
}
+sub RewindData
+{
+ my ($self) = @_;
+
+ return {
+ %{$self},
+ POS => [ @{$self->{POS}} ],
+ SIZE => [ @{$self->{SIZE}} ],
+ SPEED => [ @{$self->{SPEED}} ],
+ ACCEL => [ @{$self->{ACCEL}} ],
+ }
+}
+
+
=comment
UpdateDoodad is called once every game tick.
It should return 0 if the doodad is still active.
If UpdateDoodad returns nonzero, it will be removed in this tick and
deleted.
=cut
sub UpdateDoodad
{
my ($doodad) = @_;
if ( exists $doodad->{UPDATECODE} )
{
# Call the updatecode.
return &{$doodad->{UPDATECODE}}( $doodad );
}
else
{
return MoveDoodad( $doodad );
}
}
sub MoveDoodad
{
my ($doodad) = @_;
if ( $doodad->{LIFETIME} >= 0 )
{
$doodad->{LIFETIME} -= 1;
if ( $doodad->{LIFETIME} < 0 )
{
# Doodad dies.
return 1;
}
}
$doodad->{SPEED}->[0] += $doodad->{ACCEL}->[0];
$doodad->{SPEED}->[1] += $doodad->{ACCEL}->[1];
$doodad->{POS} ->[0] += $doodad->{SPEED}->[0];
$doodad->{POS} ->[1] += $doodad->{SPEED}->[1];
$doodad->{F} += $doodad->{SA};
$doodad->{F} -= $doodad->{FRAMES} if $doodad->{F} > ($doodad->{FRAMES} + $doodad->{FIRSTFRAME});
if ( $doodad->{POS}->[0] > $::BGWIDTH2 ) { return 1; }
if ( $doodad->{POS}->[0] < $doodad->{SIZE}->[0] * $::GAMEBITS2 ) { return 1; }
if ( $doodad->{POS}->[1] > $::SCRHEIGHT2 ) { return 1; }
if ( $doodad->{POS}->[1] < $doodad->{SIZE}->[1] * $::GAMEBITS2 ) { return 1; }
if ( $doodad->{HOSTILE} )
{
CheckDoodadHit($doodad);
}
# print "Doodad: POS=", join(',', @{$doodad->{POS}}),
# "; SPEED=", join(',', @{$doodad->{SPEED}}),
# "; ACCEL=", join(',', @{$doodad->{ACCEL}}), "\n";
return 0;
}
sub CheckDoodadHit($)
{
my ( $self ) = @_;
my ( @poly, $x, $y, $w, $h );
$x = $self->{POS}->[0] / $::GAMEBITS2;
$y = $self->{POS}->[1] / $::GAMEBITS2;
$w = $self->{SIZE}->[0];
$h = $self->{SIZE}->[1];
@poly = (
$x, $y,
$x+$w, $y,
$x+$w, $y+$h,
$x, $y+$h );
if ( $self->{OWNER} != 0 )
{
if ( $::Fighter1->IsHitAt( \@poly ) )
{
DoHitPlayer($self, $::Fighter1);
}
}
@poly = (
$x, $y,
$x+$w, $y,
$x+$w, $y+$h,
$x, $y+$h );
if ( $self->{OWNER} != 1 )
{
if ( $::Fighter2->IsHitAt( \@poly ) )
{
DoHitPlayer($self, $::Fighter2);
}
}
}
sub DoHitPlayer($$)
{
my ($self,$player) = @_;
$self->{HOSTILE} = 0;
$player->HitEvent( 'Hit', $self->{T} );
}
=cut
return 1;
diff --git a/data/script/Fighter.pl b/data/script/Fighter.pl
index 65003f5..23e43aa 100644
--- a/data/script/Fighter.pl
+++ b/data/script/Fighter.pl
@@ -1,824 +1,854 @@
require 'Collision.pl';
require 'DataHelper.pl';
require 'Damage.pl';
package Fighter;
use strict;
=comment
Fighter's members are:
-ID int The ID of the fighter
-STATS hash Reference to the fighter's stats (includes GENDER)
-NAME string The name of the character, e.g. "Ulmar".
-FRAMES array The character's frame description.
-STATES hash The character's state description.
-
-NUMBER int Player number (either 0 or 1)
-X int The fighter's current anchor, horizontal coordinate.
-Y int The fighter's current anchor, vertical coordinate.
-ST string The name of the fighter's current state.
-FR int The number of the fighter's current frame (same as STATES->{ST}->{F}).
-DEL int The amount of time before the character moves to the next state.
-NEXTST string The name of the next state after this one (calculated by Advance and Event, user by Update).
-DIR int -1: the character is facing left; 1: if the character is facing right.
-PUSHY int The character's vertical momentum, from jumping/hits.
-PUSHX int The character's horizontal momentum, from hits.
-HP int Hit points, from 100 down to 0.
-IDLE int The amount of game time since the player is ready.
-CHECKEHIT int 1 if the hit needs to be checked soon.
-DELIVERED int 1 if a hit was delivered in this state.
-COMBO int The number of consecutive hits delivered to this fighter.
-COMBOHP int The amount of HP delivered in the last combo.
-OTHER hash A reference to the other Fighter
-LANDINGPENALTY int This is added to DEL when the character lands (used to penaltize blocked jumpkicks). Becomes DELPENALTY upon landing.
-DELPENALTY int This is added to DEL in the next state.
+ID int The ID of the fighter
+STATS hash Reference to the fighter's stats (includes GENDER)
+NAME string The name of the character, e.g. "Ulmar".
+FRAMES array The character's frame description.
+STATES hash The character's state description.
+OK bool Is the fighter good to go?
+
+NUMBER int Player number (either 0 or 1)
+X int The fighter's current anchor, horizontal coordinate.
+Y int The fighter's current anchor, vertical coordinate.
+ST string The name of the fighter's current state.
+FR int The number of the fighter's current frame (same as STATES->{ST}->{F}).
+DEL int The amount of time before the character moves to the next state.
+NEXTST string The name of the next state after this one (calculated by Advance and Event, user by Update).
+DIR int -1: the character is facing left; 1: if the character is facing right.
+PUSHY int The character's vertical momentum, from jumping/hits.
+PUSHX int The character's horizontal momentum, from hits.
+HP int Hit points, from 100 down to 0.
+IDLE int The amount of game time since the player is ready.
+CHECKEHIT int 1 if the hit needs to be checked soon.
+DELIVERED int 1 if a hit was delivered in this state.
+COMBO int The number of consecutive hits delivered to this fighter.
+COMBOHP int The amount of HP delivered in the last combo.
+OTHER hash A reference to the other Fighter
+LANDINGPENALTY int This is added to DEL when the character lands (used to penaltize blocked jumpkicks). Becomes DELPENALTY upon landing.
+DELPENALTY int This is added to DEL in the next state.
new
Reset
Advance
CheckHit
IsHitAt
Event
Update
Needs to be subclassed: Reset, NextState
=cut
sub new {
my ($class) = @_;
my $self = {
'NUMBER'=> 0,
'ST' => 'Start',
'FR' => 0,
'DEL' => 0,
'DIR' => 1,
'PUSHY' => 0,
'PUSHX' => 0,
};
bless $self, $class;
return $self;
}
+
+sub RewindData {
+ my ($self) = @_;
+ return $self;
+}
+
+
sub Reset {
my ($self, $fighterenum) = @_;
die "Insufficient parameters." unless defined $self;# and defined $frames and defined $states;
$fighterenum = $self->{ID} unless defined $fighterenum;
my ($number, $stats);
$number = $self->{NUMBER};
$stats = ::GetFighterStats($fighterenum);
die "Couldn't load stats of fighter $fighterenum\n" unless defined $stats;
unless (defined $stats->{STATES})
{
print "ERROR: The fighter $fighterenum is not yet usable.\n";
$self->{OK} = 0;
return;
}
print STDERR "Resetting fighter $number to character $fighterenum\n";
$self->{ID} = $fighterenum;
$self->{STATS} = $stats;
$self->{NAME} = $stats->{NAME};
$self->{FRAMES} = $stats->{FRAMES};
$self->{STATES} = $stats->{STATES};
$self->{X} = (( $number ? 540 : 100 ) << $::GAMEBITS) + $::BgPosition;
$self->{Y} = $::GROUND2;
$self->{ST} = 'Start';
$self->{FR} = $self->GetCurrentState()->{F};
$self->{DEL} = 0;
$self->{DIR} = ($number ? -1 : 1);
$self->{PUSHY} = 0;
$self->{PUSHX} = 0;
$self->{HP} = 100;
$self->{IDLE} = 0;
$self->{CHECKHIT} = 0;
$self->{DELIVERED} = 0;
$self->{COMBO} = 0;
$self->{COMBOHP}= 0;
$self->{LANDINGPENALTY} = 0;
$self->{DELPENALTY} = 0;
$self->{OK} = 1;
&{$self->{STATS}->{STARTCODE}}($self);
}
+=comment
+Returns a "random" number that is deterministic in the sense that it is
+always the same, given the current state of the character and the current
+game time.
+=cut
+
+sub QuasiRandom($$)
+{
+ my ( $self, $randmax ) = @_;
+
+ $randmax = 1 unless $randmax;
+
+ return int( $self->{HP} * 543857
+ + $self->{NUMBER} * 834973
+ + $self->{DEL} * 4358397
+ + $self->{IDLE} * 92385029
+ + $::gametick * 23095839
+ + 5304981 ) % $randmax;
+}
+
=comment
Advance should be called once every game tick. It advances the fighter,
preparing his variables for drawing him in the next tick. Advance also
processes the input if it is appropriate to do so in the current state.
Advance prepares the NEXTST attribute of the player. It does not modify
the current ST yet, because that may depend on hits, event, etc. Advance
should be followed by CheckHit and Event calls, and finally Update.
=cut
sub Advance {
my ($self, $in) = @_;
+# print STDERR "$::gametick\t$self->{X},$self->{HP}\t$self->{NUMBER}\t$self->{DEL}\t$self->{IDLE}\n";
+
my ($stname, # The name of the current state.
$st, # The descriptor of the current state.
$move, # The move associated with the current state.
$i, $j, # temp var.
@body ); # collision detection
$self->{NEXTST} = '';
$stname = $self->{ST};
$st = $self->{'STATES'}->{$stname};
# 1. DECREMENT 'DEL' PROPERTY
$self->{'DEL'}--;
if ( $st->{SITU} eq 'Ready' )
{
$self->{IDLE} = $self->{IDLE} + 1;
}
else
{
$self->{IDLE} = 0;
}
# 2. UPDATE THE HORIZONTAL POSITION
# 2.1. 'MOVE' PLAYER IF NECESSARY
if ( defined $st->{'MOVE'} )
{
$move = $st->{'MOVE'}*$self->{'DIR'} * 6;
$self->{'X'} += $move;
}
# 2.2. 'PUSH' PLAYER IF NECESSARY
if ( $self->{PUSHX} )
{
$i = ($self->{PUSHX}+7) / 8; # 1/1; syntax highlight..
$self->{X} += $i;
$self->{PUSHX} -= $i if $self->{PUSHY} == 0;
}
# 2.3. MAKE SURE THE TWO FIGHTERS DON'T "WALK" INTO EACH OTHER
if ( $self->{Y} >= $::GROUND2 and
$self->{OTHER}->{Y} >= $::GROUND2 )
{
my ( $centerX, $centerOtherX, $pushDir );
$centerX = $self->GetCenterX;
$centerOtherX = $self->{OTHER}->GetCenterX;
if ( abs($centerX - $centerOtherX) < 60 )
{
$pushDir = ($centerX > $centerOtherX) ? 1 : -1;
$self->{X} += 10 * $pushDir;
$self->{OTHER}->{X} -= 10 * $pushDir;
}
}
# 2.4. HORIZONTAL BOUNDS CHECKING
$self->{X} = $::BgPosition + $::MOVEMARGIN2
if $self->{X} < $::BgPosition + $::MOVEMARGIN2;
$self->{X} = $::BgPosition + $::SCRWIDTH2 - $::MOVEMARGIN2
if $self->{X} > $::BgPosition + $::SCRWIDTH2 - $::MOVEMARGIN2;
# 3. FLYING OR FALLING
if ( $self->{Y} < $::GROUND2 )
{
$self->{PUSHY} += 3;
$self->{Y} += $self->{PUSHY};
if ($self->{Y} >= $::GROUND2)
{
# LANDING
$self->{DELPENALTY} = $self->{LANDINGPENALTY};
$self->{LANDINGPENALTY} = 0;
if ( $st->{SITU} eq 'Falling')
{
::AddEarthquake( $self->{PUSHY} / 20 ); # 1/1
push @::Sounds, ('splat.wav') if $self->{PUSHY} > 40;
# print "PUSHY = ", $self->{PUSHY}, "; ";
if ( $self->{PUSHY} > 30 )
{
# Bouncing after a fall
$self->{PUSHY} = - $self->{PUSHY} / 2; # 1/1
$self->{Y} = $::GROUND2 - 1;
}
else
{
# Getting up after a fall.
$self->{PUSHY} = 0;
$self->{Y} = $::GROUND2;
$self->{DEL} = 0;
$self->{NEXTST} = 'Getup';
$self->{NEXTST} = 'Dead' if $self->{HP} <= 0;
}
return;
}
else
{
push @::Sounds, ('thump.wav');
$self->{PUSHY} = 0;
$self->{Y} = $::GROUND2;
if ( substr($self->{ST},0,4) eq 'Jump' )
{
# Landing after a jump
$self->{DEL} = 0;
$self->{NEXTST} = 'Stand';
}
else
{
print "Landed; state: ", $self->{ST}, "\n";
}
return;
}
}
}
return if $self->{'DEL'} > 0;
# 4. DELAYING OVER. MAKE END-OF-STATE CHANGES.
# 4.1. 'DELTAX' displacement if so specified
if ($st->{DELTAX})
{
$self->{X} += $st->{DELTAX} * $self->{DIR} * $::GAMEBITS2;
}
# 4.2. 'TURN' if so specified
if ($st->{TURN})
{
$self->{DIR} = - $self->{DIR};
# Swap input keys..
$i = $in->{Keys}->[2];
$in->{Keys}->[2] = $in->{Keys}->[3];
$in->{Keys}->[3] = $i;
}
# 5. CALCULATE THE NEXT STATE
my ($nextst, $con, $input, $mod, $action, $dist);
$nextst = $st->{NEXTST};
$con = $st->{CON};
$dist = ($self->{OTHER}->{X} - $self->{X}) * $self->{DIR};
undef $con if $::ko;
if ( defined $con )
{
$self->ComboEnds();
# 5.1. The current state has connections!
($input,$mod) = $in->GetAction();
$mod = '' unless defined $mod;
$action = $input;
# Try to find the best matching connection.
for ( $i = length($mod); $i>=0; --$i )
{
$action = $input . substr( $mod, 0, $i );
last if defined $con->{$action};
}
if ( defined $con->{$action} )
{
# print "dist = $dist. ";
if ( ($action eq 'hpunch' or $action eq 'lpunch') and ($dist>=0) and ($dist<800) )
{
$action = 'hpunchF' if defined $con->{'hpunchF'};
}
elsif ( ($action eq 'hkick' or $action eq 'lkick') and ($dist>=0) and ($dist<900) )
{
$action = 'lkickF' if defined $con->{'lkickF'};
}
$nextst = $con->{$action};
$in->ActionAccepted;
}
}
$self->{'NEXTST'} = $nextst;
}
sub CheckHit
{
my ($self) = @_;
return 0 unless $self->{CHECKHIT};
$self->{CHECKHIT} = 0;
my ($st, # A reference to the next state.
$nextst, # The name of the next state.
@hit, # The hit array
$i,
);
$st = $self->{STATES}->{$self->{ST}};
return 0 unless $st->{HIT};
return 0 unless defined $self->{FRAMES}->[$st->{F}]->{hit};
@hit = @{$self->{FRAMES}->[$st->{F}]->{hit}};
if ( $self->{DIR}<0 )
{
::MirrorPolygon( \@hit );
}
::OffsetPolygon( \@hit,
$self->{X} / $::GAMEBITS2,
$self->{Y} / $::GAMEBITS2 );
$i = $self->{OTHER}->IsHitAt( \@hit );
$self->{DELIVERED} = 1 if $i;
print "Collision = $i; ";
if ( $i == 0 )
{
# Make the 'Woosh' sound - maybe.
$nextst = $st->{NEXTST};
print "NEXTST = $nextst";
$nextst = $self->{STATES}->{$nextst};
print "NEXTST->HIT = ", $nextst->{HIT}, "\n";
push @::Sounds, ('woosh.wav') unless $nextst->{HIT} and defined $self->{FRAMES}->[$nextst->{F}]->{hit};
}
return $i;
}
sub IsHitAt
{
my ($self, $poly) = @_;
my ($frame, @a);
$frame = $self->{FRAMES}->[$self->{FR}];
::OffsetPolygon( $poly, -$self->{X} / $::GAMEBITS2, -$self->{Y} / $::GAMEBITS2 );
if ( $self->{DIR}<0 )
{
::MirrorPolygon( $poly );
}
#print "IsHitAt (", join(',',@{$poly}),")\n (",
# join(',',@{$frame->{head}}),")\n (",
# join(',',@{$frame->{body}}),")\n (",
# join(',',@{$frame->{legs}}),")\n";
return 1 if ::Collisions( $poly, $frame->{head} );
return 2 if ::Collisions( $poly, $frame->{body} );
return 3 if ::Collisions( $poly, $frame->{legs} );
return 0;
}
=comment
Event($self, $event, $eventpar): Handles the following events:
'Won', 'Hurt', 'Thread', 'Fun', 'Turn'
=cut
sub Event($$$)
{
my ($self, $event, $eventpar) = @_;
my ($st);
$st = $self->GetCurrentState();
if ( ($st->{SITU} eq 'Ready' or $st->{SITU} eq 'Stand') and $event eq 'Won' )
{
$self->{NEXTST} = 'Won' unless substr($self->{ST}, 0, 3) eq 'Won' ;
return;
}
if ( $st->{SITU} eq 'Ready' and $self->{NEXTST} eq '' )
{
$self->{IDLE} = 0;
if ( $event =~ /Hurt|Threat|Fun|Turn/ )
{
- if ( $event eq 'Fun' and defined $self->{STATES}->{'Funb'} and rand() < 0.5 )
+ if ( $event eq 'Fun' and defined $self->{STATES}->{'Funb'} and $self->QuasiRandom(2)==1 )
{
$event = 'Funb';
}
$self->{NEXTST} = $event;
}
}
}
=comment
Event($self, $event, $eventpar): Handles the following events:
'Highhit', 'Uppercut', 'Hit', 'Groinhit', 'Leghit', 'Fall'
=cut
sub HitEvent($$$)
{
my ($self, $event, $eventpar) = @_;
my ($st, $blocked, $damage);
$st = $self->GetCurrentState();
# Do events: Highhit, Uppercut, Hit, Groinhit, Leghit, Fall
$eventpar = '' unless defined $eventpar; # Supress useless warning
if ( $eventpar eq 'Maxcombo' ) { $damage = 0; }
else { $damage = ::GetDamage( $self->{OTHER}->{NAME}, $self->{OTHER}->{ST} ); }
$blocked = $st->{BLOCK};
$blocked = 0 if ( $self->IsBackTurned() );
print "Event '$event', '$eventpar'\n";
print "Blocked.\n" if ( $blocked );
# Hit point adjustment here.
$self->{HP} -= $blocked ? $damage >> 3 : $damage;
# Turn if we must.
$self->{DIR} = ( $self->{X} > $self->{OTHER}->{X} ) ? -1 : 1;
# Handle the unfortunate event of the player "dying".
if ( $self->{HP} <= 0 )
{
push @::Sounds, ('bowling.voc');
$self->{NEXTST} = 'Falling';
$self->{PUSHX} = -20 * 3 * $self->{DIR};
$self->{PUSHY} = -80;
$self->{Y} -= 10;
$self->{COMBO} += 1;
$self->{COMBOHP} += $damage;
$self->ComboEnds();
$::ko = 1;
return;
}
# Handle blocked attacks.
if ( $blocked )
{
push @::Sounds, ('thump.wav');
$self->HitPush( - $damage * 20 * $self->{DIR} );
$self->{OTHER}->{DEL} += 20 * $::DELMULTIPLIER;
if ( $self->{OTHER}->{Y} < $::GROUND2 )
{
$self->{OTHER}->{PUSHY} = -20 if $self->{OTHER}->{PUSHY} > 0;
$self->{OTHER}->{PUSHX} *= 0.2;
$self->{OTHER}->{LANDINGPENALTY} = 30 * $::DELMULTIPLIER;
}
# $self->{PUSHX} = - $damage * 5 * $self->{DIR};
return;
}
# Handle the rest of the events.
if ( $event eq 'Uppercut' )
{
push @::Sounds, ('evil_laughter.voc');
::AddEarthquake( 20 );
}
elsif ($event eq 'Groinhit') { push @::Sounds, ('woman_screams.voc'); }
{ push @::Sounds, ('thump3.voc'); }
$self->{COMBO} += 1;
$self->{COMBOHP} += $damage;
$damage *= $self->{COMBO}; # Only for the purpose of pushing
if ( $self->{COMBO} >= $::MAXCOMBO )
{
$self->ComboEnds();
$event = 'Uppercut';
$self->{OTHER}->HitEvent( 'Fall', 'Maxcombo' );
}
if ( $st->{SITU} eq 'Crouch' )
{
if ( $event eq 'Uppercut' or $event eq 'Fall' )
{
$self->{NEXTST} = 'Falling';
$self->{PUSHX} = -48 * 3 * $self->{DIR};
$self->{PUSHY} = -100;
$self->{Y} -= 10;
}
else
{
if ($eventpar == 1) {
$self->{NEXTST} = 'KneelingPunched';
} else {
$self->{NEXTST} = 'KneelingKicked';
}
$self->HitPush( - $damage * 20 * $self->{DIR} );
# $self->{PUSHX} = - $damage * 20 * $self->{DIR};
}
return;
}
if ( $st->{SITU} eq 'Falling' )
{
$self->{PUSHY} -= 50;
$self->{PUSHY} = -80 if $self->{PUSHY} > -80;
$self->{Y} -= 10;
return;
}
if ( $self->{Y} < $::GROUND2 )
{
$self->{NEXTST} = 'Falling';
$self->{PUSHY} -= 50;
$self->{PUSHX} = -48 * 3 * $self->{DIR};
return;
}
if ( $event eq 'Highhit' )
{
$self->{NEXTST} = 'HighPunched';
$self->HitPush( - $damage * 20 * $self->{DIR} );
# $self->{PUSHX} = - $damage * 20 * $self->{DIR};
}
elsif ( $event eq 'Hit' )
{
if ($eventpar == 1) {
$self->{NEXTST} = 'HighPunched';
} elsif ($eventpar == 2) {
$self->{NEXTST} = 'LowPunched';
} else {
$self->{NEXTST} = 'Swept';
}
$self->HitPush( - $damage * 20 * $self->{DIR} );
# $self->{PUSHX} = - $damage * 20 * $self->{DIR};
}
elsif ( $event eq 'Groinhit' )
{
$self->{NEXTST} = 'GroinKicked';
$self->HitPush( - $damage * 20 * $self->{DIR} );
# $self->{PUSHX} = - $damage * 20 * $self->{DIR};
}
elsif ( $event eq 'Leghit' )
{
$self->{NEXTST} = 'Swept';
$self->HitPush( - $damage * 20 * $self->{DIR} );
# $self->{PUSHX} = - $damage * 20 * $self->{DIR};
}
elsif ( $event eq 'Uppercut' or $event eq 'Fall' )
{
$self->{NEXTST} = 'Falling';
$self->{PUSHX} = -48 * 3 * $self->{DIR};
$self->{PUSHY} = -100;
$self->{Y} -= 10;
}
else
{
die "Unknown event: $event, $eventpar";
}
}
sub GetCurrentState
{
my ($self, $statename) = @_;
my ($stateref);
die unless defined $self;
$statename = $self->{ST} unless defined $statename;
$stateref = $self->{STATES}->{$statename};
return $stateref;
}
sub ComboEnds
{
my ($self) = @_;
my ($combo, $ismaxcombo);
$combo = $self->{COMBO};
$ismaxcombo = $combo >= $::MAXCOMBO;
return unless $combo;
if ( $self->{COMBO} > 1 )
{
my ( $head, $doodad, $x, $y, $combotext );
$combotext = $ismaxcombo ? ::Translate("MAX COMBO!!!") : sprintf( ::Translate('%d-hit combo!'), $self->{COMBO} );
$head = $self->{FRAMES}->[$self->{FR}]->{head};
$x = $self->{X} + $head->[0] * $::GAMEBITS2 * $self->{DIR};
$y = $self->{Y} + $head->[1] * $::GAMEBITS2;
$doodad = Doodad::CreateTextDoodad( $x, $y - 30 * $::GAMEBITS2,
$self->{NUMBER},
$combotext );
$doodad->{LIFETIME} = $ismaxcombo ? 120 : 80;
$doodad->{SPEED} = [-3,-3];
$doodad = Doodad::CreateTextDoodad( $x, $y - 10 * $::GAMEBITS2,
$self->{NUMBER},
sprintf( ::Translate('%d%% damage'), int($self->{COMBOHP}*$::HitPointScale/10) ) );
$doodad->{LIFETIME} = 80;
$doodad->{SPEED} = [+3,-3];
print $self->{COMBO}, "-hit combo for ", $self->{COMBOHP}, " damage.\n";
push @::Sounds, ( $ismaxcombo ? 'crashhh.voc' : 'ba_gooock.voc');
}
$self->{COMBO} = 0;
$self->{COMBOHP} = 0;
}
=comment
Update moves the fighter to his next state, if there is a NEXTST set.
NEXTST should be calculated before calling this method. No further
branching or CON checking is done.
If the next state has JUMP, the character is set aflying.
=cut
sub Update
{
my ($self) = @_;
my ($nextst, # The name of the next state
$st); # The descriptor of the next state.
# Is there a next state defined?
$nextst = $self->{'NEXTST'};
# If there isn't, no updating is necessary.
return unless $nextst;
# ADMINISTER THE MOVING TO THE NEXT STATE
$st = $self->GetCurrentState( $nextst );
$self->{'ST'} = $nextst;
$self->{'FR'} = $st->{'F'};
die "ERROR IN STATE $nextst" unless defined $st->{DEL};
$self->{'DEL'} = $st->{'DEL'} * $::DELMULTIPLIER;
$self-> {'DEL'} += $self->{'DELPENALTY'};
$self->{'DELPENALTY'} = 0;
# HANDLE THE JUMP and PUSH ATTRIBUTE
if ( defined ($st->{'JUMP'}) )
{
$self->{'PUSHY'} = -($st->{'JUMP'});
$self->{'Y'} += $self->{'PUSHY'};
}
if ( defined ($st->{'PUSHX'}) )
{
$self->{'PUSHX'} += $st->{'PUSHX'} * $self->{DIR};
}
# HANDLE THE HIT ATTRIBUTE
if ( defined ($st->{HIT}) )
{
$self->{CHECKHIT} = 1 unless $self->{DELIVERED};
}
else
{
$self->{DELIVERED} = 0;
}
# HANDLE THE SOUND ATTRIBUTE
if ( defined $st->{SOUND} )
{
push @::Sounds, ($st->{SOUND});
}
# HANDLE THE CODE ATTRIBUTE
if ( defined ($st->{CODE}) )
{
eval ($st->{CODE}); print $@ if $@;
}
# HANDLE DOODADS
if ( defined ($st->{DOODAD}) )
{
# Create a doodad (probably a shot)
my ($frame, $hit, $doodad, $doodadname);
$frame = $self->{FRAMES}->[$self->{FR}];
$hit = $frame->{hit};
if ( defined $hit )
{
$doodadname = $st->{DOODAD};
$doodad = Doodad::CreateDoodad(
$self->{X} + $hit->[0] * $::GAMEBITS2 * $self->{DIR},
$self->{Y} + $hit->[1] * $::GAMEBITS2,
$doodadname,
$self->{DIR},
$self->{NUMBER} );
}
}
}
=comment
Pushes the fighter back due to being hit. If the fighter is cornered,
the other fighter will be pushed back instead.
=cut
sub HitPush
{
my ($self, $pushforce) = @_;
if ( $self->IsCornered )
{
$self->{OTHER}->{PUSHX} -= $pushforce;
}
else
{
$self->{PUSHX} += $pushforce;
}
}
=comment
Returns the characters 'centerline' in physical coordinates.
=cut
sub GetCenterX
{
my ($self) = @_;
my ($body, $x);
$body = $self->{FRAMES}->[$self->{FR}]->{body};
$x = $body->[0] + $body->[2] + $body->[4] + $body->[6];
return $self->{X} / $::GAMEBITS2 + $x / 4 * $self->{DIR};
}
=comment
Is my back turned to my opponent? Returns true if it is.
=cut
sub IsBackTurned
{
my ($self) = @_;
return ( ($self->{X} - $self->{OTHER}->{X}) * ($self->{DIR}) > 0 );
}
=comment
Returns true if the character is at either end of the arena.
=cut
sub IsCornered
{
my ($self) = @_;
return (($self->{X} <= $::MOVEMARGIN2 + 16)
or ($self->{X} >= $::BGWIDTH2 - $::MOVEMARGIN2 - 16));
}
return 1;
diff --git a/data/script/FighterStats.pl b/data/script/FighterStats.pl
index 29c9058..5ccafaa 100644
--- a/data/script/FighterStats.pl
+++ b/data/script/FighterStats.pl
@@ -1,659 +1,672 @@
use strict;
use bytes;
=comment
FIGHTER STATS ARE:
ID int All fighters have an integer ID...
NAME string Name of the fighter displayed to the user
GENDER int 1=male 2=female
VERSION int Version of the fighter's code
DATAVERSION int Version of the data file
DATAFILE string Filename of the .DAT file.
STARTCODE sub Executed when Reset() is called on the fighter
TEAM string
STYLE string
AGE string
WEIGHT string
HEIGHT string
SHOE string
STORY string
=cut
=comment
We store both official and 3rd-party characters in the %FighterStats hash.
Official characters have ID's between 1 and 99, contributed characters have
ID's >= 100.
No file should access the %FighterStats hash directly, instead,
RegisterFighter must be used to add fighters and
GetFighterStats must be used to retrieve information.
=cut
%::FighterStats = (
'1'=>
{ 'ID' => 1,
'CODENAME' => 'Ulmar',
'NAME' =>'Watasiwa baka janajo',
'TEAM' =>'Evil',
'STYLE' =>'Clown-fu',
'AGE' =>'15',
'WEIGHT'=>'50kg',
'HEIGHT'=>'168cm',
'SHOE' =>'51',
'STORY' =>
'After Wastasiwa baka janajo took possession of his time\'s most advanced
technogadget (read: by accident he was punched so hard that he flew fight into
a high-tech lab, and got tangled with the WrISt(tm)),
he used all his knowledge to travel to the past (read: he started mashing the buttons, and
this is how it ended).
Then he knew immediately that he had to destroy
Saturday! (Read: He has absolutely no idea where he is, or what he is doing...)',
'KEYS' =>
'Back HPunch - Spinning headbutt
Down Back LPunch - WrISt shot
Forward Back Forward LPunch - WrISt mash',
'TEAM-hu' =>'Gonosz',
'STYLE-hu' =>'Bohóc-fu',
'WEIGHT-hu' =>'50kg + vaságy',
'HEIGHT-hu' =>'168cm',
'SHOE-hu' =>'51',
'STORY-hu' =>
'Miután Wasaiwa baka janaijo elszajrézta a kora legfejletebb tudományos cuccosát
(véletlenül úgy behúztak neki, hogy berepült a laboratoriumba és rátekeredett a CsUKlo(tm)),
azután minden tudását latba vetve vissza utazott a múltba (elkezdte nyomkodni a gombokat a
CsUKlo(tm)-en és ez lett belõle).
Ezekután már rögtön tudta, hogy itt el kell pusztitania a Szombatot! (õ sem tudja, hogy hol
is van éppen illetve mit is csinál...)',
},
'2'=>
{ 'ID' => 2,
'CODENAME' => 'UPi',
'NAME' =>'Dark Black Evil Mage',
'TEAM' =>'Evil leader',
'STYLE' =>'Piro-fu',
'AGE' =>'30',
'WEIGHT'=>'70kg',
'HEIGHT'=>'180cm',
'SHOE' =>'42',
'STORY' =>
'Member of the Evil Killer Black Antipathic Dim (witted) Fire Mages Leage.
He was sent to destroy Saturday now and forever! Or maybe he has a secret
agenda that noone knows about..? Nah...',
'KEYS' =>
'Back HKick - Spinkick
Forward Forward HKick - Crane kick
Down Back LPunch - Fireball
(also works while crouching)
Back Up HPunch - Burning Hands',
'NAME-hu' =>'Sötét Fekete Gonosz Mágus',
'TEAM-hu' =>'Gonosz vezér',
'STYLE-hu' =>'Piro-fu',
'AGE-hu' =>'30',
'WEIGHT-hu' =>'70kg',
'HEIGHT-hu' =>'180cm',
'SHOE-hu' =>'42',
'STORY-hu' =>
'A Gonosz Gyilkos Fekete Ellenszenves Sötét (elméjü) tüzvarázslók ligájának
tagja, kit azzal bíztak meg, hogy elpusztítsa a szombatot egyszer, s
mindörökre. Talán van valami hátsó szándéka, amirõl senki sem tud? Nincs!',
},
'3'=>
{ 'ID' => 3,
'CODENAME' => 'Zoli',
'NAME' =>'Boxer',
'TEAM' =>'Evil',
'STYLE' =>'Kickbox-fu',
'AGE' =>'16',
'WEIGHT'=>'80kg',
'HEIGHT'=>'180cm',
'SHOE' =>'43',
'STORY' =>
'Boxer joined the Mortal Szombat team for the sole purpose to punch as
many people as hard as he possibly can. He has no other purpose
whatsoever, but at least this keeps him entertained for the time being.',
'KEYS' =>
'Back HPunch - Spinning punch
Down Back LPunch - Weight toss
Forward Forward HPunch - Leaping punch',
'NAME-hu' =>'Boxer',
'TEAM-hu' =>'Gonosz',
'STYLE-hu' =>'Kickbox-fu',
'AGE-hu' =>'16',
'WEIGHT-hu' =>'80kg',
'HEIGHT-hu' =>'180cm',
'SHOE-hu' =>'43',
'STORY-hu' =>
'Boxer azért csatlakozott a Mortál Szombat csapathoz, hogy minél több
embernek besomhasson, minél többször, és minél nagyobbat. Más célja ezen
kívül nincs, de ez is remekül elszórakoztatja középtávon',
},
'4'=>
{ 'ID' => 4,
'CODENAME' => 'Cumi',
'NAME' =>'Cumi',
'TEAM' =>'Good Leader',
'STYLE' =>'N/A',
'AGE' =>'15',
'WEIGHT'=>'55kg',
'HEIGHT'=>'170cm',
'SHOE' =>'41.5',
'STORY' =>
'His life ambition was to drive a car. Now that this was accomplished,
he has turned to his second greatest ambition: to be a great martial
artist superhero. As a start, he has watched the TV series "Kung fu"
from beginning to end, in one session. His current training consists
of but this.',
'KEYS' =>
'Down Back LPunch - Finger Shot
Forward Forward HPunch - Spit
Back Down Forward - Baseball',
'NAME-hu' =>'Cumi',
'TEAM-hu' =>'Jo vezer',
'STYLE-hu' =>'N/A',
'AGE-hu' =>'15',
'WEIGHT-hu'=>'55',
'HEIGHT-hu'=>'170',
'SHOE-hu' =>'41.5',
'STORY-hu' =>
'Elete fo ambicioja volt, hogy autot vezessen. Most hogy ezt teljesitette, masodik fo
amibicioja fele fordult: hogy nagy harcmuvessze valjon. Kezdetben ehhez megnezte
a Kung fu sorozatot elejetol vegeig egyulteben. Kepzettsege jelenleg ebbol all.',
},
'5'=>
{ 'ID' => 5,
'CODENAME' => 'Sirpi',
'NAME' =>'Sirpi',
'TEAM' =>'Good',
'STYLE' =>'Don\'tHurtMe-FU',
'AGE' =>'24',
'WEIGHT'=>'76kg',
'HEIGHT'=>'170cm',
'SHOE' =>'41',
'STORY' =>
'After being a "hardcore" gamer for several years and consuming a
great amount of food, his electricity was turned off. This has caused
him to make a very stupid face which lasts till this day, and will
last until he has defeated his archenemy. This is why he resolved to
join the good team... also he is frightened alone.',
'KEYS' =>
'Down Forward LPunch - Surprise
Forward Forward HPunch - Applause',
'STYLE-hu' => 'Nebánts-FU',
'STORY-hu' =>
'Sok évnyi hardcore gamerkedés után, miközben el is hízott jól,
kikapcsolták nála a villanyt.
Erre nagyon hülye pofát vágott, és ez igy is
marad mindaddig, amíg le nem számol õsellenségével (vagy még utána is).
Ezért csatlakozott a jók kicsiny csapatához... Meg amúgy is fél egyedül.',
},
'6'=>
{ 'ID' => 6,
'CODENAME' => 'Macy',
'NAME' =>'Macy',
'TEAM' =>'Good',
'STYLE' =>'Macy-fu',
'AGE' =>'17',
'WEIGHT'=>'41kg',
'HEIGHT'=>'175cm',
'SHOE' =>'37',
'STORY' =>
'A few years ago (perhaps a little earlier, or maybe later) she was
found among the clouds in a cradle (falling, of course). She learned
martial art from brave Son Goku, so she landed on her feet and didn\'t
die. She\'s been immortal ever since. Who knows for how long? Maybe
it won\'t be until the next fight agains Evil...',
'KEYS' =>
'Down Back LPunch - Toss
Forward Forward HKick - Scissor Kick',
'STORY-hu' =>
'kb. néhány évvel ezelõtt, (vagy talán egy kicsit korábban, esetleg
késõbb) a felhõk között egy pólyában találtak rá (zuhanás közben).
A bátor
Songokutól elleste a harcmûvészet mesteri fortélyait, igy talpra esett és
nem halt meg. Azóta is halhatatlan. Ki tudja, még meddig? Talán a
következõ harcig a gonosz ellen...',
},
'7'=>
{ 'ID' => 7,
'CODENAME' => 'Bence',
'NAME' =>'Jan Ito',
'TEAM' =>'Evil',
'STYLE' =>'Kururin-do',
'AGE' =>'20',
'WEIGHT'=>'85kg',
'HEIGHT'=>'172cm',
'SHOE' =>'39',
'STORY' =>
'The "Japanese giant" is a sworn enemy of Descant... after he left
muddy boot marks all over the freshly mopped porch of the pub, er,
dojo which has belonged to his ancestors for 16 generations. Since
he has turned to the dark side of the janitor. His knowledge of
the "way of the concierge" matches his deep hatred towards army
boots.',
'KEYS' =>
'Down Back LPunch - Soap Throw
Back Fw Back Fw LPunch - Stick Spin
Back Forward HPunc - Pierce',
'NAME-hu' =>'Taka Ito',
'TEAM-hu' =>'Gonosz',
'STYLE-hu' =>'Kururin-do',
'AGE-hu' =>'20',
'WEIGHT-hu' =>'85',
'HEIGHT-hu' =>'172',
'SHOE-hu' =>'39',
'STORY-hu' =>
'A japán óriás Descant esküdt ellensége, mióta összejárta az általa frissen felmosott
verandát a 16 generáció óta családja által birtokolt foga-do-ban. Tudását a sötét
oldal szolgálatába állította. Tudását a "gondnok útján" csak mélységes megvetése a
vasaltorrú bakancsok iránt szárnyalja túl.',
},
'8'=>
{ 'ID' => 8,
'CODENAME' => 'Grizli',
'NAME' =>'Grizzly',
'TEAM' =>'Good',
'STYLE' =>'Bear dance',
'AGE' =>'21',
'WEIGHT'=>'Several tons',
'HEIGHT'=>'170cm',
'SHOE' =>'49',
'STORY' =>
'Grizzly has been long famous for his laziness. He has made laziness a
form of art. In the past 5 years he has been to lazy to watch TV. Every
Saturday he trains in his own special fighting style, one not unlike
that of Bud Spencer, whom he holds as his honorary master. Though,
since he found out that Bud WORKS on Saturdays, he has revoked his
title, and keeps it for himself. He has joined the Good team to fight
to protect the Saturday.',
'KEYS' =>
'Down Back LPunch - Bear Shot
Forward Forward HPunch - Poke
Down Down LKick - Earthquake
Back Forward Back HPunch - Nunchaku',
'NAME-hu' =>'Grizli',
'TEAM-hu' =>'Jó',
'STYLE-hu' =>'Gyakás ala Medve',
'AGE-hu' =>'21',
'WEIGHT-hu' =>'50000000',
'HEIGHT-hu' =>'170',
'SHOE-hu' =>'49',
'STORY-hu' =>
'Grili a lustaságáról volt hires mindig. Olyannyira, hogy amilyen szinten
azt csinálja, az már mûvészet. Az utóbbi 5 évben már a TV
nézéshez is lusta lett.
Minden Szobaton tart edzést a Különbenmegintdühbejövünk do
stilusból, amit még kezdõ korában a TV-bõl sajátított el. A stilus
tiszteletbeli nagymestere maga Bád Szpencer, de sajnos miután Bád-ról
kiderült, hogy szombatonként dolgozik, Grizli elvette tõle a cimet, s
azóta magának tartogatja.
Grizli a szombat ellenesek ádáz gyûlölõje, a jó csapat oszlopos tagja.',
},
'9'=>
{ 'ID' => 9,
'CODENAME' => 'Descant',
'NAME' =>'Descant',
'TEAM' =>'Good',
'STYLE' =>'Murderization',
'AGE' =>'58',
'WEIGHT'=>'89kg',
'HEIGHT'=>'180cm',
'SHOE' =>'44',
'STORY' =>
'He was trained in \'Nam in every known weapon and martial art form.
He fought there on the side of the Americans and the Russians...
whoever paid more at the moment. Then he used the money to hybernate
himself until the next great war.. or until the Saturday is in
trouble. He joined the side with the more CASH...',
'KEYS' =>
'Down Back LPunch - Aimed Shot
Back Back LPunch - Hip Shot
Forward Down HPunch - Knife Throw
Forward Forward HPunch - Gun Hit',
'NAME-hu' =>'Descant',
'TEAM-hu' =>'Jó',
'STYLE-hu' =>'+halol',
'AGE-hu' =>'58',
'WEIGHT-hu'=>'89',
'HEIGHT-hu'=>'180',
'SHOE-hu' =>'44',
'STORY-hu' =>
'A Vietnámi háború során képezték ki minden ismert fegyverre és harcm~uvészetre. Már ott
is az Oroszok és az Amerikaik oldalán harcolt, már aki éppen többet fizetett. Ezután a pénzb"ol
hibernáltatta magát és csak háborúk esetén olvasztatja föl magát, vagy most mikor a szombat
bajba kerül most is azon az oldalon van, ahol vastagabb a BUKSZA, most épp a...',
},
'10'=>
{ 'ID' => 10,
'CODENAME' => 'Surba',
'NAME' =>'Rising-san',
'TEAM' =>'Evil',
'STYLE' =>'Flick-fu',
'AGE' =>'500',
'WEIGHT'=>'N/A',
'HEIGHT'=>'50',
'SHOE' =>'N/A',
'STORY' =>
'Mistically disappeared Aeons ago.. on a Saturday! Now he is back, and
brought back his destructive techique, unmatched on Earth. Noone knows
why he joined the Dark Evil Mage...',
'NAME-hu' =>'Rising-san',
'TEAM-hu' =>'Gonosz',
'STYLE-hu' =>'Pöcc-fu',
'AGE-hu' =>'500',
'WEIGHT-hu' =>'N/A',
'HEIGHT-hu' =>'50',
'SHOE-hu' =>'Nem visel',
'STORY-hu' =>
'Sok-sok évvel ezel"ott eltûnt misztikus körülmények között... egy szombati napon!
És most visszatért. Senki sem tudja honnan jött, de magával hozta pusztító technikáját
melynek nincs párja a földön. Senki sem érti miért fogadta el a gonosz varázsl
megbízását...',
},
'11'=>
{ 'ID' => 11,
'CODENAME' => 'Ambrus',
'NAME' =>'Mad Sawman',
'TEAM' =>'Evil',
'STYLE' =>'Sawing',
'AGE' =>'35',
'WEIGHT'=>'110',
'HEIGHT'=>'120',
'SHOE' =>'49',
'STORY' =>
'His cradle was found on a tree. Later he chopped up the family that
took him and fed them to the bears. He has been roaming the Canadian
forests, chopping trees and heads alike. On hot summer nights his
maniac laughter echoes far.',
'KEYS' =>
'Down Back LPunch - Axe Toss
Back Forward HKick - Chop Chop
Forward Forward LKick - Bonesaw',
'NAME-hu' =>'Fûrészes Õrült',
'TEAM-hu' =>'Gonosz',
'STYLE-hu' =>'Fanyûvõ',
'AGE-hu' =>'35',
'WEIGHT-hu' =>'110',
'HEIGHT-hu' =>'120',
'SHOE-hu' =>'49',
'STORY-hu' =>
'Bölcsõjét egy fán találták meg. Késõbb felaprította az egész befogadó családját, és
megetette a medvékkel. Azóta a kanadai erdõkben bolyongva vágja a fákat és az
emberfejeket. Forró nyári éjszakákon mindig hallatszik õrült kacaja.',
},
'12'=>
{ 'ID' => 12,
'CODENAME' => 'Dani',
'NAME' =>'Imperfect Soldier',
'TEAM' =>'Good',
'STYLE' =>'Pub Fight',
'AGE' =>'50',
'WEIGHT'=>'100',
'HEIGHT'=>'180',
'SHOE' =>'44',
'STORY' =>
'His childhood was determined by Drezda\'s bombing. This trauma has
caused him to join the army. For the last 30 years he is corporal
without the slightest hope for advancement. He annoys his
subordinates with a constant flow of stories of pub fights, until
they ask for relocation.',
'KEYS' =>
'Down Back LPunch - Hat
Forward Forward HPunch - Ramming Attack
Back Down Back LPunch - Stab
Back Forward LKick - Poke',
'NAME-hu' =>'Tökéletlen Katona',
'TEAM-hu' =>'Jó',
'STYLE-hu' =>'Kocsmabunyó',
'AGE-hu' =>'50',
'WEIGHT-hu' =>'100',
'HEIGHT-hu' =>'180',
'SHOE-hu' =>'44',
'STORY-hu' =>
'Gyermekkorát meghatározta Drezda lebombázása. E trauma hatására katonai
pályára állt. Immáron 30 éve a Bundeswehr kötelékében tizedes az
elõléptetés bárminem~u esélye nélkül.
Alantasait folytonosan kocsmai bunyóinak történeteivel traktálja, amíg azok
áthelyezésüket nem kérik.',
},
'13'=>
{ 'ID' => 13,
'CODENAME' => 'Kinga',
'NAME' =>'Aisha',
'TEAM' =>'Good',
'STYLE' =>'Death Dance',
'AGE' =>'21',
'WEIGHT'=>'43.5',
'HEIGHT'=>'155',
'SHOE' =>'35',
'STORY' =>
'Her trials started right in the womb.. her life hung on a single
umbilical cord! But she was finally born, and got the name
Aisha ("survives everything"). Since her childhood she survived
natural disasters and terrorist attacks, and got frankly fed up.
So one time she said:
"If I survive this, I swear, I\'ll join those stupid Mortal guys!"',
'STORY-hu'=>
'A megprobaltatasok akkor kezdodtek, amikor anyukaja a szive alatt hordta.
Egyetlen koldokzsinoron fuggott az elete! De megszuletett vegul, ezert
kapta az Aisha ("mindent tulelo") nevet. Aztan gyermekkoratol fogva sok
termeszeti katasztrofat, terrortamadast atveszelt, es mar kezdett elege
lenni az egeszbol, igy hat az egyik alkalommal kijelentette, hogy ha ezt
tulelem, csatlakozom azokhoz a hulye Mortalosokhoz!',
}, #'
+'15'=>
+{ 'ID' => 15,
+ 'CODENAME' => 'Elf',
+ 'NAME' => 'Pixie',
+ 'TEAM' => 'Good',
+ 'STYLE' => 'Glamour',
+ 'AGE' => '140',
+ 'WEIGHT'=> '1',
+ 'HEIGHT'=> '1',
+ 'SHOE' => '1',
+ 'STORY' => '...',
+},
+
'14'=>
{ 'ID' => 14,
'CODENAME' => 'Misi',
'NAME' =>'Papatsuka Mamatsuba',
'TEAM' =>'Evil',
'STYLE' =>'Gloom',
'AGE' =>'Feudal Middle',
'WEIGHT'=>'Dead',
'HEIGHT'=>'178 cm',
'SHOE' =>'43,12748252',
'STORY' =>
'Papastuka has been raised strictly in the way of the samurai since age 4.
His father was the most famous warrior of the past 20 years. After he
learned all the jutsu from dad, he skalped him, and put the skalp on his head
to scare his enemies.
On weekdays he is seen chasing women, saturdays he
drinks a lot. Then he decided, that enjoying saturday should belong to him
alone...',
'NAME-hu' =>'Apatsuka Anyatsuba',
'TEAM-hu' =>'Gonosz',
'STYLE-hu' =>'Komor',
'AGE-hu' =>'Feudális közép...',
'WEIGHT-hu' =>'Nagyon súlyos!',
'STORY-hu' =>
'Apatsukát 4 éves kora óta nevelték szülei a szamuráj életmódra, szigor
keretek között. Apja az elmúlt 20 év leghíresebb harcosa volt. Amint
minden harci fogást elsajátított apjától, megskalpolta és a skalpját
fejére illesztette, ezzel megfélemlítve ellenségeit.
Hétközben nõket
hajszolt, szombaton szívott és berugott. Aztán úgy döntött, hogy ezen a
szombaton csak õ érezheti jól magát...',
},
);
sub RegisterFighter($)
{
my ($reginfo) = @_;
# reginfo must contain: ID, GENDER, DATAVERSION, DATASIZE, STARTCODE, FRAMES, STATES, CODENAME
foreach my $attr (qw(ID GENDER DATAVERSION DATASIZE STARTCODE FRAMES STATES CODENAME))
{
die "RegisterFighter: Attribute $attr not found" unless defined $reginfo->{$attr};
}
# CheckStates( $reginfo->{ID}, $reginfo->{STATES} );
my ($fighterenum, $fighterstats);
$fighterenum = $reginfo->{ID};
$fighterstats = $::FighterStats{$fighterenum};
if ( not defined $fighterstats )
{
print "RegisterFighter: Fighter $fighterenum not found, non-syndicated?\n";
$fighterstats = {
'ID' => $fighterenum,
'NAME' =>'Unknown (non-syndicated)',
'TEAM' =>'Unknown',
'STYLE' =>'Unknown',
'AGE' =>'Unknown',
'WEIGHT' =>'Unknown',
'HEIGHT' =>'Unknown',
'SHOE' =>'Unknown',
'STORY' =>'...',
'DATAFILE' => $reginfo->{CODENAME} . '.dat',
%{$reginfo}
};
$::FighterStats{$fighterenum} = $fighterstats;
return;
}
# Add the reginfo to the fighter stats:
%{$fighterstats} = ( 'DATAFILE' => $reginfo->{CODENAME}.'.dat', %{$fighterstats}, %{$reginfo} );
}
sub GetStatsTranslated($$)
{
my ($source, $stat) = @_;
return $source->{"${stat}-$::LanguageCode"} if defined $source->{"${stat}-$::LanguageCode"};
return $source->{$stat};
}
sub GetFighterStats($)
{
my ($fighterenum) = @_;
my ($source) = $::FighterStats{$fighterenum};
$::Codename = $source->{CODENAME};
$::Name = GetStatsTranslated( $source, 'NAME' );
$::Team = GetStatsTranslated( $source, 'TEAM' );
$::Style = GetStatsTranslated( $source, 'STYLE' );
$::Age = GetStatsTranslated( $source, 'AGE' );
$::Weight = GetStatsTranslated( $source, 'WEIGHT' );
$::Height = GetStatsTranslated( $source, 'HEIGHT' );
$::Shoe = GetStatsTranslated( $source, 'SHOE' );
$::Story = GetStatsTranslated( $source, 'STORY' );
$::Keys = GetStatsTranslated( $source, 'KEYS' );
$::Datafile = $source->{'DATAFILE'};
- $::Portrait = $::Codename . ".icon.png";
+ $::Portrait = $::Codename . ".icon.png" if defined $::Codename;
- $::Story =~ s/([^\n])\n([^\n])/$1 $2/gms;
+ $::Story =~ s/([^\n])\n([^\n])/$1 $2/gms if defined $::Story;
@::StatTags = ( 'Name: ', 'Team: ', 'Style: ', 'Age: ', 'Weight: ', 'Height: ', 'Shoe size: ' );
# print "The data file of $fighterenum is '$::Datafile'\n";
return $source;
}
#GetFighterStats(1);
#print "$::Name $::Team $::Style $::Age $::Weight $::Height $::Shoe\n$::Story\n";
return 1;
diff --git a/data/script/Makefile.am b/data/script/Makefile.am
index d594d84..e0180c8 100644
--- a/data/script/Makefile.am
+++ b/data/script/Makefile.am
@@ -1,8 +1,10 @@
## Process this file with automake to produce Makefile.in
scriptdatadir = $(pkgdatadir)/script
scriptdata_DATA = \
-Backend.pl Damage.pl Doodad.pl Keys.pl State.pl \
-Collision.pl DataHelper.pl Fighter.pl FighterStats.pl PlayerInput.pl Translate.pl
+Backend.pl Collision.pl Doodad.pl Keys.pl Rewind.pl \
+CollectedStats.pl Damage.pl Fighter.pl PlayerInput.pl State.pl \
+CollectStats.pl DataHelper.pl FighterStats.pl QuickSave.pl Translate.pl
+
EXTRA_DIST = $(scriptdata_DATA)
diff --git a/data/script/Makefile.in b/data/script/Makefile.in
index 52a465c..ccd18d9 100644
--- a/data/script/Makefile.in
+++ b/data/script/Makefile.in
@@ -1,214 +1,214 @@
# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
SHELL = @SHELL@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
sbindir = @sbindir@
libexecdir = @libexecdir@
datadir = @datadir@
sysconfdir = @sysconfdir@
sharedstatedir = @sharedstatedir@
localstatedir = @localstatedir@
libdir = @libdir@
infodir = @infodir@
mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
DESTDIR =
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ../..
ACLOCAL = @ACLOCAL@
AUTOCONF = @AUTOCONF@
AUTOMAKE = @AUTOMAKE@
AUTOHEADER = @AUTOHEADER@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
transform = @program_transform_name@
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_alias = @build_alias@
build_triplet = @build@
host_alias = @host_alias@
host_triplet = @host@
target_alias = @target_alias@
target_triplet = @target@
AUTODIRS = @AUTODIRS@
CXX = @CXX@
FT2_CFLAGS = @FT2_CFLAGS@
FT2_CONFIG = @FT2_CONFIG@
FT2_LIBS = @FT2_LIBS@
MAKEINFO = @MAKEINFO@
PACKAGE = @PACKAGE@
PERL = @PERL@
SDL_CFLAGS = @SDL_CFLAGS@
SDL_CONFIG = @SDL_CONFIG@
SDL_LIBS = @SDL_LIBS@
VERSION = @VERSION@
perl_embed_ccflags = @perl_embed_ccflags@
perl_embed_ldflags = @perl_embed_ldflags@
scriptdatadir = $(pkgdatadir)/script
-scriptdata_DATA = Backend.pl Damage.pl Doodad.pl Keys.pl State.pl Collision.pl DataHelper.pl Fighter.pl FighterStats.pl PlayerInput.pl Translate.pl
+scriptdata_DATA = Backend.pl Collision.pl Doodad.pl Keys.pl Rewind.pl CollectedStats.pl Damage.pl Fighter.pl PlayerInput.pl State.pl CollectStats.pl DataHelper.pl FighterStats.pl QuickSave.pl Translate.pl
EXTRA_DIST = $(scriptdata_DATA)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = ../../config.h
CONFIG_CLEAN_FILES =
DATA = $(scriptdata_DATA)
DIST_COMMON = Makefile.am Makefile.in
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
TAR = gtar
GZIP_ENV = --best
all: all-redirect
.SUFFIXES:
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOMAKE) --gnu data/script/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
cd $(top_builddir) \
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
install-scriptdataDATA: $(scriptdata_DATA)
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(scriptdatadir)
@list='$(scriptdata_DATA)'; for p in $$list; do \
if test -f $(srcdir)/$$p; then \
echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(scriptdatadir)/$$p"; \
$(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(scriptdatadir)/$$p; \
else if test -f $$p; then \
echo " $(INSTALL_DATA) $$p $(DESTDIR)$(scriptdatadir)/$$p"; \
$(INSTALL_DATA) $$p $(DESTDIR)$(scriptdatadir)/$$p; \
fi; fi; \
done
uninstall-scriptdataDATA:
@$(NORMAL_UNINSTALL)
list='$(scriptdata_DATA)'; for p in $$list; do \
rm -f $(DESTDIR)$(scriptdatadir)/$$p; \
done
tags: TAGS
TAGS:
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
subdir = data/script
distdir: $(DISTFILES)
here=`cd $(top_builddir) && pwd`; \
top_distdir=`cd $(top_distdir) && pwd`; \
distdir=`cd $(distdir) && pwd`; \
cd $(top_srcdir) \
&& $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu data/script/Makefile
@for file in $(DISTFILES); do \
d=$(srcdir); \
if test -d $$d/$$file; then \
cp -pr $$d/$$file $(distdir)/$$file; \
else \
test -f $(distdir)/$$file \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|| cp -p $$d/$$file $(distdir)/$$file || :; \
fi; \
done
info-am:
info: info-am
dvi-am:
dvi: dvi-am
check-am: all-am
check: check-am
installcheck-am:
installcheck: installcheck-am
install-exec-am:
install-exec: install-exec-am
install-data-am: install-scriptdataDATA
install-data: install-data-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
install: install-am
uninstall-am: uninstall-scriptdataDATA
uninstall: uninstall-am
all-am: Makefile $(DATA)
all-redirect: all-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
installdirs:
$(mkinstalldirs) $(DESTDIR)$(scriptdatadir)
mostlyclean-generic:
clean-generic:
distclean-generic:
-rm -f Makefile $(CONFIG_CLEAN_FILES)
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
maintainer-clean-generic:
mostlyclean-am: mostlyclean-generic
mostlyclean: mostlyclean-am
clean-am: clean-generic mostlyclean-am
clean: clean-am
distclean-am: distclean-generic clean-am
distclean: distclean-am
maintainer-clean-am: maintainer-clean-generic distclean-am
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
maintainer-clean: maintainer-clean-am
.PHONY: uninstall-scriptdataDATA install-scriptdataDATA tags distdir \
info-am info dvi-am dvi check check-am installcheck-am installcheck \
install-exec-am install-exec install-data-am install-data install-am \
install uninstall-am uninstall all-redirect all-am all installdirs \
mostlyclean-generic distclean-generic clean-generic \
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
diff --git a/data/script/PlayerInput.pl b/data/script/PlayerInput.pl
index ac4110d..35c929d 100644
--- a/data/script/PlayerInput.pl
+++ b/data/script/PlayerInput.pl
@@ -1,253 +1,266 @@
package PlayerInput;
$KEYTIMEOUT = 80;
sub new {
my ($class, $name) = @_;
my $self = {
'InputQueue' => [],
'InputPointer' => 0,
'Keys' => [0,0,0,0,0,0,0,0,0],
'KeyTimer' => 0,
};
bless ($self, $class);
return $self;
}
sub Reset {
my ($self) = @_;
$self->ClearInput;
$self->{'Keys'} = [0,0,0,0,0,0,0,0,0];
$self->{'KeyTimer'} = 0;
}
+sub RewindData {
+ my ($self) = @_;
+ my ($rewinddata);
+ $rewinddata = {
+ InputQueue => [ @{$self->{InputQueue}} ],
+ InputPointer => $self->{InputPointer},
+ Keys => [ @{$self->{Keys}} ],
+ KeyTimer => $self->{KeyTimer},
+ };
+ bless ($rewinddata, PlayerInput);
+ return $rewinddata;
+}
+
sub ClearInput {
my ($self) = @_;
$self->{'InputQueue'} = [];
$self->{'InputPointer'} = 0;
}
sub Advance {
my ($self) = @_;
my ($ip, $lastkey);
$self->{'KeyTimer'} ++;
$ip = $self->{'InputPointer'};
if ($ip > 0) {
$lastkey = $self->{'InputQueue'}->[$ip-1];
return if ( ($lastkey<5) and ($self->{'Keys'}->[$lastkey]) );
if ( $self->{'KeyTimer'} > $KEYTIMEOUT )
{
$self->{'KeyTimer'} = 0;
$self->ClearInput;
print ".";
}
}
}
sub KeyDown {
my ($self, $key) = @_;
${$self->{'Keys'}}[$key] = 1;
${$self->{'InputQueue'}}[$self->{'InputPointer'}] = $key;
$self->{'InputPointer'} += 1;
$self->{'KeyTimer'} = 0;
}
sub KeyUp {
my ($self, $key) = @_;
${$self->{'Keys'}}[$key] = 0;
}
=comment
GetDefaultAction is used by GetAction. It returns a "default"
action when the last key is no longer pressed. The default
action can be (in order of preference)
* crouching
* blocking
* jumping (fw and bw)
* walking
=cut
sub GetDefaultAction {
my ($self) = @_;
my $k = $self->{'Keys'};
return 'down' if ($k->[1]);
return 'block' if ($k->[4]);
if ( ${$k}[0] ) # Up
{
return 'jumpfw' if ${$k}[3];
return 'jumpbw' if ${$k}[2];
return 'jump';
}
return 'forw' if ($k->[3]);
return 'back' if ($k->[2]);
return '';
}
=comment
GetAction returns two scalars: input and modifier.
Input is any of the following:
lpunch Low punch
hpunch High punch
lkick Low kick
hkick High kick
jump Jump
jumpfw Jump forwards (up+forward)
jumpbw Jump backwards (up+back)
forw Forwards (walk)
back Back (walk)
down Down (crouch)
block Block
'' no action
Modifier applies to action buttons (punch and kick) only. It lists the
non-action buttons pressed before the action button, in reverse order.
The modifiers are U,D,B,F,X for up, down, back, forwards or block.
E.G. if the player presses down, forwards, low punch, the output is:
('lpunch', 'FD').
=cut
sub GetAction {
my ($self) = @_;
my $k = $self->{'Keys'};
my $q = $self->{'InputQueue'};
my $p = $self->{'InputPointer'}-1;
if ($p<0) # No keys pushed
{
return $self->GetDefaultAction();
}
my $lastkey = ${$q}[$p];
unless ( ${$k}[$lastkey] )
{
# Not pushed anymore
return $self->GetDefaultAction();
}
if ($lastkey >=5) # punch or kick
{
my ($act, $mod, $i);
$mod = '';
if ($lastkey==5) { $act = 'lpunch'; }
elsif ($lastkey==6) { $act = 'hpunch'; }
elsif ($lastkey==7) { $act = 'lkick'; }
else { $act = 'hkick'; }
# Add previous keys
for ( $i = $p-1; $i>=0; $i-- )
{
$lastkey = ${$q}[$i]; # Previous key
last if $lastkey>=5; # Only movement keys count
if ($lastkey==0) { $mod .= 'U'; }
elsif ($lastkey==1) { $mod .= 'D'; }
elsif ($lastkey==2) { $mod .= 'B'; }
elsif ($lastkey==3) { $mod .= 'F'; }
elsif ($lastkey==4) { $mod .= 'X'; }
}
print "$act $mod\n";
return ($act,$mod);
}
if ( ${$k}[0] ) # Up
{
return 'jumpfw' if ${$k}[3];
return 'jumpbw' if ${$k}[2];
return 'jump';
}
return 'forw' if $lastkey==3;
return 'back' if $lastkey==2;
return 'down' if $lastkey==1;
return 'block' if $lastkey==4;
}
sub ActionAccepted
{
my ($self) = @_;
my $k = $self->{'Keys'};
my $q = $self->{'InputQueue'};
my $p = $self->{'InputPointer'}-1;
return '' if ($p<0); # No keys pushed
my $lastkey = ${$q}[$p];
return '' unless ${$k}[$lastkey]; # Not pushed anymore
$self->ClearInput if $lastkey>=5;
}
package main;
=comment
The following are interface functions and variables for the C++ code and
Backend.pl
=cut
$Input1 = new PlayerInput;
$Input2 = new PlayerInput;
sub KeyDown
{
my ($player, $key) = @_;
#print "KeyDown ($player, $key)\n";
if ( ($key==2) or ($key==3) )
{
# Map left and right to backward and forward based on DIR
my ($dir, $p);
$p = $Fighters[$player];
$dir = ${$p}{'DIR'};
$key = (5 - $key) if ($dir<0);
}
if ($player==0) { $Input1->KeyDown( $key ); }
else { $Input2->KeyDown( $key ); }
}
sub KeyUp
{
my ($player, $key) = @_;
#print "KeyUp ($player, $key)\n";
if ( ($key==2) or ($key==3) )
{
# Map left and right to backward and forward based on DIR
my ($dir, $p);
$p = $Fighters[$player];
$dir = ${$p}{'DIR'};
$key = (5 - $key) if ($dir<0);
}
if ($player==0) { $Input1->KeyUp( $key ); }
else { $Input2->KeyUp( $key ); }
}
return 1;
diff --git a/data/script/QuickSave.pl b/data/script/QuickSave.pl
index 6bc0411..24cfba3 100644
--- a/data/script/QuickSave.pl
+++ b/data/script/QuickSave.pl
@@ -1,104 +1,109 @@
use strict;
# store: Convert a value into printable format for saving
sub store {
my $x = shift;
my ($t, $i, $key, $value);
+
+ unless ( defined $x ) {
+ $t = "undef";
+ }
- if ( not ref($x) ) { # $x is scalar
+ elsif ( not ref($x) ) { # $x is scalar
+ $x =~ s/'/\\'/g;
$t = "'$x'";
}
elsif (ref($x) eq "SCALAR"){ # $x is a scalar reference
$t = "\\'$x'";
}
elsif (ref($x) eq "REF"){ # $x is ref of a reference
$t = "\\"; # This could be wrong..
$t .= store $$x;
print("save: Storing ref of ref\n");
}
elsif (ref($x) eq "ARRAY"){ # $x is array ref. -> [...]
$t = '[ ';
foreach $i (@$x) {
$t .= store( $i );
$t .= ', ';
}
$t .= ' ]';
}
elsif (ref($x) eq "HASH"){ # $x is hash ref. -> {...}
$t .= '{ ';
while (($key, $value) = each %$x ) {
$t .= "\t'$key' => ";
$t .= store( $value );
$t .= ", \n";
}
$t .= ' }';
}
# else { # $x should be a Thing ref
# foreach $key (@names) {
# if ( $Thing::things{$key} eq $x ) # Found it!
# {
# $t = '$::'.$key;
# return $t;
# }
# }
# main::Mydebug "Thing::save: ERROR\n";
# $t = "'ERROR'";
# }
return $t;
}
# save: Saves the game. Uses the %things array.
=comment
sub save {
local ($fhand) = @_;
my ( $i, $item, $name, $key, $value );
@names = keys %things; # Just to make sure..
print $fhand "# Game saved by Thing::save\n\n";
while( ($name, $item) = each %things ) {
print $fhand "new ". ref($item)." '$name';\n";
}
print $fhand "\n";
while( ($name, $item) = each %things ) {
print $fhand "\%\$$name = ( \%\$$name,\n";
while (($key, $value)=each %$item) {
print $fhand "$key => ";
print $fhand store( $value );
print $fhand ",\n";
}
print $fhand ");\n\n";
}
}
=cut
sub QuickSave($$$)
{
my ($prefix, $frameArray, $states) = @_;
open FILE, ">X$prefix.pl";
print FILE '$f = ';
print FILE store( $frameArray );
print FILE ";\n\n@", , $prefix, 'Frames = @{$f}', ";\n\n";
print FILE '$f = ';
print FILE store( $states );
print FILE ";\n\n%", , $prefix, 'States = %{$f}', ";\n\n";
close FILE;
}
return 1;
diff --git a/data/script/Rewind.pl b/data/script/Rewind.pl
new file mode 100644
index 0000000..ef60936
--- /dev/null
+++ b/data/script/Rewind.pl
@@ -0,0 +1,86 @@
+
+
+
+use strict;
+
+
+$::RewindInterwal = 10; # Save every 10th game tick
+$::RewindMax = 200; # Must be a multiple of $RewindInterwal
+%::RewindData = ();
+
+
+sub ResetRewind()
+{
+ %::RewindData = ();
+}
+
+
+sub MakeRewindData()
+{
+ my ( $doodadrewind, $doodad, $rewinddata );
+
+ $doodadrewind = [];
+ foreach $doodad (@::Doodads) {
+ push @{$doodadrewind}, ( $doodad->RewindData() );
+ }
+
+ $rewinddata = {
+ gametick => $::gametick,
+ fighter1 => $::Fighter1->RewindData(),
+ fighter2 => $::Fighter2->RewindData(),
+ doodads => $doodadrewind,
+
+ bgx => $::bgx,
+ bgy => $::bgy,
+ bgspeed => $::BgSpeed,
+ bgposition => $::BgPosition,
+ over => $::over,
+ ko => $::ko,
+
+ quakeamplitude => $::QuakeAmplitude,
+ quakeoffset => $::QuakeOffset,
+ quakex => $::QuakeX,
+ quakey => $::QuakeY,
+
+ input1 => $::Input1->RewindData(),
+ input2 => $::Input2->RewindData(),
+ };
+
+ $::RewindData{$::gametick} = $rewinddata;
+ delete $::RewindData{$::gametick - $::RewindMax};
+}
+
+
+
+sub RewindTo($)
+{
+ my ($rewindto) = @_;
+ my ($rewinddata);
+
+ $rewindto = (int($rewindto / $::RewindInterwal) * $::RewindInterwal); #/
+
+ $rewinddata = $::RewindData{$rewindto};
+ return unless defined $rewinddata;
+
+ $::gametick = $rewinddata->{gametick};
+ $::Fighter1 = $rewinddata->{fighter1};
+ $::Fighter2 = $rewinddata->{fighter2};
+ @::Doodads = @{$rewinddata->{doodads}};
+
+ $::bgx = $rewinddata->{bgx};
+ $::bgy = $rewinddata->{bgy};
+ $::BgSpeed = $rewinddata->{bgspeed};
+ $::BgPosition = $rewinddata->{bgposition};
+ $::over = $rewinddata->{over};
+ $::ko = $rewinddata->{ko};
+
+ $::QuakeAmplitude = $rewinddata->{quakeamplitude};
+ $::QuakeOffset = $rewinddata->{quakeoffset};
+ $::QuakeX = $rewinddata->{quakex};
+ $::QuakeY = $rewinddata->{quakey};
+
+ $::Input1 = $rewinddata->{input1};
+ $::Input2 = $rewinddata->{input2};
+}
+
+1;
diff --git a/data/script/Translate.pl b/data/script/Translate.pl
index fe1a607..8c37e68 100644
--- a/data/script/Translate.pl
+++ b/data/script/Translate.pl
@@ -1,1011 +1,1013 @@
use strict;
use bytes;
=comment
Translate.pl attempts to load all of the translations into one file. A
translation is simply a hash from English to the other language.
=cut
$::English = { 'LanguageCode' => 0,
# In-game text
'MAX COMBO!!!' => undef,
'%d-hit combo!' => undef, # e.g. 3-hit combo!
'%d%% damage' => undef, # e.g. 30% damage
'Round %d' => undef,
'REW' => undef,
'REPLAY' => undef,
'DEMO' => undef,
'Press F1 to skip...'=> undef,
'HURRY UP!' => undef,
'TIME IS UP!' => undef,
'Final Judgement' => undef,
'Continue?' => undef,
'SPLAT!' => undef,
'Choose A Fighter Dammit' => undef,
# Menu items
"Main Menu" => undef,
"~SINGLE PLAYER GAME"=> undef,
"~MULTI PLAYER GAME"=> undef,
"~SURRENDER GAME" => undef,
"~OPTIONS" => undef,
"~INFO" => undef,
"QUIT" => undef,
"~OK" => undef,
"~LANGUAGE: " => undef,
"Options" => undef,
"~FULLSCREEN ON" => undef,
"~FULLSCREEN OFF" => undef,
"GAME SPEED: " => undef,
"GAME TIME: " => undef,
"STAMINA: " => undef,
"~SOUND" => undef,
"~RIGHT PLAYER KEYS"=> undef,
"~LEFT PLAYER KEYS" => undef,
"Sound" => undef,
"CHANNELS: " => undef, # Mono / Stereo
"SOUND QUALITY: " => undef, # KHz of playback rate
"SOUND FIDELITY: " => undef, # 8 bit or 16 bit
"MUSIC VOLUME: " => undef, # OFF or numeric
"EFFECTS VOLUME: " => undef, # OFF or numeric
# Menu options
"BABY" => undef,
"VERY LOW" => undef,
"LOW" => undef,
"NORMAL" => undef,
"HIGH" => undef,
"VERY HIGH" => undef,
"NEAR IMMORTAL" => undef,
"SNAIL RACE" => undef,
"SLOW" => undef,
"NORMAL" => undef,
"TURBO" => undef,
"KUNG-FU MOVIE" => undef,
# Sound / Channels
"MONO" => undef,
"STEREO" => undef,
# Sound / Mixing rate settings
"LOW" => undef,
"MEDIUM" => undef,
"HIGH" => undef,
# Sound volume
"OFF" => undef,
# Key configuration
'%s player-\'%s\'?' => undef, # The first %s becomes Left or Right. The second %s is up/down/high punch/...
'Left' => undef,
'Right' => undef,
"up", => undef,
"down", => undef,
"left", => undef,
"right", => undef,
"block", => undef,
"low punch", => undef,
"high punch", => undef,
"low kick", => undef,
"high kick" => undef,
'Thanks!' => undef,
# Demo screens,
'Fighter Stats' => undef,
'Unfortunately this fighter is not yet playable.' => undef,
'Name: ' => undef,
'Team: ' => undef,
'Style: ' => undef,
'Age: ' => undef,
'Weight: ' => undef,
'Height: ' => undef,
'Shoe size: ' => undef,
"Credits" => undef,
"CreditsText1" =>
"OPENMORTAL CREDITS
-- THE OPENMORTAL TEAM ARE --
CODING - UPi
MUSIC - Purple Motion
MUSIC - XTD / Mystic
GRAPHICS - UPi
German translation - ??
French translation - Vampyre
Spanish translation - EdsipeR
Portuguese translation - Vinicius Fortuna
-- CAST --
Boxer - Zoli
Cumi - As himself
Descant - As himself
Fureszes Orult - Ambrus
Grizli - As himself
Kinga - As herself
Macy - As herself
Misi - As himself
Rising-san - Surba
Sirpi - As himself
Taka Ito - Bence
Tokeletlen Katona - Dani
Watasiwa Baka Janajo - Ulmar
Black Dark Evil Mage - UPi
-- HOSTING --
sourceforge.net
apocalypse.rulez.org
freshmeat.net
OpenMortal is Copyright 2003 of the OpenMortal Team
Distributed under the GNU General Public Licence Version 2\n\n",
'CreditsText2' =>
'Thanks to Midway for not harrassing us with legal stuff so far, even though '.
'we must surely violate at least 50 of their patents, international copyrights and registered trademarks.
OpenMortal needs your help! If you can contribute music, graphics, improved code, '.
'additional characters, cash, beer, pizza or any other consumable, please mail us '.
'at upi@apocalypse.rulez.org! The same address is currently accepting comments and '.
"fanmail too (hint, hint!).\n\n",
'CreditsText3' =>
"Be sure to check out other stuff from
Apocalypse Production
and
Degec Entertainment\n\n",
'Story1Text' =>
"We, the Gods of the Evil Killer Black Antipathic Dim (witted) Fire Mages no longer tolerate the lack of evildoing.
We send them out on a mission so diabolical, so evil that the world will never be the same again!
We order our unworthy followers to
DESTROY THE SATURDAY
and plunge humanity into a dark age of 5 working days and 1 holiday per week... FOREVER!\n\n\n\n\n\n\n\n\n",
'Story2Text', =>
"Whenever EVIL looms on the horizon, the good guys are there to save the day. Son Goku, the protector of Earth and Humanity went to the rescue...
Only to become ROADKILL on his way to the Mortal Szombat tournament! It was Cumi's first time behind the wheel, after all...\n\n\n\n\n\n\n\n\n",
};
$::Hungarian = { 'LanguageCode' => 3,
# In-game text
'MAX COMBO!!!' => "MAX KOMBÓ!!!",
'%d-hit combo!' => '%dX kombó',
'%d%% damage' => '%d%% sebzés',
'Round %d' => '%d. menet',
'REW' => 'VISSZA',
'REPLAY' => undef,
'DEMO' => 'DEMÓ',
'Press F1 to skip...'=> 'F1 gomb: tovább',
'HURRY UP!' => 'GYERÜNK MÁR!',
'TIME IS UP!' => 'NA ENNYI!',
'Final Judgement' => 'Végsõ Ítélet',
'Continue?' => 'Tovább?',
'SPLAT!' => 'FRÖCCS!',
'Choose A Fighter Dammit' => 'Válassz Játékost, Baszki',
# Menu items
"Main Menu" => 'FÕMENÜ',
"~SINGLE PLAYER GAME"=> '~EGYSZEMÉLYES JÁTÉK',
"~MULTI PLAYER GAME"=> '~KÉTSZEMÉLYES JÁTÉK',
"~SURRENDER GAME" => '~JÁTÉK FELADÁSA',
"~OPTIONS" => '~BEÁLLÍTÁSOK',
"~INFO" => '~INFORMÁCIÓK',
"QUIT" => 'QUIT',
"~OK" => '~OKÉ',
"~LANGUAGE: " => '~NYELV: ',
"Options" => 'Beállítások',
"~FULLSCREEN ON" => 'Teljes képernyõ',
"~FULLSCREEN OFF" => 'Ablakos megjelenítés',
"GAME SPEED: " => 'Játék sebesség: ',
"GAME TIME: " => 'Játékidõ: ',
"STAMINA: " => 'Állóképesség: ',
"~SOUND" => '~HANG',
"~RIGHT PLAYER KEYS"=> '~Jobb játékos gombjai',
"~LEFT PLAYER KEYS" => '~Bal játékos gombjai',
"Sound" => 'Hangok',
"CHANNELS: " => 'Csatornák: ',
"SOUND QUALITY: " => 'Hangminõség: ',
"SOUND FIDELITY: " => 'Hangpontosság: ',
"MUSIC VOLUME: " => 'Zene hangereje: ',
"EFFECTS VOLUME: " => 'Zajok hangereje: ',
# Menu options
"BABY" => 'CSECSEMÕ',
"VERY LOW" => 'NAGYON GYÉR',
"LOW" => 'GYÉR',
"NORMAL" => 'NORMÁLIS',
"HIGH" => 'KEMÉNY',
"VERY HIGH" => 'NAGYON KEMÉNY',
"NEAR IMMORTAL" => 'TERMINÁTOR',
"SNAIL RACE" => 'CSIGAVERSENY',
"SLOW" => 'LASSÚ',
"NORMAL" => 'NORMÁL',
"TURBO" => 'TURBÓ',
"KUNG-FU MOVIE" => 'KUNG-FU FILM',
"MONO" => 'MONÓ',
"STEREO" => 'SZTEREÓ',
"LOW" => 'ALACSONY',
"MEDIUM" => 'KÖZEPES',
"HIGH" => 'MAGAS',
"OFF" => 'NINCS',
# Key configuration
'%s player-\'%s\'?' => '%s játékos - \'%s\'?',
'Left' => 'Bal',
'Right' => 'Jobb',
"up", => 'fel',
"down", => 'le',
"left", => 'balra',
"right", => 'jobbra',
"block", => 'védés',
"low punch", => 'alsó ütés',
"high punch", => 'felsõ ütés',
"low kick", => 'alsó rúgás',
"high kick" => 'felsõ rúgás',
'Thanks!' => 'Köszi!',
# Demo screens,
'Fighter Stats' => 'Harcos Adatai',
'Unfortunately this fighter is not yet playable.' => 'Sajnos õ még nem játszható.',
'KEYS' => 'GOMBOK',
'Name: ' => 'Név: ',
'Team: ' => 'Csapat: ',
'Style: ' => 'Stílus: ',
'Age: ' => 'Kor: ',
'Weight: ' => 'Súly: ',
'Height: ' => 'Magasság: ',
'Shoe size: ' => 'Cipõméret: ',
"Credits" => 'Készítették',
"CreditsText1" =>
"A Mortál Szombat Elkövetõi
-- A MORTÁL SZOMBAT CSAPAT --
PROGRAM - UPi
ZENE - Purple Motion
ZENE - XTD / Mystic
GRAFIKA - UPi
Német fordítás - ??
Francia fordítás - Vampyre
Spanyol fordítás - EdispeR
-- SZEREPLÕK --
Boxer - Zoli
Cumi - Mint önmaga
Descant - Mint önmaga
Fûrészes Õrült - Ambrus
Grizli - Mint önmaga
Kinga - Mint önmaga
Macy - Mint önmaga
Misi - Mint önmaga
Rising-san - Surba
Sirpi - Mint önmaga
Taka Ito - Bence
Tökéletlen Katona - Dani
Watasiwa Baka Janajo - Ulmar
Black Dark Evil Mage - UPi
-- SZERVEREINK --
sourceforge.net
apocalypse.rulez.org
freshmeat.net
A Mortál Szombat Copyright 2003, A Mortál Szombat Csapat
Distributed under the GNU General Public Licence Version 2\n\n",
'CreditsText2' =>
'Thanks to Midway for not harrassing us with legal stuff so far, even though '.
'we must surely violate at least 50 of their patents, international copyrights and registered trademarks.
OpenMortal needs your help! If you can contribute music, graphics, improved code, '.
'additional characters, cash, beer, pizza or any other consumable, please mail us '.
'at upi@apocalypse.rulez.org! The same address is currently accepting comments and '.
"fanmail too (hint, hint!).\n\n",
'CreditsText3' =>
"Be sure to check out other stuff from
Apocalypse Production
and
Degec Entertainment\n\n",
'Story1Text' =>
"Mi, a Gonosz Gyilkos Fekete Ellenszenves Sötét(elméjû) Tûzmágusok istenei nem tûrhetjük tovább a gonosztevés hiányát.
Egy küldetést adunk nekik amelyik olyan ördögien gonosz, amilyet a világ még sosem látott!
Méltatlan alattvalóink parancsa:
ELPUSZTÍTANI
A SZOMBATOT
hogy az emberiség az 5 munkanap és egy szünnapos hét sötét korába süllyedjen... ÖRÖKRE!\n\n\n\n\n\n\n\n\n",
'Story2Text', =>
"Whenever EVIL looms on the horizon, the good guys are there to save the day. Son Goku, the protector of Earth and Humanity went to the rescue...
Only to become ROADKILL on his way to the Mortal Szombat tournament! It was Cumi's first time behind the wheel, after all...\n\n\n\n\n\n\n\n\n",
};
$::French = { 'LanguageCode' => 2,
# In-game text
'MAX COMBO!!!' => 'MAX COMBO!!!',
'%d-hit combo!' => '%d-coups combo!', # e.g. 3-hit combo!
'%d%% damage' => '%d%% degats', # e.g. 30% damage
'Round %d' => 'Round %d',
'REW' => 'REMB',
'REPLAY' => 'RALENTI',
'DEMO' => 'DEMO',
'Press F1 to skip...'=> 'Appuyez sur F1 pour annuler',
'HURRY UP!' => 'DEPECHEZ-VOUS !',
'TIME IS UP!' => 'LE TEMPS EST ECOULE',
'Final Judgement' => 'Jugement Final',
'Continue?' => 'Continuer ?',
'SPLAT!' => 'SPLAT',
'Choose A Fighter Dammit' => 'Choisis un combattant Mildiou !',
# Menu items
"Main Menu" => "Menu Principal",
"~SINGLE PLAYER GAME"=> "JEU SOLO",
"~MULTI PLAYER GAME"=> "JEU MULTI",
"~SURRENDER GAME" => "Jeu JeMeRends",
"~OPTIONS" => "OPTIONS",
"~INFO" => "INFO",
"QUIT" => "QUITTER",
"~OK" => "OK",
"~LANGUAGE: " => "LANGUE: ",
"Options" => "Options",
"~FULLSCREEN ON" => "Plein écran ON",
"~FULLSCREEN OFF" => "Plein écran OFF",
"GAME SPEED: " => "Vitesse de jeu: ",
"GAME TIME: " => "Temps de jeu: ",
"STAMINA: " => "Vitalité: ",
"~SOUND" => "SON",
"~RIGHT PLAYER KEYS"=> "Touches joueur droite",
"~LEFT PLAYER KEYS" => "Touches joueur gauche",
"Sound" => 'Son',
"CHANNELS: " => "CANAUX: ", # Mono / Stereo
"SOUND QUALITY: " => "Echantillonage: ", # KHz of playback rate
"SOUND FIDELITY: " => "Qualité sonore: ", # 8 bit or 16 bit
"MUSIC VOLUME: " => "Volume musical: ", # OFF or numeric
"EFFECTS VOLUME: " => "Volume effets : ", # OFF or numeric
# Menu options
"BABY" => "BEBE",
"VERY LOW" => "TRES BAS",
"LOW" => "BAS",
"NORMAL" => "NORMAL",
"HIGH" => "ELEVE",
"VERY HIGH" => "TRES ELEVE",
"NEAR IMMORTAL" => "PRESQUE IMMORTEL",
"SNAIL RACE" => "COURSE D'ESCARGOT",
"SLOW" => "LENT",
"NORMAL" => "NORMAL",
"TURBO" => "TURBO",
"KUNG-FU MOVIE" => "FILM DE KUNG-FU",
# Sound / Channels
"MONO" => "MONO",
"STEREO" => "STEREO",
# Sound / Mixing rate settings
"LOW" => "BAS",
"MEDIUM" => "MOYEN",
"HIGH" => "HAUT",
# Sound volume
"OFF" => "OFF",
# Key configuration
'%s player-\'%s\'?' => '%s joueur-\'%s\'?', # The first %s becomes Left or Right. The second %s is up/down/high punch/...
'Left' => 'Gauche',
'Right' => 'Droite',
"up", => "haut",
"down", => "bas",
"left", => "gauche",
"right", => "droite",
"block", => "bloquer",
"low punch", => "poing bas",
"high punch", => "poing haut",
"low kick", => "Coup de pied bas",
"high kick" => "Coup de pied haut",
'Thanks!' => "Merci !",
# Demo screens,
'Fighter Stats' => 'Statistiques Combattant',
'Unfortunately this fighter is not yet playable.' => 'Malheureusement ce combattant n\'est pas encore jouable',
'Name: ' => 'Nom: ',
'Team: ' => 'Equipe: ',
'Style: ' => 'Style: ',
'Age: ' => 'Age: ',
'Weight: ' => 'Poids: ',
'Height: ' => 'Taille: ',
'Shoe size: ' => 'Pointure: ',
"Credits" => "Crédits",
"CreditsText1" =>
"OPENMORTAL CREDITS
-- L'EQUIPE D'OPENMORTAL EST --
Programmation - UPi
Musique - Purple Motion
Musique - XTD / Mystic
Graphiques - UPi
German translation - ??
French translation - Vampyre
Spanish translation - EdsipeR
Portuguese translation - Vinicius Fortuna
-- Acteurs --
Boxer - Zoli
Cumi - Dans son rôle
Descant - Dans son rôle
Fureszes Orult - Ambrus
Grizli - Dans son rôle
Kinga - Dans son rôle
Macy - Dans son rôle
Misi - Dans son rôle
Rising-san - Surba
Sirpi - Dans son rôle
Taka Ito - Bence
Tokeletlen Katona - Dani
Watasiwa Baka Janajo - Ulmar
Black Dark Evil Mage - UPi
-- HEBERGEMENT --
sourceforge.net
apocalypse.rulez.org
freshmeat.net
OpenMortal est un Copyright 2003 de l'Equipe OpenMortal \
Distribué sous Licence GNU General Public Licence Version 2\n\n",
'CreditsText2' =>
'Merci à Midway de ne pas nous harceler avec des trucs légaux (jusqu\'ici), bien que '.
'nous avons sûrement violé au moins 50 de leurs brevets, copyrights internationaux, et marques déposées.
OpenMortal a besoin de votre aide ! Si vous pouvez contribuer à la musique, graphiques, programmation améliorée, '.
'personnages supplémentaires, du fric, de la bière, des pizzas, ou toute autre forme de nourriture, SVP, envoyez-nous un email '.
'à upi@apocalypse.rulez.org! La même adresse accepte actuellement les commentaires et '.
"les emails de fans aussi (astuce, astuce !).\n\n",
'CreditsText3' =>
"Soyez certains de vérifier les autres programmes de
Apocalypse Production
et
Degec Entertainment\n\n",
'Story1Text' =>
"Nous, les Dieux des Diaboliques Tueurs Noirs Antipathiques Faibles (humour) Mages de Feu, ne tolérons plus longtemps le manque de faiseurs de mal.
Nous les avons une fois de plus envoyés dans un mission si diabolique, si Luciferatique que le monde ne sera plus jamais le même!
Nous ordonnons à nos disciples indignes de
DETRUIRE LE SAMEDI
et de plonger l'humanité dans un Moyen-Age de 5 jours de travail et 1 jour de vacances par semaine... A TOUT JAMAIS!\n\n\n\n\n\n\n\n\n",
'Story2Text', =>
"Bien que le Mal lorgne l'horizon, les gentils doivent sauver le jour ! Son Goku, le protecteur de la Terre et de l'Humanité viennent à la rescousse...
Seulement afin de devenir le TUEUR IMPITOYABLE sur le long chemin du tournoi Mortal Szombat ! C'était la première apparition de Cumi, après tout...\n\n\n\n\n\n\n\n\n",
};
$::Spanish = { 'LanguageCode' => 1,
# In-game text
'MAX COMBO!!!' => 'MAX COMBO!!!',
'%d-hit combo!' => '%d-hit combo!', # e.g. 3-hit combo!
'%d%% damage' => '%d%% daño', # e.g. 30% damage
'Round %d' => 'Round %d',
'REW' => 'RETROCEDER',
'REPLAY' => 'REPRODUCIR',
'DEMO' => 'DEMO',
'Press F1 to skip...'=>'Presiona F1 para saltar...',
'HURRY UP!' => 'APURATE!',
'TIME IS UP!' => 'SE ACABO EL TIEMPO!',
'Final Judgement' => 'Juicio Final',
'Continue?' => 'Continuar?',
'SPLAT!' => 'SPLAT!',
'Choose A Fighter Dammit' => 'Escoge un Peleador',
# Menu items
"Main Menu" => "Menu Principal",
"~SINGLE PLAYER GAME"=>"~1 SOLO JUGADOR ",
"~MULTI PLAYER GAME"=> "~MULTIJUGADOR ",
"~SURRENDER GAME" => "~ENTREGA ",
"~OPTIONS" => "~OPCIONES",
"~INFO" => "~INFO",
"QUIT" => "SALIR",
"~OK" => "~OK",
"~LANGUAGE: " => "~LENGUAJE: ",
"Options" => "Opciones",
"~FULLSCREEN ON" => "~PANTALLA COMPLETA ON",
"~FULLSCREEN OFF" => "~PANTALLA COMPLETA OFF",
"GAME SPEED: " => "VELOCIDAD DEL JUEGO: ",
"GAME TIME: " => "TIEMPO DEL JUEGO: ",
"STAMINA: " => "STAMINA: ",
"~SOUND" => "~SONIDO",
"~RIGHT PLAYER KEYS"=> "~TECLAS JUGADOR DERECHO",
"~LEFT PLAYER KEYS" => "~TECLAS JUGADOR IZQUIERDO",
"Sound" => "Sonido",
"CHANNELS: " => "CANALES: ", # Mono / Stereo
"SOUND QUALITY: " => "CALIDAD DEL SONIDO: ", # KHz of playback rate
"SOUND FIDELITY: " => "FIDELIDAD DEL SONIDO: ", # 8 bit or 16 bit
"MUSIC VOLUME: " => "VOLUMEN DE LA MUSICA: ", # OFF or numeric
"EFFECTS VOLUME: " => "VOLUMEN DE LOS EFECTOS: ", # OFF or numeric
# Menu options
"BABY" => "BEBE",
"VERY LOW" => "MUY LENTO",
"LOW" => "LENTO",
"NORMAL" => "NORMAL",
"HIGH" => "ALTO",
"VERY HIGH" => "MUY ALTO",
"NEAR IMMORTAL" => "CERCA DE LA INMORTALIDAD",
"SNAIL RACE" => "CARRERA DE CARACOL",
"SLOW" => "LENTO",
"NORMAL" => "NORMAL",
"TURBO" => "TURBO",
"KUNG-FU MOVIE" => "PELICULA DE KUNG-FU",
# Sound / Channels
"MONO" => "MONO",
"STEREO" => "STEREO",
# Sound / Mixing rate settings
"LOW" => "BAJO",
"MEDIUM" => "MEDIO",
"HIGH" => "ALTO",
# Sound volume
"OFF" => "OFF",
# Key configuration
'%s player-\'%s\'?' => '%s jugador-\'%s\'?', # The first %s becomes Left or Right. The second %s is up/down/high punch/...
'Left' => 'Izquierda',
'Right' => 'Derecha',
"up", => "arriba",
"down", => "abajo",
"left", => "izquierda",
"right", => "derecha",
"block", => "bloquear",
"low punch", => "puño bajo",
"high punch", => "puño alto",
"low kick", => "patada baja",
"high kick" => "patada alta",
'Thanks!' => 'Gracias!',
# Demo screens,
'Fighter Stats' => 'Estadísticas del Peleador',
'Unfortunately this fighter is not yet playable.' => 'Desafortunadamente este jugador no esta habilitado.',
'Name: ' => 'Nombre: ',
'Team: ' => 'Equipo: ',
'Style: ' => 'Estilo: ',
'Age: ' => 'Edad: ',
'Weight: ' => 'Peso: ',
'Height: ' => 'Altura: ',
'Shoe size: ' => 'Tamaño de zapato: ',
"Credits" => "Creditos",
"CreditsText1" =>
"CREDITOS
-- EL EQUIPO DE OPENMORTAL ES --
CODING - UPi
MUSIC - Purple Motion
MUSIC - XTD / Mystic
GRAPHICS - UPi
German translation - ??
French translation - Vampyre
Spanish translation - EdsipeR
Portuguese translation - Vinicius Fortuna
-- CAST --
Boxer - Zoli
Cumi - como el mismo
Descant - como el mismo
Fureszes Orult - Ambrus
Grizli - como el mismo
Kinga - como ella misma
Macy - como ella misma
Misi - como el mismo
Rising-san - Surba
Sirpi - como el mismo
Taka Ito - Bence
Tokeletlen Katona - Dani
Watasiwa Baka Janajo - Ulmar
Black Dark Evil Mage - UPi
-- HOSTING --
sourceforge.net
apocalypse.rulez.org
freshmeat.net
OpenMortal es Marca registrada 2003 de OpenMortal Team\
Distribuido bajo la GNU General Public Licence Version 2\n\n",
'CreditsText2' =>
'Gracias a Midway por no aplastarnos con su equipo legal'.
'Seguramente nosotros violamos al menos 50 de sus patentes, marcas registradas internacionales y trademarks registradas .
OpenMortal necesita de tu ayuda! Si tu puedes contribuir con musica, imagenes, improvisación de codigo, '.
'caracteres adicionales, dinero, cerveza, pizza o cualquier otra cosa consumible, por favor escribenos '.
'a upi@apocalypse.rulez.org! La misma dirección esta actualmente aceptando comentarios y '.
"tambien emails de fans (hint, hint!).\n\n",
'CreditsText3' =>
"Estate atento para verificar otro stuff desde
Apocalypse Production
y
Degec Entertainment\n\n",
'Story1Text' =>
"Nosotros, los Dioses del Endemoniado Negro Antipatico Asesino Dim no tolero mas lo endemoniado.
Enviamos a ellos en una misión tan diabólica, tan endemoniada que el mundo nunca será el mismo de nuevo!
Ordenamos a nuestros indignos seguidores a
DESTRUIR EL SABADO
y plagar la humanidad en una epoca oscura de 5 dias de trabajo y uno de descanso por semana.... POR SIEMPRE!\n\n\n\n\n\n\n\n\n",
'Story2Text', =>
"Whenever EVIL looms on the horizon, the good guys are there to save the day. Son Goku, the protector of Earth and Humanity went to the rescue...
Only to become ROADKILL on his way to the Mortal Szombat tournament! It was Cumi's first time behind the wheel, after all...\n\n\n\n\n\n\n\n\n",
};
$::Portuguese = { 'LanguageCode' => 4,
# In-game text
'MAX COMBO!!!' => 'COMBO MÁXIMO!!!',
'%d-hit combo!' => 'Combo de %d golpes!',
'%d%% damage' => 'Dano de %d%%',
'Round %d' => 'Round %d',
'REW' => 'REBOBINANDO',
'REPLAY' => 'REPLAY',
'DEMO' => 'DEMO',
'Press F1 to skip...' => 'Pressione F1 para resumir...',
'HURRY UP!' => 'APRESSEM-SE!',
'TIME IS UP!' => 'TEMPO ESGOTADO!',
'Final Judgement' => 'Julgamento Final',
'Continue?' => 'Continuar?',
'SPLAT!' => 'SPLAT!',
'Choose A Fighter Dammit' => 'Escolha um Lutador',
# Menu items
"Main Menu" => "Menu Principal",
"~SINGLE PLAYER GAME" => "JOGO ~INDIVIDUAL",
"~MULTI PLAYER GAME" => "JOGO ~MULTIPLAYER" ,
"~SURRENDER GAME" => "~Entregar-se",
"~OPTIONS" => "~OPÇÕES",
"~INFO" => "IN~FORMAÇÕES",
"QUIT" => "SAIR",
"~OK" => "~OK",
"~LANGUAGE: " => "~Língua: ",
"Options" => "Opções",
"~FULLSCREEN ON" => "TELA CHEIA ATIVADA",
"~FULLSCREEN OFF" => "TELA CHEIA DESATIVADA",
"GAME SPEED: " => "VELOCIDADE DE JOGO: ",
"GAME TIME: " => "TEMPO DE JOGO: ",
"STAMINA: " => "RESISTÊNCIA: ",
"~SOUND" => "~AUDIO",
"~RIGHT PLAYER KEYS" => "TECLAS, JOGADOR DA ~DIREITA",
"~LEFT PLAYER KEYS" => "TECLAS, JOGADOR DA ~ESQUERDA",
"Sound" => "Audio",
"CHANNELS: " => "CANAIS: ", # Mono / Stereo
"SOUND QUALITY: " => "QUALIDADE DE SOM: ", # KHz of playback rate
"SOUND FIDELITY: " => "FIDELIDADE DE SOM: ",# 8 bit or 16 bit
"MUSIC VOLUME: " => "VOLUME DA MÚSICA: ", # OFF or numeric
"EFFECTS VOLUME: " => "VOLUME DOS EFEITOS: ", # OFF or numeric
# Menu options
"BABY" => "BEBÊ",
"VERY LOW" => "MUITO BAIXA",
"LOW" => "BAIXA",
"NORMAL" => "NORMAL",
"HIGH" => "ALTA",
"VERY HIGH" => "MUITO ALTA",
"NEAR IMMORTAL" => "QUASE IMORTAL",
"SNAIL RACE" => "CORRIDA DE LESMAS",
"SLOW" => "DEVAGAR",
"NORMAL" => "NORMAL",
"TURBO" => "TURBO",
"KUNG-FU MOVIE" => "FILME DE KUNG-FU",
# Sound / Channels
"MONO" => "MONO",
"STEREO" => "ESTÉREO",
# Sound / Mixing rate settings
# CLASHES WITH MENU OPTIONS!!!
"LOW" => "BAIXA",
"MEDIUM" => "MÉDIA",
"HIGH" => "ALTA",
# Sound volume
"OFF" => "DESLIGADO",
# Key configuration
'%s player-\'%s\'?' => 'Jogador da %s-\'%s\'?', # The first %s becomes Left or Right. The second %s is up/down/high punch/...
'Left' => 'Esquerda',
'Right' => 'Direita',
"up", => 'cima',
"down", => 'baixo',
"left", => 'esquerda',
"right", => 'direita',
"block", => 'defesa',
"low punch", => 'soco baixo',
"high punch", => 'soco alto',
"low kick", => 'chute baixo',
"high kick" => 'chute alto',
'Thanks!' => 'Obrigado!',
# Demo screens,
'Fighter Stats' => 'Ficha Técnica',
'Unfortunately this fighter is not yet playable.' => 'Infelizmente ainda não é possível jogar com esse lutador',
'Name: ' => 'Nome: ',
'Team: ' => 'Time: ',
'Style: ' => 'Estilo: ',
'Age: ' => 'Idade: ',
'Weight: ' => 'Peso: ',
'Height: ' => 'Altura: ',
'Shoe size: ' => 'Calçado: ',
"Credits" => 'Créditos',
"CreditsText1" =>
"CRÉDITOS DE OPENMORTAL
-- EQUIPE OPENMORTAL --
PROGRAMADOR - UPi
MÚSICA - Purple Motion
MÚSICA - XTD / Mystic
GRÁFICOS - UPi
Tradução para o Alemão - ??
Tradução para o Francês - Vampyre
Tradução para o Espanhol - EdsipeR
Tradução para o Português - Vinicius Fortuna
-- ELENCO --
Boxer - Zoli
Cumi - ele mesmo
Descant - ele mesmo
Fureszes Orult - Ambrus
Grizli - ele mesmo
Kinga - ela mesma
Macy - ela mesma
Misi - ele mesmo
Rising-san - Surba
Sirpi - ele mesmo
Taka Ito - Bence
Tokeletlen Katona - Dani
Watasiwa Baka Janajo - Ulmar
Black Dark Evil Mage - UPi
-- HOSPEDAGEM --
sourceforge.net
apocalypse.rulez.org
freshmeat.net
OpenMortal é marca registrada de 2003 da Equipe OpenMortal
Distribuído segundo a Licença Pública Geral GNU Versão 2\n\n",
'CreditsText2' =>
'Obrigado à Midway por não nos ameaçar com assuntos legais até agora, apesar '.
'de nós certamente termos violado pelo menos umas 50 de suas patentes, direitos de cópia internacionais e marcas registradas.
OpenMortal precisa de sua ajuda! Se você puder contribuir com músicas, gráicos, códigos aperfeiçoados, '.
'personagens extras, dinheiro, cerveja, pizza ou qualquer outro bem-de-consumo, por favor escreva para nós em upi@apocalypse.rulez.org! '.
"Atualmente o mesmo endereço também está aceitando comentários e mensagens de fãs.\n\n",
'CreditsText3' =>
"Não se esqueça de dar uma olhada nos outros produtos da
Apocalypse Production
e da Degec Entertainment\n\n",
'Story1Text' =>
"Nós, os Deuses dos Magos de Fogo Malignos Assassinos Sombrios Antipáticos Estúpidos não mais toleramos a falta de maldade no mundo.
Nós os mandamos em uma missão tão diabólica, tão maligna, que o mundo nunca mais será o mesmo!
Nós ordenamos nossos indignos seguidores que
DESTUÍSSEM O SÁBADO,
condenando a humanidade a uma era sombria, com 5 dias úteis e apenas 1 dia de folga por semana... PARA SEMPRE!\n\n\n\n\n\n\n\n\n",
'Story2Text', =>
"Sempre que o Mal surge no horizonte, os heróis estão lá para salvar o dia. Son Goku, o protetor da Terra e da Humanidade, veio então para nos salvar...
Apenas para ser MORTO ATROPELADO em seu caminho para o torneio de Mortal Szombat! Bem, afinal era o primeiro dia de direção de Cumi...\n\n\n\n\n\n\n\n\n",
};
%::LanguageCodes =
(
'en' => $::English,
'hu' => $::Hungarian,
'fr' => $::French,
'es' => $::Spanish,
'pt' => $::Portuguese,
);
=comment
SetLanguage sets the two-character language code.
=cut
$::Language = $::English;
$::Language = $::Hungarian;
$::Language = $::French;
$::Language = $::Spanish;
$::Language = $::Portuguese;
sub SetLanguage($)
{
my ($NewLanguageCode) = @_;
$::LanguageCode = $NewLanguageCode;
if ( defined $::LanguageCodes{$::LanguageCode} )
{
$::Language = $::LanguageCodes{$::LanguageCode};
}
else
{
print "Language $::LanguageCode is not available. Reverting to English.\n";
$::Language = $::English;
$::LanguageCode = 'en';
}
$::LanguageNumber = $::Language->{'LanguageCode'};
}
sub Translate($)
{
my $text = shift;
# print "The translation of '$text' is ";
$text = $::Language->{$text} if defined $::Language->{$text};
# print "'$text'.\n";
$::Translated = $text;
}
1;
# "Connect to game", "Create game"
# "Network mode: ", "Connect to: ", "Start Network Play!", "Cancel"
# "Connection closed."
# "Press Escape to abort"
+# "Press Escape for the menu"
+# "You must have port 14882 open for this to work."
\ No newline at end of file

File Metadata

Mime Type
text/x-diff
Expires
Wed, Jun 17, 9:14 PM (1 w, 5 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
71023
Default Alt Text
(149 KB)

Event Timeline