Skip to content

Commit

Permalink
better control scheme
Browse files Browse the repository at this point in the history
  • Loading branch information
bl0ckeduser committed Dec 8, 2011
1 parent f127903 commit 5b512b0
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 8 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@
build/*
demo
*.exe
stdout.txt
*.elf
stdout.txt
4 changes: 2 additions & 2 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ support.
- Screenshot: "wip-screenshot.PNG".

The game controls are:
A button shooting bullets
B button jumping
A button jumping
B button shooting bullets
D-pad movement

-------------------------------------------------------------------
Expand Down
Binary file removed clown3d-DS.elf
Binary file not shown.
Binary file modified clown3d-DS.nds
Binary file not shown.
8 changes: 3 additions & 5 deletions player.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,7 @@ void playerTick(game_obj* player)
player->data[PLAYER_MOVEY] = 0;
}

/* Convert the player angle to a unit vector,
converting the said angle to radians along
the way */
/* Convert the player angle to a unit vector */
#ifdef PC_TARGET
player->data[PLAYER_DIRX] =
(float)sin(player->data[PLAYER_ANGLE] / 360.0 * (2*3.14));
Expand Down Expand Up @@ -92,8 +90,8 @@ void playerTick(game_obj* player)
from an example by Dovoto */
scanKeys();
u16 keys = keysHeld();
shoot = (keys & KEY_A);
jump = (keys & KEY_B);
jump = (keys & KEY_A);
shoot = (keys & KEY_B);
left = (keys & KEY_LEFT);
right = (keys & KEY_RIGHT);
down = (keys & KEY_DOWN);
Expand Down

0 comments on commit 5b512b0

Please sign in to comment.