diff --git a/examples/07_cheril_perils_classic/map/level1.BAK b/examples/07_cheril_perils_classic/map/level1.BAK deleted file mode 100644 index d4bdd9d..0000000 Binary files a/examples/07_cheril_perils_classic/map/level1.BAK and /dev/null differ diff --git a/examples/07_cheril_perils_classic/map/level2.BAK b/examples/07_cheril_perils_classic/map/level2.BAK deleted file mode 100644 index 4223db2..0000000 Binary files a/examples/07_cheril_perils_classic/map/level2.BAK and /dev/null differ diff --git a/examples/08_cheril_the_writer/dev/config.h.bak b/examples/08_cheril_the_writer/dev/config.h.bak deleted file mode 100644 index 23a9c61..0000000 --- a/examples/08_cheril_the_writer/dev/config.h.bak +++ /dev/null @@ -1,625 +0,0 @@ -// NES MK1 v1.0 -// Copyleft Mojon Twins 2013, 2015, 2017, 2018 - -//#define GAME_AREA_TOP -//#define GAME_AREA_MIDDLE -//#define GAME_AREA_BOTTOM -#define GAME_AREA_CUSTOM - -// ============================================================================ -// I. General configuration -// ============================================================================ - -// In this section we define map dimmensions, initial and authomatic ending conditions, etc. - -#define MAP_W 6 // -#define MAP_H 4 // Map dimmensions in screens -#define MAP_SIZE MAP_W*MAP_H - -#define PLAYER_LIFE 5 // Vida máxima (con la que empieza, además) -#define PLAYER_REFILL 1 // Recarga de vida. - -#define MULTI_LEVEL // Comment for single level -#define MAX_LEVELS 5 - -#define MAX_FLAGS 2 // Keep it low if you don't need flags - -#ifndef MULTI_LEVEL - - // If you aim for a single level ROM, fill in those: - - #define SCR_INI 18 // Initial screen - #define PLAYER_INI_X 2 // - #define PLAYER_INI_Y 3 // Initial position - //#define SCR_END 99 // Final screen, undefine if N/A - #define PLAYER_END_X 99 // - #define PLAYER_END_Y 99 // Ending position - #define PLAYER_MAX_OBJECTS 25 // Objects to finish game - -#else - - // If you want multiple levels, please don't touch this much. - // Just comment SCR_END and / or PLAYER_MAX_OBJECTS if N/A. - // You should be fiddling with assets/levelset.h - - #define SCR_INI (l_scr_ini [level]) - #define PLAYER_INI_X (l_ini_x [level]) - #define PLAYER_INI_Y (l_ini_y [level]) - //#define SCR_END (l_scr_end [level]) - #define PLAYER_END_X (l_end_x [level]) - #define PLAYER_END_Y (l_end_y [level]) - #define PLAYER_MAX_OBJECTS (l_player_max_objects [level]) - -#endif - -// Some flexibility -#define HOTSPOT_TYPE_OBJECT 1 -#define HOTSPOT_TYPE_KEYS 2 -#define HOTSPOT_TYPE_REFILL 3 -//#define HOTSPOT_TYPE_AMMO 4 // For ammo refills -//#define HOTSPOT_TYPE_TIME 5 // For time refills - -#define HOTSPOT_TYPE_RESONATOR 4 // Custom for this game. -#define HOTSPOT_TYPE_RESONATOR_ON 5 // Custom for this game. - -#define WIN_LEVEL_CUSTOM // A level ends when win_level == 1 - // And such a thing has to be setup by YOU - -//#define MAP_FORMAT_PACKED // Each byte in map data = 2 tiles, 16 tiles max. -//#define MAP_FORMAT_RLE16 // RLE'd by rlemap2. 16 tiles max. -//#define MAP_FORMAT_RLE53 // RLE'd by rle53mapMK1. 32 tiles max. -//#define MAP_FORMAT_RLE44 // RLE'd by rle44mapMK1. 16 tiles max. -#define MAP_FORMAT_RLE53_CHRROM // RLE'd by rle53mapchrrom and stored in CHR-ROM. 32 tiles max. -//#define MAP_FORMAT_RLE44_CHRROM // RLE'd by rle44mapchrrom and stored in CHR-ROM. 16 tiles max. - -//#define MAP_WITH_DECORATIONS // Add decorations when use a 16 tiles mode. - -// Use the complex renderer if you need to post-process the map buffer before -// printing. - -//#define MAP_RENDERER_COMPLEX // Comment for the simple, old renderer - -// ============================================================================ -// II. Engine type -// ============================================================================ - -// This section is used to define the game engine behaviour. Many directives are related, -// and others are mutually exclusive. I think this will be pretty obvious when you look at them. - -// Right now the shooting engine is only compatible with the side-view engine. - -// Bounding box size -// ----------------- - -// Player is 8x16 for collision with BG but can be made taller by this amount. Negative values=shorter -#define PLAYER_COLLISION_VSTRETCH_BG -4 - -// This defines how the player will collide with enemies. -// Player is always 8 pixels wide and 16 pixel tall PLUS the value of this variable. -// this offset goes to the head. -// So if you define it as -8, the collision box will be 8x8 bottom centerd. -// And if you define it as 4 the collision box will be 8x20 bottom centered. -// For 16x24 sprites it's safe to leave it at 0. For 16x16 should be better -2. -#define PLAYER_COLLISION_VSTRETCH_FG 4 - -// Same for enemies. -// I usually leave it at 0 for <=24 pixels tall, 8 for 32 pixels tall. -#define ENEMS_COLLISION_VSTRETCH_FG 0 - -// General directives: -// ------------------- - -// Push boxes - -//#define PLAYER_PUSH_BOXES // If defined, tile #14 is pushable -//#define FIRE_TO_PUSH - -//#define ENABLE_PUSHED_SCRIPT -#define PUSHED_TILE_FLAG 1 -#define PUSHED_TO_X_FLAG 2 -#define PUSHED_TO_Y_FLAG 3 - -// General stuff - -//#define DEACTIVATE_KEYS // If defined, keys are not present. -#define DEACTIVATE_OBJECTS // If defined, objects are not present. -//#define PLAYER_BOUNCES -//#define DOUBLE_BOUNCE -#define DIE_AND_RESPAWN // If defined, dying = respawn on latest safe. -//#define DIE_AND_REENTER // Reenter screen on death -#define PLAYER_FLICKERS // If defined, collisions make player flicker instead. -//#define WALLS_STOP_ENEMIES // If defined, enemies react to the scenary - -// Extra special tiles -// ------------------- - -#define NO_HORIZONTAL_EVIL_TILE // Only check for evil tiles vertically - -// Quicksands, beh == 2. -// For player movement values, see section 4 -// (PLAYER_VY_SINKING) - -#define ENABLE_QUICKSANDS - -// Breakable, beh & 16 -//#define ENABLE_BREAKABLE // Breakable walls -#define BREAKABLE_LIFE 2 // Amount of hits to break wall -#define BREAKABLE_ANIM // Show explosion when breaking -#define BREAKABLE_MAX 4 // Max # of concurrent explosions -#define BREAKABLE_MAX_FRAMES 8 // Frames to show explosion -#define BREAKABLE_ERASE 0 // Tile to erase broken tiles -#define BREAKABLE_BREAKING 8 // Tile to display while breaking -//#define BREAKABLE_WALKABLE // If defined (side view), tiles break when stepped on - -// Conveyors, beh & 32 [+1] (must be & 8!) -// For player movement values, see section 4 -// (PLAYER_VX_CONVEYORS) - -#define ENABLE_CONVEYORS - -// Slippery, beh & 64. (must be & 12!) -// For player movement values, see section 4 -// (PLAYER_AX_ICE & PLAYER_RX_ICE) - -//#define ENABLE_SLIPPERY - -// Ladders, beh == 32 - -#define ENABLE_LADDERS - -// Extra special stuff -// ------------------- - -// Propellers - -#define ENABLE_PROPELLERS -#define PROPELLERS_MAX 6 -#define PROPELLERS_BASE_PATTERN 64 // First of 4 patterns to draw/animate propellers -#define PROPELLERS_MAX_LENGTH 5 // In tiles; undef for infinite -#define PROPELLER_TILE 24 // Tile # in map to detect a propeller -//#define PROPELLERS_ON_BY_DEFAULT // Define so propellers are on by default - -// Killing tiles shine, beware! - -#define ENABLE_SHINES -#define SHINES_MAX 8 -#define SHINES_BASE_PATTERN 10 // In the sprite bank, two patterns needed -#define SHINES_PALETTE 3 -#define SHINING_TILE 23 // Tile # in map to add shines - -// Resonators. Not sure if you need this, but. - -#define ENABLE_RESONATORS -#define RESONATOR_BASE_PATTERN 0 -#define RESONATOR_PALETTE 3 -#define RESONATOR_COUNTER_OFFS_X 4 -#define RESONATOR_COUNTER_OFFS_Y 7 -//#define RESONATOR_CHANGE_BG_PAL paltsgrey // Define to change pal for this palette -#define RESONATOR_CHANGE_SPR_PAL palssgrey // Define to change pal for this palette - -// Simple warpers. Put as 0xff type enemies. -// Destination is attr:s1 (n_pant:YX). - -//#define ENABLE_SIMPLE_WARPERS -#define SIMPLE_WARPERS_BASE_SPRID -#define SIMPLE_WARPERS_FIRE_BUTTON - -// No! - -#define ENABLE_NO -#define NO_METASPRITE ssit_06 -#define NO_OFFS_X 0 -#define NO_OFFS_Y -24 - -// Use animation. -// Note: When activated hotspots need b_button press and, in side view, possee. - -#define ENABLE_USE_ANIM -#define USE_ANIM_MAX_FRAMES 13 -#define USE_ANIM_INTERACT_ON 7 -#define USE_ANIM_FRAMES_PER_STEP 4 - -// Text boxes. If you need them, you call them - -#define ENABLE_TEXT_BOX -#define TEXT_BOX_FRAME_TILE_OFFSET 0x20 // We need tiles in the active metatileset to draw the frame -#define TEXT_BOX_WITH_PORTRAITS // Draw spr_hs [rdd] if != 0 in the text box if defined -#define TEXT_BOX_DIALOGUES // Add code for dialogues - -// Timer. - -//#define ENABLE_TIMER -#define TIMER_INITIAL 5 -//#define TIMER_START_ON -#define TIMER_REFILL 0 -#define TIMER_RESET_ON_ENTER -//#define TIMER_TIME_FLAG 0 // Useful with scripting. Copies time to flag -//#define TIMER_ZERO_FLAG 1 // Useful with scripting. raises flag when time zero -#define TIMER_SOUND 10 // play a sound if timer < value - -// Springs - -//#define ENABLE_SPRINGS -#define SPRING_TILE 10 -#define SPRING_SPIKE_TILE 11 -//#define SPRINGS_ON_BY_DEFAULT - -// Enemy types and definitions -// --------------------------- - -#define ENEMS_IN_CHRROM // Enems are stored somewhere in CHR-ROM - -#define ENEMS_LIFE_GAUGE 1 // Amount of shots/punches/kicks needed to kill enemies. -//#define ENEMS_FLICKER // Ifdef: flicker, if not: explosion -//#define ENEMS_FLICKER_ONLY_ON_DYING // Flicker, but only when life == 0 -//#define ENEMS_CAN_RESPAWN // Read docs for this. - -#define PERSISTENT_ENEMIES -#define PERSISTENT_DEATHS - -#define ENEMS_TOUCHED_FRAMES 8 // # frames to stay frozen after hit -//#define ENEMS_RECOIL_ON_HIT 2 // horizontal recoil when hit, #ifdef, value is speed in pixels! -//#define ENEMS_RECOIL_OVER_BOUNDARIES // (x1,y1), (x2,y2) boundaries don't stop a recoil - -#define ENEMS_ENABLE_DYING_FRAME - -#define ENEMS_EXPLODING_CELL 43 -#define ENEMS_EXPLODING_CELLS_HIDES // Define and the baddie will be substituted by the explosion - -#define ENEMS_OCCLUDING_CELL 42 // If you use pezons or saws you need a flame for occlusion - -// Beware: only activate this if enemies are killable by any means: -//#define ENEMIES_SUFFER_ON_PLAYER_COLLISION - -// Fanties / Homing fanties - -#define ENABLE_FANTY -//#define ENABLE_HOMING_FANTY - -#define FANTY_BASE_SPRID 32 -#define FANTY_WITH_FACING -#define FANTY_COLLIDES -#define FANTY_KILLED_BY_TILE -//#define FANTY_LIFE_GAUGE 5 // Define if you need these to be tougher - -#define FANTY_A 4 -#define FANTY_MAXV 48 - -#define FANTY_DISTANCE 80 -#define FANTY_V_RETREAT 16 - -// Pursuers (for top-down) - -//#define ENABLE_PURSUERS // If defined, type 7 enemies are active -#define DEATH_COUNT_EXPRESSION 50+(rand8()&63) -#define TYPE_7_FIXED_SPRITE 4 // If defined, type 7 enemies are always # - -// Saws - -#define ENABLE_SAW -#define SAW_BASE_SPRID 40 -#define SAW_V_DISPL 4 -#define SAW_EMERGING_STEPS 10 - -// Pezons - -//#define ENABLE_PEZONS -#define PEZONS_BASE_SPRID 40 -#define PEZON_WAIT 50 -#define PEZON_THRUST 384 -#define PEZON_VY_FALLING_MAX 256 -#define PEZON_G 16 - -// Chac chacs - -//#define ENABLE_CHAC_CHAC -#define CHAC_CHAC_BASE_TILE 16 -#define CHAC_CHAC_IDLE_2 16 -#define CHAC_CHAC_IDLE_3 1 -#define CHAC_CHAC_IDLE_4 50 - -//#define CHAC_CHAC_FROM_MAP // Chac chacs are not placed as enemies but as tiles -#define MAX_CHAC_CHACS 4 -#define MAX_CHAC_CHACKS_QUEUED 16 // Make the closest power of 2 >= (MAX_CHAC_CHACS*4) -#define CHAC_CHAC_DETECT_TILE 39 -#define CHAC_CHACS_CLEAR // You are placing chac chacks from map but need the path to be clear - -// Monococos - -//#define ENABLE_MONOCOCOS -//#define MONOCOCO_TYPE_A // Comment for 4 cells monococo (appearing/disappearing & hidden) -#define MONOCOCO_BASE_SPRID 56 -#define MONOCOCO_BASE_TIME_HIDDEN 150 -#define MONOCOCO_BASE_TIME_APPEARING 50 -#define MONOCOCO_BASE_TIME_ONBOARD 50 -#define MONOCOCO_FIRE_COCO_AT MONOCOCO_BASE_TIME_ONBOARD/2 - -// Shooties - -//#define ENABLE_SHOOTIES -#define SHOOTIES_BASE_SPRID 40 -#define SHOOTIES_SHOOT_OFFS_X 16 -#define SHOOTIES_SHOOT_OFFS_Y -2 -#define SHOOT_FREQ (pry+23>=en_y[gpit]&&pry<=en_y[gpit]+23&&((en_facing[gpit]&&en_x[gpit]>prx)||(en_facing[gpit]==0&&en_x[gpit]=en_y[gpit]&&pry<=en_y[gpit]+23&&((en_facing[gpit]&&en_x[gpit]>prx)||(en_facing[gpit]==0&&en_x[gpit] inventory (just 1) -//#define ONLY_ONE_OBJECT_FLAG 0 // If def, use flag [.] instead of pinv - -// Easy objects mode: A range of hotspot id's are considered -// 'objects'. The user can carry one of those. Contents of hotspots -// can change in this mode. - -#define ENABLE_EASY_OBJECTS - -#define HS_OBJ_EMPTY 1 -#define HS_OBJ_MIN 6 -#define HS_OBJ_MAX 13 -#define HS_USE_OFFS 8 - -//#define HS_TYPE_A // If defined, render receptors = HS_OBJ_EMPTY, object used = object - // Otherwise, use its own graphics. -#define HS_FIX_ON_USE // If defined, object N used at N+H_USE_OFFS becomes N+H_USE_OFFS*2 - -// Silly Brawlers -// -------------- -//#define PLAYER_PUNCHES // When on floor -#define PLAYER_PUNCH_OFFS_X 15 -#define PLAYER_PUNCH_OFFS_Y -7 - -//#define PLAYER_KICKS // While airborne -#define PLAYER_KICK_OFFS_X 12 -#define PLAYER_KICK_OFFS_Y -3 - -#define PLAYER_FROZEN_FRAMES 16 // Frames to be frozen when hit landed - -// Shooting behaviour -// ------------------ -//#define PLAYER_CAN_FIRE // If defined, shooting engine is enabled. -#define PLAYER_BULLET_SPEED 4 // Pixels/frame. -#define MAX_BULLETS 4 // Max number of bullets on screen. Be careful!. -#define PLAYER_BULLET_Y_OFFSET 6 // vertical offset from the player's top. -#define PLAYER_BULLET_X_OFFSET -4 // vertical offset from the player's left/right. -//#define PLAYER_BULLETS_MIN_KILLABLE 3 // If defined, only enemies >= N can be killed. -//#define BULLETS_DONT_KILL // Bullets don't kill, but affect enemies otherwise - -// Special shooting -//#define PLAYER_FIRE_RELOAD 16 // If defined # of frames until next shoot -//#define PLAYER_CHARGE_AND_FIRE // If defined, press B to charge, release to fire - #define PLAYER_CHARGE_MIN 8 - #define PLAYER_CHARGE_MAX 48 // Min/max frames for charging -//#define PLAYER_BULLET_LIFE pfiregauge // Max life. Can be whatever. -//#define PLAYER_BULLET_FLICKERS 8 // Bullets flickers for N frames before dying, if defined - -//#define MAX_AMMO 99 // If defined, ammo is not infinite! - #define AMMO_REFILL 50 // type 3 hotspots refill amo, using tile 20 - //#define INITIAL_AMMO 0 // If defined, ammo = X when entering game. - -#define BULLET_PALETTE 3 -#define BULLET_PATTERN 0 // To paint the bullet. Can be an expresion. - -// Scripting -// --------- - -//#define ACTIVATE_SCRIPTING // Activates msc scripting and flag related stuff. -//#define CLEAR_FLAGS // Zero all flags when entering a level - -//#define FIRE_ON_KILL // run fire script on enemy kill - -//#define ENABLE_EXTERN_CODE // Enables custom code to be run from the script using EXTERN n -//#define ENABLE_FIRE_ZONE // Allows to define a zone which auto-triggers "FIRE" - -// Interactives -// ------------ - -#define ENABLE_INTERACTIVES // Graphical flag representations! -#define INTERACTIVES_MAX 4 // As per screen -//#define FLAG_INVENTORY 0 -#define INTERACTIVES_ONLY_SPRITES // If you are using other means for items and just need sprites - -// Top view: -// --------- - -//#define PLAYER_TOP_DOWN // Enable top view. -//#define TOP_OVER_SIDE // UP/DOWN has priority over LEFT/RIGHT - -// Side view: -// ---------- - -#define PLAYER_HAS_JUMP // If defined, player is able to jump. -//#define PLAYER_JUMP_TYPE_MK2 // Use MK2 method for jump / gravity / release -//#define PLAYER_AUTO_JUMP // Automatic jump when hitting the floor -//#define PLAYER_SWIMS // If defined, player swims a la Ninjajar! -//#define PLAYER_HAS_JETPAC // If defined, player can thrust a vertical jetpac -#define PLAYER_STEPS_ON_ENEMS // If defined, stepping on enemies kills them -//#define PLAYER_STEPS_STRICT // Only registers advantage hit when pvy > PLAYER_VY_FALLING_MIN -//#define PLAYER_SAFE_LANDING // Step over vertical inverts direction -//#define PLAYER_STEPS_MIN_KILLABLE 0xff // Only kill enemies with id >= PLAYER_STEPS_MIN_KILLABLE - // 0xff = Nobody - -// ============================================================================ -// III. Screen configuration -// ============================================================================ - -// This sections defines how stuff is rendered, where to show counters, etcetera - -#define LIFE_X 4 // -#define LIFE_Y 4 // Life gauge counter character coordinates - -//#define OBJECTS_X 18 // -//#define OBJECTS_Y 3 // Objects counter character coordinates -//#define OBJECTS_REMAINING // Show # remaining instead of got - -#define KEYS_X 12 // -#define KEYS_Y 4 // Keys counter character coordinates - -#define KILLED_X 28 // -#define KILLED_Y 4 // Kills counter character coordinates - -//#define AMMO_X 8 // -//#define AMMO_Y 2 // Ammo counter character coordinates - -#define HS_INV_X 160 // -#define HS_INV_Y 15 // Object you are carrying - -//#define TIMER_X 0 // -//#define TIMER_Y 5 // Current timer value - -// Text -//#define LINE_OF_TEXT 26 // If defined, scripts can show text @ Y = # -//#define LINE_OF_TEXT_X 1 // X coordinate. - -// ============================================================================ -// IV. Player movement configuration -// ============================================================================ - -// This section is used to define which constants are used in the gravity/acceleration engine. -// If a side-view engine is configured, we have to define vertical and horizontal constants -// separately. If a top-view engine is configured instead, the horizontal values are also -// applied to the vertical component, vertical values are ignored. - -// IV.1. Vertical movement. Only for side-view. - -#define PLAYER_VY_FALLING_MAX 256 // Max. velocity when falling -#define PLAYER_VY_FALLING_MIN 64 // Use for animating if you need -#define PLAYER_VY_SINKING 2 -#define PLAYER_G 16 // Gravity - -#define PLAYER_VY_JUMP_INITIAL 64 -#define PLAYER_VY_JUMP_MAX 256 // Max. velocity when jumping -#define PLAYER_AY_JUMP 16 // Jumpin acceleration - -#define PLAYER_AY_JETPAC 32 // Jetpac increment -#define PLAYER_VY_JETPAC_MAX 256 // Max jetpac vertical speed - -#define PLAYER_AY_SWIM 8 // Swimming acceleration. -#define PLAYER_VY_SWIM_MAX 64 // Swimming max. speed - -#define PLAYER_VY_LADDERS 96 - -#define PLAYER_AY_FLOAT 16 -#define PLAYER_VY_FLOAT_MAX 256 - -#define PLAYER_AY_UNTHRUST 8 // Used in the Autojump engine. - -// IV.1.b MK2 style jump (overrides PLAYER_?Y_JUMP_* defined before!) -// (Used if PLAYER_JUMP_TYPE_MK2 is defined) -#define PLAYER_G_MK2_JUMPING 4 -#define PLAYER_VY_MK2_JUMP_INITIAL 208 -#define PLAYER_VY_MK2_JUMP_RELEASE 96 -#define PLAYER_VY_MK2_JUMP_A_STEPS 16 - -// IV.2. Horizontal (side view) or general (top view) movement. - -#define PLAYER_VX_MAX 128 // Max. horizontal speed -#define PLAYER_VX_CONVEYORS 64 -#define PLAYER_AX 8 // Horizontal acceleration -#define PLAYER_AX_ICE 4 -#define PLAYER_RX 8 // Horizontal friction -#define PLAYER_RX_ICE 2 - -#define PLAYER_VX_MIN (PLAYER_AX << 2) - -#define PLAYER_V_REBOUND 224 - -// Animation cells - -#ifdef PLAYER_TOP_DOWN - - // Cell definitions for top-down view - - #define CELL_FACING_RIGHT 0 - #define CELL_FACING_LEFT 6 - #define CELL_FACING_UP 18 - #define CELL_FACING_DOWN 12 - - #define CELL_IDLE 0 - #define CELL_WALK_CYCLE 1 - #define CELL_PUSHING 5 - - #define CELL_USE 24 - -#else - - // Cell definitions for side view - - #define CELL_FACING_RIGHT 0 - #define CELL_FACING_LEFT 6 - - #define CELL_IDLE 0 - #define CELL_WALK_INIT 1 - #define CELL_WALK_CYCLE 1 - #define CELL_AIRBORNE 5 - #define CELL_ASCENDING 5 - #define CELL_DESCENDING 6 - - #define CELL_SWIM_CYCLE 6 - - #define CELL_USE 12 - - #define CELL_PUNCHING 8 - #define CELL_KICKING 9 - - #define CELL_CLIMB_CYCLE 25 - #define CELL_CLIMB_HALF 29 -#endif - -// Music - -#define MUSIC_INGAME 0 -#define MUSIC_CUTS 4 - -// SFX - -#define SFX_START 0 -#define SFX_TILE 1 -#define SFX_OBJECT 2 -#define SFX_USE 3 -#define SFX_PHIT 4 -#define SFX_DUMMY1 5 -#define SFX_ENHIT 6 -#define SFX_DUMMY2 7 -#define SFX_JUMP 8 -#define SFX_BULLET 9 -#define SFX_COCO 10 -#define SFX_SPRING 11 -#define SFX_COUNT 12 -#define SFX_BREAKH 13 -#define SFX_HITTER 14 -#define SFX_STEPON 15 -#define SFX_FLOAT 16 -#define SFX_BREAKB 17 diff --git "a/examples/09_cad\303\240veri\303\266n/dev/config.h.bak" "b/examples/09_cad\303\240veri\303\266n/dev/config.h.bak" deleted file mode 100644 index 5011959..0000000 --- "a/examples/09_cad\303\240veri\303\266n/dev/config.h.bak" +++ /dev/null @@ -1,625 +0,0 @@ -// NES MK1 v1.0 -// Copyleft Mojon Twins 2013, 2015, 2017, 2018 - -//#define GAME_AREA_TOP -//#define GAME_AREA_MIDDLE -#define GAME_AREA_BOTTOM -//#define GAME_AREA_CUSTOM - -// ============================================================================ -// I. General configuration -// ============================================================================ - -// In this section we define map dimmensions, initial and authomatic ending conditions, etc. - -#define MAP_W 5 // -#define MAP_H 4 // Map dimensions in screens -#define MAP_SIZE MAP_W*MAP_H - -#define PLAYER_LIFE 5 // Max / Initial life -#define PLAYER_REFILL 1 // Life refill - -//#define MULTI_LEVEL // Comment for single level -#define MAX_LEVELS 1 - -#define MAX_FLAGS 17 // Keep it low if you don't need flags - -#ifndef MULTI_LEVEL - - // If you aim for a single level ROM, fill in those: - - #define SCR_INI 0 // Initial screen - #define PLAYER_INI_X 2 // - #define PLAYER_INI_Y 2 // Initial position - //#define SCR_END 99 // Final screen, undefine if N/A - #define PLAYER_END_X 99 // - #define PLAYER_END_Y 99 // Ending position - #define PLAYER_MAX_OBJECTS 25 // Objects to finish game - -#else - - // If you want multiple levels, please don't touch this much. - // Just comment SCR_END and / or PLAYER_MAX_OBJECTS if N/A. - // You should be fiddling with assets/levelset.h - - #define SCR_INI (l_scr_ini [level]) - #define PLAYER_INI_X (l_ini_x [level]) - #define PLAYER_INI_Y (l_ini_y [level]) - //#define SCR_END (l_scr_end [level]) - #define PLAYER_END_X (l_end_x [level]) - #define PLAYER_END_Y (l_end_y [level]) - #define PLAYER_MAX_OBJECTS (l_player_max_objects [level]) - -#endif - -// Some flexibility -#define HOTSPOT_TYPE_OBJECT 1 -#define HOTSPOT_TYPE_KEYS 2 -#define HOTSPOT_TYPE_REFILL 3 -//#define HOTSPOT_TYPE_AMMO 4 -#define HOTSPOT_TYPE_TIME 5 // For time refills - -//#define HOTSPOT_TYPE_RESONATOR 4 // An example of custom hotspot - -//#define WIN_LEVEL_CUSTOM // A level ends when win_level == 1 - // And such a thing has to be setup by YOU - -//#define MAP_FORMAT_PACKED // Each byte in map data = 2 tiles, 16 tiles max. -//#define MAP_FORMAT_RLE16 // RLE'd by rlemap2. 16 tiles max. -#define MAP_FORMAT_RLE53 // RLE'd by rle53mapMK1. 32 tiles max. -//#define MAP_FORMAT_RLE44 // RLE'd by rle44mapMK1. 16 tiles max. -//#define MAP_FORMAT_RLE53_CHRROM // RLE'd by rle53mapchrrom and stored in CHR-ROM. 32 tiles max. -//#define MAP_FORMAT_RLE44_CHRROM // RLE'd by rle44mapchrrom and stored in CHR-ROM. 16 tiles max. - -//#define MAP_WITH_DECORATIONS // Add decorations when use a 16 tiles mode. - -// Use the complex renderer if you need to post-process the map buffer before -// printing. - -#define MAP_RENDERER_COMPLEX // Comment for the simple, old renderer - -// ============================================================================ -// II. Engine type -// ============================================================================ - -// This section is used to define the game engine behaviour. Many directives are related, -// and others are mutually exclusive. I think this will be pretty obvious when you look at them. - -// Right now the shooting engine is only compatible with the side-view engine. - -// Bounding box size -// ----------------- - -// Player is 8x16 for collision with BG but can be made taller by this amount. Negative values=shorter -#define PLAYER_COLLISION_VSTRETCH_BG -8 - -// This defines how the player will collide with enemies. -// Player is always 8 pixels wide and 16 pixel tall PLUS the value of this variable. -// this offset goes to the head. -// So if you define it as -8, the collision box will be 8x8 bottom centerd. -// And if you define it as 4 the collision box will be 8x20 bottom centered. -// For 16x24 sprites it's safe to leave it at 0. For 16x16 should be better -2. -#define PLAYER_COLLISION_VSTRETCH_FG -4 - -// Same for enemies. -// I usually leave it at 0 for <=24 pixels tall, 8 for 32 pixels tall. -#define ENEMS_COLLISION_VSTRETCH_FG 0 - -// General directives: -// ------------------- - -// Push boxes - -#define PLAYER_PUSH_BOXES // If defined, tile #14 is pushable -#define FIRE_TO_PUSH - -#define ENABLE_PUSHED_SCRIPT -#define PUSHED_TILE_FLAG 1 -#define PUSHED_TO_X_FLAG 2 -#define PUSHED_TO_Y_FLAG 3 - -// General stuff - -#define DEACTIVATE_KEYS // If defined, keys are not present. -#define DEACTIVATE_OBJECTS // If defined, objects are not present. -//#define PLAYER_BOUNCES -//#define DOUBLE_BOUNCE -#define DIE_AND_RESPAWN // If defined, dying = respawn on latest safe. -#define DIE_AND_REENTER // ... also, reenter screen on death -#define PLAYER_FLICKERS // If defined, collisions make player flicker instead. -#define WALLS_STOP_ENEMIES // If defined, enemies react to the scenary - -// Extra special tiles -// ------------------- - -//#define NO_HORIZONTAL_EVIL_TILE // Only check for evil tiles vertically - -// Quicksands, beh == 2. -// For player movement values, see section 4 -// (PLAYER_VY_SINKING) - -//#define ENABLE_QUICKSANDS - -// Breakable, beh & 16 -//#define ENABLE_BREAKABLE // Breakable walls -#define BREAKABLE_LIFE 2 // Amount of hits to break wall -#define BREAKABLE_ANIM // Show explosion when breaking -#define BREAKABLE_MAX 4 // Max # of concurrent explosions -#define BREAKABLE_MAX_FRAMES 8 // Frames to show explosion -#define BREAKABLE_ERASE 0 // Tile to erase broken tiles -#define BREAKABLE_BREAKING 8 // Tile to display while breaking -//#define BREAKABLE_WALKABLE // If defined (side view), tiles break when stepped on - -// Conveyors, beh & 32 [+1] (must be & 8!) -// For player movement values, see section 4 -// (PLAYER_VX_CONVEYORS) - -//#define ENABLE_CONVEYORS - -// Slippery, beh & 64. (must be & 12!) -// For player movement values, see section 4 -// (PLAYER_AX_ICE & PLAYER_RX_ICE) - -//#define ENABLE_SLIPPERY - -// Ladders, beh == 32 - -//#define ENABLE_LADDERS - -// Extra special stuff -// ------------------- - -// Propellers - -//#define ENABLE_PROPELLERS -#define PROPELLERS_MAX 4 -#define PROPELLERS_BASE_PATTERN 64 // First of 4 patterns to draw/animate propellers -#define PROPELLERS_MAX_LENGTH 6 // In tiles; undef for infinite -#define PROPELLER_TILE 14 // Tile # in map to detect a propeller -#define PROPELLERS_ON_BY_DEFAULT // Define so propellers are on by default - -// Killing tiles shine, beware! - -//#define ENABLE_SHINES -#define SHINES_MAX 8 -#define SHINES_BASE_PATTERN 10 // In the sprite bank, two patterns needed -#define SHINES_PALETTE 3 -#define SHINING_TILE 23 // Tile # in map to add shines - -// Resonators. Not sure if you need this, but. - -//#define ENABLE_RESONATORS -#define RESONATOR_BASE_PATTERN 0 -#define RESONATOR_PALETTE 3 -#define RESONATOR_COUNTER_OFFS_X 4 -#define RESONATOR_COUNTER_OFFS_Y 7 -//#define RESONATOR_CHANGE_BG_PAL paltsgrey // Define to change pal for this palette -//#define RESONATOR_CHANGE_SPR_PAL palssgrey // Define to change pal for this palette - -// Simple warpers. Put as 0xff type enemies. -// Destination is attr:s1 (n_pant:YX). - -#define ENABLE_SIMPLE_WARPERS -#define SIMPLE_WARPERS_BASE_SPRID (32+((frame_counter>>2)&3)) -//#define SIMPLE_WARPERS_FIRE_BUTTON - -// No! - -//#define ENABLE_NO -#define NO_METASPRITE ssit_06 -#define NO_OFFS_X 0 -#define NO_OFFS_Y -24 - -// Use animation. -// Note: When activated hotspots need b_button press and, in side view, possee. - -#define ENABLE_USE_ANIM -#define USE_ANIM_MAX_FRAMES 13 -#define USE_ANIM_INTERACT_ON 7 -#define USE_ANIM_FRAMES_PER_STEP 4 - -// Text boxes. If you need them, you call them - -//#define ENABLE_TEXT_BOX -#define TEXT_BOX_FRAME_TILE_OFFSET 0x20 // We need tiles in the active metatileset to draw the frame -//#define TEXT_BOX_WITH_PORTRAITS // Draw spr_hs [rdd] if != 0 in the text box if defined -//#define TEXT_BOX_DIALOGUES // Add code for dialogues - -// Timer. - -#define ENABLE_TIMER -#define TIMER_INITIAL 99 -#define TIMER_START_ON -#define TIMER_REFILL 30 -//#define TIMER_RESET_ON_ENTER -//#define TIMER_TIME_FLAG 0 // Useful with scripting. Copies time to flag -//#define TIMER_ZERO_FLAG 1 // Useful with scripting. raises flag when time zero -#define TIMER_SOUND 10 // play a sound if timer < value - -// Springs - -//#define ENABLE_SPRINGS -#define SPRING_TILE 10 -#define SPRING_SPIKE_TILE 11 -//#define SPRINGS_ON_BY_DEFAULT - -// Enemy types and definitions -// --------------------------- - -//#define ENEMS_IN_CHRROM // Enems are stored somewhere in CHR-ROM - -#define ENEMS_LIFE_GAUGE 2 // Amount of shots/punches/kicks needed to kill enemies. -//#define ENEMS_FLICKER // Ifdef: flicker, if not: explosion -//#define ENEMS_FLICKER_ONLY_ON_DYING // Flicker, but only when life == 0 -//#define ENEMS_CAN_RESPAWN // Read docs for this. - -//#define PERSISTENT_ENEMIES -//#define PERSISTENT_DEATHS - -#define ENEMS_TOUCHED_FRAMES 8 // # frames to stay frozen after hit -//#define ENEMS_RECOIL_ON_HIT 2 // horizontal recoil when hit, #ifdef, value is speed in pixels! -//#define ENEMS_RECOIL_OVER_BOUNDARIES // (x1,y1), (x2,y2) boundaries don't stop a recoil - -//#define ENEMS_ENABLE_DYING_FRAME - -#define ENEMS_EXPLODING_CELL 32 -#define ENEMS_EXPLODING_CELLS_HIDES // Define and the baddie will be substituted by the explosion - -#define ENEMS_OCCLUDING_CELL 33 // If you use pezons or saws you need a flame for occlusion - -// Beware: only activate this if enemies are killable by any means: -//#define ENEMIES_SUFFER_ON_PLAYER_COLLISION - -// Fanties / Homing fanties - -//#define ENABLE_FANTY -//#define ENABLE_HOMING_FANTY - -#define FANTY_BASE_SPRID 32 -#define FANTY_WITH_FACING -#define FANTY_COLLIDES -#define FANTY_KILLED_BY_TILE -//#define FANTY_LIFE_GAUGE 5 // Define if you need these to be tougher - -#define FANTY_A 4 -#define FANTY_MAXV 48 - -#define FANTY_DISTANCE 80 -#define FANTY_V_RETREAT 16 - -// Pursuers (for top-down) - -//#define ENABLE_PURSUERS // If defined, type 7 enemies are active -#define DEATH_COUNT_EXPRESSION 50+(rand8()&63) -#define TYPE_7_FIXED_SPRITE 4 // If defined, type 7 enemies are always # - -// Saws - -//#define ENABLE_SAW -#define SAW_BASE_SPRID 48 -#define SAW_V_DISPL 4 -#define SAW_EMERGING_STEPS 10 - -// Pezons - -//#define ENABLE_PEZONS -#define PEZONS_BASE_SPRID 40 -#define PEZON_WAIT 50 -#define PEZON_THRUST 384 -#define PEZON_VY_FALLING_MAX 256 -#define PEZON_G 16 - -// Chac chacs - -//#define ENABLE_CHAC_CHAC -#define CHAC_CHAC_BASE_TILE 16 -#define CHAC_CHAC_IDLE_2 16 -#define CHAC_CHAC_IDLE_3 1 -#define CHAC_CHAC_IDLE_4 50 - -//#define CHAC_CHAC_FROM_MAP // Chac chacs are not placed as enemies but as tiles -#define MAX_CHAC_CHACS 4 -#define MAX_CHAC_CHACKS_QUEUED 16 // Make the closest power of 2 >= (MAX_CHAC_CHACS*4) -#define CHAC_CHAC_DETECT_TILE 39 -#define CHAC_CHACS_CLEAR // You are placing chac chacks from map but need the path to be clear - -// Monococos - -//#define ENABLE_MONOCOCOS -//#define MONOCOCO_TYPE_A // Comment for 4 cells monococo (appearing/disappearing & hidden) -#define MONOCOCO_BASE_SPRID 56 -#define MONOCOCO_BASE_TIME_HIDDEN 150 -#define MONOCOCO_BASE_TIME_APPEARING 50 -#define MONOCOCO_BASE_TIME_ONBOARD 50 -#define MONOCOCO_FIRE_COCO_AT MONOCOCO_BASE_TIME_ONBOARD/2 - -// Shooties - -//#define ENABLE_SHOOTIES -#define SHOOTIES_BASE_SPRID 40 -#define SHOOTIES_SHOOT_OFFS_X 16 -#define SHOOTIES_SHOOT_OFFS_Y -2 -#define SHOOT_FREQ (pry+23>=en_y[gpit]&&pry<=en_y[gpit]+23&&((en_facing[gpit]&&en_x[gpit]>prx)||(en_facing[gpit]==0&&en_x[gpit]=en_y[gpit]&&pry<=en_y[gpit]+23&&((en_facing[gpit]&&en_x[gpit]>prx)||(en_facing[gpit]==0&&en_x[gpit] inventory (just 1) -//#define ONLY_ONE_OBJECT_FLAG 0 // If def, use flag [.] instead of pinv - -// Easy objects mode: A range of hotspot id's are considered -// 'objects'. The user can carry one of those. Contents of hotspots -// can change in this mode. - -//#define ENABLE_EASY_OBJECTS - -#define HS_OBJ_EMPTY 4 -#define HS_OBJ_MIN 5 -#define HS_OBJ_MAX 6 -#define HS_USE_OFFS 2 - -#define HS_TYPE_A // If defined, render receptors = HS_OBJ_EMPTY, object used = object - // Otherwise, use its own graphics. -#define HS_FIX_ON_USE // If defined, object N used at N+H_USE_OFFS becomes N+H_USE_OFFS*2 - -// Silly Brawlers -// -------------- -//#define PLAYER_PUNCHES // When on floor -#define PLAYER_PUNCH_OFFS_X 15 -#define PLAYER_PUNCH_OFFS_Y -7 - -//#define PLAYER_KICKS // While airborne -#define PLAYER_KICK_OFFS_X 12 -#define PLAYER_KICK_OFFS_Y -3 - -#define PLAYER_FROZEN_FRAMES 16 // Frames to be frozen when hit landed - -// Shooting behaviour -// ------------------ -//#define PLAYER_CAN_FIRE // If defined, shooting engine is enabled. -#define PLAYER_BULLET_SPEED 4 // Pixels/frame. -#define MAX_BULLETS 4 // Max number of bullets on screen. Be careful!. -#define PLAYER_BULLET_Y_OFFSET 6 // vertical offset from the player's top. -#define PLAYER_BULLET_X_OFFSET -4 // vertical offset from the player's left/right. -//#define PLAYER_BULLETS_MIN_KILLABLE 3 // If defined, only enemies >= N can be killed. -//#define BULLETS_DONT_KILL // Bullets don't kill, but affect enemies otherwise - -// Special shooting -//#define PLAYER_FIRE_RELOAD 16 // If defined # of frames until next shoot -//#define PLAYER_CHARGE_AND_FIRE // If defined, press B to charge, release to fire - #define PLAYER_CHARGE_MIN 8 - #define PLAYER_CHARGE_MAX 48 // Min/max frames for charging -//#define PLAYER_BULLET_LIFE pfiregauge // Max life. Can be whatever. -//#define PLAYER_BULLET_FLICKERS 8 // Bullets flickers for N frames before dying, if defined - -//#define MAX_AMMO 99 // If defined, ammo is not infinite! - #define AMMO_REFILL 50 // type 3 hotspots refill amo, using tile 20 - //#define INITIAL_AMMO 0 // If defined, ammo = X when entering game. - -#define BULLET_PALETTE 3 -#define BULLET_PATTERN 0 // To paint the bullet. Can be an expresion. - -// Scripting -// --------- - -#define ACTIVATE_SCRIPTING // Activates msc scripting and flag related stuff. -#define CLEAR_FLAGS // Zero all flags when entering a level - -//#define FIRE_ON_KILL // run fire script on enemy kill - -#define ENABLE_EXTERN_CODE // Enables custom code to be run from the script using EXTERN n -#define ENABLE_FIRE_ZONE // Allows to define a zone which auto-triggers "FIRE" - -// Interactives -// ------------ - -//#define ENABLE_INTERACTIVES // Graphical flag representations! -#define INTERACTIVES_MAX 4 // As per screen -#define FLAG_INVENTORY 0 -//#define INTERACTIVES_ONLY_SPRITES // If you are using other means for items and just need sprites - -// Top view: -// --------- - -#define PLAYER_TOP_DOWN // Enable top view. -//#define TOP_OVER_SIDE // UP/DOWN has priority over LEFT/RIGHT - -// Side view: -// ---------- - -//#define PLAYER_HAS_JUMP // If defined, player is able to jump. -//#define PLAYER_JUMP_TYPE_MK2 // Use MK2 method for jump / gravity / release -//#define PLAYER_AUTO_JUMP // Automatic jump when hitting the floor -//#define PLAYER_SWIMS // If defined, player swims a la Ninjajar! -//#define PLAYER_HAS_JETPAC // If defined, player can thrust a vertical jetpac -//#define PLAYER_STEPS_ON_ENEMS // If defined, stepping on enemies kills them -//#define PLAYER_STEPS_STRICT // Only registers advantage hit when pvy > PLAYER_VY_FALLING_MIN -//#define PLAYER_SAFE_LANDING // Step over vertical inverts direction -//#define PLAYER_STEPS_MIN_KILLABLE 0xff // Only kill enemies with id >= PLAYER_STEPS_MIN_KILLABLE - // 0xff = Nobody - -// ============================================================================ -// III. Screen configuration -// ============================================================================ - -// This sections defines how stuff is rendered, where to show counters, etcetera - -#define LIFE_X 5 // -#define LIFE_Y 3 // Life gauge counter character coordinates - -//#define OBJECTS_X 18 // -//#define OBJECTS_Y 3 // Objects counter character coordinates -//#define OBJECTS_REMAINING // Show # remaining instead of got - -//#define KEYS_X 28 // -//#define KEYS_Y 3 // Keys counter character coordinates - -//#define KILLED_X 16 // -//#define KILLED_Y 2 // Kills counter character coordinates - -//#define AMMO_X 8 // -//#define AMMO_Y 2 // Ammo counter character coordinates - -//#define HS_INV_X 160 // -//#define HS_INV_Y 15 // Object you are carrying - -#define TIMER_X 27 // -#define TIMER_Y 3 // Current timer value - -// Text -#define LINE_OF_TEXT 5 // If defined, scripts can show text @ Y = # -#define LINE_OF_TEXT_X 1 // X coordinate. - -// ============================================================================ -// IV. Player movement configuration -// ============================================================================ - -// This section is used to define which constants are used in the gravity/acceleration engine. -// If a side-view engine is configured, we have to define vertical and horizontal constants -// separately. If a top-view engine is configured instead, the horizontal values are also -// applied to the vertical component, vertical values are ignored. - -// IV.1. Vertical movement. Only for side-view. - -#define PLAYER_VY_FALLING_MAX 256 // Max. velocity when falling -#define PLAYER_VY_FALLING_MIN 64 // Use for animating if you need -#define PLAYER_VY_SINKING 2 -#define PLAYER_G 16 // Gravity - -#define PLAYER_VY_JUMP_INITIAL 64 -#define PLAYER_VY_JUMP_MAX 192 // Max. velocity when jumping -#define PLAYER_AY_JUMP 12 // Jumpin acceleration - -#define PLAYER_AY_JETPAC 32 // Jetpac increment -#define PLAYER_VY_JETPAC_MAX 256 // Max jetpac vertical speed - -#define PLAYER_AY_SWIM 8 // Swimming acceleration. -#define PLAYER_VY_SWIM_MAX 64 // Swimming max. speed - -#define PLAYER_VY_LADDERS 96 - -#define PLAYER_AY_FLOAT 16 -#define PLAYER_VY_FLOAT_MAX 256 - -#define PLAYER_AY_UNTHRUST 8 // Used in the Autojump engine. - -// IV.1.b MK2 style jump (overrides PLAYER_?Y_JUMP_* defined before!) -// (Used if PLAYER_JUMP_TYPE_MK2 is defined) -#define PLAYER_G_MK2_JUMPING 4 -#define PLAYER_VY_MK2_JUMP_INITIAL 208 -#define PLAYER_VY_MK2_JUMP_RELEASE 96 -#define PLAYER_VY_MK2_JUMP_A_STEPS 16 - -// IV.2. Horizontal (side view) or general (top view) movement. - -#define PLAYER_VX_MAX 128 // Max. horizontal speed -#define PLAYER_VX_CONVEYORS 64 -#define PLAYER_AX 32 // Horizontal acceleration -#define PLAYER_AX_ICE 4 -#define PLAYER_RX 32 // Horizontal friction -#define PLAYER_RX_ICE 2 - -#define PLAYER_VX_MIN (PLAYER_AX << 2) - -#define PLAYER_V_REBOUND 224 - -// Animation cells - -#ifdef PLAYER_TOP_DOWN - - // Cell definitions for top-down view - - #define CELL_FACING_RIGHT 0 - #define CELL_FACING_LEFT 6 - #define CELL_FACING_UP 18 - #define CELL_FACING_DOWN 12 - - #define CELL_IDLE 0 - #define CELL_WALK_CYCLE 1 - #define CELL_PUSHING 5 - - #define CELL_USE 24 - -#else - - // Cell definitions for side view - - #define CELL_FACING_RIGHT 0 - #define CELL_FACING_LEFT 8 - - #define CELL_IDLE 0 - #define CELL_WALK_INIT 1 - #define CELL_WALK_CYCLE 1 - #define CELL_AIRBORNE 5 - #define CELL_ASCENDING 5 - #define CELL_DESCENDING 6 - - #define CELL_SWIM_CYCLE 6 - - #define CELL_USE 6 - - #define CELL_PUNCHING 8 - #define CELL_KICKING 9 - - #define CELL_CLIMB_CYCLE 20 - #define CELL_CLIMB_HALF 29 -#endif - -// Music - -#define MUSIC_INGAME 0 -#define MUSIC_CUTS 1 -#define MUSIC_TITLE 2 - -// SFX - -#define SFX_START 0 -#define SFX_TILE 1 -#define SFX_OBJECT 2 -#define SFX_USE 3 -#define SFX_PHIT 4 -#define SFX_DUMMY1 5 -#define SFX_ENHIT 6 -#define SFX_DUMMY2 7 -#define SFX_JUMP 8 -#define SFX_BULLET 9 -#define SFX_COCO 10 -#define SFX_SPRING 11 -#define SFX_COUNT 12 -#define SFX_BREAKH 13 -#define SFX_HITTER 14 -#define SFX_STEPON 15 -#define SFX_FLOAT 16 -#define SFX_BREAKB 17 diff --git a/examples/10_che_man/dev/config.h.bak b/examples/10_che_man/dev/config.h.bak deleted file mode 100644 index 35cd50e..0000000 --- a/examples/10_che_man/dev/config.h.bak +++ /dev/null @@ -1,624 +0,0 @@ -// NES MK1 v1.0 -// Copyleft Mojon Twins 2013, 2015, 2017, 2018 - -//#define GAME_AREA_TOP -//#define GAME_AREA_MIDDLE -#define GAME_AREA_BOTTOM -//#define GAME_AREA_CUSTOM - -// ============================================================================ -// I. General configuration -// ============================================================================ - -// In this section we define map dimmensions, initial and authomatic ending conditions, etc. - -#define MAP_W 5 // -#define MAP_H 4 // Map dimensions in screens -#define MAP_SIZE MAP_W*MAP_H - -#define PLAYER_LIFE 5 // Max / Initial life -#define PLAYER_REFILL 3 // Life refill - -//#define MULTI_LEVEL // Comment for single level -#define MAX_LEVELS 1 - -#define MAX_FLAGS 16 // Keep it low if you don't need flags - -#ifndef MULTI_LEVEL - - // If you aim for a single level ROM, fill in those: - - #define SCR_INI 19 // Initial screen - #define PLAYER_INI_X 13 // - #define PLAYER_INI_Y 3 // Initial position - //#define SCR_END 99 // Final screen, undefine if N/A - #define PLAYER_END_X 99 // - #define PLAYER_END_Y 99 // Ending position - #define PLAYER_MAX_OBJECTS 15 // Objects to finish game - -#else - - // If you want multiple levels, please don't touch this much. - // Just comment SCR_END and / or PLAYER_MAX_OBJECTS if N/A. - // You should be fiddling with assets/levelset.h - - #define SCR_INI (l_scr_ini [level]) - #define PLAYER_INI_X (l_ini_x [level]) - #define PLAYER_INI_Y (l_ini_y [level]) - //#define SCR_END (l_scr_end [level]) - #define PLAYER_END_X (l_end_x [level]) - #define PLAYER_END_Y (l_end_y [level]) - #define PLAYER_MAX_OBJECTS (l_player_max_objects [level]) - -#endif - -// Some flexibility -#define HOTSPOT_TYPE_OBJECT 1 -#define HOTSPOT_TYPE_KEYS 2 -#define HOTSPOT_TYPE_REFILL 3 -//#define HOTSPOT_TYPE_AMMO 4 -//#define HOTSPOT_TYPE_TIME 5 // For time refills - -//#define HOTSPOT_TYPE_RESONATOR 4 // An example of custom hotspot - -#define WIN_LEVEL_CUSTOM // A level ends when win_level == 1 - // And such a thing has to be setup by YOU - -//#define MAP_FORMAT_PACKED // Each byte in map data = 2 tiles, 16 tiles max. -//#define MAP_FORMAT_RLE16 // RLE'd by rlemap2. 16 tiles max. -#define MAP_FORMAT_RLE53 // RLE'd by rle53mapMK1. 32 tiles max. -//#define MAP_FORMAT_RLE44 // RLE'd by rle44mapMK1. 16 tiles max. -//#define MAP_FORMAT_RLE53_CHRROM // RLE'd by rle53mapchrrom and stored in CHR-ROM. 32 tiles max. -//#define MAP_FORMAT_RLE44_CHRROM // RLE'd by rle44mapchrrom and stored in CHR-ROM. 16 tiles max. - -//#define MAP_WITH_DECORATIONS // Add decorations when use a 16 tiles mode. - -// Use the complex renderer if you need to post-process the map buffer before -// printing. - -//#define MAP_RENDERER_COMPLEX // Comment for the simple, old renderer - -// ============================================================================ -// II. Engine type -// ============================================================================ - -// This section is used to define the game engine behaviour. Many directives are related, -// and others are mutually exclusive. I think this will be pretty obvious when you look at them. - -// Right now the shooting engine is only compatible with the side-view engine. - -// Bounding box size -// ----------------- - -// Player is 8x16 for collision with BG but can be made taller by this amount. Negative values=shorter -#define PLAYER_COLLISION_VSTRETCH_BG -4 - -// This defines how the player will collide with enemies. -// Player is always 8 pixels wide and 16 pixel tall PLUS the value of this variable. -// this offset goes to the head. -// So if you define it as -8, the collision box will be 8x8 bottom centerd. -// And if you define it as 4 the collision box will be 8x20 bottom centered. -// For 16x24 sprites it's safe to leave it at 0. For 16x16 should be better -2. -#define PLAYER_COLLISION_VSTRETCH_FG -4 - -// Same for enemies. -// I usually leave it at 0 for <=24 pixels tall, 8 for 32 pixels tall. -#define ENEMS_COLLISION_VSTRETCH_FG 4 - -// General directives: -// ------------------- - -// Push boxes - -//#define PLAYER_PUSH_BOXES // If defined, tile #14 is pushable -#define FIRE_TO_PUSH - -//#define ENABLE_PUSHED_SCRIPT -#define PUSHED_TILE_FLAG 1 -#define PUSHED_TO_X_FLAG 2 -#define PUSHED_TO_Y_FLAG 3 - -// General stuff - -//#define DEACTIVATE_KEYS // If defined, keys are not present. -//#define DEACTIVATE_OBJECTS // If defined, objects are not present. -//#define PLAYER_BOUNCES -//#define DOUBLE_BOUNCE -#define DIE_AND_RESPAWN // If defined, dying = respawn on latest safe. -//#define DIE_AND_REENTER // ... also, reenter screen on death -#define PLAYER_FLICKERS // If defined, collisions make player flicker instead. -//#define WALLS_STOP_ENEMIES // If defined, enemies react to the scenary - -// Extra special tiles -// ------------------- - -#define NO_HORIZONTAL_EVIL_TILE // Only check for evil tiles vertically - -// Quicksands, beh == 2. -// For player movement values, see section 4 -// (PLAYER_VY_SINKING) - -//#define ENABLE_QUICKSANDS - -// Breakable, beh & 16 -//#define ENABLE_BREAKABLE // Breakable walls -#define BREAKABLE_LIFE 2 // Amount of hits to break wall -#define BREAKABLE_ANIM // Show explosion when breaking -#define BREAKABLE_MAX 4 // Max # of concurrent explosions -#define BREAKABLE_MAX_FRAMES 8 // Frames to show explosion -#define BREAKABLE_ERASE 0 // Tile to erase broken tiles -#define BREAKABLE_BREAKING 8 // Tile to display while breaking -//#define BREAKABLE_WALKABLE // If defined (side view), tiles break when stepped on - -// Conveyors, beh & 32 [+1] (must be & 8!) -// For player movement values, see section 4 -// (PLAYER_VX_CONVEYORS) - -//#define ENABLE_CONVEYORS - -// Slippery, beh & 64. (must be & 12!) -// For player movement values, see section 4 -// (PLAYER_AX_ICE & PLAYER_RX_ICE) - -//#define ENABLE_SLIPPERY - -// Ladders, beh == 32 - -//#define ENABLE_LADDERS - -// Extra special stuff -// ------------------- - -// Propellers - -//#define ENABLE_PROPELLERS -#define PROPELLERS_MAX 4 -#define PROPELLERS_BASE_PATTERN 64 // First of 4 patterns to draw/animate propellers -#define PROPELLERS_MAX_LENGTH 6 // In tiles; undef for infinite -#define PROPELLER_TILE 14 // Tile # in map to detect a propeller -#define PROPELLERS_ON_BY_DEFAULT // Define so propellers are on by default - -// Killing tiles shine, beware! - -//#define ENABLE_SHINES -#define SHINES_MAX 8 -#define SHINES_BASE_PATTERN 10 // In the sprite bank, two patterns needed -#define SHINES_PALETTE 3 -#define SHINING_TILE 23 // Tile # in map to add shines - -// Resonators. Not sure if you need this, but. - -//#define ENABLE_RESONATORS -#define RESONATOR_BASE_PATTERN 0 -#define RESONATOR_PALETTE 3 -#define RESONATOR_COUNTER_OFFS_X 4 -#define RESONATOR_COUNTER_OFFS_Y 7 -//#define RESONATOR_CHANGE_BG_PAL paltsgrey // Define to change pal for this palette -//#define RESONATOR_CHANGE_SPR_PAL palssgrey // Define to change pal for this palette - -// Simple warpers. Put as 0xff type enemies. -// Destination is attr:s1 (n_pant:YX). - -//#define ENABLE_SIMPLE_WARPERS -#define SIMPLE_WARPERS_BASE_SPRID (32+((frame_counter>>2)&3)) -//#define SIMPLE_WARPERS_FIRE_BUTTON - -// No! - -//#define ENABLE_NO -#define NO_METASPRITE ssit_06 -#define NO_OFFS_X 0 -#define NO_OFFS_Y -24 - -// Use animation. -// Note: When activated hotspots need b_button press and, in side view, possee. - -//#define ENABLE_USE_ANIM -#define USE_ANIM_MAX_FRAMES 13 -#define USE_ANIM_INTERACT_ON 7 -#define USE_ANIM_FRAMES_PER_STEP 4 - -// Text boxes. If you need them, you call them - -#define ENABLE_TEXT_BOX -#define TEXT_BOX_FRAME_TILE_OFFSET 0x20 // We need tiles in the active metatileset to draw the frame -//#define TEXT_BOX_WITH_PORTRAITS // Draw spr_hs [rdd] if != 0 in the text box if defined -//#define TEXT_BOX_DIALOGUES // Add code for dialogues - -// Timer. - -//#define ENABLE_TIMER -#define TIMER_INITIAL 99 -#define TIMER_START_ON -#define TIMER_REFILL 30 -//#define TIMER_RESET_ON_ENTER -//#define TIMER_TIME_FLAG 0 // Useful with scripting. Copies time to flag -//#define TIMER_ZERO_FLAG 1 // Useful with scripting. raises flag when time zero -#define TIMER_SOUND 10 // play a sound if timer < value - -// Springs - -//#define ENABLE_SPRINGS -#define SPRING_TILE 10 -#define SPRING_SPIKE_TILE 11 -//#define SPRINGS_ON_BY_DEFAULT - -// Enemy types and definitions -// --------------------------- - -//#define ENEMS_IN_CHRROM // Enems are stored somewhere in CHR-ROM - -#define ENEMS_LIFE_GAUGE 2 // Amount of shots/punches/kicks needed to kill enemies. -//#define ENEMS_FLICKER // Ifdef: flicker, if not: explosion - -//#define ENEMS_FLICKER_ONLY_ON_DYING // Flicker, but only when life == 0 -//#define ENEMS_CAN_RESPAWN // Read docs for this. - -//#define PERSISTENT_ENEMIES -#define PERSISTENT_DEATHS - -#define ENEMS_TOUCHED_FRAMES 8 // # frames to stay frozen after hit -//#define ENEMS_RECOIL_ON_HIT 2 // horizontal recoil when hit, #ifdef, value is speed in pixels! -//#define ENEMS_RECOIL_OVER_BOUNDARIES // (x1,y1), (x2,y2) boundaries don't stop a recoil - -//#define ENEMS_ENABLE_DYING_FRAME - -#define ENEMS_EXPLODING_CELL 32 -#define ENEMS_EXPLODING_CELLS_HIDES // Define and the baddie will be substituted by the explosion - -#define ENEMS_OCCLUDING_CELL 33 // If you use pezons or saws you need a flame for occlusion - -// Beware: only activate this if enemies are killable by any means: -//#define ENEMIES_SUFFER_ON_PLAYER_COLLISION - -// Fanties / Homing fanties - -//#define ENABLE_FANTY -//#define ENABLE_HOMING_FANTY - -#define FANTY_BASE_SPRID 32 -#define FANTY_WITH_FACING -#define FANTY_COLLIDES -#define FANTY_KILLED_BY_TILE -//#define FANTY_LIFE_GAUGE 5 // Define if you need these to be tougher - -#define FANTY_A 4 -#define FANTY_MAXV 48 - -#define FANTY_DISTANCE 80 -#define FANTY_V_RETREAT 16 - -// Pursuers (for top-down) - -//#define ENABLE_PURSUERS // If defined, type 7 enemies are active -#define DEATH_COUNT_EXPRESSION 50+(rand8()&63) -#define TYPE_7_FIXED_SPRITE 4 // If defined, type 7 enemies are always # - -// Saws - -//#define ENABLE_SAW -#define SAW_BASE_SPRID 48 -#define SAW_V_DISPL 4 -#define SAW_EMERGING_STEPS 10 - -// Pezons - -//#define ENABLE_PEZONS -#define PEZONS_BASE_SPRID 40 -#define PEZON_WAIT 50 -#define PEZON_THRUST 384 -#define PEZON_VY_FALLING_MAX 256 -#define PEZON_G 16 - -// Chac chacs - -//#define ENABLE_CHAC_CHAC -#define CHAC_CHAC_BASE_TILE 16 -#define CHAC_CHAC_IDLE_2 16 -#define CHAC_CHAC_IDLE_3 1 -#define CHAC_CHAC_IDLE_4 50 - -//#define CHAC_CHAC_FROM_MAP // Chac chacs are not placed as enemies but as tiles -#define MAX_CHAC_CHACS 4 -#define MAX_CHAC_CHACKS_QUEUED 16 // Make the closest power of 2 >= (MAX_CHAC_CHACS*4) -#define CHAC_CHAC_DETECT_TILE 39 -#define CHAC_CHACS_CLEAR // You are placing chac chacks from map but need the path to be clear - -// Monococos - -//#define ENABLE_MONOCOCOS -//#define MONOCOCO_TYPE_A // Comment for 4 cells monococo (appearing/disappearing & hidden) -#define MONOCOCO_BASE_SPRID 56 -#define MONOCOCO_BASE_TIME_HIDDEN 150 -#define MONOCOCO_BASE_TIME_APPEARING 50 -#define MONOCOCO_BASE_TIME_ONBOARD 50 -#define MONOCOCO_FIRE_COCO_AT MONOCOCO_BASE_TIME_ONBOARD/2 - -// Shooties - -//#define ENABLE_SHOOTIES -#define SHOOTIES_BASE_SPRID 40 -#define SHOOTIES_SHOOT_OFFS_X 16 -#define SHOOTIES_SHOOT_OFFS_Y -2 -#define SHOOT_FREQ (pry+23>=en_y[gpit]&&pry<=en_y[gpit]+23&&((en_facing[gpit]&&en_x[gpit]>prx)||(en_facing[gpit]==0&&en_x[gpit]=en_y[gpit]&&pry<=en_y[gpit]+23&&((en_facing[gpit]&&en_x[gpit]>prx)||(en_facing[gpit]==0&&en_x[gpit] inventory (just 1) -#define ONLY_ONE_OBJECT_FLAG 0 // If def, use flag [.] instead of pinv - -// Easy objects mode: A range of hotspot id's are considered -// 'objects'. The user can carry one of those. Contents of hotspots -// can change in this mode. - -//#define ENABLE_EASY_OBJECTS -/* -#define HS_OBJ_EMPTY 4 -#define HS_OBJ_MIN 5 -#define HS_OBJ_MAX 6 -#define HS_USE_OFFS 2 - -#define HS_TYPE_A // If defined, render receptors = HS_OBJ_EMPTY, object used = object - // Otherwise, use its own graphics. -#define HS_FIX_ON_USE // If defined, object N used at N+H_USE_OFFS becomes N+H_USE_OFFS*2 -*/ -// Silly Brawlers -// -------------- -//#define PLAYER_PUNCHES // When on floor -#define PLAYER_PUNCH_OFFS_X 15 -#define PLAYER_PUNCH_OFFS_Y -7 - -//#define PLAYER_KICKS // While airborne -#define PLAYER_KICK_OFFS_X 12 -#define PLAYER_KICK_OFFS_Y -3 - -#define PLAYER_FROZEN_FRAMES 16 // Frames to be frozen when hit landed - -// Shooting behaviour -// ------------------ -//#define PLAYER_CAN_FIRE // If defined, shooting engine is enabled. -#define PLAYER_BULLET_SPEED 4 // Pixels/frame. -#define MAX_BULLETS 4 // Max number of bullets on screen. Be careful!. -#define PLAYER_BULLET_Y_OFFSET 6 // vertical offset from the player's top. -#define PLAYER_BULLET_X_OFFSET -4 // vertical offset from the player's left/right. -//#define PLAYER_BULLETS_MIN_KILLABLE 3 // If defined, only enemies >= N can be killed. -//#define BULLETS_DONT_KILL // Bullets don't kill, but affect enemies otherwise - -// Special shooting -//#define PLAYER_FIRE_RELOAD 16 // If defined # of frames until next shoot -//#define PLAYER_CHARGE_AND_FIRE // If defined, press B to charge, release to fire - #define PLAYER_CHARGE_MIN 8 - #define PLAYER_CHARGE_MAX 48 // Min/max frames for charging -//#define PLAYER_BULLET_LIFE pfiregauge // Max life. Can be whatever. -//#define PLAYER_BULLET_FLICKERS 8 // Bullets flickers for N frames before dying, if defined - -//#define MAX_AMMO 99 // If defined, ammo is not infinite! - #define AMMO_REFILL 50 // type 3 hotspots refill amo, using tile 20 - //#define INITIAL_AMMO 0 // If defined, ammo = X when entering game. - -#define BULLET_PALETTE 3 -#define BULLET_PATTERN 0 // To paint the bullet. Can be an expresion. - -// Scripting -// --------- - -#define ACTIVATE_SCRIPTING // Activates msc scripting and flag related stuff. -//#define CLEAR_FLAGS // Zero all flags when entering a level - -//#define FIRE_ON_KILL // run fire script on enemy kill - -//#define ENABLE_EXTERN_CODE // Enables custom code to be run from the script using EXTERN n -//#define ENABLE_FIRE_ZONE // Allows to define a zone which auto-triggers "FIRE" - -// Interactives -// ------------ - -//#define ENABLE_INTERACTIVES // Graphical flag representations! -#define INTERACTIVES_MAX 4 // As per screen -#define FLAG_INVENTORY 0 -//#define INTERACTIVES_ONLY_SPRITES // If you are using other means for items and just need sprites - -// Top view: -// --------- - -//#define PLAYER_TOP_DOWN // Enable top view. -//#define TOP_OVER_SIDE // UP/DOWN has priority over LEFT/RIGHT - -// Side view: -// ---------- - -#define PLAYER_HAS_JUMP // If defined, player is able to jump. -//#define PLAYER_JUMP_TYPE_MK2 // Use MK2 method for jump / gravity / release -//#define PLAYER_AUTO_JUMP // Automatic jump when hitting the floor -//#define PLAYER_SWIMS // If defined, player swims a la Ninjajar! -//#define PLAYER_HAS_JETPAC // If defined, player can thrust a vertical jetpac -#define PLAYER_STEPS_ON_ENEMS // If defined, stepping on enemies kills them -//#define PLAYER_STEPS_STRICT // Only registers advantage hit when pvy > PLAYER_VY_FALLING_MIN -#define PLAYER_SAFE_LANDING // Step over vertical inverts direction -#define PLAYER_STEPS_MIN_KILLABLE 3 // Only kill enemies with id >= PLAYER_STEPS_MIN_KILLABLE - // 0xff = Nobody - -// ============================================================================ -// III. Screen configuration -// ============================================================================ - -// This sections defines how stuff is rendered, where to show counters, etcetera - -#define LIFE_X 29 // -#define LIFE_Y 3 // Life gauge counter character coordinates - -#define OBJECTS_X 20 // -#define OBJECTS_Y 4 // Objects counter character coordinates -#define OBJECTS_REMAINING // Show # remaining instead of got - -#define KEYS_X 29 // -#define KEYS_Y 4 // Keys counter character coordinates - -#define KILLED_X 20 // -#define KILLED_Y 3 // Kills counter character coordinates - -//#define AMMO_X 8 // -//#define AMMO_Y 2 // Ammo counter character coordinates - -#define HS_INV_X 56 // -#define HS_INV_Y 15 // Object you are carrying - -//#define TIMER_X 0 // -//#define TIMER_Y 5 // Current timer value - -// Text -//#define LINE_OF_TEXT 26 // If defined, scripts can show text @ Y = # -//#define LINE_OF_TEXT_X 1 // X coordinate. - -// ============================================================================ -// IV. Player movement configuration -// ============================================================================ - -// This section is used to define which constants are used in the gravity/acceleration engine. -// If a side-view engine is configured, we have to define vertical and horizontal constants -// separately. If a top-view engine is configured instead, the horizontal values are also -// applied to the vertical component, vertical values are ignored. - -// IV.1. Vertical movement. Only for side-view. - -#define PLAYER_VY_FALLING_MAX 256 // Max. velocity when falling -#define PLAYER_VY_FALLING_MIN 64 // Use for animating if you need -#define PLAYER_VY_SINKING 2 -#define PLAYER_G 16 // Gravity - -#define PLAYER_VY_JUMP_INITIAL 64 -#define PLAYER_VY_JUMP_MAX 192 // Max. velocity when jumping -#define PLAYER_AY_JUMP 12 // Jumpin acceleration - -#define PLAYER_AY_JETPAC 32 // Jetpac increment -#define PLAYER_VY_JETPAC_MAX 256 // Max jetpac vertical speed - -#define PLAYER_AY_SWIM 8 // Swimming acceleration. -#define PLAYER_VY_SWIM_MAX 64 // Swimming max. speed - -#define PLAYER_VY_LADDERS 96 - -#define PLAYER_AY_FLOAT 16 -#define PLAYER_VY_FLOAT_MAX 256 - -#define PLAYER_AY_UNTHRUST 8 // Used in the Autojump engine. - -// IV.1.b MK2 style jump (overrides PLAYER_?Y_JUMP_* defined before!) -// (Used if PLAYER_JUMP_TYPE_MK2 is defined) -#define PLAYER_G_MK2_JUMPING 4 -#define PLAYER_VY_MK2_JUMP_INITIAL 208 -#define PLAYER_VY_MK2_JUMP_RELEASE 96 -#define PLAYER_VY_MK2_JUMP_A_STEPS 16 - -// IV.2. Horizontal (side view) or general (top view) movement. - -#define PLAYER_VX_MAX 128 // Max. horizontal speed -#define PLAYER_VX_CONVEYORS 64 -#define PLAYER_AX 16 // Horizontal acceleration -#define PLAYER_AX_ICE 4 -#define PLAYER_RX 8 // Horizontal friction -#define PLAYER_RX_ICE 2 - -#define PLAYER_VX_MIN (PLAYER_AX << 2) - -#define PLAYER_V_REBOUND 224 - -// Animation cells - -#ifdef PLAYER_TOP_DOWN - - // Cell definitions for top-down view - - #define CELL_FACING_RIGHT 0 - #define CELL_FACING_LEFT 6 - #define CELL_FACING_UP 18 - #define CELL_FACING_DOWN 12 - - #define CELL_IDLE 0 - #define CELL_WALK_CYCLE 1 - #define CELL_PUSHING 5 - - #define CELL_USE 24 - -#else - - // Cell definitions for side view - - #define CELL_FACING_RIGHT 0 - #define CELL_FACING_LEFT 8 - - #define CELL_IDLE 0 - #define CELL_WALK_INIT 1 - #define CELL_WALK_CYCLE 1 - #define CELL_AIRBORNE 5 - #define CELL_ASCENDING 5 - #define CELL_DESCENDING 6 - - #define CELL_SWIM_CYCLE 6 - - #define CELL_USE 6 - - #define CELL_PUNCHING 8 - #define CELL_KICKING 9 - - #define CELL_CLIMB_CYCLE 20 - #define CELL_CLIMB_HALF 29 -#endif - -// Music - -#define MUSIC_INGAME 0 - -// SFX - -#define SFX_START 0 -#define SFX_TILE 1 -#define SFX_OBJECT 2 -#define SFX_USE 3 -#define SFX_PHIT 4 -#define SFX_DUMMY1 5 -#define SFX_ENHIT 6 -#define SFX_DUMMY2 7 -#define SFX_JUMP 8 -#define SFX_BULLET 9 -#define SFX_COCO 10 -#define SFX_SPRING 11 -#define SFX_COUNT 12 -#define SFX_BREAKH 13 -#define SFX_HITTER 14 -#define SFX_STEPON 15 -#define SFX_FLOAT 16 -#define SFX_BREAKB 17 diff --git "a/examples/11_boot\303\250e/dev/config.h.bak" "b/examples/11_boot\303\250e/dev/config.h.bak" deleted file mode 100644 index 353abb2..0000000 --- "a/examples/11_boot\303\250e/dev/config.h.bak" +++ /dev/null @@ -1,625 +0,0 @@ -// NES MK1 v1.0 -// Copyleft Mojon Twins 2013, 2015, 2017, 2018 - -//#define GAME_AREA_TOP -//#define GAME_AREA_MIDDLE -//#define GAME_AREA_BOTTOM -#define GAME_AREA_CUSTOM - -// ============================================================================ -// I. General configuration -// ============================================================================ - -// In this section we define map dimmensions, initial and authomatic ending conditions, etc. - -#define MAP_W 6 // -#define MAP_H 5 // Map dimensions in screens -#define MAP_SIZE MAP_W*MAP_H - -#define PLAYER_LIFE 5 // Max / Initial life -#define PLAYER_REFILL 1 // Life refill - -#define MULTI_LEVEL // Comment for single level -#define MAX_LEVELS 3 - -#define MAX_FLAGS 2 // Keep it low if you don't need flags - -#ifndef MULTI_LEVEL - - // If you aim for a single level ROM, fill in those: - - #define SCR_INI 0 // Initial screen - #define PLAYER_INI_X 10 // - #define PLAYER_INI_Y 2 // Initial position - //#define SCR_END 99 // Final screen, undefine if N/A - #define PLAYER_END_X 99 // - #define PLAYER_END_Y 99 // Ending position - #define PLAYER_MAX_OBJECTS 20 // Objects to finish game - -#else - - // If you want multiple levels, please don't touch this much. - // Just comment SCR_END and / or PLAYER_MAX_OBJECTS if N/A. - // You should be fiddling with assets/levelset.h - - #define SCR_INI (l_scr_ini [level]) - #define PLAYER_INI_X (l_ini_x [level]) - #define PLAYER_INI_Y (l_ini_y [level]) - //#define SCR_END (l_scr_end [level]) - #define PLAYER_END_X (l_end_x [level]) - #define PLAYER_END_Y (l_end_y [level]) - #define PLAYER_MAX_OBJECTS (l_player_max_objects [level]) - -#endif - -// Some flexibility -#define HOTSPOT_TYPE_OBJECT 1 -#define HOTSPOT_TYPE_KEYS 2 -#define HOTSPOT_TYPE_REFILL 3 -//#define HOTSPOT_TYPE_AMMO 4 -//#define HOTSPOT_TYPE_TIME 5 // For time refills - -//#define HOTSPOT_TYPE_RESONATOR 4 // An example of custom hotspot - -#define HOTSPOT_TYPE_STAR 4 // Stars are extra collectibles - -#define WIN_LEVEL_CUSTOM // A level ends when win_level == 1 - // And such a thing has to be setup by YOU - -//#define MAP_FORMAT_PACKED // Each byte in map data = 2 tiles, 16 tiles max. -//#define MAP_FORMAT_RLE16 // RLE'd by rlemap2. 16 tiles max. -#define MAP_FORMAT_RLE53 // RLE'd by rle53mapMK1. 32 tiles max. -//#define MAP_FORMAT_RLE44 // RLE'd by rle44mapMK1. 16 tiles max. -//#define MAP_FORMAT_RLE53_CHRROM // RLE'd by rle53mapchrrom and stored in CHR-ROM. 32 tiles max. -//#define MAP_FORMAT_RLE44_CHRROM // RLE'd by rle44mapchrrom and stored in CHR-ROM. 16 tiles max. - -//#define MAP_WITH_DECORATIONS // Add decorations when use a 16 tiles mode. - -// Use the complex renderer if you need to post-process the map buffer before -// printing. - -#define MAP_RENDERER_COMPLEX // Comment for the simple, old renderer - -// ============================================================================ -// II. Engine type -// ============================================================================ - -// This section is used to define the game engine behaviour. Many directives are related, -// and others are mutually exclusive. I think this will be pretty obvious when you look at them. - -// Right now the shooting engine is only compatible with the side-view engine. - -// Bounding box size -// ----------------- - -// Player is 8x16 for collision with BG but can be made taller by this amount. Negative values=shorter -#define PLAYER_COLLISION_VSTRETCH_BG -4 - -// This defines how the player will collide with enemies. -// Player is always 8 pixels wide and 16 pixel tall PLUS the value of this variable. -// this offset goes to the head. -// So if you define it as -8, the collision box will be 8x8 bottom centerd. -// And if you define it as 4 the collision box will be 8x20 bottom centered. -// For 16x24 sprites it's safe to leave it at 0. For 16x16 should be better -2. -#define PLAYER_COLLISION_VSTRETCH_FG -4 - -// Same for enemies. -// I usually leave it at 0 for <=24 pixels tall, 8 for 32 pixels tall. -#define ENEMS_COLLISION_VSTRETCH_FG 0 - -// General directives: -// ------------------- - -// Push boxes - -//#define PLAYER_PUSH_BOXES // If defined, tile #14 is pushable -#define FIRE_TO_PUSH - -//#define ENABLE_PUSHED_SCRIPT -#define PUSHED_TILE_FLAG 1 -#define PUSHED_TO_X_FLAG 2 -#define PUSHED_TO_Y_FLAG 3 - -// General stuff - -//#define DEACTIVATE_KEYS // If defined, keys are not present. -//#define DEACTIVATE_OBJECTS // If defined, objects are not present. -#define PLAYER_BOUNCES -//#define DOUBLE_BOUNCE -//#define DIE_AND_RESPAWN // If defined, dying = respawn on latest safe. -//#define DIE_AND_REENTER // ... also, reenter screen on death -#define PLAYER_FLICKERS // If defined, collisions make player flicker instead. -#define WALLS_STOP_ENEMIES // If defined, enemies react to the scenary - -// Extra special tiles -// ------------------- - -#define NO_HORIZONTAL_EVIL_TILE // Only check for evil tiles vertically - -// Quicksands, beh == 2. -// For player movement values, see section 4 -// (PLAYER_VY_SINKING) - -//#define ENABLE_QUICKSANDS - -// Breakable, beh & 16 -//#define ENABLE_BREAKABLE // Breakable walls -#define BREAKABLE_LIFE 2 // Amount of hits to break wall -#define BREAKABLE_ANIM // Show explosion when breaking -#define BREAKABLE_MAX 4 // Max # of concurrent explosions -#define BREAKABLE_MAX_FRAMES 8 // Frames to show explosion -#define BREAKABLE_ERASE 0 // Tile to erase broken tiles -#define BREAKABLE_BREAKING 8 // Tile to display while breaking -//#define BREAKABLE_WALKABLE // If defined (side view), tiles break when stepped on - -// Conveyors, beh & 32 [+1] (must be & 8!) -// For player movement values, see section 4 -// (PLAYER_VX_CONVEYORS) - -//#define ENABLE_CONVEYORS - -// Slippery, beh & 64. (must be & 12!) -// For player movement values, see section 4 -// (PLAYER_AX_ICE & PLAYER_RX_ICE) - -//#define ENABLE_SLIPPERY - -// Ladders, beh == 32 - -//#define ENABLE_LADDERS - -// Extra special stuff -// ------------------- - -// Propellers - -//#define ENABLE_PROPELLERS -#define PROPELLERS_MAX 4 -#define PROPELLERS_BASE_PATTERN 64 // First of 4 patterns to draw/animate propellers -#define PROPELLERS_MAX_LENGTH 6 // In tiles; undef for infinite -#define PROPELLER_TILE 14 // Tile # in map to detect a propeller -#define PROPELLERS_ON_BY_DEFAULT // Define so propellers are on by default - -// Killing tiles shine, beware! - -//#define ENABLE_SHINES -#define SHINES_MAX 8 -#define SHINES_BASE_PATTERN 10 // In the sprite bank, two patterns needed -#define SHINES_PALETTE 3 -#define SHINING_TILE 23 // Tile # in map to add shines - -// Resonators. Not sure if you need this, but. - -//#define ENABLE_RESONATORS -#define RESONATOR_BASE_PATTERN 0 -#define RESONATOR_PALETTE 3 -#define RESONATOR_COUNTER_OFFS_X 4 -#define RESONATOR_COUNTER_OFFS_Y 7 -//#define RESONATOR_CHANGE_BG_PAL paltsgrey // Define to change pal for this palette -//#define RESONATOR_CHANGE_SPR_PAL palssgrey // Define to change pal for this palette - -// Simple warpers. Put as 0xff type enemies. -// Destination is attr:s1 (n_pant:YX). - -//#define ENABLE_SIMPLE_WARPERS -#define SIMPLE_WARPERS_BASE_SPRID (32+((frame_counter>>2)&3)) -//#define SIMPLE_WARPERS_FIRE_BUTTON - -// No! - -#define ENABLE_NO -#define NO_METASPRITE ssit_04 -#define NO_OFFS_X 0 -#define NO_OFFS_Y -24 - -// Use animation. -// Note: When activated hotspots need b_button press and, in side view, possee. - -//#define ENABLE_USE_ANIM -#define USE_ANIM_MAX_FRAMES 13 -#define USE_ANIM_INTERACT_ON 7 -#define USE_ANIM_FRAMES_PER_STEP 4 - -// Text boxes. If you need them, you call them - -//#define ENABLE_TEXT_BOX -#define TEXT_BOX_FRAME_TILE_OFFSET 0x20 // We need tiles in the active metatileset to draw the frame -//#define TEXT_BOX_WITH_PORTRAITS // Draw spr_hs [rdd] if != 0 in the text box if defined -//#define TEXT_BOX_DIALOGUES // Add code for dialogues - -// Timer. - -//#define ENABLE_TIMER -#define TIMER_INITIAL 99 -#define TIMER_START_ON -#define TIMER_REFILL 30 -//#define TIMER_RESET_ON_ENTER -//#define TIMER_TIME_FLAG 0 // Useful with scripting. Copies time to flag -//#define TIMER_ZERO_FLAG 1 // Useful with scripting. raises flag when time zero -#define TIMER_SOUND 10 // play a sound if timer < value - -// Springs - -//#define ENABLE_SPRINGS -#define SPRING_TILE 10 -#define SPRING_SPIKE_TILE 11 -//#define SPRINGS_ON_BY_DEFAULT - -// Enemy types and definitions -// --------------------------- - -//#define ENEMS_IN_CHRROM // Enems are stored somewhere in CHR-ROM - -#define ENEMS_LIFE_GAUGE 1 // Amount of shots/punches/kicks needed to kill enemies. -#define ENEMS_FLICKER // Ifdef: flicker, if not: explosion -#define ENEMS_FLICKER_ONLY_ON_DYING // Flicker, but only when life == 0 -//#define ENEMS_CAN_RESPAWN // Read docs for this. - -#define PERSISTENT_ENEMIES -//#define PERSISTENT_DEATHS - -#define ENEMS_TOUCHED_FRAMES 8 // # frames to stay frozen after hit -#define ENEMS_RECOIL_ON_HIT 2 // horizontal recoil when hit, #ifdef, value is speed in pixels! -#define ENEMS_RECOIL_OVER_BOUNDARIES // (x1,y1), (x2,y2) boundaries don't stop a recoil - -//#define ENEMS_ENABLE_DYING_FRAME - -#define ENEMS_EXPLODING_CELL 32 -#define ENEMS_EXPLODING_CELLS_HIDES // Define and the baddie will be substituted by the explosion - -#define ENEMS_OCCLUDING_CELL 33 // If you use pezons or saws you need a flame for occlusion - -// Beware: only activate this if enemies are killable by any means: -//#define ENEMIES_SUFFER_ON_PLAYER_COLLISION - -// Fanties / Homing fanties - -//#define ENABLE_FANTY -//#define ENABLE_HOMING_FANTY - -#define FANTY_BASE_SPRID 32 -#define FANTY_WITH_FACING -#define FANTY_COLLIDES -#define FANTY_KILLED_BY_TILE -//#define FANTY_LIFE_GAUGE 5 // Define if you need these to be tougher - -#define FANTY_A 4 -#define FANTY_MAXV 48 - -#define FANTY_DISTANCE 80 -#define FANTY_V_RETREAT 16 - -// Pursuers (for top-down) - -//#define ENABLE_PURSUERS // If defined, type 7 enemies are active -#define DEATH_COUNT_EXPRESSION 50+(rand8()&63) -#define TYPE_7_FIXED_SPRITE 4 // If defined, type 7 enemies are always # - -// Saws - -//#define ENABLE_SAW -#define SAW_BASE_SPRID 48 -#define SAW_V_DISPL 4 -#define SAW_EMERGING_STEPS 10 - -// Pezons - -//#define ENABLE_PEZONS -#define PEZONS_BASE_SPRID 40 -#define PEZON_WAIT 50 -#define PEZON_THRUST 384 -#define PEZON_VY_FALLING_MAX 256 -#define PEZON_G 16 - -// Chac chacs - -//#define ENABLE_CHAC_CHAC -#define CHAC_CHAC_BASE_TILE 16 -#define CHAC_CHAC_IDLE_2 16 -#define CHAC_CHAC_IDLE_3 1 -#define CHAC_CHAC_IDLE_4 50 - -//#define CHAC_CHAC_FROM_MAP // Chac chacs are not placed as enemies but as tiles -#define MAX_CHAC_CHACS 4 -#define MAX_CHAC_CHACKS_QUEUED 16 // Make the closest power of 2 >= (MAX_CHAC_CHACS*4) -#define CHAC_CHAC_DETECT_TILE 39 -#define CHAC_CHACS_CLEAR // You are placing chac chacks from map but need the path to be clear - -// Monococos - -//#define ENABLE_MONOCOCOS -//#define MONOCOCO_TYPE_A // Comment for 4 cells monococo (appearing/disappearing & hidden) -#define MONOCOCO_BASE_SPRID 56 -#define MONOCOCO_BASE_TIME_HIDDEN 150 -#define MONOCOCO_BASE_TIME_APPEARING 50 -#define MONOCOCO_BASE_TIME_ONBOARD 50 -#define MONOCOCO_FIRE_COCO_AT MONOCOCO_BASE_TIME_ONBOARD/2 - -// Shooties - -//#define ENABLE_SHOOTIES -#define SHOOTIES_BASE_SPRID 40 -#define SHOOTIES_SHOOT_OFFS_X 16 -#define SHOOTIES_SHOOT_OFFS_Y -2 -#define SHOOT_FREQ (pry+23>=en_y[gpit]&&pry<=en_y[gpit]+23&&((en_facing[gpit]&&en_x[gpit]>prx)||(en_facing[gpit]==0&&en_x[gpit]=en_y[gpit]&&pry<=en_y[gpit]+23&&((en_facing[gpit]&&en_x[gpit]>prx)||(en_facing[gpit]==0&&en_x[gpit] inventory (just 1) -//#define ONLY_ONE_OBJECT_FLAG 0 // If def, use flag [.] instead of pinv - -// Easy objects mode: A range of hotspot id's are considered -// 'objects'. The user can carry one of those. Contents of hotspots -// can change in this mode. - -//#define ENABLE_EASY_OBJECTS - -#define HS_OBJ_EMPTY 4 -#define HS_OBJ_MIN 5 -#define HS_OBJ_MAX 6 -#define HS_USE_OFFS 2 - -#define HS_TYPE_A // If defined, render receptors = HS_OBJ_EMPTY, object used = object - // Otherwise, use its own graphics. -#define HS_FIX_ON_USE // If defined, object N used at N+H_USE_OFFS becomes N+H_USE_OFFS*2 - -// Silly Brawlers -// -------------- -//#define PLAYER_PUNCHES // When on floor -#define PLAYER_PUNCH_OFFS_X 15 -#define PLAYER_PUNCH_OFFS_Y -7 - -//#define PLAYER_KICKS // While airborne -#define PLAYER_KICK_OFFS_X 12 -#define PLAYER_KICK_OFFS_Y -3 - -#define PLAYER_FROZEN_FRAMES 16 // Frames to be frozen when hit landed - -// Shooting behaviour -// ------------------ -#define PLAYER_CAN_FIRE // If defined, shooting engine is enabled. -#define PLAYER_BULLET_SPEED 4 // Pixels/frame. -#define MAX_BULLETS 2 // Max number of bullets on screen. Be careful!. -#define PLAYER_BULLET_Y_OFFSET 6 // vertical offset from the player's top. -#define PLAYER_BULLET_X_OFFSET -4 // vertical offset from the player's left/right. -//#define PLAYER_BULLETS_MIN_KILLABLE 4 // If defined, only enemies >= N can be killed. -#define BULLETS_DONT_KILL // Bullets don't kill, but affect enemies otherwise - -// Special shooting -#define PLAYER_FIRE_RELOAD 16 // If defined # of frames until next shoot -#define PLAYER_CHARGE_AND_FIRE // If defined, press B to charge, release to fire - #define PLAYER_CHARGE_MIN 8 - #define PLAYER_CHARGE_MAX 47 // Min/max frames for charging -#define PLAYER_BULLET_LIFE pfiregauge // Max life. Can be whatever. -#define PLAYER_BULLET_FLICKERS 8 // Bullets flickers for N frames before dying, if defined - -//#define MAX_AMMO 99 // If defined, ammo is not infinite! - #define AMMO_REFILL 50 // type 3 hotspots refill amo, using tile 20 - //#define INITIAL_AMMO 0 // If defined, ammo = X when entering game. - -#define BULLET_PALETTE 3 -#define BULLET_PATTERN 63 // To paint the bullet. Can be an expresion. - -// Scripting -// --------- - -//#define ACTIVATE_SCRIPTING // Activates msc scripting and flag related stuff. -//#define CLEAR_FLAGS // Zero all flags when entering a level - -//#define FIRE_ON_KILL // run fire script on enemy kill - -//#define ENABLE_EXTERN_CODE // Enables custom code to be run from the script using EXTERN n -//#define ENABLE_FIRE_ZONE // Allows to define a zone which auto-triggers "FIRE" - -// Interactives -// ------------ - -//#define ENABLE_INTERACTIVES // Graphical flag representations! -#define INTERACTIVES_MAX 4 // As per screen -#define FLAG_INVENTORY 0 -//#define INTERACTIVES_ONLY_SPRITES // If you are using other means for items and just need sprites - -// Top view: -// --------- - -//#define PLAYER_TOP_DOWN // Enable top view. -//#define TOP_OVER_SIDE // UP/DOWN has priority over LEFT/RIGHT - -// Side view: -// ---------- - -//#define PLAYER_HAS_JUMP // If defined, player is able to jump. -//#define PLAYER_JUMP_TYPE_MK2 // Use MK2 method for jump / gravity / release -#define PLAYER_AUTO_JUMP // Automatic jump when hitting the floor -//#define PLAYER_SWIMS // If defined, player swims a la Ninjajar! -//#define PLAYER_HAS_JETPAC // If defined, player can thrust a vertical jetpac -#define PLAYER_STEPS_ON_ENEMS // If defined, stepping on enemies kills them -//#define PLAYER_STEPS_STRICT // Only registers advantage hit when pvy > PLAYER_VY_FALLING_MIN -#define PLAYER_SAFE_LANDING // Step over vertical inverts direction -#define PLAYER_STEPS_MIN_KILLABLE 0xff // Only kill enemies with id >= PLAYER_BULLETS_MIN_KILLABLE - // 0xff = Nobody - -// ============================================================================ -// III. Screen configuration -// ============================================================================ - -// This sections defines how stuff is rendered, where to show counters, etcetera - -#define LIFE_X 4 // -#define LIFE_Y 4 // Life gauge counter character coordinates - -#define OBJECTS_X 28 // -#define OBJECTS_Y 4 // Objects counter character coordinates -#define OBJECTS_REMAINING // Show # remaining instead of got - -#define KEYS_X 16 // -#define KEYS_Y 4 // Keys counter character coordinates - -//#define KILLED_X 16 // -//#define KILLED_Y 2 // Kills counter character coordinates - -//#define AMMO_X 8 // -//#define AMMO_Y 2 // Ammo counter character coordinates - -//#define HS_INV_X 136 // -//#define HS_INV_Y 11 // Object you are carrying - -//#define TIMER_X 0 // -//#define TIMER_Y 5 // Current timer value - -// Text -//#define LINE_OF_TEXT 26 // If defined, scripts can show text @ Y = # -//#define LINE_OF_TEXT_X 1 // X coordinate. - -// ============================================================================ -// IV. Player movement configuration -// ============================================================================ - -// This section is used to define which constants are used in the gravity/acceleration engine. -// If a side-view engine is configured, we have to define vertical and horizontal constants -// separately. If a top-view engine is configured instead, the horizontal values are also -// applied to the vertical component, vertical values are ignored. - -// IV.1. Vertical movement. Only for side-view. - -#define PLAYER_VY_FALLING_MAX 256 // Max. velocity when falling -#define PLAYER_VY_FALLING_MIN 64 // Use for animating if you need -#define PLAYER_VY_SINKING 2 -#define PLAYER_G 16 // Gravity - -#define PLAYER_VY_JUMP_INITIAL 96 -#define PLAYER_VY_JUMP_MAX 256 // Max. velocity when jumping -#define PLAYER_AY_JUMP 16 // Jumpin acceleration - -#define PLAYER_AY_JETPAC 32 // Jetpac increment -#define PLAYER_VY_JETPAC_MAX 256 // Max jetpac vertical speed - -#define PLAYER_AY_SWIM 8 // Swimming acceleration. -#define PLAYER_VY_SWIM_MAX 64 // Swimming max. speed - -#define PLAYER_VY_LADDERS 96 - -#define PLAYER_AY_FLOAT 16 -#define PLAYER_VY_FLOAT_MAX 256 - -#define PLAYER_AY_UNTHRUST 8 // Used in the Autojump engine. - -// IV.1.b MK2 style jump (overrides PLAYER_?Y_JUMP_* defined before!) -// (Used if PLAYER_JUMP_TYPE_MK2 is defined) -#define PLAYER_G_MK2_JUMPING 4 -#define PLAYER_VY_MK2_JUMP_INITIAL 208 -#define PLAYER_VY_MK2_JUMP_RELEASE 96 -#define PLAYER_VY_MK2_JUMP_A_STEPS 16 - -// IV.2. Horizontal (side view) or general (top view) movement. - -#define PLAYER_VX_MAX 128 // Max. horizontal speed -#define PLAYER_VX_CONVEYORS 64 -#define PLAYER_AX 16 // Horizontal acceleration -#define PLAYER_AX_ICE 4 -#define PLAYER_RX 16 // Horizontal friction -#define PLAYER_RX_ICE 2 - -#define PLAYER_VX_MIN (PLAYER_AX << 1) - -#define PLAYER_V_REBOUND 224 - -// Animation cells - -#ifdef PLAYER_TOP_DOWN - - // Cell definitions for top-down view - - #define CELL_FACING_RIGHT 0 - #define CELL_FACING_LEFT 6 - #define CELL_FACING_UP 18 - #define CELL_FACING_DOWN 12 - - #define CELL_IDLE 0 - #define CELL_WALK_CYCLE 1 - #define CELL_PUSHING 5 - - #define CELL_USE 24 - -#else - - // Cell definitions for side view - - #define CELL_FACING_RIGHT 0 - #define CELL_FACING_LEFT 8 - - #define CELL_IDLE 0 - #define CELL_WALK_INIT 1 - #define CELL_WALK_CYCLE 1 - #define CELL_AIRBORNE 5 - #define CELL_ASCENDING 5 - #define CELL_DESCENDING 6 - - #define CELL_SWIM_CYCLE 6 - - #define CELL_USE 6 - - #define CELL_PUNCHING 8 - #define CELL_KICKING 9 - - #define CELL_CLIMB_CYCLE 20 - #define CELL_CLIMB_HALF 29 -#endif - -// Music - -#define MUSIC_INGAME 0 - -// SFX - -#define SFX_START 0 -#define SFX_TILE 1 -#define SFX_OBJECT 2 -#define SFX_USE 3 -#define SFX_PHIT 4 -#define SFX_DUMMY1 5 -#define SFX_ENHIT 6 -#define SFX_DUMMY2 7 -#define SFX_JUMP 8 -#define SFX_BULLET 9 -#define SFX_COCO 10 -#define SFX_SPRING 11 -#define SFX_COUNT 12 -#define SFX_BREAKH 13 -#define SFX_HITTER 14 -#define SFX_STEPON 15 -#define SFX_FLOAT 16 -#define SFX_BREAKB 17 diff --git a/src/dev/config.h.bak b/src/dev/config.h.bak deleted file mode 100644 index e76bf88..0000000 --- a/src/dev/config.h.bak +++ /dev/null @@ -1,624 +0,0 @@ -// NES MK1 v1.0 -// Copyleft Mojon Twins 2013, 2015, 2017, 2018 - -//#define GAME_AREA_TOP -#define GAME_AREA_MIDDLE -//#define GAME_AREA_BOTTOM -//#define GAME_AREA_CUSTOM - -// ============================================================================ -// I. General configuration -// ============================================================================ - -// In this section we define map dimmensions, initial and authomatic ending conditions, etc. - -#define MAP_W 3 // -#define MAP_H 3 // Map dimensions in screens -#define MAP_SIZE MAP_W*MAP_H - -#define PLAYER_LIFE 5 // Max / Initial life -#define PLAYER_REFILL 1 // Life refill - -//#define MULTI_LEVEL // Comment for single level -#define MAX_LEVELS 1 - -#define MAX_FLAGS 2 // Keep it low if you don't need flags - -#ifndef MULTI_LEVEL - - // If you aim for a single level ROM, fill in those: - - #define SCR_INI 0 // Initial screen - #define PLAYER_INI_X 2 // - #define PLAYER_INI_Y 2 // Initial position - //#define SCR_END 99 // Final screen, undefine if N/A - #define PLAYER_END_X 99 // - #define PLAYER_END_Y 99 // Ending position - #define PLAYER_MAX_OBJECTS 1 // Objects to finish game - -#else - - // If you want multiple levels, please don't touch this much. - // Just comment SCR_END and / or PLAYER_MAX_OBJECTS if N/A. - // You should be fiddling with assets/levelset.h - - #define SCR_INI (l_scr_ini [level]) - #define PLAYER_INI_X (l_ini_x [level]) - #define PLAYER_INI_Y (l_ini_y [level]) - //#define SCR_END (l_scr_end [level]) - #define PLAYER_END_X (l_end_x [level]) - #define PLAYER_END_Y (l_end_y [level]) - #define PLAYER_MAX_OBJECTS (l_player_max_objects [level]) - -#endif - -// Some flexibility -#define HOTSPOT_TYPE_OBJECT 1 -#define HOTSPOT_TYPE_KEYS 2 -#define HOTSPOT_TYPE_REFILL 3 -//#define HOTSPOT_TYPE_AMMO 4 -//#define HOTSPOT_TYPE_TIME 5 // For time refills - -//#define HOTSPOT_TYPE_RESONATOR 4 // An example of custom hotspot - -//#define WIN_LEVEL_CUSTOM // A level ends when win_level == 1 - // And such a thing has to be setup by YOU - -//#define MAP_FORMAT_PACKED // Each byte in map data = 2 tiles, 16 tiles max. -//#define MAP_FORMAT_RLE16 // RLE'd by rlemap2. 16 tiles max. -#define MAP_FORMAT_RLE53 // RLE'd by rle53mapMK1. 32 tiles max. -//#define MAP_FORMAT_RLE44 // RLE'd by rle44mapMK1. 16 tiles max. -//#define MAP_FORMAT_RLE53_CHRROM // RLE'd by rle53mapchrrom and stored in CHR-ROM. 32 tiles max. -//#define MAP_FORMAT_RLE44_CHRROM // RLE'd by rle44mapchrrom and stored in CHR-ROM. 16 tiles max. - -//#define MAP_WITH_DECORATIONS // Add decorations when use a 16 tiles mode. - -// Use the complex renderer if you need to post-process the map buffer before -// printing. - -#define MAP_RENDERER_COMPLEX // Comment for the simple, old renderer - -// ============================================================================ -// II. Engine type -// ============================================================================ - -// This section is used to define the game engine behaviour. Many directives are related, -// and others are mutually exclusive. I think this will be pretty obvious when you look at them. - -// Right now the shooting engine is only compatible with the side-view engine. - -// Bounding box size -// ----------------- - -// Player is 8x16 for collision with BG but can be made taller by this amount. Negative values=shorter -#define PLAYER_COLLISION_VSTRETCH_BG -4 - -// This defines how the player will collide with enemies. -// Player is always 8 pixels wide and 16 pixel tall PLUS the value of this variable. -// this offset goes to the head. -// So if you define it as -8, the collision box will be 8x8 bottom centerd. -// And if you define it as 4 the collision box will be 8x20 bottom centered. -// For 16x24 sprites it's safe to leave it at 0. For 16x16 should be better -2. -#define PLAYER_COLLISION_VSTRETCH_FG -4 - -// Same for enemies. -// I usually leave it at 0 for <=24 pixels tall, 8 for 32 pixels tall. -#define ENEMS_COLLISION_VSTRETCH_FG 0 - -// General directives: -// ------------------- - -// Push boxes - -//#define PLAYER_PUSH_BOXES // If defined, tile #14 is pushable -#define FIRE_TO_PUSH - -//#define ENABLE_PUSHED_SCRIPT -#define PUSHED_TILE_FLAG 1 -#define PUSHED_TO_X_FLAG 2 -#define PUSHED_TO_Y_FLAG 3 - -// General stuff - -#define DEACTIVATE_KEYS // If defined, keys are not present. -//#define DEACTIVATE_OBJECTS // If defined, objects are not present. -//#define PLAYER_BOUNCES -//#define DOUBLE_BOUNCE -#define DIE_AND_RESPAWN // If defined, dying = respawn on latest safe. -//#define DIE_AND_REENTER // ... also, reenter screen on death -#define PLAYER_FLICKERS // If defined, collisions make player flicker instead. -//#define WALLS_STOP_ENEMIES // If defined, enemies react to the scenary - -// Extra special tiles -// ------------------- - -#define NO_HORIZONTAL_EVIL_TILE // Only check for evil tiles vertically - -// Quicksands, beh == 2. -// For player movement values, see section 4 -// (PLAYER_VY_SINKING) - -//#define ENABLE_QUICKSANDS - -// Breakable, beh & 16 -//#define ENABLE_BREAKABLE // Breakable walls -#define BREAKABLE_LIFE 2 // Amount of hits to break wall -#define BREAKABLE_ANIM // Show explosion when breaking -#define BREAKABLE_MAX 4 // Max # of concurrent explosions -#define BREAKABLE_MAX_FRAMES 8 // Frames to show explosion -#define BREAKABLE_ERASE 0 // Tile to erase broken tiles -#define BREAKABLE_BREAKING 8 // Tile to display while breaking -//#define BREAKABLE_WALKABLE // If defined (side view), tiles break when stepped on - -// Conveyors, beh & 32 [+1] (must be & 8!) -// For player movement values, see section 4 -// (PLAYER_VX_CONVEYORS) - -//#define ENABLE_CONVEYORS - -// Slippery, beh & 64. (must be & 12!) -// For player movement values, see section 4 -// (PLAYER_AX_ICE & PLAYER_RX_ICE) - -//#define ENABLE_SLIPPERY - -// Ladders, beh == 32 - -//#define ENABLE_LADDERS - -// Extra special stuff -// ------------------- - -// Propellers - -//#define ENABLE_PROPELLERS -#define PROPELLERS_MAX 4 -#define PROPELLERS_BASE_PATTERN 64 // First of 4 patterns to draw/animate propellers -#define PROPELLERS_MAX_LENGTH 6 // In tiles; undef for infinite -#define PROPELLER_TILE 14 // Tile # in map to detect a propeller -#define PROPELLERS_ON_BY_DEFAULT // Define so propellers are on by default - -// Killing tiles shine, beware! - -//#define ENABLE_SHINES -#define SHINES_MAX 8 -#define SHINES_BASE_PATTERN 10 // In the sprite bank, two patterns needed -#define SHINES_PALETTE 3 -#define SHINING_TILE 23 // Tile # in map to add shines - -// Resonators. Not sure if you need this, but. - -//#define ENABLE_RESONATORS -#define RESONATOR_BASE_PATTERN 0 -#define RESONATOR_PALETTE 3 -#define RESONATOR_COUNTER_OFFS_X 4 -#define RESONATOR_COUNTER_OFFS_Y 7 -//#define RESONATOR_CHANGE_BG_PAL paltsgrey // Define to change pal for this palette -//#define RESONATOR_CHANGE_SPR_PAL palssgrey // Define to change pal for this palette - -// Simple warpers. Put as 0xff type enemies. -// Destination is attr:s1 (n_pant:YX). - -//#define ENABLE_SIMPLE_WARPERS -#define SIMPLE_WARPERS_BASE_SPRID (32+((frame_counter>>2)&3)) -//#define SIMPLE_WARPERS_FIRE_BUTTON - -// No! - -//#define ENABLE_NO -#define NO_METASPRITE ssit_06 -#define NO_OFFS_X 0 -#define NO_OFFS_Y -24 - -// Use animation. -// Note: When activated hotspots need b_button press and, in side view, possee. - -//#define ENABLE_USE_ANIM -#define USE_ANIM_MAX_FRAMES 13 -#define USE_ANIM_INTERACT_ON 7 -#define USE_ANIM_FRAMES_PER_STEP 4 - -// Text boxes. If you need them, you call them - -//#define ENABLE_TEXT_BOX -#define TEXT_BOX_FRAME_TILE_OFFSET 0x20 // We need tiles in the active metatileset to draw the frame -//#define TEXT_BOX_WITH_PORTRAITS // Draw spr_hs [rdd] if != 0 in the text box if defined -//#define TEXT_BOX_DIALOGUES // Add code for dialogues - -// Timer. - -//#define ENABLE_TIMER -#define TIMER_INITIAL 99 -#define TIMER_START_ON -#define TIMER_REFILL 30 -//#define TIMER_RESET_ON_ENTER -//#define TIMER_TIME_FLAG 0 // Useful with scripting. Copies time to flag -//#define TIMER_ZERO_FLAG 1 // Useful with scripting. raises flag when time zero -#define TIMER_SOUND 10 // play a sound if timer < value - -// Springs - -//#define ENABLE_SPRINGS -#define SPRING_TILE 10 -#define SPRING_SPIKE_TILE 11 -//#define SPRINGS_NEED_POSSEE // You have to actually STEP on the tile for the spikes to show -//#define SPRINGS_ON_BY_DEFAULT - -// Enemy types and definitions -// --------------------------- - -//#define ENEMS_IN_CHRROM // Enems are stored somewhere in CHR-ROM - -#define ENEMS_LIFE_GAUGE 1 // Amount of shots/punches/kicks needed to kill enemies. -//#define ENEMS_FLICKER // Ifdef: flicker, if not: explosion -//#define ENEMS_FLICKER_ONLY_ON_DYING // Flicker, but only when life == 0 -//#define ENEMS_CAN_RESPAWN // Read docs for this. - -//#define PERSISTENT_ENEMIES -//#define PERSISTENT_DEATHS - -#define ENEMS_TOUCHED_FRAMES 8 // # frames to stay frozen after hit -//#define ENEMS_RECOIL_ON_HIT 2 // horizontal recoil when hit, #ifdef, value is speed in pixels! -//#define ENEMS_RECOIL_OVER_BOUNDARIES // (x1,y1), (x2,y2) boundaries don't stop a recoil - -//#define ENEMS_ENABLE_DYING_FRAME - -#define ENEMS_EXPLODING_CELL 32 -#define ENEMS_EXPLODING_CELLS_HIDES // Define and the baddie will be substituted by the explosion - -#define ENEMS_OCCLUDING_CELL 33 // If you use pezons or saws you need a flame for occlusion - -// Beware: only activate this if enemies are killable by any means: -//#define ENEMIES_SUFFER_ON_PLAYER_COLLISION - -// Fanties / Homing fanties - -//#define ENABLE_FANTY -//#define ENABLE_HOMING_FANTY - -#define FANTY_BASE_SPRID 32 -#define FANTY_WITH_FACING -#define FANTY_COLLIDES -#define FANTY_KILLED_BY_TILE -//#define FANTY_LIFE_GAUGE 5 // Define if you need these to be tougher - -#define FANTY_A 4 -#define FANTY_MAXV 48 - -#define FANTY_DISTANCE 80 -#define FANTY_V_RETREAT 16 - -// Pursuers (for top-down) - -//#define ENABLE_PURSUERS // If defined, type 7 enemies are active -#define DEATH_COUNT_EXPRESSION 50+(rand8()&63) -#define TYPE_7_FIXED_SPRITE 4 // If defined, type 7 enemies are always # - -// Saws - -//#define ENABLE_SAW -#define SAW_BASE_SPRID 48 -#define SAW_V_DISPL 4 -#define SAW_EMERGING_STEPS 10 - -// Pezons - -//#define ENABLE_PEZONS -#define PEZONS_BASE_SPRID 40 -#define PEZON_WAIT 50 -#define PEZON_THRUST 384 -#define PEZON_VY_FALLING_MAX 256 -#define PEZON_G 16 - -// Chac chacs - -//#define ENABLE_CHAC_CHAC -#define CHAC_CHAC_BASE_TILE 16 -#define CHAC_CHAC_IDLE_2 16 -#define CHAC_CHAC_IDLE_3 1 -#define CHAC_CHAC_IDLE_4 50 - -//#define CHAC_CHAC_FROM_MAP // Chac chacs are not placed as enemies but as tiles -#define MAX_CHAC_CHACS 4 -#define MAX_CHAC_CHACKS_QUEUED 16 // Make the closest power of 2 >= (MAX_CHAC_CHACS*4) -#define CHAC_CHAC_DETECT_TILE 39 -#define CHAC_CHACS_CLEAR // You are placing chac chacks from map but need the path to be clear - -// Monococos - -//#define ENABLE_MONOCOCOS -//#define MONOCOCO_TYPE_A // Comment for 4 cells monococo (appearing/disappearing & hidden) -#define MONOCOCO_BASE_SPRID 56 -#define MONOCOCO_BASE_TIME_HIDDEN 150 -#define MONOCOCO_BASE_TIME_APPEARING 50 -#define MONOCOCO_BASE_TIME_ONBOARD 50 -#define MONOCOCO_FIRE_COCO_AT MONOCOCO_BASE_TIME_ONBOARD/2 - -// Shooties - -//#define ENABLE_SHOOTIES -#define SHOOTIES_BASE_SPRID 40 -#define SHOOTIES_SHOOT_OFFS_X 16 -#define SHOOTIES_SHOOT_OFFS_Y -2 -#define SHOOT_FREQ (pry+23>=en_y[gpit]&&pry<=en_y[gpit]+23&&((en_facing[gpit]&&en_x[gpit]>prx)||(en_facing[gpit]==0&&en_x[gpit]=en_y[gpit]&&pry<=en_y[gpit]+23&&((en_facing[gpit]&&en_x[gpit]>prx)||(en_facing[gpit]==0&&en_x[gpit] inventory (just 1) -//#define ONLY_ONE_OBJECT_FLAG 0 // If def, use flag [.] instead of pinv - -// Easy objects mode: A range of hotspot id's are considered -// 'objects'. The user can carry one of those. Contents of hotspots -// can change in this mode. - -//#define ENABLE_EASY_OBJECTS - -#define HS_OBJ_EMPTY 4 -#define HS_OBJ_MIN 5 -#define HS_OBJ_MAX 6 -#define HS_USE_OFFS 2 - -#define HS_TYPE_A // If defined, render receptors = HS_OBJ_EMPTY, object used = object - // Otherwise, use its own graphics. -#define HS_FIX_ON_USE // If defined, object N used at N+H_USE_OFFS becomes N+H_USE_OFFS*2 - -// Silly Brawlers -// -------------- -//#define PLAYER_PUNCHES // When on floor -#define PLAYER_PUNCH_OFFS_X 15 -#define PLAYER_PUNCH_OFFS_Y -7 - -//#define PLAYER_KICKS // While airborne -#define PLAYER_KICK_OFFS_X 12 -#define PLAYER_KICK_OFFS_Y -3 - -#define PLAYER_FROZEN_FRAMES 16 // Frames to be frozen when hit landed - -// Shooting behaviour -// ------------------ -//#define PLAYER_CAN_FIRE // If defined, shooting engine is enabled. -#define PLAYER_BULLET_SPEED 4 // Pixels/frame. -#define MAX_BULLETS 4 // Max number of bullets on screen. Be careful!. -#define PLAYER_BULLET_Y_OFFSET 6 // vertical offset from the player's top. -#define PLAYER_BULLET_X_OFFSET -4 // vertical offset from the player's left/right. -//#define PLAYER_BULLETS_MIN_KILLABLE 3 // If defined, only enemies >= N can be killed. -//#define BULLETS_DONT_KILL // Bullets don't kill, but affect enemies otherwise - -// Special shooting -//#define PLAYER_FIRE_RELOAD 16 // If defined # of frames until next shoot -//#define PLAYER_CHARGE_AND_FIRE // If defined, press B to charge, release to fire - #define PLAYER_CHARGE_MIN 8 - #define PLAYER_CHARGE_MAX 48 // Min/max frames for charging -//#define PLAYER_BULLET_LIFE pfiregauge // Max life. Can be whatever. -//#define PLAYER_BULLET_FLICKERS 8 // Bullets flickers for N frames before dying, if defined - -//#define MAX_AMMO 99 // If defined, ammo is not infinite! - #define AMMO_REFILL 50 // type 3 hotspots refill amo, using tile 20 - //#define INITIAL_AMMO 0 // If defined, ammo = X when entering game. - -#define BULLET_PALETTE 3 -#define BULLET_PATTERN 0 // To paint the bullet. Can be an expresion. - -// Scripting -// --------- - -//#define ACTIVATE_SCRIPTING // Activates msc scripting and flag related stuff. -//#define CLEAR_FLAGS // Zero all flags when entering a level - -//#define FIRE_ON_KILL // run fire script on enemy kill - -//#define ENABLE_EXTERN_CODE // Enables custom code to be run from the script using EXTERN n -//#define ENABLE_FIRE_ZONE // Allows to define a zone which auto-triggers "FIRE" - -// Interactives -// ------------ - -//#define ENABLE_INTERACTIVES // Graphical flag representations! -#define INTERACTIVES_MAX 4 // As per screen -#define FLAG_INVENTORY 0 -//#define INTERACTIVES_ONLY_SPRITES // If you are using other means for items and just need sprites - -// Top view: -// --------- - -//#define PLAYER_TOP_DOWN // Enable top view. -//#define TOP_OVER_SIDE // UP/DOWN has priority over LEFT/RIGHT - -// Side view: -// ---------- - -#define PLAYER_HAS_JUMP // If defined, player is able to jump. -//#define PLAYER_JUMP_TYPE_MK2 // Use MK2 method for jump / gravity / release -//#define PLAYER_AUTO_JUMP // Automatic jump when hitting the floor -//#define PLAYER_SWIMS // If defined, player swims a la Ninjajar! -//#define PLAYER_HAS_JETPAC // If defined, player can thrust a vertical jetpac -//#define PLAYER_STEPS_ON_ENEMS // If defined, stepping on enemies kills them -//#define PLAYER_STEPS_STRICT // Only registers advantage hit when pvy > PLAYER_VY_FALLING_MIN -//#define PLAYER_SAFE_LANDING // Step over vertical inverts direction -//#define PLAYER_STEPS_MIN_KILLABLE 0xff // Only kill enemies with id >= PLAYER_STEPS_MIN_KILLABLE - // 0xff = Nobody - -// ============================================================================ -// III. Screen configuration -// ============================================================================ - -// This sections defines how stuff is rendered, where to show counters, etcetera - -//#define LIFE_X 7 // -//#define LIFE_Y 3 // Life gauge counter character coordinates - -//#define OBJECTS_X 18 // -//#define OBJECTS_Y 3 // Objects counter character coordinates -#define OBJECTS_REMAINING // Show # remaining instead of got - -//#define KEYS_X 28 // -//#define KEYS_Y 3 // Keys counter character coordinates - -//#define KILLED_X 16 // -//#define KILLED_Y 2 // Kills counter character coordinates - -//#define AMMO_X 8 // -//#define AMMO_Y 2 // Ammo counter character coordinates - -//#define HS_INV_X 136 // -//#define HS_INV_Y 11 // Object you are carrying - -//#define TIMER_X 0 // -//#define TIMER_Y 5 // Current timer value - -// Text -//#define LINE_OF_TEXT 26 // If defined, scripts can show text @ Y = # -//#define LINE_OF_TEXT_X 1 // X coordinate. - -// ============================================================================ -// IV. Player movement configuration -// ============================================================================ - -// This section is used to define which constants are used in the gravity/acceleration engine. -// If a side-view engine is configured, we have to define vertical and horizontal constants -// separately. If a top-view engine is configured instead, the horizontal values are also -// applied to the vertical component, vertical values are ignored. - -// IV.1. Vertical movement. Only for side-view. - -#define PLAYER_VY_FALLING_MAX 256 // Max. velocity when falling -#define PLAYER_VY_FALLING_MIN 64 // Use for animating if you need -#define PLAYER_VY_SINKING 2 -#define PLAYER_G 16 // Gravity - -#define PLAYER_VY_JUMP_INITIAL 64 -#define PLAYER_VY_JUMP_MAX 192 // Max. velocity when jumping -#define PLAYER_AY_JUMP 12 // Jumpin acceleration - -#define PLAYER_AY_JETPAC 32 // Jetpac increment -#define PLAYER_VY_JETPAC_MAX 256 // Max jetpac vertical speed - -#define PLAYER_AY_SWIM 8 // Swimming acceleration. -#define PLAYER_VY_SWIM_MAX 64 // Swimming max. speed - -#define PLAYER_VY_LADDERS 96 - -#define PLAYER_AY_FLOAT 16 -#define PLAYER_VY_FLOAT_MAX 256 - -#define PLAYER_AY_UNTHRUST 8 // Used in the Autojump engine. - -// IV.1.b MK2 style jump (overrides PLAYER_?Y_JUMP_* defined before!) -// (Used if PLAYER_JUMP_TYPE_MK2 is defined) -#define PLAYER_G_MK2_JUMPING 4 -#define PLAYER_VY_MK2_JUMP_INITIAL 208 -#define PLAYER_VY_MK2_JUMP_RELEASE 96 -#define PLAYER_VY_MK2_JUMP_A_STEPS 16 - -// IV.2. Horizontal (side view) or general (top view) movement. - -#define PLAYER_VX_MAX 128 // Max. horizontal speed -#define PLAYER_VX_CONVEYORS 64 -#define PLAYER_AX 16 // Horizontal acceleration -#define PLAYER_AX_ICE 4 -#define PLAYER_RX 16 // Horizontal friction -#define PLAYER_RX_ICE 2 - -#define PLAYER_VX_MIN (PLAYER_AX << 1) - -#define PLAYER_V_REBOUND 224 - -// Animation cells - -#ifdef PLAYER_TOP_DOWN - - // Cell definitions for top-down view - - #define CELL_FACING_RIGHT 0 - #define CELL_FACING_LEFT 6 - #define CELL_FACING_UP 18 - #define CELL_FACING_DOWN 12 - - #define CELL_IDLE 0 - #define CELL_WALK_CYCLE 1 - #define CELL_PUSHING 5 - - #define CELL_USE 24 - -#else - - // Cell definitions for side view - - #define CELL_FACING_RIGHT 0 - #define CELL_FACING_LEFT 8 - - #define CELL_IDLE 0 - #define CELL_WALK_INIT 1 - #define CELL_WALK_CYCLE 1 - #define CELL_AIRBORNE 5 - #define CELL_ASCENDING 5 - #define CELL_DESCENDING 6 - - #define CELL_SWIM_CYCLE 6 - - #define CELL_USE 6 - - #define CELL_PUNCHING 8 - #define CELL_KICKING 9 - - #define CELL_CLIMB_CYCLE 20 - #define CELL_CLIMB_HALF 29 -#endif - -// Music - -#define MUSIC_INGAME 0 - -// SFX - -#define SFX_START 0 -#define SFX_TILE 1 -#define SFX_OBJECT 2 -#define SFX_USE 3 -#define SFX_PHIT 4 -#define SFX_DUMMY1 5 -#define SFX_ENHIT 6 -#define SFX_DUMMY2 7 -#define SFX_JUMP 8 -#define SFX_BULLET 9 -#define SFX_COCO 10 -#define SFX_SPRING 11 -#define SFX_COUNT 12 -#define SFX_BREAKH 13 -#define SFX_HITTER 14 -#define SFX_STEPON 15 -#define SFX_FLOAT 16 -#define SFX_BREAKB 17 diff --git a/src/dev/engine/player.h.bak b/src/dev/engine/player.h.bak deleted file mode 100644 index b14eaf6..0000000 --- a/src/dev/engine/player.h.bak +++ /dev/null @@ -1,782 +0,0 @@ -// NES MK1 v1.0 -// Copyleft Mojon Twins 2013, 2015, 2017, 2018 - -// player.h -// Player movement & stuff - -#ifdef DIE_AND_RESPAWN - void player_register_safe_spot (void) { - px_safe = px; - py_safe = py; - n_pant_safe = n_pant; - } -#endif - -void player_stop (void) { - pvx = pvy = 0; -} - -void player_init (void) { - // Init player data - - player_stop (); - - #ifdef PLAYER_TOP_DOWN - pfacing = CELL_FACING_DOWN; - #else - pfacing = 0; - #endif - - pfr = pctfr = 0; - pj = pctj = 0; - psprid = 0; - - #ifndef DEACTIVATE_OBJECTS - pobjs = 0; - #endif - - #ifndef DEACTIVATE_KEYS - pkeys = 0; - #endif - - pgotten = 0; - pfiring = 0; - - #ifdef ENEMS_MAY_DIE - pkilled = 0; - #endif - - #ifdef PLAYER_CAN_FIRE - #ifdef MAX_AMMO - #ifdef INITIAL_AMMO - pammo = INITIAL_AMMO - #else - pammo = MAX_AMMO; - #endif - #endif - #ifdef PLAYER_CHARGE_AND_FIRE - pfiregauge = pfiregauge = 0; - #endif - #endif - - pstate = EST_NORMAL; - - #ifdef DIE_AND_RESPAWN - player_register_safe_spot (); - #endif - - #ifdef CARRY_ONE_HS_OBJECT - pinv = HS_OBJ_EMPTY; - #endif -} - -void player_render (void) { - if (pstate == EST_NORMAL || half_life) - oam_index = oam_meta_spr ( - prx, pry + SPRITE_ADJUST, - oam_index, - spr_player [psprid] - ); -} - -void player_to_pixels (void) { - prx = px >> FIXBITS; - pry = py >> FIXBITS; -} - -void player_kill (void) { - pkill = phit = 0; - sfx_play (SFX_PHIT, 0); - - if (plife) -- plife; else game_over = 1; - - #ifdef PLAYER_FLICKERS - pstate = EST_PARP; - pctstate = 100; - #else - pstate = EST_REBOUND; - pctstate = 16; - #endif - - #ifdef ENABLE_USE_ANIM - use_ct = 0; - #endif - - #ifdef DIE_AND_RESPAWN - px = px_safe; - py = py_safe; - player_to_pixels (); - n_pant = n_pant_safe; - music_pause (1); - delay (60); - player_stop (); - music_pause (0); - - // May be necessary to find a proper cell later on - #if defined (ENABLE_BREAKABLE) - pmayneedrelocation = 1; - #endif - #endif - - #ifdef DIE_AND_REENTER - on_pant = 0xff; - #endif -} - -#if defined(PLAYER_PUSH_BOXES) || !defined(DEACTIVATE_KEYS) - #include "engine/playermods/process_tile.h" -#endif - -#ifdef PLAYER_CAN_FIRE - #include "engine/playermods/bullets.h" -#endif - -void player_move (void) { - #if defined (PLAYER_PUNCHES) || defined (PLAYER_KICKS) - if (pfrozen) { - -- pfrozen; - if (pfrozen == 0) { - #ifdef PLAYER_PUNCHES - ppunching = 0; - #endif - #ifdef PLAYER_KICKS - pkicking = 0; - #endif - } else return; - } - #endif - - #ifdef ENABLE_USE_ANIM - if (use_ct) { - if (use_sub_ct) -- use_sub_ct; else { - if (use_ct < USE_ANIM_MAX_FRAMES) { - ++ use_ct; - use_sub_ct = (use_ct == USE_ANIM_MAX_FRAMES) ? 50 : USE_ANIM_FRAMES_PER_STEP; - #ifdef ACTIVATE_SCRIPTING - if ( - use_type == USE_TYPE_SCRIPTING && - fire_script_success == 0 && - use_ct == USE_ANIM_MAX_FRAMES - ) ++ use_ct; - #endif - } else use_ct = 0; - } - // Invalidate pad input - a_button = b_button = i = 0; - } - #endif - - hitv = hith = 0; - pnotsafe = 0; - #ifdef ENABLE_SLIPPERY - pice = 0; - #endif - - // ****************** - // Initial detections - // ****************** - - #ifdef NEEDS_INITIAL_DETECTION - cx1 = prx >> 4; cx2 = (prx + 7) >> 4; - cy1 = cy2 = (pry + 15) >> 4; - cm_two_points (); - #endif - - #ifdef ENABLE_LADDERS - rdb = ponladder; - ponladder = (!pj && at1 == 32 && at2 == 32); - #endif - - #ifdef ENABLE_PROPELLERS - rda = pfloating; - pfloating = (at1 == 64 || at2 == 64); - if (rda != pfloating) sfx_play (SFX_FLOAT, 0); - #endif - - #ifdef ENABLE_SPRINGS - if (springs_on && cy1 < 12) { - if (cy1) -- cy1; - _t = SPRING_SPIKE_TILE; - #ifdef SPRINGS_NEED_POSSEE - if (ppossee) - #endif - { - if (QTILE (cx1, cy1 + 1) == SPRING_TILE) { _x = cx1; _y = cy1; map_set (); sfx_play (SFX_SPRING, 1);} - if (QTILE (cx2, cy1 + 1) == SPRING_TILE) { _x = cx2; _y = cy1; map_set (); sfx_play (SFX_SPRING, 1);} - } - } - #endif - - ppossee = 0; - - // ******** - // Vertical - // ******** - - #ifdef PLAYER_TOP_DOWN - // Controller - - if (!(i & PAD_UP || i & PAD_DOWN)) { - pfacingv = 0xff; - if (pvy > 0) { - pvy -= PLAYER_RX; - if (pvy < 0) - pvy = 0; - } else if (pvy < 0) { - pvy += PLAYER_RX; - if (pvy > 0) - pvy = 0; - } - } - - if (i & PAD_UP) { - pfacingv = CELL_FACING_UP; - if (pvy > -PLAYER_VX_MAX) { - pvy -= PLAYER_AX; - } - } - - if (i & PAD_DOWN) { - pfacingv = CELL_FACING_DOWN; - if (pvy < PLAYER_VX_MAX) { - pvy += PLAYER_AX; - } - } - - #else - // Gravity - - #ifdef ENABLE_LADDERS - // Special cases: in and out the ladder. - - if (ponladder == 0) { - if (i & PAD_DOWN) { - cy1 = cy2 = (pry + 16) >> 4; - cm_two_points (); - ponladder = (!pj && at1 == 32 && at2 == 32); - } - - if ((i & PAD_UP) && rdb) pvy = 0; - } - - if (ponladder) { - if (i & PAD_UP) { - pvy = -PLAYER_VY_LADDERS; - } else if (i & PAD_DOWN) { - pvy = PLAYER_VY_LADDERS; - } else pvy = 0; - - cy1 = cy2 = (pry + 4) >> 4; - cm_two_points (); - phalfladder = (at1 != 32) && (at2 != 32); - } else - #endif - - #ifdef PLAYER_CAN_FLOAT - if (pfloating) { - pvy -= PLAYER_AY_FLOAT; - if (pvy < -PLAYER_VY_FLOAT_MAX) pvy = -PLAYER_VY_FLOAT_MAX; - } else - #endif - - #ifndef PLAYER_SWIMS - #ifdef PLAYER_JUMP_TYPE_MK2 - if ( - !pgotten - ) { - if (!pj) { - pvy += PLAYER_G; - } else pvy += PLAYER_G_MK2_JUMPING; - if (pvy > PLAYER_VY_FALLING_MAX) pvy = PLAYER_VY_FALLING_MAX; - } - #else - if (!pj) { - pvy += PLAYER_G; - if (pvy > PLAYER_VY_FALLING_MAX) pvy = PLAYER_VY_FALLING_MAX; - } - #endif - #endif - - // Moving platforms invalidate pvy - - #ifdef PLAYER_CUMULATIVE_JUMP - if (!pj) - #endif - if (pgotten) pvy = 0; - #endif - - cx1 = prx >> 4; - cx2 = (prx + 7) >> 4; - - #ifdef PLAYER_HAS_JETPAC - // Controller - - if (i & PAD_A) { - pvy -= PLAYER_AY_JETPAC; - if (pvy < -PLAYER_VY_JETPAC_MAX) pvy = -PLAYER_VY_JETPAC_MAX; - } - #endif - - #ifdef PLAYER_SWIMS - // Controller - - if (!(i & (PAD_DOWN|PAD_A))) { - pvy -= PLAYER_AY_SWIM >> 1; - } else { - if (i & (PAD_DOWN|PAD_A)) { - pvy += PLAYER_AY_SWIM; - } - - // Limit - if (pvy > PLAYER_VY_SWIM_MAX) { - pvy = PLAYER_VY_SWIM_MAX; - } - } - if (pvy < -PLAYER_VY_SWIM_MAX) { - pvy = -PLAYER_VY_SWIM_MAX; - } - - #endif - - // Move - py += pvy; - if (py < 0) py = 0; - - // Collision - player_to_pixels (); - - #ifdef PLAYER_TOP_DOWN - if (pvy < 0) - #else - rds16 = pvy + pgtmy; - if (rds16 < 0) - #endif - { - cy1 = cy2 = (pry - PLAYER_COLLISION_VSTRETCH_BG) >> 4; - cm_two_points (); - if ((at1 & 8) || (at2 & 8)) { - pry = ((cy1 + 1) << 4) + PLAYER_COLLISION_VSTRETCH_BG; - pvy = 0; py = pry << FIXBITS; - pgotten = 0; - pfiring = 1; - #if defined (PLAYER_TOP_DOWN) && (defined(PLAYER_PUSH_BOXES) || !defined(DEACTIVATE_KEYS)) - // Special obstacles - if (at1 & 2) player_process_tile (at1, cx1, cy1, cx1, cy1 - 1); - if (cx1 != cx2) if (at2 & 2) player_process_tile (at2, cx2, cy1, cx2, cy1 - 1); - #endif - } else if ((at1 & 1) || (at2 & 1)) { - hitv = 1; - } - #ifdef ENABLE_QUICKSANDS - else if ((at1 == 2) || (at2 == 2)) { - if (pctj > 2) pj = 0; - } - #endif - - #ifdef PLAYER_TOP_DOWN - } else if (pvy > 0) - #else - } else if (rds16 > 0) - #endif - { - cy1 = cy2 = (pry + 16) >> 4; - cm_two_points (); - #ifdef PLAYER_TOP_DOWN - if ((at1 & 8) || (at2 & 8)) - #else - if ( - pry < ((cy1 - 1) << 4) + 4 && - ( - (at1 & 12) || (at2 & 12) - #ifdef ENABLE_LADDERS - || (!ponladder && ((at1 & 32) && at2 & 32)) - #endif - ) - ) - #endif - { - pvy = 0; pry = ((cy1 - 1) << 4);py = pry << FIXBITS; - pgotten = 0; - pfiring = 1; - ppossee = 1; - - #if defined (PLAYER_TOP_DOWN) && (defined(PLAYER_PUSH_BOXES) || !defined(DEACTIVATE_KEYS)) - if (at1 & 2) player_process_tile (at1, cx1, cy1, cx1, cy1 + 1); - if (cx1 != cx2) if (at2 & 2) player_process_tile (at2, cx2, cy1, cx2, cy1 + 1); - #endif - - #ifdef ENABLE_SLIPPERY - pice = (at1 & 64) || (at2 & 64); - #endif - - #ifdef ENABLE_CONVEYORS - cfx = 0; - if ((at1 & 40) == 40) { if (at1 & 1) cfx = pgtmx = PLAYER_VX_CONVEYORS; else cfx = pgtmx = -PLAYER_VX_CONVEYORS; pgotten = 1; } - if (cx1 != cx2) if ((at2 & 40) == 40) { if (at2 & 1) cfx = pgtmx = PLAYER_VX_CONVEYORS; else cfx = pgtmx = -PLAYER_VX_CONVEYORS; pgotten = 1; } - #endif - - #if defined (ENABLE_BREAKABLE) && defined (BREAKABLE_WALKABLE) - if (at1 & 16) { breakable_break (cx1, cy1 - 1); pnotsafe = 1; } - if (cx1 != cx2 && (at2 & 16)) { breakable_break (cx2, cy1 - 1); pnotsafe = 1; } - #endif - - if ((at1 & 1) || (at2 & 1)) pnotsafe = 1; - } else if ((at1 & 1) || (at2 & 1)) { - hitv = 1; - } - #ifdef ENABLE_QUICKSANDS - else { - if ((at1 == 2) || (at2 == 2)) { - pvy = PLAYER_VY_SINKING; - ppossee = 1; - } - } - #endif - } - - #ifdef PLAYER_HAS_JUMP - // ******************************* - // Jump: PAD_A, change when needed - // ******************************* - - #ifdef PLAYER_JUMP_TYPE_MK2 - - if ( - a_button - && !pj - && ( - pgotten || ppossee || hitv - #ifdef ENABLE_LADDERS - || ponladder - #endif - ) - ) { - jump_start (); - - #ifdef DIE_AND_RESPAWN - if (!(pgotten || hitv || pnotsafe)) { - player_register_safe_spot (); - } - #endif - } - - if (pj) { - if (i & PAD_A) { - ++ pctj; if (pctj == PLAYER_VY_MK2_JUMP_A_STEPS) pj = 0; - } else { - pj = 0; if (pvy < -PLAYER_VY_MK2_JUMP_RELEASE) pvy = -PLAYER_VY_MK2_JUMP_RELEASE; - } - } - - #else - - if ( - a_button - && !pj - && ( - pgotten || ppossee || hitv - #ifdef ENABLE_LADDERS - || ponladder - #endif - ) - ) { - jump_start (); - - #ifdef DIE_AND_RESPAWN - if (!(pgotten || hitv || pnotsafe)) { - player_register_safe_spot (); - } - #endif - } - - if (i & PAD_A) { - if (pj) { - if (pctj < PLAYER_AY_JUMP) pvy -= (PLAYER_AY_JUMP - (pctj)); - if (pvy < -PLAYER_VY_JUMP_MAX) pvy = -PLAYER_VY_JUMP_MAX; - ++ pctj; if (pctj == 16) pj = 0; - } - } else { - pj = 0; - } - #endif - #endif - - #ifdef PLAYER_AUTO_JUMP - if ( - !pj - && ( - pgotten || ppossee || hitv - #ifdef ENABLE_LADDERS - || ponladder - #endif - ) - ) { - jump_start (); - - #ifdef DIE_AND_RESPAWN - if (!(pgotten || hitv || pnotsafe)) { - player_register_safe_spot (); - } - #endif - } - - if (pj) { - if (pctj < PLAYER_AY_JUMP) pvy -= (PLAYER_AY_JUMP - (pctj)); - if (pvy < -PLAYER_VY_JUMP_MAX) pvy = -PLAYER_VY_JUMP_MAX; - ++ pctj; if (pctj == 16) pj = 0; - } - - if (i & PAD_DOWN) { - if (pvy < 0) pvy += PLAYER_AY_UNTHRUST; - } - #endif - - // ********** - // Horizontal - // ********** - - // Poll pad - if (!(i & PAD_LEFT || i & PAD_RIGHT)) { - #ifdef PLAYER_TOP_DOWN - pfacingh = 0xff; - #endif - - if (pvx > 0) { - - #ifdef ENABLE_SLIPPERY - pvx -= pice ? PLAYER_RX_ICE : PLAYER_RX; - #else - pvx -= PLAYER_RX; - #endif - - if (pvx < 0) pvx = 0; - } else if (pvx < 0) { - - #ifdef ENABLE_SLIPPERY - pvx += pice ? PLAYER_RX_ICE : PLAYER_RX; - #else - pvx += PLAYER_RX; - #endif - - if (pvx > 0) pvx = 0; - } - } - - if (i & PAD_LEFT) { - #ifdef PLAYER_TOP_DOWN - pfacingh = CELL_FACING_LEFT; - #else - pfacing = CELL_FACING_LEFT; - #endif - - if (pvx > -PLAYER_VX_MAX) { - - #ifdef ENABLE_SLIPPERY - pvx -= pice ? PLAYER_AX_ICE : PLAYER_AX; - #else - pvx -= PLAYER_AX; - #endif - } - } - - if (i & PAD_RIGHT) { - #ifdef PLAYER_TOP_DOWN - pfacingh = CELL_FACING_RIGHT; - #else - pfacing = CELL_FACING_RIGHT; - #endif - - if (pvx < PLAYER_VX_MAX) { - - #ifdef ENABLE_SLIPPERY - pvx += pice ? PLAYER_AX_ICE : PLAYER_AX; - #else - pvx += PLAYER_AX; - #endif - } - } - - // Move - px += pvx; - #ifndef PLAYER_TOP_DOWN - if (pgotten) px += pgtmx; - #endif - - if (px < (4< (244<> 4; - cy2 = (pry + 15) >> 4; - #endif - - rds16 = pvx + pgtmx; - if (rds16) { - if (rds16 < 0) { - cx1 = cx2 = prx >> 4; - rda = (cx1 + 1) << 4; - rdm = cx1 - 1; - } else { - cx1 = cx2 = (prx + 8) >> 4; - rda = ((cx1 - 1) << 4) + 8; - rdm = cx1 + 1; - } - #if PLAYER_COLLISION_VSTRETCH_BG > 0 - cm_three_points (); - if ((at1 & 8) || (at2 & 8) || (at3 & 8)) { - pvx = 0; prx = rda; px = prx << FIXBITS; pfiring = 1; - - // Special obstacles - #if (defined(PLAYER_PUSH_BOXES) || !defined(DEACTIVATE_KEYS)) - if (at2 & 2) player_process_tile (at2, cx1, cy2, rdm, cy2); - if (cy2 != cy3) if (at3 & 2) player_process_tile (at3, cx1, cy3, rdm, cy3); - #endif - } else { - hith = ((at1 & 1) || (at2 & 1) || (at3 & 1)); - } - #else - cm_two_points (); - if ((at1 & 8) || (at2 & 8)) { - pvx = 0; prx = rda; px = prx << FIXBITS; pfiring = 1; - - // Special obstacles - #if (defined(PLAYER_PUSH_BOXES) || !defined(DEACTIVATE_KEYS)) - if (at1 & 2) player_process_tile (at1, cx1, cy1, rdm, cy1); - if (cy1 != cy2) if (at2 & 2) player_process_tile (at2, cx1, cy2, rdm, cy2); - #endif - } else { - hith = ((at1 & 1) || (at2 & 1)); - } - #endif - } - - // Facing - #ifdef PLAYER_TOP_DOWN - #ifdef TOP_OVER_SIDE - if (pfacingv != 0xff) { - pfacing = pfacingv; - } else if (pfacingh != 0xff) { - pfacing = pfacingh; - } - #else - if (pfacingh != 0xff) { - pfacing = pfacingh; - } else if (pfacingv != 0xff) { - pfacing = pfacingv; - } - #endif - #endif - - // ************* - // Killing tiles - // ************* - - phit = 0; - - if (hitv) { phit = 1; pvy = ADD_SIGN (-pvy, PLAYER_V_REBOUND); } - if (hith) { phit = 1; - #ifndef NO_HORIZONTAL_EVIL_TILE - pvx = ADD_SIGN (-pvx, PLAYER_V_REBOUND); - #endif - } - - #if defined (ENABLE_CHAC_CHAC) || defined (ENABLE_TILE_CHAC_CHAC) - cx1 = cx2 = (prx + 4) >> 4; - cy1 = pry >> 4; cy2 = (pry + 15) >> 4; - cm_two_points (); - if ((at1 & 1) || (at2 & 1)) phit = 1; - #endif - - if (pstate != EST_PARP) if (phit) { player_to_pixels (); pkill = 1; } - - // ************** - // B Button stuff - // ************** - - // (fire bullets, run scripting w/animation, do interactives) - - #ifdef PLAYER_CHARGE_AND_FIRE - #ifdef PLAYER_FIRE_RELOAD - if (pfirereload) -- pfirereload; - else - #endif - if (!b_button && (i & PAD_B)) { - if (pfiregauge < PLAYER_CHARGE_MAX) ++ pfiregauge; - } - - if (0 == (i & PAD_B)) { - if (pfiregauge >= PLAYER_CHARGE_MIN) fire_bullet (); - pfiregauge = 0; - } - #endif - - #if defined (ACTIVATE_SCRIPTING) || defined (ENABLE_INTERACTIVES) || defined (PLAYER_CAN_FIRE) || defined (PLAYER_PUNCHES) - if ( - b_button - #ifdef ENABLE_LADDERS - && !ponladder - #endif - ) { - #ifdef ACTIVATE_SCRIPTING - #include "engine/playermods/scripting.h" - #endif - - #if defined (PLAYER_CAN_FIRE) && !defined (PLAYER_CHARGE_AND_FIRE) - #ifdef PLAYER_FIRE_RELOAD - if (pfirereload) -- pfirereload; - else - #endif - - if (b_button) fire_bullet (); - #endif - - #ifdef PLAYER_PUNCHES - if (ppossee && ppunching == 0) { ppunching = 16; phitteract = 1; sfx_play (SFX_HITTER, 0); } - #endif - - #ifdef PLAYER_KICKS - if (!ppossee && pkicking == 0) { pkicking = 16; phitteract = 1; sfx_play (SFX_HITTER, 0); } - #endif - } - #endif - - #ifdef PLAYER_PUNCHES - if (ppunching) { - -- ppunching; if (ppunching < 12) phitteract = 0; - phitterx = pfacing ? prx - PLAYER_PUNCH_OFFS_X : prx + PLAYER_PUNCH_OFFS_X; - phittery = pry + PLAYER_PUNCH_OFFS_Y; - } - #endif - - #ifdef PLAYER_KICKS - if (pkicking) { - -- pkicking; if (pkicking < 12) phitteract = 0; - phitterx = pfacing ? prx - PLAYER_KICK_OFFS_X : prx + PLAYER_KICK_OFFS_X; - phittery = pry + PLAYER_KICK_OFFS_Y; - if (ppossee) pkicking = 0; - } - #endif - - #if defined (ENABLE_BREAKABLE) && (defined (PLAYER_PUNCHES) || defined (PLAYER_KICKS)) - if (phitteract) { - cx1 = (phitterx + 4) >> 4; - cy1 = (phittery + 4 - 16) >> 4; - if (ATTR(cx1, cy1) & 16) { - breakable_break (cx1, cy1); - pfrozen = PLAYER_FROZEN_FRAMES; - phitteract = 0; - } - } - #endif - - // ********** - // Calc frame - // ********** - #include "my/player_frame_selector.h" - - prx_old = prx; - pry_old = pry; -} diff --git a/src/dev/mainloop/scripting.h.bak b/src/dev/mainloop/scripting.h.bak deleted file mode 100644 index c9437bb..0000000 --- a/src/dev/mainloop/scripting.h.bak +++ /dev/null @@ -1,24 +0,0 @@ -// NES MK1 v1.0 -// Copyleft Mojon Twins 2013, 2015, 2017, 2018 - -// Throw fire script -#ifdef ENABLE_USE_ANIM - if (run_fire_script_do && - use_ct == USE_ANIM_INTERACT_ON && - use_sub_ct == USE_ANIM_FRAMES_PER_STEP && - use_type == USE_TYPE_SCRIPTING - ) { - run_fire_script (); - sfx_play (fire_script_success ? SFX_OBJECT : SFX_SPRING, 1); - - } - #ifdef ENABLE_FIRE_ZONE - else - #endif -#endif - -#ifdef ENABLE_FIRE_ZONE - if (f_zone_ac && (prx >= fzx1 && prx <= fzx2 && pry >= fzy1 && pry <= fzy2)) { - run_fire_script (); - } -#endif diff --git a/testers/00_tester_sideview/dev/config.h.bak b/testers/00_tester_sideview/dev/config.h.bak deleted file mode 100644 index 9b90ac9..0000000 --- a/testers/00_tester_sideview/dev/config.h.bak +++ /dev/null @@ -1,623 +0,0 @@ -// NES MK1 v1.0 -// Copyleft Mojon Twins 2013, 2015, 2017, 2018 - -//#define GAME_AREA_TOP -#define GAME_AREA_MIDDLE -//#define GAME_AREA_BOTTOM -//#define GAME_AREA_CUSTOM - -// ============================================================================ -// I. General configuration -// ============================================================================ - -// In this section we define map dimmensions, initial and authomatic ending conditions, etc. - -#define MAP_W 3 // -#define MAP_H 2 // Map dimmensions in screens -#define MAP_SIZE MAP_W*MAP_H - -#define PLAYER_LIFE 5 // Vida máxima (con la que empieza, además) -#define PLAYER_REFILL 1 // Recarga de vida. - -//#define MULTI_LEVEL // Comment for single level -#define MAX_LEVELS 1 - -#define MAX_FLAGS 2 // Keep it low if you don't need flags - -#ifndef MULTI_LEVEL - - // If you aim for a single level ROM, fill in those: - - #define SCR_INI 1 // Initial screen - #define PLAYER_INI_X 1 // - #define PLAYER_INI_Y 3 // Initial position - //#define SCR_END 99 // Final screen, undefine if N/A - #define PLAYER_END_X 99 // - #define PLAYER_END_Y 99 // Ending position - #define PLAYER_MAX_OBJECTS 1 // Objects to finish game - -#else - - // If you want multiple levels, please don't touch this much. - // Just comment SCR_END and / or PLAYER_MAX_OBJECTS if N/A. - // You should be fiddling with assets/levelset.h - - #define SCR_INI (l_scr_ini [level]) - #define PLAYER_INI_X (l_ini_x [level]) - #define PLAYER_INI_Y (l_ini_y [level]) - //#define SCR_END (l_scr_end [level]) - #define PLAYER_END_X (l_end_x [level]) - #define PLAYER_END_Y (l_end_y [level]) - #define PLAYER_MAX_OBJECTS (l_player_max_objects [level]) - -#endif - -// Some flexibility -#define HOTSPOT_TYPE_OBJECT 1 -#define HOTSPOT_TYPE_KEYS 2 -#define HOTSPOT_TYPE_REFILL 3 -//#define HOTSPOT_TYPE_AMMO 4 -//#define HOTSPOT_TYPE_TIME 5 // For time refills - -//#define HOTSPOT_TYPE_RESONATOR 4 // An example of custom hotspot - -#define WIN_LEVEL_CUSTOM // A level ends when win_level == 1 - // And such a thing has to be setup by YOU - -//#define MAP_FORMAT_PACKED // Each byte in map data = 2 tiles, 16 tiles max. -#define MAP_FORMAT_RLE16 // RLE'd by rlemap2. 16 tiles max. -//#define MAP_FORMAT_RLE53 // RLE'd by rle53mapMK1. 32 tiles max. -//#define MAP_FORMAT_RLE44 // RLE'd by rle44mapMK1. 16 tiles max. -//#define MAP_FORMAT_RLE53_CHRROM // RLE'd by rle53mapchrrom and stored in CHR-ROM. 32 tiles max. -//#define MAP_FORMAT_RLE44_CHRROM // RLE'd by rle44mapchrrom and stored in CHR-ROM. 16 tiles max. - -//#define MAP_WITH_DECORATIONS // Add decorations when use a 16 tiles mode. - -// Use the complex renderer if you need to post-process the map buffer before -// printing. - -//#define MAP_RENDERER_COMPLEX // Comment for the simple, old renderer - -// ============================================================================ -// II. Engine type -// ============================================================================ - -// This section is used to define the game engine behaviour. Many directives are related, -// and others are mutually exclusive. I think this will be pretty obvious when you look at them. - -// Right now the shooting engine is only compatible with the side-view engine. - -// Bounding box size -// ----------------- - -// Player is 8x16 for collision with BG but can be made taller by this amount. Negative values=shorter -#define PLAYER_COLLISION_VSTRETCH_BG -4 - -// This defines how the player will collide with enemies. -// Player is always 8 pixels wide and 16 pixel tall PLUS the value of this variable. -// this offset goes to the head. -// So if you define it as -8, the collision box will be 8x8 bottom centerd. -// And if you define it as 4 the collision box will be 8x20 bottom centered. -// For 16x24 sprites it's safe to leave it at 0. For 16x16 should be better -2. -#define PLAYER_COLLISION_VSTRETCH_FG 4 - -// Same for enemies. -// I usually leave it at 0 for <=24 pixels tall, 8 for 32 pixels tall. -#define ENEMS_COLLISION_VSTRETCH_FG 0 - -// General directives: -// ------------------- - -// Push boxes - -#define PLAYER_PUSH_BOXES // If defined, tile #14 is pushable -#define FIRE_TO_PUSH - -//#define ENABLE_PUSHED_SCRIPT -#define PUSHED_TILE_FLAG 1 -#define PUSHED_TO_X_FLAG 2 -#define PUSHED_TO_Y_FLAG 3 - -// General stuff - -//#define DEACTIVATE_KEYS // If defined, keys are not present. -//#define DEACTIVATE_OBJECTS // If defined, objects are not present. -//#define PLAYER_BOUNCES -//#define DOUBLE_BOUNCE -#define DIE_AND_RESPAWN // If defined, dying = respawn on latest safe. -#define DIE_AND_REENTER // Reenter screen on death -#define PLAYER_FLICKERS // If defined, collisions make player flicker instead. -//#define WALLS_STOP_ENEMIES // If defined, enemies react to the scenary - -// Extra special tiles -// ------------------- - -#define NO_HORIZONTAL_EVIL_TILE // Only check for evil tiles vertically - -// Quicksands, beh == 2. -// For player movement values, see section 4 -// (PLAYER_VY_SINKING) - -#define ENABLE_QUICKSANDS - -// Breakable, beh & 16 -#define ENABLE_BREAKABLE // Breakable walls -#define BREAKABLE_LIFE 2 // Amount of hits to break wall -#define BREAKABLE_ANIM // Show explosion when breaking -#define BREAKABLE_MAX 4 // Max # of concurrent explosions -#define BREAKABLE_MAX_FRAMES 8 // Frames to show explosion -#define BREAKABLE_ERASE 0 // Tile to erase broken tiles -#define BREAKABLE_BREAKING 8 // Tile to display while breaking -#define BREAKABLE_WALKABLE // If defined (side view), tiles break when stepped on - -// Conveyors, beh & 32 [+1] (must be & 8!) -// For player movement values, see section 4 -// (PLAYER_VX_CONVEYORS) - -#define ENABLE_CONVEYORS - -// Slippery, beh & 64. (must be & 12!) -// For player movement values, see section 4 -// (PLAYER_AX_ICE & PLAYER_RX_ICE) - -#define ENABLE_SLIPPERY - -// Ladders, beh == 32 - -//#define ENABLE_LADDERS - -// Extra special stuff -// ------------------- - -// Propellers - -//#define ENABLE_PROPELLERS -#define PROPELLERS_MAX 4 -#define PROPELLERS_BASE_PATTERN 64 // First of 4 patterns to draw/animate propellers -#define PROPELLERS_MAX_LENGTH 6 // In tiles; undef for infinite -#define PROPELLER_TILE 14 // Tile # in map to detect a propeller -#define PROPELLERS_ON_BY_DEFAULT // Define so propellers are on by default - -// Killing tiles shine, beware! - -//#define ENABLE_SHINES -#define SHINES_MAX 8 -#define SHINES_BASE_PATTERN 10 // In the sprite bank, two patterns needed -#define SHINES_PALETTE 3 -#define SHINING_TILE 23 // Tile # in map to add shines - -// Resonators. Not sure if you need this, but. - -//#define ENABLE_RESONATORS -#define RESONATOR_BASE_PATTERN 0 -#define RESONATOR_PALETTE 3 -#define RESONATOR_COUNTER_OFFS_X 4 -#define RESONATOR_COUNTER_OFFS_Y 7 -//#define RESONATOR_CHANGE_BG_PAL paltsgrey // Define to change pal for this palette -//#define RESONATOR_CHANGE_SPR_PAL palssgrey // Define to change pal for this palette - -// Simple warpers. Put as 0xff type enemies. -// Destination is attr:s1 (n_pant:YX). - -//#define ENABLE_SIMPLE_WARPERS -#define SIMPLE_WARPERS_BASE_SPRID (32+((frame_counter>>2)&3)) -//#define SIMPLE_WARPERS_FIRE_BUTTON - -// No! - -//#define ENABLE_NO -#define NO_METASPRITE ssit_06 -#define NO_OFFS_X 0 -#define NO_OFFS_Y -24 - -// Use animation. -// Note: When activated hotspots need b_button press and, in side view, possee. - -//#define ENABLE_USE_ANIM -#define USE_ANIM_MAX_FRAMES 13 -#define USE_ANIM_INTERACT_ON 7 -#define USE_ANIM_FRAMES_PER_STEP 4 - -// Text boxes. If you need them, you call them - -//#define ENABLE_TEXT_BOX -#define TEXT_BOX_FRAME_TILE_OFFSET 0x20 // We need tiles in the active metatileset to draw the frame -//#define TEXT_BOX_WITH_PORTRAITS // Draw spr_hs [rdd] if != 0 in the text box if defined -//#define TEXT_BOX_DIALOGUES // Add code for dialogues - -// Timer. - -//#define ENABLE_TIMER -#define TIMER_INITIAL 5 -#define TIMER_START_ON -#define TIMER_REFILL 0 -#define TIMER_RESET_ON_ENTER -//#define TIMER_TIME_FLAG 0 // Useful with scripting. Copies time to flag -//#define TIMER_ZERO_FLAG 1 // Useful with scripting. raises flag when time zero -#define TIMER_SOUND 10 // play a sound if timer < value - -// Springs - -//#define ENABLE_SPRINGS -#define SPRING_TILE 10 -#define SPRING_SPIKE_TILE 11 -//#define SPRINGS_ON_BY_DEFAULT - -// Enemy types and definitions -// --------------------------- - -//#define ENEMS_IN_CHRROM // Enems are stored somewhere in CHR-ROM - -#define ENEMS_LIFE_GAUGE 2 // Amount of shots/punches/kicks needed to kill enemies. -//#define ENEMS_FLICKER // Ifdef: flicker, if not: explosion -//#define ENEMS_FLICKER_ONLY_ON_DYING // Flicker, but only when life == 0 -//#define ENEMS_CAN_RESPAWN // Read docs for this. - -//#define PERSISTENT_ENEMIES -//#define PERSISTENT_DEATHS - -#define ENEMS_TOUCHED_FRAMES 16 // # frames to stay frozen after hit -//#define ENEMS_RECOIL_ON_HIT 2 // horizontal recoil when hit, #ifdef, value is speed in pixels! -//#define ENEMS_RECOIL_OVER_BOUNDARIES // (x1,y1), (x2,y2) boundaries don't stop a recoil - -//#define ENEMS_ENABLE_DYING_FRAME - -#define ENEMS_EXPLODING_CELL 73 -#define ENEMS_EXPLODING_CELLS_HIDES // Define and the baddie will be substituted by the explosion - -#define ENEMS_OCCLUDING_CELL 72 // If you use pezons or saws you need a flame for occlusion - -// Beware: only activate this if enemies are killable by any means: -//#define ENEMIES_SUFFER_ON_PLAYER_COLLISION - -// Fanties / Homing fanties - -//#define ENABLE_FANTY -#define ENABLE_HOMING_FANTY - -#define FANTY_BASE_SPRID 32 -#define FANTY_WITH_FACING -#define FANTY_COLLIDES -#define FANTY_KILLED_BY_TILE -#define FANTY_LIFE_GAUGE 5 // Define if you need these to be tougher - -#define FANTY_A 4 -#define FANTY_MAXV 48 - -#define FANTY_DISTANCE 80 -#define FANTY_V_RETREAT 16 - -// Pursuers (for top-down) - -//#define ENABLE_PURSUERS // If defined, type 7 enemies are active -#define DEATH_COUNT_EXPRESSION 50+(rand8()&63) -#define TYPE_7_FIXED_SPRITE 4 // If defined, type 7 enemies are always # - -// Saws - -#define ENABLE_SAW -#define SAW_BASE_SPRID 48 -#define SAW_V_DISPL 4 -#define SAW_EMERGING_STEPS 10 - -// Pezons - -#define ENABLE_PEZONS -#define PEZONS_BASE_SPRID 40 -#define PEZON_WAIT 50 -#define PEZON_THRUST 384 -#define PEZON_VY_FALLING_MAX 256 -#define PEZON_G 16 - -// Chac chacs - -#define ENABLE_CHAC_CHAC -#define CHAC_CHAC_BASE_TILE 16 -#define CHAC_CHAC_IDLE_2 16 -#define CHAC_CHAC_IDLE_3 1 -#define CHAC_CHAC_IDLE_4 50 - -//#define CHAC_CHAC_FROM_MAP // Chac chacs are not placed as enemies but as tiles -#define MAX_CHAC_CHACS 4 -#define MAX_CHAC_CHACKS_QUEUED 16 // Make the closest power of 2 >= (MAX_CHAC_CHACS*4) -#define CHAC_CHAC_DETECT_TILE 39 -#define CHAC_CHACS_CLEAR // You are placing chac chacks from map but need the path to be clear - -// Monococos - -#define ENABLE_MONOCOCOS -//#define MONOCOCO_TYPE_A // Comment for 4 cells monococo (appearing/disappearing & hidden) -#define MONOCOCO_BASE_SPRID 56 -#define MONOCOCO_BASE_TIME_HIDDEN 150 -#define MONOCOCO_BASE_TIME_APPEARING 50 -#define MONOCOCO_BASE_TIME_ONBOARD 50 -#define MONOCOCO_FIRE_COCO_AT MONOCOCO_BASE_TIME_ONBOARD/2 - -// Shooties - -//#define ENABLE_SHOOTIES -#define SHOOTIES_BASE_SPRID 40 -#define SHOOTIES_SHOOT_OFFS_X 16 -#define SHOOTIES_SHOOT_OFFS_Y -2 -#define SHOOT_FREQ (pry+23>=en_y[gpit]&&pry<=en_y[gpit]+23&&((en_facing[gpit]&&en_x[gpit]>prx)||(en_facing[gpit]==0&&en_x[gpit]=en_y[gpit]&&pry<=en_y[gpit]+23&&((en_facing[gpit]&&en_x[gpit]>prx)||(en_facing[gpit]==0&&en_x[gpit] inventory (just 1) -//#define ONLY_ONE_OBJECT_FLAG 0 // If def, use flag [.] instead of pinv - -// Easy objects mode: A range of hotspot id's are considered -// 'objects'. The user can carry one of those. Contents of hotspots -// can change in this mode. - -#define ENABLE_EASY_OBJECTS - -#define HS_OBJ_EMPTY 4 -#define HS_OBJ_MIN 5 -#define HS_OBJ_MAX 6 -#define HS_USE_OFFS 2 - -#define HS_TYPE_A // If defined, render receptors = HS_OBJ_EMPTY, object used = object - // Otherwise, use its own graphics. -#define HS_FIX_ON_USE // If defined, object N used at N+H_USE_OFFS becomes N+H_USE_OFFS*2 - -// Silly Brawlers -// -------------- -//#define PLAYER_PUNCHES // When on floor -#define PLAYER_PUNCH_OFFS_X 15 -#define PLAYER_PUNCH_OFFS_Y -7 - -//#define PLAYER_KICKS // While airborne -#define PLAYER_KICK_OFFS_X 12 -#define PLAYER_KICK_OFFS_Y -3 - -#define PLAYER_FROZEN_FRAMES 16 // Frames to be frozen when hit landed - -// Shooting behaviour -// ------------------ -#define PLAYER_CAN_FIRE // If defined, shooting engine is enabled. -#define PLAYER_BULLET_SPEED 4 // Pixels/frame. -#define MAX_BULLETS 4 // Max number of bullets on screen. Be careful!. -#define PLAYER_BULLET_Y_OFFSET 0 // vertical offset from the player's top. -#define PLAYER_BULLET_X_OFFSET 0 // vertical offset from the player's left/right. -#define PLAYER_BULLETS_MIN_KILLABLE 1 // If defined, only enemies >= N can be killed. -//#define BULLETS_DONT_KILL // Bullets don't kill, but affect enemies otherwise - -// Special shooting -//#define PLAYER_FIRE_RELOAD 16 // If defined # of frames until next shoot -//#define PLAYER_CHARGE_AND_FIRE // If defined, press B to charge, release to fire - #define PLAYER_CHARGE_MIN 8 - #define PLAYER_CHARGE_MAX 48 // Min/max frames for charging -//#define PLAYER_BULLET_LIFE pfiregauge // Max life. Can be whatever. -//#define PLAYER_BULLET_FLICKERS 8 // Bullets flickers for N frames before dying, if defined - -//#define MAX_AMMO 99 // If defined, ammo is not infinite! - #define AMMO_REFILL 50 // type 3 hotspots refill amo, using tile 20 - //#define INITIAL_AMMO 0 // If defined, ammo = X when entering game. - -#define BULLET_PALETTE 3 -#define BULLET_PATTERN 0 // To paint the bullet. Can be an expresion. - -// Scripting -// --------- - -//#define ACTIVATE_SCRIPTING // Activates msc scripting and flag related stuff. -//#define CLEAR_FLAGS // Zero all flags when entering a level - -//#define FIRE_ON_KILL // run fire script on enemy kill - -//#define ENABLE_EXTERN_CODE // Enables custom code to be run from the script using EXTERN n -//#define ENABLE_FIRE_ZONE // Allows to define a zone which auto-triggers "FIRE" - -// Interactives -// ------------ - -//#define ENABLE_INTERACTIVES // Graphical flag representations! -#define INTERACTIVES_MAX 4 // As per screen -#define FLAG_INVENTORY 0 -//#define INTERACTIVES_ONLY_SPRITES // If you are using other means for items and just need sprites - -// Top view: -// --------- - -//#define PLAYER_TOP_DOWN // Enable top view. -//#define TOP_OVER_SIDE // UP/DOWN has priority over LEFT/RIGHT - -// Side view: -// ---------- - -#define PLAYER_HAS_JUMP // If defined, player is able to jump. -//#define PLAYER_JUMP_TYPE_MK2 // Use MK2 method for jump / gravity / release -//#define PLAYER_AUTO_JUMP // Automatic jump when hitting the floor -//#define PLAYER_SWIMS // If defined, player swims a la Ninjajar! -//#define PLAYER_HAS_JETPAC // If defined, player can thrust a vertical jetpac -//#define PLAYER_STEPS_ON_ENEMS // If defined, stepping on enemies kills them -//#define PLAYER_STEPS_STRICT // Only registers advantage hit when pvy > PLAYER_VY_FALLING_MIN -//#define PLAYER_SAFE_LANDING // Step over vertical inverts direction -//#define PLAYER_STEPS_MIN_KILLABLE 0xff // Only kill enemies with id >= PLAYER_STEPS_MIN_KILLABLE - // 0xff = Nobody - -// ============================================================================ -// III. Screen configuration -// ============================================================================ - -// This sections defines how stuff is rendered, where to show counters, etcetera - -#define LIFE_X 7 // -#define LIFE_Y 3 // Life gauge counter character coordinates - -//#define OBJECTS_X 18 // -//#define OBJECTS_Y 3 // Objects counter character coordinates -#define OBJECTS_REMAINING // Show # remaining instead of got - -#define KEYS_X 28 // -#define KEYS_Y 3 // Keys counter character coordinates - -//#define KILLED_X 16 // -//#define KILLED_Y 2 // Kills counter character coordinates - -//#define AMMO_X 8 // -//#define AMMO_Y 2 // Ammo counter character coordinates - -#define HS_INV_X 136 // -#define HS_INV_Y 11 // Object you are carrying - -//#define TIMER_X 0 // -//#define TIMER_Y 5 // Current timer value - -// Text -//#define LINE_OF_TEXT 26 // If defined, scripts can show text @ Y = # -//#define LINE_OF_TEXT_X 1 // X coordinate. - -// ============================================================================ -// IV. Player movement configuration -// ============================================================================ - -// This section is used to define which constants are used in the gravity/acceleration engine. -// If a side-view engine is configured, we have to define vertical and horizontal constants -// separately. If a top-view engine is configured instead, the horizontal values are also -// applied to the vertical component, vertical values are ignored. - -// IV.1. Vertical movement. Only for side-view. - -#define PLAYER_VY_FALLING_MAX 256 // Max. velocity when falling -#define PLAYER_VY_FALLING_MIN 64 // Use for animating if you need -#define PLAYER_VY_SINKING 2 -#define PLAYER_G 16 // Gravity - -#define PLAYER_VY_JUMP_INITIAL 64 -#define PLAYER_VY_JUMP_MAX 192 // Max. velocity when jumping -#define PLAYER_AY_JUMP 12 // Jumpin acceleration - -#define PLAYER_AY_JETPAC 32 // Jetpac increment -#define PLAYER_VY_JETPAC_MAX 256 // Max jetpac vertical speed - -#define PLAYER_AY_SWIM 8 // Swimming acceleration. -#define PLAYER_VY_SWIM_MAX 64 // Swimming max. speed - -#define PLAYER_VY_LADDERS 96 - -#define PLAYER_AY_FLOAT 16 -#define PLAYER_VY_FLOAT_MAX 256 - -#define PLAYER_AY_UNTHRUST 8 // Used in the Autojump engine. - -// IV.1.b MK2 style jump (overrides PLAYER_?Y_JUMP_* defined before!) -// (Used if PLAYER_JUMP_TYPE_MK2 is defined) -#define PLAYER_G_MK2_JUMPING 4 -#define PLAYER_VY_MK2_JUMP_INITIAL 208 -#define PLAYER_VY_MK2_JUMP_RELEASE 96 -#define PLAYER_VY_MK2_JUMP_A_STEPS 16 - -// IV.2. Horizontal (side view) or general (top view) movement. - -#define PLAYER_VX_MAX 128 // Max. horizontal speed -#define PLAYER_VX_CONVEYORS 64 -#define PLAYER_AX 16 // Horizontal acceleration -#define PLAYER_AX_ICE 4 -#define PLAYER_RX 16 // Horizontal friction -#define PLAYER_RX_ICE 2 - -#define PLAYER_VX_MIN (PLAYER_AX << 2) - -#define PLAYER_V_REBOUND 224 - -// Animation cells - -#ifdef PLAYER_TOP_DOWN - - // Cell definitions for top-down view - - #define CELL_FACING_RIGHT 0 - #define CELL_FACING_LEFT 6 - #define CELL_FACING_UP 18 - #define CELL_FACING_DOWN 12 - - #define CELL_IDLE 0 - #define CELL_WALK_CYCLE 1 - #define CELL_PUSHING 5 - - #define CELL_USE 24 - -#else - - // Cell definitions for side view - - #define CELL_FACING_RIGHT 0 - #define CELL_FACING_LEFT 8 - - #define CELL_IDLE 0 - #define CELL_WALK_INIT 1 - #define CELL_WALK_CYCLE 1 - #define CELL_AIRBORNE 5 - #define CELL_ASCENDING 5 - #define CELL_DESCENDING 6 - - #define CELL_SWIM_CYCLE 6 - - #define CELL_USE 6 - - #define CELL_PUNCHING 8 - #define CELL_KICKING 9 - - #define CELL_CLIMB_CYCLE 20 - #define CELL_CLIMB_HALF 29 -#endif - -// Music - -#define MUSIC_INGAME 0 - -// SFX - -#define SFX_START 0 -#define SFX_TILE 1 -#define SFX_OBJECT 2 -#define SFX_USE 3 -#define SFX_PHIT 4 -#define SFX_DUMMY1 5 -#define SFX_ENHIT 6 -#define SFX_DUMMY2 7 -#define SFX_JUMP 8 -#define SFX_BULLET 9 -#define SFX_COCO 10 -#define SFX_SPRING 11 -#define SFX_COUNT 12 -#define SFX_BREAKH 13 -#define SFX_HITTER 14 -#define SFX_STEPON 15 -#define SFX_FLOAT 16 -#define SFX_BREAKB 17 diff --git a/testers/01_tester_top_down/dev/config.h.bak b/testers/01_tester_top_down/dev/config.h.bak deleted file mode 100644 index 1a741e9..0000000 --- a/testers/01_tester_top_down/dev/config.h.bak +++ /dev/null @@ -1,625 +0,0 @@ -// NES MK1 v1.0 -// Copyleft Mojon Twins 2013, 2015, 2017, 2018 - -#define GAME_AREA_TOP -//#define GAME_AREA_MIDDLE -//#define GAME_AREA_BOTTOM -//#define GAME_AREA_CUSTOM - -// ============================================================================ -// I. General configuration -// ============================================================================ - -// In this section we define map dimmensions, initial and authomatic ending conditions, etc. - -#define MAP_W 1 // -#define MAP_H 24 // Map dimensions in screens -#define MAP_SIZE MAP_W*MAP_H - -#define PLAYER_LIFE 9 // Max / Initial life -#define PLAYER_REFILL 1 // Life refill - -#define MULTI_LEVEL // Comment for single level -#define MAX_LEVELS 2 - -#define MAX_FLAGS 16 // Keep it low if you don't need flags - -#ifndef MULTI_LEVEL - - // If you aim for a single level ROM, fill in those: - - #define SCR_INI 23 // Initial screen - #define PLAYER_INI_X 12 // - #define PLAYER_INI_Y 8 // Initial position - //#define SCR_END 99 // Final screen, undefine if N/A - #define PLAYER_END_X 99 // - #define PLAYER_END_Y 99 // Ending position - #define PLAYER_MAX_OBJECTS 25 // Objects to finish game - -#else - - // If you want multiple levels, please don't touch this much. - // Just comment SCR_END and / or PLAYER_MAX_OBJECTS if N/A. - // You should be fiddling with assets/levelset.h - - #define SCR_INI (l_scr_ini [level]) - #define PLAYER_INI_X (l_ini_x [level]) - #define PLAYER_INI_Y (l_ini_y [level]) - //#define SCR_END (l_scr_end [level]) - #define PLAYER_END_X (l_end_x [level]) - #define PLAYER_END_Y (l_end_y [level]) - #define PLAYER_MAX_OBJECTS (l_player_max_objects [level]) - -#endif - -// Some flexibility -#define HOTSPOT_TYPE_OBJECT 1 -#define HOTSPOT_TYPE_KEYS 2 -#define HOTSPOT_TYPE_REFILL 3 -#define HOTSPOT_TYPE_AMMO 4 -//#define HOTSPOT_TYPE_TIME 5 // For time refills - -//#define HOTSPOT_TYPE_RESONATOR 4 // An example of custom hotspot - -//#define WIN_LEVEL_CUSTOM // A level ends when win_level == 1 - // And such a thing has to be setup by YOU - -#define MAP_FORMAT_PACKED // Each byte in map data = 2 tiles, 16 tiles max. -//#define MAP_FORMAT_RLE16 // RLE'd by rlemap2. 16 tiles max. -//#define MAP_FORMAT_RLE53 // RLE'd by rle53mapMK1. 32 tiles max. -//#define MAP_FORMAT_RLE44 // RLE'd by rle44mapMK1. 16 tiles max. -//#define MAP_FORMAT_RLE53_CHRROM // RLE'd by rle53mapchrrom and stored in CHR-ROM. 32 tiles max. -//#define MAP_FORMAT_RLE44_CHRROM // RLE'd by rle44mapchrrom and stored in CHR-ROM. 16 tiles max. - -//#define MAP_WITH_DECORATIONS // Add decorations when use a 16 tiles mode. - -// Use the complex renderer if you need to post-process the map buffer before -// printing. - -//#define MAP_RENDERER_COMPLEX // Comment for the simple, old renderer - -// ============================================================================ -// II. Engine type -// ============================================================================ - -// This section is used to define the game engine behaviour. Many directives are related, -// and others are mutually exclusive. I think this will be pretty obvious when you look at them. - -// Right now the shooting engine is only compatible with the side-view engine. - -// Bounding box size -// ----------------- - -// Player is 8x16 for collision with BG but can be made taller by this amount. Negative values=shorter -#define PLAYER_COLLISION_VSTRETCH_BG -8 - -// This defines how the player will collide with enemies. -// Player is always 8 pixels wide and 16 pixel tall PLUS the value of this variable. -// this offset goes to the head. -// So if you define it as -8, the collision box will be 8x8 bottom centerd. -// And if you define it as 4 the collision box will be 8x20 bottom centered. -// For 16x24 sprites it's safe to leave it at 0. For 16x16 should be better -2. -#define PLAYER_COLLISION_VSTRETCH_FG -4 - -// Same for enemies. -// I usually leave it at 0 for <=24 pixels tall, 8 for 32 pixels tall. -#define ENEMS_COLLISION_VSTRETCH_FG 0 - -// General directives: -// ------------------- - -// Push boxes - -#define PLAYER_PUSH_BOXES // If defined, tile #14 is pushable -#define FIRE_TO_PUSH - -//#define ENABLE_PUSHED_SCRIPT -#define PUSHED_TILE_FLAG 1 -#define PUSHED_TO_X_FLAG 2 -#define PUSHED_TO_Y_FLAG 3 - -// General stuff - -//#define DEACTIVATE_KEYS // If defined, keys are not present. -//#define DEACTIVATE_OBJECTS // If defined, objects are not present. -#define PLAYER_BOUNCES -//#define DOUBLE_BOUNCE -//#define DIE_AND_RESPAWN // If defined, dying = respawn on latest safe. -//#define DIE_AND_REENTER // Reenter screen on death -#define PLAYER_FLICKERS // If defined, collisions make player flicker instead. -#define WALLS_STOP_ENEMIES // If defined, enemies react to the scenary - -// Extra special tiles -// ------------------- - -//#define NO_HORIZONTAL_EVIL_TILE // Only check for evil tiles vertically - -// Quicksands, beh == 2. -// For player movement values, see section 4 -// (PLAYER_VY_SINKING) - -//#define ENABLE_QUICKSANDS - -// Breakable, beh & 16 -#define ENABLE_BREAKABLE // Breakable walls -#define BREAKABLE_LIFE 2 // Amount of hits to break wall -#define BREAKABLE_ANIM // Show explosion when breaking -#define BREAKABLE_MAX 4 // Max # of concurrent explosions -#define BREAKABLE_MAX_FRAMES 8 // Frames to show explosion -#define BREAKABLE_ERASE 29 // Tile to erase broken tiles -#define BREAKABLE_BREAKING 30 // Tile to display while breaking -//#define BREAKABLE_WALKABLE // If defined (side view), tiles break when stepped on - -// Conveyors, beh & 32 [+1] (must be & 8!) -// For player movement values, see section 4 -// (PLAYER_VX_CONVEYORS) - -#define ENABLE_CONVEYORS - -// Slippery, beh & 64. (must be & 12!) -// For player movement values, see section 4 -// (PLAYER_AX_ICE & PLAYER_RX_ICE) - -//#define ENABLE_SLIPPERY - -// Ladders, beh == 32 - -//#define ENABLE_LADDERS - -// Extra special stuff -// ------------------- - -// Propellers - -//#define ENABLE_PROPELLERS -#define PROPELLERS_MAX 4 -#define PROPELLERS_BASE_PATTERN 64 // First of 4 patterns to draw/animate propellers -#define PROPELLERS_MAX_LENGTH 6 // In tiles; undef for infinite -#define PROPELLER_TILE 14 // Tile # in map to detect a propeller -#define PROPELLERS_ON_BY_DEFAULT // Define so propellers are on by default - -// Killing tiles shine, beware! - -//#define ENABLE_SHINES -#define SHINES_MAX 8 -#define SHINES_BASE_PATTERN 10 // In the sprite bank, two patterns needed -#define SHINES_PALETTE 3 -#define SHINING_TILE 23 // Tile # in map to add shines - -// Resonators. Not sure if you need this, but. - -//#define ENABLE_RESONATORS -#define RESONATOR_BASE_PATTERN 0 -#define RESONATOR_PALETTE 3 -#define RESONATOR_COUNTER_OFFS_X 4 -#define RESONATOR_COUNTER_OFFS_Y 7 -//#define RESONATOR_CHANGE_BG_PAL paltsgrey // Define to change pal for this palette -//#define RESONATOR_CHANGE_SPR_PAL palssgrey // Define to change pal for this palette - -// Simple warpers. Put as 0xff type enemies. -// Destination is attr:s1 (n_pant:YX). - -//#define ENABLE_SIMPLE_WARPERS -#define SIMPLE_WARPERS_BASE_SPRID (32+((frame_counter>>2)&3)) -//#define SIMPLE_WARPERS_FIRE_BUTTON - -// No! - -//#define ENABLE_NO -#define NO_METASPRITE ssit_06 -#define NO_OFFS_X 0 -#define NO_OFFS_Y -24 - -// Use animation. -// Note: When activated hotspots need b_button press and, in side view, possee. - -//#define ENABLE_USE_ANIM -#define USE_ANIM_MAX_FRAMES 13 -#define USE_ANIM_INTERACT_ON 7 -#define USE_ANIM_FRAMES_PER_STEP 4 - -// Text boxes. If you need them, you call them - -//#define ENABLE_TEXT_BOX -#define TEXT_BOX_FRAME_TILE_OFFSET 0x20 // We need tiles in the active metatileset to draw the frame -//#define TEXT_BOX_WITH_PORTRAITS // Draw spr_hs [rdd] if != 0 in the text box if defined -//#define TEXT_BOX_DIALOGUES // Add code for dialogues - -// Timer. - -//#define ENABLE_TIMER -#define TIMER_INITIAL 5 -#define TIMER_START_ON -#define TIMER_REFILL 0 -#define TIMER_RESET_ON_ENTER -//#define TIMER_TIME_FLAG 0 // Useful with scripting. Copies time to flag -//#define TIMER_ZERO_FLAG 1 // Useful with scripting. raises flag when time zero -#define TIMER_SOUND 10 // play a sound if timer < value - -// Springs - -//#define ENABLE_SPRINGS -#define SPRING_TILE 10 -#define SPRING_SPIKE_TILE 11 -//#define SPRINGS_ON_BY_DEFAULT - -// Enemy types and definitions -// --------------------------- - -//#define ENEMS_IN_CHRROM // Enems are stored somewhere in CHR-ROM - -#define ENEMS_LIFE_GAUGE 2 // Amount of shots/punches/kicks needed to kill enemies. -//#define ENEMS_FLICKER // Ifdef: flicker, if not: explosion -//#define ENEMS_FLICKER_ONLY_ON_DYING // Flicker, but only when life == 0 -//#define ENEMS_CAN_RESPAWN // Read docs for this. - -#define PERSISTENT_ENEMIES -//#define PERSISTENT_DEATHS - -#define ENEMS_TOUCHED_FRAMES 8 // # frames to stay frozen after hit -#define ENEMS_RECOIL_ON_HIT 1 // horizontal recoil when hit, #ifdef, value is speed in pixels! -//#define ENEMS_RECOIL_OVER_BOUNDARIES // (x1,y1), (x2,y2) boundaries don't stop a recoil - -//#define ENEMS_ENABLE_DYING_FRAME - -#define ENEMS_EXPLODING_CELL 32 -#define ENEMS_EXPLODING_CELLS_HIDES // Define and the baddie will be substituted by the explosion - -#define ENEMS_OCCLUDING_CELL 33 // If you use pezons or saws you need a flame for occlusion - -// Beware: only activate this if enemies are killable by any means: -//#define ENEMIES_SUFFER_ON_PLAYER_COLLISION - -// Fanties / Homing fanties - -//#define ENABLE_FANTY -//#define ENABLE_HOMING_FANTY - -#define FANTY_BASE_SPRID 32 -#define FANTY_WITH_FACING -#define FANTY_COLLIDES -#define FANTY_KILLED_BY_TILE -//#define FANTY_LIFE_GAUGE 5 // Define if you need these to be tougher - -#define FANTY_A 4 -#define FANTY_MAXV 48 - -#define FANTY_DISTANCE 80 -#define FANTY_V_RETREAT 16 - -// Pursuers (for top-down) - -#define ENABLE_PURSUERS // If defined, type 7 enemies are active -#define DEATH_COUNT_EXPRESSION 50+(rand8()&63) -#define TYPE_7_FIXED_SPRITE 4 // If defined, type 7 enemies are always # - -// Saws - -//#define ENABLE_SAW -#define SAW_BASE_SPRID 48 -#define SAW_V_DISPL 4 -#define SAW_EMERGING_STEPS 10 - -// Pezons - -//#define ENABLE_PEZONS -#define PEZONS_BASE_SPRID 40 -#define PEZON_WAIT 50 -#define PEZON_THRUST 384 -#define PEZON_VY_FALLING_MAX 256 -#define PEZON_G 16 - -// Chac chacs - -//#define ENABLE_CHAC_CHAC -#define CHAC_CHAC_BASE_TILE 16 -#define CHAC_CHAC_IDLE_2 16 -#define CHAC_CHAC_IDLE_3 1 -#define CHAC_CHAC_IDLE_4 50 - -//#define CHAC_CHAC_FROM_MAP // Chac chacs are not placed as enemies but as tiles -#define MAX_CHAC_CHACS 4 -#define MAX_CHAC_CHACKS_QUEUED 16 // Make the closest power of 2 >= (MAX_CHAC_CHACS*4) -#define CHAC_CHAC_DETECT_TILE 39 -#define CHAC_CHACS_CLEAR // You are placing chac chacks from map but need the path to be clear - -// Monococos - -//#define ENABLE_MONOCOCOS -//#define MONOCOCO_TYPE_A // Comment for 4 cells monococo (appearing/disappearing & hidden) -#define MONOCOCO_BASE_SPRID 56 -#define MONOCOCO_BASE_TIME_HIDDEN 150 -#define MONOCOCO_BASE_TIME_APPEARING 50 -#define MONOCOCO_BASE_TIME_ONBOARD 50 -#define MONOCOCO_FIRE_COCO_AT MONOCOCO_BASE_TIME_ONBOARD/2 - -// Shooties - -//#define ENABLE_SHOOTIES -#define SHOOTIES_BASE_SPRID 40 -#define SHOOTIES_SHOOT_OFFS_X 16 -#define SHOOTIES_SHOOT_OFFS_Y -2 -#define SHOOT_FREQ (pry+23>=en_y[gpit]&&pry<=en_y[gpit]+23&&((en_facing[gpit]&&en_x[gpit]>prx)||(en_facing[gpit]==0&&en_x[gpit]=en_y[gpit]&&pry<=en_y[gpit]+23&&((en_facing[gpit]&&en_x[gpit]>prx)||(en_facing[gpit]==0&&en_x[gpit] inventory (just 1) -//#define ONLY_ONE_OBJECT_FLAG 0 // If def, use flag [.] instead of pinv - -// Easy objects mode: A range of hotspot id's are considered -// 'objects'. The user can carry one of those. Contents of hotspots -// can change in this mode. - -//#define ENABLE_EASY_OBJECTS - -#define HS_OBJ_EMPTY 4 -#define HS_OBJ_MIN 5 -#define HS_OBJ_MAX 6 -#define HS_USE_OFFS 2 - -#define HS_TYPE_A // If defined, render receptors = HS_OBJ_EMPTY, object used = object - // Otherwise, use its own graphics. -#define HS_FIX_ON_USE // If defined, object N used at N+H_USE_OFFS becomes N+H_USE_OFFS*2 - -// Silly Brawlers -// -------------- -//#define PLAYER_PUNCHES // When on floor -#define PLAYER_PUNCH_OFFS_X 15 -#define PLAYER_PUNCH_OFFS_Y -7 - -//#define PLAYER_KICKS // While airborne -#define PLAYER_KICK_OFFS_X 12 -#define PLAYER_KICK_OFFS_Y -3 - -#define PLAYER_FROZEN_FRAMES 16 // Frames to be frozen when hit landed - -// Shooting behaviour -// ------------------ -#define PLAYER_CAN_FIRE // If defined, shooting engine is enabled. -#define PLAYER_BULLET_SPEED 4 // Pixels/frame. -#define MAX_BULLETS 4 // Max number of bullets on screen. Be careful!. -#define PLAYER_BULLET_Y_OFFSET 6 // vertical offset from the player's top. -#define PLAYER_BULLET_X_OFFSET -3 // vertical offset from the player's left/right. -#define PLAYER_BULLETS_MIN_KILLABLE 3 // If defined, only enemies >= N can be killed. -//#define BULLETS_DONT_KILL // Bullets don't kill, but affect enemies otherwise - -// Special shooting -//#define PLAYER_FIRE_RELOAD 16 // If defined # of frames until next shoot -//#define PLAYER_CHARGE_AND_FIRE // If defined, press B to charge, release to fire - #define PLAYER_CHARGE_MIN 8 - #define PLAYER_CHARGE_MAX 48 // Min/max frames for charging -//#define PLAYER_BULLET_LIFE pfiregauge // Max life. Can be whatever. -//#define PLAYER_BULLET_FLICKERS 8 // Bullets flickers for N frames before dying, if defined - -#define MAX_AMMO 99 // If defined, ammo is not infinite! - #define AMMO_REFILL 50 // type 3 hotspots refill amo, using tile 20 - //#define INITIAL_AMMO 0 // If defined, ammo = X when entering game. - -#define BULLET_PALETTE 3 -#define BULLET_PATTERN 0 // To paint the bullet. Can be an expresion. - -// Scripting -// --------- - -#define ACTIVATE_SCRIPTING // Activates msc scripting and flag related stuff. -#define CLEAR_FLAGS // Zero all flags when entering a level - -//#define FIRE_ON_KILL // run fire script on enemy kill - -//#define ENABLE_EXTERN_CODE // Enables custom code to be run from the script using EXTERN n -#define ENABLE_FIRE_ZONE // Allows to define a zone which auto-triggers "FIRE" - -// Interactives -// ------------ - -//#define ENABLE_INTERACTIVES // Graphical flag representations! -#define INTERACTIVES_MAX 4 // As per screen -#define FLAG_INVENTORY 0 -//#define INTERACTIVES_ONLY_SPRITES // If you are using other means for items and just need sprites - -// Top view: -// --------- - -#define PLAYER_TOP_DOWN // Enable top view. -#define TOP_OVER_SIDE // UP/DOWN has priority over LEFT/RIGHT - -// Side view: -// ---------- - -//#define PLAYER_HAS_JUMP // If defined, player is able to jump. -//#define PLAYER_JUMP_TYPE_MK2 // Use MK2 method for jump / gravity / release -//#define PLAYER_AUTO_JUMP // Automatic jump when hitting the floor -//#define PLAYER_SWIMS // If defined, player swims a la Ninjajar! -//#define PLAYER_HAS_JETPAC // If defined, player can thrust a vertical jetpac -//#define PLAYER_STEPS_ON_ENEMS // If defined, stepping on enemies kills them -//#define PLAYER_STEPS_STRICT // Only registers advantage hit when pvy > PLAYER_VY_FALLING_MIN -//#define PLAYER_SAFE_LANDING // Step over vertical inverts direction -//#define PLAYER_STEPS_MIN_KILLABLE 0xff // Only kill enemies with id >= PLAYER_STEPS_MIN_KILLABLE - // 0xff = Nobody - -// ============================================================================ -// III. Screen configuration -// ============================================================================ - -// This sections defines how stuff is rendered, where to show counters, etcetera - -#define LIFE_X 3 // -#define LIFE_Y 29 // Life gauge counter character coordinates - -#define OBJECTS_X 27 // -#define OBJECTS_Y 29 // Objects counter character coordinates -//#define OBJECTS_REMAINING // Show # remaining instead of got - -#define KEYS_X 22 // -#define KEYS_Y 29 // Keys counter character coordinates - -//#define KILLED_X 16 // -//#define KILLED_Y 2 // Kills counter character coordinates - -#define AMMO_X 8 // -#define AMMO_Y 29 // Ammo counter character coordinates - -//#define HS_INV_X 160 // -//#define HS_INV_Y 15 // Object you are carrying - -//#define TIMER_X 0 // -//#define TIMER_Y 5 // Current timer value - -// Text -#define LINE_OF_TEXT 26 // If defined, scripts can show text @ Y = # -#define LINE_OF_TEXT_X 1 // X coordinate. - -// ============================================================================ -// IV. Player movement configuration -// ============================================================================ - -// This section is used to define which constants are used in the gravity/acceleration engine. -// If a side-view engine is configured, we have to define vertical and horizontal constants -// separately. If a top-view engine is configured instead, the horizontal values are also -// applied to the vertical component, vertical values are ignored. - -// IV.1. Vertical movement. Only for side-view. - -#define PLAYER_VY_FALLING_MAX 256 // Max. velocity when falling -#define PLAYER_VY_FALLING_MIN 64 // Use for animating if you need -#define PLAYER_VY_SINKING 2 -#define PLAYER_G 16 // Gravity - -#define PLAYER_VY_JUMP_INITIAL 64 -#define PLAYER_VY_JUMP_MAX 192 // Max. velocity when jumping -#define PLAYER_AY_JUMP 12 // Jumpin acceleration - -#define PLAYER_AY_JETPAC 32 // Jetpac increment -#define PLAYER_VY_JETPAC_MAX 256 // Max jetpac vertical speed - -#define PLAYER_AY_SWIM 8 // Swimming acceleration. -#define PLAYER_VY_SWIM_MAX 64 // Swimming max. speed - -#define PLAYER_VY_LADDERS 96 - -#define PLAYER_AY_FLOAT 16 -#define PLAYER_VY_FLOAT_MAX 256 - -#define PLAYER_AY_UNTHRUST 8 // Used in the Autojump engine. - -// IV.1.b MK2 style jump (overrides PLAYER_?Y_JUMP_* defined before!) -// (Used if PLAYER_JUMP_TYPE_MK2 is defined) -#define PLAYER_G_MK2_JUMPING 4 -#define PLAYER_VY_MK2_JUMP_INITIAL 208 -#define PLAYER_VY_MK2_JUMP_RELEASE 96 -#define PLAYER_VY_MK2_JUMP_A_STEPS 16 - -// IV.2. Horizontal (side view) or general (top view) movement. - -#define PLAYER_VX_MAX 128 // Max. horizontal speed -#define PLAYER_VX_CONVEYORS 64 -#define PLAYER_AX 24 // Horizontal acceleration -#define PLAYER_AX_ICE 4 -#define PLAYER_RX 32 // Horizontal friction -#define PLAYER_RX_ICE 2 - -#define PLAYER_VX_MIN (PLAYER_AX << 2) - -#define PLAYER_V_REBOUND 224 - -// Animation cells - -#ifdef PLAYER_TOP_DOWN - - // Cell definitions for top-down view - - #define CELL_FACING_RIGHT 0 - #define CELL_FACING_LEFT 2 - #define CELL_FACING_UP 4 - #define CELL_FACING_DOWN 6 - - #define CELL_IDLE 0 - #define CELL_WALK_CYCLE 1 - #define CELL_PUSHING 5 - - #define CELL_USE 24 - -#else - - // Cell definitions for side view - - #define CELL_FACING_RIGHT 0 - #define CELL_FACING_LEFT 8 - - #define CELL_IDLE 0 - #define CELL_WALK_INIT 1 - #define CELL_WALK_CYCLE 1 - #define CELL_AIRBORNE 5 - #define CELL_ASCENDING 5 - #define CELL_DESCENDING 6 - - #define CELL_SWIM_CYCLE 6 - - #define CELL_USE 6 - - #define CELL_PUNCHING 8 - #define CELL_KICKING 9 - - #define CELL_CLIMB_CYCLE 20 - #define CELL_CLIMB_HALF 29 -#endif - -// Music - -#define MUSIC_INGAME 0 -#define MUSIC_TITLE 1 -#define MUSIC_GAME_OVER 2 - -// SFX - -#define SFX_START 0 -#define SFX_TILE 1 -#define SFX_OBJECT 2 -#define SFX_USE 3 -#define SFX_PHIT 4 -#define SFX_DUMMY1 5 -#define SFX_ENHIT 6 -#define SFX_DUMMY2 7 -#define SFX_JUMP 8 -#define SFX_BULLET 9 -#define SFX_COCO 10 -#define SFX_SPRING 11 -#define SFX_COUNT 12 -#define SFX_BREAKH 13 -#define SFX_HITTER 14 -#define SFX_STEPON 15 -#define SFX_FLOAT 16 -#define SFX_BREAKB 17 diff --git a/testers/01_tester_top_down/map/level1.BAK b/testers/01_tester_top_down/map/level1.BAK deleted file mode 100644 index d13cb60..0000000 Binary files a/testers/01_tester_top_down/map/level1.BAK and /dev/null differ diff --git a/testers/02_tester_punchy/dev/config.h.bak b/testers/02_tester_punchy/dev/config.h.bak deleted file mode 100644 index 5d9fce8..0000000 --- a/testers/02_tester_punchy/dev/config.h.bak +++ /dev/null @@ -1,623 +0,0 @@ -// NES MK1 v1.0 -// Copyleft Mojon Twins 2013, 2015, 2017, 2018 - -//#define GAME_AREA_TOP -#define GAME_AREA_MIDDLE -//#define GAME_AREA_BOTTOM -//#define GAME_AREA_CUSTOM - -// ============================================================================ -// I. General configuration -// ============================================================================ - -// In this section we define map dimmensions, initial and authomatic ending conditions, etc. - -#define MAP_W 16 // -#define MAP_H 1 // Map dimensions in screens -#define MAP_SIZE MAP_W*MAP_H - -#define PLAYER_LIFE 5 // Max / Initial life -#define PLAYER_REFILL 1 // Life refill - -//#define MULTI_LEVEL // Comment for single level -#define MAX_LEVELS 1 - -#define MAX_FLAGS 2 // Keep it low if you don't need flags - -#ifndef MULTI_LEVEL - - // If you aim for a single level ROM, fill in those: - - #define SCR_INI 0 // Initial screen - #define PLAYER_INI_X 2 // - #define PLAYER_INI_Y 3 // Initial position - //#define SCR_END 99 // Final screen, undefine if N/A - #define PLAYER_END_X 99 // - #define PLAYER_END_Y 99 // Ending position - #define PLAYER_MAX_OBJECTS 25 // Objects to finish game - -#else - - // If you want multiple levels, please don't touch this much. - // Just comment SCR_END and / or PLAYER_MAX_OBJECTS if N/A. - // You should be fiddling with assets/levelset.h - - #define SCR_INI (l_scr_ini [level]) - #define PLAYER_INI_X (l_ini_x [level]) - #define PLAYER_INI_Y (l_ini_y [level]) - //#define SCR_END (l_scr_end [level]) - #define PLAYER_END_X (l_end_x [level]) - #define PLAYER_END_Y (l_end_y [level]) - #define PLAYER_MAX_OBJECTS (l_player_max_objects [level]) - -#endif - -// Some flexibility -#define HOTSPOT_TYPE_OBJECT 1 -#define HOTSPOT_TYPE_KEYS 2 -#define HOTSPOT_TYPE_REFILL 3 -//#define HOTSPOT_TYPE_AMMO 4 -//#define HOTSPOT_TYPE_TIME 5 // For time refills - -//#define HOTSPOT_TYPE_RESONATOR 4 // An example of custom hotspot - -//#define WIN_LEVEL_CUSTOM // A level ends when win_level == 1 - // And such a thing has to be setup by YOU - -//#define MAP_FORMAT_PACKED // Each byte in map data = 2 tiles, 16 tiles max. -#define MAP_FORMAT_RLE16 // RLE'd by rlemap2. 16 tiles max. -//#define MAP_FORMAT_RLE53 // RLE'd by rle53mapMK1. 32 tiles max. -//#define MAP_FORMAT_RLE44 // RLE'd by rle44mapMK1. 16 tiles max. -//#define MAP_FORMAT_RLE53_CHRROM // RLE'd by rle53mapchrrom and stored in CHR-ROM. 32 tiles max. -//#define MAP_FORMAT_RLE44_CHRROM // RLE'd by rle44mapchrrom and stored in CHR-ROM. 16 tiles max. - -//#define MAP_WITH_DECORATIONS // Add decorations when use a 16 tiles mode. - -// Use the complex renderer if you need to post-process the map buffer before -// printing. - -#define MAP_RENDERER_COMPLEX // Comment for the simple, old renderer - -// ============================================================================ -// II. Engine type -// ============================================================================ - -// This section is used to define the game engine behaviour. Many directives are related, -// and others are mutually exclusive. I think this will be pretty obvious when you look at them. - -// Right now the shooting engine is only compatible with the side-view engine. - -// Bounding box size -// ----------------- - -// Player is 8x16 for collision with BG but can be made taller by this amount. Negative values=shorter -#define PLAYER_COLLISION_VSTRETCH_BG 8 - -// This defines how the player will collide with enemies. -// Player is always 8 pixels wide and 16 pixel tall PLUS the value of this variable. -// this offset goes to the head. -// So if you define it as -8, the collision box will be 8x8 bottom centerd. -// And if you define it as 4 the collision box will be 8x20 bottom centered. -// For 16x24 sprites it's safe to leave it at 0. For 16x16 should be better -2. -#define PLAYER_COLLISION_VSTRETCH_FG 8 - -// Same for enemies. -// I usually leave it at 0 for <=24 pixels tall, 8 for 32 pixels tall. -#define ENEMS_COLLISION_VSTRETCH_FG 8 - -// General directives: -// ------------------- - -// Push boxes - -//#define PLAYER_PUSH_BOXES // If defined, tile #14 is pushable -#define FIRE_TO_PUSH - -//#define ENABLE_PUSHED_SCRIPT -#define PUSHED_TILE_FLAG 1 -#define PUSHED_TO_X_FLAG 2 -#define PUSHED_TO_Y_FLAG 3 - -// General stuff - -#define DEACTIVATE_KEYS // If defined, keys are not present. -//#define DEACTIVATE_OBJECTS // If defined, objects are not present. -//#define PLAYER_BOUNCES -//#define DOUBLE_BOUNCE -#define DIE_AND_RESPAWN // If defined, dying = respawn on latest safe. -#define DIE_AND_REENTER // Reenter screen on death -#define PLAYER_FLICKERS // If defined, collisions make player flicker instead. -//#define WALLS_STOP_ENEMIES // If defined, enemies react to the scenary - -// Extra special tiles -// ------------------- - -#define NO_HORIZONTAL_EVIL_TILE // Only check for evil tiles vertically - -// Quicksands, beh == 2. -// For player movement values, see section 4 -// (PLAYER_VY_SINKING) - -//#define ENABLE_QUICKSANDS - -// Breakable, beh & 16 -#define ENABLE_BREAKABLE // Breakable walls -#define BREAKABLE_LIFE 1 // Amount of hits to break wall -#define BREAKABLE_ANIM // Show explosion when breaking -#define BREAKABLE_MAX 4 // Max # of concurrent explosions -#define BREAKABLE_MAX_FRAMES 16 // Frames to show explosion -#define BREAKABLE_ERASE 0 // Tile to erase broken tiles -#define BREAKABLE_BREAKING 31 // Tile to display while breaking -//#define BREAKABLE_WALKABLE // If defined (side view), tiles break when stepped on - -// Conveyors, beh & 32 [+1] (must be & 8!) -// For player movement values, see section 4 -// (PLAYER_VX_CONVEYORS) - -//#define ENABLE_CONVEYORS - -// Slippery, beh & 64. (must be & 12!) -// For player movement values, see section 4 -// (PLAYER_AX_ICE & PLAYER_RX_ICE) - -//#define ENABLE_SLIPPERY - -// Ladders, beh == 32 - -#define ENABLE_LADDERS - -// Extra special stuff -// ------------------- - -// Propellers - -#define ENABLE_PROPELLERS -#define PROPELLERS_MAX 4 -#define PROPELLERS_BASE_PATTERN 64 // First of 4 patterns to draw/animate propellers -#define PROPELLERS_MAX_LENGTH 6 // In tiles; undef for infinite -#define PROPELLER_TILE 14 // Tile # in map to detect a propeller -#define PROPELLERS_ON_BY_DEFAULT // Define so propellers are on by default - -// Killing tiles shine, beware! - -//#define ENABLE_SHINES -#define SHINES_MAX 8 -#define SHINES_BASE_PATTERN 10 // In the sprite bank, two patterns needed -#define SHINES_PALETTE 3 -#define SHINING_TILE 23 // Tile # in map to add shines - -// Resonators. Not sure if you need this, but. - -//#define ENABLE_RESONATORS -#define RESONATOR_BASE_PATTERN 0 -#define RESONATOR_PALETTE 3 -#define RESONATOR_COUNTER_OFFS_X 4 -#define RESONATOR_COUNTER_OFFS_Y 7 -//#define RESONATOR_CHANGE_BG_PAL paltsgrey // Define to change pal for this palette -//#define RESONATOR_CHANGE_SPR_PAL palssgrey // Define to change pal for this palette - -// Simple warpers. Put as 0xff type enemies. -// Destination is attr:s1 (n_pant:YX). - -#define ENABLE_SIMPLE_WARPERS -#define SIMPLE_WARPERS_BASE_SPRID (48+((frame_counter>>2)&3)) -#define SIMPLE_WARPERS_FIRE_BUTTON - -// No! - -//#define ENABLE_NO -#define NO_METASPRITE ssit_06 -#define NO_OFFS_X 0 -#define NO_OFFS_Y -24 - -// Use animation. -// Note: When activated hotspots need b_button press and, in side view, possee. - -//#define ENABLE_USE_ANIM -#define USE_ANIM_MAX_FRAMES 13 -#define USE_ANIM_INTERACT_ON 7 -#define USE_ANIM_FRAMES_PER_STEP 4 - -// Text boxes. If you need them, you call them - -//#define ENABLE_TEXT_BOX -#define TEXT_BOX_FRAME_TILE_OFFSET 0x20 // We need tiles in the active metatileset to draw the frame -//#define TEXT_BOX_WITH_PORTRAITS // Draw spr_hs [rdd] if != 0 in the text box if defined -//#define TEXT_BOX_DIALOGUES // Add code for dialogues - -// Timer. - -//#define ENABLE_TIMER -#define TIMER_INITIAL 5 -#define TIMER_START_ON -#define TIMER_REFILL 0 -#define TIMER_RESET_ON_ENTER -//#define TIMER_TIME_FLAG 0 // Useful with scripting. Copies time to flag -//#define TIMER_ZERO_FLAG 1 // Useful with scripting. raises flag when time zero -#define TIMER_SOUND 10 // play a sound if timer < value - -// Springs - -//#define ENABLE_SPRINGS -#define SPRING_TILE 10 -#define SPRING_SPIKE_TILE 11 -//#define SPRINGS_ON_BY_DEFAULT - -// Enemy types and definitions -// --------------------------- - -//#define ENEMS_IN_CHRROM // Enems are stored somewhere in CHR-ROM - -#define ENEMS_LIFE_GAUGE 3 // Amount of shots/punches/kicks needed to kill enemies. -#define ENEMS_FLICKER // Ifdef: flicker, if not: explosion -#define ENEMS_FLICKER_ONLY_ON_DYING // Flicker, but only when life == 0 -#define ENEMS_CAN_RESPAWN // Read docs for this. - -//#define PERSISTENT_ENEMIES -//#define PERSISTENT_DEATHS - -#define ENEMS_TOUCHED_FRAMES 8 // # frames to stay frozen after hit -#define ENEMS_RECOIL_ON_HIT 2 // horizontal recoil when hit, #ifdef, value is speed in pixels! -//#define ENEMS_RECOIL_OVER_BOUNDARIES // (x1,y1), (x2,y2) boundaries don't stop a recoil - -//#define ENEMS_ENABLE_DYING_FRAME - -#define ENEMS_EXPLODING_CELL 32 -#define ENEMS_EXPLODING_CELLS_HIDES // Define and the baddie will be substituted by the explosion - -#define ENEMS_OCCLUDING_CELL 33 // If you use pezons or saws you need a flame for occlusion - -// Beware: only activate this if enemies are killable by any means: -//#define ENEMIES_SUFFER_ON_PLAYER_COLLISION - -// Fanties / Homing fanties - -//#define ENABLE_FANTY -//#define ENABLE_HOMING_FANTY - -#define FANTY_BASE_SPRID 32 -#define FANTY_WITH_FACING -#define FANTY_COLLIDES -#define FANTY_KILLED_BY_TILE -//#define FANTY_LIFE_GAUGE 5 // Define if you need these to be tougher - -#define FANTY_A 4 -#define FANTY_MAXV 48 - -#define FANTY_DISTANCE 80 -#define FANTY_V_RETREAT 16 - -// Pursuers (for top-down) - -//#define ENABLE_PURSUERS // If defined, type 7 enemies are active -#define DEATH_COUNT_EXPRESSION 50+(rand8()&63) -#define TYPE_7_FIXED_SPRITE 4 // If defined, type 7 enemies are always # - -// Saws - -//#define ENABLE_SAW -#define SAW_BASE_SPRID 48 -#define SAW_V_DISPL 4 -#define SAW_EMERGING_STEPS 10 - -// Pezons - -//#define ENABLE_PEZONS -#define PEZONS_BASE_SPRID 40 -#define PEZON_WAIT 50 -#define PEZON_THRUST 384 -#define PEZON_VY_FALLING_MAX 256 -#define PEZON_G 16 - -// Chac chacs - -//#define ENABLE_CHAC_CHAC -#define CHAC_CHAC_BASE_TILE 16 -#define CHAC_CHAC_IDLE_2 16 -#define CHAC_CHAC_IDLE_3 1 -#define CHAC_CHAC_IDLE_4 50 - -//#define CHAC_CHAC_FROM_MAP // Chac chacs are not placed as enemies but as tiles -#define MAX_CHAC_CHACS 4 -#define MAX_CHAC_CHACKS_QUEUED 16 // Make the closest power of 2 >= (MAX_CHAC_CHACS*4) -#define CHAC_CHAC_DETECT_TILE 39 -#define CHAC_CHACS_CLEAR // You are placing chac chacks from map but need the path to be clear - -// Monococos - -//#define ENABLE_MONOCOCOS -//#define MONOCOCO_TYPE_A // Comment for 4 cells monococo (appearing/disappearing & hidden) -#define MONOCOCO_BASE_SPRID 56 -#define MONOCOCO_BASE_TIME_HIDDEN 150 -#define MONOCOCO_BASE_TIME_APPEARING 50 -#define MONOCOCO_BASE_TIME_ONBOARD 50 -#define MONOCOCO_FIRE_COCO_AT MONOCOCO_BASE_TIME_ONBOARD/2 - -// Shooties - -#define ENABLE_SHOOTIES -#define SHOOTIES_BASE_SPRID 40 -#define SHOOTIES_SHOOT_OFFS_X 16 -#define SHOOTIES_SHOOT_OFFS_Y -2 -#define SHOOT_FREQ (pry+23>=en_y[gpit]&&pry<=en_y[gpit]+23&&((en_facing[gpit]&&en_x[gpit]>prx)||(en_facing[gpit]==0&&en_x[gpit]=en_y[gpit]&&pry<=en_y[gpit]+23&&((en_facing[gpit]&&en_x[gpit]>prx)||(en_facing[gpit]==0&&en_x[gpit] inventory (just 1) -//#define ONLY_ONE_OBJECT_FLAG 0 // If def, use flag [.] instead of pinv - -// Easy objects mode: A range of hotspot id's are considered -// 'objects'. The user can carry one of those. Contents of hotspots -// can change in this mode. - -//#define ENABLE_EASY_OBJECTS - -#define HS_OBJ_EMPTY 4 -#define HS_OBJ_MIN 5 -#define HS_OBJ_MAX 6 -#define HS_USE_OFFS 2 - -#define HS_TYPE_A // If defined, render receptors = HS_OBJ_EMPTY, object used = object - // Otherwise, use its own graphics. -#define HS_FIX_ON_USE // If defined, object N used at N+H_USE_OFFS becomes N+H_USE_OFFS*2 - -// Silly Brawlers -// -------------- -#define PLAYER_PUNCHES // When on floor -#define PLAYER_PUNCH_OFFS_X 15 -#define PLAYER_PUNCH_OFFS_Y -7 - -#define PLAYER_KICKS // While airborne -#define PLAYER_KICK_OFFS_X 12 -#define PLAYER_KICK_OFFS_Y -3 - -#define PLAYER_FROZEN_FRAMES 16 // Frames to be frozen when hit landed - -// Shooting behaviour -// ------------------ -//#define PLAYER_CAN_FIRE // If defined, shooting engine is enabled. -#define PLAYER_BULLET_SPEED 4 // Pixels/frame. -#define MAX_BULLETS 4 // Max number of bullets on screen. Be careful!. -#define PLAYER_BULLET_Y_OFFSET 6 // vertical offset from the player's top. -#define PLAYER_BULLET_X_OFFSET -4 // vertical offset from the player's left/right. -//#define PLAYER_BULLETS_MIN_KILLABLE 3 // If defined, only enemies >= N can be killed. -//#define BULLETS_DONT_KILL // Bullets don't kill, but affect enemies otherwise - -// Special shooting -//#define PLAYER_FIRE_RELOAD 16 // If defined # of frames until next shoot -//#define PLAYER_CHARGE_AND_FIRE // If defined, press B to charge, release to fire - #define PLAYER_CHARGE_MIN 8 - #define PLAYER_CHARGE_MAX 48 // Min/max frames for charging -//#define PLAYER_BULLET_LIFE pfiregauge // Max life. Can be whatever. -//#define PLAYER_BULLET_FLICKERS 8 // Bullets flickers for N frames before dying, if defined - -//#define MAX_AMMO 99 // If defined, ammo is not infinite! - #define AMMO_REFILL 50 // type 3 hotspots refill amo, using tile 20 - //#define INITIAL_AMMO 0 // If defined, ammo = X when entering game. - -#define BULLET_PALETTE 3 -#define BULLET_PATTERN 0 // To paint the bullet. Can be an expresion. - -// Scripting -// --------- - -//#define ACTIVATE_SCRIPTING // Activates msc scripting and flag related stuff. -//#define CLEAR_FLAGS // Zero all flags when entering a level - -//#define FIRE_ON_KILL // run fire script on enemy kill - -//#define ENABLE_EXTERN_CODE // Enables custom code to be run from the script using EXTERN n -//#define ENABLE_FIRE_ZONE // Allows to define a zone which auto-triggers "FIRE" - -// Interactives -// ------------ - -//#define ENABLE_INTERACTIVES // Graphical flag representations! -#define INTERACTIVES_MAX 4 // As per screen -#define FLAG_INVENTORY 0 -//#define INTERACTIVES_ONLY_SPRITES // If you are using other means for items and just need sprites - -// Top view: -// --------- - -//#define PLAYER_TOP_DOWN // Enable top view. -//#define TOP_OVER_SIDE // UP/DOWN has priority over LEFT/RIGHT - -// Side view: -// ---------- - -#define PLAYER_HAS_JUMP // If defined, player is able to jump. -//#define PLAYER_JUMP_TYPE_MK2 // Use MK2 method for jump / gravity / release -//#define PLAYER_AUTO_JUMP // Automatic jump when hitting the floor -//#define PLAYER_SWIMS // If defined, player swims a la Ninjajar! -//#define PLAYER_HAS_JETPAC // If defined, player can thrust a vertical jetpac -//#define PLAYER_STEPS_ON_ENEMS // If defined, stepping on enemies kills them -//#define PLAYER_STEPS_STRICT // Only registers advantage hit when pvy > PLAYER_VY_FALLING_MIN -//#define PLAYER_SAFE_LANDING // Step over vertical inverts direction -//#define PLAYER_STEPS_MIN_KILLABLE 0xff // Only kill enemies with id >= PLAYER_STEPS_MIN_KILLABLE - // 0xff = Nobody - -// ============================================================================ -// III. Screen configuration -// ============================================================================ - -// This sections defines how stuff is rendered, where to show counters, etcetera - -#define LIFE_X 7 // -#define LIFE_Y 3 // Life gauge counter character coordinates - -#define OBJECTS_X 18 // -#define OBJECTS_Y 3 // Objects counter character coordinates -#define OBJECTS_REMAINING // Show # remaining instead of got - -#define KEYS_X 28 // -#define KEYS_Y 3 // Keys counter character coordinates - -//#define KILLED_X 16 // -//#define KILLED_Y 2 // Kills counter character coordinates - -//#define AMMO_X 8 // -//#define AMMO_Y 2 // Ammo counter character coordinates - -//#define HS_INV_X 160 // -//#define HS_INV_Y 15 // Object you are carrying - -//#define TIMER_X 0 // -//#define TIMER_Y 5 // Current timer value - -// Text -//#define LINE_OF_TEXT 26 // If defined, scripts can show text @ Y = # -//#define LINE_OF_TEXT_X 1 // X coordinate. - -// ============================================================================ -// IV. Player movement configuration -// ============================================================================ - -// This section is used to define which constants are used in the gravity/acceleration engine. -// If a side-view engine is configured, we have to define vertical and horizontal constants -// separately. If a top-view engine is configured instead, the horizontal values are also -// applied to the vertical component, vertical values are ignored. - -// IV.1. Vertical movement. Only for side-view. - -#define PLAYER_VY_FALLING_MAX 256 // Max. velocity when falling -#define PLAYER_VY_FALLING_MIN 64 // Use for animating if you need -#define PLAYER_VY_SINKING 2 -#define PLAYER_G 16 // Gravity - -#define PLAYER_VY_JUMP_INITIAL 64 -#define PLAYER_VY_JUMP_MAX 192 // Max. velocity when jumping -#define PLAYER_AY_JUMP 12 // Jumpin acceleration - -#define PLAYER_AY_JETPAC 32 // Jetpac increment -#define PLAYER_VY_JETPAC_MAX 256 // Max jetpac vertical speed - -#define PLAYER_AY_SWIM 8 // Swimming acceleration. -#define PLAYER_VY_SWIM_MAX 64 // Swimming max. speed - -#define PLAYER_VY_LADDERS 96 - -#define PLAYER_AY_FLOAT 16 -#define PLAYER_VY_FLOAT_MAX 256 - -#define PLAYER_AY_UNTHRUST 8 // Used in the Autojump engine. - -// IV.1.b MK2 style jump (overrides PLAYER_?Y_JUMP_* defined before!) -// (Used if PLAYER_JUMP_TYPE_MK2 is defined) -#define PLAYER_G_MK2_JUMPING 4 -#define PLAYER_VY_MK2_JUMP_INITIAL 208 -#define PLAYER_VY_MK2_JUMP_RELEASE 96 -#define PLAYER_VY_MK2_JUMP_A_STEPS 16 - -// IV.2. Horizontal (side view) or general (top view) movement. - -#define PLAYER_VX_MAX 128 // Max. horizontal speed -#define PLAYER_VX_CONVEYORS 64 -#define PLAYER_AX 16 // Horizontal acceleration -#define PLAYER_AX_ICE 4 -#define PLAYER_RX 16 // Horizontal friction -#define PLAYER_RX_ICE 2 - -#define PLAYER_VX_MIN (PLAYER_AX << 2) - -#define PLAYER_V_REBOUND 224 - -// Animation cells - -#ifdef PLAYER_TOP_DOWN - - // Cell definitions for top-down view - - #define CELL_FACING_RIGHT 0 - #define CELL_FACING_LEFT 6 - #define CELL_FACING_UP 18 - #define CELL_FACING_DOWN 12 - - #define CELL_IDLE 0 - #define CELL_WALK_CYCLE 1 - #define CELL_PUSHING 5 - - #define CELL_USE 24 - -#else - - // Cell definitions for side view - - #define CELL_FACING_RIGHT 0 - #define CELL_FACING_LEFT 10 - - #define CELL_IDLE 0 - #define CELL_WALK_INIT 1 - #define CELL_WALK_CYCLE 2 - #define CELL_AIRBORNE 5 - #define CELL_ASCENDING 6 - #define CELL_DESCENDING 7 - - #define CELL_SWIM_CYCLE 6 - - #define CELL_USE 6 - - #define CELL_PUNCHING 8 - #define CELL_KICKING 9 - - #define CELL_CLIMB_CYCLE 20 - #define CELL_CLIMB_HALF 29 -#endif - -// Music - -#define MUSIC_INGAME 0 - -// SFX - -#define SFX_START 0 -#define SFX_TILE 1 -#define SFX_OBJECT 2 -#define SFX_USE 3 -#define SFX_PHIT 4 -#define SFX_DUMMY1 5 -#define SFX_ENHIT 6 -#define SFX_DUMMY2 7 -#define SFX_JUMP 8 -#define SFX_BULLET 9 -#define SFX_COCO 10 -#define SFX_SPRING 11 -#define SFX_COUNT 12 -#define SFX_BREAKH 13 -#define SFX_HITTER 14 -#define SFX_STEPON 15 -#define SFX_FLOAT 16 -#define SFX_BREAKB 17 diff --git a/testers/03_tester_interactives/dev/config.h.bak b/testers/03_tester_interactives/dev/config.h.bak deleted file mode 100644 index eab09e6..0000000 --- a/testers/03_tester_interactives/dev/config.h.bak +++ /dev/null @@ -1,623 +0,0 @@ -// NES MK1 v1.0 -// Copyleft Mojon Twins 2013, 2015, 2017, 2018 - -//#define GAME_AREA_TOP -#define GAME_AREA_MIDDLE -//#define GAME_AREA_BOTTOM -//#define GAME_AREA_CUSTOM - -// ============================================================================ -// I. General configuration -// ============================================================================ - -// In this section we define map dimmensions, initial and authomatic ending conditions, etc. - -#define MAP_W 1 // -#define MAP_H 5 // Map dimensions in screens -#define MAP_SIZE MAP_W*MAP_H - -#define PLAYER_LIFE 5 // Max / Initial life -#define PLAYER_REFILL 1 // Life refill - -//#define MULTI_LEVEL // Comment for single level -#define MAX_LEVELS 1 - -#define MAX_FLAGS 16 // Keep it low if you don't need flags - -#ifndef MULTI_LEVEL - - // If you aim for a single level ROM, fill in those: - - #define SCR_INI 0 // Initial screen - #define PLAYER_INI_X 0xe // - #define PLAYER_INI_Y 0x9 // Initial position - //#define SCR_END 99 // Final screen, undefine if N/A - #define PLAYER_END_X 99 // - #define PLAYER_END_Y 99 // Ending position - #define PLAYER_MAX_OBJECTS 25 // Objects to finish game - -#else - - // If you want multiple levels, please don't touch this much. - // Just comment SCR_END and / or PLAYER_MAX_OBJECTS if N/A. - // You should be fiddling with assets/levelset.h - - #define SCR_INI (l_scr_ini [level]) - #define PLAYER_INI_X (l_ini_x [level]) - #define PLAYER_INI_Y (l_ini_y [level]) - //#define SCR_END (l_scr_end [level]) - #define PLAYER_END_X (l_end_x [level]) - #define PLAYER_END_Y (l_end_y [level]) - #define PLAYER_MAX_OBJECTS (l_player_max_objects [level]) - -#endif - -// Some flexibility -#define HOTSPOT_TYPE_OBJECT 1 -#define HOTSPOT_TYPE_KEYS 2 -#define HOTSPOT_TYPE_REFILL 3 -//#define HOTSPOT_TYPE_AMMO 4 -//#define HOTSPOT_TYPE_TIME 5 // For time refills - -//#define HOTSPOT_TYPE_RESONATOR 4 // An example of custom hotspot - -//#define WIN_LEVEL_CUSTOM // A level ends when win_level == 1 - // And such a thing has to be setup by YOU - -//#define MAP_FORMAT_PACKED // Each byte in map data = 2 tiles, 16 tiles max. -//#define MAP_FORMAT_RLE16 // RLE'd by rlemap2. 16 tiles max. -#define MAP_FORMAT_RLE53 // RLE'd by rle53mapMK1. 32 tiles max. -//#define MAP_FORMAT_RLE44 // RLE'd by rle44mapMK1. 16 tiles max. -//#define MAP_FORMAT_RLE53_CHRROM // RLE'd by rle53mapchrrom and stored in CHR-ROM. 32 tiles max. -//#define MAP_FORMAT_RLE44_CHRROM // RLE'd by rle44mapchrrom and stored in CHR-ROM. 16 tiles max. - -//#define MAP_WITH_DECORATIONS // Add decorations when use a 16 tiles mode. - -// Use the complex renderer if you need to post-process the map buffer before -// printing. - -#define MAP_RENDERER_COMPLEX // Comment for the simple, old renderer - -// ============================================================================ -// II. Engine type -// ============================================================================ - -// This section is used to define the game engine behaviour. Many directives are related, -// and others are mutually exclusive. I think this will be pretty obvious when you look at them. - -// Right now the shooting engine is only compatible with the side-view engine. - -// Bounding box size -// ----------------- - -// Player is 8x16 for collision with BG but can be made taller by this amount. Negative values=shorter -#define PLAYER_COLLISION_VSTRETCH_BG -4 - -// This defines how the player will collide with enemies. -// Player is always 8 pixels wide and 16 pixel tall PLUS the value of this variable. -// this offset goes to the head. -// So if you define it as -8, the collision box will be 8x8 bottom centerd. -// And if you define it as 4 the collision box will be 8x20 bottom centered. -// For 16x24 sprites it's safe to leave it at 0. For 16x16 should be better -2. -#define PLAYER_COLLISION_VSTRETCH_FG -4 - -// Same for enemies. -// I usually leave it at 0 for <=24 pixels tall, 8 for 32 pixels tall. -#define ENEMS_COLLISION_VSTRETCH_FG 0 - -// General directives: -// ------------------- - -// Push boxes - -//#define PLAYER_PUSH_BOXES // If defined, tile #14 is pushable -//#define FIRE_TO_PUSH - -//#define ENABLE_PUSHED_SCRIPT -#define PUSHED_TILE_FLAG 1 -#define PUSHED_TO_X_FLAG 2 -#define PUSHED_TO_Y_FLAG 3 - -// General stuff - -#define DEACTIVATE_KEYS // If defined, keys are not present. -#define DEACTIVATE_OBJECTS // If defined, objects are not present. -//#define PLAYER_BOUNCES -//#define DOUBLE_BOUNCE -#define DIE_AND_RESPAWN // If defined, dying = respawn on latest safe. -//#define DIE_AND_REENTER // ... also, reenter screen on death -#define PLAYER_FLICKERS // If defined, collisions make player flicker instead. -//#define WALLS_STOP_ENEMIES // If defined, enemies react to the scenary - -// Extra special tiles -// ------------------- - -#define NO_HORIZONTAL_EVIL_TILE // Only check for evil tiles vertically - -// Quicksands, beh == 2. -// For player movement values, see section 4 -// (PLAYER_VY_SINKING) - -//#define ENABLE_QUICKSANDS - -// Breakable, beh & 16 -//#define ENABLE_BREAKABLE // Breakable walls -#define BREAKABLE_LIFE 2 // Amount of hits to break wall -#define BREAKABLE_ANIM // Show explosion when breaking -#define BREAKABLE_MAX 4 // Max # of concurrent explosions -#define BREAKABLE_MAX_FRAMES 8 // Frames to show explosion -#define BREAKABLE_ERASE 0 // Tile to erase broken tiles -#define BREAKABLE_BREAKING 8 // Tile to display while breaking -//#define BREAKABLE_WALKABLE // If defined (side view), tiles break when stepped on - -// Conveyors, beh & 32 [+1] (must be & 8!) -// For player movement values, see section 4 -// (PLAYER_VX_CONVEYORS) - -//#define ENABLE_CONVEYORS - -// Slippery, beh & 64. (must be & 12!) -// For player movement values, see section 4 -// (PLAYER_AX_ICE & PLAYER_RX_ICE) - -//#define ENABLE_SLIPPERY - -// Ladders, beh == 32 - -//#define ENABLE_LADDERS - -// Extra special stuff -// ------------------- - -// Propellers - -//#define ENABLE_PROPELLERS -#define PROPELLERS_MAX 4 -#define PROPELLERS_BASE_PATTERN 64 // First of 4 patterns to draw/animate propellers -#define PROPELLERS_MAX_LENGTH 6 // In tiles; undef for infinite -#define PROPELLER_TILE 14 // Tile # in map to detect a propeller -#define PROPELLERS_ON_BY_DEFAULT // Define so propellers are on by default - -// Killing tiles shine, beware! - -//#define ENABLE_SHINES -#define SHINES_MAX 8 -#define SHINES_BASE_PATTERN 10 // In the sprite bank, two patterns needed -#define SHINES_PALETTE 3 -#define SHINING_TILE 23 // Tile # in map to add shines - -// Resonators. Not sure if you need this, but. - -//#define ENABLE_RESONATORS -#define RESONATOR_BASE_PATTERN 0 -#define RESONATOR_PALETTE 3 -#define RESONATOR_COUNTER_OFFS_X 4 -#define RESONATOR_COUNTER_OFFS_Y 7 -//#define RESONATOR_CHANGE_BG_PAL paltsgrey // Define to change pal for this palette -//#define RESONATOR_CHANGE_SPR_PAL palssgrey // Define to change pal for this palette - -// Simple warpers. Put as 0xff type enemies. -// Destination is attr:s1 (n_pant:YX). - -//#define ENABLE_SIMPLE_WARPERS -#define SIMPLE_WARPERS_BASE_SPRID (32+((frame_counter>>2)&3)) -//#define SIMPLE_WARPERS_FIRE_BUTTON - -// No! - -//#define ENABLE_NO -#define NO_METASPRITE ssit_06 -#define NO_OFFS_X 0 -#define NO_OFFS_Y -24 - -// Use animation. -// Note: When activated hotspots need b_button press and, in side view, possee. - -#define ENABLE_USE_ANIM -#define USE_ANIM_MAX_FRAMES 8 -#define USE_ANIM_INTERACT_ON 3 -#define USE_ANIM_FRAMES_PER_STEP 4 - -// Text boxes. If you need them, you call them - -#define ENABLE_TEXT_BOX -#define TEXT_BOX_FRAME_TILE_OFFSET 0x30 // We need tiles in the active metatileset to draw the frame -//#define TEXT_BOX_WITH_PORTRAITS // Draw spr_hs [rdd] if != 0 in the text box if defined -//#define TEXT_BOX_DIALOGUES // Add code for dialogues - -// Timer. - -//#define ENABLE_TIMER -#define TIMER_INITIAL 99 -#define TIMER_START_ON -#define TIMER_REFILL 30 -//#define TIMER_RESET_ON_ENTER -//#define TIMER_TIME_FLAG 0 // Useful with scripting. Copies time to flag -//#define TIMER_ZERO_FLAG 1 // Useful with scripting. raises flag when time zero -#define TIMER_SOUND 10 // play a sound if timer < value - -// Springs - -//#define ENABLE_SPRINGS -#define SPRING_TILE 10 -#define SPRING_SPIKE_TILE 11 -//#define SPRINGS_ON_BY_DEFAULT - -// Enemy types and definitions -// --------------------------- - -//#define ENEMS_IN_CHRROM // Enems are stored somewhere in CHR-ROM - -#define ENEMS_LIFE_GAUGE 2 // Amount of shots/punches/kicks needed to kill enemies. -//#define ENEMS_FLICKER // Ifdef: flicker, if not: explosion -//#define ENEMS_FLICKER_ONLY_ON_DYING // Flicker, but only when life == 0 -//#define ENEMS_CAN_RESPAWN // Read docs for this. - -//#define PERSISTENT_ENEMIES -//#define PERSISTENT_DEATHS - -#define ENEMS_TOUCHED_FRAMES 8 // # frames to stay frozen after hit -//#define ENEMS_RECOIL_ON_HIT 2 // horizontal recoil when hit, #ifdef, value is speed in pixels! -//#define ENEMS_RECOIL_OVER_BOUNDARIES // (x1,y1), (x2,y2) boundaries don't stop a recoil - -//#define ENEMS_ENABLE_DYING_FRAME - -#define ENEMS_EXPLODING_CELL 32 -#define ENEMS_EXPLODING_CELLS_HIDES // Define and the baddie will be substituted by the explosion - -#define ENEMS_OCCLUDING_CELL 33 // If you use pezons or saws you need a flame for occlusion - -// Beware: only activate this if enemies are killable by any means: -//#define ENEMIES_SUFFER_ON_PLAYER_COLLISION - -// Fanties / Homing fanties - -//#define ENABLE_FANTY -//#define ENABLE_HOMING_FANTY - -#define FANTY_BASE_SPRID 32 -#define FANTY_WITH_FACING -#define FANTY_COLLIDES -#define FANTY_KILLED_BY_TILE -//#define FANTY_LIFE_GAUGE 5 // Define if you need these to be tougher - -#define FANTY_A 4 -#define FANTY_MAXV 48 - -#define FANTY_DISTANCE 80 -#define FANTY_V_RETREAT 16 - -// Pursuers (for top-down) - -//#define ENABLE_PURSUERS // If defined, type 7 enemies are active -#define DEATH_COUNT_EXPRESSION 50+(rand8()&63) -#define TYPE_7_FIXED_SPRITE 4 // If defined, type 7 enemies are always # - -// Saws - -//#define ENABLE_SAW -#define SAW_BASE_SPRID 48 -#define SAW_V_DISPL 4 -#define SAW_EMERGING_STEPS 10 - -// Pezons - -//#define ENABLE_PEZONS -#define PEZONS_BASE_SPRID 40 -#define PEZON_WAIT 50 -#define PEZON_THRUST 384 -#define PEZON_VY_FALLING_MAX 256 -#define PEZON_G 16 - -// Chac chacs - -//#define ENABLE_CHAC_CHAC -#define CHAC_CHAC_BASE_TILE 16 -#define CHAC_CHAC_IDLE_2 16 -#define CHAC_CHAC_IDLE_3 1 -#define CHAC_CHAC_IDLE_4 50 - -//#define CHAC_CHAC_FROM_MAP // Chac chacs are not placed as enemies but as tiles -#define MAX_CHAC_CHACS 4 -#define MAX_CHAC_CHACKS_QUEUED 16 // Make the closest power of 2 >= (MAX_CHAC_CHACS*4) -#define CHAC_CHAC_DETECT_TILE 39 -#define CHAC_CHACS_CLEAR // You are placing chac chacks from map but need the path to be clear - -// Monococos - -//#define ENABLE_MONOCOCOS -//#define MONOCOCO_TYPE_A // Comment for 4 cells monococo (appearing/disappearing & hidden) -#define MONOCOCO_BASE_SPRID 56 -#define MONOCOCO_BASE_TIME_HIDDEN 150 -#define MONOCOCO_BASE_TIME_APPEARING 50 -#define MONOCOCO_BASE_TIME_ONBOARD 50 -#define MONOCOCO_FIRE_COCO_AT MONOCOCO_BASE_TIME_ONBOARD/2 - -// Shooties - -//#define ENABLE_SHOOTIES -#define SHOOTIES_BASE_SPRID 40 -#define SHOOTIES_SHOOT_OFFS_X 16 -#define SHOOTIES_SHOOT_OFFS_Y -2 -#define SHOOT_FREQ (pry+23>=en_y[gpit]&&pry<=en_y[gpit]+23&&((en_facing[gpit]&&en_x[gpit]>prx)||(en_facing[gpit]==0&&en_x[gpit]=en_y[gpit]&&pry<=en_y[gpit]+23&&((en_facing[gpit]&&en_x[gpit]>prx)||(en_facing[gpit]==0&&en_x[gpit] inventory (just 1) -//#define ONLY_ONE_OBJECT_FLAG 0 // If def, use flag [.] instead of pinv - -// Easy objects mode: A range of hotspot id's are considered -// 'objects'. The user can carry one of those. Contents of hotspots -// can change in this mode. - -//#define ENABLE_EASY_OBJECTS - -#define HS_OBJ_EMPTY 4 -#define HS_OBJ_MIN 5 -#define HS_OBJ_MAX 6 -#define HS_USE_OFFS 2 - -#define HS_TYPE_A // If defined, render receptors = HS_OBJ_EMPTY, object used = object - // Otherwise, use its own graphics. -#define HS_FIX_ON_USE // If defined, object N used at N+H_USE_OFFS becomes N+H_USE_OFFS*2 - -// Silly Brawlers -// -------------- -//#define PLAYER_PUNCHES // When on floor -#define PLAYER_PUNCH_OFFS_X 15 -#define PLAYER_PUNCH_OFFS_Y -7 - -//#define PLAYER_KICKS // While airborne -#define PLAYER_KICK_OFFS_X 12 -#define PLAYER_KICK_OFFS_Y -3 - -#define PLAYER_FROZEN_FRAMES 16 // Frames to be frozen when hit landed - -// Shooting behaviour -// ------------------ -//#define PLAYER_CAN_FIRE // If defined, shooting engine is enabled. -#define PLAYER_BULLET_SPEED 4 // Pixels/frame. -#define MAX_BULLETS 4 // Max number of bullets on screen. Be careful!. -#define PLAYER_BULLET_Y_OFFSET 6 // vertical offset from the player's top. -#define PLAYER_BULLET_X_OFFSET -4 // vertical offset from the player's left/right. -//#define PLAYER_BULLETS_MIN_KILLABLE 3 // If defined, only enemies >= N can be killed. -//#define BULLETS_DONT_KILL // Bullets don't kill, but affect enemies otherwise - -// Special shooting -//#define PLAYER_FIRE_RELOAD 16 // If defined # of frames until next shoot -//#define PLAYER_CHARGE_AND_FIRE // If defined, press B to charge, release to fire - #define PLAYER_CHARGE_MIN 8 - #define PLAYER_CHARGE_MAX 48 // Min/max frames for charging -//#define PLAYER_BULLET_LIFE pfiregauge // Max life. Can be whatever. -//#define PLAYER_BULLET_FLICKERS 8 // Bullets flickers for N frames before dying, if defined - -//#define MAX_AMMO 99 // If defined, ammo is not infinite! - #define AMMO_REFILL 50 // type 3 hotspots refill amo, using tile 20 - //#define INITIAL_AMMO 0 // If defined, ammo = X when entering game. - -#define BULLET_PALETTE 3 -#define BULLET_PATTERN 0 // To paint the bullet. Can be an expresion. - -// Scripting -// --------- - -#define ACTIVATE_SCRIPTING // Activates msc scripting and flag related stuff. -//#define CLEAR_FLAGS // Zero all flags when entering a level - -//#define FIRE_ON_KILL // run fire script on enemy kill - -//#define ENABLE_EXTERN_CODE // Enables custom code to be run from the script using EXTERN n -#define ENABLE_FIRE_ZONE // Allows to define a zone which auto-triggers "FIRE" - -// Interactives -// ------------ - -#define ENABLE_INTERACTIVES // Graphical flag representations! -#define INTERACTIVES_MAX 4 // As per screen -#define FLAG_INVENTORY 0 -//#define INTERACTIVES_ONLY_SPRITES // If you are using other means for items and just need sprites - -// Top view: -// --------- - -//#define PLAYER_TOP_DOWN // Enable top view. -//#define TOP_OVER_SIDE // UP/DOWN has priority over LEFT/RIGHT - -// Side view: -// ---------- - -#define PLAYER_HAS_JUMP // If defined, player is able to jump. -//#define PLAYER_JUMP_TYPE_MK2 // Use MK2 method for jump / gravity / release -//#define PLAYER_AUTO_JUMP // Automatic jump when hitting the floor -//#define PLAYER_SWIMS // If defined, player swims a la Ninjajar! -//#define PLAYER_HAS_JETPAC // If defined, player can thrust a vertical jetpac -//#define PLAYER_STEPS_ON_ENEMS // If defined, stepping on enemies kills them -//#define PLAYER_STEPS_STRICT // Only registers advantage hit when pvy > PLAYER_VY_FALLING_MIN -//#define PLAYER_SAFE_LANDING // Step over vertical inverts direction -//#define PLAYER_STEPS_MIN_KILLABLE 0xff // Only kill enemies with id >= PLAYER_STEPS_MIN_KILLABLE - // 0xff = Nobody - -// ============================================================================ -// III. Screen configuration -// ============================================================================ - -// This sections defines how stuff is rendered, where to show counters, etcetera - -#define LIFE_X 7 // -#define LIFE_Y 3 // Life gauge counter character coordinates - -//#define OBJECTS_X 18 // -//#define OBJECTS_Y 3 // Objects counter character coordinates -#define OBJECTS_REMAINING // Show # remaining instead of got - -#define KEYS_X 28 // -#define KEYS_Y 3 // Keys counter character coordinates - -//#define KILLED_X 16 // -//#define KILLED_Y 2 // Kills counter character coordinates - -//#define AMMO_X 8 // -//#define AMMO_Y 2 // Ammo counter character coordinates - -#define HS_INV_X 136 // -#define HS_INV_Y 11 // Object you are carrying - -//#define TIMER_X 0 // -//#define TIMER_Y 5 // Current timer value - -// Text -//#define LINE_OF_TEXT 26 // If defined, scripts can show text @ Y = # -//#define LINE_OF_TEXT_X 1 // X coordinate. - -// ============================================================================ -// IV. Player movement configuration -// ============================================================================ - -// This section is used to define which constants are used in the gravity/acceleration engine. -// If a side-view engine is configured, we have to define vertical and horizontal constants -// separately. If a top-view engine is configured instead, the horizontal values are also -// applied to the vertical component, vertical values are ignored. - -// IV.1. Vertical movement. Only for side-view. - -#define PLAYER_VY_FALLING_MAX 256 // Max. velocity when falling -#define PLAYER_VY_FALLING_MIN 64 // Use for animating if you need -#define PLAYER_VY_SINKING 2 -#define PLAYER_G 16 // Gravity - -#define PLAYER_VY_JUMP_INITIAL 64 -#define PLAYER_VY_JUMP_MAX 192 // Max. velocity when jumping -#define PLAYER_AY_JUMP 12 // Jumpin acceleration - -#define PLAYER_AY_JETPAC 32 // Jetpac increment -#define PLAYER_VY_JETPAC_MAX 256 // Max jetpac vertical speed - -#define PLAYER_AY_SWIM 8 // Swimming acceleration. -#define PLAYER_VY_SWIM_MAX 64 // Swimming max. speed - -#define PLAYER_VY_LADDERS 96 - -#define PLAYER_AY_FLOAT 16 -#define PLAYER_VY_FLOAT_MAX 256 - -#define PLAYER_AY_UNTHRUST 8 // Used in the Autojump engine. - -// IV.1.b MK2 style jump (overrides PLAYER_?Y_JUMP_* defined before!) -// (Used if PLAYER_JUMP_TYPE_MK2 is defined) -#define PLAYER_G_MK2_JUMPING 4 -#define PLAYER_VY_MK2_JUMP_INITIAL 208 -#define PLAYER_VY_MK2_JUMP_RELEASE 96 -#define PLAYER_VY_MK2_JUMP_A_STEPS 16 - -// IV.2. Horizontal (side view) or general (top view) movement. - -#define PLAYER_VX_MAX 128 // Max. horizontal speed -#define PLAYER_VX_CONVEYORS 64 -#define PLAYER_AX 16 // Horizontal acceleration -#define PLAYER_AX_ICE 4 -#define PLAYER_RX 16 // Horizontal friction -#define PLAYER_RX_ICE 2 - -#define PLAYER_VX_MIN (PLAYER_AX << 2) - -#define PLAYER_V_REBOUND 224 - -// Animation cells - -#ifdef PLAYER_TOP_DOWN - - // Cell definitions for top-down view - - #define CELL_FACING_RIGHT 0 - #define CELL_FACING_LEFT 6 - #define CELL_FACING_UP 18 - #define CELL_FACING_DOWN 12 - - #define CELL_IDLE 0 - #define CELL_WALK_CYCLE 1 - #define CELL_PUSHING 5 - - #define CELL_USE 8 - -#else - - // Cell definitions for side view - - #define CELL_FACING_RIGHT 0 - #define CELL_FACING_LEFT 16 - - #define CELL_IDLE 0 - #define CELL_WALK_INIT 1 - #define CELL_WALK_CYCLE 1 - #define CELL_AIRBORNE 5 - #define CELL_ASCENDING 5 - #define CELL_DESCENDING 6 - - #define CELL_SWIM_CYCLE 6 - - #define CELL_USE 7 - - #define CELL_PUNCHING 8 - #define CELL_KICKING 9 - - #define CELL_CLIMB_CYCLE 20 - #define CELL_CLIMB_HALF 29 -#endif - -// Music - -#define MUSIC_INGAME 0 - -// SFX - -#define SFX_START 0 -#define SFX_TILE 1 -#define SFX_OBJECT 2 -#define SFX_USE 3 -#define SFX_PHIT 4 -#define SFX_DUMMY1 5 -#define SFX_ENHIT 6 -#define SFX_DUMMY2 7 -#define SFX_JUMP 8 -#define SFX_BULLET 9 -#define SFX_COCO 10 -#define SFX_SPRING 11 -#define SFX_COUNT 12 -#define SFX_BREAKH 13 -#define SFX_HITTER 14 -#define SFX_STEPON 15 -#define SFX_FLOAT 16 -#define SFX_BREAKB 17