fixed doubles becoming nan (was fpu corruption), some render fixes
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -2,3 +2,5 @@
|
||||
*.img
|
||||
*.code-workspace
|
||||
*.zip
|
||||
dino
|
||||
*.code-workspace
|
18
.vscode/c_cpp_properties.json
vendored
Normal file
18
.vscode/c_cpp_properties.json
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Linux",
|
||||
"includePath": [
|
||||
"${workspaceFolder}/**",
|
||||
"${workspaceFolder}/../kolibrios-nextgen/programs/develop/ktcc/trunk/libc.obj",
|
||||
"/home/coder/Documents/Programming_projects/kolibrios-nextgen/programs/develop/ktcc/trunk/libc.obj/include"
|
||||
],
|
||||
"defines": [],
|
||||
"compilerPath": "/usr/bin/clang",
|
||||
"cStandard": "c17",
|
||||
"cppStandard": "c++14",
|
||||
"intelliSenseMode": "linux-clang-x64"
|
||||
}
|
||||
],
|
||||
"version": 4
|
||||
}
|
6
Makefile
6
Makefile
@@ -1,5 +1,5 @@
|
||||
KTCC_DIR = ../../develop/ktcc/trunk
|
||||
KLIBC = ../../develop/ktcc/trunk/libc.obj
|
||||
KTCC_DIR = ../kolibrios-nextgen/programs/develop/ktcc/trunk
|
||||
KLIBC = $(KTCC_DIR)/libc.obj
|
||||
|
||||
NAME = dino
|
||||
|
||||
@@ -7,7 +7,7 @@ KTCC = $(KTCC_DIR)/bin/kos32-tcc
|
||||
KPACK = kpack
|
||||
|
||||
SRC = $(wildcard *.c)
|
||||
FLAGS= -B$(KTCC_DIR)/bin -I $(KLIBC)/include
|
||||
FLAGS= -B$(KTCC_DIR)/bin -I $(KLIBC)/include -Wall -stack=20480
|
||||
LIBS = -limg
|
||||
|
||||
all: $(SRC)
|
||||
|
@@ -77,14 +77,14 @@ bool distanceMeterUpdate(int deltaTime, int _distance) {
|
||||
bool playSound = false;
|
||||
int distance = _distance;
|
||||
if (!distanceMeter.achievement) {
|
||||
distance = distanceMeterGetActualDistance(_distance);
|
||||
distance = distanceMeterGetActualDistance(distance);
|
||||
// check if score has gone beyond the initial digit count.
|
||||
if (distance > distanceMeter.maxScore && distanceMeter.maxScoreUnits == DM_MAX_DISTANCE_UNITS) {
|
||||
distanceMeter.maxScoreUnits++;
|
||||
distanceMeter.maxScore = distanceMeter.maxScore * 10 + 9;
|
||||
}
|
||||
// else {
|
||||
// this.distance was in original but i didsnt see any usage of this field
|
||||
// NOTE this.distance was in original but i didsnt see any usage of this field
|
||||
// }
|
||||
|
||||
if (distance > 0) {
|
||||
|
66
graphics.c
66
graphics.c
@@ -1,5 +1,6 @@
|
||||
#include "graphics.h"
|
||||
#include "sprites.h"
|
||||
#include <assert.h>
|
||||
|
||||
static ksys_colors_table_t sys_color_table;
|
||||
static ksys_pos_t win_pos;
|
||||
@@ -24,14 +25,75 @@ void graphicsInit() {
|
||||
}
|
||||
debug_printf("spriteAtlas->Type = %d\n", spriteAtlas->Type);
|
||||
screenImage = img_create(DEFAULT_WIDTH, 200, IMAGE_BPP32);
|
||||
// asm_inline("emms"); // doenst need bec. libimg functions used here does not use mmx (=> does not currept fpu state)
|
||||
}
|
||||
|
||||
// void save_fpu_state(void *fpustate) {
|
||||
// __asm__("fsave %0" : "=m" (*fpustate) : : "memory");
|
||||
// }
|
||||
|
||||
// void restore_fpu_state(const void *fpustate) {
|
||||
// __asm__("fnsave %0" : : "m" (*fpustate));
|
||||
// }
|
||||
|
||||
|
||||
void graphicsBlitAtlasImage(int atlasX, int atlasY, int destX, int destY, int w, int h, bool center) {
|
||||
// debug_printf("start graphicsBlitAtlasImage %d %d %d %d %d %d %x %x\n", atlasX, atlasY, destX, destY, w, h, screenImage, spriteAtlas);
|
||||
if (destX < 0 || destY < 0) {
|
||||
// debug_printf("start graphicsBlitAtlasImage ax = %d ay = %d dx = %d dy = %d w = %d h = %d %x %x\n", atlasX, atlasY, destX, destY, w, h, screenImage, spriteAtlas);
|
||||
|
||||
// // asm_inline("int $3");
|
||||
|
||||
|
||||
// if (destX < 0 || destY < 0) {
|
||||
// return;
|
||||
// }
|
||||
// // assert(destX + w <= screenImage->Width && destY + h <= screenImage->Height);
|
||||
// if (destX + w > screenImage->Width || destY + h > screenImage->Height) {
|
||||
// return;
|
||||
// }
|
||||
|
||||
int screen_width = (int)screenImage->Width;
|
||||
int screen_height = (int)screenImage->Height;
|
||||
|
||||
if (destX >= screen_width) {
|
||||
//debug_printf("dX>w!\n");
|
||||
return;
|
||||
}
|
||||
if (destY >= screen_height) {
|
||||
//debug_printf("dY>h!\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if (destX < 0) {
|
||||
destX = 0;
|
||||
w = destX + w;
|
||||
}
|
||||
if (destX + w > screen_width) {
|
||||
w = screen_width - destX;
|
||||
}
|
||||
|
||||
if (destY < 0) {
|
||||
destY = 0;
|
||||
h = destY + h;
|
||||
}
|
||||
if (destY + h > screen_height) {
|
||||
h = screen_height - destY;
|
||||
}
|
||||
|
||||
//printf("start graphicsBlitAtlasImage ax = %d ay = %d dx = %d dy = %d w = %d h = %d %x %x\n\n", atlasX, atlasY, destX, destY, w, h, screenImage, spriteAtlas);
|
||||
|
||||
|
||||
// assert(destX + w <= screen_width && destY + h <= screen_height);
|
||||
// assert(destX >= 0 && destY >= 0);
|
||||
|
||||
// asm_inline("int $3");
|
||||
/*unsigned char buf[512];
|
||||
save_fpu_state(buf);
|
||||
img_blend(screenImage, spriteAtlas, destX, destY, atlasX, atlasY, w, h);
|
||||
restore_fpu_state(buf);*/
|
||||
|
||||
img_blend(screenImage, spriteAtlas, destX, destY, atlasX, atlasY, w, h);
|
||||
asm_inline("emms");
|
||||
|
||||
// debug_printf("end graphicsBlitAtlasImage\n\n");
|
||||
}
|
||||
|
||||
|
23
horizon.c
23
horizon.c
@@ -15,12 +15,20 @@ void horizonInit(int dim_width, double gapCoefficient) {
|
||||
}
|
||||
|
||||
void horizonUpdate(int deltaTime, double currentSpeed, bool updateObstacles, bool showNightMode) {
|
||||
// horizon.runningTime += deltaTime;
|
||||
//horizon.runningTime += deltaTime;
|
||||
debug_printf("h 00 rs = %lf\n", currentSpeed);
|
||||
horizonLineUpdate(deltaTime, currentSpeed);
|
||||
debug_printf("h 0 rs = %lf\n", currentSpeed);
|
||||
// if (currentSpeed != currentSpeed) {
|
||||
// currentSpeed = 6.0;
|
||||
// }
|
||||
// horizon.nightMode.update(showNightMode);
|
||||
horizonUpdateClouds(deltaTime, currentSpeed);
|
||||
debug_printf("h 1\n");
|
||||
if (updateObstacles) {
|
||||
debug_printf("h 02\n");
|
||||
horizonUpdateObstacles(deltaTime, currentSpeed);
|
||||
debug_printf("h 2\n");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,6 +70,7 @@ void horizonUpdateObstacles(int deltaTime, double currentSpeed) {
|
||||
// Obstacles, move to Horizon layer
|
||||
Node* obNode = horizon.obstacles->head;
|
||||
while (obNode != NULL) {
|
||||
debug_printf("obNode = 0x%x, currentSpeed = %lf\n", obNode, currentSpeed);
|
||||
Node* obNodeNext = obNode->next;
|
||||
Obstacle* ob = obNode->data;
|
||||
obstacleUpdate(ob, deltaTime, currentSpeed);
|
||||
@@ -76,17 +85,25 @@ void horizonUpdateObstacles(int deltaTime, double currentSpeed) {
|
||||
obNode = obNodeNext;
|
||||
}
|
||||
|
||||
debug_printf("hu 1\n");
|
||||
|
||||
if (ulist_size(horizon.obstacles) > 0) {
|
||||
Obstacle *lastObstacle = horizon.obstacles->tail->data;
|
||||
|
||||
debug_printf("hu 02\n");
|
||||
|
||||
if (lastObstacle && !lastObstacle->followingObstacleCreated && obstacleIsVisible(lastObstacle) && (lastObstacle->xPos + lastObstacle->width + lastObstacle->gap) < horizon.dim_width) {
|
||||
debug_printf("hu 02+\n");
|
||||
horizonAddNewObstacle(currentSpeed);
|
||||
debug_printf("hu 02++\n");
|
||||
lastObstacle->followingObstacleCreated = true;
|
||||
}
|
||||
debug_printf("hu 2\n");
|
||||
}
|
||||
else {
|
||||
// Create new obstacles.
|
||||
horizonAddNewObstacle(currentSpeed);
|
||||
debug_printf("hu 3\n");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -100,6 +117,7 @@ void horizonAddNewObstacle(double currentSpeed) {
|
||||
horizonAddNewObstacle(currentSpeed);
|
||||
}
|
||||
else {
|
||||
debug_printf("han 0\n");
|
||||
Obstacle* ob = malloc(sizeof(Obstacle));
|
||||
obstacleInit(ob, otc, horizon.dim_width, horizon.gapCoefficient, currentSpeed, otc->width);
|
||||
ulist_push_back(horizon.obstacles, ob);
|
||||
@@ -107,6 +125,7 @@ void horizonAddNewObstacle(double currentSpeed) {
|
||||
if (ulist_size(horizon.obstacleHistory) > 1) {
|
||||
ulist_splice(horizon.obstacleHistory, RUNNER_MAX_OBSTACLE_DUPLICATION);
|
||||
}
|
||||
debug_printf("han 1\n");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -114,11 +133,13 @@ bool horizonDuplicateObstacleCheck(ObstacleType nextObstacleType) {
|
||||
//printf("horizonDuplicateObstacleCheck(%d)\n", nextObstacleType);
|
||||
int duplicateCount = 0;
|
||||
Node* ohNode = horizon.obstacleHistory->head;
|
||||
debug_printf("hd 0\n");
|
||||
while (ohNode != NULL) {
|
||||
//printf("%d\n", *(int*)ohNode->data);
|
||||
duplicateCount = *(int*)ohNode->data == nextObstacleType ? duplicateCount + 1 : 0;
|
||||
ohNode = ohNode->next;
|
||||
}
|
||||
debug_printf("hd 1\n");
|
||||
//printf("duplicateCount = %d\n\n", duplicateCount);
|
||||
return duplicateCount >= RUNNER_MAX_OBSTACLE_DUPLICATION;
|
||||
}
|
||||
|
@@ -39,14 +39,21 @@ void horizonLineUpdateXPos(int pos, int increment) {
|
||||
}
|
||||
|
||||
void horizonLineUpdate(int deltaTime, double speed) {
|
||||
debug_printf("hlu0 = %lf\n", speed);
|
||||
int increment = floor(speed * (FPS / 1000.0) * deltaTime);
|
||||
debug_printf("hlu1 = %lf\n", speed);
|
||||
if (horizonLine.xPos[0] <= 0) {
|
||||
horizonLineUpdateXPos(0, increment);
|
||||
}
|
||||
else {
|
||||
horizonLineUpdateXPos(1, increment);
|
||||
}
|
||||
// asm_inline("int $3");
|
||||
int dsddds = rand() % 1000;
|
||||
double jopa = 0.34243;
|
||||
debug_printf("%d %lf hlu3 = %lf\n", jopa, dsddds, speed);
|
||||
horizonLineDraw();
|
||||
debug_printf("%d %lf hlu4 = %lf\n", jopa, dsddds, speed);
|
||||
}
|
||||
|
||||
void horizonLineReset() {
|
||||
|
14
main.c
14
main.c
@@ -16,8 +16,6 @@
|
||||
#include "trex.h"
|
||||
#include "runner.h"
|
||||
|
||||
#pragma warning(disable:4996)
|
||||
|
||||
uint8_t keyboard_layout[128];
|
||||
|
||||
int main(int argc, char* args[]) {
|
||||
@@ -27,14 +25,13 @@ int main(int argc, char* args[]) {
|
||||
|
||||
runnerInit();
|
||||
|
||||
_ksys_debug_puts("3333333");
|
||||
_ksys_debug_puts("xABCDEFuuit56\n\n");
|
||||
_ksys_debug_puts("privet!! 123");
|
||||
//_ksys_debug_puts("xABCDEFuuit56\n\n");
|
||||
|
||||
_ksys_set_event_mask(0xC0000027); // !
|
||||
_ksys_set_key_input_mode(KSYS_KEY_INPUT_MODE_SCANC);
|
||||
_ksys_keyboard_layout(KSYS_KEYBOARD_LAYOUT_NORMAL, keyboard_layout);
|
||||
|
||||
uint32_t kos_event;
|
||||
int ext_code = 0;
|
||||
uint8_t old_mode = 0;
|
||||
|
||||
@@ -42,7 +39,7 @@ int main(int argc, char* args[]) {
|
||||
while (quit == false) {
|
||||
int frameStartTime = getTimeStamp();
|
||||
//printf("frameStartTime = %d\n", frameStartTime);
|
||||
kos_event = _ksys_check_event();
|
||||
uint32_t kos_event = _ksys_check_event();
|
||||
switch (kos_event) {
|
||||
case KSYS_EVENT_BUTTON:
|
||||
switch (_ksys_get_button()){
|
||||
@@ -77,9 +74,11 @@ int main(int argc, char* args[]) {
|
||||
|
||||
if (scancode < 128) { // KEYDOWN
|
||||
//debug_printf("Keydown: key = 0x%x, scancode = 0x%x, code = 0x%x (%u) state = 0x%x\n", key.val, scancode, code, code, key.state);
|
||||
//debug_printf("keydown c = %u\n", key.code);
|
||||
runnerOnKeyDown(code);
|
||||
} else { // KEYUP
|
||||
//debug_printf("Keyup: key = 0x%x, scancode = 0x%x, code = 0x%x (%u) state = 0x%x\n", key.val, scancode, code, code, key.state);
|
||||
//debug_printf("keyup c = %u\n", key.code);
|
||||
runnerOnKeyUp(code);
|
||||
}
|
||||
}
|
||||
@@ -93,13 +92,16 @@ int main(int argc, char* args[]) {
|
||||
// runnerOnKeyUp(event.key.keysym.sym & 0xFF);
|
||||
// break;
|
||||
case KSYS_EVENT_REDRAW:
|
||||
//debug_printf("graphicsRender\n");
|
||||
graphicsRender();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (runner.nextUpdateScheduled) {
|
||||
//printf("runner update! %u\n", getTimeStamp());
|
||||
//debug_printf("runnerUpdate\n");
|
||||
runnerUpdate();
|
||||
}
|
||||
else {
|
||||
|
1
misc.c
1
misc.c
@@ -1,5 +1,4 @@
|
||||
#include "misc.h"
|
||||
#pragma warning(disable:4996)
|
||||
|
||||
int getRandomNumber(int _min, int _max) {
|
||||
return rand() % (_max - _min + 1) + _min;
|
||||
|
15
obstacle.c
15
obstacle.c
@@ -63,7 +63,8 @@ int obstacleSpritePosX[3] = { ATLAS_CACTUS_SMALL_X, ATLAS_CACTUS_LARGE_X, ATLAS_
|
||||
int obstacleSpritePosY[3] = { ATLAS_CACTUS_SMALL_Y, ATLAS_CACTUS_LARGE_Y, ATLAS_PTERODACTYL_Y};
|
||||
|
||||
|
||||
void obstacleInit(Obstacle* ob, ObstacleTypeConfig *otc, int dim_width, double gapCoefficient, double speed, int opt_xOffset) {
|
||||
void obstacleInit(Obstacle* ob, const ObstacleTypeConfig *otc, int dim_width, double gapCoefficient, double speed, int opt_xOffset) {
|
||||
debug_printf("oi 0\n");
|
||||
ob->typeConfig = *otc;
|
||||
ob->gapCoefficient = gapCoefficient;
|
||||
ob->size = getRandomNumber(1, OBSTACLE_MAX_OBSTACLE_LENGTH);
|
||||
@@ -71,6 +72,8 @@ void obstacleInit(Obstacle* ob, ObstacleTypeConfig *otc, int dim_width, double g
|
||||
ob->xPos = dim_width + opt_xOffset;
|
||||
ob->yPos = 0;
|
||||
|
||||
debug_printf("oi 1\n");
|
||||
|
||||
// For animated obstacles
|
||||
ob->currentFrame = 0;
|
||||
ob->timer = 0;
|
||||
@@ -89,8 +92,12 @@ void obstacleInit(Obstacle* ob, ObstacleTypeConfig *otc, int dim_width, double g
|
||||
ob->yPos = ob->typeConfig.yPos;
|
||||
}
|
||||
|
||||
debug_printf("oi 2\n");
|
||||
|
||||
obstacleDraw(ob);
|
||||
|
||||
debug_printf("oi 3\n");
|
||||
|
||||
// Make collision box adjustments,
|
||||
// Central box is adjusted to the size as one box.
|
||||
// ____ ______ ________
|
||||
@@ -119,12 +126,16 @@ void obstacleDraw(const Obstacle *ob) {
|
||||
if (ob->currentFrame > 0) {
|
||||
sourceX += sourceWidth*ob->currentFrame;
|
||||
}
|
||||
//debug_printf("od ax=%u, ay=%u, dx=%u, dy=%u, w=%u, h=%u\n", sourceX, obstacleSpritePosY[ob->typeConfig.type], ob->xPos, ob->yPos, sourceWidth*ob->size, sourceHeight);
|
||||
graphicsBlitAtlasImage(sourceX, obstacleSpritePosY[ob->typeConfig.type], ob->xPos, ob->yPos, sourceWidth*ob->size, sourceHeight, false);
|
||||
//debug_printf("od 1\n");
|
||||
}
|
||||
|
||||
void obstacleUpdate(Obstacle *ob, int deltaTime, double speed) {
|
||||
if (!ob->remove) {
|
||||
ob->xPos -= floor(((speed + ob->typeConfig.speedOffset)*FPS/1000.)*deltaTime);
|
||||
double dx = floor(((speed + ob->typeConfig.speedOffset)*FPS/1000.)*deltaTime);
|
||||
debug_printf("sp = %lf, ots = %lf, dx = %d, xpos = %d\n", speed, ob->typeConfig.speedOffset, (int)dx, ob->xPos - dx);
|
||||
ob->xPos -= dx;//floor(((speed + ob->typeConfig.speedOffset)*FPS/1000.)*deltaTime);
|
||||
}
|
||||
// Update frames
|
||||
if (ob->typeConfig.numFrames > 1) {
|
||||
|
@@ -58,7 +58,7 @@ typedef struct {
|
||||
|
||||
extern ObstacleTypeConfig obstacleTypeConfigs[3];
|
||||
|
||||
void obstacleInit(Obstacle *ob, ObstacleTypeConfig *otc, int dim_width, double gapCoefficient, double speed, int opt_xOffset);
|
||||
void obstacleInit(Obstacle *ob, const ObstacleTypeConfig *otc, int dim_width, double gapCoefficient, double speed, int opt_xOffset);
|
||||
void obstacleDraw(const Obstacle* ob);
|
||||
void obstacleUpdate(Obstacle* ob, int deltaTime, double speed);
|
||||
int obstacleGetGap(const Obstacle* ob, double gapCoefficient, double speed);
|
||||
|
1
run.bat
1
run.bat
@@ -1 +0,0 @@
|
||||
qemu-system-i386 -fda kolibri.img -boot a -m 512 -usbdevice tablet -drive file=fat:rw:.
|
1
run.sh
Executable file
1
run.sh
Executable file
@@ -0,0 +1 @@
|
||||
qemu-system-i386 -fda kolibri.img -enable-kvm -boot a -m 512 -usbdevice tablet -drive file=fat:rw:.
|
20
runner.c
20
runner.c
@@ -1,12 +1,14 @@
|
||||
#include "runner.h"
|
||||
|
||||
int aaaaaaa[10000];
|
||||
Runner runner;
|
||||
int bbbbbb[10000];
|
||||
|
||||
void runnerInit() {
|
||||
runner.distanceRan = 0;
|
||||
runner.highestScore = 0;
|
||||
runner.time = 0;
|
||||
runner.msPerFrame = 1000 / FPS;
|
||||
runner.msPerFrame = 1000.0 / FPS;
|
||||
runner.currentSpeed = RUNNER_SPEED;
|
||||
runner.activated = false;
|
||||
runner.playing = false;
|
||||
@@ -63,7 +65,8 @@ void runnerOnKeyDown(int key) {
|
||||
// Speed drop, activated only when jump key is not pressed.
|
||||
trexSetSpeedDrop();
|
||||
}
|
||||
else if (!trex.jumping && !trex.ducking) {
|
||||
//else if (!trex.jumping &&!trex.ducking) {
|
||||
else if (!trex.ducking) {
|
||||
// Duck
|
||||
trexSetDuck(true);
|
||||
}
|
||||
@@ -109,10 +112,14 @@ void runnerUpdate() {
|
||||
//printf("runnerUpdate() %d\n", getTimeStamp());
|
||||
runnerClearCanvas();
|
||||
|
||||
debug_printf("t 0\n");
|
||||
|
||||
if (trex.jumping) {
|
||||
trexUpdateJump(deltaTime);
|
||||
}
|
||||
|
||||
debug_printf("t 1\n");
|
||||
|
||||
runner.runningTime += deltaTime;
|
||||
bool hasObstacles = runner.runningTime > RUNNER_CLEAR_TIME;
|
||||
|
||||
@@ -124,16 +131,22 @@ void runnerUpdate() {
|
||||
|
||||
// The horizon doesn't move until the intro is over.
|
||||
if (runner.playingIntro) {
|
||||
debug_printf("t 02 rs = %lf\n", runner.currentSpeed);
|
||||
horizonUpdate(0, runner.currentSpeed, hasObstacles, false);
|
||||
debug_printf("t 2\n");
|
||||
}
|
||||
else {
|
||||
deltaTime = !runner.activated ? 0 : deltaTime;
|
||||
debug_printf("t 03 rs = %lf\n", runner.currentSpeed);
|
||||
horizonUpdate(deltaTime, runner.currentSpeed, hasObstacles, runner.inverted);
|
||||
debug_printf("t 3\n");
|
||||
}
|
||||
|
||||
// Check for collisions.
|
||||
bool collision = hasObstacles && runnerCheckForCollision(horizon.obstacles->head->data);
|
||||
|
||||
debug_printf("t 4\n");
|
||||
|
||||
if (!collision) {
|
||||
runner.distanceRan += runner.currentSpeed * deltaTime / runner.msPerFrame;
|
||||
|
||||
@@ -143,10 +156,13 @@ void runnerUpdate() {
|
||||
}
|
||||
else {
|
||||
runnerGameOver();
|
||||
debug_printf("t 5\n");
|
||||
}
|
||||
|
||||
bool playAchievementSound = distanceMeterUpdate(deltaTime, (int)ceil(runner.distanceRan));
|
||||
|
||||
debug_printf("t 6\n");
|
||||
|
||||
if (playAchievementSound) {
|
||||
//this.playSound(this.soundFx.SCORE); // TODO
|
||||
}
|
||||
|
5
runner.h
5
runner.h
@@ -27,10 +27,10 @@
|
||||
#define RUNNER_MAX_CLOUDS 6
|
||||
#define RUNNER_MAX_OBSTACLE_LENGTH 3
|
||||
#define RUNNER_MAX_OBSTACLE_DUPLICATION 2
|
||||
#define RUNNER_MAX_SPEED 13
|
||||
#define RUNNER_MAX_SPEED 13.0
|
||||
#define RUNNER_MIN_JUMP_HEIGHT 35
|
||||
#define RUNNER_MOBILE_SPEED_COEFFICIENT 1.2
|
||||
#define RUNNER_SPEED 6
|
||||
#define RUNNER_SPEED 6.0
|
||||
#define RUNNER_SPEED_DROP_COEFFICIENT 3
|
||||
|
||||
#define RUNNER_KEYCODE_JUMP_1 82
|
||||
@@ -46,6 +46,7 @@ typedef struct {
|
||||
int time;
|
||||
int runningTime;
|
||||
double msPerFrame;
|
||||
double azazzaza; //
|
||||
double currentSpeed;
|
||||
// Ulist* obstacles;
|
||||
bool activated;
|
||||
|
Reference in New Issue
Block a user