metanohi-misc-subsites/old-projects/eonaton/game/load.js

103 lines
3.5 KiB
JavaScript

/*
Eon Aton: a RPG-like game system in JavaScript
Copyright (C) 2008-2009 Niels Serup
This file is part of Eon Aton.
Eon Aton is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Eon Aton is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Eon Aton. If not, see <http://www.gnu.org/licenses/>.
*/
/*
This file creates the game on page load.
*/
window.onload=function(){
characters=new Array()
START_systems()
current_screen=new screen()
current_screen.name="The Sun"
current_screen.description="The great star"
current_screen.background="maps/sun.png"
current_screen.bbackground="#000"
current_screen.width=1920
current_screen.height=1200
current_screen.viswidth=640
current_screen.visheight=400
current_screen.create()
characters[0]=new character()
characters[0].name="Wiz the Wizard"
characters[0].description="A poorly drawn wizard, fighting against all evil."
characters[0].src="char/wizard.png"
characters[0].width=48
characters[0].height=64
characters[0].posX=285
characters[0].posY=140
characters[0].dir(0,0,[0,1],[2,3,4,5],[6,7,8,9])
characters[0].dir(1,1,[0,1],[2,3,4,5],[6,7,8,9])
characters[0].dir(2,2,[0,1],[2,3,4,5],[6,7,8,9])
characters[0].dir(3,3,[0,1],[2,3,4,5],[6,7,8,9])
characters[0].dir(4,4,[0,1],[2,3,4,5],[6,7,8,9])
characters[0].dir(5,5,[0,1],[2,3,4,5],[6,7,8,9])
characters[0].dir(6,6,[0,1],[2,3,4,5],[6,7,8,9])
characters[0].dir(7,7,[0,1],[2,3,4,5],[6,7,8,9])
characters[0].create()
current_screen.add(characters[0])
characters[1]=new character()
characters[1].name="Wiz the Wizard"
characters[1].description="A poorly drawn wizard, fighting against all evil."
characters[1].src="char/simplearrows.png"
characters[1].width=48
characters[1].height=64
characters[1].posX=335
characters[1].posY=140
characters[1].dir(0,0,[0,1],[2,3,4,5],[6,7,8,9])
characters[1].dir(1,1,[0,1],[2,3,4,5],[6,7,8,9])
characters[1].dir(2,2,[0,1],[2,3,4,5],[6,7,8,9])
characters[1].dir(3,3,[0,1],[2,3,4,5],[6,7,8,9])
characters[1].dir(4,4,[0,1],[2,3,4,5],[6,7,8,9])
characters[1].dir(5,5,[0,1],[2,3,4,5],[6,7,8,9])
characters[1].dir(6,6,[0,1],[2,3,4,5],[6,7,8,9])
characters[1].dir(7,7,[0,1],[2,3,4,5],[6,7,8,9])
characters[1].create()
current_screen.add(characters[1])
characters[2]=new character()
characters[2].name="Wiz the Wizard"
characters[2].description="A poorly drawn wizard, fighting against all evil."
characters[2].src="char/wizard.png"
characters[2].width=48
characters[2].height=64
characters[2].posX=385
characters[2].posY=140
characters[2].dir(0,0,[0,1],[2,3,4,5],[6,7,8,9])
characters[2].dir(1,1,[0,1],[2,3,4,5],[6,7,8,9])
characters[2].dir(2,2,[0,1],[2,3,4,5],[6,7,8,9])
characters[2].dir(3,3,[0,1],[2,3,4,5],[6,7,8,9])
characters[2].dir(4,4,[0,1],[2,3,4,5],[6,7,8,9])
characters[2].dir(5,5,[0,1],[2,3,4,5],[6,7,8,9])
characters[2].dir(6,6,[0,1],[2,3,4,5],[6,7,8,9])
characters[2].dir(7,7,[0,1],[2,3,4,5],[6,7,8,9])
characters[2].create()
current_screen.add(characters[2])
}