Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@ local.properties
app/src/main/assets/levelsEasy.xml.compressed
app/src/main/assets/levelsMedium.xml.compressed
app/src/main/assets/levelsHard.xml.compressed


app/src/main/assets/levelsCommunity.xml.compressed
1 change: 1 addition & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ android {
compress(projectDir.path + '/src/main/assets/levelsEasy.xml')
compress(projectDir.path + '/src/main/assets/levelsMedium.xml')
compress(projectDir.path + '/src/main/assets/levelsHard.xml')
compress(projectDir.path + '/src/main/assets/levelsCommunity.xml')
}
}
preBuild.dependsOn compressLevelFile
Expand Down
40 changes: 40 additions & 0 deletions app/src/main/assets/levelsCommunity.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="utf-8" ?>
<levels>

<level number="136"
author="Hleb"
color="ddrrdr
drrrdr
rrrrdr
ddrrrr
rrrrrr
rrrrrr
rrrrrr
rrrrrr"
modifier="
0000L0
0000L0
0000L0
UU0000
000000
000000
000000
F00000" />

<level number="137"
author="Nico207"
color="bbbbr
rooob
roooo
roogb
rgggb
rooob"
modifier="
0000s
0000x
0000L
00F00
000a0
xF00F" />

</levels>
19 changes: 19 additions & 0 deletions app/src/main/assets/levelsMedium.xml
Original file line number Diff line number Diff line change
Expand Up @@ -868,4 +868,23 @@
00000
rUFF0" />

<level number="135"
color="dddddd
doddbd
dddddd
dgddrd
dddddd
gddddd
dddddd
0rbog0"
modifier="
rr00gg
ro00bg
rrbogg
rgborg
rrbogg
RrrggL
F0000F
XFFFFX" />

</levels>
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,14 @@ public class LevelPack {
public static LevelPack EASY;
public static LevelPack MEDIUM;
public static LevelPack HARD;
public static LevelPack COMMUNITY;
private int id;

public static void parsePacks(Context context) {
EASY = new LevelPack(1, "levelsEasy.xml", context);
MEDIUM = new LevelPack(2, "levelsMedium.xml", context);
HARD = new LevelPack(2, "levelsHard.xml", context);
HARD = new LevelPack(3, "levelsHard.xml", context);
COMMUNITY = new LevelPack(4, "levelsCommunity.xml", context);
}

private LevelPack(int id, String fileName, Context context) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ public class LevelPackSelectState extends State {
private Plane pack1;
private Plane pack2;
private Plane pack3;
private Plane pack4;
private Plane selectLevelPackText;
private Container container;
private boolean pressed = false;
Expand Down Expand Up @@ -62,6 +63,10 @@ protected void initialize(GLRenderer glRenderer) {
pack3 = new Plane(-menuEntriesWidth, pack2.getY() - 2 * menuEntriesHeight, menuEntriesWidth, menuEntriesHeight, coordinatesPack3);
container.addDrawable(pack3);

TextureCoordinates coordinatesPack4 = TextureCoordinates.getFromBlocks(6, 14, 12, 15);
pack4 = new Plane(-menuEntriesWidth, pack3.getY() - 2 * menuEntriesHeight, menuEntriesWidth, menuEntriesHeight, coordinatesPack4);
container.addDrawable(pack4);

glRenderer.addDrawable(container);
glRenderer.addDrawable(selectLevelPackText);
}
Expand All @@ -84,6 +89,7 @@ public void entry() {
AnimationFactory.startMenuAnimationEnter(pack1, (int) (3.0f * Animation.DURATION_SHORT));
AnimationFactory.startMenuAnimationEnter(pack2, (int) (3.5f * Animation.DURATION_SHORT));
AnimationFactory.startMenuAnimationEnter(pack3, (int) (4.0f * Animation.DURATION_SHORT));
AnimationFactory.startMenuAnimationEnter(pack4, (int) (4.5f * Animation.DURATION_SHORT));
}

@Override
Expand Down Expand Up @@ -111,6 +117,12 @@ public void exit() {
} else {
AnimationFactory.startMenuAnimationOut(pack3);
}

if (LevelSelectState.getInstance().getPack() == LevelPack.COMMUNITY) {
AnimationFactory.startMenuAnimationOutPressed(pack4);
} else {
AnimationFactory.startMenuAnimationOut(pack4);
}
}

@Override
Expand All @@ -135,6 +147,8 @@ public void onTouchEvent(MotionEvent event) {
openSelectState(LevelPack.MEDIUM);
} else if (pack3.collides(event.getX(), event.getY() + container.getY(), getScreenHeight())) {
openSelectState(LevelPack.HARD);
} else if (pack4.collides(event.getX(), event.getY() + container.getY(), getScreenHeight())) {
openSelectState(LevelPack.COMMUNITY);
}
} else if (event.getAction() == MotionEvent.ACTION_UP) {
pressed = false;
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/java/com/bytehamster/flowitgame/state/State.java
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ public boolean isPlayable(Level level) {
return isSolved(LevelPack.EASY.getLevel(0).getNumber());
} else if (level.getPack() == LevelPack.HARD) {
return isSolved(LevelPack.MEDIUM.getLevel(0).getNumber());
} else if (level.getPack() == LevelPack.COMMUNITY) {
return isSolved(LevelPack.MEDIUM.getLevel(0).getNumber());
}
return false;
} else if (isSolved(level.getNumber())) {
Expand Down
Binary file modified app/src/main/res/drawable-de-nodpi/texture.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/src/main/res/drawable-nodpi/texture.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/texture.xcf
Binary file not shown.