Permalink
Browse files

Merge pull request Maescool#821 from master-lincoln/feature/biggerBase

Bigger player base
  • Loading branch information...
Flet committed Mar 7, 2012
2 parents b0baadc + bac96c2 commit 550adc85dadf4dba88090afb17c8e74b774b1234
View
Binary file not shown.
View
Binary file not shown.
@@ -359,19 +359,19 @@ private void renderTilesAndBases(Screen screen, int x0, int y0, int x1, int y1){
}
// if we are in the center area (4*7 Tiles): draw player bases
int xt = x - (width / 2) + 4;
int xt = x - (width / 2) + 5;
int yt = y - 4;
if (xt >= 0 && yt >= 0 && xt < 7 && yt < 4 && (isNotBaseRailTile(xt) || yt < 3)) {
if (xt >= 0 && yt >= 0 && xt < 9 && yt < 4 && (isNotBaseRailTile(xt) || yt < 3)) {
screen.blit(Art.getPlayerBase(getPlayerCharacter(1))[xt][yt], x * Tile.WIDTH, y
* Tile.HEIGHT);
continue;
}
yt = y - (height - 8);
if (xt >= 0 && yt >= 0 && xt < 7 && yt < 4 && (isNotBaseRailTile(xt) || yt > 0)) {
if (xt >= 0 && yt >= 0 && xt < 9 && yt < 4 && (isNotBaseRailTile(xt) || yt > 0)) {
screen.blit(Art.getPlayerBase(getPlayerCharacter(0))[xt][yt], x * Tile.WIDTH, y * Tile.HEIGHT);
if ((xt == 0 || xt == 1 || xt == 5 || xt == 6) && yt == 0) {
if ((xt == 0 || xt == 1 || xt >= 7 && xt <= 8) && yt == 0) {
screen.blit(Art.shadow_north, x * Tile.WIDTH, y * Tile.HEIGHT);
}
if ((xt == 2) && yt == 0) {
@@ -68,15 +68,17 @@ private void processLevelImage(BufferedImage bufferedImage, int w, int h) {
private int[] defaultRgbArray(int width, int height) {
int[] rgbs = new int[width * height];
// fill everything with UnpassableSandTiles
Arrays.fill(rgbs, 0xffA8A800);
// add SandTiles for player bases
for (int y = 0 + 4; y < height - 4; y++) {
for (int x = (width / 2) - 4; x < (width / 2) + 3; x++) {
for (int x = (width / 2) - 5; x < (width / 2) + 4; x++) {
rgbs[x + y * width] = 0xff888800;
}
}
for (int y = 0 + 5; y < height - 5; y++) {
for (int x = (width / 2) - 2; x < (width / 2) + 1; x++) {
for (int x = (width / 2) - 3; x < (width / 2) + 2; x++) {
rgbs[x + y * width] = 0xffA8A800;
}
}
@@ -117,16 +119,15 @@ protected void setupPlayerSpawnArea() {
newLevel.addEntity(new ShopItemTurret(32 * (newLevel.width / 2 - 1.5), 4.5 * 32, Team.Team2));
newLevel.addEntity(new ShopItemHarvester(32 * (newLevel.width / 2 - .5), 4.5 * 32, Team.Team2));
newLevel.addEntity(new ShopItemBomb(32 * (newLevel.width / 2 + .5), 4.5 * 32, Team.Team2));
newLevel.addEntity(new ShopItemShotgun(32 * (newLevel.width / 2 - 2.0), 6.5 * 32, Team.Team2));
newLevel.addEntity(new ShopItemRaygun(32 * (newLevel.width / 2 - 2.0), 5.5 * 32, Team.Team2));
newLevel.addEntity(new ShopItemShotgun(32 * (newLevel.width / 2 - 2.5), 6.5 * 32, Team.Team2));
newLevel.addEntity(new ShopItemRaygun(32 * (newLevel.width / 2 - 2.5), 5.5 * 32, Team.Team2));
newLevel.addEntity(new ShopItemTurret(32 * (newLevel.width / 2 - 1.5), (newLevel.height - 4.5) * 32, Team.Team1));
newLevel.addEntity(new ShopItemHarvester(32 * (newLevel.width / 2 - .5), (newLevel.height - 4.5) * 32, Team.Team1));
newLevel.addEntity(new ShopItemBomb(32 * (newLevel.width / 2 + .5), (newLevel.height - 4.5) * 32, Team.Team1));
newLevel.addEntity(new ShopItemShotgun(32 * (newLevel.width / 2 - 2.0), (newLevel.height - 6.5) * 32, Team.Team1));
newLevel.addEntity(new ShopItemRaygun(32 * (newLevel.width / 2 - 2.0), (newLevel.height - 5.5) * 32, Team.Team1));
newLevel.addEntity(new ShopItemShotgun(32 * (newLevel.width / 2 - 2.5), (newLevel.height - 6.5) * 32, Team.Team1));
newLevel.addEntity(new ShopItemRaygun(32 * (newLevel.width / 2 - 2.5), (newLevel.height - 5.5) * 32, Team.Team1));
for (int i=0; i<3; i++){
newLevel.setTile((newLevel.width / 2) - i, 7, new UnbreakableRailTile(new SandTile()));
newLevel.setTile((newLevel.width / 2) - i, newLevel.height - 8, new UnbreakableRailTile(new SandTile()));
@@ -65,11 +65,11 @@
public static Bitmap exclamation_mark = load ("/art/effects/exclamation_mark.png");
// Player starting points
private static Bitmap[][] startLordLard = cut("/art/player/start_lordlard.png", 32, 32);
private static Bitmap[][] startLordLard = cut("/art/player/start_lordlard_big.png", 32, 32);
private static Bitmap[][] startHerrSpeck = cut("/art/player/start_herrspeck.png", 32, 32);
private static Bitmap[][] startDuchessDonut = startLordLard;
private static Bitmap[][] startCountessCruller = cut("/art/player/start_cruller.png", 32, 32);
private static Bitmap[][] startNoOpponent = cut("/art/player/start_no_opponent.png", 32, 32);
private static Bitmap[][] startNoOpponent = cut("/art/player/start_no_opponent_big.png", 32, 32);
public static Bitmap[][] getPlayerBase(GameCharacter character) {
switch (character) {

0 comments on commit 550adc8

Please sign in to comment.