2018-09-10 11:26:20 +02:00
|
|
|
/**
|
2018-09-11 09:19:09 +02:00
|
|
|
Raycasting demo 3 for Pokitto.
|
|
|
|
|
|
|
|
Minecraft-like demo, shows an interactive terrain editing and raycasting
|
|
|
|
without textures.
|
2018-09-10 11:26:20 +02:00
|
|
|
|
|
|
|
Don't forget to compile with -O3!
|
|
|
|
|
|
|
|
author: Miloslav "drummyfish" Ciz
|
|
|
|
license: CC0 1.0
|
|
|
|
*/
|
|
|
|
|
2018-09-24 19:24:35 +02:00
|
|
|
#define SUBSAMPLE 1
|
|
|
|
|
2018-09-10 11:26:20 +02:00
|
|
|
// redefine player's height
|
2018-09-17 17:55:33 +02:00
|
|
|
#define PLAYER_SPEED (RCL_UNITS_PER_SQUARE * 6)
|
|
|
|
#define RCL_HORIZONTAL_FOV ((3 * RCL_UNITS_PER_SQUARE) / 10)
|
|
|
|
#define GRAVITY_ACCELERATION (RCL_UNITS_PER_SQUARE * 2)
|
|
|
|
#define RCL_CAMERA_COLL_HEIGHT_BELOW ((3 * RCL_UNITS_PER_SQUARE) / 2)
|
2018-09-24 19:24:35 +02:00
|
|
|
#define FPS 255
|
2018-09-10 19:28:36 +02:00
|
|
|
#define HEAD_BOB_HEIGHT 150
|
|
|
|
#define HEAD_BOB_STEP 20
|
2018-09-10 11:26:20 +02:00
|
|
|
|
2018-09-17 17:55:33 +02:00
|
|
|
#define RCL_COMPUTE_WALL_TEXCOORDS 0 // we won't be using textures, so turn them off
|
2018-09-21 08:47:42 +02:00
|
|
|
#define RCL_COMPUTE_CEILING_DEPTH 0 // again, we don't need ceiling depth
|
2018-09-16 14:24:10 +02:00
|
|
|
|
2018-09-18 12:54:19 +02:00
|
|
|
#define TEXTURE_W 32 // required to define even though we use no textures
|
|
|
|
#define TEXTURE_H 32
|
|
|
|
|
2018-09-10 11:26:20 +02:00
|
|
|
#include "general.hpp"
|
|
|
|
|
|
|
|
#define LEVEL_X_RES 29
|
|
|
|
#define LEVEL_Y_RES 21
|
|
|
|
|
|
|
|
Player player;
|
|
|
|
|
2018-09-17 17:55:33 +02:00
|
|
|
#define SPRITE_MAX_DISTANCE 5 * RCL_UNITS_PER_SQUARE
|
2018-09-10 11:26:20 +02:00
|
|
|
|
|
|
|
#define JUMP_SPEED 500
|
|
|
|
|
2018-09-17 17:55:33 +02:00
|
|
|
RCL_Vector2D selectedSquare; ///< Coords of a square selected for editing.
|
2018-09-10 11:26:20 +02:00
|
|
|
|
2018-09-10 15:09:34 +02:00
|
|
|
/**
|
|
|
|
Represents one terrain change against the implicit terrain.
|
|
|
|
*/
|
|
|
|
class Change
|
|
|
|
{
|
|
|
|
public:
|
2018-09-17 17:55:33 +02:00
|
|
|
RCL_Vector2D mCoords;
|
|
|
|
RCL_Unit mHeight;
|
2018-09-10 17:27:39 +02:00
|
|
|
int8_t mColor;
|
2018-09-10 15:09:34 +02:00
|
|
|
};
|
|
|
|
|
2018-09-11 09:19:09 +02:00
|
|
|
#define MAX_CHANGES 16 ///< Maximum number of simultaneous terrain changes.
|
2018-09-10 15:09:34 +02:00
|
|
|
|
2018-09-11 09:19:09 +02:00
|
|
|
Change changes[MAX_CHANGES]; ///< Terrain change list.
|
2018-09-10 15:09:34 +02:00
|
|
|
|
2018-09-11 09:19:09 +02:00
|
|
|
// helpers
|
2018-09-10 15:09:34 +02:00
|
|
|
bool editReleased = false;
|
|
|
|
bool editing = false;
|
|
|
|
uint16_t changeIndex = 0;
|
2018-09-10 15:34:01 +02:00
|
|
|
int16_t editCounter = 0;
|
2018-09-10 15:09:34 +02:00
|
|
|
|
2018-09-10 17:27:39 +02:00
|
|
|
#define SQUARE_COLORS 4
|
2018-09-28 20:52:27 +02:00
|
|
|
#define FLOOR_COLORS 8
|
2018-09-10 17:27:39 +02:00
|
|
|
uint8_t squareColors[SQUARE_COLORS];
|
2018-09-28 20:52:27 +02:00
|
|
|
uint8_t floorColors[FLOOR_COLORS];
|
2018-09-10 17:27:39 +02:00
|
|
|
|
2018-09-10 11:26:20 +02:00
|
|
|
#define HEIGHT_PROFILE_LENGTH 256
|
2018-09-11 09:19:09 +02:00
|
|
|
|
|
|
|
/// Used for terrain generation.
|
2018-09-10 11:26:20 +02:00
|
|
|
const int8_t heightProfile[] = {
|
2018-09-10 12:38:34 +02:00
|
|
|
9,9,9,10,10,10,11,11,12,13,13,14,14,14,15,15,15,16,16,16,16,16,15,15,15,14,14,
|
|
|
|
13,13,12,11,10,10,9,9,9,8,8,8,8,8,8,7,7,7,6,5,4,4,3,3,3,3,3,3,4,5,7,8,10,11,12,
|
|
|
|
12,13,13,13,14,16,19,20,21,21,22,22,22,23,23,23,23,22,22,21,20,19,18,18,17,17,
|
|
|
|
17,17,16,16,16,16,16,16,16,15,15,15,14,14,13,12,11,10,8,7,6,5,5,5,4,4,4,4,4,5,
|
|
|
|
5,5,6,6,7,7,7,8,8,8,8,8,8,8,7,7,7,7,6,6,5,4,4,3,2,2,2,1,1,1,1,2,3,5,6,7,9,13,
|
|
|
|
13,13,18,18,22,22,22,22,22,22,21,21,20,20,19,16,16,16,14,14,14,15,15,15,15,15,
|
|
|
|
16,17,17,18,18,18,16,16,16,16,15,15,15,14,14,13,12,8,7,7,7,8,9,11,12,12,13,13,
|
|
|
|
13,12,11,10,10,10,10,11,11,12,13,13,12,12,11,11,10,10,9,9,9,9,9,9,10,10,11,12,
|
|
|
|
13,13,14,14,14,14,14,13,13,12,11,11,11,11,10,10,10,10};
|
|
|
|
|
|
|
|
const unsigned char imageBackground[] =
|
2018-09-13 12:45:25 +02:00
|
|
|
{ 110, 44 // width, height
|
2018-09-27 12:55:03 +02:00
|
|
|
,0x7f,0x0f,0x0f,0x0f,0x2f,0x2f,0x2f,0x2f,0x7d,0x7d,0x0f,0x0f,0x2f,0x2f
|
|
|
|
,0x6c,0x6c,0x6c,0xee,0xee,0xee,0xee,0xec,0xee,0xec,0xec,0xec,0xdd,0xec
|
|
|
|
,0xdd,0xda,0xdd,0xda,0xdd,0xda,0x38,0xa9,0xa9,0xa9,0xa9,0xa9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ec,0xec,0xdd,0xdd,0xdd,0xdd,0xdd,0xda,0xda,0xaa,0xab,0xaa,0xab
|
|
|
|
,0xaa,0xab,0xaa,0xab,0xaa,0xab,0x7f,0x2f,0x0f,0x2f,0x2f,0x2f,0x2f,0x2f
|
|
|
|
,0x2f,0x2f,0x0f,0x0f,0x0f,0x2f,0x2f,0x2f,0x6c,0xee,0xee,0xee,0xee,0xec
|
|
|
|
,0xee,0xec,0xec,0xec,0xdd,0xec,0xdd,0xda,0xdd,0xda,0xdd,0xda,0xab,0xaa
|
|
|
|
,0xab,0xaa,0xab,0xaa,0xab,0xaa,0xab,0xaa,0x7f,0x2f,0x0f,0x0f,0x2f,0x2f
|
|
|
|
,0x2f,0x2f,0x2f,0x2f,0x0f,0x0f,0x0f,0x0f,0x2f,0x2f,0xee,0x6c,0xee,0xee
|
|
|
|
,0xee,0xee,0xec,0xec,0xec,0xec,0xec,0xdd,0xdd,0xdd,0xdd,0xdd,0xda,0xda
|
|
|
|
,0xab,0xab,0xab,0xab,0xab,0xab,0xab,0xab,0xab,0xab,0x7f,0x2f,0x0f,0x2f
|
|
|
|
,0x2f,0x2f,0x0f,0x2f,0x2f,0x2f,0x0f,0x0f,0x0f,0x0f,0x2f,0x2f,0x6c,0xee
|
|
|
|
,0xee,0xee,0xee,0xec,0xee,0xec,0xec,0xec,0xdd,0xec,0xdd,0xda,0xdd,0xda
|
|
|
|
,0xdd,0xda,0xab,0xab,0xab,0xab,0xab,0xab,0xab,0xab,0xab,0xab,0x7f,0x2f
|
2018-09-27 10:30:52 +02:00
|
|
|
,0x0f,0x2f,0x2f,0x2f,0x0f,0x0f,0x2f,0x2f,0x0f,0x0f,0x0f,0x0f,0x2f,0x2f
|
2018-09-27 12:55:03 +02:00
|
|
|
,0xee,0x6c,0xee,0xee,0xee,0xee,0xec,0xec,0xec,0xec,0xec,0xdd,0xdd,0xdd
|
|
|
|
,0xdd,0xdd,0xda,0xda,0xac,0xab,0xac,0xab,0xac,0xab,0xac,0xab,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
|
|
,0xee,0xec,0xee,0xec,0xec,0xec,0xdd,0xec,0xdd,0xda,0xdd,0xda,0xdd,0xda
|
|
|
|
,0x38,0xac,0xad,0xac,0xad,0xac,0xad,0xac,0xad,0xac,0x7f,0x2f,0x2f,0x2f
|
|
|
|
,0x7f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x2f,0x2f,0x2f,0xee,0x6c
|
|
|
|
,0xee,0xee,0xee,0xee,0xec,0xec,0xec,0xec,0xec,0xdd,0xdd,0xdd,0xdd,0xdd
|
|
|
|
,0xda,0xda,0x38,0xad,0xad,0xad,0xad,0xad,0xad,0xad,0xad,0xad,0x7f,0x2f
|
|
|
|
,0x2f,0x2f,0x7f,0x7f,0x0f,0x0f,0x2f,0x0f,0x0f,0x0f,0x0f,0x2f,0x2f,0x2f
|
|
|
|
,0x08,0xee,0xee,0xee,0xee,0xec,0xee,0xec,0xec,0xec,0xdd,0xec,0xdd,0xda
|
|
|
|
,0xdd,0xda,0xdd,0xda,0xda,0xad,0xad,0xad,0xad,0xad,0xad,0xad,0xad,0xad
|
|
|
|
,0x7f,0x2f,0x2f,0x2f,0x7f,0x7f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x2f
|
|
|
|
,0x2f,0x2f,0x08,0x6c,0xee,0xee,0xee,0xee,0xec,0xec,0xec,0xec,0xec,0xdd
|
|
|
|
,0xdd,0xdd,0xdd,0xdd,0xda,0xda,0xda,0xad,0xae,0xad,0xae,0xad,0xae,0xad
|
|
|
|
,0xae,0xad,0x7f,0x7f,0x2f,0x2f,0x7f,0x7f,0x0f,0x0f,0x2f,0x0f,0x0f,0x0f
|
|
|
|
,0x2f,0x2f,0x2f,0x2f,0x2f,0xee,0xee,0xee,0xee,0xec,0xee,0xec,0xec,0xec
|
|
|
|
,0xdd,0xec,0xdd,0xda,0xdd,0xda,0xdd,0xda,0xda,0xae,0xad,0xae,0xad,0xae
|
|
|
|
,0xad,0xae,0xad,0xae,0x7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d,0xda,0xda,0xda,0xa9,0xaa,0xa9,0xaa
|
|
|
|
,0xa9,0xaa,0xa9,0xaa,0x7f,0x2f,0x2f,0x2f,0x2f,0x2f,0x7d,0x7f,0x7d,0x7d
|
|
|
|
,0x7d,0x0f,0x0f,0x2f,0x6c,0x6c,0xee,0x6c,0xee,0xee,0xee,0xee,0xec,0xec
|
|
|
|
,0x0f,0xec,0xec,0xdd,0xdd,0xdd,0xdd,0xdd,0xda,0xda,0xda,0xda,0xa9,0xa9
|
|
|
|
,0xa9,0xa9,0xa9,0xa9,0xa9,0xa9,0x7f,0x2f,0x0f,0x0f,0x2f,0x2f,0x7f,0x7d
|
|
|
|
,0x7d,0x7d,0x7d,0x0f,0x0f,0x2f,0x6c,0x6c,0x6c,0xee,0xee,0xee,0xee,0xec
|
|
|
|
,0xee,0xec,0xec,0xec,0xdd,0xec,0xdd,0xda,0xdd,0xda,0xdd,0xda,0xda,0x38
|
|
|
|
,0xa9,0xa9,0xa9,0xa9,0xa9,0xa9,0xa9,0xa9,0x7f,0x0f,0x0f,0x0f,0x2f,0x2f
|
|
|
|
,0x2f,0x7f,0x7d,0x7d,0x7d,0x0f,0x2f,0x2f,0x6c,0x6c,0xee,0x6c,0xee,0xee
|
|
|
|
,0xee,0xee,0xec,0xec,0xec,0xec,0xec,0xdd,0xdd,0xdd,0xdd,0xdd,0xda,0xda
|
|
|
|
,0xda,0x38,0xa9,0xa9,0xa9,0xa9,0xa9,0xa9,0xa9,0xa9
|
2018-09-10 12:38:34 +02:00
|
|
|
};
|
2018-09-10 11:26:20 +02:00
|
|
|
|
2018-09-17 17:55:33 +02:00
|
|
|
RCL_Unit floorHeightAt(int16_t x, int16_t y)
|
2018-09-10 11:26:20 +02:00
|
|
|
{
|
2018-09-10 17:27:39 +02:00
|
|
|
/*
|
|
|
|
This for loop may become a bottleneck, since this function is called
|
|
|
|
very often - if more changes are to be kept, optimizations are needed -
|
|
|
|
probably a hash table, sorting by coordinates etc.
|
|
|
|
*/
|
2018-09-10 15:09:34 +02:00
|
|
|
for (uint16_t i = 0; i < MAX_CHANGES; ++i)
|
|
|
|
if (changes[i].mCoords.x == x && changes[i].mCoords.y == y)
|
|
|
|
return changes[i].mHeight;
|
|
|
|
|
2018-09-17 17:55:33 +02:00
|
|
|
return (heightProfile[RCL_absVal(x) % HEIGHT_PROFILE_LENGTH] +
|
|
|
|
heightProfile[RCL_absVal(y + 20) % HEIGHT_PROFILE_LENGTH]) *
|
|
|
|
RCL_UNITS_PER_SQUARE;
|
2018-09-10 11:26:20 +02:00
|
|
|
}
|
|
|
|
|
2018-09-17 17:55:33 +02:00
|
|
|
RCL_Unit colorAt(int16_t x, int16_t y)
|
2018-09-10 17:27:39 +02:00
|
|
|
{
|
|
|
|
for (uint16_t i = 0; i < MAX_CHANGES; ++i)
|
|
|
|
if (changes[i].mCoords.x == x && changes[i].mCoords.y == y)
|
|
|
|
return changes[i].mColor;
|
|
|
|
|
2018-09-17 17:55:33 +02:00
|
|
|
return min((heightProfile[RCL_absVal(x * 2) % HEIGHT_PROFILE_LENGTH] +
|
|
|
|
heightProfile[RCL_absVal(y) % HEIGHT_PROFILE_LENGTH]) / 10,3);
|
2018-09-10 17:27:39 +02:00
|
|
|
}
|
|
|
|
|
2018-09-10 17:40:27 +02:00
|
|
|
uint16_t previousColumn = 255; ///< Helper for precomputing background.
|
|
|
|
uint16_t backgroundColumn = 0; ///< Precomputed background column.
|
2018-09-10 12:38:34 +02:00
|
|
|
|
2018-09-10 11:26:20 +02:00
|
|
|
/**
|
|
|
|
Function for drawing a single pixel (like fragment shader).
|
|
|
|
*/
|
2018-09-17 17:55:33 +02:00
|
|
|
inline void pixelFunc(RCL_PixelInfo *pixel)
|
2018-09-10 11:26:20 +02:00
|
|
|
{
|
2018-09-18 19:10:20 +02:00
|
|
|
uint8_t color = 0;
|
2018-09-10 12:38:34 +02:00
|
|
|
int16_t intensity = 0;
|
2018-09-10 11:26:20 +02:00
|
|
|
|
2018-09-11 14:37:54 +02:00
|
|
|
if (pixel->isWall)
|
2018-09-10 11:26:20 +02:00
|
|
|
{
|
2018-09-24 19:24:35 +02:00
|
|
|
if (pixel->hit.square.x != selectedSquare.x || pixel->hit.square.y != selectedSquare.y || (editing && pokitto.frameCount % 2) == 0)
|
|
|
|
{
|
2018-09-27 12:55:03 +02:00
|
|
|
intensity = pixel->depth / (RCL_UNITS_PER_SQUARE * 2) +
|
|
|
|
((pixel->hit.direction == 0 || pixel->hit.direction == 2) ? 4 : 0);
|
2018-09-24 19:24:35 +02:00
|
|
|
|
2018-09-27 12:55:03 +02:00
|
|
|
color = addIntensity(squareColors[pixel->hit.type],intensity);
|
2018-09-24 19:24:35 +02:00
|
|
|
}
|
|
|
|
else
|
|
|
|
color = 30;
|
2018-09-10 12:38:34 +02:00
|
|
|
}
|
2018-09-11 14:37:54 +02:00
|
|
|
else if (pixel->isFloor)
|
2018-09-10 12:38:34 +02:00
|
|
|
{
|
2018-09-11 14:37:54 +02:00
|
|
|
if (!pixel->isHorizon)
|
2018-09-28 20:52:27 +02:00
|
|
|
{
|
2018-09-27 10:30:52 +02:00
|
|
|
intensity = pixel->depth / RCL_UNITS_PER_SQUARE;
|
2018-09-28 20:52:27 +02:00
|
|
|
color = addIntensity(floorColors[(pixel->height / RCL_UNITS_PER_SQUARE) % FLOOR_COLORS],intensity);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
color = floorColors[0];
|
2018-09-10 11:26:20 +02:00
|
|
|
}
|
|
|
|
else
|
2018-09-10 12:38:34 +02:00
|
|
|
{
|
2018-09-22 15:52:43 +02:00
|
|
|
if (previousColumn != pixel->position.x)
|
2018-09-10 12:38:34 +02:00
|
|
|
{
|
2018-09-17 17:55:33 +02:00
|
|
|
backgroundColumn = RCL_absVal(pixel->position.x + (110 * player.mCamera.direction) / RCL_UNITS_PER_SQUARE) % 110;
|
2018-09-11 14:37:54 +02:00
|
|
|
previousColumn = pixel->position.x;
|
2018-09-10 12:38:34 +02:00
|
|
|
}
|
2018-09-22 15:52:43 +02:00
|
|
|
|
|
|
|
color = imageBackground[2 + backgroundColumn * 44 + RCL_clamp(pixel->position.y - player.mCamera.shear,0,43)];
|
2018-09-10 12:38:34 +02:00
|
|
|
}
|
2018-09-10 11:26:20 +02:00
|
|
|
|
2018-09-18 19:10:20 +02:00
|
|
|
putSubsampledPixel(pixel->position.x,pixel->position.y,color);
|
2018-09-10 11:26:20 +02:00
|
|
|
}
|
|
|
|
|
2018-09-11 10:12:31 +02:00
|
|
|
bool flyBy = true;
|
|
|
|
|
2018-09-10 11:26:20 +02:00
|
|
|
void draw()
|
|
|
|
{
|
2018-09-10 19:28:36 +02:00
|
|
|
player.mCamera.height += player.mHeadBob;
|
2018-09-21 08:47:42 +02:00
|
|
|
RCL_renderComplex(player.mCamera,floorHeightAt,0,colorAt,defaultConstraints);
|
2018-09-10 19:28:36 +02:00
|
|
|
player.mCamera.height -= player.mHeadBob;
|
2018-09-11 10:12:31 +02:00
|
|
|
|
|
|
|
if (flyBy && (pokitto.frameCount >> 3) % 3 != 0)
|
|
|
|
{
|
2018-09-27 12:55:03 +02:00
|
|
|
pokitto.display.setColor(15);
|
2018-09-13 12:48:28 +02:00
|
|
|
pokitto.display.fillRect(22,3,66,10);
|
2018-09-11 10:12:31 +02:00
|
|
|
pokitto.display.setCursor(25,5);
|
2018-09-27 12:55:03 +02:00
|
|
|
pokitto.display.setColor(31);
|
2018-09-11 10:12:31 +02:00
|
|
|
pokitto.display.invisiblecolor = 0;
|
|
|
|
pokitto.display.print("press any key");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void cameraFlyBy(uint32_t dt)
|
|
|
|
{
|
2018-09-17 17:55:33 +02:00
|
|
|
RCL_Unit height = floorHeightAt(
|
|
|
|
RCL_divRoundDown(player.mCamera.position.x,RCL_UNITS_PER_SQUARE),
|
|
|
|
RCL_divRoundDown(player.mCamera.position.y,RCL_UNITS_PER_SQUARE)) + RCL_UNITS_PER_SQUARE * 3;
|
2018-09-11 10:12:31 +02:00
|
|
|
|
2018-09-17 17:55:33 +02:00
|
|
|
RCL_Unit heightDiff = player.mCamera.height - height;
|
2018-09-11 10:12:31 +02:00
|
|
|
|
2018-09-17 17:55:33 +02:00
|
|
|
RCL_Unit step = (200 * dt) / 1000;
|
2018-09-11 10:12:31 +02:00
|
|
|
|
2018-09-17 17:55:33 +02:00
|
|
|
if (heightDiff > RCL_UNITS_PER_SQUARE * 2)
|
2018-09-11 10:12:31 +02:00
|
|
|
{
|
|
|
|
player.mCamera.height -= step * heightDiff / 200;
|
|
|
|
player.mCamera.shear = max(player.mCamera.shear - 1,-80);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2018-09-17 17:55:33 +02:00
|
|
|
if (heightDiff < RCL_UNITS_PER_SQUARE)
|
|
|
|
player.mCamera.height += step * RCL_absVal(heightDiff / 70);
|
2018-09-11 10:12:31 +02:00
|
|
|
|
|
|
|
if (player.mCamera.shear < 0 && pokitto.frameCount % 2 == 0)
|
|
|
|
player.mCamera.shear++;
|
|
|
|
}
|
|
|
|
|
|
|
|
player.mCamera.position.x += step * 30;
|
|
|
|
player.mCamera.position.y += step * 15;
|
2018-09-17 17:55:33 +02:00
|
|
|
player.mCamera.direction = RCL_sinInt(pokitto.frameCount / 8);
|
2018-09-10 11:26:20 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
int main()
|
|
|
|
{
|
|
|
|
initGeneral();
|
|
|
|
|
2018-09-18 15:28:43 +02:00
|
|
|
defaultConstraints.maxHits = 6;
|
|
|
|
defaultConstraints.maxSteps = 20;
|
|
|
|
|
2018-09-27 12:55:03 +02:00
|
|
|
squareColors[0] = 179;
|
|
|
|
squareColors[1] = 147;
|
|
|
|
squareColors[2] = 130;
|
|
|
|
squareColors[3] = 210;
|
2018-09-24 19:24:35 +02:00
|
|
|
|
2018-09-28 20:52:27 +02:00
|
|
|
floorColors[0] = HUE(2);
|
|
|
|
floorColors[1] = HUE(3);
|
|
|
|
floorColors[2] = HUE(10);
|
|
|
|
floorColors[3] = HUE(11);
|
|
|
|
floorColors[4] = HUE(1);
|
|
|
|
floorColors[5] = HUE(5);
|
|
|
|
floorColors[6] = HUE(6);
|
|
|
|
floorColors[7] = HUE(14);
|
|
|
|
|
2018-09-10 11:26:20 +02:00
|
|
|
player.setPositionSquare(4,5);
|
2018-09-11 10:12:31 +02:00
|
|
|
player.mCamera.height = floorHeightAt(4,5);
|
2018-09-10 11:26:20 +02:00
|
|
|
|
2018-09-10 17:40:27 +02:00
|
|
|
// init changes
|
|
|
|
|
2018-09-10 15:09:34 +02:00
|
|
|
for (uint16_t i = 0; i < MAX_CHANGES; ++i)
|
|
|
|
{
|
2018-09-10 17:40:27 +02:00
|
|
|
changes[i].mCoords.x = (i + 1) * 1000;
|
2018-09-10 15:09:34 +02:00
|
|
|
changes[i].mCoords.y = 0;
|
2018-09-10 15:34:01 +02:00
|
|
|
changes[i].mHeight = floorHeightAt(i,0);
|
2018-09-10 15:09:34 +02:00
|
|
|
}
|
|
|
|
|
2018-09-10 11:26:20 +02:00
|
|
|
uint32_t previousTime = 0;
|
|
|
|
uint32_t dt;
|
|
|
|
|
2018-09-10 19:02:23 +02:00
|
|
|
int16_t moveDirection;
|
|
|
|
int16_t shearDirection;
|
|
|
|
int16_t rotationDirection;
|
|
|
|
bool strafe;
|
|
|
|
|
2018-09-10 11:26:20 +02:00
|
|
|
while (pokitto.isRunning())
|
|
|
|
{
|
|
|
|
if (pokitto.update())
|
|
|
|
{
|
|
|
|
draw();
|
|
|
|
|
2018-09-10 19:02:23 +02:00
|
|
|
moveDirection = 0;
|
|
|
|
shearDirection = 0;
|
|
|
|
rotationDirection = 0;
|
|
|
|
strafe = false;
|
|
|
|
|
2018-09-10 11:26:20 +02:00
|
|
|
uint32_t timeNow = pokitto.getTime();
|
|
|
|
dt = timeNow - previousTime;
|
|
|
|
previousTime = timeNow;
|
|
|
|
|
2018-09-11 10:12:31 +02:00
|
|
|
if (flyBy)
|
|
|
|
{
|
|
|
|
cameraFlyBy(dt);
|
|
|
|
|
|
|
|
if (pokitto.aBtn() || pokitto.bBtn() || pokitto.cBtn() ||
|
|
|
|
pokitto.upBtn() || pokitto.downBtn() || pokitto.leftBtn() ||
|
|
|
|
pokitto.rightBtn())
|
|
|
|
flyBy = false;
|
|
|
|
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
2018-09-10 19:02:23 +02:00
|
|
|
strafe = pokitto.aBtn();
|
2018-09-10 11:26:20 +02:00
|
|
|
|
|
|
|
if (pokitto.cBtn())
|
|
|
|
{
|
2018-09-10 15:09:34 +02:00
|
|
|
if (editReleased)
|
2018-09-10 11:26:20 +02:00
|
|
|
{
|
2018-09-10 15:09:34 +02:00
|
|
|
editing = !editing;
|
|
|
|
|
2018-09-10 19:02:23 +02:00
|
|
|
if (editing)
|
|
|
|
{
|
2018-09-17 17:55:33 +02:00
|
|
|
RCL_Vector2D facingOffset;
|
2018-09-10 19:02:23 +02:00
|
|
|
facingOffset.x = 0;
|
|
|
|
facingOffset.y = 0;
|
|
|
|
|
2018-09-17 17:55:33 +02:00
|
|
|
if (player.mCamera.direction > (4 * RCL_UNITS_PER_SQUARE / 12) &&
|
|
|
|
player.mCamera.direction <= (8 * RCL_UNITS_PER_SQUARE / 12))
|
2018-09-10 19:02:23 +02:00
|
|
|
facingOffset.x = -1;
|
2018-09-17 17:55:33 +02:00
|
|
|
else if (player.mCamera.direction < (2 * RCL_UNITS_PER_SQUARE / 12) ||
|
|
|
|
player.mCamera.direction >= (10 * RCL_UNITS_PER_SQUARE / 12))
|
2018-09-10 19:02:23 +02:00
|
|
|
facingOffset.x = 1;
|
|
|
|
else
|
|
|
|
facingOffset.x = 0;
|
|
|
|
|
2018-09-17 17:55:33 +02:00
|
|
|
if (player.mCamera.direction > (RCL_UNITS_PER_SQUARE / 12) &&
|
|
|
|
player.mCamera.direction <= (5 * RCL_UNITS_PER_SQUARE / 12))
|
2018-09-10 19:02:23 +02:00
|
|
|
facingOffset.y = -1;
|
2018-09-17 17:55:33 +02:00
|
|
|
else if (player.mCamera.direction > (6 * RCL_UNITS_PER_SQUARE / 12) &&
|
|
|
|
player.mCamera.direction <= (11 * RCL_UNITS_PER_SQUARE / 12))
|
2018-09-10 19:02:23 +02:00
|
|
|
facingOffset.y = 1;
|
|
|
|
else
|
|
|
|
facingOffset.y = 0;
|
|
|
|
|
2018-09-17 17:55:33 +02:00
|
|
|
selectedSquare.x = RCL_divRoundDown(player.mCamera.position.x,RCL_UNITS_PER_SQUARE) + facingOffset.x;
|
|
|
|
selectedSquare.y = RCL_divRoundDown(player.mCamera.position.y,RCL_UNITS_PER_SQUARE) + facingOffset.y;
|
2018-09-10 19:02:23 +02:00
|
|
|
|
|
|
|
changeIndex = (changeIndex + 1) % MAX_CHANGES;
|
|
|
|
|
|
|
|
for (uint16_t i = 0; i < MAX_CHANGES; ++i)
|
|
|
|
if (changes[i].mCoords.x == selectedSquare.x &&
|
|
|
|
changes[i].mCoords.y == selectedSquare.y)
|
|
|
|
{
|
|
|
|
changeIndex = i;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
changes[changeIndex].mHeight = floorHeightAt(selectedSquare.x,selectedSquare.y);
|
|
|
|
changes[changeIndex].mColor = colorAt(selectedSquare.x,selectedSquare.y);
|
|
|
|
changes[changeIndex].mCoords.x = selectedSquare.x;
|
|
|
|
changes[changeIndex].mCoords.y = selectedSquare.y;
|
|
|
|
editCounter = 0;
|
|
|
|
}
|
|
|
|
|
2018-09-10 15:09:34 +02:00
|
|
|
editReleased = false;
|
2018-09-10 11:26:20 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
2018-09-10 15:09:34 +02:00
|
|
|
editReleased = true;
|
2018-09-10 11:26:20 +02:00
|
|
|
|
|
|
|
if (pokitto.upBtn())
|
|
|
|
{
|
2018-09-10 15:09:34 +02:00
|
|
|
if (editing)
|
|
|
|
{
|
2018-09-10 15:34:01 +02:00
|
|
|
if (editCounter == 0)
|
|
|
|
{
|
2018-09-17 17:55:33 +02:00
|
|
|
changes[changeIndex].mHeight += RCL_UNITS_PER_SQUARE / 4;
|
2018-09-10 15:34:01 +02:00
|
|
|
editCounter = 4;
|
|
|
|
}
|
2018-09-10 15:09:34 +02:00
|
|
|
}
|
2018-09-10 19:02:23 +02:00
|
|
|
else if (strafe)
|
|
|
|
shearDirection = 1;
|
2018-09-10 11:26:20 +02:00
|
|
|
else
|
2018-09-10 19:02:23 +02:00
|
|
|
moveDirection = 1;
|
2018-09-10 11:26:20 +02:00
|
|
|
}
|
|
|
|
else if (pokitto.downBtn())
|
|
|
|
{
|
2018-09-10 15:09:34 +02:00
|
|
|
if (editing)
|
|
|
|
{
|
2018-09-10 15:34:01 +02:00
|
|
|
if (editCounter == 0)
|
|
|
|
{
|
2018-09-17 17:55:33 +02:00
|
|
|
changes[changeIndex].mHeight -= RCL_UNITS_PER_SQUARE / 4;
|
2018-09-10 15:34:01 +02:00
|
|
|
editCounter = 4;
|
|
|
|
}
|
2018-09-10 15:09:34 +02:00
|
|
|
}
|
2018-09-10 19:02:23 +02:00
|
|
|
else if (strafe)
|
|
|
|
shearDirection = -1;
|
2018-09-10 11:26:20 +02:00
|
|
|
else
|
2018-09-10 19:02:23 +02:00
|
|
|
moveDirection = -1;
|
2018-09-10 15:34:01 +02:00
|
|
|
}
|
2018-09-10 17:27:39 +02:00
|
|
|
|
2018-09-10 19:02:23 +02:00
|
|
|
uint16_t colorAddition = 0;
|
2018-09-10 11:26:20 +02:00
|
|
|
|
2018-09-10 17:27:39 +02:00
|
|
|
if (pokitto.rightBtn())
|
2018-09-10 11:26:20 +02:00
|
|
|
{
|
2018-09-10 19:02:23 +02:00
|
|
|
if (strafe)
|
|
|
|
moveDirection = 1;
|
|
|
|
else if (!editing)
|
|
|
|
rotationDirection = 1;
|
|
|
|
else
|
|
|
|
colorAddition = 1;
|
2018-09-10 11:26:20 +02:00
|
|
|
}
|
2018-09-10 19:02:23 +02:00
|
|
|
else if (pokitto.leftBtn())
|
2018-09-10 17:27:39 +02:00
|
|
|
{
|
2018-09-10 19:02:23 +02:00
|
|
|
if (strafe)
|
|
|
|
moveDirection = - 1;
|
|
|
|
else if (!editing)
|
|
|
|
rotationDirection = -1;
|
2018-09-10 17:27:39 +02:00
|
|
|
else
|
2018-09-10 19:02:23 +02:00
|
|
|
colorAddition = -1;
|
|
|
|
}
|
2018-09-10 11:26:20 +02:00
|
|
|
|
2018-09-11 11:00:27 +02:00
|
|
|
if (editing)
|
2018-09-10 11:26:20 +02:00
|
|
|
{
|
2018-09-11 11:00:27 +02:00
|
|
|
int16_t heightDiff = changes[changeIndex].mHeight - player.mCamera.height;
|
|
|
|
|
2018-09-17 17:55:33 +02:00
|
|
|
if (heightDiff > RCL_UNITS_PER_SQUARE / 2)
|
2018-09-11 11:00:27 +02:00
|
|
|
shearDirection = 1;
|
2018-09-17 17:55:33 +02:00
|
|
|
else if (heightDiff < -1 * RCL_UNITS_PER_SQUARE / 2)
|
2018-09-11 11:00:27 +02:00
|
|
|
shearDirection = -1;
|
|
|
|
|
|
|
|
if (editCounter == 0 && colorAddition != 0)
|
|
|
|
{
|
2018-09-17 17:55:33 +02:00
|
|
|
changes[changeIndex].mColor = RCL_wrap(changes[changeIndex].mColor + colorAddition,SQUARE_COLORS);
|
2018-09-11 11:00:27 +02:00
|
|
|
editCounter = 4;
|
|
|
|
}
|
2018-09-10 19:02:23 +02:00
|
|
|
}
|
2018-09-10 11:26:20 +02:00
|
|
|
|
2018-09-10 19:02:23 +02:00
|
|
|
editCounter = max(0, editCounter - 1);
|
2018-09-10 11:26:20 +02:00
|
|
|
|
2018-09-10 19:02:23 +02:00
|
|
|
player.update(moveDirection,strafe,rotationDirection,pokitto.bBtn(),shearDirection,
|
|
|
|
floorHeightAt,0,true,dt);
|
2018-09-10 11:26:20 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|