80 lines
4.5 KiB
Bash
Executable File
80 lines
4.5 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
# Slangin' -> CandyWar
|
|
|
|
rm -rf candywar
|
|
mkdir candywar
|
|
cp ../*.ino candywar/
|
|
cp -r ../src candywar/
|
|
mv candywar/slangin.ino candywar/candywar.ino
|
|
|
|
for file in candywar/*.ino; do
|
|
sed -i "s/Slangin'/CandyWar/g" "$file"
|
|
sed -i "s/Drugs/Candy/g" "$file"
|
|
sed -i "s/drugs/candy/g" "$file"
|
|
sed -i "s/Loan Shark/Rich Buddy/g" "$file"
|
|
sed -i "s/Cocaine/P.Sugar/g" "$file"
|
|
sed -i "s/Heroine/Hershey/gi" "$file"
|
|
sed -i "s/Acid/Aero/gi" "$file"
|
|
sed -i "s/Weed/Mars/g" "$file"
|
|
sed -i "s/Speed/Sours/g" "$file"
|
|
sed -i "s/Ludes/Lolly/g" "$file"
|
|
sed -i "s/ludes/lolly/g" "$file"
|
|
sed -i "s/Trenchcoat/Candy Sack/g" "$file"
|
|
sed -i "s/trenchcoat/candy sack/g" "$file"
|
|
sed -i "s/more pockets/more space/" "$file"
|
|
sed -i "s/Pigs/Moms/gi" "$file"
|
|
sed -i "s/doctor to sew you/dentist to fix/" "$file"
|
|
sed -i 's/"up?"/"your teeth?"/' "$file"
|
|
sed -i "s/You hallucinate on the/You eat it all but/" "$file"
|
|
sed -i "s/wildest trip of your/forget to brush your/" "$file"
|
|
sed -i "s/life, stumble onto the/teeth. They all rot/" "$file"
|
|
sed -i "s/subway tracks, and get/and you can't eat/" "$file"
|
|
sed -i "s/creamed by a train./solid food anymore./" "$file"
|
|
sed -i "s/raid!!!!/bake-off!!!!/" "$file"
|
|
sed -i "s/Moms made a big/Powdered sugar/" "$file"
|
|
sed -i "s/coke bust!/shortage!/" "$file"
|
|
sed -i "s/Addicts are/Chocoholics are/" "$file"
|
|
sed -i "s/Rival dealers are/Kids at school/" "$file"
|
|
sed -i "s/selling cheap/are selling cheap/" "$file"
|
|
sed -i "s/Officer Hardass/Your Mother/g" "$file"
|
|
sed -i 's/" of his"/" of her"/' "$file"
|
|
sed -i "s/deputies are/friends are/" "$file"
|
|
sed -i "s/baretta/sleep spray/" "$file"
|
|
sed -i "s/\.44 magnum/stink spray/" "$file"
|
|
sed -i "s/saturday night/Mom repellant/" "$file"
|
|
sed -i "s/special for/spray for/" "$file"
|
|
sed -i "s/some weed/some gum/" "$file"
|
|
sed -i "s/that smells/that looks/" "$file"
|
|
sed -i "s/like good stuff/mostly unchewed/" "$file"
|
|
sed -i "s/smoke it/eat it/" "$file"
|
|
sed -i "s/You were mugged/You gave a bit/" "$file"
|
|
sed -i "s/in the subway!/to charity!/" "$file"
|
|
sed -i "s/on a dead dude/in a lunch box/" "$file"
|
|
sed -i "s/guns/spray/g" "$file"
|
|
sed -i "s/You killed one/A Mom gave up/" "$file"
|
|
sed -i "s/You killed all of/They all gave up!/" "$file"
|
|
sed -i "s/them! You found /You snatched /" "$file"
|
|
sed -i "s/dollars on Officer/bucks from purses/" "$file"
|
|
sed -i "s/Hardass' carcass/during the chase/" "$file"
|
|
sed -i "s/firing at/nagging/" "$file"
|
|
sed -i "s/You're dead/You're caught/g" "$file"
|
|
sed -i "s/Guns/Spray/" "$file"
|
|
sed -i "s/A Fight/A Spray/" "$file"
|
|
sed -i "s/0x00, 0x00, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x78, 0x07, 0x06, 0x78, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x40, 0x00,/0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xf0, 0xe8, 0xc4, 0x82, 0x02, 0x03, 0x3f, 0x3f, 0x0f, 0x87, 0x82, 0xc2, 0xc4, 0xc8, 0xf0, 0xc0,/" "$file"
|
|
sed -i "s/0x00, 0x00, 0x03, 0x3c, 0xc1, 0x02, 0x04, 0x08, 0x10, 0x20, 0xc0, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0xc0, 0x20, 0x10, 0x08, 0x04, 0x04, 0xc2, 0x39, 0x07, 0x00, 0x00,/0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x70, 0x88, 0xa8, 0x0f, 0xf1, 0x81, 0x01, 0x81, 0xc1, 0xe1, 0xf0, 0xfc, 0xf0, 0x00, 0x81, 0x81, 0x43, 0x27, 0x1f, 0x07,/" "$file"
|
|
sed -i "s/0x38, 0x50, 0x90, 0x90, 0x90, 0x23, 0x24, 0x48, 0x50, 0x60, 0x81, 0x26, 0x08, 0xe7, 0x00, 0x90, 0xe7, 0x08, 0x26, 0x01, 0x60, 0x50, 0x48, 0x26, 0xa1, 0x90, 0x90, 0x90, 0x50, 0x30,/0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0xa1, 0x56, 0x2c, 0x14, 0x34, 0x22, 0x41, 0x76, 0x08, 0x0d, 0x09, 0x07, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,/" "$file"
|
|
sed -i "s/0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x22, 0x32, 0x2a, 0x24, 0x22, 0x10, 0x0a, 0x08, 0x0c, 0x08, 0x12, 0x21, 0x24, 0x2a, 0x32, 0x02, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,/0x30, 0x28, 0x14, 0x0a, 0x05, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,/" "$file"
|
|
|
|
sed -i "s/Bronx/Sweet Suites/" "$file"
|
|
sed -i "s/Ghetto/Ice Cream Rd/" "$file"
|
|
sed -i "s/Central Park/Chocoland/" "$file"
|
|
sed -i "s/Manhatten/Gummy Forest/" "$file"
|
|
sed -i "s/Coney Island/Soda Swamp/" "$file"
|
|
sed -i "s/Brooklyn/Candy Castle/" "$file"
|
|
done
|
|
|
|
arduino-cli compile -b arduino:avr:leonardo -e candywar/
|
|
cp candywar/build/arduino.avr.leonardo/candywar.ino.hex candywar.hex
|
|
sim_arduboy -k 1073741906,1073741905,1073741904,1073741903,104,116 -p 6 ./candywar.hex
|