Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Merge branch 'master' of git://github.com/mtheall/tiny-2d-games

  • Loading branch information...
commit 243a6f8fc22011d37e651a1513f67bb6556efe97 2 parents e5cc277 + 4b2d83b
Steve Schnepp steveschnepp authored
3  nds/fbtest/.gitignore
... ... @@ -0,0 +1,3 @@
  1 +build/
  2 +*.nds
  3 +*.elf
4 nds/fbtest/Makefile
@@ -30,9 +30,9 @@ GRAPHICS := gfx
30 30 #---------------------------------------------------------------------------------
31 31 # options for code generation
32 32 #---------------------------------------------------------------------------------
33   -ARCH := -mthumb -mthumb-interwork
  33 +ARCH := -marm -mthumb-interwork
34 34
35   -CFLAGS := -g -Wall -O2 -std=c++11\
  35 +CFLAGS := -g -Wall -O2 -std=gnu++11\
36 36 -march=armv5te -mtune=arm946e-s -fomit-frame-pointer\
37 37 -ffast-math \
38 38 $(ARCH)
10 nds/fbtest/source/main.cpp
@@ -96,8 +96,8 @@ int main(int argc, char *argv[]) {
96 96 e->x = src.x;
97 97 e->y = src.y;
98 98
99   - e->dx = (xor128()%256 - 128) / 256.0f;
100   - e->dy = (xor128()%256 - 128) / 256.0f;
  99 + e->dx = f32((s32)inttof32((xor128()%256 - 128))) / 256.0f;
  100 + e->dy = f32((s32)inttof32((xor128()%256 - 128))) / 256.0f;
101 101
102 102 e->color = xor128()%16+16; // don't allow transparent
103 103 myEntities.push_back(e);
@@ -206,9 +206,9 @@ int main(int argc, char *argv[]) {
206 206 // Print debug info
207 207 {
208 208 consoleClear();
209   - printf("nb: %d\n", myEntities.size());
210   - printf("cpu: %.0f%%\n", cpu_usage / 1.92f);
211   - printf("ticks: %d/%d (%.0f)\n", ticks_move, ticks_done, (100.0f * ticks_move / ticks_done));
  209 + iprintf("nb: %d\n", myEntities.size());
  210 + iprintf("cpu: %u%%\n", cpu_usage*100/ 192);
  211 + iprintf("ticks: %d/%d (%u)\n", ticks_move, ticks_done, (100 * ticks_move / ticks_done));
212 212 }
213 213
214 214 // copy to vram

0 comments on commit 243a6f8

Please sign in to comment.
Something went wrong with that request. Please try again.