Skip to content

Commit 794956e

Browse files
Switch port
1 parent 06baf8b commit 794956e

File tree

9 files changed

+416
-13
lines changed

9 files changed

+416
-13
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
[![codecov](https://codecov.io/gh/lincolncpp/corrida_aritmetica/branch/master/graph/badge.svg)](https://codecov.io/gh/lincolncpp/corrida_aritmetica)
55
[![StackShare](http://img.shields.io/badge/tech-stack-0690fa.svg?style=flat)](https://stackshare.io/lincolncpp/corrida-aritmetica)
66

7-
Arithmetic run is a open source, cross-platform 2D game made in Java with libGDX.
7+
Arithmetic run is a open source, cross-platform 2D game made in Java with libGDX. Ported to
8+
Nintendo Switch using [SwitchGDX](https://github.com/TheLogicMaster/switch-gdx).
89

910
<img src="https://i.ibb.co/tM5hMdC/gith.png" width="700px" alt="screenshot"></a>
1011

@@ -22,6 +23,9 @@ The documentation can be accessed [here](https://lincolncpp.github.io/arithmetic
2223

2324
## Authors
2425

26+
### Nintendo Switch Port
27+
- [TheLogicMaster](https://github.com/TheLogicMaster)
28+
2529
### Game development
2630
- Fernando Lincoln - [lincolncpp](https://github.com/lincolncpp)
2731
- Victor Kendi - [victorkendi](https://github.com/victorkendi)

build.gradle

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,14 @@ allprojects {
2222
version = '1.0'
2323
ext {
2424
appName = "Corrida Aritmetica"
25-
gdxVersion = '1.9.10'
25+
gdxVersion = '1.11.0'
2626
roboVMVersion = '2.3.8'
27-
box2DLightsVersion = '1.4'
28-
ashleyVersion = '1.7.0'
29-
aiVersion = '1.8.0'
27+
box2DLightsVersion = '1.5'
28+
ashleyVersion = '1.7.4'
29+
aiVersion = '1.8.2'
30+
retroLambdaVersion = '2.5.7'
31+
clearwingVersion = '0.1'
32+
switchGdxVersion = '0.1'
3033
}
3134

3235
repositories {

core/src/com/usp/corrida/screens/GameScreen.java

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -211,9 +211,11 @@ private void loseLife(){
211211
long totalScore = score+scoreAdd;
212212
if (totalScore > core.save.getHighScore()){
213213
core.save.setHighScore(totalScore);
214-
gameOverMessage = "NOVO RECORDE!";
214+
// gameOverMessage = "NOVO RECORDE!";
215+
gameOverMessage = "NEW RECORD!";
215216
}
216-
else gameOverMessage = "RECORDE: "+core.save.getHighScore();
217+
// else gameOverMessage = "RECORDE: "+core.save.getHighScore();
218+
else gameOverMessage = "RECORD: "+core.save.getHighScore();
217219
}
218220
}
219221

@@ -379,7 +381,8 @@ private void renderGameOver(){
379381
if (time > GAMEOVER_SLIDE) gameOver = true;
380382

381383
core.batch.draw(core.res.texBlack, 0, fx, core.width, core.height-32);
382-
core.res.font32.draw(core.batch, "FIM DE JOGO!", 0, fx+core.height/2f+core.res.font32.getCapHeight()/2, core.width, 1, false);
384+
// core.res.font32.draw(core.batch, "FIM DE JOGO!", 0, fx+core.height/2f+core.res.font32.getCapHeight()/2, core.width, 1, false);
385+
core.res.font32.draw(core.batch, "GAME OVER!", 0, fx+core.height/2f+core.res.font32.getCapHeight()/2, core.width, 1, false);
383386
core.res.font20.draw(core.batch, gameOverMessage, 0, fx+core.height/2f+core.res.font32.getCapHeight()/2-25, core.width, 1, false);
384387
}
385388
}
@@ -401,7 +404,8 @@ public void render (float delta) {
401404
}
402405

403406
// Drawing score
404-
core.res.font20.draw(core.batch, "PONTOS: "+ score, 10+20*2+16+10, core.height-32/2f+core.res.font20.getCapHeight()/2f);
407+
// core.res.font20.draw(core.batch, "PONTOS: "+ score, 10+20*2+16+10, core.height-32/2f+core.res.font20.getCapHeight()/2f);
408+
core.res.font20.draw(core.batch, "POINTS: "+ score, 10+20*2+16+10, core.height-32/2f+core.res.font20.getCapHeight()/2f);
405409

406410
// Drawing characters
407411
for(int i = 0;i < MAX_NPC;i++){

core/src/com/usp/corrida/screens/TitleScreen.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,8 @@ public void renderHelpBox(){
116116

117117
// Draw "How to play"
118118
core.res.font32.setColor(0.8509803921568627f, 0.592156862745098f, 0.0784313725490196f, 1);
119-
core.res.font32.draw(core.batch, "COMO JOGAR", 0, y+h-20, core.width, 1, false);
119+
// core.res.font32.draw(core.batch, "COMO JOGAR", 0, y+h-20, core.width, 1, false);
120+
core.res.font32.draw(core.batch, "HOW TO PLAY", 0, y+h-20, core.width, 1, false);
120121
core.res.font32.setColor(1, 1, 1, 1);
121122
}
122123

@@ -135,14 +136,16 @@ public void render (float delta) {
135136
core.charPlayer.render(delta, 0);
136137

137138
// Draw record text
138-
core.res.font20.draw(core.batch, "RECORDE: "+core.save.getHighScore(), 10, core.height-32/2f+core.res.font20.getCapHeight()/2f);
139+
// core.res.font20.draw(core.batch, "RECORDE: "+core.save.getHighScore(), 10, core.height-32/2f+core.res.font20.getCapHeight()/2f);
140+
core.res.font20.draw(core.batch, "RECORD: "+core.save.getHighScore(), 10, core.height-32/2f+core.res.font20.getCapHeight()/2f);
139141

140142
// Draw "Touch to play"
141143
float multiplier = ((float)Math.sin((double)System.currentTimeMillis()/(double)300)+1)/2f;
142144
core.batch.setColor(1f, 1f, 1f, 0.3f+0.3f*multiplier);
143145
core.batch.draw(core.res.texBlack, 0, core.height/2-15, core.width, 30);
144146
core.batch.setColor(1, 1, 1, 1);
145-
core.res.font20.draw(core.batch, "TOQUE PARA JOGAR!", 0, core.height/2+core.res.font20.getCapHeight()/2, core.width, 1, false);
147+
// core.res.font20.draw(core.batch, "TOQUE PARA JOGAR!", 0, core.height/2+core.res.font20.getCapHeight()/2, core.width, 1, false);
148+
core.res.font20.draw(core.batch, "TAP TO PLAY!", 0, core.height/2+core.res.font20.getCapHeight()/2, core.width, 1, false);
146149

147150
// Draw help button
148151
core.batch.draw(texHelpButton, core.width-16-8, core.height-16-8);

settings.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
include 'desktop', 'android', 'core'
1+
include 'desktop', 'android', 'core', 'switch'

0 commit comments

Comments
 (0)