Rename files
This commit is contained in:
parent
4d5594a834
commit
ea57ecd470
9 changed files with 36 additions and 48 deletions
4
assets.h
4
assets.h
|
@ -2,6 +2,8 @@
|
|||
#define _LCR_ASSETS_H
|
||||
|
||||
/**
|
||||
Assets embedded in source code.
|
||||
|
||||
NOTES:
|
||||
- All images are 64x64, stored in an indexed mode (8bits pery pixel), the
|
||||
image starts with a 256 color palette in RGB565 format (i.e. the palette
|
||||
|
@ -13,7 +15,7 @@
|
|||
the sky.
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
#include "general.h"
|
||||
#include "map.h"
|
||||
|
||||
static const char *LCR_texts[] =
|
||||
|
|
23
debug.h
23
debug.h
|
@ -1,23 +0,0 @@
|
|||
#ifndef _LCR_DEBUG_H
|
||||
#define _LCR_DEBUG_H
|
||||
|
||||
#include "map.h"
|
||||
#include <stdio.h>
|
||||
|
||||
void LCR_debugPrintCurrentMap()
|
||||
{
|
||||
puts("current map:");
|
||||
|
||||
for (int i = 0; i < LCR_currentMap.blockCount; ++i)
|
||||
{
|
||||
uint8_t x, y, z;
|
||||
|
||||
LCR_mapBlockGetCoords(LCR_currentMap.blocks + i * 4,&x,&y,&z);
|
||||
|
||||
printf(" block %d: type %x, coord %d (%d %d %d)\n",i,
|
||||
LCR_currentMap.blocks[i * 4],LCR_mapBlockGetCoordNumber(
|
||||
LCR_currentMap.blocks + i * 4),x,y,z);
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
|
@ -4,7 +4,6 @@
|
|||
#define LCR_SETTING_LOG_LEVEL 2
|
||||
|
||||
#include "game.h"
|
||||
#include "debug.h"
|
||||
|
||||
SDL_Window *window;
|
||||
SDL_Renderer *renderer;
|
||||
|
|
9
game.h
9
game.h
|
@ -1,3 +1,6 @@
|
|||
#ifndef _LCR_GAME_H
|
||||
#define _LCR_GAME_H
|
||||
|
||||
/**
|
||||
game: this file implements the backend of a complete, actually playable
|
||||
game, and is meant to be included and used by specific frontends (which
|
||||
|
@ -42,9 +45,6 @@
|
|||
the map module) etc.
|
||||
*/
|
||||
|
||||
#ifndef _LCR_GAME_H
|
||||
#define _LCR_GAME_H
|
||||
|
||||
#define LCR_KEY_UP 0x00
|
||||
#define LCR_KEY_RIGHT 0x01
|
||||
#define LCR_KEY_DOWN 0x02
|
||||
|
@ -195,9 +195,8 @@ void LCR_drawPixelXYUnsafe(unsigned int x, unsigned int y, uint16_t color);
|
|||
static inline void LCR_drawPixelXYSafe(unsigned int x, unsigned int y,
|
||||
uint_fast16_t color);
|
||||
|
||||
#include "constants.h"
|
||||
#include "general.h"
|
||||
#include "racing.h"
|
||||
#include "settings.h"
|
||||
#include "audio.h"
|
||||
#include "assets.h"
|
||||
#include "renderer.h"
|
||||
|
|
|
@ -1,8 +1,15 @@
|
|||
#ifndef _LCR_CONSTANTS_H
|
||||
#define _LCR_CONSTANTS_H
|
||||
#ifndef _LCR_GENERAL_H
|
||||
#define _LCR_GENERAL_H
|
||||
|
||||
/**
|
||||
General resources for all modules.
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
#include "settings.h"
|
||||
|
||||
// constants (not supposed to be changed, doing so may break stuff):
|
||||
|
||||
#define LCR_EFFECTIVE_RESOLUTION_X \
|
||||
(LCR_SETTING_RESOLUTION_X / LCR_SETTING_RESOLUTION_SUBDIVIDE)
|
||||
|
||||
|
@ -41,4 +48,9 @@
|
|||
#define LCR_MENU_TABS 4
|
||||
#define LCR_MENU_STRING_SIZE 16
|
||||
|
||||
#endif
|
||||
char _LCR_hexDigit(int i)
|
||||
{
|
||||
return i < 10 ? '0' + i : ('a' - 10 + i);
|
||||
}
|
||||
|
||||
#endif // guard
|
6
map.h
6
map.h
|
@ -1,10 +1,6 @@
|
|||
#ifndef _LCR_MAP
|
||||
#define _LCR_MAP
|
||||
|
||||
#include <stdint.h>
|
||||
#include "constants.h"
|
||||
#include "settings.h"
|
||||
|
||||
/**
|
||||
The map (track) module for Licar.
|
||||
|
||||
|
@ -56,6 +52,8 @@
|
|||
- last if C7 is set, the block is flipped vertically
|
||||
*/
|
||||
|
||||
#include "general.h"
|
||||
|
||||
#define LCR_MAP_NAME_MAX_LEN 15 /**< Maximum map name length (without
|
||||
terminating zero. */
|
||||
#define LCR_BLOCK_START_CHAR ':'
|
||||
|
|
12
racing.h
12
racing.h
|
@ -1,3 +1,6 @@
|
|||
#ifndef _LCR_RACING_H
|
||||
#define _LCR_RACING_H
|
||||
|
||||
/**
|
||||
Racing module: implements the racing physics and logic as well as replays and
|
||||
other related things.
|
||||
|
@ -19,9 +22,6 @@
|
|||
string will be ignored.
|
||||
*/
|
||||
|
||||
#ifndef _LCR_RACING_H
|
||||
#define _LCR_RACING_H
|
||||
|
||||
typedef int32_t LCR_GameUnit; ///< abstract game unit
|
||||
|
||||
#define LCR_GAME_UNIT 1024 ///< length of map square in LCR_GameUnits
|
||||
|
@ -41,6 +41,7 @@ typedef int32_t LCR_GameUnit; ///< abstract game unit
|
|||
#define TPE_RESHAPE_TENSION_LIMIT 3
|
||||
#define TPE_RESHAPE_ITERATIONS 8
|
||||
|
||||
#include "general.h"
|
||||
#include "map.h"
|
||||
#include "tinyphysicsengine.h"
|
||||
|
||||
|
@ -145,11 +146,6 @@ void LCR_replayInitPlaying(void)
|
|||
LCR_replay.currentFrame = 0;
|
||||
}
|
||||
|
||||
char _LCR_hexDigit(int i)
|
||||
{
|
||||
return i < 10 ? '0' + i : ('a' - 10 + i);
|
||||
}
|
||||
|
||||
/**
|
||||
Outputs current replay using provided character printing function. The string
|
||||
will be zero terminated.
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
#ifndef _LCR_RENDERER_H
|
||||
#define _LCR_RENDERER_H
|
||||
|
||||
/**
|
||||
Renderer: implements 3D and 2D rendering.
|
||||
|
||||
|
@ -12,9 +15,6 @@
|
|||
for far away areas with "something" we just draw some 2D rectangles.
|
||||
*/
|
||||
|
||||
#ifndef _LCR_RENDERER_H
|
||||
#define _LCR_RENDERER_H
|
||||
|
||||
#define S3L_RESOLUTION_X LCR_SETTING_RESOLUTION_X
|
||||
#define S3L_RESOLUTION_Y LCR_SETTING_RESOLUTION_Y
|
||||
#define S3L_PIXEL_FUNCTION _LCR_pixelFunc3D
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
#ifndef _LCR_SETTINGS_H
|
||||
#define _LCR_SETTINGS_H
|
||||
|
||||
/**
|
||||
Settings file, values here may be changed by the user or overriden by frontend
|
||||
before compilation.
|
||||
*/
|
||||
|
||||
#ifndef LCR_SETTING_RESOLUTION_X
|
||||
#define LCR_SETTING_RESOLUTION_X 1024
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue