mirror of
https://git.planet-casio.com/Slyvtt/Collab_RPG.git
synced 2025-05-28 14:35:18 +02:00
Running clang-format
This commit is contained in:
parent
91e0e4b74d
commit
ea50bed171
3 changed files with 8 additions and 13 deletions
|
@ -1,10 +1,10 @@
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
|
#include <fxlibc/printf.h>
|
||||||
#include <gint/cpu.h>
|
#include <gint/cpu.h>
|
||||||
#include <gint/display.h>
|
#include <gint/display.h>
|
||||||
#include <gint/keyboard.h>
|
#include <gint/keyboard.h>
|
||||||
#include <gint/timer.h>
|
#include <gint/timer.h>
|
||||||
#include <fxlibc/printf.h>
|
|
||||||
|
|
||||||
#if USB_FEATURE
|
#if USB_FEATURE
|
||||||
#include <gint/usb-ff-bulk.h>
|
#include <gint/usb-ff-bulk.h>
|
||||||
|
|
|
@ -12,13 +12,7 @@ extern Map level2;
|
||||||
extern Map level3;
|
extern Map level3;
|
||||||
extern Map level4;
|
extern Map level4;
|
||||||
|
|
||||||
Map *worldRPG[] = {
|
Map *worldRPG[] = {&level0, &level1, &level2, &level3, &level4};
|
||||||
&level0,
|
|
||||||
&level1,
|
|
||||||
&level2,
|
|
||||||
&level3,
|
|
||||||
&level4
|
|
||||||
};
|
|
||||||
|
|
||||||
// extern ExtraData *extraRPG[];
|
// extern ExtraData *extraRPG[];
|
||||||
|
|
||||||
|
|
11
src/player.c
11
src/player.c
|
@ -171,10 +171,11 @@ bool player_collision(Game *game, Direction direction,
|
||||||
/* check where the player is expected to go on the next move */
|
/* check where the player is expected to go on the next move */
|
||||||
/* if outside the map, we check if there is a map on the other */
|
/* if outside the map, we check if there is a map on the other */
|
||||||
/* side of the current map*/
|
/* side of the current map*/
|
||||||
if(0){
|
if(0) {
|
||||||
//if(map_get_walkable(game, player_tile_x, player_tile_y) == MAP_OUTSIDE) {
|
// if(map_get_walkable(game, player_tile_x, player_tile_y) ==
|
||||||
// we compute the expected world coordinates accordingly
|
// MAP_OUTSIDE) {
|
||||||
// while taking care of the scaling between fx and cg models (PXSIZE)
|
// we compute the expected world coordinates accordingly
|
||||||
|
// while taking care of the scaling between fx and cg models (PXSIZE)
|
||||||
int worldX = (player->wx + dx) / PXSIZE;
|
int worldX = (player->wx + dx) / PXSIZE;
|
||||||
int worldY = (player->wy + dy) / PXSIZE;
|
int worldY = (player->wy + dy) / PXSIZE;
|
||||||
Map *map = map_get_for_coordinates(game, worldX, worldY);
|
Map *map = map_get_for_coordinates(game, worldX, worldY);
|
||||||
|
@ -236,7 +237,7 @@ bool player_collision(Game *game, Direction direction,
|
||||||
int speed = (on_walkable >= 0 && on_walkable < WALKABLE_TILE_MAX)
|
int speed = (on_walkable >= 0 && on_walkable < WALKABLE_TILE_MAX)
|
||||||
? walkable_speed[on_walkable]
|
? walkable_speed[on_walkable]
|
||||||
: 0;
|
: 0;
|
||||||
//speed = SPEED;
|
// speed = SPEED;
|
||||||
|
|
||||||
/* if he's on a hard tile */
|
/* if he's on a hard tile */
|
||||||
if(!speed) {
|
if(!speed) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue