Skip to content

Commit

Permalink
Merge pull request #369 from agateau/add-old-f1
Browse files Browse the repository at this point in the history
Add the BRGP42
  • Loading branch information
agateau committed Jul 24, 2023
2 parents a8cc848 + a48858b commit 90b4921
Show file tree
Hide file tree
Showing 25 changed files with 95 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .changes/unreleased/Added-20230723-223347.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
kind: Added
body: 'Pixel Wheels got a new vehicle: the BRGP42, an old F1 inspired from the Lola
Mk4.'
time: 2023-07-23T22:33:47.129344816+02:00
5 changes: 5 additions & 0 deletions android/assets/po/bn.po
Original file line number Diff line number Diff line change
Expand Up @@ -578,6 +578,11 @@ msgctxt "vehicle"
msgid "Miramar"
msgstr ""

#: android/assets/vehicles/old-f1.xml:1
msgctxt "vehicle"
msgid "BRGP42"
msgstr ""

#: android/assets/vehicles/pickup.xml:1
msgctxt "vehicle"
msgid "Pickup"
Expand Down
5 changes: 5 additions & 0 deletions android/assets/po/de.po
Original file line number Diff line number Diff line change
Expand Up @@ -569,6 +569,11 @@ msgctxt "vehicle"
msgid "Miramar"
msgstr "Miramar"

#: android/assets/vehicles/old-f1.xml:1
msgctxt "vehicle"
msgid "BRGP42"
msgstr ""

#: android/assets/vehicles/pickup.xml:1
msgctxt "vehicle"
msgid "Pickup"
Expand Down
5 changes: 5 additions & 0 deletions android/assets/po/eo.po
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,11 @@ msgctxt "vehicle"
msgid "Miramar"
msgstr "Miramar"

#: android/assets/vehicles/old-f1.xml:1
msgctxt "vehicle"
msgid "BRGP42"
msgstr ""

#: android/assets/vehicles/pickup.xml:1
msgctxt "vehicle"
msgid "Pickup"
Expand Down
5 changes: 5 additions & 0 deletions android/assets/po/es.po
Original file line number Diff line number Diff line change
Expand Up @@ -575,6 +575,11 @@ msgctxt "vehicle"
msgid "Miramar"
msgstr "Miramar"

#: android/assets/vehicles/old-f1.xml:1
msgctxt "vehicle"
msgid "BRGP42"
msgstr ""

#: android/assets/vehicles/pickup.xml:1
msgctxt "vehicle"
msgid "Pickup"
Expand Down
5 changes: 5 additions & 0 deletions android/assets/po/eu.po
Original file line number Diff line number Diff line change
Expand Up @@ -576,6 +576,11 @@ msgctxt "vehicle"
msgid "Miramar"
msgstr "Miramar"

#: android/assets/vehicles/old-f1.xml:1
msgctxt "vehicle"
msgid "BRGP42"
msgstr ""

#: android/assets/vehicles/pickup.xml:1
msgctxt "vehicle"
msgid "Pickup"
Expand Down
5 changes: 5 additions & 0 deletions android/assets/po/fr.po
Original file line number Diff line number Diff line change
Expand Up @@ -570,6 +570,11 @@ msgctxt "vehicle"
msgid "Miramar"
msgstr "Miramar"

#: android/assets/vehicles/old-f1.xml:1
msgctxt "vehicle"
msgid "BRGP42"
msgstr ""

#: android/assets/vehicles/pickup.xml:1
msgctxt "vehicle"
msgid "Pickup"
Expand Down
5 changes: 5 additions & 0 deletions android/assets/po/hu.po
Original file line number Diff line number Diff line change
Expand Up @@ -573,6 +573,11 @@ msgctxt "vehicle"
msgid "Miramar"
msgstr "Miramar"

#: android/assets/vehicles/old-f1.xml:1
msgctxt "vehicle"
msgid "BRGP42"
msgstr ""

#: android/assets/vehicles/pickup.xml:1
msgctxt "vehicle"
msgid "Pickup"
Expand Down
5 changes: 5 additions & 0 deletions android/assets/po/it_IT.po
Original file line number Diff line number Diff line change
Expand Up @@ -569,6 +569,11 @@ msgctxt "vehicle"
msgid "Miramar"
msgstr "Miramar"

#: android/assets/vehicles/old-f1.xml:1
msgctxt "vehicle"
msgid "BRGP42"
msgstr ""

#: android/assets/vehicles/pickup.xml:1
msgctxt "vehicle"
msgid "Pickup"
Expand Down
5 changes: 5 additions & 0 deletions android/assets/po/messages.pot
Original file line number Diff line number Diff line change
Expand Up @@ -563,6 +563,11 @@ msgctxt "vehicle"
msgid "Miramar"
msgstr ""

#: android/assets/vehicles/old-f1.xml:1
msgctxt "vehicle"
msgid "BRGP42"
msgstr ""

#: android/assets/vehicles/pickup.xml:1
msgctxt "vehicle"
msgid "Pickup"
Expand Down
5 changes: 5 additions & 0 deletions android/assets/po/nl.po
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,11 @@ msgctxt "vehicle"
msgid "Miramar"
msgstr "Miramar"

#: android/assets/vehicles/old-f1.xml:1
msgctxt "vehicle"
msgid "BRGP42"
msgstr ""

#: android/assets/vehicles/pickup.xml:1
msgctxt "vehicle"
msgid "Pickup"
Expand Down
5 changes: 5 additions & 0 deletions android/assets/po/pl.po
Original file line number Diff line number Diff line change
Expand Up @@ -577,6 +577,11 @@ msgctxt "vehicle"
msgid "Miramar"
msgstr "Miramar"

#: android/assets/vehicles/old-f1.xml:1
msgctxt "vehicle"
msgid "BRGP42"
msgstr ""

#: android/assets/vehicles/pickup.xml:1
msgctxt "vehicle"
msgid "Pickup"
Expand Down
5 changes: 5 additions & 0 deletions android/assets/po/ru.po
Original file line number Diff line number Diff line change
Expand Up @@ -573,6 +573,11 @@ msgctxt "vehicle"
msgid "Miramar"
msgstr "Мирамар"

#: android/assets/vehicles/old-f1.xml:1
msgctxt "vehicle"
msgid "BRGP42"
msgstr ""

#: android/assets/vehicles/pickup.xml:1
msgctxt "vehicle"
msgid "Pickup"
Expand Down
5 changes: 5 additions & 0 deletions android/assets/po/sv.po
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,11 @@ msgctxt "vehicle"
msgid "Miramar"
msgstr "Miramar"

#: android/assets/vehicles/old-f1.xml:1
msgctxt "vehicle"
msgid "BRGP42"
msgstr ""

#: android/assets/vehicles/pickup.xml:1
msgctxt "vehicle"
msgid "Pickup"
Expand Down
5 changes: 5 additions & 0 deletions android/assets/po/tr.po
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,11 @@ msgctxt "vehicle"
msgid "Miramar"
msgstr "Miramar"

#: android/assets/vehicles/old-f1.xml:1
msgctxt "vehicle"
msgid "BRGP42"
msgstr ""

#: android/assets/vehicles/pickup.xml:1
msgctxt "vehicle"
msgid "Pickup"
Expand Down
5 changes: 5 additions & 0 deletions android/assets/po/zh_CN.po
Original file line number Diff line number Diff line change
Expand Up @@ -572,6 +572,11 @@ msgctxt "vehicle"
msgid "Miramar"
msgstr ""

#: android/assets/vehicles/old-f1.xml:1
msgctxt "vehicle"
msgid "BRGP42"
msgstr ""

#: android/assets/vehicles/pickup.xml:1
msgctxt "vehicle"
msgid "Pickup"
Expand Down
8 changes: 8 additions & 0 deletions android/assets/vehicles/old-f1.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<vehicle speed="0.95" name="BRGP42" width="23" height="55">
<main image="old-f1"/>
<shapes>
<octogon corner="6" width="16" height="55"/>
</shapes>
<axle y="47" width="28" steer="1" tireSize="THIN"/>
<axle y="11" width="30" tireSize="THIN"/>
</vehicle>
Binary file added core/assets-src/sprites/tires/THIN-splash.anim.ase
Binary file not shown.
Binary file added core/assets-src/sprites/tires/THIN.still.ase
Binary file not shown.
Binary file added core/assets-src/sprites/vehicles/old-f1.ase
Binary file not shown.
1 change: 1 addition & 0 deletions core/src/com/agateau/pixelwheels/Assets.java
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ public class Assets implements TextureRegionProvider {
"jeep",
"miramar",
"bigfoot",
"old-f1",
};

public static final String MENU_MUSIC_ID = "menu";
Expand Down
4 changes: 4 additions & 0 deletions core/src/com/agateau/pixelwheels/RewardManagerSetup.java
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,10 @@ static void createVehicleRules(RewardManager rewardManager, Assets assets) {
Reward.get(assets.findVehicleDefById("miramar")),
new ChampionshipRankRewardRule(assets.findChampionshipById("city"), 1));

rewardManager.addRule(
Reward.get(assets.findVehicleDefById("old-f1")),
new ChampionshipRankRewardRule(assets.findChampionshipById("city"), 0));

// Unlock all remaining vehicles
for (VehicleDef vehicleDef : assets.vehicleDefs) {
Reward reward = Reward.get(vehicleDef);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
/** Helper class to draw a TextureRegion for a Box2D Body */
public class BodyRegionDrawer {
public static final float SHADOW_ALPHA = 0.35f;
public static final float SHADOW_OFFSET_PX = 6;
public static final float SHADOW_OFFSET_PX = 3;
private static final int Z_MAX_SHADOW_OFFSET_PX = 30;
private static final int SCALE_MAX_SHADOW_OFFSET_PX = 30;
private Batch mBatch;
Expand Down
1 change: 1 addition & 0 deletions core/src/com/agateau/pixelwheels/vehicledef/AxleDef.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public class AxleDef {
private static final float SPLASH_FRAME_DURATION = 0.04f;

public enum TireSize {
THIN(0.2f),
NORMAL(0.2f),
LARGE(0.2f),
HUGE(0.05f);
Expand Down
2 changes: 1 addition & 1 deletion docs/vehicles.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@
- `x`, `y`: the shape bottom-left corner. Defaults to centered if not set.
- `<axle>`: An axle linking two wheels. Can (should!) appear multiple times.
- `y`: y position.
- `width`: width.
- `width`: width from wheel center to wheel center.
- `steer`: a float indicating if the wheels can be used to steer. 0 means no steering. 1 means steering in the selected direction, -1 means steering in the opposite direction (useful for steering rear wheels). Defaults to 0.
- `tireSize`: the size of the tires on this axle. Must be one of the values of the `AxleDef.TireSize` enum. Defaults to NORMAL.

0 comments on commit 90b4921

Please sign in to comment.