Primer commit!
This commit is contained in:
20
.gitignore
vendored
Normal file
20
.gitignore
vendored
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
syntax: glob
|
||||||
|
|
||||||
|
pepe
|
||||||
|
recursos/*
|
||||||
|
bin/*
|
||||||
|
obj/*
|
||||||
|
Debug/*
|
||||||
|
Release/*
|
||||||
|
data/*
|
||||||
|
*.suo
|
||||||
|
*.sdf
|
||||||
|
*.opensdf
|
||||||
|
*.user
|
||||||
|
*.dll
|
||||||
|
*.exe
|
||||||
|
.DS_Store
|
||||||
|
trick.ini
|
||||||
|
*.xcuserstate
|
||||||
|
project.xcworkspace/
|
||||||
|
xcuserdata/
|
||||||
34
Info.plist
Normal file
34
Info.plist
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
|
<string>en</string>
|
||||||
|
<key>CFBundleExecutable</key>
|
||||||
|
<string>$(EXECUTABLE_NAME)</string>
|
||||||
|
<key>CFBundleIconFile</key>
|
||||||
|
<string></string>
|
||||||
|
<key>CFBundleIdentifier</key>
|
||||||
|
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||||
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
|
<string>6.0</string>
|
||||||
|
<key>CFBundleName</key>
|
||||||
|
<string>$(PRODUCT_NAME)</string>
|
||||||
|
<key>CFBundlePackageType</key>
|
||||||
|
<string>APPL</string>
|
||||||
|
<key>CFBundleShortVersionString</key>
|
||||||
|
<string>1.0</string>
|
||||||
|
<key>CFBundleSignature</key>
|
||||||
|
<string>????</string>
|
||||||
|
<key>CFBundleVersion</key>
|
||||||
|
<string>1</string>
|
||||||
|
<key>LSApplicationCategoryType</key>
|
||||||
|
<string>public.app-category.arcade-games</string>
|
||||||
|
<key>LSMinimumSystemVersion</key>
|
||||||
|
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
|
||||||
|
<key>NSHumanReadableCopyright</key>
|
||||||
|
<string>Copyright © 2016 Raimon Zamora. All rights reserved.</string>
|
||||||
|
<key>NSPrincipalClass</key>
|
||||||
|
<string>NSApplication</string>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
10
default.gcw0.desktop
Normal file
10
default.gcw0.desktop
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
[Desktop Entry]
|
||||||
|
Version=1.0
|
||||||
|
Type=Application
|
||||||
|
Name=Pepe
|
||||||
|
Comment=Pepe El Pintor
|
||||||
|
Icon=icon
|
||||||
|
Exec=pepe
|
||||||
|
Categories=games;Game;SDL;
|
||||||
|
Terminal=false
|
||||||
|
|
||||||
15
gcwmake
Normal file
15
gcwmake
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
mipsel-linux-gcc -D GCWZERO -O2 -I/opt/gcw0-toolchain/usr/mipsel-gcw0-linux-uclibc/sysroot/usr/include/SDL2 -D_GNU_SOURCE=1 -D_REENTRANT -lSDL2 -lSDL2_mixer -lstdc++ *.cpp -o pepe
|
||||||
|
|
||||||
|
mksquashfs ./default.gcw0.desktop ./icon.png ./pepe ./data.jrf pepe.opk -all-root -noappend -no-exports -no-xattrs
|
||||||
|
|
||||||
|
ftp -n -v 10.1.1.2 << EOT
|
||||||
|
ascii
|
||||||
|
user root ezahfm
|
||||||
|
pass
|
||||||
|
cd apps
|
||||||
|
put ./pepe.opk
|
||||||
|
bye
|
||||||
|
EOT
|
||||||
|
|
||||||
507
gif.c
Normal file
507
gif.c
Normal file
@@ -0,0 +1,507 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <fcntl.h>
|
||||||
|
|
||||||
|
#define EXTENSION_INTRODUCER 0x21
|
||||||
|
#define IMAGE_DESCRIPTOR 0x2C
|
||||||
|
#define TRAILER 0x3B
|
||||||
|
|
||||||
|
#define GRAPHIC_CONTROL 0xF9
|
||||||
|
#define APPLICATION_EXTENSION 0xFF
|
||||||
|
#define COMMENT_EXTENSION 0xFE
|
||||||
|
#define PLAINTEXT_EXTENSION 0x01
|
||||||
|
|
||||||
|
#define READ(dst, size) memcpy(dst, buffer, size); buffer += size
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
unsigned short width;
|
||||||
|
unsigned short height;
|
||||||
|
unsigned char fields;
|
||||||
|
unsigned char background_color_index;
|
||||||
|
unsigned char pixel_aspect_ratio;
|
||||||
|
}
|
||||||
|
screen_descriptor_t;
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
unsigned char r;
|
||||||
|
unsigned char g;
|
||||||
|
unsigned char b;
|
||||||
|
}
|
||||||
|
rgb;
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
unsigned short image_left_position;
|
||||||
|
unsigned short image_top_position;
|
||||||
|
unsigned short image_width;
|
||||||
|
unsigned short image_height;
|
||||||
|
unsigned char fields;
|
||||||
|
}
|
||||||
|
image_descriptor_t;
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
unsigned char byte;
|
||||||
|
int prev;
|
||||||
|
int len;
|
||||||
|
}
|
||||||
|
dictionary_entry_t;
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
unsigned char extension_code;
|
||||||
|
unsigned char block_size;
|
||||||
|
}
|
||||||
|
extension_t;
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
unsigned char fields;
|
||||||
|
unsigned short delay_time;
|
||||||
|
unsigned char transparent_color_index;
|
||||||
|
}
|
||||||
|
graphic_control_extension_t;
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
unsigned char application_id[ 8 ];
|
||||||
|
unsigned char version[ 3 ];
|
||||||
|
}
|
||||||
|
application_extension_t;
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
unsigned short left;
|
||||||
|
unsigned short top;
|
||||||
|
unsigned short width;
|
||||||
|
unsigned short height;
|
||||||
|
unsigned char cell_width;
|
||||||
|
unsigned char cell_height;
|
||||||
|
unsigned char foreground_color;
|
||||||
|
unsigned char background_color;
|
||||||
|
}
|
||||||
|
plaintext_extension_t;
|
||||||
|
|
||||||
|
//static unsigned short width = 0;
|
||||||
|
//static unsigned short height = 0;
|
||||||
|
//static unsigned char* uncompressed_data = NULL;
|
||||||
|
|
||||||
|
void uncompress( int code_length,
|
||||||
|
const unsigned char *input,
|
||||||
|
int input_length,
|
||||||
|
unsigned char *out )
|
||||||
|
{
|
||||||
|
//int maxbits;
|
||||||
|
int i, bit;
|
||||||
|
int code, prev = -1;
|
||||||
|
dictionary_entry_t *dictionary;
|
||||||
|
int dictionary_ind;
|
||||||
|
unsigned int mask = 0x01;
|
||||||
|
int reset_code_length;
|
||||||
|
int clear_code; // This varies depending on code_length
|
||||||
|
int stop_code; // one more than clear code
|
||||||
|
int match_len;
|
||||||
|
|
||||||
|
clear_code = 1 << ( code_length );
|
||||||
|
stop_code = clear_code + 1;
|
||||||
|
// To handle clear codes
|
||||||
|
reset_code_length = code_length;
|
||||||
|
|
||||||
|
// Create a dictionary large enough to hold "code_length" entries.
|
||||||
|
// Once the dictionary overflows, code_length increases
|
||||||
|
dictionary = ( dictionary_entry_t * )
|
||||||
|
malloc( sizeof( dictionary_entry_t ) * ( 1 << ( code_length + 1 ) ) );
|
||||||
|
|
||||||
|
// Initialize the first 2^code_len entries of the dictionary with their
|
||||||
|
// indices. The rest of the entries will be built up dynamically.
|
||||||
|
|
||||||
|
// Technically, it shouldn't be necessary to initialize the
|
||||||
|
// dictionary. The spec says that the encoder "should output a
|
||||||
|
// clear code as the first code in the image data stream". It doesn't
|
||||||
|
// say must, though...
|
||||||
|
for ( dictionary_ind = 0;
|
||||||
|
dictionary_ind < ( 1 << code_length );
|
||||||
|
dictionary_ind++ )
|
||||||
|
{
|
||||||
|
dictionary[ dictionary_ind ].byte = dictionary_ind;
|
||||||
|
// XXX this only works because prev is a 32-bit int (> 12 bits)
|
||||||
|
dictionary[ dictionary_ind ].prev = -1;
|
||||||
|
dictionary[ dictionary_ind ].len = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 2^code_len + 1 is the special "end" code; don't give it an entry here
|
||||||
|
dictionary_ind++;
|
||||||
|
dictionary_ind++;
|
||||||
|
|
||||||
|
// TODO verify that the very last byte is clear_code + 1
|
||||||
|
while ( input_length )
|
||||||
|
{
|
||||||
|
code = 0x0;
|
||||||
|
// Always read one more bit than the code length
|
||||||
|
for ( i = 0; i < ( code_length + 1 ); i++ )
|
||||||
|
{
|
||||||
|
// This is different than in the file read example; that
|
||||||
|
// was a call to "next_bit"
|
||||||
|
bit = ( *input & mask ) ? 1 : 0;
|
||||||
|
mask <<= 1;
|
||||||
|
|
||||||
|
if ( mask == 0x100 )
|
||||||
|
{
|
||||||
|
mask = 0x01;
|
||||||
|
input++;
|
||||||
|
input_length--;
|
||||||
|
}
|
||||||
|
|
||||||
|
code = code | ( bit << i );
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( code == clear_code )
|
||||||
|
{
|
||||||
|
code_length = reset_code_length;
|
||||||
|
dictionary = ( dictionary_entry_t * ) realloc( dictionary,
|
||||||
|
sizeof( dictionary_entry_t ) * ( 1 << ( code_length + 1 ) ) );
|
||||||
|
|
||||||
|
for ( dictionary_ind = 0;
|
||||||
|
dictionary_ind < ( 1 << code_length );
|
||||||
|
dictionary_ind++ )
|
||||||
|
{
|
||||||
|
dictionary[ dictionary_ind ].byte = dictionary_ind;
|
||||||
|
// XXX this only works because prev is a 32-bit int (> 12 bits)
|
||||||
|
dictionary[ dictionary_ind ].prev = -1;
|
||||||
|
dictionary[ dictionary_ind ].len = 1;
|
||||||
|
}
|
||||||
|
dictionary_ind++;
|
||||||
|
dictionary_ind++;
|
||||||
|
prev = -1;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
else if ( code == stop_code )
|
||||||
|
{
|
||||||
|
if ( input_length > 1 )
|
||||||
|
{
|
||||||
|
fprintf( stderr, "Malformed GIF (early stop code)\n" );
|
||||||
|
exit( 0 );
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update the dictionary with this character plus the _entry_
|
||||||
|
// (character or string) that came before it
|
||||||
|
if ( ( prev > -1 ) && ( code_length < 12 ) )
|
||||||
|
{
|
||||||
|
if ( code > dictionary_ind )
|
||||||
|
{
|
||||||
|
fprintf( stderr, "code = %.02x, but dictionary_ind = %.02x\n",
|
||||||
|
code, dictionary_ind );
|
||||||
|
exit( 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
// Special handling for KwKwK
|
||||||
|
if ( code == dictionary_ind )
|
||||||
|
{
|
||||||
|
int ptr = prev;
|
||||||
|
|
||||||
|
while ( dictionary[ ptr ].prev != -1 )
|
||||||
|
{
|
||||||
|
ptr = dictionary[ ptr ].prev;
|
||||||
|
}
|
||||||
|
dictionary[ dictionary_ind ].byte = dictionary[ ptr ].byte;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
int ptr = code;
|
||||||
|
while ( dictionary[ ptr ].prev != -1 )
|
||||||
|
{
|
||||||
|
ptr = dictionary[ ptr ].prev;
|
||||||
|
}
|
||||||
|
dictionary[ dictionary_ind ].byte = dictionary[ ptr ].byte;
|
||||||
|
}
|
||||||
|
|
||||||
|
dictionary[ dictionary_ind ].prev = prev;
|
||||||
|
|
||||||
|
dictionary[ dictionary_ind ].len = dictionary[ prev ].len + 1;
|
||||||
|
|
||||||
|
dictionary_ind++;
|
||||||
|
|
||||||
|
// GIF89a mandates that this stops at 12 bits
|
||||||
|
if ( ( dictionary_ind == ( 1 << ( code_length + 1 ) ) ) &&
|
||||||
|
( code_length < 11 ) )
|
||||||
|
{
|
||||||
|
code_length++;
|
||||||
|
|
||||||
|
dictionary = ( dictionary_entry_t * ) realloc( dictionary,
|
||||||
|
sizeof( dictionary_entry_t ) * ( 1 << ( code_length + 1 ) ) );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
prev = code;
|
||||||
|
|
||||||
|
// Now copy the dictionary entry backwards into "out"
|
||||||
|
match_len = dictionary[ code ].len;
|
||||||
|
while ( code != -1 )
|
||||||
|
{
|
||||||
|
out[ dictionary[ code ].len - 1 ] = dictionary[ code ].byte;
|
||||||
|
if ( dictionary[ code ].prev == code )
|
||||||
|
{
|
||||||
|
fprintf( stderr, "Internal error; self-reference." );
|
||||||
|
exit( 0 );
|
||||||
|
}
|
||||||
|
code = dictionary[ code ].prev;
|
||||||
|
}
|
||||||
|
|
||||||
|
out += match_len;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static int read_sub_blocks( unsigned char* buffer, unsigned char **data )
|
||||||
|
{
|
||||||
|
int data_length;
|
||||||
|
int index;
|
||||||
|
unsigned char block_size;
|
||||||
|
|
||||||
|
// Everything following are data sub-blocks, until a 0-sized block is
|
||||||
|
// encountered.
|
||||||
|
data_length = 0;
|
||||||
|
*data = NULL;
|
||||||
|
index = 0;
|
||||||
|
|
||||||
|
while ( 1 )
|
||||||
|
{
|
||||||
|
READ(&block_size, 1);
|
||||||
|
|
||||||
|
if ( block_size == 0 ) // end of sub-blocks
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
data_length += block_size;
|
||||||
|
*data = (unsigned char*)realloc( *data, data_length );
|
||||||
|
|
||||||
|
// TODO this could be split across block size boundaries
|
||||||
|
READ(*data + index, block_size);
|
||||||
|
|
||||||
|
index += block_size;
|
||||||
|
}
|
||||||
|
|
||||||
|
return data_length;
|
||||||
|
}
|
||||||
|
|
||||||
|
unsigned char* process_image_descriptor( unsigned char* buffer,
|
||||||
|
rgb *gct,
|
||||||
|
int gct_size,
|
||||||
|
int resolution_bits )
|
||||||
|
{
|
||||||
|
image_descriptor_t image_descriptor;
|
||||||
|
int disposition;
|
||||||
|
int compressed_data_length;
|
||||||
|
unsigned char *compressed_data = NULL;
|
||||||
|
unsigned char lzw_code_size;
|
||||||
|
int uncompressed_data_length = 0;
|
||||||
|
unsigned char *uncompressed_data = NULL;
|
||||||
|
|
||||||
|
// TODO there could actually be lots of these
|
||||||
|
READ(&image_descriptor, 9);
|
||||||
|
|
||||||
|
// TODO if LCT = true, read the LCT
|
||||||
|
|
||||||
|
disposition = 1;
|
||||||
|
|
||||||
|
READ(&lzw_code_size, 1);
|
||||||
|
|
||||||
|
compressed_data_length = read_sub_blocks( buffer, &compressed_data );
|
||||||
|
|
||||||
|
// width = image_descriptor.image_width;
|
||||||
|
// height = image_descriptor.image_height;
|
||||||
|
uncompressed_data_length = image_descriptor.image_width *
|
||||||
|
image_descriptor.image_height;
|
||||||
|
uncompressed_data = (unsigned char*)malloc( uncompressed_data_length );
|
||||||
|
|
||||||
|
uncompress( lzw_code_size, compressed_data, compressed_data_length,
|
||||||
|
uncompressed_data );
|
||||||
|
|
||||||
|
if ( compressed_data ) free( compressed_data );
|
||||||
|
|
||||||
|
//if ( uncompressed_data )
|
||||||
|
// free( uncompressed_data );
|
||||||
|
|
||||||
|
return uncompressed_data;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int process_extension( unsigned char* buffer )
|
||||||
|
{
|
||||||
|
extension_t extension;
|
||||||
|
graphic_control_extension_t gce;
|
||||||
|
application_extension_t application;
|
||||||
|
plaintext_extension_t plaintext;
|
||||||
|
unsigned char *extension_data = NULL;
|
||||||
|
int extension_data_length;
|
||||||
|
|
||||||
|
READ(&extension, 2);
|
||||||
|
|
||||||
|
switch ( extension.extension_code )
|
||||||
|
{
|
||||||
|
case GRAPHIC_CONTROL:
|
||||||
|
READ(&gce, 4);
|
||||||
|
|
||||||
|
break;
|
||||||
|
case APPLICATION_EXTENSION:
|
||||||
|
READ(&application, 11);
|
||||||
|
break;
|
||||||
|
case 0xFE:
|
||||||
|
// comment extension; do nothing - all the data is in the
|
||||||
|
// sub-blocks that follow.
|
||||||
|
break;
|
||||||
|
case 0x01:
|
||||||
|
READ(&plaintext, 12);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
fprintf( stderr, "Unrecognized extension code.\n" );
|
||||||
|
exit( 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
// All extensions are followed by data sub-blocks; even if it's
|
||||||
|
// just a single data sub-block of length 0
|
||||||
|
extension_data_length = read_sub_blocks( buffer, &extension_data );
|
||||||
|
|
||||||
|
if ( extension_data != NULL )
|
||||||
|
free( extension_data );
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param gif_file the file descriptor of a file containing a
|
||||||
|
* GIF-encoded file. This should point to the first byte in
|
||||||
|
* the file when invoked.
|
||||||
|
*/
|
||||||
|
|
||||||
|
unsigned char* LoadPalette(unsigned char *buffer) {
|
||||||
|
unsigned char header[7];
|
||||||
|
screen_descriptor_t screen_descriptor;
|
||||||
|
int color_resolution_bits;
|
||||||
|
|
||||||
|
int global_color_table_size = 0; // number of entries in global_color_table
|
||||||
|
rgb *global_color_table = NULL;
|
||||||
|
|
||||||
|
READ(header, 6);
|
||||||
|
READ(&screen_descriptor, 7);
|
||||||
|
|
||||||
|
color_resolution_bits = ((screen_descriptor.fields & 0x70) >> 4) + 1;
|
||||||
|
global_color_table = (rgb *)calloc(1, 768);
|
||||||
|
|
||||||
|
if (screen_descriptor.fields & 0x80) {
|
||||||
|
global_color_table_size = 1 << (((screen_descriptor.fields & 0x07) + 1));
|
||||||
|
|
||||||
|
//global_color_table = (rgb *)malloc(3 * global_color_table_size);
|
||||||
|
READ(global_color_table, 3 * global_color_table_size);
|
||||||
|
}
|
||||||
|
return (unsigned char*)global_color_table;
|
||||||
|
}
|
||||||
|
|
||||||
|
static unsigned char* process_gif_stream(unsigned char *buffer, unsigned short* w, unsigned short* h)
|
||||||
|
{
|
||||||
|
unsigned char header[ 7 ];
|
||||||
|
screen_descriptor_t screen_descriptor;
|
||||||
|
int color_resolution_bits;
|
||||||
|
|
||||||
|
int global_color_table_size =0; // number of entries in global_color_table
|
||||||
|
rgb *global_color_table = NULL;
|
||||||
|
|
||||||
|
unsigned char block_type = 0x0;
|
||||||
|
|
||||||
|
// A GIF file starts with a Header (section 17)
|
||||||
|
READ(header, 6);
|
||||||
|
header[ 6 ] = 0x0;
|
||||||
|
|
||||||
|
// XXX there's another format, GIF87a, that you may still find
|
||||||
|
// floating around.
|
||||||
|
if ( strcmp( "GIF89a", (char*)header ) )
|
||||||
|
{
|
||||||
|
fprintf( stderr,
|
||||||
|
"Invalid GIF file (header is '%s', should be 'GIF89a')\n",
|
||||||
|
header );
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Followed by a logical screen descriptor
|
||||||
|
// Note that this works because GIFs specify little-endian order; on a
|
||||||
|
// big-endian machine, the height & width would need to be reversed.
|
||||||
|
|
||||||
|
// Can't use sizeof here since GCC does byte alignment;
|
||||||
|
// sizeof( screen_descriptor_t ) = 8!
|
||||||
|
READ(&screen_descriptor, 7);
|
||||||
|
|
||||||
|
color_resolution_bits = ( ( screen_descriptor.fields & 0x70 ) >> 4 ) + 1;
|
||||||
|
|
||||||
|
if ( screen_descriptor.fields & 0x80 )
|
||||||
|
{
|
||||||
|
//int i;
|
||||||
|
// If bit 7 is set, the next block is a global color table; read it
|
||||||
|
global_color_table_size = 1 <<
|
||||||
|
( ( ( screen_descriptor.fields & 0x07 ) + 1 ) );
|
||||||
|
|
||||||
|
global_color_table = ( rgb * ) malloc( 3 * global_color_table_size );
|
||||||
|
|
||||||
|
// XXX this could conceivably return a short count...
|
||||||
|
READ(global_color_table, 3 * global_color_table_size);
|
||||||
|
}
|
||||||
|
|
||||||
|
while ( block_type != TRAILER )
|
||||||
|
{
|
||||||
|
READ(&block_type, 1);
|
||||||
|
|
||||||
|
switch ( block_type )
|
||||||
|
{
|
||||||
|
case IMAGE_DESCRIPTOR:
|
||||||
|
return process_image_descriptor(buffer,
|
||||||
|
global_color_table,
|
||||||
|
global_color_table_size,
|
||||||
|
color_resolution_bits);
|
||||||
|
break;
|
||||||
|
case EXTENSION_INTRODUCER:
|
||||||
|
if ( !process_extension( buffer ) )
|
||||||
|
{
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case TRAILER:
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
fprintf( stderr, "Bailing on unrecognized block type %.02x\n",
|
||||||
|
block_type );
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
unsigned char* LoadGif(unsigned char *buffer, unsigned short* w, unsigned short* h) {
|
||||||
|
return process_gif_stream(buffer, w, h);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*int main( int argc, char *argv[] )
|
||||||
|
{
|
||||||
|
FILE* gif_file;
|
||||||
|
|
||||||
|
if ( argc < 2 )
|
||||||
|
{
|
||||||
|
fprintf( stderr, "Usage: %s <path-to-gif-file>\n", argv[ 0 ] );
|
||||||
|
exit( 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
gif_file = fopen( argv[ 1 ], "rb" );
|
||||||
|
|
||||||
|
if ( gif_file == NULL )
|
||||||
|
{
|
||||||
|
fprintf( stderr, "Unable to open file '%s'", argv[ 1 ] );
|
||||||
|
perror( ": " );
|
||||||
|
}
|
||||||
|
|
||||||
|
process_gif_stream( gif_file );
|
||||||
|
|
||||||
|
fclose( gif_file );
|
||||||
|
}*/
|
||||||
15
info.h
Normal file
15
info.h
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#define ESTAT_EIXIR -1
|
||||||
|
#define ESTAT_ICEKAS 0
|
||||||
|
#define ESTAT_LOGO 1
|
||||||
|
#define ESTAT_MENU 2
|
||||||
|
#define ESTAT_OPCIONS 3
|
||||||
|
#define ESTAT_SELECT 4
|
||||||
|
#define ESTAT_JOC 5
|
||||||
|
#define ESTAT_LEVELCOMPLETE 6
|
||||||
|
#define ESTAT_MORT 7
|
||||||
|
|
||||||
|
struct Info {
|
||||||
|
int estat_joc;
|
||||||
|
};
|
||||||
250
jdraw8.cpp
Normal file
250
jdraw8.cpp
Normal file
@@ -0,0 +1,250 @@
|
|||||||
|
#include "jdraw8.h"
|
||||||
|
#include "jfile.h"
|
||||||
|
#include <fstream>
|
||||||
|
#include "gif.c"
|
||||||
|
|
||||||
|
#ifdef GCWZERO
|
||||||
|
#define SCREEN_WIDTH 320
|
||||||
|
#define SCREEN_HEIGHT 240
|
||||||
|
#else
|
||||||
|
#define SCREEN_WIDTH 640
|
||||||
|
#define SCREEN_HEIGHT 480
|
||||||
|
#endif
|
||||||
|
|
||||||
|
JD8_Surface screen = NULL;
|
||||||
|
JD8_Palette main_palette = NULL;
|
||||||
|
Uint32* pixel_data = NULL;
|
||||||
|
|
||||||
|
int screenWidth = 320;
|
||||||
|
int screenHeight = 200;
|
||||||
|
|
||||||
|
Uint32 contadorFPS = 0;
|
||||||
|
Uint32 tempsFPS = SDL_GetTicks();
|
||||||
|
char *fps = (char *)malloc(10);
|
||||||
|
|
||||||
|
SDL_Window* sdlWindow = NULL;
|
||||||
|
SDL_Renderer* sdlRenderer = NULL;
|
||||||
|
SDL_Texture* sdlTexture = NULL;
|
||||||
|
|
||||||
|
void JD8_Init(const char *title) {
|
||||||
|
screen = (JD8_Surface)calloc( 1, 64000 );
|
||||||
|
main_palette = (JD8_Palette)calloc( 1, 768 );
|
||||||
|
pixel_data = (Uint32*)calloc(1, 320 * 200 * 4); // 1048576 );
|
||||||
|
|
||||||
|
sdlWindow = SDL_CreateWindow( title, SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, SCREEN_WIDTH, SCREEN_HEIGHT, SDL_WINDOW_SHOWN );
|
||||||
|
sdlRenderer = SDL_CreateRenderer(sdlWindow, -1, 0);
|
||||||
|
SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "nearest");
|
||||||
|
|
||||||
|
sdlTexture = SDL_CreateTexture(sdlRenderer, SDL_PIXELFORMAT_ABGR8888, SDL_TEXTUREACCESS_STREAMING, 320, 200);
|
||||||
|
}
|
||||||
|
|
||||||
|
void JD8_Quit() {
|
||||||
|
if( screen != NULL ) free( screen );
|
||||||
|
if( main_palette != NULL ) free( main_palette );
|
||||||
|
if( pixel_data != NULL ) free( pixel_data );
|
||||||
|
SDL_DestroyRenderer(sdlRenderer);
|
||||||
|
SDL_DestroyWindow( sdlWindow );
|
||||||
|
}
|
||||||
|
|
||||||
|
void JD8_ClearScreen(Uint8 color) {
|
||||||
|
memset( screen, color, 64000 );
|
||||||
|
}
|
||||||
|
|
||||||
|
JD8_Surface JD8_NewSurface() {
|
||||||
|
JD8_Surface surface = (JD8_Surface)malloc( 64000 );
|
||||||
|
memset( surface, 0, 64000 );
|
||||||
|
return surface;
|
||||||
|
}
|
||||||
|
|
||||||
|
JD8_Surface JD8_LoadSurface(const char *file) {
|
||||||
|
int filesize = 0;
|
||||||
|
char *buffer = JF_GetBufferFromResource(file, filesize);
|
||||||
|
|
||||||
|
unsigned short w, h;
|
||||||
|
Uint8* pixels = LoadGif((unsigned char*)buffer, &w, &h);
|
||||||
|
|
||||||
|
free(buffer);
|
||||||
|
|
||||||
|
if (pixels == NULL) {
|
||||||
|
printf("Unable to load bitmap: %s\n", SDL_GetError());
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
JD8_Surface image = JD8_NewSurface();
|
||||||
|
memcpy(image, pixels, 64000);
|
||||||
|
|
||||||
|
free(pixels);
|
||||||
|
return image;
|
||||||
|
}
|
||||||
|
|
||||||
|
JD8_Palette JD8_LoadPalette(const char *file) {
|
||||||
|
int filesize = 0;
|
||||||
|
char *buffer = NULL;
|
||||||
|
buffer = JF_GetBufferFromResource(file, filesize);
|
||||||
|
|
||||||
|
JD8_Palette palette = (JD8_Palette)LoadPalette((unsigned char*)buffer);
|
||||||
|
|
||||||
|
return palette;
|
||||||
|
}
|
||||||
|
|
||||||
|
void JD8_SetScreenPalette(JD8_Palette palette) {
|
||||||
|
if (main_palette == palette) return;
|
||||||
|
if( main_palette != NULL) free( main_palette );
|
||||||
|
main_palette = palette;
|
||||||
|
}
|
||||||
|
|
||||||
|
void JD8_FillSquare(int ini, int height, Uint8 color) {
|
||||||
|
const int offset = ini * 320;
|
||||||
|
const int size = height * 320;
|
||||||
|
memset(&screen[offset], color, size);
|
||||||
|
}
|
||||||
|
|
||||||
|
void JD8_Blit(JD8_Surface surface) {
|
||||||
|
memcpy( screen, surface, 64000 );
|
||||||
|
}
|
||||||
|
|
||||||
|
void JD8_Blit(int x, int y, JD8_Surface surface, int sx, int sy, int sw, int sh) {
|
||||||
|
int src_pointer = sx + (sy*320);
|
||||||
|
int dst_pointer = x + (y*320);
|
||||||
|
for( int i = 0; i < sh; i++ ) {
|
||||||
|
memcpy( &screen[dst_pointer], &surface[src_pointer], sw );
|
||||||
|
src_pointer += 320;
|
||||||
|
dst_pointer += 320;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void JD8_BlitToSurface(int x, int y, JD8_Surface surface, int sx, int sy, int sw, int sh, JD8_Surface dest) {
|
||||||
|
int src_pointer = sx + (sy*320);
|
||||||
|
int dst_pointer = x + (y*320);
|
||||||
|
for( int i = 0; i < sh; i++ ) {
|
||||||
|
memcpy( &dest[dst_pointer], &surface[src_pointer], sw );
|
||||||
|
src_pointer += 320;
|
||||||
|
dst_pointer += 320;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void JD8_BlitCK(int x, int y, JD8_Surface surface, int sx, int sy, int sw, int sh, Uint8 colorkey ) {
|
||||||
|
int src_pointer = sx + (sy*320);
|
||||||
|
int dst_pointer = x + (y*320);
|
||||||
|
for( int j = 0; j < sh; j++ ) {
|
||||||
|
for( int i = 0; i < sw; i++ ) {
|
||||||
|
if( surface[src_pointer+i] != colorkey ) screen[dst_pointer+i] = surface[src_pointer+i];
|
||||||
|
}
|
||||||
|
src_pointer += 320;
|
||||||
|
dst_pointer += 320;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void JD8_BlitCKCut(int x, int y, JD8_Surface surface, int sx, int sy, int sw, int sh, Uint8 colorkey) {
|
||||||
|
int src_pointer = sx + (sy * 320);
|
||||||
|
int dst_pointer = x + (y * 320);
|
||||||
|
for (int j = 0; j < sh; j++) {
|
||||||
|
for (int i = 0; i < sw; i++) {
|
||||||
|
if (surface[src_pointer + i] != colorkey && (x+i >= 0) && (y+j >= 0) && (x+i < 320) && (y+j < 200)) screen[dst_pointer + i] = surface[src_pointer + i];
|
||||||
|
}
|
||||||
|
src_pointer += 320;
|
||||||
|
dst_pointer += 320;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void JD8_BlitCKScroll(int y, JD8_Surface surface, int sx, int sy, int sh, Uint8 colorkey) {
|
||||||
|
int dst_pointer = y * 320;
|
||||||
|
for (int j = sy; j < sy+sh; j++) {
|
||||||
|
for (int i = 0; i < 320; i++) {
|
||||||
|
int x = (i+sx) % 320;
|
||||||
|
if (surface[x + j*320] != colorkey) screen[dst_pointer] = surface[x + j * 320];
|
||||||
|
dst_pointer++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void JD8_BlitCKToSurface(int x, int y, JD8_Surface surface, int sx, int sy, int sw, int sh, JD8_Surface dest, Uint8 colorkey) {
|
||||||
|
int src_pointer = sx + (sy*320);
|
||||||
|
int dst_pointer = x + (y*320);
|
||||||
|
for( int j = 0; j < sh; j++ ) {
|
||||||
|
for( int i = 0; i < sw; i++ ) {
|
||||||
|
if( surface[src_pointer+i] != colorkey ) dest[dst_pointer+i] = surface[src_pointer+i];
|
||||||
|
}
|
||||||
|
src_pointer += 320;
|
||||||
|
dst_pointer += 320;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
SDL_Rect rect{0, 0, SCREEN_WIDTH, SCREEN_HEIGHT};
|
||||||
|
|
||||||
|
void JD8_Flip() {
|
||||||
|
for( int x = 0; x < 320; x++ ) {
|
||||||
|
for( int y = 0; y < 200; y++ ) {
|
||||||
|
Uint32 color = 0xFF000000 + main_palette[screen[x + ( y * 320 )]].r + ( main_palette[screen[x + ( y * 320 )]].g << 8 ) + ( main_palette[screen[x + ( y * 320 )]].b << 16 );
|
||||||
|
pixel_data[x + ( y * 320 )] = color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
SDL_UpdateTexture(sdlTexture, NULL, pixel_data, 320 * sizeof(Uint32));
|
||||||
|
SDL_RenderCopy(sdlRenderer, sdlTexture, NULL, &rect);
|
||||||
|
SDL_RenderPresent(sdlRenderer);
|
||||||
|
}
|
||||||
|
|
||||||
|
void JD8_FreeSurface(JD8_Surface surface) {
|
||||||
|
free( surface );
|
||||||
|
}
|
||||||
|
|
||||||
|
Uint8 JD8_GetPixel( JD8_Surface surface, int x, int y ) {
|
||||||
|
return surface[x + (y*320)];
|
||||||
|
}
|
||||||
|
|
||||||
|
void JD8_PutPixel( JD8_Surface surface, int x, int y, Uint8 pixel ) {
|
||||||
|
surface[x + (y*320)] = pixel;
|
||||||
|
}
|
||||||
|
|
||||||
|
void JD8_SetPaletteColor(Uint8 index, Uint8 r, Uint8 g, Uint8 b) {
|
||||||
|
main_palette[index].r = r << 2;
|
||||||
|
main_palette[index].g = g << 2;
|
||||||
|
main_palette[index].b = b << 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
void JD8_FadeOut() {
|
||||||
|
for( int j = 0; j < 32; j++ ) {
|
||||||
|
for( int i = 0; i < 256; i++ ) {
|
||||||
|
if( main_palette[i].r >= 8 ) main_palette[i].r-=8; else main_palette[i].r=0;
|
||||||
|
if( main_palette[i].g >= 8 ) main_palette[i].g-=8; else main_palette[i].g=0;
|
||||||
|
if( main_palette[i].b >= 8 ) main_palette[i].b-=8; else main_palette[i].b=0;
|
||||||
|
}
|
||||||
|
JD8_Flip();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
bool JD8_FadeOutAsync() {
|
||||||
|
bool done = true;
|
||||||
|
for (int i = 0; i < 256; i++) {
|
||||||
|
if (main_palette[i].r >= 1) { main_palette[i].r -= 1; done = false; } else main_palette[i].r = 0;
|
||||||
|
if (main_palette[i].g >= 1) { main_palette[i].g -= 1; done = false; } else main_palette[i].g = 0;
|
||||||
|
if (main_palette[i].b >= 1) { main_palette[i].b -= 1; done = false; } else main_palette[i].b = 0;
|
||||||
|
}
|
||||||
|
JD8_Flip();
|
||||||
|
|
||||||
|
return done;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define MAX(a, b) (a) > (b) ? (a) : (b)
|
||||||
|
|
||||||
|
void JD8_FadeToPal( JD8_Palette pal ) {
|
||||||
|
for( int j = 0; j < 32; j++ ) {
|
||||||
|
for( int i = 0; i < 256; i++ ) {
|
||||||
|
if( main_palette[i].r <= int(pal[i].r)-8 ) main_palette[i].r+=8; else main_palette[i].r=pal[i].r;
|
||||||
|
if( main_palette[i].g <= int(pal[i].g)-8 ) main_palette[i].g+=8; else main_palette[i].g=pal[i].g;
|
||||||
|
if( main_palette[i].b <= int(pal[i].b)-8 ) main_palette[i].b+=8; else main_palette[i].b=pal[i].b;
|
||||||
|
}
|
||||||
|
JD8_Flip();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool JD8_FadeToPalAsync(JD8_Palette pal) {
|
||||||
|
bool done = true;
|
||||||
|
for (int i = 0; i < 256; i++) {
|
||||||
|
if (main_palette[i].r <= int(pal[i].r) - 1) { main_palette[i].r += 1; done = false; } else main_palette[i].r = pal[i].r;
|
||||||
|
if (main_palette[i].g <= int(pal[i].g) - 1) { main_palette[i].g += 1; done = false; } else main_palette[i].g = pal[i].g;
|
||||||
|
if (main_palette[i].b <= int(pal[i].b) - 1) { main_palette[i].b += 1; done = false; } else main_palette[i].b = pal[i].b;
|
||||||
|
}
|
||||||
|
JD8_Flip();
|
||||||
|
|
||||||
|
return done;
|
||||||
|
}
|
||||||
63
jdraw8.h
Normal file
63
jdraw8.h
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
#pragma once
|
||||||
|
#include "SDL.h"
|
||||||
|
|
||||||
|
struct Color {
|
||||||
|
Uint8 r;
|
||||||
|
Uint8 g;
|
||||||
|
Uint8 b;
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef Uint8* JD8_Surface;
|
||||||
|
typedef Color* JD8_Palette;
|
||||||
|
|
||||||
|
void JD8_Init(const char *title);
|
||||||
|
|
||||||
|
void JD8_Quit();
|
||||||
|
|
||||||
|
void JD8_ClearScreen(Uint8 color);
|
||||||
|
|
||||||
|
JD8_Surface JD8_NewSurface();
|
||||||
|
|
||||||
|
JD8_Surface JD8_LoadSurface(const char *file);
|
||||||
|
|
||||||
|
JD8_Palette JD8_LoadPalette(const char *file);
|
||||||
|
|
||||||
|
void JD8_SetScreenPalette(JD8_Palette palette);
|
||||||
|
|
||||||
|
void JD8_FillSquare(int ini, int height, Uint8 color);
|
||||||
|
|
||||||
|
void JD8_Blit(JD8_Surface surface);
|
||||||
|
|
||||||
|
void JD8_Blit(int x, int y, JD8_Surface surface, int sx, int sy, int sw, int sh);
|
||||||
|
|
||||||
|
void JD8_BlitToSurface(int x, int y, JD8_Surface surface, int sx, int sy, int sw, int sh, JD8_Surface dest);
|
||||||
|
|
||||||
|
void JD8_BlitCK(int x, int y, JD8_Surface surface, int sx, int sy, int sw, int sh, Uint8 colorkey );
|
||||||
|
|
||||||
|
void JD8_BlitCKCut(int x, int y, JD8_Surface surface, int sx, int sy, int sw, int sh, Uint8 colorkey);
|
||||||
|
|
||||||
|
void JD8_BlitCKScroll(int y, JD8_Surface surface, int sx, int sy, int sh, Uint8 colorkey);
|
||||||
|
|
||||||
|
void JD8_BlitCKToSurface(int x, int y, JD8_Surface surface, int sx, int sy, int sw, int sh, JD8_Surface dest, Uint8 colorkey );
|
||||||
|
|
||||||
|
void JD8_Flip();
|
||||||
|
|
||||||
|
void JD8_FreeSurface(JD8_Surface surface);
|
||||||
|
|
||||||
|
Uint8 JD8_GetPixel( JD8_Surface surface, int x, int y );
|
||||||
|
|
||||||
|
void JD8_PutPixel( JD8_Surface surface, int x, int y, Uint8 pixel );
|
||||||
|
|
||||||
|
void JD8_SetPaletteColor(Uint8 index, Uint8 r, Uint8 g, Uint8 b);
|
||||||
|
|
||||||
|
void JD8_FadeOut();
|
||||||
|
bool JD8_FadeOutAsync();
|
||||||
|
|
||||||
|
void JD8_FadeToPal( JD8_Palette pal );
|
||||||
|
bool JD8_FadeToPalAsync(JD8_Palette pal);
|
||||||
|
|
||||||
|
//JD_Font JD_LoadFont( char *file, int width, int height);
|
||||||
|
|
||||||
|
//void JD_DrawText( int x, int y, JD_Font *source, char *text);
|
||||||
|
|
||||||
|
//char *JD_GetFPS();
|
||||||
162
jfile.cpp
Normal file
162
jfile.cpp
Normal file
@@ -0,0 +1,162 @@
|
|||||||
|
#include "jfile.h"
|
||||||
|
#include "SDL.h"
|
||||||
|
#include <fstream>
|
||||||
|
|
||||||
|
#pragma pack(push,1)
|
||||||
|
|
||||||
|
struct DATA_Header {
|
||||||
|
char magic[4];
|
||||||
|
Uint32 num_files;
|
||||||
|
Uint32 index_offset;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct DATA_Info {
|
||||||
|
Uint32 offset;
|
||||||
|
Uint32 length;
|
||||||
|
char name[13];
|
||||||
|
};
|
||||||
|
|
||||||
|
struct DATA_Index {
|
||||||
|
DATA_Info* file_info;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct DATA_File {
|
||||||
|
DATA_Header header;
|
||||||
|
DATA_Index index;
|
||||||
|
};
|
||||||
|
|
||||||
|
#pragma pack(pop)
|
||||||
|
|
||||||
|
const char *resourceFileName = "data.jrf";
|
||||||
|
DATA_File *data_file = NULL;
|
||||||
|
|
||||||
|
void JF_SetResourceFile(const char *p_resourceFileName) {
|
||||||
|
resourceFileName = p_resourceFileName;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void JF_GetDataFile() {
|
||||||
|
std::ifstream fd( resourceFileName, std::ios::in | std::ios::binary );
|
||||||
|
|
||||||
|
if( fd.fail() ) {
|
||||||
|
perror("No s'ha pogut obrir l'arxiu de recursos");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
data_file = (DATA_File*)malloc( sizeof( DATA_File ) );
|
||||||
|
|
||||||
|
fd.read( (char*)&data_file->header, sizeof( DATA_Header ) );
|
||||||
|
|
||||||
|
fd.seekg( data_file->header.index_offset );
|
||||||
|
|
||||||
|
data_file->index.file_info = (DATA_Info*)malloc( data_file->header.num_files * sizeof( DATA_Info ) );
|
||||||
|
|
||||||
|
fd.read( (char*)data_file->index.file_info, data_file->header.num_files * sizeof( DATA_Info ) );
|
||||||
|
|
||||||
|
fd.close();
|
||||||
|
}
|
||||||
|
|
||||||
|
char *JF_GetBufferFromResource(const char *resourcename, int& filesize) {
|
||||||
|
|
||||||
|
if( data_file == NULL ) {
|
||||||
|
JF_GetDataFile();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool found = false;
|
||||||
|
int count = 0;
|
||||||
|
while( !found && count < data_file->header.num_files ) {
|
||||||
|
found = ( strcmp( resourcename, data_file->index.file_info[count].name ) == 0 );
|
||||||
|
if( !found ) count++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if( !found ) {
|
||||||
|
perror("El recurs no s'ha trobat en l'arxiu de recursos");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
filesize = data_file->index.file_info[count].length;
|
||||||
|
|
||||||
|
std::ifstream fd( resourceFileName, std::ios::in | std::ios::binary );
|
||||||
|
|
||||||
|
if( fd.fail() ) {
|
||||||
|
perror("No s'ha pogut obrir l'arxiu de recursos");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
fd.seekg( data_file->index.file_info[count].offset );
|
||||||
|
|
||||||
|
char* buffer = (char*)malloc( filesize );
|
||||||
|
fd.read( buffer, filesize );
|
||||||
|
|
||||||
|
fd.close();
|
||||||
|
|
||||||
|
return buffer;
|
||||||
|
}
|
||||||
|
|
||||||
|
// //Read the first INT, which will tell us how many files are in this resource
|
||||||
|
// int numfiles;
|
||||||
|
// int resultat = read(fd, &numfiles, sizeof(int));
|
||||||
|
//
|
||||||
|
//#ifdef _WIN32
|
||||||
|
// int final = eof(fd);
|
||||||
|
//#endif
|
||||||
|
//
|
||||||
|
// //Get the pointers to the stored files
|
||||||
|
// int *filestart = (int *) malloc(sizeof(int) * numfiles);
|
||||||
|
// resultat = read(fd, filestart, sizeof(int) * numfiles);
|
||||||
|
//
|
||||||
|
// //Loop through the files, looking for the file in question
|
||||||
|
// int filenamesize;
|
||||||
|
// char *buffer;
|
||||||
|
// int i;
|
||||||
|
// for(i=0;i<numfiles;i++)
|
||||||
|
// {
|
||||||
|
// int result = 129;
|
||||||
|
// char *filename;
|
||||||
|
// //Seek to the location
|
||||||
|
// lseek(fd, filestart[i], SEEK_SET);
|
||||||
|
// //Get the filesize value
|
||||||
|
// read(fd, filesize, sizeof(int));
|
||||||
|
// //Get the size of the filename string
|
||||||
|
// read(fd, &filenamesize, sizeof(int));
|
||||||
|
// //Size the buffer and read the filename
|
||||||
|
// filename = (char *) malloc(filenamesize + 1);
|
||||||
|
// result = read(fd, filename, filenamesize);
|
||||||
|
// //Remember to terminate the string properly!
|
||||||
|
// filename[filenamesize] = '\0';
|
||||||
|
// //Compare to the string we're looking for
|
||||||
|
// if (strcmp(filename, resourcename) == 0)
|
||||||
|
// {
|
||||||
|
// //Get the contents of the file
|
||||||
|
// buffer = (char *) malloc(*filesize);
|
||||||
|
// read(fd, buffer, *filesize);
|
||||||
|
// free(filename);
|
||||||
|
// break;
|
||||||
|
// }
|
||||||
|
// //Free the filename buffer
|
||||||
|
// free(filename);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// //Release memory
|
||||||
|
// free(filestart);
|
||||||
|
//
|
||||||
|
// //Close the resource file!
|
||||||
|
// close(fd);
|
||||||
|
//
|
||||||
|
// //Did we find the file within the resource that we were looking for?
|
||||||
|
// if (buffer == NULL)
|
||||||
|
// {
|
||||||
|
// printf("Unable to find '%s' in the resource file!\n", resourcename);
|
||||||
|
// exit(1);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// //Return the buffer
|
||||||
|
// return buffer;
|
||||||
|
//}
|
||||||
|
|
||||||
|
void JF_Quit() {
|
||||||
|
if( data_file != NULL ) {
|
||||||
|
free( data_file->index.file_info );
|
||||||
|
free( data_file );
|
||||||
|
}
|
||||||
|
}
|
||||||
7
jfile.h
Normal file
7
jfile.h
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
void JF_SetResourceFile(const char *p_resourceFileName);
|
||||||
|
|
||||||
|
char *JF_GetBufferFromResource(const char *resourcename, int& filesize);
|
||||||
|
|
||||||
|
void JF_Quit();
|
||||||
43
jgame.cpp
Normal file
43
jgame.cpp
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
#include "jgame.h"
|
||||||
|
|
||||||
|
bool eixir = false;
|
||||||
|
int updateTicks = 0;
|
||||||
|
Uint32 updateTime = 0;
|
||||||
|
Uint32 cycle_counter = 0;
|
||||||
|
|
||||||
|
void JG_Init() {
|
||||||
|
|
||||||
|
SDL_Init( SDL_INIT_EVERYTHING );
|
||||||
|
//SDL_WM_SetCaption( title, NULL );
|
||||||
|
updateTime = SDL_GetTicks();
|
||||||
|
}
|
||||||
|
|
||||||
|
void JG_Finalize() {
|
||||||
|
SDL_Quit();
|
||||||
|
}
|
||||||
|
|
||||||
|
void JG_QuitSignal() {
|
||||||
|
eixir = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool JG_Quitting() {
|
||||||
|
return eixir;
|
||||||
|
}
|
||||||
|
|
||||||
|
void JG_SetUpdateTicks(Uint32 milliseconds) {
|
||||||
|
updateTicks = milliseconds;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool JG_ShouldUpdate() {
|
||||||
|
if (SDL_GetTicks() - updateTime > updateTicks) {
|
||||||
|
updateTime = SDL_GetTicks();
|
||||||
|
cycle_counter++;
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Uint32 JG_GetCycleCounter() {
|
||||||
|
return cycle_counter;
|
||||||
|
}
|
||||||
16
jgame.h
Normal file
16
jgame.h
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
#pragma once
|
||||||
|
#include "SDL.h"
|
||||||
|
|
||||||
|
void JG_Init();
|
||||||
|
|
||||||
|
void JG_Finalize();
|
||||||
|
|
||||||
|
void JG_QuitSignal();
|
||||||
|
|
||||||
|
bool JG_Quitting();
|
||||||
|
|
||||||
|
void JG_SetUpdateTicks(Uint32 milliseconds);
|
||||||
|
|
||||||
|
bool JG_ShouldUpdate();
|
||||||
|
|
||||||
|
Uint32 JG_GetCycleCounter();
|
||||||
52
jinput.cpp
Normal file
52
jinput.cpp
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
#include "jinput.h"
|
||||||
|
#include "jgame.h"
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
const Uint8 *keystates;// = SDL_GetKeyboardState( NULL );
|
||||||
|
SDL_Event event;
|
||||||
|
Uint8 cheat[5];
|
||||||
|
bool key_pressed = false;
|
||||||
|
int waitTime = 0;
|
||||||
|
|
||||||
|
void JI_DisableKeyboard(Uint32 time) {
|
||||||
|
waitTime = time;
|
||||||
|
}
|
||||||
|
|
||||||
|
void JI_moveCheats( Uint8 new_key ) {
|
||||||
|
cheat[0] = cheat[1];
|
||||||
|
cheat[1] = cheat[2];
|
||||||
|
cheat[2] = cheat[3];
|
||||||
|
cheat[3] = cheat[4];
|
||||||
|
cheat[4] = new_key;
|
||||||
|
}
|
||||||
|
|
||||||
|
void JI_Update() {
|
||||||
|
key_pressed = false;
|
||||||
|
keystates = SDL_GetKeyboardState( NULL );
|
||||||
|
|
||||||
|
if (waitTime > 0) waitTime--;
|
||||||
|
|
||||||
|
while ( SDL_PollEvent( &event ) ) {
|
||||||
|
if ( event.type == SDL_QUIT ) JG_QuitSignal();
|
||||||
|
if( event.type == SDL_KEYUP ) {
|
||||||
|
key_pressed = true;
|
||||||
|
JI_moveCheats( event.key.keysym.sym );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool JI_KeyPressed(int key) {
|
||||||
|
return waitTime > 0 ? false : (keystates[key] != 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool JI_CheatActivated( const char* cheat_code ) {
|
||||||
|
bool found = true;
|
||||||
|
for( int i = 0; i < strlen( cheat_code ); i++ ) {
|
||||||
|
if( cheat[i] != cheat_code[i] ) found = false;
|
||||||
|
}
|
||||||
|
return found;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool JI_AnyKey() {
|
||||||
|
return waitTime > 0 ? false : key_pressed;
|
||||||
|
}
|
||||||
12
jinput.h
Normal file
12
jinput.h
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
#pragma once
|
||||||
|
#include "SDL.h"
|
||||||
|
|
||||||
|
void JI_DisableKeyboard(Uint32 time);
|
||||||
|
|
||||||
|
void JI_Update();
|
||||||
|
|
||||||
|
bool JI_KeyPressed(int key);
|
||||||
|
|
||||||
|
bool JI_CheatActivated( const char* cheat_code );
|
||||||
|
|
||||||
|
bool JI_AnyKey();
|
||||||
79
jsound.cpp
Normal file
79
jsound.cpp
Normal file
@@ -0,0 +1,79 @@
|
|||||||
|
#include "jsound.h"
|
||||||
|
#include "jfile.h"
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
Mix_Music *music = NULL;
|
||||||
|
char currentMusic[12];
|
||||||
|
|
||||||
|
bool JS_Init() {
|
||||||
|
Mix_OpenAudio(MIX_DEFAULT_FREQUENCY, MIX_DEFAULT_FORMAT, 2, 1024);
|
||||||
|
Mix_AllocateChannels(8);
|
||||||
|
currentMusic[0] = 0;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void JS_LoadMusic(const char *musicFilename)
|
||||||
|
{
|
||||||
|
if (music != NULL) {
|
||||||
|
Mix_HaltMusic();
|
||||||
|
Mix_FreeMusic(music);
|
||||||
|
}
|
||||||
|
Mix_VolumeMusic(MIX_MAX_VOLUME);
|
||||||
|
|
||||||
|
int filesize = 0;
|
||||||
|
char *buffer = JF_GetBufferFromResource(musicFilename, filesize);
|
||||||
|
|
||||||
|
SDL_RWops *rw = SDL_RWFromMem(buffer, filesize);
|
||||||
|
music = Mix_LoadMUS_RW(rw, 1);
|
||||||
|
strcpy(currentMusic, musicFilename);
|
||||||
|
}
|
||||||
|
|
||||||
|
void JS_SetMusicVolume(int volume) {
|
||||||
|
Mix_VolumeMusic(volume);
|
||||||
|
}
|
||||||
|
|
||||||
|
void JS_PlayMusic(int loops) {
|
||||||
|
Mix_PlayMusic(music, loops);
|
||||||
|
}
|
||||||
|
|
||||||
|
void JS_PauseMusic() {
|
||||||
|
Mix_PauseMusic();
|
||||||
|
}
|
||||||
|
|
||||||
|
void JS_FadeOutMusic() {
|
||||||
|
Mix_FadeOutMusic(500);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool JS_MusicPlaying() {
|
||||||
|
return (Mix_PlayingMusic() == 1);// && (Mix_FadingMusic() != MIX_FADING_OUT);
|
||||||
|
}
|
||||||
|
|
||||||
|
const char* JS_GetMusicName() {
|
||||||
|
return currentMusic;
|
||||||
|
}
|
||||||
|
|
||||||
|
JS_Sound *JS_LoadSound(char *soundFilename) {
|
||||||
|
int filesize = 0;
|
||||||
|
char *buffer = JF_GetBufferFromResource(soundFilename, filesize);
|
||||||
|
|
||||||
|
SDL_RWops *rw = SDL_RWFromMem(buffer, filesize);
|
||||||
|
return Mix_LoadWAV_RW(rw, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
void JS_SetSoundVolume(JS_Sound *sound, int volume) {
|
||||||
|
Mix_VolumeChunk(sound, volume);
|
||||||
|
}
|
||||||
|
|
||||||
|
void JS_PlaySound(JS_Sound *sound) {
|
||||||
|
Mix_PlayChannel(-1, sound, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
void JS_FreeSound(JS_Sound *sound) {
|
||||||
|
Mix_FreeChunk(sound);
|
||||||
|
}
|
||||||
|
|
||||||
|
void JS_Finalize() {
|
||||||
|
Mix_FreeMusic(music);
|
||||||
|
Mix_CloseAudio();
|
||||||
|
}
|
||||||
|
|
||||||
30
jsound.h
Normal file
30
jsound.h
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
#pragma once
|
||||||
|
#include "SDL_mixer.h"
|
||||||
|
|
||||||
|
typedef Mix_Chunk JS_Sound;
|
||||||
|
|
||||||
|
bool JS_Init();
|
||||||
|
|
||||||
|
void JS_LoadMusic(const char *musicFilename);
|
||||||
|
|
||||||
|
void JS_SetMusicVolume(int volume);
|
||||||
|
|
||||||
|
void JS_PlayMusic(int loops);
|
||||||
|
|
||||||
|
void JS_PauseMusic();
|
||||||
|
|
||||||
|
void JS_FadeOutMusic();
|
||||||
|
|
||||||
|
bool JS_MusicPlaying();
|
||||||
|
|
||||||
|
const char* JS_GetMusicName();
|
||||||
|
|
||||||
|
JS_Sound *JS_LoadSound(char *soundFilename);
|
||||||
|
|
||||||
|
void JS_SetSoundVolume(JS_Sound *sound, int volume);
|
||||||
|
|
||||||
|
void JS_PlaySound(JS_Sound *sound);
|
||||||
|
|
||||||
|
void JS_FreeSound(JS_Sound *sound);
|
||||||
|
|
||||||
|
void JS_Finalize();
|
||||||
71
main.cpp
Normal file
71
main.cpp
Normal file
@@ -0,0 +1,71 @@
|
|||||||
|
#include "jgame.h"
|
||||||
|
#include "jdraw8.h"
|
||||||
|
#include "jsound.h"
|
||||||
|
#include "jfile.h"
|
||||||
|
#include "info.h"
|
||||||
|
#include "modulestaticscreen.h"
|
||||||
|
#include "modulemenu.h"
|
||||||
|
#include "time.h"
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
#ifndef WIN32
|
||||||
|
#include <libgen.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
int main( int argc, char* args[] ) {
|
||||||
|
|
||||||
|
#ifdef WIN32
|
||||||
|
JF_SetResourceFile("data.jrf");
|
||||||
|
#else
|
||||||
|
char res_file[255] = "";
|
||||||
|
strcpy(res_file, dirname(args[0]));
|
||||||
|
#ifdef __APPLE__
|
||||||
|
strcat(res_file, "/../Resources/data.jrf");
|
||||||
|
#else
|
||||||
|
strcat(res_file, "/data.jrf");
|
||||||
|
#endif
|
||||||
|
printf("ARXIU DE RECURSOS: %s\n", res_file);
|
||||||
|
JF_SetResourceFile(res_file);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
srand( unsigned(time(NULL)) );
|
||||||
|
|
||||||
|
JG_Init();
|
||||||
|
JD8_Init("Pepe El Pintor");
|
||||||
|
JS_Init();
|
||||||
|
|
||||||
|
Info info;
|
||||||
|
info.estat_joc = ESTAT_ICEKAS;
|
||||||
|
|
||||||
|
/* FILE* ini = fopen("trick.ini", "rb");
|
||||||
|
if (ini != NULL) {
|
||||||
|
info.nou_personatge = true;
|
||||||
|
fclose(ini);
|
||||||
|
}*/
|
||||||
|
|
||||||
|
while (info.estat_joc != ESTAT_EIXIR) {
|
||||||
|
switch (info.estat_joc) {
|
||||||
|
case ESTAT_ICEKAS:
|
||||||
|
case ESTAT_LOGO:
|
||||||
|
ModuleStaticScreen * moduleStaticScreen;
|
||||||
|
moduleStaticScreen = new ModuleStaticScreen(&info);
|
||||||
|
info.estat_joc = moduleStaticScreen->Go();
|
||||||
|
delete moduleStaticScreen;
|
||||||
|
break;
|
||||||
|
case ESTAT_MENU:
|
||||||
|
ModuleMenu * moduleMenu;
|
||||||
|
moduleMenu = new ModuleMenu(&info);
|
||||||
|
info.estat_joc = moduleMenu->Go();
|
||||||
|
delete moduleMenu;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
JF_Quit();
|
||||||
|
JS_Finalize();
|
||||||
|
JD8_Quit();
|
||||||
|
JG_Finalize();
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
7
makefile
Normal file
7
makefile
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
TARGET=pepe
|
||||||
|
all:
|
||||||
|
g++ -I/usr/include/SDL2 *.cpp -w -lSDL2 -lSDL2_mixer -o $(TARGET)
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -rf ./$(TARGET)
|
||||||
|
|
||||||
159
modulemenu.cpp
Normal file
159
modulemenu.cpp
Normal file
@@ -0,0 +1,159 @@
|
|||||||
|
#include "modulemenu.h"
|
||||||
|
|
||||||
|
#include "jgame.h"
|
||||||
|
#include "jdraw8.h"
|
||||||
|
#include "jinput.h"
|
||||||
|
#include "jsound.h"
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
ModuleMenu::ModuleMenu(Info* info) {
|
||||||
|
this->info = info;
|
||||||
|
}
|
||||||
|
|
||||||
|
ModuleMenu::~ModuleMenu(void) {
|
||||||
|
}
|
||||||
|
|
||||||
|
int ModuleMenu::Go() {
|
||||||
|
|
||||||
|
JS_LoadMusic("mtitle.xm");
|
||||||
|
JS_PlayMusic(-1);
|
||||||
|
|
||||||
|
JD8_Surface fondo = JD8_LoadSurface("menu.gif");
|
||||||
|
JD8_Palette pal = JD8_LoadPalette("menu.gif");
|
||||||
|
JD8_Surface opcions = JD8_LoadSurface("menu_s.gif");
|
||||||
|
JD8_Surface gfx = JD8_LoadSurface("sprites.gif");
|
||||||
|
|
||||||
|
JD8_ClearScreen(0);
|
||||||
|
JD8_Flip();
|
||||||
|
|
||||||
|
// FADE IN
|
||||||
|
JD8_Blit(fondo);
|
||||||
|
JG_SetUpdateTicks(1);
|
||||||
|
while (!JD8_FadeToPalAsync(pal) && !JG_Quitting()) {
|
||||||
|
while (!JG_ShouldUpdate()) { JI_Update(); }
|
||||||
|
}
|
||||||
|
|
||||||
|
int x = 320;
|
||||||
|
while (!JG_Quitting() && x > 0) {
|
||||||
|
while (!JG_ShouldUpdate()) { JI_Update(); }
|
||||||
|
JD8_Blit(fondo);
|
||||||
|
JD8_BlitCKCut(x, 50, opcions, 0, 50, 320, 38, 0);
|
||||||
|
JD8_Flip();
|
||||||
|
x--;
|
||||||
|
}
|
||||||
|
x = 320;
|
||||||
|
while (!JG_Quitting() && x > 25) {
|
||||||
|
while (!JG_ShouldUpdate()) { JI_Update(); }
|
||||||
|
JD8_Blit(fondo);
|
||||||
|
JD8_BlitCK(0, 50, opcions, 0, 50, 320, 38, 0);
|
||||||
|
JD8_BlitCKCut(x, 88, opcions, 25, 88, 135, 37, 0);
|
||||||
|
JD8_Flip();
|
||||||
|
x--;
|
||||||
|
}
|
||||||
|
x = 320;
|
||||||
|
while (!JG_Quitting() && x > 0) {
|
||||||
|
while (!JG_ShouldUpdate()) { JI_Update(); }
|
||||||
|
JD8_Blit(fondo);
|
||||||
|
JD8_BlitCK(0, 50, opcions, 0, 50, 320, 38, 0);
|
||||||
|
JD8_BlitCK(25, 88, opcions, 25, 88, 135, 37, 0);
|
||||||
|
JD8_BlitCKCut(x, 125, opcions, 0, 125, 320, 38, 0);
|
||||||
|
JD8_Flip();
|
||||||
|
x--;
|
||||||
|
}
|
||||||
|
x = 320;
|
||||||
|
while (!JG_Quitting() && x > 0) {
|
||||||
|
while (!JG_ShouldUpdate()) { JI_Update(); }
|
||||||
|
JD8_Blit(fondo);
|
||||||
|
JD8_BlitCK(0, 50, opcions, 0, 50, 320, 38, 0);
|
||||||
|
JD8_BlitCK(25, 88, opcions, 25, 88, 135, 37, 0);
|
||||||
|
JD8_BlitCK(0, 125, opcions, 0, 125, 320, 38, 0);
|
||||||
|
JD8_BlitCKCut(x, 163, opcions, 0, 163, 320, 37, 0);
|
||||||
|
JD8_Flip();
|
||||||
|
x--;
|
||||||
|
}
|
||||||
|
int y = 50;
|
||||||
|
while (!JG_Quitting() && y > 0) {
|
||||||
|
while (!JG_ShouldUpdate()) { JI_Update(); }
|
||||||
|
JD8_Blit(fondo);
|
||||||
|
JD8_BlitCK(0, 50, opcions, 0, 50, 320, 38, 0);
|
||||||
|
JD8_BlitCK(25, 88, opcions, 25, 88, 135, 37, 0);
|
||||||
|
JD8_BlitCK(0, 125, opcions, 0, 125, 320, 38, 0);
|
||||||
|
JD8_BlitCK(0, 163, opcions, 0, 163, 320, 37, 0);
|
||||||
|
JD8_BlitCKCut(0, -y, opcions, 0, 0, 320, 50, 0);
|
||||||
|
JD8_Flip();
|
||||||
|
y--;
|
||||||
|
}
|
||||||
|
|
||||||
|
int opcio_seleccionada = 0;
|
||||||
|
int opcio_triada = -1;
|
||||||
|
bool fletxa_amunt_pulsada = false;
|
||||||
|
bool fletxa_avall_pulsada = false;
|
||||||
|
float x_fletxa = 0;
|
||||||
|
float x_velocitat = 1;
|
||||||
|
|
||||||
|
JG_SetUpdateTicks(20);
|
||||||
|
|
||||||
|
while (!JG_Quitting() && opcio_triada == -1) {
|
||||||
|
while (!JG_ShouldUpdate()) {
|
||||||
|
JI_Update();
|
||||||
|
if (JI_KeyPressed(SDL_SCANCODE_UP)) {
|
||||||
|
if (!fletxa_amunt_pulsada) {
|
||||||
|
fletxa_amunt_pulsada = true;
|
||||||
|
opcio_seleccionada--; if (opcio_seleccionada < 0) opcio_seleccionada = 3;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
fletxa_amunt_pulsada = false;
|
||||||
|
}
|
||||||
|
if (JI_KeyPressed(SDL_SCANCODE_DOWN)) {
|
||||||
|
if (!fletxa_avall_pulsada) {
|
||||||
|
fletxa_avall_pulsada = true;
|
||||||
|
opcio_seleccionada++; if (opcio_seleccionada > 3) opcio_seleccionada = 0;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
fletxa_avall_pulsada = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
x_fletxa += x_velocitat;
|
||||||
|
x_velocitat -= 0.1;
|
||||||
|
|
||||||
|
if (x_fletxa < 0) {
|
||||||
|
x_fletxa = 0;
|
||||||
|
x_velocitat = 1;
|
||||||
|
}
|
||||||
|
JD8_Blit(fondo);
|
||||||
|
JD8_BlitCK(0, 50, opcions, 0, 50, 320, 38, 0);
|
||||||
|
JD8_BlitCK(25, 88, opcions, 25, 88, 135, 37, 0);
|
||||||
|
JD8_BlitCK(0, 125, opcions, 0, 125, 320, 38, 0);
|
||||||
|
JD8_BlitCK(0, 163, opcions, 0, 163, 320, 37, 0);
|
||||||
|
JD8_BlitCK(0, 0, opcions, 0, 0, 320, 50, 0);
|
||||||
|
JD8_BlitCK(10+x_fletxa, 60+opcio_seleccionada*37, gfx, 18, 5, 9, 10, 255);
|
||||||
|
JD8_Flip();
|
||||||
|
}
|
||||||
|
|
||||||
|
// FADE OUT
|
||||||
|
JG_SetUpdateTicks(2);
|
||||||
|
while (!JD8_FadeOutAsync() && !JG_Quitting()) {
|
||||||
|
while (!JG_ShouldUpdate()) { JI_Update(); }
|
||||||
|
}
|
||||||
|
|
||||||
|
JD8_FreeSurface(fondo);
|
||||||
|
JD8_FreeSurface(opcions);
|
||||||
|
JD8_FreeSurface(gfx);
|
||||||
|
free(pal);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if (JG_Quitting()) {
|
||||||
|
return ESTAT_EIXIR;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
switch (this->info->estat_joc) {
|
||||||
|
case ESTAT_ICEKAS: return ESTAT_LOGO; break;
|
||||||
|
case ESTAT_LOGO: return ESTAT_MENU; break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return ESTAT_EIXIR;
|
||||||
|
}
|
||||||
20
modulemenu.h
Normal file
20
modulemenu.h
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "info.h"
|
||||||
|
|
||||||
|
class ModuleMenu {
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
ModuleMenu(Info* info);
|
||||||
|
~ModuleMenu(void);
|
||||||
|
|
||||||
|
int Go();
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
//void showMenu();
|
||||||
|
|
||||||
|
Info* info;
|
||||||
|
int contador;
|
||||||
|
};
|
||||||
116
modulestaticscreen.cpp
Normal file
116
modulestaticscreen.cpp
Normal file
@@ -0,0 +1,116 @@
|
|||||||
|
#include "modulestaticscreen.h"
|
||||||
|
|
||||||
|
#include "jgame.h"
|
||||||
|
#include "jdraw8.h"
|
||||||
|
#include "jinput.h"
|
||||||
|
#include "jsound.h"
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
ModuleStaticScreen::ModuleStaticScreen( Info* info ) {
|
||||||
|
this->info = info;
|
||||||
|
}
|
||||||
|
|
||||||
|
ModuleStaticScreen::~ModuleStaticScreen(void) {
|
||||||
|
}
|
||||||
|
|
||||||
|
int ModuleStaticScreen::Go() {
|
||||||
|
|
||||||
|
switch( this->info->estat_joc ) {
|
||||||
|
case ESTAT_ICEKAS:
|
||||||
|
doIcekas();
|
||||||
|
break;
|
||||||
|
case ESTAT_LOGO:
|
||||||
|
doLogo();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
JD8_FadeOut();
|
||||||
|
|
||||||
|
if( JG_Quitting() ) {
|
||||||
|
return ESTAT_EIXIR;
|
||||||
|
} else {
|
||||||
|
switch (this->info->estat_joc) {
|
||||||
|
case ESTAT_ICEKAS: return ESTAT_LOGO; break;
|
||||||
|
case ESTAT_LOGO: return ESTAT_MENU; break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
const int minim( const int a, const int b ) {
|
||||||
|
if( b < a ) { return b; } else { return a; }
|
||||||
|
}
|
||||||
|
|
||||||
|
void ModuleStaticScreen::doIcekas() {
|
||||||
|
|
||||||
|
bool eixir = false;
|
||||||
|
|
||||||
|
JS_LoadMusic("mlogo.xm");
|
||||||
|
JS_PlayMusic(1);
|
||||||
|
|
||||||
|
JD8_Surface gfx = JD8_LoadSurface( "logo.gif" );
|
||||||
|
JD8_Palette pal = JD8_LoadPalette( "logo.gif" );
|
||||||
|
|
||||||
|
JD8_ClearScreen( 0 );
|
||||||
|
JD8_Flip();
|
||||||
|
|
||||||
|
// FADE IN
|
||||||
|
JD8_Blit(gfx);
|
||||||
|
JG_SetUpdateTicks(8);
|
||||||
|
while (!JD8_FadeToPalAsync(pal) && !eixir) {
|
||||||
|
while (!JG_ShouldUpdate()) { JI_Update(); if (JI_AnyKey() || JG_Quitting()) { eixir = true; } }
|
||||||
|
}
|
||||||
|
|
||||||
|
// DELAY
|
||||||
|
JG_SetUpdateTicks(100);
|
||||||
|
int contador = 20;
|
||||||
|
while (contador > 0 && !eixir) {
|
||||||
|
contador--;
|
||||||
|
while (!JG_ShouldUpdate()) { JI_Update(); if (JI_AnyKey() || JG_Quitting()) { eixir = true; } }
|
||||||
|
}
|
||||||
|
|
||||||
|
// FADE OUT
|
||||||
|
JG_SetUpdateTicks(2);
|
||||||
|
while (!JD8_FadeOutAsync() && !eixir) {
|
||||||
|
while (!JG_ShouldUpdate()) { JI_Update(); if (JI_AnyKey() || JG_Quitting()) { eixir = true; } }
|
||||||
|
}
|
||||||
|
|
||||||
|
JD8_FreeSurface( gfx );
|
||||||
|
free(pal);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ModuleStaticScreen::doLogo() {
|
||||||
|
|
||||||
|
bool eixir = false;
|
||||||
|
|
||||||
|
JD8_Surface gfx = JD8_LoadSurface("titol.gif");
|
||||||
|
JD8_Palette pal = JD8_LoadPalette("titol.gif");
|
||||||
|
|
||||||
|
JD8_ClearScreen(0);
|
||||||
|
JD8_Flip();
|
||||||
|
|
||||||
|
// FADE IN
|
||||||
|
JD8_Blit(gfx);
|
||||||
|
JG_SetUpdateTicks(8);
|
||||||
|
while (!JD8_FadeToPalAsync(pal) && !eixir) {
|
||||||
|
while (!JG_ShouldUpdate()) { JI_Update(); if (JI_AnyKey() || JG_Quitting()) { eixir = true; } }
|
||||||
|
}
|
||||||
|
|
||||||
|
// DELAY
|
||||||
|
JG_SetUpdateTicks(100);
|
||||||
|
int contador = 20;
|
||||||
|
while (contador > 0 && !eixir) {
|
||||||
|
contador--;
|
||||||
|
while (!JG_ShouldUpdate()) { JI_Update(); if (JI_AnyKey() || JG_Quitting()) { eixir = true; } }
|
||||||
|
}
|
||||||
|
|
||||||
|
// FADE OUT
|
||||||
|
JG_SetUpdateTicks(2);
|
||||||
|
while (!JD8_FadeOutAsync() && !eixir) {
|
||||||
|
while (!JG_ShouldUpdate()) { JI_Update(); if (JI_AnyKey() || JG_Quitting()) { eixir = true; } }
|
||||||
|
}
|
||||||
|
|
||||||
|
JD8_FreeSurface(gfx);
|
||||||
|
free(pal);
|
||||||
|
}
|
||||||
21
modulestaticscreen.h
Normal file
21
modulestaticscreen.h
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "info.h"
|
||||||
|
|
||||||
|
class ModuleStaticScreen {
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
ModuleStaticScreen( Info* info );
|
||||||
|
~ModuleStaticScreen(void);
|
||||||
|
|
||||||
|
int Go();
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
void doIcekas();
|
||||||
|
void doLogo();
|
||||||
|
|
||||||
|
Info* info;
|
||||||
|
int contador;
|
||||||
|
};
|
||||||
22
pepe.sln
Normal file
22
pepe.sln
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
|
# Visual Studio 2013
|
||||||
|
VisualStudioVersion = 12.0.31101.0
|
||||||
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pepe", "pepe.vcxproj", "{CE606303-5AA1-41EF-BB2F-B11540AA5EA1}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|Win32 = Debug|Win32
|
||||||
|
Release|Win32 = Release|Win32
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{CE606303-5AA1-41EF-BB2F-B11540AA5EA1}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
|
{CE606303-5AA1-41EF-BB2F-B11540AA5EA1}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
|
{CE606303-5AA1-41EF-BB2F-B11540AA5EA1}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
|
{CE606303-5AA1-41EF-BB2F-B11540AA5EA1}.Release|Win32.Build.0 = Release|Win32
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
||||||
106
pepe.vcxproj
Normal file
106
pepe.vcxproj
Normal file
@@ -0,0 +1,106 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
|
<ProjectConfiguration Include="Debug|Win32">
|
||||||
|
<Configuration>Debug</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Release|Win32">
|
||||||
|
<Configuration>Release</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
</ItemGroup>
|
||||||
|
<PropertyGroup Label="Globals">
|
||||||
|
<ProjectGuid>{CE606303-5AA1-41EF-BB2F-B11540AA5EA1}</ProjectGuid>
|
||||||
|
<Keyword>Win32Proj</Keyword>
|
||||||
|
<RootNamespace>pepe</RootNamespace>
|
||||||
|
<WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
|
<PlatformToolset>v141</PlatformToolset>
|
||||||
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<UseDebugLibraries>false</UseDebugLibraries>
|
||||||
|
<PlatformToolset>v141</PlatformToolset>
|
||||||
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
|
<ImportGroup Label="ExtensionSettings">
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<PropertyGroup Label="UserMacros" />
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
|
<LinkIncremental>true</LinkIncremental>
|
||||||
|
<IncludePath>C:\dev\lib\sdl2\include;$(IncludePath)</IncludePath>
|
||||||
|
<LibraryPath>C:\dev\lib\sdl2\lib\x86;$(LibraryPath)</LibraryPath>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
|
<LinkIncremental>false</LinkIncremental>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<PrecompiledHeader>
|
||||||
|
</PrecompiledHeader>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<SubSystem>Windows</SubSystem>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<AdditionalDependencies>SDL2.lib;SDL2main.lib;SDL2_mixer.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<PrecompiledHeader>
|
||||||
|
</PrecompiledHeader>
|
||||||
|
<Optimization>MaxSpeed</Optimization>
|
||||||
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="gif.c" />
|
||||||
|
<ClCompile Include="jdraw8.cpp" />
|
||||||
|
<ClCompile Include="jfile.cpp" />
|
||||||
|
<ClCompile Include="jgame.cpp" />
|
||||||
|
<ClCompile Include="jinput.cpp" />
|
||||||
|
<ClCompile Include="jsound.cpp" />
|
||||||
|
<ClCompile Include="main.cpp" />
|
||||||
|
<ClCompile Include="modulemenu.cpp" />
|
||||||
|
<ClCompile Include="modulestaticscreen.cpp" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="info.h" />
|
||||||
|
<ClInclude Include="jdraw8.h" />
|
||||||
|
<ClInclude Include="jfile.h" />
|
||||||
|
<ClInclude Include="jgame.h" />
|
||||||
|
<ClInclude Include="jinput.h" />
|
||||||
|
<ClInclude Include="jsound.h" />
|
||||||
|
<ClInclude Include="modulemenu.h" />
|
||||||
|
<ClInclude Include="modulestaticscreen.h" />
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
|
<ImportGroup Label="ExtensionTargets">
|
||||||
|
</ImportGroup>
|
||||||
|
</Project>
|
||||||
72
pepe.vcxproj.filters
Normal file
72
pepe.vcxproj.filters
Normal file
@@ -0,0 +1,72 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup>
|
||||||
|
<Filter Include="Source Files">
|
||||||
|
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||||
|
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Header Files">
|
||||||
|
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||||
|
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Resource Files">
|
||||||
|
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||||
|
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||||
|
</Filter>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="jdraw8.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="jfile.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="jgame.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="jinput.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="jsound.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="main.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="gif.c">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="modulestaticscreen.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="modulemenu.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="info.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="jdraw8.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="jfile.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="jgame.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="jinput.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="jsound.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="modulestaticscreen.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="modulemenu.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
||||||
370
pepe.xcodeproj/project.pbxproj
Normal file
370
pepe.xcodeproj/project.pbxproj
Normal file
@@ -0,0 +1,370 @@
|
|||||||
|
// !$*UTF8*$!
|
||||||
|
{
|
||||||
|
archiveVersion = 1;
|
||||||
|
classes = {
|
||||||
|
};
|
||||||
|
objectVersion = 46;
|
||||||
|
objects = {
|
||||||
|
|
||||||
|
/* Begin PBXBuildFile section */
|
||||||
|
02252FB81C764D2E002D1DA1 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 02252FB71C764D2E002D1DA1 /* main.cpp */; };
|
||||||
|
02B01D591C767C1700CD186D /* SDL2_image.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 02B01D581C767C1700CD186D /* SDL2_image.framework */; };
|
||||||
|
02B01D5B1C767C2C00CD186D /* SDL2_mixer.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 02B01D5A1C767C2C00CD186D /* SDL2_mixer.framework */; };
|
||||||
|
02EA2BEF1C764B3800E5A247 /* SDL2.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 02EA2BEE1C764B3800E5A247 /* SDL2.framework */; };
|
||||||
|
02F8247B1C767CE2007AAE83 /* bola.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 02F8245D1C767CE2007AAE83 /* bola.cpp */; };
|
||||||
|
02F8247C1C767CE2007AAE83 /* data.jrf in Resources */ = {isa = PBXBuildFile; fileRef = 02F8245F1C767CE2007AAE83 /* data.jrf */; };
|
||||||
|
02F8247D1C767CE2007AAE83 /* engendro.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 02F824601C767CE2007AAE83 /* engendro.cpp */; };
|
||||||
|
02F8247E1C767CE2007AAE83 /* jdraw8.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 02F824631C767CE2007AAE83 /* jdraw8.cpp */; };
|
||||||
|
02F8247F1C767CE2007AAE83 /* jfile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 02F824651C767CE2007AAE83 /* jfile.cpp */; };
|
||||||
|
02F824801C767CE2007AAE83 /* jgame.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 02F824671C767CE2007AAE83 /* jgame.cpp */; };
|
||||||
|
02F824811C767CE2007AAE83 /* jinput.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 02F824691C767CE2007AAE83 /* jinput.cpp */; };
|
||||||
|
02F824821C767CE2007AAE83 /* jsound.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 02F8246B1C767CE2007AAE83 /* jsound.cpp */; };
|
||||||
|
02F824831C767CE2007AAE83 /* mapa.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 02F8246D1C767CE2007AAE83 /* mapa.cpp */; };
|
||||||
|
02F824841C767CE2007AAE83 /* marcador.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 02F8246F1C767CE2007AAE83 /* marcador.cpp */; };
|
||||||
|
02F824851C767CE2007AAE83 /* modulegame.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 02F824711C767CE2007AAE83 /* modulegame.cpp */; };
|
||||||
|
02F824861C767CE2007AAE83 /* modulesequence.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 02F824731C767CE2007AAE83 /* modulesequence.cpp */; };
|
||||||
|
02F824871C767CE2007AAE83 /* momia.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 02F824751C767CE2007AAE83 /* momia.cpp */; };
|
||||||
|
02F824881C767CE2007AAE83 /* prota.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 02F824771C767CE2007AAE83 /* prota.cpp */; };
|
||||||
|
02F824891C767CE2007AAE83 /* sprite.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 02F824791C767CE2007AAE83 /* sprite.cpp */; };
|
||||||
|
02F8248B1C772310007AAE83 /* gif.c in Sources */ = {isa = PBXBuildFile; fileRef = 02F8248A1C772310007AAE83 /* gif.c */; };
|
||||||
|
/* End PBXBuildFile section */
|
||||||
|
|
||||||
|
/* Begin PBXFileReference section */
|
||||||
|
02252FB71C764D2E002D1DA1 /* main.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.objcpp; fileEncoding = 4; path = main.cpp; sourceTree = "<group>"; };
|
||||||
|
02B01D581C767C1700CD186D /* SDL2_image.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SDL2_image.framework; path = ../../../../../Library/Frameworks/SDL2_image.framework; sourceTree = "<group>"; };
|
||||||
|
02B01D5A1C767C2C00CD186D /* SDL2_mixer.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SDL2_mixer.framework; path = ../../../../../Library/Frameworks/SDL2_mixer.framework; sourceTree = "<group>"; };
|
||||||
|
02CF35B91C7649C300180C9F /* pepe.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = pepe.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
|
02CF35C71C7649C300180C9F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||||
|
02EA2BEE1C764B3800E5A247 /* SDL2.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SDL2.framework; path = ../../../../../Library/Frameworks/SDL2.framework; sourceTree = "<group>"; };
|
||||||
|
02F8245D1C767CE2007AAE83 /* bola.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = bola.cpp; sourceTree = "<group>"; };
|
||||||
|
02F8245E1C767CE2007AAE83 /* bola.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = bola.h; sourceTree = "<group>"; };
|
||||||
|
02F8245F1C767CE2007AAE83 /* data.jrf */ = {isa = PBXFileReference; lastKnownFileType = file; path = data.jrf; sourceTree = "<group>"; };
|
||||||
|
02F824601C767CE2007AAE83 /* engendro.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = engendro.cpp; sourceTree = "<group>"; };
|
||||||
|
02F824611C767CE2007AAE83 /* engendro.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = engendro.h; sourceTree = "<group>"; };
|
||||||
|
02F824621C767CE2007AAE83 /* info.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = info.h; sourceTree = "<group>"; };
|
||||||
|
02F824631C767CE2007AAE83 /* jdraw8.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = jdraw8.cpp; sourceTree = "<group>"; };
|
||||||
|
02F824641C767CE2007AAE83 /* jdraw8.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = jdraw8.h; sourceTree = "<group>"; };
|
||||||
|
02F824651C767CE2007AAE83 /* jfile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = jfile.cpp; sourceTree = "<group>"; };
|
||||||
|
02F824661C767CE2007AAE83 /* jfile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = jfile.h; sourceTree = "<group>"; };
|
||||||
|
02F824671C767CE2007AAE83 /* jgame.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = jgame.cpp; sourceTree = "<group>"; };
|
||||||
|
02F824681C767CE2007AAE83 /* jgame.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = jgame.h; sourceTree = "<group>"; };
|
||||||
|
02F824691C767CE2007AAE83 /* jinput.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = jinput.cpp; sourceTree = "<group>"; };
|
||||||
|
02F8246A1C767CE2007AAE83 /* jinput.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = jinput.h; sourceTree = "<group>"; };
|
||||||
|
02F8246B1C767CE2007AAE83 /* jsound.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = jsound.cpp; sourceTree = "<group>"; };
|
||||||
|
02F8246C1C767CE2007AAE83 /* jsound.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = jsound.h; sourceTree = "<group>"; };
|
||||||
|
02F8246D1C767CE2007AAE83 /* mapa.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = mapa.cpp; sourceTree = "<group>"; };
|
||||||
|
02F8246E1C767CE2007AAE83 /* mapa.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mapa.h; sourceTree = "<group>"; };
|
||||||
|
02F8246F1C767CE2007AAE83 /* marcador.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = marcador.cpp; sourceTree = "<group>"; };
|
||||||
|
02F824701C767CE2007AAE83 /* marcador.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = marcador.h; sourceTree = "<group>"; };
|
||||||
|
02F824711C767CE2007AAE83 /* modulegame.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = modulegame.cpp; sourceTree = "<group>"; };
|
||||||
|
02F824721C767CE2007AAE83 /* modulegame.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = modulegame.h; sourceTree = "<group>"; };
|
||||||
|
02F824731C767CE2007AAE83 /* modulesequence.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = modulesequence.cpp; sourceTree = "<group>"; };
|
||||||
|
02F824741C767CE2007AAE83 /* modulesequence.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = modulesequence.h; sourceTree = "<group>"; };
|
||||||
|
02F824751C767CE2007AAE83 /* momia.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = momia.cpp; sourceTree = "<group>"; };
|
||||||
|
02F824761C767CE2007AAE83 /* momia.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = momia.h; sourceTree = "<group>"; };
|
||||||
|
02F824771C767CE2007AAE83 /* prota.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = prota.cpp; sourceTree = "<group>"; };
|
||||||
|
02F824781C767CE2007AAE83 /* prota.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = prota.h; sourceTree = "<group>"; };
|
||||||
|
02F824791C767CE2007AAE83 /* sprite.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sprite.cpp; sourceTree = "<group>"; };
|
||||||
|
02F8247A1C767CE2007AAE83 /* sprite.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sprite.h; sourceTree = "<group>"; };
|
||||||
|
02F8248A1C772310007AAE83 /* gif.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = gif.c; sourceTree = "<group>"; };
|
||||||
|
/* End PBXFileReference section */
|
||||||
|
|
||||||
|
/* Begin PBXFrameworksBuildPhase section */
|
||||||
|
02CF35B61C7649C300180C9F /* Frameworks */ = {
|
||||||
|
isa = PBXFrameworksBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
02B01D5B1C767C2C00CD186D /* SDL2_mixer.framework in Frameworks */,
|
||||||
|
02B01D591C767C1700CD186D /* SDL2_image.framework in Frameworks */,
|
||||||
|
02EA2BEF1C764B3800E5A247 /* SDL2.framework in Frameworks */,
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
|
/* End PBXFrameworksBuildPhase section */
|
||||||
|
|
||||||
|
/* Begin PBXGroup section */
|
||||||
|
02CF35B01C7649C300180C9F = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
02F8248A1C772310007AAE83 /* gif.c */,
|
||||||
|
02F8245D1C767CE2007AAE83 /* bola.cpp */,
|
||||||
|
02F8245E1C767CE2007AAE83 /* bola.h */,
|
||||||
|
02F8245F1C767CE2007AAE83 /* data.jrf */,
|
||||||
|
02F824601C767CE2007AAE83 /* engendro.cpp */,
|
||||||
|
02F824611C767CE2007AAE83 /* engendro.h */,
|
||||||
|
02F824621C767CE2007AAE83 /* info.h */,
|
||||||
|
02F824631C767CE2007AAE83 /* jdraw8.cpp */,
|
||||||
|
02F824641C767CE2007AAE83 /* jdraw8.h */,
|
||||||
|
02F824651C767CE2007AAE83 /* jfile.cpp */,
|
||||||
|
02F824661C767CE2007AAE83 /* jfile.h */,
|
||||||
|
02F824671C767CE2007AAE83 /* jgame.cpp */,
|
||||||
|
02F824681C767CE2007AAE83 /* jgame.h */,
|
||||||
|
02F824691C767CE2007AAE83 /* jinput.cpp */,
|
||||||
|
02F8246A1C767CE2007AAE83 /* jinput.h */,
|
||||||
|
02F8246B1C767CE2007AAE83 /* jsound.cpp */,
|
||||||
|
02F8246C1C767CE2007AAE83 /* jsound.h */,
|
||||||
|
02252FB71C764D2E002D1DA1 /* main.cpp */,
|
||||||
|
02F8246D1C767CE2007AAE83 /* mapa.cpp */,
|
||||||
|
02F8246E1C767CE2007AAE83 /* mapa.h */,
|
||||||
|
02F8246F1C767CE2007AAE83 /* marcador.cpp */,
|
||||||
|
02F824701C767CE2007AAE83 /* marcador.h */,
|
||||||
|
02F824711C767CE2007AAE83 /* modulegame.cpp */,
|
||||||
|
02F824721C767CE2007AAE83 /* modulegame.h */,
|
||||||
|
02F824731C767CE2007AAE83 /* modulesequence.cpp */,
|
||||||
|
02F824741C767CE2007AAE83 /* modulesequence.h */,
|
||||||
|
02F824751C767CE2007AAE83 /* momia.cpp */,
|
||||||
|
02F824761C767CE2007AAE83 /* momia.h */,
|
||||||
|
02F824771C767CE2007AAE83 /* prota.cpp */,
|
||||||
|
02F824781C767CE2007AAE83 /* prota.h */,
|
||||||
|
02F824791C767CE2007AAE83 /* sprite.cpp */,
|
||||||
|
02F8247A1C767CE2007AAE83 /* sprite.h */,
|
||||||
|
02CF35C71C7649C300180C9F /* Info.plist */,
|
||||||
|
02EA2BEE1C764B3800E5A247 /* SDL2.framework */,
|
||||||
|
02B01D581C767C1700CD186D /* SDL2_image.framework */,
|
||||||
|
02B01D5A1C767C2C00CD186D /* SDL2_mixer.framework */,
|
||||||
|
02CF35BA1C7649C300180C9F /* Products */,
|
||||||
|
);
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
02CF35BA1C7649C300180C9F /* Products */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
02CF35B91C7649C300180C9F /* pepe.app */,
|
||||||
|
);
|
||||||
|
name = Products;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
/* End PBXGroup section */
|
||||||
|
|
||||||
|
/* Begin PBXNativeTarget section */
|
||||||
|
02CF35B81C7649C300180C9F /* pepe */ = {
|
||||||
|
isa = PBXNativeTarget;
|
||||||
|
buildConfigurationList = 02CF35CA1C7649C300180C9F /* Build configuration list for PBXNativeTarget "pepe" */;
|
||||||
|
buildPhases = (
|
||||||
|
02CF35B51C7649C300180C9F /* Sources */,
|
||||||
|
02CF35B61C7649C300180C9F /* Frameworks */,
|
||||||
|
02CF35B71C7649C300180C9F /* Resources */,
|
||||||
|
);
|
||||||
|
buildRules = (
|
||||||
|
);
|
||||||
|
dependencies = (
|
||||||
|
);
|
||||||
|
name = pepe;
|
||||||
|
productName = pepe;
|
||||||
|
productReference = 02CF35B91C7649C300180C9F /* pepe.app */;
|
||||||
|
productType = "com.apple.product-type.application";
|
||||||
|
};
|
||||||
|
/* End PBXNativeTarget section */
|
||||||
|
|
||||||
|
/* Begin PBXProject section */
|
||||||
|
02CF35B11C7649C300180C9F /* Project object */ = {
|
||||||
|
isa = PBXProject;
|
||||||
|
attributes = {
|
||||||
|
LastUpgradeCheck = 0720;
|
||||||
|
ORGANIZATIONNAME = "Raimon Zamora";
|
||||||
|
TargetAttributes = {
|
||||||
|
02CF35B81C7649C300180C9F = {
|
||||||
|
CreatedOnToolsVersion = 7.2;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
buildConfigurationList = 02CF35B41C7649C300180C9F /* Build configuration list for PBXProject "pepe" */;
|
||||||
|
compatibilityVersion = "Xcode 3.2";
|
||||||
|
developmentRegion = English;
|
||||||
|
hasScannedForEncodings = 0;
|
||||||
|
knownRegions = (
|
||||||
|
en,
|
||||||
|
Base,
|
||||||
|
);
|
||||||
|
mainGroup = 02CF35B01C7649C300180C9F;
|
||||||
|
productRefGroup = 02CF35BA1C7649C300180C9F /* Products */;
|
||||||
|
projectDirPath = "";
|
||||||
|
projectRoot = "";
|
||||||
|
targets = (
|
||||||
|
02CF35B81C7649C300180C9F /* pepe */,
|
||||||
|
);
|
||||||
|
};
|
||||||
|
/* End PBXProject section */
|
||||||
|
|
||||||
|
/* Begin PBXResourcesBuildPhase section */
|
||||||
|
02CF35B71C7649C300180C9F /* Resources */ = {
|
||||||
|
isa = PBXResourcesBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
02F8247C1C767CE2007AAE83 /* data.jrf in Resources */,
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
|
/* End PBXResourcesBuildPhase section */
|
||||||
|
|
||||||
|
/* Begin PBXSourcesBuildPhase section */
|
||||||
|
02CF35B51C7649C300180C9F /* Sources */ = {
|
||||||
|
isa = PBXSourcesBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
02F824841C767CE2007AAE83 /* marcador.cpp in Sources */,
|
||||||
|
02F824801C767CE2007AAE83 /* jgame.cpp in Sources */,
|
||||||
|
02F824881C767CE2007AAE83 /* prota.cpp in Sources */,
|
||||||
|
02F824851C767CE2007AAE83 /* modulegame.cpp in Sources */,
|
||||||
|
02252FB81C764D2E002D1DA1 /* main.cpp in Sources */,
|
||||||
|
02F824831C767CE2007AAE83 /* mapa.cpp in Sources */,
|
||||||
|
02F8247D1C767CE2007AAE83 /* engendro.cpp in Sources */,
|
||||||
|
02F824871C767CE2007AAE83 /* momia.cpp in Sources */,
|
||||||
|
02F824861C767CE2007AAE83 /* modulesequence.cpp in Sources */,
|
||||||
|
02F8247B1C767CE2007AAE83 /* bola.cpp in Sources */,
|
||||||
|
02F824811C767CE2007AAE83 /* jinput.cpp in Sources */,
|
||||||
|
02F8247E1C767CE2007AAE83 /* jdraw8.cpp in Sources */,
|
||||||
|
02F8248B1C772310007AAE83 /* gif.c in Sources */,
|
||||||
|
02F824821C767CE2007AAE83 /* jsound.cpp in Sources */,
|
||||||
|
02F8247F1C767CE2007AAE83 /* jfile.cpp in Sources */,
|
||||||
|
02F824891C767CE2007AAE83 /* sprite.cpp in Sources */,
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
|
/* End PBXSourcesBuildPhase section */
|
||||||
|
|
||||||
|
/* Begin XCBuildConfiguration section */
|
||||||
|
02CF35C81C7649C300180C9F /* Debug */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
buildSettings = {
|
||||||
|
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||||
|
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||||
|
CLANG_CXX_LIBRARY = "libc++";
|
||||||
|
CLANG_ENABLE_MODULES = YES;
|
||||||
|
CLANG_ENABLE_OBJC_ARC = YES;
|
||||||
|
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||||
|
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||||
|
CLANG_WARN_EMPTY_BODY = YES;
|
||||||
|
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||||
|
CLANG_WARN_INT_CONVERSION = YES;
|
||||||
|
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||||
|
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||||
|
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||||
|
CODE_SIGN_IDENTITY = "-";
|
||||||
|
COPY_PHASE_STRIP = NO;
|
||||||
|
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||||
|
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||||
|
ENABLE_TESTABILITY = YES;
|
||||||
|
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||||
|
GCC_DYNAMIC_NO_PIC = NO;
|
||||||
|
GCC_NO_COMMON_BLOCKS = YES;
|
||||||
|
GCC_OPTIMIZATION_LEVEL = 0;
|
||||||
|
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||||
|
"DEBUG=1",
|
||||||
|
"$(inherited)",
|
||||||
|
);
|
||||||
|
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||||
|
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||||
|
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||||
|
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||||
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||||
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
|
MACOSX_DEPLOYMENT_TARGET = 10.11;
|
||||||
|
MTL_ENABLE_DEBUG_INFO = YES;
|
||||||
|
ONLY_ACTIVE_ARCH = YES;
|
||||||
|
SDKROOT = macosx;
|
||||||
|
};
|
||||||
|
name = Debug;
|
||||||
|
};
|
||||||
|
02CF35C91C7649C300180C9F /* Release */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
buildSettings = {
|
||||||
|
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||||
|
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||||
|
CLANG_CXX_LIBRARY = "libc++";
|
||||||
|
CLANG_ENABLE_MODULES = YES;
|
||||||
|
CLANG_ENABLE_OBJC_ARC = YES;
|
||||||
|
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||||
|
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||||
|
CLANG_WARN_EMPTY_BODY = YES;
|
||||||
|
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||||
|
CLANG_WARN_INT_CONVERSION = YES;
|
||||||
|
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||||
|
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||||
|
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||||
|
CODE_SIGN_IDENTITY = "-";
|
||||||
|
COPY_PHASE_STRIP = NO;
|
||||||
|
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||||
|
ENABLE_NS_ASSERTIONS = NO;
|
||||||
|
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||||
|
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||||
|
GCC_NO_COMMON_BLOCKS = YES;
|
||||||
|
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||||
|
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||||
|
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||||
|
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||||
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||||
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
|
MACOSX_DEPLOYMENT_TARGET = 10.11;
|
||||||
|
MTL_ENABLE_DEBUG_INFO = NO;
|
||||||
|
SDKROOT = macosx;
|
||||||
|
};
|
||||||
|
name = Release;
|
||||||
|
};
|
||||||
|
02CF35CB1C7649C300180C9F /* Debug */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
buildSettings = {
|
||||||
|
COMBINE_HIDPI_IMAGES = YES;
|
||||||
|
FRAMEWORK_SEARCH_PATHS = (
|
||||||
|
"$(inherited)",
|
||||||
|
"$(LOCAL_LIBRARY_DIR)/Frameworks",
|
||||||
|
);
|
||||||
|
HEADER_SEARCH_PATHS = (
|
||||||
|
"$(LOCAL_LIBRARY_DIR)/Frameworks/SDL2.framework/headers",
|
||||||
|
"$(LOCAL_LIBRARY_DIR)/Frameworks/SDL2_image.framework/headers",
|
||||||
|
"$(LOCAL_LIBRARY_DIR)/Frameworks/SDL2_mixer.framework/headers",
|
||||||
|
);
|
||||||
|
INFOPLIST_FILE = "$(SRCROOT)/Info.plist";
|
||||||
|
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
|
||||||
|
PRODUCT_BUNDLE_IDENTIFIER = net.jailers.pepe;
|
||||||
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
};
|
||||||
|
name = Debug;
|
||||||
|
};
|
||||||
|
02CF35CC1C7649C300180C9F /* Release */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
buildSettings = {
|
||||||
|
COMBINE_HIDPI_IMAGES = YES;
|
||||||
|
FRAMEWORK_SEARCH_PATHS = (
|
||||||
|
"$(inherited)",
|
||||||
|
"$(LOCAL_LIBRARY_DIR)/Frameworks",
|
||||||
|
);
|
||||||
|
HEADER_SEARCH_PATHS = (
|
||||||
|
"$(LOCAL_LIBRARY_DIR)/Frameworks/SDL2.framework/headers",
|
||||||
|
"$(LOCAL_LIBRARY_DIR)/Frameworks/SDL2_image.framework/headers",
|
||||||
|
"$(LOCAL_LIBRARY_DIR)/Frameworks/SDL2_mixer.framework/headers",
|
||||||
|
);
|
||||||
|
INFOPLIST_FILE = "$(SRCROOT)/Info.plist";
|
||||||
|
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
|
||||||
|
PRODUCT_BUNDLE_IDENTIFIER = net.jailers.pepe;
|
||||||
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
};
|
||||||
|
name = Release;
|
||||||
|
};
|
||||||
|
/* End XCBuildConfiguration section */
|
||||||
|
|
||||||
|
/* Begin XCConfigurationList section */
|
||||||
|
02CF35B41C7649C300180C9F /* Build configuration list for PBXProject "pepe" */ = {
|
||||||
|
isa = XCConfigurationList;
|
||||||
|
buildConfigurations = (
|
||||||
|
02CF35C81C7649C300180C9F /* Debug */,
|
||||||
|
02CF35C91C7649C300180C9F /* Release */,
|
||||||
|
);
|
||||||
|
defaultConfigurationIsVisible = 0;
|
||||||
|
defaultConfigurationName = Release;
|
||||||
|
};
|
||||||
|
02CF35CA1C7649C300180C9F /* Build configuration list for PBXNativeTarget "pepe" */ = {
|
||||||
|
isa = XCConfigurationList;
|
||||||
|
buildConfigurations = (
|
||||||
|
02CF35CB1C7649C300180C9F /* Debug */,
|
||||||
|
02CF35CC1C7649C300180C9F /* Release */,
|
||||||
|
);
|
||||||
|
defaultConfigurationIsVisible = 0;
|
||||||
|
defaultConfigurationName = Release;
|
||||||
|
};
|
||||||
|
/* End XCConfigurationList section */
|
||||||
|
};
|
||||||
|
rootObject = 02CF35B11C7649C300180C9F /* Project object */;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user