Skip to content

Instantly share code, notes, and snippets.

@ymnk
Forked from hsak/beep.scala
Created January 29, 2009 02:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ymnk/54326 to your computer and use it in GitHub Desktop.
Save ymnk/54326 to your computer and use it in GitHub Desktop.
This program is a 2D shooting game written in Scala by
@h_sakurai(http://twitter.com/h_sakurai),
and has been originally hosted at https://gist.github.com/46448 .
@ymnk(http://twitter.com/ymnk) has slightly modified that code
to run it on scala 2.8 with sbt.
$ sbt
> run
package beep
import scala.concurrent.ops._
import javax.sound.sampled._
object main {
def main(args:Array[String]) {
var beep = new Beep
beep.play(0,32,32);
}
}
class BeepData(var phase:Int,var pitch:Int, var count:Int, var sweep:Int)
class Beep {
def play(pitch:Int, count:Int, sweep:Int) { _beeps(_beepPos)=new BeepData(0,pitch,count,sweep); _beepPos = (_beepPos + 1) & 7 }
def stop { _stop = 2 }
private var _stop, _beepPos = 0
private var _beeps = new Array[BeepData](8)
private val _wave = new Array[Byte](16); _wave(1) = 40; _wave(2) = -40
private val _data = new Array[Byte](256)
private val _data1 = new Array[Int](256)
private def stream {
for (i <- 0 until 256)_data1(i)=0
for (j <- 0 until _beeps.length if(_beeps(j)!=null)) {
var b = _beeps(j)
for (i <- 0 until 256) { b.phase = (b.phase + (b.pitch & 255)) & 4095; _data1(i) = (_data1(i) + _wave(b.phase >> 8)) }
if (b.count == 0) _beeps(j)=null else { b.count -= 1; b.pitch += b.sweep }
}
for (i <- 0 until 256){
var d = _data1(i)
d=(if(d==0)0.0 else if(d > 0) math.log(d)*21 else math.log(-d)* -21).asInstanceOf[Int]
if(d > 127) d = 127 else if(d < -127) d = -127
_data(i)=d.asInstanceOf[Byte]
}
}
val fmt = new AudioFormat(AudioFormat.Encoding.PCM_SIGNED , 11025, 8, 1, 1, 11025, true)
val line = AudioSystem.getLine(new DataLine.Info(classOf[SourceDataLine], fmt)).asInstanceOf[SourceDataLine]
line.open(); line.start; line.write(_data, 0, 256)
spawn {
Thread.currentThread.setPriority(10)
while (_stop < 2) {
line.write(_data, 0, 256); stream
var size = line.getBufferSize - line.available
if (size > 256) Thread.sleep(1000*(size-256)/11025)
}
line.flush; line.stop; line.close
}
}
/*
class Beep {
def play(pitch:Int, count:Int, sweep:Int) { _pitch = pitch; _count = count; _sweep = sweep }
def stop { _stop = 2 }
private var _phase, _pitch, _count, _sweep, _stop = 0
private val _wave = new Array[Byte](16); _wave(1) = 120; _wave(2) = -120
private val _data = new Array[Byte](256)
private def stream {
for (i <- 0 until 256) { _phase = (_phase + (_pitch & 255)) & 4095; _data(i) = _wave(_phase >> 8) }
if (_count == 0) _pitch = 0 else { _count -= 1; _pitch += _sweep }
}
val fmt = new AudioFormat(AudioFormat.Encoding.PCM_SIGNED , 11025, 8, 1, 1, 11025, true)
val line = AudioSystem.getLine(new DataLine.Info(classOf[SourceDataLine], fmt)).asInstanceOf[SourceDataLine]
line.open(); line.start; line.write(_data, 0, 256)
spawn {
while (_stop < 2) {
line.write(_data, 0, 256); stream
var size = line.getBufferSize - line.available
if (size > 256) Thread.sleep(1000*(size-256)/11025)
}
line.flush; line.stop; line.close
}
}
*/
#Project properties
#Thu Feb 10 18:13:58 JST 2011
project.organization=game
project.name=game
sbt.version=0.7.4
project.version=1.0
build.scala.versions=2.8.1
project.initialize=false
PDR030
16,16,255,255,255,2,60,5,2
0,"",0,0,1,128
2
3,#TRUE#,20,0,-16751002,1,1610638950,160,160,0,3.051758E-02,3.051758E-02,-1,#FALSE#,0,#FALSE#,0
0
0,80,80
0,0,320
0,240,240
0,320,0
3,#TRUE#,20,0,-16737946,1,1610652006,160,160,0,3.051758E-02,3.051758E-02,-1,#FALSE#,0,#FALSE#,0
0
0,140,140
0,140,180
0,180,180
0,180,140
PDR030
5,5,255,255,255,2,60,5,2
0,"",0,0,1,128
2
3,#TRUE#,20,0,-10053172,1,-10053172,49,50,0,3.051758E-02,3.051758E-02,-1,#FALSE#,0,#FALSE#,0
0
0,100,0
0,100,100
0,0,100
0,0,0
3,#TRUE#,20,0,-16711681,1,-16711681,49,50,0,3.051758E-02,3.051758E-02,-1,#FALSE#,0,#FALSE#,0
0
0,30,30
0,30,70
0,69,70
0,69,30
PDR030
16,16,255,255,255,2,60,5,2
0,"",0,0,1,128
14
2,#TRUE#,20,1,-16777216,1,-103,-18,76,0,3.051758E-03,3.051758E-03,-1,#FALSE#,0,#FALSE#,0
0
0,22,43
0,-68,48
0,12,108
2,#TRUE#,20,1,-16777216,1,-103,-30,240,0,3.051758E-03,3.051758E-03,-1,#FALSE#,0,#FALSE#,0
0
0,5,272
0,-80,268
0,0,208
2,#TRUE#,20,1,-16777216,1,-103,318,84,0,3.051758E-03,3.051758E-03,-1,#FALSE#,0,#FALSE#,0
0
0,292,53
0,368,56
0,288,116
2,#TRUE#,20,1,-16777216,1,-103,330,248,0,3.051758E-03,3.051758E-03,-1,#FALSE#,0,#FALSE#,0
0
0,285,278
0,380,276
0,300,216
7,#TRUE#,20,1,-16777216,1,-256,152,196,0,1.025391E-02,1.025391E-02,-1,#FALSE#,0,#FALSE#,0
0
0,15,146
0,295,144
0,291,254
1,290,312
0,224,306
0,73,307
1,8,301
0,11,251
11,#TRUE#,20,1,-16777216,1,-103,156,100,0,1.025391E-02,1.025391E-02,-1,#FALSE#,0,#FALSE#,0
0
0,19,56
1,22,0
0,91,0
0,228,0
1,301,3
0,299,55
0,295,150
1,294,199
0,228,194
0,77,195
1,12,190
0,15,147
4,#FALSE#,20,1,-16777216,0,-103,154,276,0,3.295898E-03,3.295898E-03,-1,#FALSE#,0,#FALSE#,0
0
0,107,271
0,132,288
0,148,272
0,172,288
0,195,269
4,#FALSE#,20,1,-16777216,0,-103,138,-105,90,7.080078E-03,7.080078E-03,-1,#FALSE#,0,#FALSE#,0
0
0,144,-4
1,171,-106
1,236,-59
1,167,-6
1,117,-123
1,#FALSE#,40,1,-39169,0,-39169,503,265,0,2.075195E-03,2.075195E-03,-1,#FALSE#,0,#FALSE#,0
0
0,46,265
0,59,265
1,#FALSE#,40,1,-39169,0,-39169,700,267,0,2.075195E-03,2.075195E-03,-1,#FALSE#,0,#FALSE#,0
0
0,243,267
0,256,267
1,#FALSE#,20,1,-16777216,0,-16777216,416,240,0,2.075195E-03,2.075195E-03,-1,#FALSE#,0,#FALSE#,0
0
0,68,240
0,78,240
1,#FALSE#,20,1,-16777216,0,-16777216,566,242,0,2.075195E-03,2.075195E-03,-1,#FALSE#,0,#FALSE#,0
0
0,218,242
0,228,242
2,#TRUE#,20,1,-16777216,0,-103,242,124,0,3.051758E-03,3.051758E-03,-1,#FALSE#,0,#FALSE#,0
0
0,265,148
0,196,160
0,292,80
2,#TRUE#,20,1,-16777216,0,-103,82,116,0,3.051758E-03,3.051758E-03,-1,#FALSE#,0,#FALSE#,0
0
0,117,160
0,40,152
0,20,76
<html>
<title>Hello World Applet</title>
<body>
<applet code="gameApplet" archive="game.jar" width=300 height=400>
</applet>
</body>
</html>
package game
import java.awt.event._
import java.awt.{Graphics,Graphics2D,Color,Dimension}
import java.awt.geom.AffineTransform
import java.awt.RenderingHints
import java.awt.event.KeyListener
import java.awt.event.KeyEvent
import java.lang.Thread
import java.lang.Math
import java.util.Random
import javax.swing._
import scala.actors.Actor
import scala.actors.Actor._
import pdr._
import beep._
class gameApplet extends JApplet {
override def init() {
addKeyListener(game.panel)
val pane = getContentPane()
pane.add(game.panel)
}
override def start() {
game.start()
}
override def stop() {
game.stop
}
}
object main extends Application {
val window = new JFrame
window getContentPane() add game.panel
window setVisible(true)
window pack()
window setResizable false
window setDefaultCloseOperation JFrame.EXIT_ON_CLOSE
window.addKeyListener(game.panel)
game.start()
}
class Panel extends JPanel with KeyListener{
setPreferredSize(new Dimension(300, 400))
override def paintComponent(g:Graphics) {
g setColor new Color(0x44ffffff)
var b=getSize()
g fillRect (0, 0, b.width, b.height)
game.draw(g)
}
var up:Boolean = false
var down:Boolean = false
var left:Boolean = false
var right:Boolean = false
var shot:Boolean = false
var enter:Boolean = false
def setKey(c:Int,b:Boolean) {
c match {
case 37 => left = b
case 38 => up = b
case 39 => right = b
case 40 => down = b
case 90 => shot = b
case 10 => enter = b
case _ =>
}
}
def keyPressed(e:KeyEvent) {
setKey(e.getKeyCode(), true)
}
def keyReleased(e:KeyEvent) {
setKey(e.getKeyCode(), false)
}
def keyTyped(e:KeyEvent) {
}
}
object game extends Actor {
var panel = new Panel
var beep:Beep = null
def stop() {
beep.stop
this ! 'stop
}
def normalRad(v:Double):Double = {
v + 2 * Math.PI * (
if (v > Math.PI) -1 else
if (v < -Math.PI) 1 else 0
);
}
def addBullets(x:Double, y:Double, rad:Double,n:Int, r:Double) {
for (i <- 0 until n) {
new Bullet(x,y,rad+(i-n/2.0)*r)
}
}
def addParticles(x:Double, y:Double, no:Int, n:Int) {
for (i <- 0 until n) {
new Particle(x,y, rnd(100.0), no)
}
}
val bullet1 = PDR.loadSWFSprite("bullet1.pdr","",PDR.CENTER|PDR.VCENTER)
val ship1 = PDR.loadSWFSprite("ship.pdr","",PDR.CENTER|PDR.VCENTER)
val enemy1 = PDR.loadSWFSprite("enemy.pdr","",PDR.CENTER|PDR.VCENTER)
val shot = PDR.loadSWFSprite("shot.pdr","",PDR.CENTER|PDR.VCENTER)
val title = PDR.loadSWFSprite("title.pdr","",0)
val particle = PDR.loadSWFSprite("particle1.pdr","",0)
val particle2 = PDR.loadSWFSprite("particle1.pdr","",0)
val ship:Ship = new Ship(150,350)
var rand:Random = new Random
var enemys = List[Enemy]()
var shots = List[Shot]()
var bullets = List[Bullet]()
var particles = List[Particle]()
var nextShots = List[Shot]()
var nextBullets = List[Bullet]()
var nextEnemys = List[Enemy]()
var nextParticles = List[Particle]()
var enemysCnt = 0
var shotsCnt = 0
var bulletsCnt = 0
var particlesCnt = 0
def init() {
beep = new Beep
enemys=List()
shots=List()
bullets=List()
particles=List()
nextShots=List()
nextBullets=List()
nextEnemys=List()
nextParticles=List()
enemysCnt=0
shotsCnt=0
bulletsCnt=0
particlesCnt=0
rank = 0
score = 0
hiscore = 10000
leftShips = 0
gameOver = true
gameOverCnt = 1000
}
def add(a:Enemy) {
if(enemysCnt < 5) nextEnemys = a::nextEnemys
}
def add(a:Shot) {
if(shotsCnt < 10) nextShots = a::nextShots
}
def add(a:Bullet) {
if(bulletsCnt < 500) nextBullets = a::nextBullets
}
def add(a:Particle) {
if(particlesCnt < 500) nextParticles = a::nextParticles
}
def act {
init()
var nextFrameStart = System.nanoTime();
var loop = true
this ! 'move
while(loop) {
receive {
case 'move => move
nextFrameStart += 28571429;
var remaining = nextFrameStart - System.nanoTime();
if (remaining > 0) {
panel.repaint()
} else {
this ! 'move
}
remaining = nextFrameStart - System.nanoTime();
if (remaining > 0) {
try {
Thread.sleep(remaining / 1000000);
} catch {
case _ =>
}
}
case 'stop => loop = false
}
}
println("game stop")
}
def rnd(n:Int):Int = {
rand nextInt n
}
def rnd(n:Double):Double = {
rand.nextDouble * n
}
var rank = 0
var score = 0
var hiscore = 10000
var leftShips = 0
var gameOver = true
var gameOverCnt = 1000
def move {
nextShots = List()
nextBullets = List()
nextEnemys = List()
nextParticles = List()
if(gameOverCnt > 120 && gameOver) {
if(game.panel.shot || game.panel.enter) {
gameOver = false
leftShips = 3
ship.init
score = 0
rank = 0
}
}
if(enemysCnt == 0 || rnd(1.0) < 0.01 * rank) {
new Enemy(rnd(300), 0)
}
ship.move()
bulletsCnt = 0
for (a <- bullets) {
a move ()
if(a.move != null) {
nextBullets = a :: nextBullets
shotsCnt += 1
}
if(ship.exists && Math.abs(ship.x - a.x) < 3 && Math.abs(ship.y - a.y) < 3) {
addParticles(ship.x, ship.y, 1, 100)
ship.init
if(leftShips == 0) {
beep.play(0,32,32)
gameOver = true
gameOverCnt = 0
} else {
beep.play(0,32,64)
leftShips -= 1
}
}
}
shotsCnt = 0
for (s <- shots) {
s move ()
for(enemy <- enemys) {
if(Math.abs(enemy.x-s.x)<30 && Math.abs(enemy.y-s.y)<30) {
beep.play(64,4,-8)
score += 100;
if(hiscore < score)hiscore = score;
rank = score / 1000;
addParticles(enemy.x, enemy.y,2, 30);
enemy.move = null
}
}
if(s.move != null) {
nextShots = s :: nextShots
shotsCnt += 1
}
}
enemysCnt = 0
for (a <- enemys) {
if(a.move != null) a move ()
if(a.move != null) {
nextEnemys = a :: nextEnemys
enemysCnt += 1
}
}
particlesCnt = 0
for (a <- particles) {
a move ()
if(a.move != null) {
nextParticles = a :: nextParticles
particlesCnt += 1
}
}
shots = nextShots.reverse
bullets = nextBullets.reverse
enemys = nextEnemys.reverse
particles = nextParticles.reverse
if(gameOver) {
gameOverCnt += 1
}
}
def draw(g:Graphics) {
val g2 = g.asInstanceOf[Graphics2D]
g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
RenderingHints.VALUE_ANTIALIAS_ON);
g2.setRenderingHint(RenderingHints.KEY_RENDERING,
RenderingHints.VALUE_RENDER_SPEED);
g2.setRenderingHint(RenderingHints.KEY_ALPHA_INTERPOLATION,
RenderingHints.VALUE_ALPHA_INTERPOLATION_SPEED);
g2.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING,
RenderingHints.VALUE_COLOR_RENDER_SPEED);
val at = g2.getTransform();
for (particle <- particles) {
particle draw g2
g2.setTransform(at);
}
for (a <- shots) {
a draw g2
g2.setTransform(at);
}
if(!gameOver) ship draw g2
g2.setTransform(at);
for (enemy <- enemys) {
enemy draw g2
g2.setTransform(at);
}
for (bullet <- bullets) {
bullet draw g2
g2.setTransform(at);
}
g2.setTransform(at);
for(i <- 0 until leftShips) {
g2.translate(250+i*10,15);
g2.scale(0.4,0.4);
game.ship1.draw(g2)
g2.setTransform(at);
}
g setColor new Color(0x000000)
g drawString("SCORE "+score,0,20)
g drawString("HI SCORE "+hiscore,100,20)
if(gameOver) {
if(gameOverCnt % 60 > 15) {
g drawString("GAME OVER", 115, 220)
}
if(gameOverCnt > 60*2) {
g2.setTransform(at);
g2.translate(40,230);
g2.scale(5.4,5.4);
g2.rotate(-Math.PI/180*30);
game.enemy1.draw(g2)
g2.setTransform(at);
game.title.draw(g2)
g2.translate(250,215);
g2.scale(5.4,5.4);
game.ship1.draw(g2)
g2.setTransform(at);
g drawString("PRESS Z BUTTON", 98, 250)
}
}
this ! 'move
}
}
class GameActor{}
class Ship(var x:Double,var y:Double) extends GameActor {
var exists:Boolean = false
var existsCount = 100
def init {
exists = false
existsCount = 130
}
def move1 {
if(!game.gameOver) {
if(!exists) {
existsCount -= 1
if(existsCount==0) {
exists = true
}
}
if(existsCount < 100) {
if(game.panel.up) y -= vy
if(game.panel.down) y += vy
if(game.panel.left) x -= vx
if(game.panel.right) x += vx
if(game.panel.shot) new Shot(x,y)
}
}
if(x < 0 ) { x = 0 ; }
if(y < 0 ) { y = 0 ; }
if(x > 300) { x = 300 ; }
if(y > 400) { y = 400 ; }
}
def draw1(g2:Graphics2D) {
if(existsCount < 100 && existsCount % 2 == 0) {
g2.translate(x,y)
g2.rotate(r)
game.ship1.draw(g2)
}
}
var vx = 5
var vy = 5
var r = 0.0d
var vr = 0.2d
var draw = draw1 _
var move = move1 _
}
class Shot(var x:Double,var y:Double) extends GameActor {
def move1 {
x += vx; y += vy
if(x < 0 ) { remove }
if(y < 0 ) { remove }
if(x > 300) { remove }
if(y > 400) { remove }
}
def remove {
move = null
}
def draw1(g2:Graphics2D) {
if(move != null){
g2.translate(x,y)
game.shot.draw(g2)
}
}
var vx = 0
var vy = -16
var draw = draw1 _
var move = move1 _
game.add(this)
}
import java.lang.Math
class Enemy(var x:Double,var y:Double) extends GameActor {
var speed:Double = 2
var rad = Math.atan2(game.ship.y-y,game.ship.x-x)
var r:Double = 0.02
var draw = draw1 _
var move = move1 _
game.add(this)
def moveBody:Double = {
val rad2 = Math.atan2(game.ship.y-y,game.ship.x-x);
rad = rad + (if(game.normalRad(rad-rad2)<0) r else -r);
rad = game.normalRad(rad)
x += Math.cos(rad)*speed
y += Math.sin(rad)*speed
if(x < 0 ) { remove }
if(y < 0 ) { remove }
if(x > 300) { remove }
if(y > 400) { remove }
rad2
}
def remove {
move = null
}
var nextMove:()=>Unit = null
var time:Int = 0
def wait(w:Int, next1:()=>Unit) {
time = w
move = moveWait _
nextMove = next1
}
def moveWait {
moveBody
time -= 1
if(time <= 0) move = nextMove
}
def move1 {
var r = moveBody
if(game.rnd(1.0) > 0.8) {
new Bullet(x,y,r)
if(game.rnd(1.0) > 0.8) {
r2 = 0
wait(30,move2 _)
}
}
}
private var r2:Double = 0;
def move2 {
moveBody
var rr:Int = (game.rnd(5)+1).asInstanceOf[Int]
game.addBullets(x,y,r+r2,rr,0.1)
r2 = r2 + (rr * 0.1)
if(game.rnd(1.0) < 0.03)wait(60,move1 _)
}
def draw1(g2:Graphics2D) {
g2.translate(x,y)
g2.rotate(rad-Math.PI/2)
game.enemy1.draw(g2)
}
}
class Bullet(var x:Double,var y:Double, rad:Double) extends GameActor {
var speed = 3.0
var r = 0.0d
var vr = 0.2d
var draw = draw1 _
var move = move1 _
game.add(this)
def move1 {
r += vr;
x += Math.cos(rad)*speed
y += Math.sin(rad)*speed
if(x < 0 ) { x = 0 ; remove }
if(y < 0 ) { y = 0 ; remove }
if(x > 300) { x = 300 ; remove }
if(y > 400) { y = 400 ; remove }
}
def remove {
move = null
}
def draw1(g2:Graphics2D) {
g2.translate(x,y)
g2.rotate(r)
game.bullet1.draw(g2)
}
}
class Particle(var x:Double,var y:Double,rad:Double,no:Int) extends GameActor {
var speed = game.rnd(50.0)+10.0;
var r = 0.0d
var vr = 0.2d
var draw = if(no==1) draw1 _ else draw2 _
var move = move1 _
game.add(this)
def move1 {
r += vr;
x += Math.cos(rad)*speed
y += Math.sin(rad)*speed
if(x < 0 ) { x = 0 ; remove }
if(y < 0 ) { y = 0 ; remove }
if(x > 300) { x = 300 ; remove }
if(y > 400) { y = 400 ; remove }
}
def remove {
move = null
}
def draw1(g2:Graphics2D) {
g2.translate(x,y)
g2.rotate(r)
game.particle.draw(g2)
}
def draw2(g2:Graphics2D) {
g2.translate(x,y)
g2.rotate(r)
game.particle2.draw(g2)
}
}
-dontusemixedcaseclassnames
-dontoptimize
-injars gamep.jar;'c:/Program Files/Scala/lib/scala-library.jar'(!META-INF/MANIFEST.MF,!library.properties)
-outjars game.jar
-libraryjars <java.home>/lib/rt.jar
-keep public class gameApplet
call fsc game.scala pdr.scala beep.scala
call scala game.main
jar cvfM gamep.jar *.class *.pdr pdr/*.class game/*.class beep/*.class
java -jar proguard.jar @game.txt
copy /Y game.html bin\.
copy /Y game.jar bin\.
call app
PDR030
16,16,255,255,255,2,60,5,2
0,"",0,0,1,128
1
3,#TRUE#,20,0,-104807,1,-104807,144,167,0,3.051758E-02,3.051758E-02,-1,#FALSE#,0,#FALSE#,0
0
0,42,76
0,42,261
0,246,261
0,246,76
PDR030
16,16,255,255,255,2,60,5,2
0,"",0,0,1,128
1
3,#TRUE#,20,0,-91904,1,-256,137,130,0,3.051758E-02,3.051758E-02,-1,#FALSE#,0,#FALSE#,0
0
0,60,20
0,60,240
0,214,240
0,214,20
package pdr;
import javax.swing._;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.RenderingHints;
import java.awt.geom._;
import java.awt.Color;
import java.awt.BasicStroke;
import java.awt.Shape;
import java.awt.Stroke;
import java.io._
import scala.collection.mutable.ArrayBuffer
import scala.StringBuilder;
import scala.collection.mutable.HashMap
case class PdrPoint(curve:Boolean,x:Double,y:Double)
case class PdrPolygon(lineClose:Boolean, lineWidth:Int,hasLine:Boolean,lineColor:Color,grdMode:Int,color:Color,
grdX:Double,grdY:Double,grdRotate:Double,grdScaleX:Double,grdScaleY:Double,grdColor:Color,
group:Boolean,groupno:Int,path:Boolean,pathno:Int,points:ArrayBuffer[PdrPoint]
);
case class PdrShape(width:Int,height:Int,polygons:ArrayBuffer[PdrPolygon])
class String_readAll(filename:String) {
def readAll():String = {
var in:InputStreamReader = null
var strb = new StringBuilder
try {
try {
in = new InputStreamReader(new FileInputStream(filename), "SJIS");
} catch {
case _ => in = new InputStreamReader(getClass().getResourceAsStream(filename), "SJIS");
}
def loop() {
val c:Int = in.read()
if(c == -1) {
} else {
strb.append(c.asInstanceOf[Char])
loop ()
}
}
loop()
in.close()
} catch {
case _ => println("read error:"+filename); return null
}
strb.toString();
}
}
case class SWFShape(color:Color,var shape:Shape,lineColor:Color,stroke:Stroke){
var shapes:GeneralPath = null;
def append(s:Shape){
if(shapes == null) {
shapes = new GeneralPath()
shapes.append(shape, false)
shape = shapes
}
shapes.append(s,false)
}
def draw(g2:Graphics2D){
if(color != null) {
g2.setColor(color);
g2.fill(shape);
}
if(stroke != null) {
g2.setColor(lineColor);
g2.setStroke(stroke);
g2.draw(shape);
}
}
}
case class SWFSprite(paths:Array[SWFShape]) {
def draw(g2:Graphics2D) {
for(p <- paths ) {
p.draw(g2);
}
}
}
object PDR {
implicit def toReadAll(filename:String) = new String_readAll(filename);
def loadSWFSprite(name:String):SWFSprite = {
loadSWFSprite(name,".")
}
def loadSWFSprite(name:String, path:String):SWFSprite = {
loadSWFSprite(name,path,0)
}
def loadSWFSprite(name:String, path:String, mode:Int):SWFSprite = {
pdr2swf(loadPDR(name,path,mode))
}
def loadPDR(name:String):PdrShape = {
loadPDR(name,".")
}
def loadPDR(name:String, path:String):PdrShape = {
loadPDR(name,path,0)
}
def col(c:Int):Color = {
val r = (c & 0xff);
val g = ((c>>8) & 0xff);
val b = ((c>>16) & 0xff);
var a = ((c>>24) & 0xff);
new Color(r,g,b,a);
}
val LEFT = 0;
val CENTER = 1;
val RIGHT = 2;
val TOP = 0;
val VCENTER = 4;
val BOTTOM = 8;
/// pdrファイル読込
def loadPDR(name:String, path:String, mode:Int):PdrShape = {
val filename = path + "/" + name;
val dt = filename.readAll();
val line = dt.split("\r\n");
val numPath = line(3).toInt;
val line1 = line(1).split(",");
val width = line1(0).toInt;
val height = line1(1).toInt;
val centerX =
if((mode & CENTER) != 0) width/2
else if((mode & RIGHT) != 0) width
else 0;
val centerY =
if((mode & VCENTER) != 0) height/2
else if((mode & BOTTOM) != 0) height
else 0;
var lno = 4;
val polys = new ArrayBuffer[PdrPolygon]();
for ( i <- 1 to numPath) {
val pathHead = line(lno).split(",");
lno += 1;
val numAnc = pathHead(0).toInt + 1;
val lineClose = pathHead(1) == "#TRUE#";
val lineWidth = pathHead(2).toInt;
val hasLine = pathHead(3).toInt != 0;
val lineColor = col(pathHead(4).toInt);
val grdMode = pathHead(5).toInt;
val color = col(pathHead(6).toInt);
val grdX = pathHead(7).toDouble/20-centerX;
val grdY = pathHead(8).toDouble/20-centerY;
val grdRotate = -pathHead(9).toDouble;
val grdScaleX = pathHead(10).toDouble;
val grdScaleY = pathHead(11).toDouble;
val grdColor = col(pathHead(12).toInt);
val group = pathHead(13)=="#TRUE#";
val groupno = pathHead(14).toInt;
val path = pathHead(15)=="#TRUE#";
val pathno = pathHead(16).toInt;
val points = new ArrayBuffer[PdrPoint]();
lno += 1;
for (j <- 1 to numAnc) {
val s = line(lno).split(",");
lno += 1;
val x = s(1).toDouble;
val y = s(2).toDouble;
points += new PdrPoint(s(0).toInt != 0 && (lineClose|| !(j==1||j==numAnc)), x/20-centerX, y/20-centerY);
}
val output = new PdrPolygon(lineClose,lineWidth,hasLine, lineColor, grdMode,color,
grdX,grdY,grdRotate,grdScaleX,grdScaleY,grdColor,
group,groupno,path,pathno,points
);
polys += output;
}
return new PdrShape(width,height,polys);
}
def pdr2swf(shape:PdrShape):SWFSprite = {
val paths = new ArrayBuffer[SWFShape];
val pathMap = new HashMap[Int,Int]();
for(i <- 0 to shape.polygons.size - 1) {
val s = new GeneralPath();
val poly = shape.polygons(i);
val points = poly.points;
val max = if(poly.lineClose) points.length else points.length - 1
for(j <- 0 to max) {
val no = j % points.length;
val x1 = points(no).x;
val y1 = points(no).y;
if(points(no).curve) {
val no1 = (no + 1) % points.length;
val (x2,y2) =
if(points(no1).curve) (
(x1+points(no1).x)/2 ,
(y1+points(no1).y)/2 )
else (points(no1).x, points(no1).y)
if(j==0) s.moveTo(x2.asInstanceOf[Float],y2.asInstanceOf[Float]);
else s.quadTo(x1.asInstanceOf[Float],y1.asInstanceOf[Float],x2.asInstanceOf[Float],y2.asInstanceOf[Float]);
} else {
if(j==0) s.moveTo(x1.asInstanceOf[Float],y1.asInstanceOf[Float]);
else s.lineTo(x1.asInstanceOf[Float],y1.asInstanceOf[Float]);
}
}
//s.closePath();
def stroke():Stroke = {
if(poly.hasLine) {
new BasicStroke(
poly.lineWidth/20.0f,
BasicStroke.CAP_ROUND,
BasicStroke.JOIN_ROUND);
} else {
null
}
}
def polyColor():Color = {
poly.grdMode match {
case 1 => poly.color
case 2 => null
case _ => null
}
}
val no = poly.pathno
if(poly.path && pathMap.contains(no)) {
paths(pathMap(no)).append(s)
} else {
paths += (poly.hasLine match {
case false => new SWFShape(polyColor, s, null, null);
case true => new SWFShape(polyColor, s, poly.lineColor, stroke());
})
if(poly.path) pathMap(no)=paths.length - 1
}
}
new SWFSprite(paths.toArray)
}
}
/*
object main extends JPanel{
val test2 = PDR.loadSWFSprite("test2.pdr");
def main(args:Array[String] ){
val frame = new JFrame();
frame.getContentPane().add(this);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setBounds(10, 10, 300, 200);
frame.setTitle("タイトル");
frame.setVisible(true);
}
override def paintComponent(g:Graphics){
val g2 = g.asInstanceOf[Graphics2D];
g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
RenderingHints.VALUE_ANTIALIAS_ON);
val wideStroke = new BasicStroke(1.0f);
g2.setStroke(wideStroke);
val curve1 =
new QuadCurve2D.Double(
0.0d, 100.0d,
0.0d, 0.0d,
100.0d, 100.0d);
g2.draw(curve1);
test2.draw(g2);
}
}*/
import sbt._
class Project(info: ProjectInfo) extends DefaultProject(info) {
override def mainClass = Some("game.main")
}
PDR030
20,20,255,255,255,2,60,5,2
1,"C:\Documents and Settings\Administrator\My Documents\scala\gameApplet2\kt.bmp",0,0,1,111
10
7,#TRUE#,20,1,-16777216,1,-91751,298,328,0,4.089355E-02,4.089355E-02,-1,#TRUE#,1,#FALSE#,0
0
0,346,223
1,413,297
1,412,390
1,369,425
1,253,433
1,193,386
1,192,319
0,202,271
4,#TRUE#,20,1,-16777216,1,-13108,287,35,90,2.297974E-02,2.297974E-02,-1,#TRUE#,1,#FALSE#,0
0
0,330,93
1,345,68
1,339,-34
1,278,-13
0,246,35
10,#TRUE#,20,1,-16777216,1,-13108,231,154,0,5.166626E-02,5.166626E-02,-1,#TRUE#,1,#FALSE#,0
0
1,108,72
1,231,24
1,303,56
0,311,71
0,368,140
1,373,153
1,368,203
1,327,247
1,225,282
1,126,255
1,79,168
1,#FALSE#,60,1,-10079488,0,-10079488,202,224,0,8.239746E-04,8.239746E-04,-1,#TRUE#,1,#FALSE#,0
0
0,201,224
0,202,224
2,#FALSE#,20,1,-16777216,0,-13108,327,175,0,8.239746E-04,8.239746E-04,-1,#TRUE#,1,#FALSE#,0
0
0,311,187
1,319,167
0,343,163
4,#FALSE#,20,1,-16777216,0,-13108,282,224,0,8.239746E-04,8.239746E-04,-1,#TRUE#,1,#FALSE#,0
0
0,246,242
1,281,251
0,282,224
1,319,228
0,315,203
11,#TRUE#,20,0,-16777216,1,-91751,209,419,0,4.071045E-02,4.071045E-02,-1,#TRUE#,1,#FALSE#,0
0
0,327,413
1,316,444
1,265,477
1,164,477
1,95,424
1,94,381
1,120,359
1,164,373
1,195,419
1,222,433
1,268,433
0,289,404
11,#FALSE#,20,1,-16777216,1,-91751,206,420,0,4.071045E-02,4.071045E-02,-1,#TRUE#,1,#FALSE#,0
0
0,326,414
1,315,445
1,264,478
1,163,478
1,94,425
1,92,382
1,118,360
1,163,374
1,194,419
1,221,434
1,267,434
0,288,405
4,#TRUE#,20,0,-16777216,1,-13108,78,125,10,2.297974E-02,2.297974E-02,-1,#TRUE#,1,#FALSE#,0
0
0,106,189
1,59,184
1,-26,103
1,59,77
0,139,95
4,#FALSE#,20,1,-16777216,0,-13108,78,123,10,2.297974E-02,2.297974E-02,-1,#TRUE#,1,#FALSE#,0
0
0,106,188
1,59,183
1,-26,102
1,59,76
0,139,94
PDR030
200,200,255,255,255,2,60,5,2
1,"C:\Documents and Settings\Administrator\My Documents\scala\gameApplet2\kt.bmp",0,0,1,111
10
7,#TRUE#,20,1,-16777216,1,-91751,1870,2256,0,4.089355E-02,4.089355E-02,-1,#FALSE#,0,#FALSE#,0
0
0,2146,1600
1,2527,2060
1,2520,2640
1,2272,2866
1,1612,2907
1,1272,2612
1,1253,2199
0,1334,1899
4,#TRUE#,20,1,-16777216,1,-13108,1820,430,90,2.297974E-02,2.297974E-02,-1,#FALSE#,0,#FALSE#,0
0
0,2053,799
1,2140,645
1,2103,11
1,1752,140
0,1580,439
4,#TRUE#,20,0,-16777216,1,-13108,621,997,10,2.297974E-02,2.297974E-02,-1,#FALSE#,0,#FALSE#,0
0
0,800,1400
1,516,1364
1,37,861
1,519,700
0,980,814
4,#FALSE#,20,1,-16777216,0,-13108,621,991,10,2.297974E-02,2.297974E-02,-1,#FALSE#,0,#FALSE#,0
0
0,800,1394
1,516,1358
1,37,855
1,519,694
0,980,808
10,#TRUE#,20,1,-16777216,1,-13108,1486,1176,0,5.166626E-02,5.166626E-02,-1,#FALSE#,0,#FALSE#,0
0
1,807,667
1,1493,373
1,1900,565
0,1955,658
0,2257,1085
1,2308,1170
1,2260,1485
1,2039,1753
1,1460,1973
1,899,1806
1,633,1260
1,#FALSE#,60,1,-10079488,0,-10079488,1336,1606,0,8.239746E-04,8.239746E-04,-1,#FALSE#,0,#FALSE#,0
0
0,1333,1606
0,1340,1606
2,#FALSE#,20,1,-16777216,0,-13108,2038,1311,0,8.239746E-04,8.239746E-04,-1,#FALSE#,0,#FALSE#,0
0
0,1945,1386
1,1988,1250
0,2124,1237
4,#FALSE#,20,1,-16777216,0,-13108,1780,1605,0,8.239746E-04,8.239746E-04,-1,#FALSE#,0,#FALSE#,0
0
0,1579,1726
1,1768,1771
0,1785,1606
1,1992,1638
0,1978,1486
11,#TRUE#,20,0,-16777216,1,-91751,1373,2823,0,4.071045E-02,4.071045E-02,-1,#FALSE#,0,#FALSE#,0
0
0,2040,2780
1,1980,2973
1,1679,3186
1,1113,3186
1,720,2860
1,706,2586
1,872,2446
1,1107,2539
1,1305,2820
1,1440,2906
1,1700,2906
0,1833,2726
11,#FALSE#,20,1,-16777216,1,-91751,1366,2829,0,4.071045E-02,4.071045E-02,-1,#FALSE#,0,#FALSE#,0
0
0,2033,2786
1,1973,2979
1,1672,3192
1,1106,3192
1,713,2866
1,699,2592
1,865,2452
1,1100,2545
1,1298,2826
1,1433,2912
1,1693,2912
0,1826,2732
PDR030
32,16,255,255,255,2,60,5,2
0,"",0,0,1,128
2
3,#TRUE#,20,0,-10027264,1,-10027264,120,160,0,3.051758E-02,3.051758E-02,-1,#FALSE#,0,#FALSE#,0
0
0,60,0
0,60,320
0,180,320
0,180,0
3,#TRUE#,20,0,-10027264,1,-10027264,520,160,0,3.051758E-02,3.051758E-02,-1,#FALSE#,0,#FALSE#,0
0
0,460,0
0,460,320
0,580,320
0,580,0
PDR030
300,400,255,255,255,2,60,5,2
0,"",0,0,1,128
28
3,#TRUE#,20,0,-16777216,1,956301312,2970,2211,0,3.051758E-02,3.051758E-02,-1,#FALSE#,0,#FALSE#,0
0
0,-180,760
0,-180,3661
0,6120,3661
0,6120,760
106,#TRUE#,20,1,-16777216,1,-13395712,790,1600,90,4.345703E-02,4.345703E-02,-1,#FALSE#,0,#FALSE#,1
0
1,268,2138
1,322,2192
0,382,2192
1,422,2232
0,462,2232
1,502,2272
0,580,2270
1,622,2312
1,698,2312
0,720,2290
1,742,2312
1,818,2312
0,830,2300
1,842,2312
1,918,2312
0,938,2292
1,998,2292
0,1038,2252
1,1098,2252
0,1138,2212
1,1158,2212
1,1252,2118
0,1252,2092
1,1312,2038
1,1312,1842
1,1158,1688
0,1118,1688
1,1098,1668
0,1038,1668
1,1018,1648
0,940,1650
1,918,1628
0,678,1628
1,658,1608
0,598,1608
0,532,1548
1,532,1522
0,512,1502
1,512,1462
0,500,1450
1,512,1438
0,512,1358
1,552,1318
0,552,1278
1,652,1178
0,652,1152
1,678,1152
1,732,1098
0,732,1062
1,742,1072
1,898,1072
1,952,1018
1,952,942
1,898,888
1,742,888
1,688,942
0,688,978
1,678,968
1,602,968
1,548,1022
0,548,1048
1,522,1048
1,408,1162
0,408,1202
1,368,1242
0,368,1262
1,328,1302
1,328,1438
0,340,1450
1,328,1462
1,328,1538
0,348,1558
1,348,1598
0,408,1652
1,408,1678
1,502,1772
0,562,1772
1,582,1792
0,602,1792
1,622,1812
0,920,1810
1,942,1832
0,1002,1832
1,1022,1852
0,1062,1852
0,1128,1912
0,1128,1988
0,1042,2068
1,1022,2068
0,982,2108
1,922,2108
0,902,2128
1,842,2128
0,830,2140
1,818,2128
1,742,2128
0,720,2150
1,698,2128
0,620,2130
1,578,2088
0,538,2088
1,498,2048
0,458,2048
1,452,2022
1,398,1968
1,322,1968
1,268,2022
67,#TRUE#,20,1,-16777216,1,-13395712,1840,1700,90,2.758789E-02,2.758789E-02,-1,#FALSE#,1,#FALSE#,2
0
0,2212,1422
1,2212,1402
1,2118,1308
0,2058,1308
1,2018,1268
0,1978,1268
1,1958,1248
1,1702,1248
0,1662,1288
1,1622,1288
1,1448,1462
0,1448,1522
1,1428,1542
1,1428,1658
0,1450,1680
1,1428,1702
1,1428,1818
1,1522,1912
0,1548,1912
1,1548,1938
0,1628,2018
1,1628,2038
1,1682,2092
0,1782,2092
1,1822,2132
0,1862,2132
1,1882,2152
1,2038,2152
0,2078,2112
1,2118,2112
1,2172,2058
1,2172,1942
1,2118,1888
1,2002,1888
0,1982,1908
1,1942,1908
0,1920,1930
1,1898,1908
0,1798,1908
1,1778,1888
0,1758,1888
0,1732,1862
0,1732,1842
0,1712,1822
1,1712,1782
0,1690,1760
1,1712,1738
1,1712,1662
0,1700,1650
1,1712,1638
0,1712,1598
1,1752,1558
0,1752,1492
0,1798,1452
1,1818,1452
0,1830,1440
1,1842,1452
1,1918,1452
0,1930,1440
1,1962,1472
0,1982,1472
1,2002,1492
0,2028,1492
1,2028,1538
1,2082,1592
1,2198,1592
1,2252,1538
1,2252,1462
57,#TRUE#,20,1,-16777216,1,-13395712,2920,1610,90,3.186035E-02,3.186035E-02,-1,#TRUE#,2,#TRUE#,3
0
1,3412,1942
1,3358,1888
1,3282,1888
0,3228,1948
0,3178,1948
1,3172,1922
0,3132,1882
1,3132,1862
0,3112,1842
1,3112,1422
0,3072,1382
1,3072,1322
1,3018,1268
0,2998,1268
1,2958,1228
0,2938,1228
1,2898,1188
0,2832,1188
0,2812,1162
1,2812,1142
1,2758,1088
1,2542,1088
1,2488,1142
1,2488,1218
1,2542,1272
0,2662,1272
0,2702,1312
0,2748,1312
1,2748,1358
1,2802,1412
0,2822,1412
1,2842,1432
0,2862,1432
0,2928,1498
0,2928,1578
1,2918,1568
0,2898,1568
1,2858,1528
1,2602,1528
0,2548,1588
1,2522,1588
1,2428,1682
1,2428,1938
1,2482,1992
0,2502,1992
1,2542,2032
0,2602,2032
1,2642,2072
0,2708,2072
1,2762,2132
1,2978,2132
1,3032,2078
0,3032,2062
1,3082,2112
0,3102,2112
1,3122,2132
1,3358,2132
1,3412,2078
11,#TRUE#,20,1,-16777216,1,-13395712,0,-1800,0,0,0,-1,#TRUE#,2,#TRUE#,3
0
0,2928,1842
1,2888,1882
0,2888,1948
0,2772,1948
1,2718,1888
0,2658,1888
0,2612,1848
0,2612,1758
0,2652,1712
0,2802,1712
1,2882,1792
0,2928,1792
52,#TRUE#,20,1,-16777216,1,-13395712,3980,1520,90,3.979492E-02,3.979492E-02,-1,#FALSE#,0,#FALSE#,4
0
1,4358,2172
1,4412,2118
1,4412,2042
1,4358,1988
1,4002,1988
0,3990,2000
1,3978,1988
0,3812,1988
1,3812,1962
0,3792,1942
1,3792,1662
0,3772,1642
1,3772,1522
1,3752,1498
1,3752,1422
1,3732,1398
1,3732,1322
0,3720,1310
1,3732,1298
1,3732,1222
0,3720,1210
1,3732,1198
1,3732,1122
0,3690,1080
1,3732,1038
1,3732,922
1,3678,868
1,3602,868
1,3548,922
1,3548,1038
0,3590,1080
1,3548,1122
1,3548,1198
0,3560,1210
1,3548,1222
1,3548,1298
0,3560,1310
1,3548,1322
1,3548,1398
1,3568,1422
1,3568,1498
1,3588,1522
1,3588,1658
0,3608,1678
1,3608,1998
0,3628,2018
1,3628,2098
1,3682,2152
0,3702,2152
1,3722,2172
1,3978,2172
0,3990,2160
1,4002,2172
89,#TRUE#,20,1,-16777216,1,-13395712,5070,1520,0,3.796387E-02,3.796387E-02,-1,#TRUE#,4,#TRUE#,6
0
0,5508,1622
1,5488,1642
0,5488,1662
1,5468,1682
0,5468,1742
0,5442,1768
1,5422,1768
0,5382,1808
0,5352,1802
1,5352,1462
0,5332,1442
1,5332,1362
0,5312,1342
1,5312,1322
0,5272,1282
1,5272,1222
0,5212,1162
1,5212,1142
1,5098,1028
0,5058,1028
1,5038,1008
0,4898,1008
1,4858,968
1,4582,968
0,4562,988
1,4522,988
1,4448,1062
1,4448,1138
1,4502,1192
1,4598,1192
0,4620,1170
1,4642,1192
1,4718,1192
0,4758,1152
0,4822,1152
1,4862,1192
0,4888,1192
1,4888,1218
1,4982,1312
0,5002,1312
0,5028,1332
1,5028,1358
0,5058,1388
1,4782,1388
0,4742,1428
1,4722,1428
0,4682,1468
1,4662,1468
1,4608,1522
0,4608,1542
1,4588,1562
1,4588,1678
0,4600,1690
1,4588,1702
1,4588,1798
0,4628,1838
1,4628,1878
0,4648,1898
1,4648,1918
1,4702,1972
0,4722,1972
1,4762,2012
0,4782,2012
1,4802,2032
0,4842,2032
1,4862,2052
0,4902,2052
1,4922,2072
1,4998,2072
0,5010,2060
1,5022,2072
1,5138,2072
1,5192,2018
0,5192,1992
0,5220,1970
1,5242,1992
1,5498,1992
1,5592,1898
0,5592,1878
1,5632,1838
0,5632,1798
1,5652,1778
0,5652,1738
1,5672,1718
0,5672,1698
1,5692,1678
1,5692,1522
1,5638,1468
1,5562,1468
1,5508,1522
27,#TRUE#,20,1,-16777216,1,-13395712,-100,-1800,0,0,0,-1,#TRUE#,4,#TRUE#,6
0
0,5148,1742
1,5108,1782
0,5108,1822
1,5068,1862
0,5068,1888
1,5022,1888
0,5010,1900
1,4998,1888
0,4958,1888
1,4938,1868
0,4898,1868
1,4878,1848
0,4858,1848
1,4838,1828
0,4812,1822
1,4812,1802
0,4772,1762
1,4772,1702
0,4760,1690
1,4772,1678
0,4772,1618
1,4798,1612
0,4818,1592
1,4838,1592
1,4862,1572
0,5062,1572
1,5102,1612
0,5148,1612
45,#TRUE#,20,1,-16777216,1,-16776961,809,3105,90,3.076172E-02,3.076172E-02,-1,#FALSE#,0,#FALSE#,0
0
0,560,2973
0,727,2966
1,731,2994
0,745,3008
1,766,3032
0,798,3032
1,828,3032
1,861,3007
0,861,2990
1,861,2975
0,846,2962
1,832,2950
0,769,2940
1,665,2921
0,621,2891
1,577,2862
0,577,2815
1,577,2785
1,622,2731
1,714,2700
0,793,2700
1,899,2700
1,1002,2756
0,1011,2817
0,844,2824
1,839,2796
1,808,2772
0,781,2772
1,767,2772
1,744,2790
0,744,2803
1,744,2812
0,748,2820
1,753,2828
0,795,2835
1,898,2852
1,987,2888
1,1028,2940
0,1028,2973
1,1028,3011
1,974,3076
1,877,3110
0,795,3110
1,666,3110
1,566,3033
0,560,2973
19,#TRUE#,20,1,-16777216,1,-16776961,1310,3105,90,2.978516E-02,2.978516E-02,-1,#FALSE#,0,#FALSE#,0
0
0,1095,2706
0,1245,2706
0,1245,2852
1,1266,2830
1,1323,2810
0,1363,2810
1,1429,2810
1,1496,2865
0,1496,2921
0,1496,3103
0,1345,3103
0,1345,2945
1,1345,2918
1,1319,2895
0,1295,2895
1,1277,2895
1,1245,2925
0,1245,2965
0,1245,3103
0,1095,3103
14,#TRUE#,20,1,-16777216,1,-16776961,1794,3160,90,2.539063E-02,2.539063E-02,-1,#TRUE#,3,#TRUE#,5
0
0,1562,2961
1,1562,2895
1,1677,2810
0,1774,2810
1,1894,2810
0,1951,2860
1,1997,2901
0,1997,2959
1,1997,3025
1,1883,3110
0,1775,3110
1,1686,3110
0,1630,3075
1,1562,3031
0,1562,2961
12,#TRUE#,20,1,-16777216,1,-16776961,1794,3160,90,1.171875E-02,1.171875E-02,-1,#TRUE#,3,#TRUE#,5
0
0,1713,2960
1,1713,3000
1,1754,3038
0,1776,3038
1,1807,3038
1,1847,3000
0,1847,2959
1,1847,2920
1,1806,2882
0,1777,2882
1,1754,2882
1,1713,2921
0,1713,2960
14,#TRUE#,20,1,-16777216,1,-16776961,2279,3160,90,2.539063E-02,2.539063E-02,-1,#TRUE#,5,#TRUE#,7
0
0,2047,2961
1,2047,2895
1,2162,2810
0,2259,2810
1,2379,2810
0,2435,2860
1,2481,2901
0,2481,2959
1,2481,3025
1,2368,3110
0,2260,3110
1,2170,3110
0,2115,3075
1,2047,3031
0,2047,2961
12,#TRUE#,20,1,-16777216,1,-16776961,2279,3160,90,1.171875E-02,1.171875E-02,-1,#TRUE#,5,#TRUE#,7
0
0,2197,2960
1,2197,3000
1,2238,3038
0,2260,3038
1,2291,3038
1,2331,3000
0,2331,2959
1,2331,2920
1,2291,2882
0,2261,2882
1,2238,2882
1,2197,2921
0,2197,2960
14,#TRUE#,20,1,-16777216,1,-16776961,2763,3160,90,2.539063E-02,2.539063E-02,-1,#TRUE#,6,#TRUE#,8
0
0,2532,2961
1,2532,2895
1,2646,2810
0,2744,2810
1,2863,2810
0,2920,2860
1,2966,2901
0,2966,2959
1,2966,3025
1,2852,3110
0,2744,3110
1,2655,3110
0,2599,3075
1,2532,3031
0,2532,2961
12,#TRUE#,20,1,-16777216,1,-16776961,2763,3160,90,1.171875E-02,1.171875E-02,-1,#TRUE#,6,#TRUE#,8
0
0,2682,2960
1,2682,3000
1,2723,3038
0,2745,3038
1,2776,3038
1,2816,3000
0,2816,2959
1,2816,2920
1,2775,2882
0,2746,2882
1,2723,2882
1,2682,2921
0,2682,2960
14,#TRUE#,20,1,-16777216,1,-16776961,3248,3160,90,2.539063E-02,2.539063E-02,-1,#TRUE#,7,#TRUE#,9
0
0,3016,2961
1,3016,2895
1,3131,2810
0,3228,2810
1,3348,2810
0,3405,2860
1,3450,2901
0,3450,2959
1,3450,3025
1,3337,3110
0,3229,3110
1,3139,3110
0,3084,3075
1,3016,3031
0,3016,2961
12,#TRUE#,20,1,-16777216,1,-16776961,3248,3160,90,1.171875E-02,1.171875E-02,-1,#TRUE#,7,#TRUE#,9
0
0,3166,2960
1,3166,3000
1,3207,3038
0,3229,3038
1,3260,3038
1,3300,3000
0,3300,2959
1,3300,2920
1,3260,2882
0,3230,2882
1,3207,2882
1,3166,2921
0,3166,2960
14,#TRUE#,20,1,-16777216,1,-16776961,3732,3160,90,2.539063E-02,2.539063E-02,-1,#TRUE#,8,#TRUE#,10
0
0,3501,2961
1,3501,2895
1,3615,2810
0,3713,2810
1,3832,2810
0,3889,2860
1,3935,2901
0,3935,2959
1,3935,3025
1,3821,3110
0,3713,3110
1,3624,3110
0,3568,3075
1,3501,3031
0,3501,2961
12,#TRUE#,20,1,-16777216,1,-16776961,3732,3160,90,1.171875E-02,1.171875E-02,-1,#TRUE#,8,#TRUE#,10
0
0,3651,2960
1,3651,3000
1,3692,3038
0,3714,3038
1,3745,3038
1,3785,3000
0,3785,2959
1,3785,2920
1,3744,2882
0,3715,2882
1,3692,2882
1,3651,2921
0,3651,2960
14,#TRUE#,20,1,-16777216,1,-16776961,4217,3160,90,2.539063E-02,2.539063E-02,-1,#TRUE#,9,#TRUE#,11
0
0,3985,2961
1,3985,2895
1,4100,2810
0,4197,2810
1,4317,2810
0,4374,2860
1,4420,2901
0,4420,2959
1,4420,3025
1,4306,3110
0,4198,3110
1,4108,3110
0,4053,3075
1,3985,3031
0,3985,2961
12,#TRUE#,20,1,-16777216,1,-16776961,4217,3160,90,1.171875E-02,1.171875E-02,-1,#TRUE#,9,#TRUE#,11
0
0,4136,2960
1,4136,3000
1,4176,3038
0,4198,3038
1,4230,3038
1,4269,3000
0,4269,2959
1,4269,2920
1,4229,2882
0,4199,2882
1,4176,2882
1,4136,2921
0,4136,2960
23,#TRUE#,20,1,-16777216,1,-16776961,4626,3108,90,3.027344E-02,3.027344E-02,-1,#FALSE#,0,#FALSE#,0
0
0,4670,2706
0,4670,2817
0,4745,2817
0,4745,2895
0,4670,2895
0,4670,3003
1,4670,3022
0,4675,3028
1,4682,3038
0,4691,3038
1,4707,3038
0,4743,3031
0,4754,3101
1,4701,3110
0,4647,3110
1,4594,3110
1,4544,3088
1,4520,3045
0,4520,2997
0,4520,2895
0,4470,2895
0,4470,2817
0,4520,2817
0,4520,2764
3,#TRUE#,20,1,-16777216,1,-16776961,4910,2945,90,8.789063E-03,8.789063E-03,-1,#TRUE#,10,#TRUE#,12
0
0,4821,2706
0,4971,2706
0,4971,2784
0,4821,2784
3,#TRUE#,20,1,-16777216,1,-16776961,4910,3160,90,2.148438E-02,2.148438E-02,-1,#TRUE#,10,#TRUE#,12
0
0,4821,2817
0,4971,2817
0,4971,3103
0,4821,3103
19,#TRUE#,20,1,-16777216,1,-16776961,5270,3157,90,.0234375,.0234375,-1,#FALSE#,0,#FALSE#,0
0
0,5054,2817
0,5195,2817
0,5194,2862
1,5216,2834
1,5277,2810
0,5321,2810
1,5389,2810
1,5455,2865
0,5455,2921
0,5455,3103
0,5305,3103
0,5305,2945
1,5305,2918
1,5279,2895
0,5255,2895
1,5237,2895
1,5205,2925
0,5205,2965
0,5205,3103
0,5054,3103
36,#TRUE#,20,1,-16777216,1,-16776961,5746,3215,90,3.076172E-02,3.076172E-02,-1,#TRUE#,11,#TRUE#,13
0
0,5800,2817
0,5940,2817
0,5940,3088
0,5940,3101
1,5940,3127
1,5911,3176
1,5861,3207
1,5784,3220
0,5727,3220
1,5615,3220
1,5531,3168
0,5531,3124
1,5531,3119
0,5531,3110
0,5681,3122
1,5686,3136
0,5697,3141
1,5713,3148
0,5729,3148
1,5759,3148
1,5790,3124
0,5790,3093
0,5790,3051
1,5777,3069
0,5756,3077
1,5723,3090
0,5676,3090
1,5601,3090
0,5555,3040
1,5522,3005
0,5522,2947
1,5522,2880
1,5607,2810
0,5675,2810
1,5727,2810
1,5783,2831
0,5800,2855
12,#TRUE#,20,1,-16777216,1,-16776961,5746,3150,90,1.025391E-02,1.025391E-02,-1,#TRUE#,11,#TRUE#,13
0
0,5673,2953
1,5673,2986
1,5707,3018
0,5727,3018
1,5754,3018
1,5791,2985
0,5791,2951
1,5791,2918
1,5753,2882
0,5725,2882
1,5706,2882
1,5673,2915
0,5673,2953
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment