Volviendo al tema principal, me he encontrado con lo que parece ser, el codigo fuente de KOF91, chequen este pedazo del programa:
CÓDIGO
intro.c
Go to the documentation of this file.
00001 /*
00002 intro.c
00003 */
00004
00005 #include "global.h"
00006 #include "macros.h"
00007 #include "config.h"
00008 #include "intro.h"
00009 #include "refresh.h"
00010 #include "display.h"
00011 #include "load_sprites.h"
00012 #include "moves.h"
00013 #include <stdio.h>
00014 #include "sound_fx_manager.h"
00015
00022 void intro( void )
00023 {
00024 int i = 1;
00025 int f1 = 1;
00026 int f2 = 1;
00027
00028 TRON( "INI - Intro" );
00029 retrace_count = 0;
00030 f1 = 1;
00031 f2 = 1;
00032 i = 1;
00033
00034 while ( ( f1 <= p1.intro.nbf ) && ( f2 <= p2.intro.nbf ) )
00035 {
00036 if ( animated )
00037 bkgd_counter++;
00038 if ( retrace_count > 2 )
00039 retrace_count = 0;
00040 retrace_count--;
00041 if ( retrace_count > 0 )
00042 ;
00043 else
00044 {
00045 if ( foreground )
00046 masked_blit( Frgd, zoomscreen,
00047 0, 0, 0, 0, ( bkgdlim + 320 ),
00048 ( 200 + zoomsup ) );
00049 blit( zoomscreen, virtscreen, cx, zoomsup, 0, 0,
00050 320, 200 );
00051 displays();
00052 blit_KOF91();
00053 blit_Bkgd();
00054 }
00055 if ( f1 < p1.intro.nbf )
00056 GKick( f1 , spr1x, spr1y, 2 );
00057 else
00058 GStatic( ( int ) ( f1 / p1.statik.spd ), spr1x, spr1y );
00059 if ( f2 < p2.intro.nbf )
00060 GKick2( f2, spr2x, spr2y, 2 );
00061 else
00062 GStatic2( ( int ) ( f2 / p2.statik.spd ), spr2x, spr2y );
00063
00064 if ( ++i >= 5 )
00065 { f1++; f2++; i = 1; }
00066
00067 } /* while */
00068 TRON( "END - Intro" );
00069
00070 }
00071 /****************************************************************/
00072
00073
00076 void introround( int round )
00077 {
00078 int deb = 1;
00079 #if GAME_DEBUG > 0
00080 sprintf( log_mess, "ROUND: %d", round );
00081 #endif
00082 TRON( log_mess );
00083
00084 while ( deb )
00085 {
00086 deb++;
00087 if ( deb == 2 )
00088 {
00089 load_kick1();
00090 load_kick2();
00091 retrace_count = 0;
00092 }
00093
00094 if ( deb == 50 )
00095 Round( round );
00096
00097 if ( deb == 240 )
00098 Fight();
00099 /*
00100 * Update the real screen
00101 */
00102 // vsync();
00103
00104 if ( animated )
00105 bkgd_counter++;
00106
00107 retrace_count--;
00108
00109 if ( retrace_count > 0 )
00110 ;
00111 else
00112 {
00113 displays();
00114 blit_KOF91();
00115 blit_Bkgd();
00116
00117 GStatic2( ( int ) ( flag2 / p2.statik.spd ), spr2x, spr2y );
00118 GStatic( ( int ) ( flag / p1.statik.spd ), spr1x, spr1y );
00119 if ( foreground )
00120 masked_blit( Frgd, zoomscreen,
00121 0, 0, 0, 0, ( bkgdlim + 320 ),
00122 ( 200 + zoomsup ) );
00123 blit( zoomscreen, virtscreen, cx, zoomsup, 0, 0, 320, 200 );
00124 /* while (!retrace_count);; */
00125 }
00126
00127 flag++;
00128 flag2++;
00129 if ( flag > ( ( p1.statik.spd * p1.statik.nbf ) - 1 ) )
00130 flag = 0;
00131 if ( flag2 > ( ( p2.statik.spd * p2.statik.nbf ) - 1 ) )
00132 flag2 = 0;
00133 if ( ( deb > 50 ) && ( deb < 150 ) )
00134 {
00135 if ( deb < 76 )
00136 angle = ( deb - 50 ) * ( Carton_R1->w / 25 );
00137 else if ( deb > 124 )
00138 angle = ( 25 - ( deb - 125 ) ) * ( Carton_R1->w / 25 );
00139 else
00140 angle = Carton_R1->w;
00141 switch ( round )
00142 {
00143 case 1:
00144 stretch_sprite( virtscreen, Carton_R1,
00145 ( 320 - angle ) / 2,
00146 ( 200 - Carton_R1->h ) / 2, angle,
00147 Carton_R1->h );
00148 break;
00149 case 2:
00150 stretch_sprite( virtscreen, Carton_R2,
00151 ( 320 - angle ) / 2,
00152 ( 200 - Carton_R2->h ) / 2, angle,
00153 Carton_R2->h );
00154 break;
00155 case 3:
00156 stretch_sprite( virtscreen, Carton_R3,
00157 ( 320 - angle ) / 2,
00158 ( 200 - Carton_R3->h ) / 2, angle,
00159 Carton_R3->h );
00160 break;
00161 default:
00162 stretch_sprite( virtscreen, Carton_R1,
00163 ( 320 - angle ) / 2,
00164 ( 200 - Carton_R1->h ) / 2, angle,
00165 Carton_R1->h );
00166 break;
00167 }
00168 }
00169 else if ( ( deb > 240 ) && ( deb < 320 ) )
00170 {
00171 masked_blit( Carton_FT, virtscreen, 0, 0,
00172 ( 320 - Carton_FT->w ) / 2,
00173 ( 200 - Carton_FT->h ) / 2, Carton_FT->w,
00174 Carton_FT->h );
00175 }
00176 else if ( deb > 320 )
00177 {
00178 if ( !nbpar )
00179 {
00180 /*
00181 * Frame count starts at 0
00182 */
00183 n = 0;
00184 clear_keybuf();
00185 poll_joystick();
00186 }
00187
00188 deb = 0;
00189 retrace_count = 0;
00190 }
00191 } /* while (deb) */
00192 #if GAME_DEBUG > 0
00193 sprintf( log_mess, "ROUND: %d - OK", round );
00194 #endif
00195 TRON( log_mess );
00196
00197 }
00198 /*********************************************************************/