commit 5f7cefb98e64d36fa08df2706540411af0cd7e86 Author: Tony Bark Date: Fri May 3 22:50:34 2024 -0400 Initial source commit diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..53e94d1 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,45 @@ +name: Build + +on: + push: + branches: [main, dev] + pull_request: + branches: [main, dev] + +jobs: + build: + timeout-minutes: 15 + continue-on-error: true + strategy: + matrix: + os: [macos-latest, windows-latest] + runs-on: ${{matrix.os}} + steps: + - uses: actions/checkout@v2 + - uses: goto-bus-stop/setup-zig@v2 + - name: Build + run: zig build + - name: Test + run: zig build test + # ubuntu-build: + # timeout-minutes: 15 + # continue-on-error: true + # runs-on: ubuntu-latest + # steps: + # - uses: actions/checkout@v2 + # - uses: goto-bus-stop/setup-zig@v2 + # - name: Install OpenGL + # run: apt-get libglu1-mesa-dev freeglut3-dev mesa-common-dev + # - name: Build + # run: zig build + # - name: Test + # run: zig build test + lint: + needs: build + timeout-minutes: 15 + continue-on-error: true + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: goto-bus-stop/setup-zig@v2 + - run: zig fmt --check . \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f8fad5f --- /dev/null +++ b/.gitignore @@ -0,0 +1,525 @@ +# File created using '.gitignore Generator' for Visual Studio Code: https://bit.ly/vscode-gig +# Created by https://www.toptal.com/developers/gitignore/api/zig,windows,visualstudiocode,macos,linux,cmake,dotnetcore,visualstudio +# Edit at https://www.toptal.com/developers/gitignore?templates=zig,windows,visualstudiocode,macos,linux,cmake,dotnetcore,visualstudio + +### CMake ### +CMakeLists.txt.user +CMakeCache.txt +CMakeFiles +CMakeScripts +Testing +Makefile +cmake_install.cmake +install_manifest.txt +compile_commands.json +CTestTestfile.cmake +_deps + +### CMake Patch ### +# External projects +*-prefix/ + +### DotnetCore ### +# .NET Core build folders +bin/ +obj/ + +# Common node modules locations +/node_modules +/wwwroot/node_modules + +### Linux ### +*~ + +# temporary files which can be created if a process still has a handle open of a deleted file +.fuse_hidden* + +# KDE directory preferences +.directory + +# Linux trash folder which might appear on any partition or disk +.Trash-* + +# .nfs files are created when an open file is removed but is still being accessed +.nfs* + +### macOS ### +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +### macOS Patch ### +# iCloud generated files +*.icloud + +### VisualStudioCode ### +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +!.vscode/*.code-snippets + +# Local History for Visual Studio Code +.history/ + +# Built Visual Studio Code Extensions +*.vsix + +### VisualStudioCode Patch ### +# Ignore all local history of files +.history +.ionide + +### Windows ### +# Windows thumbnail cache files +Thumbs.db +Thumbs.db:encryptable +ehthumbs.db +ehthumbs_vista.db + +# Dump file +*.stackdump + +# Folder config file +[Dd]esktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msix +*.msm +*.msp + +# Windows shortcuts +*.lnk + +### zig ### +# Zig programming language + +zig-cache/ +zig-out/ +build/ +build-*/ +docgen_tmp/ + +### VisualStudio ### +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Ww][Ii][Nn]32/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ +[Ll]ogs/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# ASP.NET Scaffolding +ScaffoldingReadMe.txt + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.tlog +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Coverlet is a free, cross platform Code Coverage Tool +coverage*.json +coverage*.xml +coverage*.info + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio 6 auto-generated project file (contains which files were open etc.) +*.vbp + +# Visual Studio 6 workspace and project file (working project files containing files to include in project) +*.dsw +*.dsp + +# Visual Studio 6 technical files + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# Visual Studio History (VSHistory) files +.vshistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ + +# Fody - auto-generated XML schema +FodyWeavers.xsd + +# VS Code files for those working on multiple tools +*.code-workspace + +# Local History for Visual Studio Code + +# Windows Installer files from build outputs + +# JetBrains Rider +*.sln.iml + +### VisualStudio Patch ### +# Additional files built by Visual Studio + +# End of https://www.toptal.com/developers/gitignore/api/zig,windows,visualstudiocode,macos,linux,cmake,dotnetcore,visualstudio + +# Custom rules (everything added below won't be overriden by 'Generate .gitignore File' if you use 'Update' option) + +*.wasm* diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..f253a07 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,22 @@ +{ + // See https://go.microsoft.com/fwlink/?LinkId=733558 + // for the documentation about the tasks.json format + "version": "2.0.0", + "tasks": [ + { + "label": "zig build", + "type": "shell", + "command": "zig build" + }, + { + "label": "zig run", + "type": "shell", + "command": "zig build run" + }, + { + "label": "zig test", + "type": "shell", + "command": "zig build test" + } + ] +} \ No newline at end of file diff --git a/COPYING b/COPYING new file mode 100644 index 0000000..df2c1dc --- /dev/null +++ b/COPYING @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) 2024 Tony Bark + + This program 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. + + This program 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 this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) 2024 Tony Bark + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..b95cb98 --- /dev/null +++ b/LICENSE @@ -0,0 +1,47 @@ +micropolisJS. + +Copyright (C) Graeme McCutcheon, 2013. + +Adapted from the original Micropolis source code release, and so released +under the GNU General Public License V3. + +ADDITIONAL TERMS per GNU GPL Section 7 + +No trademark or publicity rights are granted. This license does NOT +give you any right, title or interest in the trademark SimCity or any +other Electronic Arts trademark. You may not distribute any +modification of this program using the trademark SimCity or claim any +affliation or association with Electronic Arts Inc. or its employees. + +Any propagation or conveyance of this program must include this +copyright notice and these terms. + +If you convey this program (or any modifications of it) and assume +contractual liability for the program to recipients of it, you agree +to indemnify Electronic Arts for any liability that those contractual +assumptions impose on Electronic Arts. + +You may not misrepresent the origins of this program; modified +versions of the program must be marked as such and not identified as +the original program. + +This disclaimer supplements the one included in the General Public +License. TO THE FULLEST EXTENT PERMISSIBLE UNDER APPLICABLE LAW, THIS +PROGRAM IS PROVIDED TO YOU "AS IS," WITH ALL FAULTS, WITHOUT WARRANTY +OF ANY KIND, AND YOUR USE IS AT YOUR SOLE RISK. THE ENTIRE RISK OF +SATISFACTORY QUALITY AND PERFORMANCE RESIDES WITH YOU. ELECTRONIC ARTS +DISCLAIMS ANY AND ALL EXPRESS, IMPLIED OR STATUTORY WARRANTIES, +INCLUDING IMPLIED WARRANTIES OF MERCHANTABILITY, SATISFACTORY QUALITY, +FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT OF THIRD PARTY +RIGHTS, AND WARRANTIES (IF ANY) ARISING FROM A COURSE OF DEALING, +USAGE, OR TRADE PRACTICE. ELECTRONIC ARTS DOES NOT WARRANT AGAINST +INTERFERENCE WITH YOUR ENJOYMENT OF THE PROGRAM; THAT THE PROGRAM WILL +MEET YOUR REQUIREMENTS; THAT OPERATION OF THE PROGRAM WILL BE +UNINTERRUPTED OR ERROR-FREE, OR THAT THE PROGRAM WILL BE COMPATIBLE +WITH THIRD PARTY SOFTWARE OR THAT ANY ERRORS IN THE PROGRAM WILL BE +CORRECTED. NO ORAL OR WRITTEN ADVICE PROVIDED BY ELECTRONIC ARTS OR +ANY AUTHORIZED REPRESENTATIVE SHALL CREATE A WARRANTY. SOME +JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF OR LIMITATIONS ON IMPLIED +WARRANTIES OR THE LIMITATIONS ON THE APPLICABLE STATUTORY RIGHTS OF A +CONSUMER, SO SOME OR ALL OF THE ABOVE EXCLUSIONS AND LIMITATIONS MAY +NOT APPLY TO YOU. \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..faf434b --- /dev/null +++ b/README.md @@ -0,0 +1,22 @@ +# City Limits + +

+ +
+GitHub Workflow Status GitHub GitHub commit activity +


+

+ +CityLimits is an open source reimagining of SimCity Classic written in Zig based on RayLib, and using Micropolis's core. In the long run, I plan on adding on gameplay mechanics used in later iterations. Like it's cousin, everything learned in the making of CityLimits will go towards the building and customization that I've been itching to create. + + +## Authors + +- **Tony Bark** - _Initial work_ - [tonytins](https://github.com/tonytins) +- **Maxis** - _Assets_ - [SimHacker](https://github.com/SimHacker/) + +See also the list of [contributors](https://github.com/tonytins/citylimits/contributors) who participated in this project. + +## License + +I license this project under the GPL-2.0-or-later license - see [LICENSE](LICENSE) for details. diff --git a/build.zig b/build.zig new file mode 100644 index 0000000..154f73e --- /dev/null +++ b/build.zig @@ -0,0 +1,113 @@ +const std = @import("std"); + +// Although this function looks imperative, note that its job is to +// declaratively construct a build graph that will be executed by an external +// runner. +pub fn build(b: *std.Build) void { + // Standard target options allows the person running `zig build` to choose + // what target to build for. Here we do not override the defaults, which + // means any target is allowed, and the default is native. Other options + // for restricting supported target set are available. + const target = b.standardTargetOptions(.{}); + + // Standard optimization options allow the person running `zig build` to select + // between Debug, ReleaseSafe, ReleaseFast, and ReleaseSmall. Here we do not + // set a preferred release mode, allowing the user to decide how to optimize. + const optimize = b.standardOptimizeOption(.{}); + + const lib = b.addStaticLibrary(.{ + .name = "citylimits", + // In this case the main source file is merely a path, however, in more + // complicated build scripts, this could be a generated file. + .root_source_file = b.path("src/root.zig"), + .target = target, + .optimize = optimize, + }); + + // This declares intent for the library to be installed into the standard + // location when the user invokes the "install" step (the default step when + // running `zig build`). + b.installArtifact(lib); + + const exe = b.addExecutable(.{ + .name = "citylimits", + .root_source_file = b.path("src/main.zig"), + .target = target, + .optimize = optimize, + }); + + // C headers + exe.linkLibC(); + exe.addIncludePath(.{ .path = "./core" }); + + // Modules + const raylib_dep = b.dependency("raylib-zig", .{ + .target = target, + .optimize = optimize, + }); + + const raylib = raylib_dep.module("raylib"); // main raylib module + const raylib_math = raylib_dep.module("raylib-math"); // raymath module + // const raylib_gui = raylib_dep.module("raylib-gui"); // raylib gui + const rlgl = raylib_dep.module("rlgl"); // rlgl module + const raylib_artifact = raylib_dep.artifact("raylib"); // raylib C library + + exe.linkLibrary(raylib_artifact); + exe.root_module.addImport("raylib", raylib); + exe.root_module.addImport("raylib-math", raylib_math); + // exe.root_module.addImport("raylib-gui", raylib_gui); + exe.root_module.addImport("rlgl", rlgl); + + // This declares intent for the executable to be installed into the + // standard location when the user invokes the "install" step (the default + // step when running `zig build`). + b.installArtifact(exe); + + // This *creates* a Run step in the build graph, to be executed when another + // step is evaluated that depends on it. The next line below will establish + // such a dependency. + const run_cmd = b.addRunArtifact(exe); + + // By making the run step depend on the install step, it will be run from the + // installation directory rather than directly from within the cache directory. + // This is not necessary, however, if the application depends on other installed + // files, this ensures they will be present and in the expected location. + run_cmd.step.dependOn(b.getInstallStep()); + + // This allows the user to pass arguments to the application in the build + // command itself, like this: `zig build run -- arg1 arg2 etc` + if (b.args) |args| { + run_cmd.addArgs(args); + } + + // This creates a build step. It will be visible in the `zig build --help` menu, + // and can be selected like this: `zig build run` + // This will evaluate the `run` step rather than the default, which is "install". + const run_step = b.step("run", "Run the app"); + run_step.dependOn(&run_cmd.step); + + // Creates a step for unit testing. This only builds the test executable + // but does not run it. + const lib_unit_tests = b.addTest(.{ + .root_source_file = b.path("src/root.zig"), + .target = target, + .optimize = optimize, + }); + + const run_lib_unit_tests = b.addRunArtifact(lib_unit_tests); + + const exe_unit_tests = b.addTest(.{ + .root_source_file = b.path("src/main.zig"), + .target = target, + .optimize = optimize, + }); + + const run_exe_unit_tests = b.addRunArtifact(exe_unit_tests); + + // Similar to creating the run step earlier, this exposes a `test` step to + // the `zig build --help` menu, providing a way for the user to request + // running the unit tests. + const test_step = b.step("test", "Run unit tests"); + test_step.dependOn(&run_lib_unit_tests.step); + test_step.dependOn(&run_exe_unit_tests.step); +} diff --git a/build.zig.zon b/build.zig.zon new file mode 100644 index 0000000..9b6be9d --- /dev/null +++ b/build.zig.zon @@ -0,0 +1,36 @@ +.{ + .name = "citylimits", + // This is a [Semantic Version](https://semver.org/). + // In a future version of Zig it will be used for package deduplication. + .version = "0.1.100", + + // This field is optional. + // This is currently advisory only; Zig does not yet do anything + // with this value. + //.minimum_zig_version = "0.11.0", + + // This field is optional. + // Each dependency must either provide a `url` and `hash`, or a `path`. + // `zig build --fetch` can be used to fetch all dependencies of a package, recursively. + // Once all dependencies are fetched, `zig build` no longer requires + // internet connectivity. + .dependencies = .{ + .@"raylib-zig" = .{ + .url = "https://github.com/Not-Nik/raylib-zig/archive/devel.tar.gz", + .hash = "1220f48ef45b22a393da16f3210b61b87ad9b65d215d02c51189861a57a1b4290059", + }, + }, + .paths = .{ + // This makes *all* files, recursively, included in this package. It is generally + // better to explicitly list the files and directories instead, to insure that + // fetching from tarballs, file system paths, and version control all result + // in the same contents hash. + "", + // For example... + //"build.zig", + //"build.zig.zon", + //"src", + //"LICENSE", + //"README.md", + }, +} diff --git a/core/allocate.cpp b/core/allocate.cpp new file mode 100644 index 0000000..b728e02 --- /dev/null +++ b/core/allocate.cpp @@ -0,0 +1,173 @@ +/* allocate.cpp + * + * Micropolis, Unix Version. This game was released for the Unix platform + * in or about 1990 and has been modified for inclusion in the One Laptop + * Per Child program. Copyright (C) 1989 - 2007 Electronic Arts Inc. If + * you need assistance with this program, you may contact: + * http://wiki.laptop.org/go/Micropolis or email micropolis@laptop.org. + * + * This program 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. + * + * This program 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 this program. If + * not, see . + * + * ADDITIONAL TERMS per GNU GPL Section 7 + * + * No trademark or publicity rights are granted. This license does NOT + * give you any right, title or interest in the trademark SimCity or any + * other Electronic Arts trademark. You may not distribute any + * modification of this program using the trademark SimCity or claim any + * affliation or association with Electronic Arts Inc. or its employees. + * + * Any propagation or conveyance of this program must include this + * copyright notice and these terms. + * + * If you convey this program (or any modifications of it) and assume + * contractual liability for the program to recipients of it, you agree + * to indemnify Electronic Arts for any liability that those contractual + * assumptions impose on Electronic Arts. + * + * You may not misrepresent the origins of this program; modified + * versions of the program must be marked as such and not identified as + * the original program. + * + * This disclaimer supplements the one included in the General Public + * License. TO THE FULLEST EXTENT PERMISSIBLE UNDER APPLICABLE LAW, THIS + * PROGRAM IS PROVIDED TO YOU "AS IS," WITH ALL FAULTS, WITHOUT WARRANTY + * OF ANY KIND, AND YOUR USE IS AT YOUR SOLE RISK. THE ENTIRE RISK OF + * SATISFACTORY QUALITY AND PERFORMANCE RESIDES WITH YOU. ELECTRONIC ARTS + * DISCLAIMS ANY AND ALL EXPRESS, IMPLIED OR STATUTORY WARRANTIES, + * INCLUDING IMPLIED WARRANTIES OF MERCHANTABILITY, SATISFACTORY QUALITY, + * FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT OF THIRD PARTY + * RIGHTS, AND WARRANTIES (IF ANY) ARISING FROM A COURSE OF DEALING, + * USAGE, OR TRADE PRACTICE. ELECTRONIC ARTS DOES NOT WARRANT AGAINST + * INTERFERENCE WITH YOUR ENJOYMENT OF THE PROGRAM; THAT THE PROGRAM WILL + * MEET YOUR REQUIREMENTS; THAT OPERATION OF THE PROGRAM WILL BE + * UNINTERRUPTED OR ERROR-FREE, OR THAT THE PROGRAM WILL BE COMPATIBLE + * WITH THIRD PARTY SOFTWARE OR THAT ANY ERRORS IN THE PROGRAM WILL BE + * CORRECTED. NO ORAL OR WRITTEN ADVICE PROVIDED BY ELECTRONIC ARTS OR + * ANY AUTHORIZED REPRESENTATIVE SHALL CREATE A WARRANTY. SOME + * JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF OR LIMITATIONS ON IMPLIED + * WARRANTIES OR THE LIMITATIONS ON THE APPLICABLE STATUTORY RIGHTS OF A + * CONSUMER, SO SOME OR ALL OF THE ABOVE EXCLUSIONS AND LIMITATIONS MAY + * NOT APPLY TO YOU. + */ + +/** + * @file allocate.cpp + * @brief Implementation of map array initialization and destruction + * in Micropolis. + * + * This source file contains functions for initializing and destroying + * map arrays in the Micropolis game engine. It includes the + * allocation of memory for various map-related data structures such + * as the main city map, history data, and various density maps. The + * functions handle the setup of necessary resources when the game + * starts and ensure proper cleanup of these resources upon + * termination, maintaining efficient memory management throughout the + * lifecycle of the game. + */ + + +//////////////////////////////////////////////////////////////////////// + + +#include "micropolis.h" + + +//////////////////////////////////////////////////////////////////////// + +/** Allocate and initialize arrays for the maps */ +void Micropolis::initMapArrays() +{ + short i; + + if (!mapBase) { + mapBase = (unsigned short *)newPtr( + sizeof(unsigned short) * + WORLD_W * WORLD_H); + } + + for (i = 0; i < WORLD_W; i++) { + map[i] = (unsigned short *)(mapBase + (i * WORLD_H)); + } + + resHist = (short *)newPtr(HISTORY_LENGTH); + comHist = (short *)newPtr(HISTORY_LENGTH); + indHist = (short *)newPtr(HISTORY_LENGTH); + moneyHist = (short *)newPtr(HISTORY_LENGTH); + pollutionHist = (short *)newPtr(HISTORY_LENGTH); + crimeHist = (short *)newPtr(HISTORY_LENGTH); + miscHist = (short *)newPtr(MISC_HISTORY_LENGTH); +} + + +/** Free all map arrays */ +void Micropolis::destroyMapArrays() +{ + + if (mapBase != NULL) { + freePtr(mapBase); + mapBase = NULL; + } + + memset(map, 0, sizeof(short *) * WORLD_W); + + populationDensityMap.clear(); + trafficDensityMap.clear(); + pollutionDensityMap.clear(); + landValueMap.clear(); + crimeRateMap.clear(); + + tempMap1.clear(); + tempMap2.clear(); + tempMap3.clear(); + + terrainDensityMap.clear(); + + if (resHist != NULL) { + freePtr(resHist); + resHist = NULL; + } + + if (comHist != NULL) { + freePtr(comHist); + comHist = NULL; + } + + if (indHist != NULL) { + freePtr(indHist); + indHist = NULL; + } + + if (moneyHist != NULL) { + freePtr(moneyHist); + moneyHist = NULL; + } + + if (pollutionHist != NULL) { + freePtr(pollutionHist); + pollutionHist = NULL; + } + + if (crimeHist != NULL) { + freePtr(crimeHist); + crimeHist = NULL; + } + + if (miscHist != NULL) { + freePtr(miscHist); + miscHist = NULL; + } + +} + + +//////////////////////////////////////////////////////////////////////// diff --git a/core/animate.cpp b/core/animate.cpp new file mode 100644 index 0000000..684308b --- /dev/null +++ b/core/animate.cpp @@ -0,0 +1,244 @@ +/* animate.cpp + * + * Micropolis, Unix Version. This game was released for the Unix platform + * in or about 1990 and has been modified for inclusion in the One Laptop + * Per Child program. Copyright (C) 1989 - 2007 Electronic Arts Inc. If + * you need assistance with this program, you may contact: + * http://wiki.laptop.org/go/Micropolis or email micropolis@laptop.org. + * + * This program 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. + * + * This program 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 this program. If + * not, see . + * + * ADDITIONAL TERMS per GNU GPL Section 7 + * + * No trademark or publicity rights are granted. This license does NOT + * give you any right, title or interest in the trademark SimCity or any + * other Electronic Arts trademark. You may not distribute any + * modification of this program using the trademark SimCity or claim any + * affliation or association with Electronic Arts Inc. or its employees. + * + * Any propagation or conveyance of this program must include this + * copyright notice and these terms. + * + * If you convey this program (or any modifications of it) and assume + * contractual liability for the program to recipients of it, you agree + * to indemnify Electronic Arts for any liability that those contractual + * assumptions impose on Electronic Arts. + * + * You may not misrepresent the origins of this program; modified + * versions of the program must be marked as such and not identified as + * the original program. + * + * This disclaimer supplements the one included in the General Public + * License. TO THE FULLEST EXTENT PERMISSIBLE UNDER APPLICABLE LAW, THIS + * PROGRAM IS PROVIDED TO YOU "AS IS," WITH ALL FAULTS, WITHOUT WARRANTY + * OF ANY KIND, AND YOUR USE IS AT YOUR SOLE RISK. THE ENTIRE RISK OF + * SATISFACTORY QUALITY AND PERFORMANCE RESIDES WITH YOU. ELECTRONIC ARTS + * DISCLAIMS ANY AND ALL EXPRESS, IMPLIED OR STATUTORY WARRANTIES, + * INCLUDING IMPLIED WARRANTIES OF MERCHANTABILITY, SATISFACTORY QUALITY, + * FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT OF THIRD PARTY + * RIGHTS, AND WARRANTIES (IF ANY) ARISING FROM A COURSE OF DEALING, + * USAGE, OR TRADE PRACTICE. ELECTRONIC ARTS DOES NOT WARRANT AGAINST + * INTERFERENCE WITH YOUR ENJOYMENT OF THE PROGRAM; THAT THE PROGRAM WILL + * MEET YOUR REQUIREMENTS; THAT OPERATION OF THE PROGRAM WILL BE + * UNINTERRUPTED OR ERROR-FREE, OR THAT THE PROGRAM WILL BE COMPATIBLE + * WITH THIRD PARTY SOFTWARE OR THAT ANY ERRORS IN THE PROGRAM WILL BE + * CORRECTED. NO ORAL OR WRITTEN ADVICE PROVIDED BY ELECTRONIC ARTS OR + * ANY AUTHORIZED REPRESENTATIVE SHALL CREATE A WARRANTY. SOME + * JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF OR LIMITATIONS ON IMPLIED + * WARRANTIES OR THE LIMITATIONS ON THE APPLICABLE STATUTORY RIGHTS OF A + * CONSUMER, SO SOME OR ALL OF THE ABOVE EXCLUSIONS AND LIMITATIONS MAY + * NOT APPLY TO YOU. + */ + +/** + * @file animate.cpp + * @brief Animation routines for the Micropolis game engine. + * + * This file contains functions responsible for animating various + * tiles within the Micropolis game. It includes a mapping of each + * tile to its next animated state, and functions that iterate through + * the game world's tiles to update their animation states. The + * animation process is crucial for enhancing the game's visual appeal + * and dynamic feel by animating elements like water, fire, and smoke. + */ + +//////////////////////////////////////////////////////////////////////// + + +#include "micropolis.h" + + +//////////////////////////////////////////////////////////////////////// + +/** + * Tile animation table. For each tile, it states the next tile to display. + * + * @bug Tile 620 points to 852. That should be tile 621. + * + * @todo Generate the table below from the animation sequences file + * doc/AnimationSequences.txt and the doc/genAnimationTable.py + * program + */ +static short animatedTiles[TILE_COUNT] = { + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, + /* Fire */ + 57, 58, 59, 60, 61, 62, 63, 56, + /* No Traffic */ + 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + /* Light Traffic */ + 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, + 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, + 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, + /* Heavy Traffic */ + 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, + 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, + 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, + 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, + /* Wires & Rails */ + 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, + 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, + /* Residential */ + 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, + 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, + 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, + 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, + 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, + 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, + 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, + 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, + 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, + 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, + 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, + 416, 417, 418, 419, 420, 421, 422, + /* Commercial */ + 423, 424, 425, 426, 427, 428, 429, 430, 431, + 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, + 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, + 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, + 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, + 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, + 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, + 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, + 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, + 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, + 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591, + 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, + 608, 609, 610, 611, + /* Industrial */ + 612, 613, 614, 615, 616, 617, 618, 619, 620, 852, 622, 623, + 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, + 640, 884, 642, 643, 888, 645, 646, 647, 648, 892, 896, 651, 652, 653, 654, 655, + 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, + 672, 673, 674, 675, 900, 904, 678, 679, 680, 681, 682, 683, 684, 685, 908, 687, + 688, 912, 690, 691, 692, + /* SeaPort */ + 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, + 704, 705, 706, 707, 708, + /* AirPort */ + // 832 was previous value of 711, to start radar + // animation, but now we break the link and the + // simulator switches the tiles. + 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, + 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735, + 736, 737, 738, 739, 740, 741, 742, 743, 744, + /* Coal power */ + 745, 746, 916, 920, 749, 750, 924, + 928, 753, 754, 755, 756, 757, 758, 759, 760, + /* Fire Dept */ + 761, 762, 763, 764, 765, 766, 767, + 768, 769, 770, 771, 772, 773, 774, 775, 776, 777, 778, + /* Stadium */ + 779, 780, 781, 782, 783, + 784, 785, 786, 787, 788, 789, 790, 791, 792, 793, 794, + /* Stadium Anims */ + 795, 796, 797, 798, 799, + 800, 801, 802, 803, 804, 805, 806, 807, 808, 809, 810, + /* Nuclear Power */ + 811, 812, 813, 814, 815, + 816, 817, 818, 819, 952, 821, 822, 823, 824, 825, 826, + /* Power out + Bridges */ + 827, 828, 829, 830, 831, + /* Radar dish */ + 833, 834, 835, 836, 837, 838, 839, 832, + /* Fountain / Flag */ + 841, 842, 843, 840, 845, 846, 847, 848, + 849, 850, 851, 844, 853, 854, 855, 856, 857, 858, 859, 852, + /* zone destruct & rubblize */ + 861, 862, 863, 864, + 865, 866, 867, 867, + /* totally unsure */ + 868, 869, 870, 871, 872, 873, 874, 875, 876, 877, 878, 879, + 880, 881, 882, 883, + /* Smoke stacks */ + 885, 886, 887, 884, 889, 890, 891, 888, 893, 894, 895, 892, + 897, 898, 899, 896, 901, 902, 903, 900, 905, 906, 907, 904, 909, 910, 911, 908, + 913, 914, 915, 912, 917, 918, 919, 916, 921, 922, 923, 920, 925, 926, 927, 924, + 929, 930, 931, 928, + /* Stadium Playfield */ + 933, 934, 935, 936, 937, 938, 939, 932, 941, 942, 943, 944, + 945, 946, 947, 940, + /* Bridge up chars */ + 948, 949, 950, 951, + /* Nuclear swirl */ + 953, 954, 955, 952, + /* Churches */ + 956, 957, 958, 959, + 960, 961, 962, 963, 964, 965, 966, 967, 968, 969, 970, 971, 972, 973, 974, 975, + 976, 977, 978, 979, 980, 981, 982, 983, 984, 985, 986, 987, 988, 989, 990, 991, + 992, 993, 994, 995, 996, 997, 998, 999, 1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, + 1008, 1009, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019, 1020, 1021, 1022, 1023, +}; + + +//////////////////////////////////////////////////////////////////////// + + +/* comefrom: moveWorld doEditWindow scoreDoer doMapInFront graphDoer */ +void Micropolis::animateTiles() +{ + unsigned short tilevalue, tileflags; + unsigned short *tMapPtr; + int i; + + /* Animate whole world */ + tMapPtr = (unsigned short *)&(map[0][0]); + + for (i = WORLD_W * WORLD_H; i > 0; i--) { + tilevalue = (*tMapPtr); + if (tilevalue & ANIMBIT) { + tileflags = tilevalue & ALLBITS; + tilevalue &= LOMASK; + tilevalue = animatedTiles[tilevalue]; + tilevalue |= tileflags; + (*tMapPtr) = tilevalue; + } + tMapPtr++; + } +} + + +int Micropolis::getNextAnimatedTile(int index) +{ + if ((index < 0) || (index >= TILE_COUNT)) { + return -1; + } + + return animatedTiles[index]; +} + + +//////////////////////////////////////////////////////////////////////// diff --git a/core/budget.cpp b/core/budget.cpp new file mode 100644 index 0000000..aaaa0cf --- /dev/null +++ b/core/budget.cpp @@ -0,0 +1,352 @@ +/* budget.cpp + * + * Micropolis, Unix Version. This game was released for the Unix platform + * in or about 1990 and has been modified for inclusion in the One Laptop + * Per Child program. Copyright (C) 1989 - 2007 Electronic Arts Inc. If + * you need assistance with this program, you may contact: + * http://wiki.laptop.org/go/Micropolis or email micropolis@laptop.org. + * + * This program 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. + * + * This program 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 this program. If + * not, see . + * + * ADDITIONAL TERMS per GNU GPL Section 7 + * + * No trademark or publicity rights are granted. This license does NOT + * give you any right, title or interest in the trademark SimCity or any + * other Electronic Arts trademark. You may not distribute any + * modification of this program using the trademark SimCity or claim any + * affliation or association with Electronic Arts Inc. or its employees. + * + * Any propagation or conveyance of this program must include this + * copyright notice and these terms. + * + * If you convey this program (or any modifications of it) and assume + * contractual liability for the program to recipients of it, you agree + * to indemnify Electronic Arts for any liability that those contractual + * assumptions impose on Electronic Arts. + * + * You may not misrepresent the origins of this program; modified + * versions of the program must be marked as such and not identified as + * the original program. + * + * This disclaimer supplements the one included in the General Public + * License. TO THE FULLEST EXTENT PERMISSIBLE UNDER APPLICABLE LAW, THIS + * PROGRAM IS PROVIDED TO YOU "AS IS," WITH ALL FAULTS, WITHOUT WARRANTY + * OF ANY KIND, AND YOUR USE IS AT YOUR SOLE RISK. THE ENTIRE RISK OF + * SATISFACTORY QUALITY AND PERFORMANCE RESIDES WITH YOU. ELECTRONIC ARTS + * DISCLAIMS ANY AND ALL EXPRESS, IMPLIED OR STATUTORY WARRANTIES, + * INCLUDING IMPLIED WARRANTIES OF MERCHANTABILITY, SATISFACTORY QUALITY, + * FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT OF THIRD PARTY + * RIGHTS, AND WARRANTIES (IF ANY) ARISING FROM A COURSE OF DEALING, + * USAGE, OR TRADE PRACTICE. ELECTRONIC ARTS DOES NOT WARRANT AGAINST + * INTERFERENCE WITH YOUR ENJOYMENT OF THE PROGRAM; THAT THE PROGRAM WILL + * MEET YOUR REQUIREMENTS; THAT OPERATION OF THE PROGRAM WILL BE + * UNINTERRUPTED OR ERROR-FREE, OR THAT THE PROGRAM WILL BE COMPATIBLE + * WITH THIRD PARTY SOFTWARE OR THAT ANY ERRORS IN THE PROGRAM WILL BE + * CORRECTED. NO ORAL OR WRITTEN ADVICE PROVIDED BY ELECTRONIC ARTS OR + * ANY AUTHORIZED REPRESENTATIVE SHALL CREATE A WARRANTY. SOME + * JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF OR LIMITATIONS ON IMPLIED + * WARRANTIES OR THE LIMITATIONS ON THE APPLICABLE STATUTORY RIGHTS OF A + * CONSUMER, SO SOME OR ALL OF THE ABOVE EXCLUSIONS AND LIMITATIONS MAY + * NOT APPLY TO YOU. + */ + +/** + * @file budget.cpp + * @brief Budget management functions for the Micropolis game engine. + * + * This file encompasses the functions responsible for managing the + * game's budget. It includes initializing funding levels, handling + * budget windows, updating budget allocations based on available + * funds, and setting city tax rates. The budget management is vital + * for the simulation aspect of the game, influencing the city's + * development and the player's strategy. + */ + + +//////////////////////////////////////////////////////////////////////// + + +#include "micropolis.h" + + +//////////////////////////////////////////////////////////////////////// + + +void Micropolis::initFundingLevel() +{ + firePercent = 1.0; + fireValue = 0; + policePercent = 1.0; + policeValue = 0; + roadPercent = 1.0; + roadValue = 0; + mustDrawBudget = 1; +} + +/** Game decided to show the budget window */ +void Micropolis::doBudget() +{ + doBudgetNow(false); +} + + +/** User queried the budget window */ +void Micropolis::doBudgetFromMenu() +{ + doBudgetNow(true); +} + + +/** + * Handle budget window. + * @param fromMenu User requested the budget window. + * @todo Simplify this code. Instead of this nested mess, make a sequence of + * assigning funds to road, fire, and police. + */ +void Micropolis::doBudgetNow(bool fromMenu) +{ + Quad fireInt = (int)(fireFund * firePercent); + Quad policeInt = (int)(policeFund * policePercent); + Quad roadInt = (int)(roadFund * roadPercent); + + Quad total = fireInt + policeInt + roadInt; + + Quad yumDuckets = taxFund + totalFunds; + + if (yumDuckets > total) { + + // Enough yumDuckets to fully fund fire, police and road. + + fireValue = fireInt; + policeValue = policeInt; + roadValue = roadInt; + + /// @todo Why are we not subtracting from yumDuckets what we + /// spend, like the code below is doing? + + } else if (total > 0) { + + assert(yumDuckets <= total); + + // Not enough yumDuckets to fund everything. + // First spend on roads, then on fire, then on police. + + if (yumDuckets > roadInt) { + + // Enough yumDuckets to fully fund roads. + + roadValue = roadInt; + yumDuckets -= roadInt; + + if (yumDuckets > fireInt) { + + // Enough yumDuckets to fully fund fire. + + fireValue = fireInt; + yumDuckets -= fireInt; + + if (yumDuckets > policeInt) { + + // Enough yumDuckets to fully fund police. + // Hey what are we doing here? Should never get here. + // We tested for yumDuckets > total above + // (where total = fireInt + policeInt + roadInt), + // so this should never happen. + + policeValue = policeInt; + yumDuckets -= policeInt; + + } else { + + // Fuly funded roads and fire. + // Partially fund police. + + policeValue = yumDuckets; + + if (yumDuckets > 0) { + + // Scale back police percentage to available cash. + + policePercent = ((float)yumDuckets) / ((float)policeFund); + + } else { + + // Exactly nothing left, so scale back police percentage to zero. + + policePercent = 0.0; + + } + + } + + } else { + + // Not enough yumDuckets to fully fund fire. + + fireValue = yumDuckets; + + // No police after funding roads and fire. + + policeValue = 0; + policePercent = 0.0; + + if (yumDuckets > 0) { + + // Scale back fire percentage to available cash. + + firePercent = + ((float)yumDuckets) / ((float)fireFund); + + } else { + + // Exactly nothing left, so scale back fire percentage to zero. + + firePercent = 0.0; + + } + + } + + } else { + + // Not enough yumDuckets to fully fund roads. + + roadValue = yumDuckets; + + // No fire or police after funding roads. + + fireValue = 0; + policeValue = 0; + firePercent = 0.0; + policePercent = 0.0; + + if (yumDuckets > 0) { + + // Scale back road percentage to available cash. + + roadPercent = ((float)yumDuckets) / ((float)roadFund); + + } else { + + // Exactly nothing left, so scale back road percentage to zero. + + roadPercent = 0.0; + + } + + } + + } else { + + assert(yumDuckets == total); + assert(total == 0); + + // Zero funding, so no values but full percentages. + + fireValue = 0; + policeValue = 0; + roadValue = 0; + firePercent = 1.0; + policePercent = 1.0; + roadPercent = 1.0; + + } + +noMoney: + + if (!autoBudget || fromMenu) { + + // FIXME: This might have blocked on the Mac, but now it's asynchronous. + // Make sure the stuff we do just afterwards is intended to be done immediately + // and is not supposed to wait until after the budget dialog is dismissed. + // Otherwise don't do it after this and arrange for it to happen when the + // modal budget dialog is dismissed. + showBudgetWindowAndStartWaiting(); + + // FIXME: Only do this AFTER the budget window is accepted. + + if (!fromMenu) { + + fireSpend = fireValue; + policeSpend = policeValue; + roadSpend = roadValue; + + total = fireSpend + policeSpend + roadSpend; + + Quad moreDough = (Quad)(taxFund - total); + spend(-moreDough); + + } + + mustDrawBudget = 1; + doUpdateHeads(); + + } else { /* autoBudget & !fromMenu */ + + // FIXME: Not sure yumDuckets is the right value here. It gets the + // amount spent subtracted from it above in some cases, but not if + // we are fully funded. I think we want to use the original value + // of yumDuckets, which is taxFund + totalFunds. + + if (yumDuckets > total) { + + Quad moreDough = (Quad)(taxFund - total); + spend(-moreDough); + + fireSpend = fireFund; + policeSpend = policeFund; + roadSpend = roadFund; + + mustDrawBudget = 1; + doUpdateHeads(); + + } else { + + setAutoBudget(false); /* force autobudget */ + mustUpdateOptions = true; + sendMessage(MESSAGE_NO_MONEY, NOWHERE, NOWHERE, false, true); + goto noMoney; + + } + + } + +} + + +void Micropolis::updateBudget() +{ + /// The scripting language should pull these raw values out + /// and format them, instead of the callback pushing them out. + + if (mustDrawBudget) { + callback->updateBudget(this, callbackVal); + mustDrawBudget = 0; + } +} + + +void Micropolis::showBudgetWindowAndStartWaiting() +{ + callback->showBudgetAndWait(this, callbackVal); +} + + +void Micropolis::setCityTax(short tax) +{ + cityTax = tax; + callback->updateTaxRate(this, callbackVal, cityTax); +} + + +//////////////////////////////////////////////////////////////////////// diff --git a/core/callback.cpp b/core/callback.cpp new file mode 100644 index 0000000..2b7cc97 --- /dev/null +++ b/core/callback.cpp @@ -0,0 +1,302 @@ +/* callback.cpp + * + * Micropolis, Unix Version. This game was released for the Unix platform + * in or about 1990 and has been modified for inclusion in the One Laptop + * Per Child program. Copyright (C) 1989 - 2007 Electronic Arts Inc. If + * you need assistance with this program, you may contact: + * http://wiki.laptop.org/go/Micropolis or email micropolis@laptop.org. + * + * This program 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. + * + * This program 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 this program. If + * not, see . + * + * ADDITIONAL TERMS per GNU GPL Section 7 + * + * No trademark or publicity rights are granted. This license does NOT + * give you any right, title or interest in the trademark SimCity or any + * other Electronic Arts trademark. You may not distribute any + * modification of this program using the trademark SimCity or claim any + * affliation or association with Electronic Arts Inc. or its employees. + * + * Any propagation or conveyance of this program must include this + * copyright notice and these terms. + * + * If you convey this program (or any modifications of it) and assume + * contractual liability for the program to recipients of it, you agree + * to indemnify Electronic Arts for any liability that those contractual + * assumptions impose on Electronic Arts. + * + * You may not misrepresent the origins of this program; modified + * versions of the program must be marked as such and not identified as + * the original program. + * + * This disclaimer supplements the one included in the General Public + * License. TO THE FULLEST EXTENT PERMISSIBLE UNDER APPLICABLE LAW, THIS + * PROGRAM IS PROVIDED TO YOU "AS IS," WITH ALL FAULTS, WITHOUT WARRANTY + * OF ANY KIND, AND YOUR USE IS AT YOUR SOLE RISK. THE ENTIRE RISK OF + * SATISFACTORY QUALITY AND PERFORMANCE RESIDES WITH YOU. ELECTRONIC ARTS + * DISCLAIMS ANY AND ALL EXPRESS, IMPLIED OR STATUTORY WARRANTIES, + * INCLUDING IMPLIED WARRANTIES OF MERCHANTABILITY, SATISFACTORY QUALITY, + * FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT OF THIRD PARTY + * RIGHTS, AND WARRANTIES (IF ANY) ARISING FROM A COURSE OF DEALING, + * USAGE, OR TRADE PRACTICE. ELECTRONIC ARTS DOES NOT WARRANT AGAINST + * INTERFERENCE WITH YOUR ENJOYMENT OF THE PROGRAM; THAT THE PROGRAM WILL + * MEET YOUR REQUIREMENTS; THAT OPERATION OF THE PROGRAM WILL BE + * UNINTERRUPTED OR ERROR-FREE, OR THAT THE PROGRAM WILL BE COMPATIBLE + * WITH THIRD PARTY SOFTWARE OR THAT ANY ERRORS IN THE PROGRAM WILL BE + * CORRECTED. NO ORAL OR WRITTEN ADVICE PROVIDED BY ELECTRONIC ARTS OR + * ANY AUTHORIZED REPRESENTATIVE SHALL CREATE A WARRANTY. SOME + * JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF OR LIMITATIONS ON IMPLIED + * WARRANTIES OR THE LIMITATIONS ON THE APPLICABLE STATUTORY RIGHTS OF A + * CONSUMER, SO SOME OR ALL OF THE ABOVE EXCLUSIONS AND LIMITATIONS MAY + * NOT APPLY TO YOU. + */ + +/** + * @file callback.cpp + * @brief Implementation of the Callback interface for Micropolis game + * engine. + * + * This file provides the implementation of the Callback class defined + * in callback.h. It includes a series of methods that are called by + * the Micropolis game engine to interact with the user interface. + * These methods include functionalities like logging actions, + * updating game states, and responding to user actions. The use of + * EM_ASM macros indicates direct interaction with JavaScript, typical + * in a web environment using Emscripten. + */ + + +//////////////////////////////////////////////////////////////////////// + + +#include "micropolis.h" +#include + + +ConsoleCallback::~ConsoleCallback() { + EM_ASM_({ + console.log('~ConsoleCallback destructor'); + }); +} + +void ConsoleCallback::autoGoto(Micropolis *micropolis, emscripten::val callbackVal, int x, int y, std::string message) { + EM_ASM_({ + console.log('autoGoto:', 'x:', $0, 'y:', $1, 'message:', UTF8ToString($2)); + }, x, y, message.c_str()); +} + +void ConsoleCallback::didGenerateMap(Micropolis *micropolis, emscripten::val callbackVal, int seed) { + EM_ASM_({ + console.log('didGenerateMap:', 'seed:', $0); + }, seed); +} + +void ConsoleCallback::didLoadCity(Micropolis *micropolis, emscripten::val callbackVal, std::string filename) { + EM_ASM_({ + console.log('didLoadCity:', 'filename:', UTF8ToString($0)); + }, filename.c_str()); +} + +void ConsoleCallback::didLoadScenario(Micropolis *micropolis, emscripten::val callbackVal, std::string name, std::string fname) { + EM_ASM_({ + console.log('didLoadScenario:', 'name:', UTF8ToString($0), 'fname:', UTF8ToString($1)); + }, name.c_str(), fname.c_str()); +} + +void ConsoleCallback::didLoseGame(Micropolis *micropolis, emscripten::val callbackVal) { + EM_ASM_({ + console.log('didLoseGame'); + }); +} + +void ConsoleCallback::didSaveCity(Micropolis *micropolis, emscripten::val callbackVal, std::string filename) { + EM_ASM_({ + console.log('didSaveCity:', 'filename:', UTF8ToString($0)); + }, filename.c_str()); +} + +void ConsoleCallback::didTool(Micropolis *micropolis, emscripten::val callbackVal, std::string name, int x, int y) { + EM_ASM_({ + console.log('didTool:', 'name:', UTF8ToString($0), 'x:', $1, 'y:', $2); + }, name.c_str(), x, y); +} + +void ConsoleCallback::didWinGame(Micropolis *micropolis, emscripten::val callbackVal) { + EM_ASM_({ + console.log('didWinGame'); + }); +} + +void ConsoleCallback::didntLoadCity(Micropolis *micropolis, emscripten::val callbackVal, std::string filename) { + EM_ASM_({ + console.log('didntLoadCity:', 'filename:', UTF8ToString($0)); + }, filename.c_str()); +} + +void ConsoleCallback::didntSaveCity(Micropolis *micropolis, emscripten::val callbackVal, std::string filename) { + EM_ASM_({ + console.log('didntSaveCity:', 'filename:', UTF8ToString($0)); + }, filename.c_str()); +} + +void ConsoleCallback::makeSound(Micropolis *micropolis, emscripten::val callbackVal, std::string channel, std::string sound, int x, int y) { + EM_ASM_({ + console.log('makeSound:', 'channel:', UTF8ToString($0), 'sound:', UTF8ToString($1), 'x:', $2, 'y:', $3); + }, channel.c_str(), sound.c_str(), x, y); +} + +void ConsoleCallback::newGame(Micropolis *micropolis, emscripten::val callbackVal) { + EM_ASM_({ + console.log('newGame'); + }); +} + +void ConsoleCallback::saveCityAs(Micropolis *micropolis, emscripten::val callbackVal, std::string filename) { + EM_ASM_({ + console.log('saveCityAs:', 'filename:', UTF8ToString($0)); + }, filename.c_str()); +} + +void ConsoleCallback::sendMessage(Micropolis *micropolis, emscripten::val callbackVal, int messageIndex, int x, int y, bool picture, bool important) { + EM_ASM_({ + console.log('sendMessage:', 'messageIndex:', $0, 'x:', $1, 'y:', $2, 'picture:', $3, 'important:', $4); + }, messageIndex, x, y, picture, important); +} + +void ConsoleCallback::showBudgetAndWait(Micropolis *micropolis, emscripten::val callbackVal) { + EM_ASM_({ + console.log('showBudgetAndWait'); + }); +} + +void ConsoleCallback::showZoneStatus(Micropolis *micropolis, emscripten::val callbackVal, int tileCategoryIndex, int populationDensityIndex, int landValueIndex, int crimeRateIndex, int pollutionIndex, int growthRateIndex, int x, int y) { + EM_ASM_({ + console.log('showZoneStatus:', 'tileCategoryIndex:', $0, 'populationDensityIndex:', $1, 'landValueIndex:', $2, 'crimeRateIndex:', $3, 'pollutionIndex:', $4, 'growthRateIndex:', $5, 'x:', $6, 'y:', $7); + }, tileCategoryIndex, populationDensityIndex, landValueIndex, crimeRateIndex, pollutionIndex, growthRateIndex, x, y); +} + +void ConsoleCallback::simulateRobots(Micropolis *micropolis, emscripten::val callbackVal) { + EM_ASM_({ + console.log('simulateRobots'); + }); +} + +void ConsoleCallback::simulateChurch(Micropolis *micropolis, emscripten::val callbackVal, int posX, int posY, int churchNumber) { + EM_ASM_({ + console.log('simulateChurch:', 'posX:', $0, 'posY:', $1, 'churchNumber:', $2); + }, posX, posY, churchNumber); +} + +void ConsoleCallback::startEarthquake(Micropolis *micropolis, emscripten::val callbackVal, int strength) { + EM_ASM_({ + console.log('startEarthquake:', 'strength:', $0); + }, strength); +} + +void ConsoleCallback::startGame(Micropolis *micropolis, emscripten::val callbackVal) { + EM_ASM_({ + console.log('startGame'); + }); +} + +void ConsoleCallback::startScenario(Micropolis *micropolis, emscripten::val callbackVal, int scenario) { + EM_ASM_({ + console.log('startScenario:', 'scenario:', $0); + }, scenario); +} + +void ConsoleCallback::updateBudget(Micropolis *micropolis, emscripten::val callbackVal) { + EM_ASM_({ + console.log('updateBudget'); + }); +} + +void ConsoleCallback::updateCityName(Micropolis *micropolis, emscripten::val callbackVal, std::string cityName) { + EM_ASM_({ + console.log('updateCityName:', 'cityName:', UTF8ToString($0)); + }, cityName.c_str()); +} + +void ConsoleCallback::updateDate(Micropolis *micropolis, emscripten::val callbackVal, int cityYear, int cityMonth) { + EM_ASM_({ + console.log('updateDate:', 'cityYear:', $0, 'cityMonth:', $1); + }, cityYear, cityMonth); +} + +void ConsoleCallback::updateDemand(Micropolis *micropolis, emscripten::val callbackVal, float r, float c, float i) { + EM_ASM_({ + console.log('updateDemand:', 'r:', $0, 'c:', $1, 'i:', $2); + }, r, c, i); +} + +void ConsoleCallback::updateEvaluation(Micropolis *micropolis, emscripten::val callbackVal) { + EM_ASM({ + console.log('updateEvaluation'); + }); +} + +void ConsoleCallback::updateFunds(Micropolis *micropolis, emscripten::val callbackVal, int totalFunds) { + EM_ASM_({ + console.log('updateFunds:', 'totalFunds:', $0); + }, totalFunds); +} + +void ConsoleCallback::updateGameLevel(Micropolis *micropolis, emscripten::val callbackVal, int gameLevel) { + EM_ASM_({ + console.log('updateGameLevel:', 'gameLevel:', $0); + }, gameLevel); +} + +void ConsoleCallback::updateHistory(Micropolis *micropolis, emscripten::val callbackVal) { + EM_ASM({ + console.log('updateHistory'); + }); +} + +void ConsoleCallback::updateMap(Micropolis *micropolis, emscripten::val callbackVal) { + EM_ASM({ + console.log('updateMap'); + }); +} + +void ConsoleCallback::updateOptions(Micropolis *micropolis, emscripten::val callbackVal) { + EM_ASM({ + console.log('updateOptions'); + }); +} + +void ConsoleCallback::updatePasses(Micropolis *micropolis, emscripten::val callbackVal, int passes) { + EM_ASM_({ + console.log('updatePasses:', 'passes:', $0); + }, passes); +} + +void ConsoleCallback::updatePaused(Micropolis *micropolis, emscripten::val callbackVal, bool simPaused) { + EM_ASM_({ + console.log('updatePaused:', 'simPaused:', $0); + }, simPaused); +} + +void ConsoleCallback::updateSpeed(Micropolis *micropolis, emscripten::val callbackVal, int speed) { + EM_ASM_({ + console.log('updateSpeed:', 'speed:', $0); + }, speed); +} + +void ConsoleCallback::updateTaxRate(Micropolis *micropolis, emscripten::val callbackVal, int cityTax) { + EM_ASM_({ + console.log('updateTaxRate:', 'cityTax:', $0); + }, cityTax); +} + + +//////////////////////////////////////////////////////////////////////// diff --git a/core/callback.h b/core/callback.h new file mode 100644 index 0000000..87c6900 --- /dev/null +++ b/core/callback.h @@ -0,0 +1,177 @@ +/* callback.h + * + * Micropolis, Unix Version. This game was released for the Unix platform + * in or about 1990 and has been modified for inclusion in the One Laptop + * Per Child program. Copyright (C) 1989 - 2007 Electronic Arts Inc. If + * you need assistance with this program, you may contact: + * http://wiki.laptop.org/go/Micropolis or email micropolis@laptop.org. + * + * This program 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. + * + * This program 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 this program. If + * not, see . + * + * ADDITIONAL TERMS per GNU GPL Section 7 + * + * No trademark or publicity rights are granted. This license does NOT + * give you any right, title or interest in the trademark SimCity or any + * other Electronic Arts trademark. You may not distribute any + * modification of this program using the trademark SimCity or claim any + * affliation or association with Electronic Arts Inc. or its employees. + * + * Any propagation or conveyance of this program must include this + * copyright notice and these terms. + * + * If you convey this program (or any modifications of it) and assume + * contractual liability for the program to recipients of it, you agree + * to indemnify Electronic Arts for any liability that those contractual + * assumptions impose on Electronic Arts. + * + * You may not misrepresent the origins of this program; modified + * versions of the program must be marked as such and not identified as + * the original program. + * + * This disclaimer supplements the one included in the General Public + * License. TO THE FULLEST EXTENT PERMISSIBLE UNDER APPLICABLE LAW, THIS + * PROGRAM IS PROVIDED TO YOU "AS IS," WITH ALL FAULTS, WITHOUT WARRANTY + * OF ANY KIND, AND YOUR USE IS AT YOUR SOLE RISK. THE ENTIRE RISK OF + * SATISFACTORY QUALITY AND PERFORMANCE RESIDES WITH YOU. ELECTRONIC ARTS + * DISCLAIMS ANY AND ALL EXPRESS, IMPLIED OR STATUTORY WARRANTIES, + * INCLUDING IMPLIED WARRANTIES OF MERCHANTABILITY, SATISFACTORY QUALITY, + * FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT OF THIRD PARTY + * RIGHTS, AND WARRANTIES (IF ANY) ARISING FROM A COURSE OF DEALING, + * USAGE, OR TRADE PRACTICE. ELECTRONIC ARTS DOES NOT WARRANT AGAINST + * INTERFERENCE WITH YOUR ENJOYMENT OF THE PROGRAM; THAT THE PROGRAM WILL + * MEET YOUR REQUIREMENTS; THAT OPERATION OF THE PROGRAM WILL BE + * UNINTERRUPTED OR ERROR-FREE, OR THAT THE PROGRAM WILL BE COMPATIBLE + * WITH THIRD PARTY SOFTWARE OR THAT ANY ERRORS IN THE PROGRAM WILL BE + * CORRECTED. NO ORAL OR WRITTEN ADVICE PROVIDED BY ELECTRONIC ARTS OR + * ANY AUTHORIZED REPRESENTATIVE SHALL CREATE A WARRANTY. SOME + * JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF OR LIMITATIONS ON IMPLIED + * WARRANTIES OR THE LIMITATIONS ON THE APPLICABLE STATUTORY RIGHTS OF A + * CONSUMER, SO SOME OR ALL OF THE ABOVE EXCLUSIONS AND LIMITATIONS MAY + * NOT APPLY TO YOU. + */ + +/** + * @file callback.h + * @brief Interface for callbacks in the Micropolis game engine. + * + * This file defines the Callback class, which serves as an interface + * for various callbacks used in the Micropolis game engine. These + * callbacks cover a wide range of functionalities including UI + * updates, game state changes, sound effects, simulation events, and + * more. The methods in this class are virtual and intended to be + * implemented by the game's frontend to interact with the user + * interface and handle game events. + */ + + +#ifndef _H_CALLBACK +#define _H_CALLBACK + + +//////////////////////////////////////////////////////////////////////// + + +class Micropolis; + + +class Callback { + +public: + + virtual ~Callback() {} + virtual void autoGoto(Micropolis *micropolis, emscripten::val callbackVal, int x, int y, std::string message) = 0; + virtual void didGenerateMap(Micropolis *micropolis, emscripten::val callbackVal, int seed) = 0; + virtual void didLoadCity(Micropolis *micropolis, emscripten::val callbackVal, std::string filename) = 0; + virtual void didLoadScenario(Micropolis *micropolis, emscripten::val callbackVals, std::string name, std::string fname) = 0; + virtual void didLoseGame(Micropolis *micropolis, emscripten::val callbackVal) = 0; + virtual void didSaveCity(Micropolis *micropolis, emscripten::val callbackVal, std::string filename) = 0; + virtual void didTool(Micropolis *micropolis, emscripten::val callbackVal, std::string name, int x, int y) = 0; + virtual void didWinGame(Micropolis *micropolis, emscripten::val callbackVal) = 0; + virtual void didntLoadCity(Micropolis *micropolis, emscripten::val callbackVal, std::string filename) = 0; + virtual void didntSaveCity(Micropolis *micropolis, emscripten::val callbackVal, std::string filename) = 0; + virtual void makeSound(Micropolis *micropolis, emscripten::val callbackVal, std::string channel, std::string sound, int x, int y) = 0; + virtual void newGame(Micropolis *micropolis, emscripten::val callbackVal) = 0; + virtual void saveCityAs(Micropolis *micropolis, emscripten::val callbackVal, std::string filename) = 0; + virtual void sendMessage(Micropolis *micropolis, emscripten::val callbackVal, int messageIndex, int x, int y, bool picture, bool important) = 0; + virtual void showBudgetAndWait(Micropolis *micropolis, emscripten::val callbackVal) = 0; + virtual void showZoneStatus(Micropolis *micropolis, emscripten::val callbackVal, int tileCategoryIndex, int populationDensityIndex, int landValueIndex, int crimeRateIndex, int pollutionIndex, int growthRateIndex, int x, int y) = 0; + virtual void simulateRobots(Micropolis *micropolis, emscripten::val callbackVal) = 0; + virtual void simulateChurch(Micropolis *micropolis, emscripten::val callbackVal, int posX, int posY, int churchNumber) = 0; + virtual void startEarthquake(Micropolis *micropolis, emscripten::val callbackVal, int strength) = 0; + virtual void startGame(Micropolis *micropolis, emscripten::val callbackVal) = 0; + virtual void startScenario(Micropolis *micropolis, emscripten::val callbackVal, int scenario) = 0; + virtual void updateBudget(Micropolis *micropolis, emscripten::val callbackVal) = 0; + virtual void updateCityName(Micropolis *micropolis, emscripten::val callbackVal, std::string cityName) = 0; + virtual void updateDate(Micropolis *micropolis, emscripten::val callbackVal, int cityYear, int cityMonth) = 0; + virtual void updateDemand(Micropolis *micropolis, emscripten::val callbackVal, float r, float c, float i) = 0; + virtual void updateEvaluation(Micropolis *micropolis, emscripten::val callbackVal) = 0; + virtual void updateFunds(Micropolis *micropolis, emscripten::val callbackVal, int totalFunds) = 0; + virtual void updateGameLevel(Micropolis *micropolis, emscripten::val callbackVal, int gameLevel) = 0; + virtual void updateHistory(Micropolis *micropolis, emscripten::val callbackVal) = 0; + virtual void updateMap(Micropolis *micropolis, emscripten::val callbackVal) = 0; + virtual void updateOptions(Micropolis *micropolis, emscripten::val callbackVal) = 0; + virtual void updatePasses(Micropolis *micropolis, emscripten::val callbackVal, int passes) = 0; + virtual void updatePaused(Micropolis *micropolis, emscripten::val callbackVal, bool simPaused) = 0; + virtual void updateSpeed(Micropolis *micropolis, emscripten::val callbackVal, int speed) = 0; + virtual void updateTaxRate(Micropolis *micropolis, emscripten::val callbackVal, int cityTax) = 0; + +}; + + +class ConsoleCallback : public Callback { + +public: + + virtual ~ConsoleCallback(); + virtual void autoGoto(Micropolis *micropolis, emscripten::val callbackVal, int x, int y, std::string message) override; + virtual void didGenerateMap(Micropolis *micropolis, emscripten::val callbackVal, int seed) override; + virtual void didLoadCity(Micropolis *micropolis, emscripten::val callbackVal, std::string filename) override; + virtual void didLoadScenario(Micropolis *micropolis, emscripten::val callbackVal, std::string name, std::string fname) override; + virtual void didLoseGame(Micropolis *micropolis, emscripten::val callbackVal) override; + virtual void didSaveCity(Micropolis *micropolis, emscripten::val callbackVal, std::string filename) override; + virtual void didTool(Micropolis *micropolis, emscripten::val callbackVal, std::string name, int x, int y) override; + virtual void didWinGame(Micropolis *micropolis, emscripten::val callbackVal) override; + virtual void didntLoadCity(Micropolis *micropolis, emscripten::val callbackVal, std::string filename) override; + virtual void didntSaveCity(Micropolis *micropolis, emscripten::val callbackVal, std::string filename) override; + virtual void makeSound(Micropolis *micropolis, emscripten::val callbackVal, std::string channel, std::string sound, int x, int y) override; + virtual void newGame(Micropolis *micropolis, emscripten::val callbackVal) override; + virtual void saveCityAs(Micropolis *micropolis, emscripten::val callbackVal, std::string filename) override; + virtual void sendMessage(Micropolis *micropolis, emscripten::val callbackVal, int messageIndex, int x, int y, bool picture, bool important) override; + virtual void showBudgetAndWait(Micropolis *micropolis, emscripten::val callbackVal) override; + virtual void showZoneStatus(Micropolis *micropolis, emscripten::val callbackVal, int tileCategoryIndex, int populationDensityIndex, int landValueIndex, int crimeRateIndex, int pollutionIndex, int growthRateIndex, int x, int y) override; + virtual void simulateRobots(Micropolis *micropolis, emscripten::val callbackVal) override; + virtual void simulateChurch(Micropolis *micropolis, emscripten::val callbackVal, int posX, int posY, int churchNumber) override; + virtual void startEarthquake(Micropolis *micropolis, emscripten::val callbackVal, int strength) override; + virtual void startGame(Micropolis *micropolis, emscripten::val callbackVal) override; + virtual void startScenario(Micropolis *micropolis, emscripten::val callbackVal, int scenario) override; + virtual void updateBudget(Micropolis *micropolis, emscripten::val callbackVal) override; + virtual void updateCityName(Micropolis *micropolis, emscripten::val callbackVal, std::string cityName) override; + virtual void updateDate(Micropolis *micropolis, emscripten::val callbackVal, int cityYear, int cityMonth) override; + virtual void updateDemand(Micropolis *micropolis, emscripten::val callbackVal, float r, float c, float i) override; + virtual void updateEvaluation(Micropolis *micropolis, emscripten::val callbackVal) override; + virtual void updateFunds(Micropolis *micropolis, emscripten::val callbackVal, int totalFunds) override; + virtual void updateGameLevel(Micropolis *micropolis, emscripten::val callbackVal, int gameLevel) override; + virtual void updateHistory(Micropolis *micropolis, emscripten::val callbackVal) override; + virtual void updateMap(Micropolis *micropolis, emscripten::val callbackVal) override; + virtual void updateOptions(Micropolis *micropolis, emscripten::val callbackVal) override; + virtual void updatePasses(Micropolis *micropolis, emscripten::val callbackVal, int passes) override; + virtual void updatePaused(Micropolis *micropolis, emscripten::val callbackVal, bool simPaused) override; + virtual void updateSpeed(Micropolis *micropolis, emscripten::val callbackVal, int speed) override; + virtual void updateTaxRate(Micropolis *micropolis, emscripten::val callbackVal, int cityTax) override; +}; + + +//////////////////////////////////////////////////////////////////////// + + +#endif diff --git a/core/connect.cpp b/core/connect.cpp new file mode 100644 index 0000000..521a448 --- /dev/null +++ b/core/connect.cpp @@ -0,0 +1,745 @@ +/* connect.cpp + * + * Micropolis, Unix Version. This game was released for the Unix platform + * in or about 1990 and has been modified for inclusion in the One Laptop + * Per Child program. Copyright (C) 1989 - 2007 Electronic Arts Inc. If + * you need assistance with this program, you may contact: + * http://wiki.laptop.org/go/Micropolis or email micropolis@laptop.org. + * + * This program 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. + * + * This program 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 this program. If + * not, see . + * + * ADDITIONAL TERMS per GNU GPL Section 7 + * + * No trademark or publicity rights are granted. This license does NOT + * give you any right, title or interest in the trademark SimCity or any + * other Electronic Arts trademark. You may not distribute any + * modification of this program using the trademark SimCity or claim any + * affliation or association with Electronic Arts Inc. or its employees. + * + * Any propagation or conveyance of this program must include this + * copyright notice and these terms. + * + * If you convey this program (or any modifications of it) and assume + * contractual liability for the program to recipients of it, you agree + * to indemnify Electronic Arts for any liability that those contractual + * assumptions impose on Electronic Arts. + * + * You may not misrepresent the origins of this program; modified + * versions of the program must be marked as such and not identified as + * the original program. + * + * This disclaimer supplements the one included in the General Public + * License. TO THE FULLEST EXTENT PERMISSIBLE UNDER APPLICABLE LAW, THIS + * PROGRAM IS PROVIDED TO YOU "AS IS," WITH ALL FAULTS, WITHOUT WARRANTY + * OF ANY KIND, AND YOUR USE IS AT YOUR SOLE RISK. THE ENTIRE RISK OF + * SATISFACTORY QUALITY AND PERFORMANCE RESIDES WITH YOU. ELECTRONIC ARTS + * DISCLAIMS ANY AND ALL EXPRESS, IMPLIED OR STATUTORY WARRANTIES, + * INCLUDING IMPLIED WARRANTIES OF MERCHANTABILITY, SATISFACTORY QUALITY, + * FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT OF THIRD PARTY + * RIGHTS, AND WARRANTIES (IF ANY) ARISING FROM A COURSE OF DEALING, + * USAGE, OR TRADE PRACTICE. ELECTRONIC ARTS DOES NOT WARRANT AGAINST + * INTERFERENCE WITH YOUR ENJOYMENT OF THE PROGRAM; THAT THE PROGRAM WILL + * MEET YOUR REQUIREMENTS; THAT OPERATION OF THE PROGRAM WILL BE + * UNINTERRUPTED OR ERROR-FREE, OR THAT THE PROGRAM WILL BE COMPATIBLE + * WITH THIRD PARTY SOFTWARE OR THAT ANY ERRORS IN THE PROGRAM WILL BE + * CORRECTED. NO ORAL OR WRITTEN ADVICE PROVIDED BY ELECTRONIC ARTS OR + * ANY AUTHORIZED REPRESENTATIVE SHALL CREATE A WARRANTY. SOME + * JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF OR LIMITATIONS ON IMPLIED + * WARRANTIES OR THE LIMITATIONS ON THE APPLICABLE STATUTORY RIGHTS OF A + * CONSUMER, SO SOME OR ALL OF THE ABOVE EXCLUSIONS AND LIMITATIONS MAY + * NOT APPLY TO YOU. + */ + +/** + * @file connect.cpp + * @brief Implements connection utilities for roads, rails, and wires + * in Micropolis. + * + * This file contains functions for laying down and updating roads, + * railways, and power lines in the Micropolis game. It handles the + * logic for determining the appropriate tile transformations when + * these elements are placed on the map, considering existing terrain + * and infrastructure. The file includes utilities for bulldozing, + * repairing, and modifying tiles to ensure correct connectivity and + * appearance on the game map. + */ + + +//////////////////////////////////////////////////////////////////////// + + +#include "micropolis.h" + + +//////////////////////////////////////////////////////////////////////// + + +static const unsigned short RoadTable[16] = { + ROADS, ROADS2, ROADS, ROADS3, + ROADS2, ROADS2, ROADS4, ROADS8, + ROADS, ROADS6, ROADS, ROADS7, + ROADS5, ROADS10, ROADS9, INTERSECTION +}; + +static const unsigned short RailTable[16] = { + LHRAIL, LVRAIL, LHRAIL, LVRAIL2, + LVRAIL, LVRAIL, LVRAIL3, LVRAIL7, + LHRAIL, LVRAIL5, LHRAIL, LVRAIL6, + LVRAIL4, LVRAIL9, LVRAIL8, LVRAIL10 +}; + +static const unsigned short WireTable[16] = { + LHPOWER, LVPOWER, LHPOWER, LVPOWER2, + LVPOWER, LVPOWER, LVPOWER3, LVPOWER7, + LHPOWER, LVPOWER5, LHPOWER, LVPOWER6, + LVPOWER4, LVPOWER9, LVPOWER8, LVPOWER10 +}; + + +//////////////////////////////////////////////////////////////////////// + +/** + * Remove road from the tile. + * @param tile Current tile value. + * @return Equivalent tile without road. + */ +static inline MapTile neutralizeRoad(MapTile tile) +{ + if (tile >= 64 && tile <= 207) { + tile = (tile & 0x000F) + 64; + } + return tile; +}; + +/** + * Perform the command, and fix wire/road/rail/zone connections around it. + * Store modification in the \a effects object. + * @param x X world position to perform the command. + * @param y Y world position to perform the command. + * @param cmd Command to perform. + * @param effects Modification collecting object. + * @return Tool result. + */ +ToolResult Micropolis::connectTile(short x, short y, + ConnectTileCommand cmd, ToolEffects *effects) +{ + ToolResult result = TOOLRESULT_OK; + + // Make sure the array subscripts are in bounds. + if (!testBounds(x, y)) { + return TOOLRESULT_FAILED; + } + + // Perform auto-doze if appropriate. + switch (cmd) { + + case CONNECT_TILE_ROAD: + case CONNECT_TILE_RAILROAD: + case CONNECT_TILE_WIRE: + + // Silently skip auto-bulldoze if no money. + if (autoBulldoze) { + + MapValue mapVal = effects->getMapValue(x, y); + + if (mapVal & BULLBIT) { + mapVal &= LOMASK; + mapVal = neutralizeRoad(mapVal); + + /* Maybe this should check BULLBIT instead of checking tile values? */ + if ((mapVal >= TINYEXP && mapVal <= LASTTINYEXP) || + (mapVal < HBRIDGE && mapVal != DIRT)) { + + effects->addCost(1); + + effects->setMapValue(x, y, DIRT); + + } + } + } + break; + + default: + // Do nothing. + break; + + } + + // Perform the command. + switch (cmd) { + + case CONNECT_TILE_FIX: // Fix zone. + fixZone(x, y, effects); + break; + + case CONNECT_TILE_BULLDOZE: // Bulldoze zone. + result = layDoze(x, y, effects); + fixZone(x, y, effects); + break; + + case CONNECT_TILE_ROAD: // Lay road. + result = layRoad(x, y, effects); + fixZone(x, y, effects); + break; + + case CONNECT_TILE_RAILROAD: // Lay railroad. + result = layRail(x, y, effects); + fixZone(x, y, effects); + break; + + case CONNECT_TILE_WIRE: // Lay wire. + result = layWire(x, y, effects); + fixZone(x, y, effects); + break; + + default: + NOT_REACHED(); + break; + + } + + return result; +} + + +/** + * Builldoze a tile (make it a #RIVER or #DIRT). + * @param x X map coordinate. + * @param y Y map coordinate. + * @param effects Modification collecting object. + * @return Tool result. + */ +ToolResult Micropolis::layDoze(int x, int y, ToolEffects *effects) +{ + MapValue tile = effects->getMapValue(x, y); + + if (!(tile & BULLBIT)) { + return TOOLRESULT_FAILED; /* Check dozeable bit. */ + } + + tile &= LOMASK; + tile = neutralizeRoad(tile); + + switch (tile) { + case HBRIDGE: + case VBRIDGE: + case BRWV: + case BRWH: + case HBRDG0: + case HBRDG1: + case HBRDG2: + case HBRDG3: + case VBRDG0: + case VBRDG1: + case VBRDG2: + case VBRDG3: + case HPOWER: + case VPOWER: + case HRAIL: + case VRAIL: /* Dozing over water, replace with water. */ + effects->setMapValue(x, y, RIVER); + break; + + default: /* Dozing on land, replace with land. Simple, eh? */ + effects->setMapValue(x, y, DIRT); + break; + } + + effects->addCost(1); /* Costs $1.00.... */ + + return TOOLRESULT_OK; +} + + +/** + * Lay a road, and update road around it. + * @param x X map coordinate. + * @param y Y map coordinate. + * @param effects Modification collecting object. + * @return Tool result. + */ +ToolResult Micropolis::layRoad(int x, int y, ToolEffects *effects) +{ + int cost = 10; + + MapTile tile = effects->getMapTile(x, y); + + switch (tile) { + + case DIRT: + effects->setMapValue(x, y, ROADS | BULLBIT | BURNBIT); + break; + + case RIVER: /* Road on Water */ + case REDGE: + case CHANNEL: /* Check how to build bridges, if possible. */ + cost = 50; + + if (x < WORLD_W - 1) { + tile = effects->getMapTile(x + 1, y); + tile = neutralizeRoad(tile); + if (tile == VRAILROAD || tile == HBRIDGE + || (tile >= ROADS && tile <= HROADPOWER)) { + effects->setMapValue(x, y, HBRIDGE | BULLBIT); + break; + } + } + + if (x > 0) { + tile = effects->getMapTile(x - 1, y); + tile = neutralizeRoad(tile); + if (tile == VRAILROAD || tile == HBRIDGE + || (tile >= ROADS && tile <= INTERSECTION)) { + effects->setMapValue(x, y, HBRIDGE | BULLBIT); + break; + } + } + + if (y < WORLD_H - 1) { + tile = effects->getMapTile(x, y + 1); + tile = neutralizeRoad(tile); + if (tile == HRAILROAD || tile == VROADPOWER + || (tile >= VBRIDGE && tile <= INTERSECTION)) { + effects->setMapValue(x, y, VBRIDGE | BULLBIT); + break; + } + } + + if (y > 0) { + tile = effects->getMapTile(x, y - 1); + tile = neutralizeRoad(tile); + if (tile == HRAILROAD || tile == VROADPOWER + || (tile >= VBRIDGE && tile <= INTERSECTION)) { + effects->setMapValue(x, y, VBRIDGE | BULLBIT); + break; + } + } + + /* Can't do road... */ + return TOOLRESULT_FAILED; + + case LHPOWER: /* Road on power */ + effects->setMapValue(x, y, VROADPOWER | CONDBIT | BURNBIT | BULLBIT); + break; + + case LVPOWER: /* Road on power #2 */ + effects->setMapValue(x, y, HROADPOWER | CONDBIT | BURNBIT | BULLBIT); + break; + + case LHRAIL: /* Road on rail */ + effects->setMapValue(x, y, HRAILROAD | BURNBIT | BULLBIT); + break; + + case LVRAIL: /* Road on rail #2 */ + effects->setMapValue(x, y, VRAILROAD | BURNBIT | BULLBIT); + break; + + default: /* Can't do road */ + return TOOLRESULT_FAILED; + + } + + effects->addCost(cost); + return TOOLRESULT_OK; +} + + +/** + * Lay a rail, and update connections (rail, road, and wire) around it. + * @param x X map coordinate. + * @param y Y map coordinate. + * @param effects Modification collecting object. + * @return Tool result. + */ +ToolResult Micropolis::layRail(int x, int y, ToolEffects *effects) +{ + int cost = 20; + + MapTile tile = effects->getMapTile(x, y); + + tile = neutralizeRoad(tile); + + switch (tile) { + case DIRT: /* Rail on Dirt */ + + effects->setMapValue(x, y, LHRAIL | BULLBIT | BURNBIT); + + break; + + case RIVER: /* Rail on Water */ + case REDGE: + case CHANNEL: /* Check how to build underwater tunnel, if possible. */ + + cost = 100; + + if (x < WORLD_W - 1) { + tile = effects->getMapTile(x + 1, y); + tile = neutralizeRoad(tile); + if (tile == RAILHPOWERV || tile == HRAIL + || (tile >= LHRAIL && tile <= HRAILROAD)) { + effects->setMapValue(x, y, HRAIL | BULLBIT); + break; + } + } + + if (x > 0) { + tile = effects->getMapTile(x - 1, y); + tile = neutralizeRoad(tile); + if (tile == RAILHPOWERV || tile == HRAIL + || (tile > VRAIL && tile < VRAILROAD)) { + effects->setMapValue(x, y, HRAIL | BULLBIT); + break; + } + } + + if (y < WORLD_H - 1) { + tile = effects->getMapTile(x, y + 1); + tile = neutralizeRoad(tile); + if (tile == RAILVPOWERH || tile == VRAILROAD + || (tile > HRAIL && tile < HRAILROAD)) { + effects->setMapValue(x, y, VRAIL | BULLBIT); + break; + } + } + + if (y > 0) { + tile = effects->getMapTile(x, y - 1); + tile = neutralizeRoad(tile); + if (tile == RAILVPOWERH || tile == VRAILROAD + || (tile > HRAIL && tile < HRAILROAD)) { + effects->setMapValue(x, y, VRAIL | BULLBIT); + break; + } + } + + /* Can't do rail... */ + return TOOLRESULT_FAILED; + + case LHPOWER: /* Rail on power */ + effects->setMapValue(x, y, RAILVPOWERH | CONDBIT | BURNBIT | BULLBIT); + break; + + case LVPOWER: /* Rail on power #2 */ + effects->setMapValue(x, y, RAILHPOWERV | CONDBIT | BURNBIT | BULLBIT); + break; + + case ROADS: /* Rail on road */ + effects->setMapValue(x, y, VRAILROAD | BURNBIT | BULLBIT); + break; + + case ROADS2: /* Rail on road #2 */ + effects->setMapValue(x, y, HRAILROAD | BURNBIT | BULLBIT); + break; + + default: /* Can't do rail */ + return TOOLRESULT_FAILED; + } + + effects->addCost(cost); + return TOOLRESULT_OK; +} + + +/** + * Lay a wire, and update connections (rail, road, and wire) around it. + * @param x X map coordinate. + * @param y Y map coordinate. + * @param effects Modification collecting object. + * @return Tool result. + */ +ToolResult Micropolis::layWire(int x, int y, ToolEffects *effects) +{ + int cost = 5; + + MapTile tile = effects->getMapTile(x, y); + + tile = neutralizeRoad(tile); + + switch (tile) { + + case DIRT: /* Wire on Dirt */ + + effects->setMapValue(x, y, LHPOWER | CONDBIT | BURNBIT | BULLBIT); + + break; + + case RIVER: /* Wire on Water */ + case REDGE: + case CHANNEL: /* Check how to lay underwater wire, if possible. */ + + cost = 25; + + if (x < WORLD_W - 1) { + tile = effects->getMapValue(x + 1, y); + if (tile & CONDBIT) { + tile &= LOMASK; + tile = neutralizeRoad(tile); + if (tile != HROADPOWER && tile != RAILHPOWERV && tile != HPOWER) { + effects->setMapValue(x, y, VPOWER | CONDBIT | BULLBIT); + break; + } + } + } + + if (x > 0) { + tile = effects->getMapValue(x - 1, y); + if (tile & CONDBIT) { + tile &= LOMASK; + tile = neutralizeRoad(tile); + if (tile != HROADPOWER && tile != RAILHPOWERV && tile != HPOWER) { + effects->setMapValue(x, y, VPOWER | CONDBIT | BULLBIT); + break; + } + } + } + + if (y < WORLD_H - 1) { + tile = effects->getMapValue(x, y + 1); + if (tile & CONDBIT) { + tile &= LOMASK; + tile = neutralizeRoad(tile); + if (tile != VROADPOWER && tile != RAILVPOWERH && tile != VPOWER) { + effects->setMapValue(x, y, HPOWER | CONDBIT | BULLBIT); + break; + } + } + } + + if (y > 0) { + tile = effects->getMapValue(x, y - 1); + if (tile & CONDBIT) { + tile &= LOMASK; + tile = neutralizeRoad(tile); + if (tile != VROADPOWER && tile != RAILVPOWERH && tile != VPOWER) { + effects->setMapValue(x, y, HPOWER | CONDBIT | BULLBIT); + break; + } + } + } + + /* Can't do wire... */ + return TOOLRESULT_FAILED; + + case ROADS: /* Wire on Road */ + effects->setMapValue(x, y, HROADPOWER | CONDBIT | BURNBIT | BULLBIT); + break; + + case ROADS2: /* Wire on Road #2 */ + effects->setMapValue(x, y, VROADPOWER | CONDBIT | BURNBIT | BULLBIT); + break; + + case LHRAIL: /* Wire on rail */ + effects->setMapValue(x, y, RAILHPOWERV | CONDBIT | BURNBIT | BULLBIT); + break; + + case LVRAIL: /* Wire on rail #2 */ + effects->setMapValue(x, y, RAILVPOWERH | CONDBIT | BURNBIT | BULLBIT); + break; + + default: /* Can't do wire */ + return TOOLRESULT_FAILED; + + } + + effects->addCost(cost); + return TOOLRESULT_OK; +} + + +/** + * Update connections (rails, and wire connections) to a zone. + * @param x X map coordinate + * @param y Y map coordinate. + * @param effects Modification collecting object. + */ +void Micropolis::fixZone(int x, int y, ToolEffects *effects) +{ + fixSingle(x, y, effects); + + if (y > 0) { + fixSingle(x, y - 1, effects); + } + + if (x < WORLD_W - 1) { + fixSingle(x + 1, y, effects); + } + + if (y < WORLD_H - 1) { + fixSingle(x, y + 1, effects); + } + + if (x > 0) { + fixSingle(x - 1, y, effects); + } +} + + +/** + * Modify road, rails, and wire connections at a given tile. + * @param x X map coordinate. + * @param y Y map coordinate. + * @param effects Modification collecting object. + */ +void Micropolis::fixSingle(int x, int y, ToolEffects *effects) +{ + unsigned short adjTile = 0; + + MapTile tile = effects->getMapTile(x, y); + + tile = neutralizeRoad(tile); + + if (tile >= ROADS && tile <= INTERSECTION) { /* Cleanup Road */ + + if (y > 0) { + tile = effects->getMapTile(x, y - 1); + tile = neutralizeRoad(tile); + if ((tile == HRAILROAD || (tile >= ROADBASE && tile <= VROADPOWER)) + && tile != HROADPOWER && tile != VRAILROAD + && tile != ROADBASE) { + adjTile |= 0x0001; + } + } + + if (x < WORLD_W - 1) { + tile = effects->getMapTile(x + 1, y); + tile = neutralizeRoad(tile); + if ((tile == VRAILROAD || (tile >= ROADBASE && tile <= VROADPOWER)) + && tile != VROADPOWER && tile != HRAILROAD + && tile != VBRIDGE) { + adjTile |= 0x0002; + } + } + + if (y < WORLD_H - 1) { + tile = effects->getMapTile(x, y + 1); + tile = neutralizeRoad(tile); + if ((tile == HRAILROAD || (tile >= ROADBASE && tile <= VROADPOWER)) + && tile != HROADPOWER && tile != VRAILROAD + && tile != ROADBASE) { + adjTile |= 0x0004; + } + } + + if (x > 0) { + tile = effects->getMapTile(x - 1, y); + tile = neutralizeRoad(tile); + if ((tile == VRAILROAD || (tile >= ROADBASE && tile <= VROADPOWER)) + && tile != VROADPOWER && tile != HRAILROAD + && tile != VBRIDGE) { + adjTile |= 0x0008; + } + } + + effects->setMapValue(x, y, RoadTable[adjTile] | BULLBIT | BURNBIT); + return; + } + + if (tile >= LHRAIL && tile <= LVRAIL10) { /* Cleanup Rail */ + + if (y > 0) { + tile = effects->getMapTile(x, y - 1); + tile = neutralizeRoad(tile); + if (tile >= RAILHPOWERV && tile <= VRAILROAD + && tile != RAILHPOWERV && tile != HRAILROAD + && tile != HRAIL) { + adjTile |= 0x0001; + } + } + + if (x < WORLD_W - 1) { + tile = effects->getMapTile(x + 1, y); + tile = neutralizeRoad(tile); + if (tile >= RAILHPOWERV && tile <= VRAILROAD + && tile != RAILVPOWERH && tile != VRAILROAD + && tile != VRAIL) { + adjTile |= 0x0002; + } + } + + if (y < WORLD_H - 1) { + tile = effects->getMapTile(x, y + 1); + tile = neutralizeRoad(tile); + if (tile >= RAILHPOWERV && tile <= VRAILROAD + && tile != RAILHPOWERV && tile != HRAILROAD + && tile != HRAIL) { + adjTile |= 0x0004; + } + } + + if (x > 0) { + tile = effects->getMapTile(x - 1, y); + tile = neutralizeRoad(tile); + if (tile >= RAILHPOWERV && tile <= VRAILROAD + && tile != RAILVPOWERH && tile != VRAILROAD + && tile != VRAIL) { + adjTile |= 0x0008; + } + } + + effects->setMapValue(x, y, RailTable[adjTile] | BULLBIT | BURNBIT); + return; + } + + if (tile >= LHPOWER && tile <= LVPOWER10) { /* Cleanup Wire */ + + if (y > 0) { + tile = effects->getMapValue(x, y - 1); + if (tile & CONDBIT) { + tile &= LOMASK; + tile = neutralizeRoad(tile); + if (tile != VPOWER && tile != VROADPOWER && tile != RAILVPOWERH) { + adjTile |= 0x0001; + } + } + } + + if (x < WORLD_W - 1) { + tile = effects->getMapValue(x + 1, y); + if (tile & CONDBIT) { + tile &= LOMASK; + tile = neutralizeRoad(tile); + if (tile != HPOWER && tile != HROADPOWER && tile != RAILHPOWERV) { + adjTile |= 0x0002; + } + } + } + + if (y < WORLD_H - 1) { + tile = effects->getMapValue(x, y + 1); + if (tile & CONDBIT) { + tile &= LOMASK; + tile = neutralizeRoad(tile); + if (tile != VPOWER && tile != VROADPOWER && tile != RAILVPOWERH) { + adjTile |= 0x0004; + } + } + } + + if (x > 0) { + tile = effects->getMapValue(x - 1, y); + if (tile & CONDBIT) { + tile &= LOMASK; + tile = neutralizeRoad(tile); + if (tile != HPOWER && tile != HROADPOWER && tile != RAILHPOWERV) { + adjTile |= 0x0008; + } + } + } + + effects->setMapValue(x, y, WireTable[adjTile] | BLBNCNBIT); + return; + } +} + + +//////////////////////////////////////////////////////////////////////// diff --git a/core/data_types.h b/core/data_types.h new file mode 100644 index 0000000..efd8bb8 --- /dev/null +++ b/core/data_types.h @@ -0,0 +1,90 @@ +/* data_types.h + * + * Micropolis, Unix Version. This game was released for the Unix platform + * in or about 1990 and has been modified for inclusion in the One Laptop + * Per Child program. Copyright (C) 1989 - 2007 Electronic Arts Inc. If + * you need assistance with this program, you may contact: + * http://wiki.laptop.org/go/Micropolis or email micropolis@laptop.org. + * + * This program 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. + * + * This program 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 this program. If + * not, see . + * + * ADDITIONAL TERMS per GNU GPL Section 7 + * + * No trademark or publicity rights are granted. This license does NOT + * give you any right, title or interest in the trademark SimCity or any + * other Electronic Arts trademark. You may not distribute any + * modification of this program using the trademark SimCity or claim any + * affliation or association with Electronic Arts Inc. or its employees. + * + * Any propagation or conveyance of this program must include this + * copyright notice and these terms. + * + * If you convey this program (or any modifications of it) and assume + * contractual liability for the program to recipients of it, you agree + * to indemnify Electronic Arts for any liability that those contractual + * assumptions impose on Electronic Arts. + * + * You may not misrepresent the origins of this program; modified + * versions of the program must be marked as such and not identified as + * the original program. + * + * This disclaimer supplements the one included in the General Public + * License. TO THE FULLEST EXTENT PERMISSIBLE UNDER APPLICABLE LAW, THIS + * PROGRAM IS PROVIDED TO YOU "AS IS," WITH ALL FAULTS, WITHOUT WARRANTY + * OF ANY KIND, AND YOUR USE IS AT YOUR SOLE RISK. THE ENTIRE RISK OF + * SATISFACTORY QUALITY AND PERFORMANCE RESIDES WITH YOU. ELECTRONIC ARTS + * DISCLAIMS ANY AND ALL EXPRESS, IMPLIED OR STATUTORY WARRANTIES, + * INCLUDING IMPLIED WARRANTIES OF MERCHANTABILITY, SATISFACTORY QUALITY, + * FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT OF THIRD PARTY + * RIGHTS, AND WARRANTIES (IF ANY) ARISING FROM A COURSE OF DEALING, + * USAGE, OR TRADE PRACTICE. ELECTRONIC ARTS DOES NOT WARRANT AGAINST + * INTERFERENCE WITH YOUR ENJOYMENT OF THE PROGRAM; THAT THE PROGRAM WILL + * MEET YOUR REQUIREMENTS; THAT OPERATION OF THE PROGRAM WILL BE + * UNINTERRUPTED OR ERROR-FREE, OR THAT THE PROGRAM WILL BE COMPATIBLE + * WITH THIRD PARTY SOFTWARE OR THAT ANY ERRORS IN THE PROGRAM WILL BE + * CORRECTED. NO ORAL OR WRITTEN ADVICE PROVIDED BY ELECTRONIC ARTS OR + * ANY AUTHORIZED REPRESENTATIVE SHALL CREATE A WARRANTY. SOME + * JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF OR LIMITATIONS ON IMPLIED + * WARRANTIES OR THE LIMITATIONS ON THE APPLICABLE STATUTORY RIGHTS OF A + * CONSUMER, SO SOME OR ALL OF THE ABOVE EXCLUSIONS AND LIMITATIONS MAY + * NOT APPLY TO YOU. + */ + +/** + * @file data_types.h + * @brief Commonly used data types in Micropolis game engine. + * + * This header file defines basic data types used throughout the + * Micropolis game engine. These include types for bytes, pointers, + * and quad values (both signed and unsigned). This file provides a + * centralized definition of these types to ensure consistency and + * readability across the game engine's codebase. By abstracting data + * types in this manner, the code maintains flexibility and ease of + * maintenance. + */ + + +#ifndef H_DATA_TYPES +#define H_DATA_TYPES + + +typedef unsigned char Byte; + +typedef Byte *Ptr; + +typedef long Quad; + +typedef unsigned long UQuad; + + +#endif diff --git a/core/disasters.cpp b/core/disasters.cpp new file mode 100644 index 0000000..130f497 --- /dev/null +++ b/core/disasters.cpp @@ -0,0 +1,418 @@ +/* disasters.cpp + * + * Micropolis, Unix Version. This game was released for the Unix platform + * in or about 1990 and has been modified for inclusion in the One Laptop + * Per Child program. Copyright (C) 1989 - 2007 Electronic Arts Inc. If + * you need assistance with this program, you may contact: + * http://wiki.laptop.org/go/Micropolis or email micropolis@laptop.org. + * + * This program 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. + * + * This program 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 this program. If + * not, see . + * + * ADDITIONAL TERMS per GNU GPL Section 7 + * + * No trademark or publicity rights are granted. This license does NOT + * give you any right, title or interest in the trademark SimCity or any + * other Electronic Arts trademark. You may not distribute any + * modification of this program using the trademark SimCity or claim any + * affliation or association with Electronic Arts Inc. or its employees. + * + * Any propagation or conveyance of this program must include this + * copyright notice and these terms. + * + * If you convey this program (or any modifications of it) and assume + * contractual liability for the program to recipients of it, you agree + * to indemnify Electronic Arts for any liability that those contractual + * assumptions impose on Electronic Arts. + * + * You may not misrepresent the origins of this program; modified + * versions of the program must be marked as such and not identified as + * the original program. + * + * This disclaimer supplements the one included in the General Public + * License. TO THE FULLEST EXTENT PERMISSIBLE UNDER APPLICABLE LAW, THIS + * PROGRAM IS PROVIDED TO YOU "AS IS," WITH ALL FAULTS, WITHOUT WARRANTY + * OF ANY KIND, AND YOUR USE IS AT YOUR SOLE RISK. THE ENTIRE RISK OF + * SATISFACTORY QUALITY AND PERFORMANCE RESIDES WITH YOU. ELECTRONIC ARTS + * DISCLAIMS ANY AND ALL EXPRESS, IMPLIED OR STATUTORY WARRANTIES, + * INCLUDING IMPLIED WARRANTIES OF MERCHANTABILITY, SATISFACTORY QUALITY, + * FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT OF THIRD PARTY + * RIGHTS, AND WARRANTIES (IF ANY) ARISING FROM A COURSE OF DEALING, + * USAGE, OR TRADE PRACTICE. ELECTRONIC ARTS DOES NOT WARRANT AGAINST + * INTERFERENCE WITH YOUR ENJOYMENT OF THE PROGRAM; THAT THE PROGRAM WILL + * MEET YOUR REQUIREMENTS; THAT OPERATION OF THE PROGRAM WILL BE + * UNINTERRUPTED OR ERROR-FREE, OR THAT THE PROGRAM WILL BE COMPATIBLE + * WITH THIRD PARTY SOFTWARE OR THAT ANY ERRORS IN THE PROGRAM WILL BE + * CORRECTED. NO ORAL OR WRITTEN ADVICE PROVIDED BY ELECTRONIC ARTS OR + * ANY AUTHORIZED REPRESENTATIVE SHALL CREATE A WARRANTY. SOME + * JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF OR LIMITATIONS ON IMPLIED + * WARRANTIES OR THE LIMITATIONS ON THE APPLICABLE STATUTORY RIGHTS OF A + * CONSUMER, SO SOME OR ALL OF THE ABOVE EXCLUSIONS AND LIMITATIONS MAY + * NOT APPLY TO YOU. + */ + +/** + * @file disasters.cpp + * @brief Handles disaster events in the Micropolis game engine. + * + * This file includes functions to trigger and manage various disaster + * events such as earthquakes, fires, floods, and other scenarios. It + * controls the probability of disasters occurring based on the game + * level and executes disaster-specific effects on the city, like + * damaging structures and changing terrain. The file plays a critical + * role in adding challenge and dynamic events to the gameplay + * experience. + */ + + +//////////////////////////////////////////////////////////////////////// + + +#include "micropolis.h" + + +//////////////////////////////////////////////////////////////////////// + + +/** + * Let disasters happen. + * @todo Decide what to do with the 'nothing happens' disaster (since the + * chance that a disaster happens is expressed in the \c DisChance + * table). + */ +void Micropolis::doDisasters() +{ + /* Chance of disasters at lev 0 1 2 */ + static const short DisChance[3] = { + 10 * 48, // Game level 0 + 5 * 48, // Game level 1 + 60 // Game level 2 + }; + assert(LEVEL_COUNT == LENGTH_OF(DisChance)); + + if (floodCount) { + floodCount--; + } + + if (disasterEvent != SC_NONE) { + scenarioDisaster(); + } + + if (!enableDisasters) { // Disasters have been disabled + return; + } + + int x = gameLevel; + if (x > LEVEL_LAST) { + x = LEVEL_EASY; + } + + if (!getRandom(DisChance[x])) { + switch (getRandom(8)) { + case 0: + case 1: + setFire(); // 2/9 chance a fire breaks out + break; + + case 2: + case 3: + makeFlood(); // 2/9 chance for a flood + break; + + case 4: + // 1/9 chance nothing happens (was airplane crash, + // which EA removed after 9/11, and requested it be + // removed from this code) + break; + + case 5: + makeTornado(); // 1/9 chance tornado + break; + + case 6: + makeEarthquake(); // 1/9 chance earthquake + break; + + case 7: + case 8: + // 2/9 chance a scary monster arrives in a dirty town + if (pollutionAverage > /* 80 */ 60) { + makeMonster(); + } + break; + } + } +} + + +/** Let disasters of the scenario happen */ +void Micropolis::scenarioDisaster() +{ + switch (disasterEvent) { + case SC_DULLSVILLE: + break; + + case SC_SAN_FRANCISCO: + if (disasterWait == 1) { + makeEarthquake(); + } + break; + + case SC_HAMBURG: + if (disasterWait % 10 == 0) { + makeFireBombs(); + } + break; + + case SC_BERN: + break; + + case SC_TOKYO: + if (disasterWait == 1) { + makeMonster(); + } + break; + + case SC_DETROIT: + break; + + case SC_BOSTON: + if (disasterWait == 1) { + makeMeltdown(); + } + break; + + case SC_RIO: + if ((disasterWait % 24) == 0) { + makeFlood(); + } + break; + + default: + NOT_REACHED(); + break; // Never used + } + + if (disasterWait > 0) { + disasterWait--; + } else { + disasterEvent = SC_NONE; + } +} + + +/** + * Make a nuclear power plant melt + * @todo Randomize which nuke plant melts down. + */ +void Micropolis::makeMeltdown() +{ + short x, y; + + for (x = 0; x < (WORLD_W - 1); x++) { + for (y = 0; y < (WORLD_H - 1); y++) { + if ((map[x][y] & LOMASK) == NUCLEAR) { + doMeltdown(Position(x, y)); + return; + } + } + } +} + + +/** Let a fire bomb explode at a random location */ +void Micropolis::fireBomb() +{ + int crashX = getRandom(WORLD_W - 1); + int crashY = getRandom(WORLD_H - 1); + makeExplosion(crashX, crashY); + sendMessage(MESSAGE_FIREBOMBING, crashX, crashY, true, true); +} + + +/** Throw several bombs onto the city. */ +void Micropolis::makeFireBombs() +{ + int count = 2 + (getRandom16() & 1); + + while (count > 0) { + fireBomb(); + count--; + } + + // TODO: Schedule periodic fire bombs over time, every few ticks. +} + + +/** Change random tiles to fire or dirt as result of the earthquake */ +void Micropolis::makeEarthquake() +{ + short x, y, z; + + int strength = getRandom(700) + 300; // strength/duration of the earthquake + + doEarthquake(strength); + + sendMessage(MESSAGE_EARTHQUAKE, cityCenterX, cityCenterY, true); + + for (z = 0; z < strength; z++) { + x = getRandom(WORLD_W - 1); + y = getRandom(WORLD_H - 1); + + if (vulnerable(map[x][y])) { + + if ((z & 0x3) != 0) { // 3 of 4 times reduce to rubble + map[x][y] = randomRubble(); + } else { + // 1 of 4 times start fire + map[x][y] = randomFire(); + } + } + } +} + + +/** Start a fire at a random place, random disaster or scenario */ +void Micropolis::setFire() +{ + short x, y, z; + + x = getRandom(WORLD_W - 1); + y = getRandom(WORLD_H - 1); + z = map[x][y]; + + if ((z & ZONEBIT) == 0) { + z = z & LOMASK; + if (z > LHTHR && z < LASTZONE) { + map[x][y] = randomFire(); + sendMessage(MESSAGE_FIRE_REPORTED, x, y, true); + } + } +} + + +/** Start a fire at a random place, requested by user */ +void Micropolis::makeFire() +{ + short t, x, y, z; + + for (t = 0; t < 40; t++) { + x = getRandom(WORLD_W - 1); + y = getRandom(WORLD_H - 1); + z = map[x][y]; + + if ((!(z & ZONEBIT)) && (z & BURNBIT)) { + z = z & LOMASK; + if ((z > 21) && (z < LASTZONE)) { + map[x][y] = randomFire(); + sendMessage(MESSAGE_FIRE_REPORTED, x, y); + return; + } + } + } +} + + +/** + * Is tile vulnerable for an earthquake? + * @param tem Tile data + * @return Function returns \c true if tile is vulnerable, and \c false if not + */ +bool Micropolis::vulnerable(int tem) +{ + int tem2 = tem & LOMASK; + + if (tem2 < RESBASE || tem2 > LASTZONE || (tem & ZONEBIT)) { + return false; + } + + return true; +} + + +/** + * Flood many tiles + * @todo Use Direction and some form of XYPosition class here + */ +void Micropolis::makeFlood() +{ + static const short Dx[4] = { 0, 1, 0, -1 }; + static const short Dy[4] = { -1, 0, 1, 0 }; + short xx, yy, c; + short z, t, x, y; + + for (z = 0; z < 300; z++) { + x = getRandom(WORLD_W - 1); + y = getRandom(WORLD_H - 1); + c = map[x][y] & LOMASK; + + if (c > CHANNEL && c <= WATER_HIGH) { /* if riveredge */ + for (t = 0; t < 4; t++) { + xx = x + Dx[t]; + yy = y + Dy[t]; + if (testBounds(xx, yy)) { + c = map[xx][yy]; + + /* tile is floodable */ + if (c == DIRT + || (c & (BULLBIT | BURNBIT)) == (BULLBIT | BURNBIT)) { + map[xx][yy] = FLOOD; + floodCount = 30; + sendMessage(MESSAGE_FLOODING_REPORTED, xx, yy, true); + return; + } + } + } + } + } +} + + +/** + * Flood around the given position. + * @param pos Position around which to flood further. + * @todo Use some form of rotating around a position. + */ +void Micropolis::doFlood(const Position& pos) +{ + static const short Dx[4] = { 0, 1, 0, -1 }; + static const short Dy[4] = { -1, 0, 1, 0 }; + + if (floodCount > 0) { + // Flood is not over yet + for (int z = 0; z < 4; z++) { + if ((getRandom16() & 7) == 0) { // 12.5% chance + int xx = pos.posX + Dx[z]; + int yy = pos.posY + Dy[z]; + if (testBounds(xx, yy)) { + MapValue c = map[xx][yy]; + MapTile t = c & LOMASK; + + if ((c & BURNBIT) == BURNBIT || c == DIRT + || (t >= WOODS5 && t < FLOOD)) { + if ((c & ZONEBIT) == ZONEBIT) { + fireZone(Position(xx, yy), c); + } + map[xx][yy] = FLOOD + getRandom(2); + } + } + } + } + } else { + if ((getRandom16() & 15) == 0) { // 1/16 chance + map[pos.posX][pos.posY] = DIRT; + } + } +} + + +//////////////////////////////////////////////////////////////////////// diff --git a/core/emscripten.cpp b/core/emscripten.cpp new file mode 100644 index 0000000..2f7b191 --- /dev/null +++ b/core/emscripten.cpp @@ -0,0 +1,1159 @@ +/* emscripten.cpp + * + * Micropolis, Unix Version. This game was released for the Unix platform + * in or about 1990 and has been modified for inclusion in the One Laptop + * Per Child program. Copyright (C) 1989 - 2007 Electronic Arts Inc. If + * you need assistance with this program, you may contact: + * http://wiki.laptop.org/go/Micropolis or email micropolis@laptop.org. + * + * This program 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. + * + * This program 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 this program. If + * not, see . + * + * ADDITIONAL TERMS per GNU GPL Section 7 + * + * No trademark or publicity rights are granted. This license does NOT + * give you any right, title or interest in the trademark SimCity or any + * other Electronic Arts trademark. You may not distribute any + * modification of this program using the trademark SimCity or claim any + * affliation or association with Electronic Arts Inc. or its employees. + * + * Any propagation or conveyance of this program must include this + * copyright notice and these terms. + * + * If you convey this program (or any modifications of it) and assume + * contractual liability for the program to recipients of it, you agree + * to indemnify Electronic Arts for any liability that those contractual + * assumptions impose on Electronic Arts. + * + * You may not misrepresent the origins of this program; modified + * versions of the program must be marked as such and not identified as + * the original program. + * + * This disclaimer supplements the one included in the General Public + * License. TO THE FULLEST EXTENT PERMISSIBLE UNDER APPLICABLE LAW, THIS + * PROGRAM IS PROVIDED TO YOU "AS IS," WITH ALL FAULTS, WITHOUT WARRANTY + * OF ANY KIND, AND YOUR USE IS AT YOUR SOLE RISK. THE ENTIRE RISK OF + * SATISFACTORY QUALITY AND PERFORMANCE RESIDES WITH YOU. ELECTRONIC ARTS + * DISCLAIMS ANY AND ALL EXPRESS, IMPLIED OR STATUTORY WARRANTIES, + * INCLUDING IMPLIED WARRANTIES OF MERCHANTABILITY, SATISFACTORY QUALITY, + * FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT OF THIRD PARTY + * RIGHTS, AND WARRANTIES (IF ANY) ARISING FROM A COURSE OF DEALING, + * USAGE, OR TRADE PRACTICE. ELECTRONIC ARTS DOES NOT WARRANT AGAINST + * INTERFERENCE WITH YOUR ENJOYMENT OF THE PROGRAM; THAT THE PROGRAM WILL + * MEET YOUR REQUIREMENTS; THAT OPERATION OF THE PROGRAM WILL BE + * UNINTERRUPTED OR ERROR-FREE, OR THAT THE PROGRAM WILL BE COMPATIBLE + * WITH THIRD PARTY SOFTWARE OR THAT ANY ERRORS IN THE PROGRAM WILL BE + * CORRECTED. NO ORAL OR WRITTEN ADVICE PROVIDED BY ELECTRONIC ARTS OR + * ANY AUTHORIZED REPRESENTATIVE SHALL CREATE A WARRANTY. SOME + * JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF OR LIMITATIONS ON IMPLIED + * WARRANTIES OR THE LIMITATIONS ON THE APPLICABLE STATUTORY RIGHTS OF A + * CONSUMER, SO SOME OR ALL OF THE ABOVE EXCLUSIONS AND LIMITATIONS MAY + * NOT APPLY TO YOU. + */ + +/** + * @file emscripten.cpp + * @brief Emscripten bindings for Micropolis game engine. + * + * This file contains Emscripten bindings that allow the Micropolis + * (open-source version of SimCity) game engine to be used in a web + * environment. It utilizes Emscripten's Embind feature to expose C++ + * classes, functions, enums, and data structures to JavaScript, + * enabling the Micropolis game engine to be controlled and interacted + * with through a web interface. This includes key functionalities + * such as simulation control, game state management, map + * manipulation, and event handling. The binding includes only + * essential elements for gameplay, omitting low-level rendering and + * platform-specific code. + */ + + +//////////////////////////////////////////////////////////////////////// + + +#include +#include "micropolis.h" + + +//////////////////////////////////////////////////////////////////////// + + +using namespace emscripten; + + +//////////////////////////////////////////////////////////////////////// +// This file uses emscripten's embind to bind C++ classes, +// C structures, functions, enums, and contents into JavaScript, +// so you can even subclass C++ classes in JavaScript, +// for implementing plugins and user interfaces. +// +// Wrapping the entire Micropolis class from the Micropolis (open-source +// version of SimCity) code into Emscripten for JavaScript access is a +// large and complex task, mainly due to the size and complexity of the +// class. The class encompasses almost every aspect of the simulation, +// including map generation, simulation logic, user interface +// interactions, and more. +// +// Strategy for Wrapping +// +// 1. Core Simulation Logic: Focus on the core simulation aspects, such +// as the methods to run the simulation, update game states, and handle +// user inputs (like building tools and disaster simulations). This is +// crucial for any gameplay functionality. +// +// 2. Memory and Performance Considerations: JavaScript and WebAssembly +// run in a browser context, which can have memory limitations and +// performance constraints. Carefully manage memory allocation, +// especially when dealing with the game's map and various buffers. +// +// 3. Direct Memory Access: Provide JavaScript access to critical game +// data structures like the map buffer for efficient reading and +// writing. This can be done using Emscripten's heap access functions +// (HEAP8, HEAP16, HEAP32, etc.). +// +// 4. User Interface and Rendering: This part might not be necessary to +// wrap, as modern web technologies (HTML, CSS, WebGL) can be used for +// UI. However, providing some hooks for game state (like score, budget, +// etc.) to JavaScript might be helpful. +// +// 5. Callbacks and Interactivity: Ensure that key game events and +// callbacks are exposed to JavaScript, allowing for interactive and +// responsive gameplay. +// +// 6. Optimizations: Where possible, optimize C++ code for WebAssembly, +// focusing on critical paths in the simulation loop. +// +// Decisions and Explanations +// +// - Excluded Elements: +// +// - Low-level rendering or platform-specific code, as this can be +// handled more efficiently with web technologies. +// +// - Parts of the code that handle file I/O directly, as file access +// in a web context is typically handled differently (e.g., using +// browser APIs or server-side support). +// +// - Any networking or multiplayer code, as web-based +// implementations would differ significantly from desktop-based +// network code. +// +// - Included Elements: +// +// - Core game mechanics, such as map generation, zone simulation +// (residential, commercial, industrial), disaster simulation, and +// basic utilities. +// +// - Game state management, including budgeting, scoring, and city +// evaluation. +// +// - Direct memory access to critical structures like the map +// buffer, allowing efficient manipulation from JavaScript. +// +// - Essential callbacks and event handling mechanisms to ensure +// interactivity. +// +// Conclusion +// +// Given the complexity and size of the Micropolis class, wrapping the +// entire class directly is impractical. However, focusing on key areas +// essential for gameplay and providing efficient interfaces for +// critical data structures can create a functional and interactive city +// simulation in a web context. Further optimizations and adjustments +// would likely be needed based on testing and specific requirements of +// the web implementation. +// +// Implementation Notes +// +// The enum_, class_, constructor, function, and property functions +// from the emscripten namespace are used to specify how C++ +// constructs should be exposed to JavaScript. You can use these to +// control which parts of your code are accessible and how they should +// be used from JavaScript. +// +// I've made some assumptions here: +// +// The types MapValue and MapTile are simple types (like integers or +// floats). If they are complex types, they would need their own +// bindings. +// +// I'm assuming that the copy constructor and copy assignment +// operator for the Position class are correctly implemented. If +// they aren't, then the Position object may not behave as expected +// in JavaScript. +// +// Micropolis Binding Design +// +// The Micropolis interface organizes the Micropolis class header into +// categories of functions that are relevant for interaction with the +// JavaScript user interface, scripts, or plugins. The aim is to expose +// functions that could help in monitoring and controlling game state +// effectively. +// +// - Exposed to JavaScript (Public Interface) +// - Simulation Control and Settings +// - void simTick() +// - void setSpeed(short speed) +// - void setGameLevel(GameLevel level) +// - void setCityName(const std::string &name) +// - void setYear(int year) +// - void pause() +// - void resume() +// - void setEnableDisasters(bool value) +// - void setAutoBudget(bool value) +// - void setAutoBulldoze(bool value) +// - void setAutoGoto(bool value) +// - void setEnableSound(bool value) +// - void setDoAnimation(bool value) +// - void doNewGame() +// - void doBudget() +// - void doScoreCard() +// - void updateFunds() +// - Gameplay Mechanics +// - void doTool(EditingTool tool, short tileX, short tileY) +// - void generateMap(int seed) +// - void clearMap() +// - void makeDisaster(DisasterType type) +// - void getDemands(float *resDemandResult, float *comDemandResult, float *indDemandResult) +// - Random Number Generation +// - int simRandom() +// - int getRandom(short range) +// - int getRandom16() +// - int getRandom16Signed() +// - short getERandom(short limit) +// - void randomlySeedRandom() +// - void seedRandom(int seed) +// - Game State and Data Access +// - int getTile(int x, int y) +// - void setTile(int x, int y, int tile) +// - void setFunds(Quad dollars) +// - Quad getCityPopulation() +// - void updateMaps() +// - void updateGraphs() +// - void updateEvaluation() +// - void updateBudget() +// - Events and Callbacks +// - void sendMessage(short messageNumber, short x = NOWHERE, short y = NOWHERE) +// - void makeSound(std::string channel, std::string sound, int x = -1, int y = -1) +// - Hidden from JavaScript (Private Interface) +// - Internal Simulation Mechanics +// - void simFrame() +// - void simulate() +// - void doSimInit() +// - void setValves() +// - void clearCensus() +// - void collectTax() +// - void mapScan(int x1, int x2) +// - Utility Functions +// - void initMapArrays() +// - void destroyMapArrays() +// - void initSimMemory() +// - void initGraphs() +// - Zone Handling +// - void doZone(const Position &pos) +// - void doResidential(const Position &pos, bool zonePower) +// - void doCommercial(const Position &pos, bool zonePower) +// - void doIndustrial(const Position &pos, bool zonePower) +// - Disaster Simulation +// - void doDisasters() +// - void scenarioDisaster() +// - void fireAnalysis() +// - void makeFire() +// - void makeFlood() +// +// Conclusion +// +// These exposed functions provide a comprehensive interface for +// scripting, plugins, and user interactions through JavaScript. The +// exposed set of functions includes random number generation, +// simulation control mechanisms, UI-triggered actions like budget +// updates, along with essential gameplay mechanics. The private section +// continues to encapsulate internal simulation details and complex data +// management routines integral to the game's core mechanics. + + + +EMSCRIPTEN_BINDINGS(MicropolisEngine) { + + // position.h + + enum_("Direction2") + .value("INVALID", Direction2::DIR2_INVALID) + .value("NORTH", Direction2::DIR2_NORTH) + .value("NORTH_EAST", Direction2::DIR2_NORTH_EAST) + .value("EAST", Direction2::DIR2_EAST) + .value("SOUTH_EAST", Direction2::DIR2_SOUTH_EAST) + .value("SOUTH", Direction2::DIR2_SOUTH) + .value("SOUTH_WEST", Direction2::DIR2_SOUTH_WEST) + .value("WEST", Direction2::DIR2_WEST) + .value("NORTH_WEST", Direction2::DIR2_NORTH_WEST) + ; + + class_("Position") + .constructor<>() + .constructor() + .function("move", &Position::move) + .function("testBounds", &Position::testBounds) + .property("posX", &Position::posX) + .property("posY", &Position::posY) + ; + + function("increment45", &increment45); + function("increment90", &increment90); + function("rotate45", &rotate45); + function("rotate90", &rotate90); + function("rotate180", &rotate180); + + // tool.h + + class_("ToolEffects") + //.constructor() // TODO: wrap + .function("clear", &ToolEffects::clear) + .function("modifyWorld", &ToolEffects::modifyWorld) + .function("modifyIfEnoughFunding", &ToolEffects::modifyIfEnoughFunding) + .function("getMapValue", select_overload(&ToolEffects::getMapValue)) + .function("getMapTile", select_overload(&ToolEffects::getMapTile)) + .function("getCost", &ToolEffects::getCost) + .function("addCost", &ToolEffects::addCost) + .function("setMapValue", select_overload(&ToolEffects::setMapValue)) + //.function("addFrontendMessage", &ToolEffects::addFrontendMessage) // TODO: wrap + ; + + enum_("MapTileBits") + .value("PWRBIT", PWRBIT) + .value("CONDBIT", CONDBIT) + .value("BURNBIT", BURNBIT) + .value("BULLBIT", BULLBIT) + .value("ANIMBIT", ANIMBIT) + .value("ZONEBIT", ZONEBIT) + .value("ALLBITS", ALLBITS) + .value("LOMASK", LOMASK) + .value("BLBNBIT", BLBNBIT) + .value("BLBNCNBIT", BLBNCNBIT) + .value("BNCNBIT", BNCNBIT) + ; + + enum_("EditingTool") + .value("TOOL_RESIDENTIAL", TOOL_RESIDENTIAL) + .value("TOOL_COMMERCIAL", TOOL_COMMERCIAL) + .value("TOOL_INDUSTRIAL", TOOL_INDUSTRIAL) + .value("TOOL_FIRESTATION", TOOL_FIRESTATION) + .value("TOOL_POLICESTATION", TOOL_POLICESTATION) + .value("TOOL_QUERY", TOOL_QUERY) + .value("TOOL_WIRE", TOOL_WIRE) + .value("TOOL_BULLDOZER", TOOL_BULLDOZER) + .value("TOOL_RAILROAD", TOOL_RAILROAD) + .value("TOOL_ROAD", TOOL_ROAD) + .value("TOOL_STADIUM", TOOL_STADIUM) + .value("TOOL_PARK", TOOL_PARK) + .value("TOOL_SEAPORT", TOOL_SEAPORT) + .value("TOOL_COALPOWER", TOOL_COALPOWER) + .value("TOOL_NUCLEARPOWER", TOOL_NUCLEARPOWER) + .value("TOOL_AIRPORT", TOOL_AIRPORT) + .value("TOOL_NETWORK", TOOL_NETWORK) + .value("TOOL_WATER", TOOL_WATER) + .value("TOOL_LAND", TOOL_LAND) + .value("TOOL_FOREST", TOOL_FOREST) + .value("TOOL_COUNT", TOOL_COUNT) + .value("TOOL_FIRST", TOOL_FIRST) + .value("TOOL_LAST", TOOL_LAST); + ; + + // map_type.h + class_>("MapByte1") + .constructor() + .property("MAP_BLOCKSIZE", &Map::MAP_BLOCKSIZE) + .property("MAP_W", &Map::MAP_W) + .property("MAP_H", &Map::MAP_H) + .function("fill", &Map::fill) + .function("clear", &Map::clear) + .function("set", &Map::set) + .function("get", &Map::get) + .function("onMap", &Map::onMap) + .function("worldSet", &Map::worldSet) + .function("worldGet", &Map::worldGet) + .function("worldOnMap", &Map::worldOnMap) + //.function("getBase", &Map::getBase, allow_raw_pointers()) // TODO: wrap + .function("getTotalByteSize", &Map::getTotalByteSize) + ; + + class_>("MapByte2") + .constructor() + .property("MAP_BLOCKSIZE", &Map::MAP_BLOCKSIZE) + .property("MAP_W", &Map::MAP_W) + .property("MAP_H", &Map::MAP_H) + .function("fill", &Map::fill) + .function("clear", &Map::clear) + .function("set", &Map::set) + .function("get", &Map::get) + .function("onMap", &Map::onMap) + .function("worldSet", &Map::worldSet) + .function("worldGet", &Map::worldGet) + .function("worldOnMap", &Map::worldOnMap) + //.function("getBase", &Map::getBase, allow_raw_pointers()) // TODO: wrap + .function("getTotalByteSize", &Map::getTotalByteSize) + ; + + class_>("MapByte4") + .constructor() + .property("MAP_BLOCKSIZE", &Map::MAP_BLOCKSIZE) + .property("MAP_W", &Map::MAP_W) + .property("MAP_H", &Map::MAP_H) + .function("fill", &Map::fill) + .function("clear", &Map::clear) + .function("set", &Map::set) + .function("get", &Map::get) + .function("onMap", &Map::onMap) + .function("worldSet", &Map::worldSet) + .function("worldGet", &Map::worldGet) + .function("worldOnMap", &Map::worldOnMap) + //.function("getBase", &Map::getBase, allow_raw_pointers()) // TODO: wrap + .function("getTotalByteSize", &Map::getTotalByteSize) + ; + + class_>("MapShort8") + .constructor() + .property("MAP_BLOCKSIZE", &Map::MAP_BLOCKSIZE) + .property("MAP_W", &Map::MAP_W) + .property("MAP_H", &Map::MAP_H) + .function("fill", &Map::fill) + .function("clear", &Map::clear) + .function("set", &Map::set) + .function("get", &Map::get) + .function("onMap", &Map::onMap) + .function("worldSet", &Map::worldSet) + .function("worldGet", &Map::worldGet) + .function("worldOnMap", &Map::worldOnMap) + //.function("getBase", &Map::getBase, allow_raw_pointers()) // TODO: wrap + .function("getTotalByteSize", &Map::getTotalByteSize) + ; + +/* + +function createTypedArrayFromMap(mapInstance) { + var pointer = mapInstance.getBase(); + var byteSize = mapInstance.getTotalByteSize(); + var mapSize = mapInstance.MAP_W * mapInstance.MAP_H; + var arrayType; + + // Determine the correct Typed Array type based on DATA type + if (byteSize === mapSize) { + arrayType = Uint8Array; + } else if (byteSize === mapSize * 2) { + arrayType = Uint16Array; + } else { + console.error("Unsupported data type for Typed Array."); + return null; + } + + var typedArray = new arrayType(Module.HEAPU8.buffer, pointer, byteSize / arrayType.BYTES_PER_ELEMENT); + return typedArray; +} + +*/ + + // text.h + + enum_("Stri202") + .value("STR202_POPULATIONDENSITY_LOW", STR202_POPULATIONDENSITY_LOW) // 0: Low + .value("STR202_POPULATIONDENSITY_MEDIUM", STR202_POPULATIONDENSITY_MEDIUM) // 1: Medium + .value("STR202_POPULATIONDENSITY_HIGH", STR202_POPULATIONDENSITY_HIGH) // 2: High + .value("STR202_POPULATIONDENSITY_VERYHIGH", STR202_POPULATIONDENSITY_VERYHIGH) // 3: Very High + .value("STR202_LANDVALUE_SLUM", STR202_LANDVALUE_SLUM) // 4: Slum + .value("STR202_LANDVALUE_LOWER_CLASS", STR202_LANDVALUE_LOWER_CLASS) // 5: Lower Class + .value("STR202_LANDVALUE_MIDDLE_CLASS", STR202_LANDVALUE_MIDDLE_CLASS) // 6: Middle Class + .value("STR202_LANDVALUE_HIGH_CLASS", STR202_LANDVALUE_HIGH_CLASS) // 7: High + .value("STR202_CRIME_NONE", STR202_CRIME_NONE) // 8: Safe + .value("STR202_CRIME_LIGHT", STR202_CRIME_LIGHT) // 9: Light + .value("STR202_CRIME_MODERATE", STR202_CRIME_MODERATE) // 10: Moderate + .value("STR202_CRIME_DANGEROUS", STR202_CRIME_DANGEROUS) // 11: Dangerous + .value("STR202_POLLUTION_NONE", STR202_POLLUTION_NONE) // 12: None + .value("STR202_POLLUTION_MODERATE", STR202_POLLUTION_MODERATE) // 13: Moderate + .value("STR202_POLLUTION_HEAVY", STR202_POLLUTION_HEAVY) // 14: Heavy + .value("STR202_POLLUTION_VERY_HEAVY", STR202_POLLUTION_VERY_HEAVY) // 15: Very Heavy + .value("STR202_GROWRATE_DECLINING", STR202_GROWRATE_DECLINING) // 16: Declining + .value("STR202_GROWRATE_STABLE", STR202_GROWRATE_STABLE) // 17: Stable + .value("STR202_GROWRATE_SLOWGROWTH", STR202_GROWRATE_SLOWGROWTH) // 18: Slow Growth + .value("STR202_GROWRATE_FASTGROWTH", STR202_GROWRATE_FASTGROWTH) // 19: Fast Growth + ; + + enum_("MessageNumber") + .value("MESSAGE_NEED_MORE_RESIDENTIAL", MESSAGE_NEED_MORE_RESIDENTIAL) // 1: More residential zones needed. + .value("MESSAGE_NEED_MORE_COMMERCIAL", MESSAGE_NEED_MORE_COMMERCIAL) // 2: More commercial zones needed. + .value("MESSAGE_NEED_MORE_INDUSTRIAL", MESSAGE_NEED_MORE_INDUSTRIAL) // 3: More industrial zones needed. + .value("MESSAGE_NEED_MORE_ROADS", MESSAGE_NEED_MORE_ROADS) // 4: More roads required. + .value("MESSAGE_NEED_MORE_RAILS", MESSAGE_NEED_MORE_RAILS) // 5: Inadequate rail system. + .value("MESSAGE_NEED_ELECTRICITY", MESSAGE_NEED_ELECTRICITY) // 6: Build a Power Plant. + .value("MESSAGE_NEED_STADIUM", MESSAGE_NEED_STADIUM) // 7: Residents demand a Stadium. + .value("MESSAGE_NEED_SEAPORT", MESSAGE_NEED_SEAPORT) // 8: Industry requires a Sea Port. + .value("MESSAGE_NEED_AIRPORT", MESSAGE_NEED_AIRPORT) // 9: Commerce requires an Airport. + .value("MESSAGE_HIGH_POLLUTION", MESSAGE_HIGH_POLLUTION) // 10: Pollution very high. + .value("MESSAGE_HIGH_CRIME", MESSAGE_HIGH_CRIME) // 11: Crime very high. + .value("MESSAGE_TRAFFIC_JAMS", MESSAGE_TRAFFIC_JAMS) // 12: Frequent traffic jams reported. + .value("MESSAGE_NEED_FIRE_STATION", MESSAGE_NEED_FIRE_STATION) // 13: Citizens demand a Fire Department. + .value("MESSAGE_NEED_POLICE_STATION", MESSAGE_NEED_POLICE_STATION) // 14: Citizens demand a Police Department. + .value("MESSAGE_BLACKOUTS_REPORTED", MESSAGE_BLACKOUTS_REPORTED) // 15: Blackouts reported. Check power map. + .value("MESSAGE_TAX_TOO_HIGH", MESSAGE_TAX_TOO_HIGH) // 16: Citizens upset. The tax rate is too high. + .value("MESSAGE_ROAD_NEEDS_FUNDING", MESSAGE_ROAD_NEEDS_FUNDING) // 17: Roads deteriorating, due to lack of funds. + .value("MESSAGE_FIRE_STATION_NEEDS_FUNDING", MESSAGE_FIRE_STATION_NEEDS_FUNDING) // 18: Fire departments need funding. + .value("MESSAGE_POLICE_NEEDS_FUNDING", MESSAGE_POLICE_NEEDS_FUNDING) // 19: Police departments need funding. + .value("MESSAGE_FIRE_REPORTED", MESSAGE_FIRE_REPORTED) // 20: Fire reported! + .value("MESSAGE_MONSTER_SIGHTED", MESSAGE_MONSTER_SIGHTED) // 21: A Monster has been sighted!! + .value("MESSAGE_TORNADO_SIGHTED", MESSAGE_TORNADO_SIGHTED) // 22: Tornado reported!! + .value("MESSAGE_EARTHQUAKE", MESSAGE_EARTHQUAKE) // 23: Major earthquake reported!!! + .value("MESSAGE_PLANE_CRASHED", MESSAGE_PLANE_CRASHED) // 24: A plane has crashed! + .value("MESSAGE_SHIP_CRASHED", MESSAGE_SHIP_CRASHED) // 25: Shipwreck reported! + .value("MESSAGE_TRAIN_CRASHED", MESSAGE_TRAIN_CRASHED) // 26: A train crashed! + .value("MESSAGE_HELICOPTER_CRASHED", MESSAGE_HELICOPTER_CRASHED) // 27: A helicopter crashed! + .value("MESSAGE_HIGH_UNEMPLOYMENT", MESSAGE_HIGH_UNEMPLOYMENT) // 28: Unemployment rate is high. + .value("MESSAGE_NO_MONEY", MESSAGE_NO_MONEY) // 29: YOUR CITY HAS GONE BROKE! + .value("MESSAGE_FIREBOMBING", MESSAGE_FIREBOMBING) // 30: Firebombing reported! + .value("MESSAGE_NEED_MORE_PARKS", MESSAGE_NEED_MORE_PARKS) // 31: Need more parks. + .value("MESSAGE_EXPLOSION_REPORTED", MESSAGE_EXPLOSION_REPORTED) // 32: Explosion detected! + .value("MESSAGE_NOT_ENOUGH_FUNDS", MESSAGE_NOT_ENOUGH_FUNDS) // 33: Insufficient funds to build that. + .value("MESSAGE_BULLDOZE_AREA_FIRST", MESSAGE_BULLDOZE_AREA_FIRST) // 34: Area must be bulldozed first. + .value("MESSAGE_REACHED_TOWN", MESSAGE_REACHED_TOWN) // 35: Population has reached 2,000. + .value("MESSAGE_REACHED_CITY", MESSAGE_REACHED_CITY) // 36: Population has reached 10,000. + .value("MESSAGE_REACHED_CAPITAL", MESSAGE_REACHED_CAPITAL) // 37: Population has reached 50,000. + .value("MESSAGE_REACHED_METROPOLIS", MESSAGE_REACHED_METROPOLIS) // 38: Population has reached 100,000. + .value("MESSAGE_REACHED_MEGALOPOLIS", MESSAGE_REACHED_MEGALOPOLIS) // 39: Population has reached 500,000. + .value("MESSAGE_NOT_ENOUGH_POWER", MESSAGE_NOT_ENOUGH_POWER) // 40: Brownouts, build another Power Plant. + .value("MESSAGE_HEAVY_TRAFFIC", MESSAGE_HEAVY_TRAFFIC) // 41: Heavy Traffic reported. + .value("MESSAGE_FLOODING_REPORTED", MESSAGE_FLOODING_REPORTED) // 42: Flooding reported!! + .value("MESSAGE_NUCLEAR_MELTDOWN", MESSAGE_NUCLEAR_MELTDOWN) // 43: A Nuclear Meltdown has occurred!!! + .value("MESSAGE_RIOTS_REPORTED", MESSAGE_RIOTS_REPORTED) // 44: They're rioting in the streets!! + .value("MESSAGE_STARTED_NEW_CITY", MESSAGE_STARTED_NEW_CITY) // 45: Started a New City. + .value("MESSAGE_LOADED_SAVED_CITY", MESSAGE_LOADED_SAVED_CITY) // 46: Restored a Saved City. + .value("MESSAGE_SCENARIO_WON", MESSAGE_SCENARIO_WON) // 47: You won the scenario. + .value("MESSAGE_SCENARIO_LOST", MESSAGE_SCENARIO_LOST) // 48: You lose the scenario. + .value("MESSAGE_ABOUT_MICROPOLIS", MESSAGE_ABOUT_MICROPOLIS) // 49: About Micropolis. + .value("MESSAGE_SCENARIO_DULLSVILLE", MESSAGE_SCENARIO_DULLSVILLE) // 50: Dullsville scenario. + .value("MESSAGE_SCENARIO_SAN_FRANCISCO", MESSAGE_SCENARIO_SAN_FRANCISCO) // 51: San Francisco scenario. + .value("MESSAGE_SCENARIO_HAMBURG", MESSAGE_SCENARIO_HAMBURG) // 52: Hamburg scenario. + .value("MESSAGE_SCENARIO_BERN", MESSAGE_SCENARIO_BERN) // 53: Bern scenario. + .value("MESSAGE_SCENARIO_TOKYO", MESSAGE_SCENARIO_TOKYO) // 54: Tokyo scenario. + .value("MESSAGE_SCENARIO_DETROIT", MESSAGE_SCENARIO_DETROIT) // 55: Detroit scenario. + .value("MESSAGE_SCENARIO_BOSTON", MESSAGE_SCENARIO_BOSTON) // 56: Boston scenario. + .value("MESSAGE_SCENARIO_RIO_DE_JANEIRO", MESSAGE_SCENARIO_RIO_DE_JANEIRO) // 57: Rio de Janeiro scenario. + .value("MESSAGE_LAST", MESSAGE_LAST) // 57: Last valid message + ; + + // frontendmessage.h TODO + + // The FrontendMessage class is defined as an abstract base class with pure_virtual() + // for the sendMessage method. + // FrontendMessageDidTool and FrontendMessageMakeSound are bound as subclasses of FrontendMessage. + // The allow_subclass method is used to register them as valid subclasses. + // Constructors and properties are exposed for FrontendMessageDidTool and + // FrontendMessageMakeSound to create instances and access their members in JavaScript. + +/* + class_("FrontendMessage") + .smart_ptr>("shared_ptr") + .allow_subclass("FrontendMessageDidTool") + .allow_subclass("FrontendMessageMakeSound") + .function("sendMessage", &FrontendMessage::sendMessage, pure_virtual()) + ; + + class_>("FrontendMessageDidTool") + .constructor() + .property("tool", &FrontendMessageDidTool::tool) + .property("x", &FrontendMessageDidTool::x) + .property("y", &FrontendMessageDidTool::y) + ; + + class_>("FrontendMessageMakeSound") + .constructor() + .property("channel", &FrontendMessageMakeSound::channel) + .property("sound", &FrontendMessageMakeSound::sound) + .property("x", &FrontendMessageMakeSound::x) + .property("y", &FrontendMessageMakeSound::y) + ; +*/ + + // micropolis.h + + constant("WORLD_W", WORLD_W); + constant("WORLD_H", WORLD_H); + constant("BITS_PER_TILE", BITS_PER_TILE); + constant("BYTES_PER_TILE", BYTES_PER_TILE); + constant("WORLD_W_2", WORLD_W_2); + constant("WORLD_H_2", WORLD_H_2); + constant("WORLD_W_4", WORLD_W_4); + constant("WORLD_H_4", WORLD_H_4); + constant("WORLD_W_8", WORLD_W_8); + constant("WORLD_H_8", WORLD_H_8); + constant("EDITOR_TILE_SIZE", EDITOR_TILE_SIZE); + constant("PASSES_PER_CITYTIME", PASSES_PER_CITYTIME); + constant("CITYTIMES_PER_MONTH", CITYTIMES_PER_MONTH); + constant("CITYTIMES_PER_YEAR", CITYTIMES_PER_YEAR); + constant("HISTORY_LENGTH", HISTORY_LENGTH); + constant("MISC_HISTORY_LENGTH", MISC_HISTORY_LENGTH); + constant("HISTORY_COUNT", HISTORY_COUNT); + constant("POWER_STACK_SIZE", POWER_STACK_SIZE); + constant("NOWHERE", NOWHERE); + constant("ISLAND_RADIUS", ISLAND_RADIUS); + constant("MAX_TRAFFIC_DISTANCE", MAX_TRAFFIC_DISTANCE); + constant("MAX_ROAD_EFFECT", MAX_ROAD_EFFECT); + constant("MAX_POLICE_STATION_EFFECT", MAX_POLICE_STATION_EFFECT); + constant("MAX_FIRE_STATION_EFFECT", MAX_FIRE_STATION_EFFECT); + constant("RES_VALVE_RANGE", RES_VALVE_RANGE); + constant("COM_VALVE_RANGE", COM_VALVE_RANGE); + constant("IND_VALVE_RANGE", IND_VALVE_RANGE); + + emscripten::enum_("HistoryType") + .value("HISTORY_TYPE_RES", HISTORY_TYPE_RES) + .value("HISTORY_TYPE_COM", HISTORY_TYPE_COM) + .value("HISTORY_TYPE_IND", HISTORY_TYPE_IND) + .value("HISTORY_TYPE_MONEY", HISTORY_TYPE_MONEY) + .value("HISTORY_TYPE_CRIME", HISTORY_TYPE_CRIME) + .value("HISTORY_TYPE_POLLUTION", HISTORY_TYPE_POLLUTION) + .value("HISTORY_TYPE_COUNT", HISTORY_TYPE_COUNT) + ; + + // HistoryScale + emscripten::enum_("HistoryScale") + .value("HISTORY_SCALE_SHORT", HISTORY_SCALE_SHORT) + .value("HISTORY_SCALE_LONG", HISTORY_SCALE_LONG) + .value("HISTORY_SCALE_COUNT", HISTORY_SCALE_COUNT) + ; + + // MapType + emscripten::enum_("MapType") + .value("MAP_TYPE_ALL", MAP_TYPE_ALL) + .value("MAP_TYPE_RES", MAP_TYPE_RES) + .value("MAP_TYPE_COM", MAP_TYPE_COM) + .value("MAP_TYPE_IND", MAP_TYPE_IND) + .value("MAP_TYPE_POWER", MAP_TYPE_POWER) + .value("MAP_TYPE_ROAD", MAP_TYPE_ROAD) + .value("MAP_TYPE_POPULATION_DENSITY", MAP_TYPE_POPULATION_DENSITY) + .value("MAP_TYPE_RATE_OF_GROWTH", MAP_TYPE_RATE_OF_GROWTH) + .value("MAP_TYPE_TRAFFIC_DENSITY", MAP_TYPE_TRAFFIC_DENSITY) + .value("MAP_TYPE_POLLUTION", MAP_TYPE_POLLUTION) + .value("MAP_TYPE_CRIME", MAP_TYPE_CRIME) + .value("MAP_TYPE_LAND_VALUE", MAP_TYPE_LAND_VALUE) + .value("MAP_TYPE_FIRE_RADIUS", MAP_TYPE_FIRE_RADIUS) + .value("MAP_TYPE_POLICE_RADIUS", MAP_TYPE_POLICE_RADIUS) + .value("MAP_TYPE_DYNAMIC", MAP_TYPE_DYNAMIC) + .value("MAP_TYPE_COUNT", MAP_TYPE_COUNT) + ; + + // SpriteType + emscripten::enum_("SpriteType") + .value("SPRITE_NOTUSED", SPRITE_NOTUSED) + .value("SPRITE_TRAIN", SPRITE_TRAIN) + .value("SPRITE_HELICOPTER", SPRITE_HELICOPTER) + .value("SPRITE_AIRPLANE", SPRITE_AIRPLANE) + .value("SPRITE_SHIP", SPRITE_SHIP) + .value("SPRITE_MONSTER", SPRITE_MONSTER) + .value("SPRITE_TORNADO", SPRITE_TORNADO) + .value("SPRITE_EXPLOSION", SPRITE_EXPLOSION) + .value("SPRITE_BUS", SPRITE_BUS) + .value("SPRITE_COUNT", SPRITE_COUNT) + ; + + // ConnectTileCommand + emscripten::enum_("ConnectTileCommand") + .value("CONNECT_TILE_FIX", CONNECT_TILE_FIX) + .value("CONNECT_TILE_BULLDOZE", CONNECT_TILE_BULLDOZE) + .value("CONNECT_TILE_ROAD", CONNECT_TILE_ROAD) + .value("CONNECT_TILE_RAILROAD", CONNECT_TILE_RAILROAD) + .value("CONNECT_TILE_WIRE", CONNECT_TILE_WIRE) + ; + + // ToolResult + emscripten::enum_("ToolResult") + .value("TOOLRESULT_NO_MONEY", TOOLRESULT_NO_MONEY) + .value("TOOLRESULT_NEED_BULLDOZE", TOOLRESULT_NEED_BULLDOZE) + .value("TOOLRESULT_FAILED", TOOLRESULT_FAILED) + .value("TOOLRESULT_OK", TOOLRESULT_OK) + ; + + // Scenario + emscripten::enum_("Scenario") + .value("SC_NONE", SC_NONE) + .value("SC_DULLSVILLE", SC_DULLSVILLE) + .value("SC_SAN_FRANCISCO", SC_SAN_FRANCISCO) + .value("SC_HAMBURG", SC_HAMBURG) + .value("SC_BERN", SC_BERN) + .value("SC_TOKYO", SC_TOKYO) + .value("SC_DETROIT", SC_DETROIT) + .value("SC_BOSTON", SC_BOSTON) + .value("SC_RIO", SC_RIO) + .value("SC_COUNT", SC_COUNT) + ; + + // ZoneType + emscripten::enum_("ZoneType") + .value("ZT_COMMERCIAL", ZT_COMMERCIAL) + .value("ZT_INDUSTRIAL", ZT_INDUSTRIAL) + .value("ZT_RESIDENTIAL", ZT_RESIDENTIAL) + .value("ZT_NUM_DESTINATIONS", ZT_NUM_DESTINATIONS) + ; + + // CityVotingProblems + emscripten::enum_("CityVotingProblems") + .value("CVP_CRIME", CVP_CRIME) + .value("CVP_POLLUTION", CVP_POLLUTION) + .value("CVP_HOUSING", CVP_HOUSING) + .value("CVP_TAXES", CVP_TAXES) + .value("CVP_TRAFFIC", CVP_TRAFFIC) + .value("CVP_UNEMPLOYMENT", CVP_UNEMPLOYMENT) + .value("CVP_FIRE", CVP_FIRE) + .value("CVP_NUMPROBLEMS", CVP_NUMPROBLEMS) + .value("CVP_PROBLEM_COMPLAINTS", CVP_PROBLEM_COMPLAINTS) + .value("PROBNUM", PROBNUM) + ; + + // CityClass + emscripten::enum_("CityClass") + .value("CC_VILLAGE", CC_VILLAGE) + .value("CC_TOWN", CC_TOWN) + .value("CC_CITY", CC_CITY) + .value("CC_CAPITAL", CC_CAPITAL) + .value("CC_METROPOLIS", CC_METROPOLIS) + .value("CC_MEGALOPOLIS", CC_MEGALOPOLIS) + .value("CC_NUM_CITIES", CC_NUM_CITIES) + ; + + // GameLevel + emscripten::enum_("GameLevel") + .value("LEVEL_EASY", LEVEL_EASY) + .value("LEVEL_MEDIUM", LEVEL_MEDIUM) + .value("LEVEL_HARD", LEVEL_HARD) + .value("LEVEL_COUNT", LEVEL_COUNT) + .value("LEVEL_FIRST", LEVEL_FIRST) + .value("LEVEL_LAST", LEVEL_LAST) + ; + + emscripten::enum_("Tiles") + .value("DIRT", DIRT) // 0: Clear tile + // tile 1 ? + // Water: + .value("RIVER", RIVER) // 2 + .value("REDGE", REDGE) // 3 + .value("CHANNEL", CHANNEL) // 4 + .value("FIRSTRIVEDGE", FIRSTRIVEDGE) // 5 + // tile 6 -- 19 ? + .value("LASTRIVEDGE", LASTRIVEDGE) // 20 + .value("WATER_LOW", WATER_LOW) // 2 (RIVER): First water tile + .value("WATER_HIGH", WATER_HIGH) // 20 (LASTRIVEDGE): Last water tile (inclusive) + .value("TREEBASE", TREEBASE) // 21 + .value("WOODS_LOW", WOODS_LOW) // 21 (TREEBASE) + .value("LASTTREE", LASTTREE) // 36 + .value("WOODS", WOODS) // 37 + .value("UNUSED_TRASH1", UNUSED_TRASH1) // 38 + .value("UNUSED_TRASH2", UNUSED_TRASH2) // 39 + .value("WOODS_HIGH", WOODS_HIGH) // 39 (UNUSED_TRASH2): Why is an 'UNUSED' tile used? + .value("WOODS2", WOODS2) // 40 + .value("WOODS3", WOODS3) // 41 + .value("WOODS4", WOODS4) // 42 + .value("WOODS5", WOODS5) // 43 + // Rubble (4 tiles) + .value("RUBBLE", RUBBLE) // 44 + .value("LASTRUBBLE", LASTRUBBLE) // 47 + .value("FLOOD", FLOOD) // 48 + // tile 49, 50 ? + .value("LASTFLOOD", LASTFLOOD) // 51 + .value("RADTILE", RADTILE) // 52: Radio-active contaminated tile + .value("UNUSED_TRASH3", UNUSED_TRASH3) // 53 + .value("UNUSED_TRASH4", UNUSED_TRASH4) // 54 + .value("UNUSED_TRASH5", UNUSED_TRASH5) // 55 + // Fire animation (8 tiles) + .value("FIRE", FIRE) // 56 + .value("FIREBASE", FIREBASE) // 56 (FIRE) + .value("LASTFIRE", LASTFIRE) // 63 + .value("HBRIDGE", HBRIDGE) // 64: Horizontal bridge + .value("ROADBASE", ROADBASE) // 64 (HBRIDGE) + .value("VBRIDGE", VBRIDGE) // 65: Vertical bridge + .value("ROADS", ROADS) // 66 + .value("ROADS2", ROADS2) // 67 + .value("ROADS3", ROADS3) // 68 + .value("ROADS4", ROADS4) // 69 + .value("ROADS5", ROADS5) // 70 + .value("ROADS6", ROADS6) // 71 + .value("ROADS7", ROADS7) // 72 + .value("ROADS8", ROADS8) // 73 + .value("ROADS9", ROADS9) // 74 + .value("ROADS10", ROADS10) // 75 + .value("INTERSECTION", INTERSECTION) // 76 + .value("HROADPOWER", HROADPOWER) // 77 + .value("VROADPOWER", VROADPOWER) // 78 + .value("BRWH", BRWH) // 79 + .value("LTRFBASE", LTRFBASE) // 80: First tile with low traffic + // tile 81 -- 94 ? + .value("BRWV", BRWV) // 95 + // tile 96 -- 110 ? + .value("BRWXXX1", BRWXXX1) // 111 + // tile 96 -- 110 ? + .value("BRWXXX2", BRWXXX2) // 127 + // tile 96 -- 110 ? + .value("BRWXXX3", BRWXXX3) // 143 + .value("HTRFBASE", HTRFBASE) // 144: First tile with high traffic + // tile 145 -- 158 ? + .value("BRWXXX4", BRWXXX4) // 159 + // tile 160 -- 174 ? + .value("BRWXXX5", BRWXXX5) // 175 + // tile 176 -- 190 ? + .value("BRWXXX6", BRWXXX6) // 191 + // tile 192 -- 205 ? + .value("LASTROAD", LASTROAD) // 206 + .value("BRWXXX7", BRWXXX7) // 207 + // Power lines + .value("HPOWER", HPOWER) // 208 + .value("VPOWER", VPOWER) // 209 + .value("LHPOWER", LHPOWER) // 210 + .value("LVPOWER", LVPOWER) // 211 + .value("LVPOWER2", LVPOWER2) // 212 + .value("LVPOWER3", LVPOWER3) // 213 + .value("LVPOWER4", LVPOWER4) // 214 + .value("LVPOWER5", LVPOWER5) // 215 + .value("LVPOWER6", LVPOWER6) // 216 + .value("LVPOWER7", LVPOWER7) // 217 + .value("LVPOWER8", LVPOWER8) // 218 + .value("LVPOWER9", LVPOWER9) // 219 + .value("LVPOWER10", LVPOWER10) // 220 + .value("RAILHPOWERV", RAILHPOWERV) // 221: Horizontal rail, vertical power + .value("RAILVPOWERH", RAILVPOWERH) // 222: Vertical rail, horizontal power + .value("POWERBASE", POWERBASE) // 208 (HPOWER) + .value("LASTPOWER", LASTPOWER) // 222 (RAILVPOWERH) + .value("UNUSED_TRASH6", UNUSED_TRASH6) // 223 + // Rail + .value("HRAIL", HRAIL) // 224 + .value("VRAIL", VRAIL) // 225 + .value("LHRAIL", LHRAIL) // 226 + .value("LVRAIL", LVRAIL) // 227 + .value("LVRAIL2", LVRAIL2) // 228 + .value("LVRAIL3", LVRAIL3) // 229 + .value("LVRAIL4", LVRAIL4) // 230 + .value("LVRAIL5", LVRAIL5) // 231 + .value("LVRAIL6", LVRAIL6) // 232 + .value("LVRAIL7", LVRAIL7) // 233 + .value("LVRAIL8", LVRAIL8) // 234 + .value("LVRAIL9", LVRAIL9) // 235 + .value("LVRAIL10", LVRAIL10) // 236 + .value("HRAILROAD", HRAILROAD) // 237 + .value("VRAILROAD", VRAILROAD) // 238 + .value("RAILBASE", RAILBASE) // 224 (HRAIL) + .value("LASTRAIL", LASTRAIL) // 238 (VRAILROAD) + .value("ROADVPOWERH", ROADVPOWERH) // 239: bogus? + // Residential zone tiles + .value("RESBASE", RESBASE) // 240: Empty residential, tiles 240--248 + .value("FREEZ", FREEZ) // 244: center-tile of 3x3 empty residential + .value("HOUSE", HOUSE) // 249: Single tile houses until 260 + .value("LHTHR", LHTHR) // 249 (HOUSE) + .value("HHTHR", HHTHR) // 260 + .value("RZB", RZB) // 265: center tile first 3x3 tile residential + .value("HOSPITALBASE", HOSPITALBASE) // 405: Center of hospital (tiles 405--413) + .value("HOSPITAL", HOSPITAL) // 409: Center of hospital (tiles 405--413) + .value("CHURCHBASE", CHURCHBASE) // 414: Center of church (tiles 414--422) + .value("CHURCH0BASE", CHURCH0BASE) // 414 (CHURCHBASE): numbered alias + .value("CHURCH", CHURCH) // 418: Center of church (tiles 414--422) + .value("CHURCH0", CHURCH0) // 418 (CHURCH): numbered alias + // Commercial zone tiles + .value("COMBASE", COMBASE) // 423: Empty commercial, tiles 423--431 + // tile 424 -- 426 ? + .value("COMCLR", COMCLR) // 427 + // tile 428 -- 435 ? + .value("CZB", CZB) // 436 + // tile 437 -- 608 ? + .value("COMLAST", COMLAST) // 609 + // tile 610, 611 ? + // Industrial zone tiles. + .value("INDBASE", INDBASE) // 612: Top-left tile of empty industrial zone. + .value("INDCLR", INDCLR) // 616: Center tile of empty industrial zone. + .value("LASTIND", LASTIND) // 620: Last tile of empty industrial zone. + // Industrial zone population 0, value 0: 621 -- 629 + .value("IND1", IND1) // 621: Top-left tile of first non-empty industry zone. + .value("IZB", IZB) // 625: Center tile of first non-empty industry zone. + // Industrial zone population 1, value 0: 630 -- 638 + // Industrial zone population 2, value 0: 639 -- 647 + .value("IND2", IND2) // 641 + .value("IND3", IND3) // 644 + // Industrial zone population 3, value 0: 648 -- 656 + .value("IND4", IND4) // 649 + .value("IND5", IND5) // 650 + // Industrial zone population 0, value 1: 657 -- 665 + // Industrial zone population 1, value 1: 666 -- 674 + // Industrial zone population 2, value 1: 675 -- 683 + .value("IND6", IND6) // 676 + .value("IND7", IND7) // 677 + // Industrial zone population 3, value 1: 684 -- 692 + .value("IND8", IND8) // 686 + .value("IND9", IND9) // 689 + // Seaport + .value("PORTBASE", PORTBASE) // 693: Top-left tile of the seaport. + .value("PORT", PORT) // 698: Center tile of the seaport. + .value("LASTPORT", LASTPORT) // 708: Last tile of the seaport. + .value("AIRPORTBASE", AIRPORTBASE) // 709 + // tile 710 ? + .value("RADAR", RADAR) // 711 + // tile 712 -- 715 ? + .value("AIRPORT", AIRPORT) // 716 + // tile 717 -- 744 ? + // Coal power plant (4x4). + .value("COALBASE", COALBASE) // 745: First tile of coal power plant. + .value("POWERPLANT", POWERPLANT) // 750: 'Center' tile of coal power plant. + .value("LASTPOWERPLANT", LASTPOWERPLANT) // 760: Last tile of coal power plant. + // Fire station (3x3). + .value("FIRESTBASE", FIRESTBASE) // 761: First tile of fire station. + .value("FIRESTATION", FIRESTATION) // 765: 'Center tile' of fire station. + // 769 last tile fire station. + .value("POLICESTBASE", POLICESTBASE) // 770 + // tile 771 -- 773 ? + .value("POLICESTATION", POLICESTATION) // 774 + // tile 775 -- 778 ? + // Stadium (4x4). + .value("STADIUMBASE", STADIUMBASE) // 779: First tile stadium. + .value("STADIUM", STADIUM) // 784: 'Center tile' stadium. + // Last tile stadium 794. + // tile 785 -- 799 ? + .value("FULLSTADIUM", FULLSTADIUM) // 800 + // tile 801 -- 810 ? + // Nuclear power plant (4x4). + .value("NUCLEARBASE", NUCLEARBASE) // 811: First tile nuclear power plant. + .value("NUCLEAR", NUCLEAR) // 816: 'Center' tile nuclear power plant. + .value("LASTZONE", LASTZONE) // 826: Also last tile nuclear power plant. + .value("LIGHTNINGBOLT", LIGHTNINGBOLT) // 827 + .value("HBRDG0", HBRDG0) // 828 + .value("HBRDG1", HBRDG1) // 829 + .value("HBRDG2", HBRDG2) // 830 + .value("HBRDG3", HBRDG3) // 831 + .value("HBRDG_END", HBRDG_END) // 832 + .value("RADAR0", RADAR0) // 832 + .value("RADAR1", RADAR1) // 833 + .value("RADAR2", RADAR2) // 834 + .value("RADAR3", RADAR3) // 835 + .value("RADAR4", RADAR4) // 836 + .value("RADAR5", RADAR5) // 837 + .value("RADAR6", RADAR6) // 838 + .value("RADAR7", RADAR7) // 839 + .value("FOUNTAIN", FOUNTAIN) // 840 + // tile 841 -- 843: fountain animation. + .value("INDBASE2", INDBASE2) // 844 + .value("TELEBASE", TELEBASE) // 844 (INDBASE2) + // tile 845 -- 850 ? + .value("TELELAST", TELELAST) // 851 + .value("SMOKEBASE", SMOKEBASE) // 852 + // tile 853 -- 859 ? + .value("TINYEXP", TINYEXP) // 860 + // tile 861 -- 863 ? + .value("SOMETINYEXP", SOMETINYEXP) // 864 + // tile 865 -- 866 ? + .value("LASTTINYEXP", LASTTINYEXP) // 867 + // tile 868 -- 882 ? + .value("TINYEXPLAST", TINYEXPLAST) // 883 + // tile 884 -- 915 ? + .value("COALSMOKE1", COALSMOKE1) // 916: Chimney animation at coal power plant (2, 0). + // 919 last animation tile for chimney at coal power plant (2, 0). + .value("COALSMOKE2", COALSMOKE2) // 920: Chimney animation at coal power plant (3, 0). + // 923 last animation tile for chimney at coal power plant (3, 0). + .value("COALSMOKE3", COALSMOKE3) // 924: Chimney animation at coal power plant (2, 1). + // 927 last animation tile for chimney at coal power plant (2, 1). + .value("COALSMOKE4", COALSMOKE4) // 928: Chimney animation at coal power plant (3, 1). + // 931 last animation tile for chimney at coal power plant (3, 1). + .value("FOOTBALLGAME1", FOOTBALLGAME1) // 932 + // tile 933 -- 939 ? + .value("FOOTBALLGAME2", FOOTBALLGAME2) // 940 + // tile 941 -- 947 ? + .value("VBRDG0", VBRDG0) // 948 + .value("VBRDG1", VBRDG1) // 949 + .value("VBRDG2", VBRDG2) // 950 + .value("VBRDG3", VBRDG3) // 951 + .value("NUKESWIRL1", NUKESWIRL1) // 952 + .value("NUKESWIRL2", NUKESWIRL2) // 953 + .value("NUKESWIRL3", NUKESWIRL3) // 954 + .value("NUKESWIRL4", NUKESWIRL4) // 955 + // Tiles 956-959 unused (originally) + // TILE_COUNT = 960, + // Extended zones: 956-1019 + .value("CHURCH1BASE", CHURCH1BASE) // 956 + .value("CHURCH1", CHURCH1) // 960 + .value("CHURCH1BASE", CHURCH1BASE) // 956 + .value("CHURCH1", CHURCH1) // 960 + .value("CHURCH2BASE", CHURCH2BASE) // 965 + .value("CHURCH2", CHURCH2) // 969 + .value("CHURCH3BASE", CHURCH3BASE) // 974 + .value("CHURCH3", CHURCH3) // 978 + .value("CHURCH4BASE", CHURCH4BASE) // 983 + .value("CHURCH4", CHURCH4) // 987 + .value("CHURCH5BASE", CHURCH5BASE) // 992 + .value("CHURCH5", CHURCH5) // 996 + .value("CHURCH6BASE", CHURCH6BASE) // 1001 + .value("CHURCH6", CHURCH6) // 1005 + .value("CHURCH7BASE", CHURCH7BASE) // 1010 + .value("CHURCH7", CHURCH7) // 1014 + .value("CHURCH7LAST", CHURCH7LAST) // 1018 + // Tiles 1020-1023 unused + .value("TILE_COUNT", TILE_COUNT) // 1024 + .value("TILE_INVALID", TILE_INVALID) // -1, Invalid tile (not used in the world map). + ; + + class_("SimSprite") + .property("name", &SimSprite::name) + .property("type", &SimSprite::type) + .property("frame", &SimSprite::frame) + .property("x", &SimSprite::x) + .property("y", &SimSprite::y) + .property("width", &SimSprite::width) + .property("height", &SimSprite::height) + .property("xOffset", &SimSprite::xOffset) + .property("yOffset", &SimSprite::yOffset) + .property("xHot", &SimSprite::xHot) + .property("yHot", &SimSprite::yHot) + .property("origX", &SimSprite::origX) + .property("origY", &SimSprite::origY) + .property("destX", &SimSprite::destX) + .property("destY", &SimSprite::destY) + .property("count", &SimSprite::count) + .property("soundCount", &SimSprite::soundCount) + .property("dir", &SimSprite::dir) + .property("newDir", &SimSprite::newDir) + .property("step", &SimSprite::step) + .property("flag", &SimSprite::flag) + .property("control", &SimSprite::control) + .property("turn", &SimSprite::turn) + .property("accel", &SimSprite::accel) + .property("speed", &SimSprite::speed) + ; + + class_("Micropolis") + + .constructor<>() + + // Simulation Control and Settings + .function("simTick", &Micropolis::simTick) + .function("setSpeed", &Micropolis::setSpeed) + .function("setGameLevel", &Micropolis::setGameLevel) + .function("setCityName", &Micropolis::setCityName) + .function("setYear", &Micropolis::setYear) + .function("pause", &Micropolis::pause) + .function("resume", &Micropolis::resume) + .function("setEnableDisasters", &Micropolis::setEnableDisasters) + .function("setAutoBudget", &Micropolis::setAutoBudget) + .function("setAutoBulldoze", &Micropolis::setAutoBulldoze) + .function("setAutoGoto", &Micropolis::setAutoGoto) + .function("setEnableSound", &Micropolis::setEnableSound) + .function("setDoAnimation", &Micropolis::setDoAnimation) + .function("doNewGame", &Micropolis::doNewGame) + .function("doBudget", &Micropolis::doBudget) + .function("doScoreCard", &Micropolis::doScoreCard) + .function("updateFunds", &Micropolis::updateFunds) + + // Game State and Statistics + .property("simSpeed", &Micropolis::simSpeed) + .property("simSpeedMeta", &Micropolis::simSpeedMeta) + .property("simPaused", &Micropolis::simPaused) + .property("disasterEvent", &Micropolis::disasterEvent) + .property("disasterWait", &Micropolis::disasterWait) + .property("scenario", &Micropolis::scenario) + .property("heatSteps", &Micropolis::heatSteps) + .property("heatFlow", &Micropolis::heatFlow) + .property("heatRule", &Micropolis::heatRule) + .property("heatWrap", &Micropolis::heatWrap) + .property("totalFunds", &Micropolis::totalFunds) + .property("cityPop", &Micropolis::cityPop) + .property("cityTime", &Micropolis::cityTime) + .property("cityYear", &Micropolis::cityYear) + .property("cityMonth", &Micropolis::cityMonth) + .property("cityYes", &Micropolis::cityYes) + .property("cityScore", &Micropolis::cityScore) + .property("cityClass", &Micropolis::cityClass) + .property("gameLevel", &Micropolis::gameLevel) + .property("mapSerial", &Micropolis::mapSerial) + .property("trafficAverage", &Micropolis::trafficAverage) + .property("pollutionAverage", &Micropolis::pollutionAverage) + .property("crimeAverage", &Micropolis::crimeAverage) + .property("landValueAverage", &Micropolis::landValueAverage) + .property("startingYear", &Micropolis::startingYear) + .property("generatedCitySeed", &Micropolis::generatedCitySeed) + .property("cityPopDelta", &Micropolis::cityPopDelta) + .property("cityAssessedValue", &Micropolis::cityAssessedValue) + .property("cityScoreDelta", &Micropolis::cityScoreDelta) + .property("trafficAverage", &Micropolis::trafficAverage) + .property("pollutionAverage", &Micropolis::pollutionAverage) + .property("crimeAverage", &Micropolis::crimeAverage) + .property("totalPop", &Micropolis::totalPop) + .property("totalZonePop", &Micropolis::totalZonePop) + .property("hospitalPop", &Micropolis::hospitalPop) + .property("churchPop", &Micropolis::churchPop) + .property("stadiumPop", &Micropolis::stadiumPop) + .property("coalPowerPop", &Micropolis::coalPowerPop) + .property("nuclearPowerPop", &Micropolis::nuclearPowerPop) + + // Resource Management + .property("roadTotal", &Micropolis::roadTotal) + .property("railTotal", &Micropolis::railTotal) + .property("resPop", &Micropolis::resPop) + .property("comPop", &Micropolis::comPop) + .property("indPop", &Micropolis::indPop) + .property("policeStationPop", &Micropolis::policeStationPop) + .property("fireStationPop", &Micropolis::fireStationPop) + .property("seaportPop", &Micropolis::seaportPop) + .property("airportPop", &Micropolis::airportPop) + .property("cashFlow", &Micropolis::cashFlow) + .property("cityTax", &Micropolis::cityTax) + .property("roadEffect", &Micropolis::roadEffect) + .property("policeEffect", &Micropolis::policeEffect) + .property("fireEffect", &Micropolis::fireEffect) + + // User Interface and Preferences + .property("autoGoto", &Micropolis::autoGoto) + .property("autoBudget", &Micropolis::autoBudget) + .property("autoBulldoze", &Micropolis::autoBulldoze) + .property("enableSound", &Micropolis::enableSound) + .property("enableDisasters", &Micropolis::enableDisasters) + .property("doAnimation", &Micropolis::doAnimation) + .property("doMessages", &Micropolis::doMessages) + .property("doNotices", &Micropolis::doNotices) + + // Gameplay Mechanics + .property("cityFileName", &Micropolis::cityFileName) + .property("cityName", &Micropolis::cityName) + .function("doTool", &Micropolis::doTool) + .function("generateMap", &Micropolis::generateMap) + .function("clearMap", &Micropolis::clearMap) + //.function("getDemands", &Micropolis::getDemands, allow_raw_pointers()) // TODO: wrap + + // Random Number Generation + .function("simRandom", &Micropolis::simRandom) + .function("getRandom", &Micropolis::getRandom) + .function("getRandom16", &Micropolis::getRandom16) + .function("getRandom16Signed", &Micropolis::getRandom16Signed) + .function("getERandom", &Micropolis::getERandom) + .function("randomlySeedRandom", &Micropolis::randomlySeedRandom) + .function("seedRandom", &Micropolis::seedRandom) + + // Game State and Data Access + .function("getTile", &Micropolis::getTile) + .function("setTile", &Micropolis::setTile) + .function("setFunds", &Micropolis::setFunds) + .function("updateMaps", &Micropolis::updateMaps) + .function("updateGraphs", &Micropolis::updateGraphs) + .function("updateEvaluation", &Micropolis::updateEvaluation) + .function("updateBudget", &Micropolis::updateBudget) + + // City History Arrays + //.function("getResidentialHistory", &Micropolis::getResidentialHistory, allow_raw_pointers()) // TODO: wrap + //.function("getCommercialHistory", &Micropolis::getCommercialHistory, allow_raw_pointers()) // TODO: wrap + //.function("getIndustrialHistory", &Micropolis::getIndustrialHistory, allow_raw_pointers()) // TODO: wrap + + // Events and Callbacks + .function("sendMessage", &Micropolis::sendMessage) + .function("makeSound", &Micropolis::makeSound) + + ; + +} + + +//////////////////////////////////////////////////////////////////////// diff --git a/core/evaluate.cpp b/core/evaluate.cpp new file mode 100644 index 0000000..6d41d5e --- /dev/null +++ b/core/evaluate.cpp @@ -0,0 +1,573 @@ +/* evaluate.cpp + * + * Micropolis, Unix Version. This game was released for the Unix platform + * in or about 1990 and has been modified for inclusion in the One Laptop + * Per Child program. Copyright (C) 1989 - 2007 Electronic Arts Inc. If + * you need assistance with this program, you may contact: + * http://wiki.laptop.org/go/Micropolis or email micropolis@laptop.org. + * + * This program 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. + * + * This program 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 this program. If + * not, see . + * + * ADDITIONAL TERMS per GNU GPL Section 7 + * + * No trademark or publicity rights are granted. This license does NOT + * give you any right, title or interest in the trademark SimCity or any + * other Electronic Arts trademark. You may not distribute any + * modification of this program using the trademark SimCity or claim any + * affliation or association with Electronic Arts Inc. or its employees. + * + * Any propagation or conveyance of this program must include this + * copyright notice and these terms. + * + * If you convey this program (or any modifications of it) and assume + * contractual liability for the program to recipients of it, you agree + * to indemnify Electronic Arts for any liability that those contractual + * assumptions impose on Electronic Arts. + * + * You may not misrepresent the origins of this program; modified + * versions of the program must be marked as such and not identified as + * the original program. + * + * This disclaimer supplements the one included in the General Public + * License. TO THE FULLEST EXTENT PERMISSIBLE UNDER APPLICABLE LAW, THIS + * PROGRAM IS PROVIDED TO YOU "AS IS," WITH ALL FAULTS, WITHOUT WARRANTY + * OF ANY KIND, AND YOUR USE IS AT YOUR SOLE RISK. THE ENTIRE RISK OF + * SATISFACTORY QUALITY AND PERFORMANCE RESIDES WITH YOU. ELECTRONIC ARTS + * DISCLAIMS ANY AND ALL EXPRESS, IMPLIED OR STATUTORY WARRANTIES, + * INCLUDING IMPLIED WARRANTIES OF MERCHANTABILITY, SATISFACTORY QUALITY, + * FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT OF THIRD PARTY + * RIGHTS, AND WARRANTIES (IF ANY) ARISING FROM A COURSE OF DEALING, + * USAGE, OR TRADE PRACTICE. ELECTRONIC ARTS DOES NOT WARRANT AGAINST + * INTERFERENCE WITH YOUR ENJOYMENT OF THE PROGRAM; THAT THE PROGRAM WILL + * MEET YOUR REQUIREMENTS; THAT OPERATION OF THE PROGRAM WILL BE + * UNINTERRUPTED OR ERROR-FREE, OR THAT THE PROGRAM WILL BE COMPATIBLE + * WITH THIRD PARTY SOFTWARE OR THAT ANY ERRORS IN THE PROGRAM WILL BE + * CORRECTED. NO ORAL OR WRITTEN ADVICE PROVIDED BY ELECTRONIC ARTS OR + * ANY AUTHORIZED REPRESENTATIVE SHALL CREATE A WARRANTY. SOME + * JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF OR LIMITATIONS ON IMPLIED + * WARRANTIES OR THE LIMITATIONS ON THE APPLICABLE STATUTORY RIGHTS OF A + * CONSUMER, SO SOME OR ALL OF THE ABOVE EXCLUSIONS AND LIMITATIONS MAY + * NOT APPLY TO YOU. + */ + +/** + * @file evaluate.cpp + * @brief Evaluation and scoring for Micropolis city simulation. + * + * This file is part of the Micropolis game engine and handles the + * evaluation and scoring aspects of a simulated city. It includes + * functions to assess city value, compute population, classify city + * based on population, evaluate city problems, vote on performance of + * the mayor, and calculate the overall city score. The scoring system + * considers various factors like crime, pollution, city class, road + * effectiveness, and more to determine the success and challenges of + * the city management. + */ + + +//////////////////////////////////////////////////////////////////////// + + +#include "micropolis.h" + + +//////////////////////////////////////////////////////////////////////// + + +/** + * @todo: These strings should not be hard coded into the core simulator. + * The scripting language should look them up in translation files. + */ + +// City Classes: +// "VILLAGE", "TOWN", "CITY", "CAPITAL", "METROPOLIS", "MEGALOPOLIS" + +// City Levels: +// "Easy", "Medium", "Hard" + +// City Problems: +// "CRIME", "POLLUTION", "HOUSING COSTS", "TAXES", +// "TRAFFIC", "UNEMPLOYMENT", "FIRES" + + +//////////////////////////////////////////////////////////////////////// + + +/** + * Evaluate city + * @todo Handle lack of voting explicitly + */ +void Micropolis::cityEvaluation() +{ + //printf("cityEvaluation totalPop %d\n", totalPop); + if (totalPop > 0) { + short problemTable[PROBNUM]; // Score for each problem, higher the more severe the problem is. + for (int z = 0; z < PROBNUM; z++) { + problemTable[z] = 0; + } + + getAssessedValue(); + doPopNum(); + doProblems(problemTable); + getScore(problemTable); + doVotes(); // How well is the mayor doing? + changeEval(); + } else { + evalInit(); + cityYes = 50; // No population => no voting. Let's say 50/50. + changeEval(); + } +} + + +/** + * Initialize evaluation variables + */ +void Micropolis::evalInit() +{ + cityYes = 0; + cityPop = 0; + cityPopDelta = 0; + cityAssessedValue = 0; + cityClass = CC_VILLAGE; + cityScore = 500; + cityScoreDelta = 0; + for (int i = 0; i < PROBNUM; i++) { + problemVotes[i] = 0; + } + for (int i = 0; i < CVP_PROBLEM_COMPLAINTS; i++) { + problemOrder[i] = CVP_NUMPROBLEMS; + } +} + + +/** + * Assess value of the city. + * @post #cityAssessedValue contains the total city value. + * @todo Make function return the value, or change the name of the function. + */ +void Micropolis::getAssessedValue() +{ + Quad z; + + z = roadTotal * 5; + z += railTotal * 10; + z += policeStationPop * 1000; + z += fireStationPop * 1000; + z += hospitalPop * 400; + z += stadiumPop * 3000; + z += seaportPop * 5000; + z += airportPop * 10000; + z += coalPowerPop * 3000; + z += nuclearPowerPop * 6000; + + cityAssessedValue = z * 1000; +} + + +/** + * Compute city population and city classification. + * @see cityPop cityClass. + */ +void Micropolis::doPopNum() +{ + Quad oldCityPop = cityPop; + + cityPop = getPopulation(); + + if (oldCityPop == -1) { + oldCityPop = cityPop; + } + + cityPopDelta = cityPop - oldCityPop; + cityClass = getCityClass(cityPop); +} + +/** Compute city population. */ +Quad Micropolis::getPopulation() +{ + Quad pop = (resPop + (comPop + indPop) * 8L) * 20L; + return pop; +} + + +/** + * Classify the city based on its population. + * @param cityPopulation Number of people in the city. + * @return City classification. + * @todo Put people counts into a table. + */ +CityClass Micropolis::getCityClass(Quad cityPopulation) +{ + CityClass cityClassification = CC_VILLAGE; + + if (cityPopulation > 2000) { + cityClassification = CC_TOWN; + } + if (cityPopulation > 10000) { + cityClassification = CC_CITY; + } + if (cityPopulation > 50000) { + cityClassification = CC_CAPITAL; + } + if (cityPopulation > 100000) { + cityClassification = CC_METROPOLIS; + } + if (cityPopulation > 500000) { + cityClassification = CC_MEGALOPOLIS; + } + + return cityClassification; +} + +/** + * Evaluate problems of the city, take votes, and decide which are the most + * important ones. + * @param problemTable Storage of how bad each problem is. + * @post \a problemTable contains severity of each problem, + * #problemVotes contains votes of each problem, + * #problemOrder contains (in decreasing order) the worst problems. + */ +void Micropolis::doProblems(short problemTable[PROBNUM]) +{ + bool problemTaken[PROBNUM]; // Which problems are taken? + + for (int z = 0; z < PROBNUM; z++) { + problemTaken[z] = false; + problemTable[z] = 0; + } + + problemTable[CVP_CRIME] = crimeAverage; /* Crime */ + problemTable[CVP_POLLUTION] = pollutionAverage; /* Pollution */ + problemTable[CVP_HOUSING] = landValueAverage * 7 / 10; /* Housing */ + problemTable[CVP_TAXES] = cityTax * 10; /* Taxes */ + problemTable[CVP_TRAFFIC] = getTrafficAverage(); /* Traffic */ + problemTable[CVP_UNEMPLOYMENT] = getUnemployment(); /* Unemployment */ + problemTable[CVP_FIRE] = getFireSeverity(); /* Fire */ + voteProblems(problemTable); + + for (int z = 0; z < CVP_PROBLEM_COMPLAINTS; z++) { + // Find biggest problem not taken yet + int maxVotes = 0; + int bestProblem = CVP_NUMPROBLEMS; + for (int i = 0; i < CVP_NUMPROBLEMS; i++) { + if ((problemVotes[i] > maxVotes) && (!problemTaken[i])) { + bestProblem = i; + maxVotes = problemVotes[i]; + } + } + + // bestProblem == CVP_NUMPROBLEMS means no problem found + problemOrder[z] = bestProblem; + if (bestProblem < CVP_NUMPROBLEMS) { + problemTaken[bestProblem] = true; + } + // else: No problem found. + // Repeating the procedure will give the same result. + // Optimize by filling all remaining entries, and breaking out + } +} + + +/** + * Vote on the problems of the city. + * @param problemTable Storage of how bad each problem is. + * + * @post problemVotes contains the vote counts + */ +void Micropolis::voteProblems(const short problemTable[PROBNUM]) +{ + for (int z = 0; z < PROBNUM; z++) { + problemVotes[z] = 0; + } + + int problem = 0; // Problem to vote for + int voteCount = 0; // Number of votes + int loopCount = 0; // Number of attempts + while (voteCount < 100 && loopCount < 600) { + if (getRandom(300) < problemTable[problem]) { + problemVotes[problem]++; + voteCount++; + } + problem++; + if (problem > PROBNUM) { + problem = 0; + } + loopCount++; + } +} + + +/** + * Compute average traffic in the city. + * @return Value representing how large the traffic problem is. + */ +short Micropolis::getTrafficAverage() +{ + Quad trafficTotal; + short x, y, count; + + trafficTotal = 0; + count = 1; + for (x=0; x < WORLD_W; x += landValueMap.MAP_BLOCKSIZE) { + for (y=0; y < WORLD_H; y += landValueMap.MAP_BLOCKSIZE) { + if (landValueMap.worldGet(x, y) > 0) { + trafficTotal += trafficDensityMap.worldGet(x, y); + count++; + } + } + } + + trafficAverage = (short)((trafficTotal / count) * 2.4); + + return trafficAverage; +} + + +/** + * Compute severity of unemployment + * @return Value representing the severity of unemployment problems + */ +short Micropolis::getUnemployment() +{ + short b = (comPop + indPop) * 8; + + if (b == 0) { + return 0; + } + + // Ratio total people / working. At least 1. + float r = ((float)resPop) / b; + + b = (short)((r - 1) * 255); // (r - 1) is the fraction unemployed people + return min(b, (short)255); +} + + +/** + * Compute severity of fire + * @return Value representing the severity of fire problems + */ +short Micropolis::getFireSeverity() +{ + return min(firePop * 5, 255); +} + + +/** + * Compute total score + * @param problemTable Storage of how bad each problem is. + */ +void Micropolis::getScore(const short problemTable[PROBNUM]) +{ + int x, z; + short cityScoreLast; + + cityScoreLast = cityScore; + x = 0; + + for (z = 0; z < CVP_NUMPROBLEMS; z++) { + x += problemTable[z]; /* add 7 probs */ + } + + /** + * @todo Should this expression depend on CVP_NUMPROBLEMS? + */ + x = x / 3; /* 7 + 2 average */ + x = min(x, 256); + + z = clamp((256 - x) * 4, 0, 1000); + + if (resCap) { + z = (int)(z * .85); + } + + if (comCap) { + z = (int)(z * .85); + } + + if (indCap) { + z = (int)(z * .85); + } + + if (roadEffect < MAX_ROAD_EFFECT) { + z -= MAX_ROAD_EFFECT - roadEffect; + } + + if (policeEffect < MAX_POLICE_STATION_EFFECT) { + // 10.0001 = 10000.1 / 1000, 1/10.0001 is about 0.1 + z = (int)(z * (0.9 + (policeEffect / (10.0001 * MAX_POLICE_STATION_EFFECT)))); + } + + if (fireEffect < MAX_FIRE_STATION_EFFECT) { + // 10.0001 = 10000.1 / 1000, 1/10.0001 is about 0.1 + z = (int)(z * (0.9 + (fireEffect / (10.0001 * MAX_FIRE_STATION_EFFECT)))); + } + + if (resValve < -1000) { + z = (int)(z * .85); + } + + if (comValve < -1000) { + z = (int)(z * .85); + } + + if (indValve < -1000) { + z = (int)(z * .85); + } + + float SM = 1.0; + if (cityPop == 0 || cityPopDelta == 0) { + SM = 1.0; // there is nobody or no migration happened + + } else if (cityPopDelta == cityPop) { + SM = 1.0; // city sprang into existence or doubled in size + + } else if (cityPopDelta > 0) { + SM = ((float)cityPopDelta / cityPop) + 1.0f; + + } else if (cityPopDelta < 0) { + SM = 0.95f + ((float)cityPopDelta / (cityPop - cityPopDelta)); + } + + z = (int)(z * SM); + z = z - getFireSeverity() - cityTax; // dec score for fires and taxes + + float TM = unpoweredZoneCount + poweredZoneCount; // dec score for unpowered zones + if (TM > 0.0) { + z = (int)(z * (float)(poweredZoneCount / TM)); + } else { + } + + z = clamp(z, 0, 1000); + + cityScore = (cityScore + z) / 2; + + cityScoreDelta = cityScore - cityScoreLast; +} + + +/** + * Vote whether the mayor is doing a good job + * @post #cityYes contains the number of 'yes' votes + */ +void Micropolis::doVotes() +{ + int z; + + cityYes = 0; + + for (z = 0; z < 100; z++) { + if (getRandom(1000) < cityScore) { + cityYes++; + } + } +} + + +/** Push new score to the user */ +void Micropolis::doScoreCard() +{ + // The user interface should pull these raw values out and format + // them. The simulator core used to format them and push them out, + // but the user interface should pull them out and format them + // itself. + + // City Evaluation ${FormatYear(currentYear())} + // Public Opinion + // Is the mayor doing a good job? + // Yes: ${FormatPercent(cityYes)} + // No: ${FormatPercent(100 - cityYes)} + // What are the worst problems? + // for i in range(0, CVP_PROBLEM_COMPLAINTS), + // while problemOrder[i] < CVP_NUMPROBLEMS: + // ${probStr[problemOrder[i]]}: + // ${FormatPercent(problemVotes[problemOrder[i]])} + // Statistics + // Population: ${FormatNumber(cityPop)} + // Net Migration: ${FormatNumber(cityPopDelta)} (last year) + // Assessed Value: ${FormatMoney(cityAssessedValue)) + // Category: ${cityClassStr[cityClass]} + // Game Level: ${cityLevelStr[gameLevel]} + + callback->updateEvaluation(this, callbackVal); +} + +/** Request that new score is displayed to the user. */ +void Micropolis::changeEval() +{ + //printf("changeEval\n"); + evalChanged = true; +} + + +/** Update the score after being requested. */ +void Micropolis::scoreDoer() +{ + //printf("scoreDoer evalChanged %d\n", evalChanged); + if (evalChanged) { + doScoreCard(); + evalChanged = false; + } +} + +/** + * Return number of problem in the city. + * @return Number of problems. + */ +int Micropolis::countProblems() +{ + int i; + for (i = 0; i < CVP_PROBLEM_COMPLAINTS; i++) { + if (problemOrder[i] == CVP_NUMPROBLEMS) { + break; + } + } + return i; +} + +/** + * Return the index of the \a i-th worst problem. + * @param i Number of the problem. + * @return Index into the #problemOrder table of the \a i-th problem. + * Returns \c -1 if such a problem does not exist. + */ +int Micropolis::getProblemNumber(int i) +{ + if (i < 0 || i >= CVP_PROBLEM_COMPLAINTS + || problemOrder[i] == CVP_NUMPROBLEMS) { + return -1; + } else { + return problemOrder[i]; + } +} + + +/** + * Return number of votes to solve the \a i-th worst problem. + * @param i Number of the problem. + * @return Number of votes to solve the \a i-th worst problem. + * Returns \c -1 if such a problem does not exist. + */ +int Micropolis::getProblemVotes(int i) +{ + if (i < 0 || i >= CVP_PROBLEM_COMPLAINTS + || problemOrder[i] == CVP_NUMPROBLEMS) { + return -1; + } else { + return problemVotes[problemOrder[i]]; + } +} + + +//////////////////////////////////////////////////////////////////////// diff --git a/core/fileio.cpp b/core/fileio.cpp new file mode 100644 index 0000000..522f437 --- /dev/null +++ b/core/fileio.cpp @@ -0,0 +1,646 @@ +/* fileio.cpp + * + * Micropolis, Unix Version. This game was released for the Unix platform + * in or about 1990 and has been modified for inclusion in the One Laptop + * Per Child program. Copyright (C) 1989 - 2007 Electronic Arts Inc. If + * you need assistance with this program, you may contact: + * http://wiki.laptop.org/go/Micropolis or email micropolis@laptop.org. + * + * This program 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. + * + * This program 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 this program. If + * not, see . + * + * ADDITIONAL TERMS per GNU GPL Section 7 + * + * No trademark or publicity rights are granted. This license does NOT + * give you any right, title or interest in the trademark SimCity or any + * other Electronic Arts trademark. You may not distribute any + * modification of this program using the trademark SimCity or claim any + * affliation or association with Electronic Arts Inc. or its employees. + * + * Any propagation or conveyance of this program must include this + * copyright notice and these terms. + * + * If you convey this program (or any modifications of it) and assume + * contractual liability for the program to recipients of it, you agree + * to indemnify Electronic Arts for any liability that those contractual + * assumptions impose on Electronic Arts. + * + * You may not misrepresent the origins of this program; modified + * versions of the program must be marked as such and not identified as + * the original program. + * + * This disclaimer supplements the one included in the General Public + * License. TO THE FULLEST EXTENT PERMISSIBLE UNDER APPLICABLE LAW, THIS + * PROGRAM IS PROVIDED TO YOU "AS IS," WITH ALL FAULTS, WITHOUT WARRANTY + * OF ANY KIND, AND YOUR USE IS AT YOUR SOLE RISK. THE ENTIRE RISK OF + * SATISFACTORY QUALITY AND PERFORMANCE RESIDES WITH YOU. ELECTRONIC ARTS + * DISCLAIMS ANY AND ALL EXPRESS, IMPLIED OR STATUTORY WARRANTIES, + * INCLUDING IMPLIED WARRANTIES OF MERCHANTABILITY, SATISFACTORY QUALITY, + * FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT OF THIRD PARTY + * RIGHTS, AND WARRANTIES (IF ANY) ARISING FROM A COURSE OF DEALING, + * USAGE, OR TRADE PRACTICE. ELECTRONIC ARTS DOES NOT WARRANT AGAINST + * INTERFERENCE WITH YOUR ENJOYMENT OF THE PROGRAM; THAT THE PROGRAM WILL + * MEET YOUR REQUIREMENTS; THAT OPERATION OF THE PROGRAM WILL BE + * UNINTERRUPTED OR ERROR-FREE, OR THAT THE PROGRAM WILL BE COMPATIBLE + * WITH THIRD PARTY SOFTWARE OR THAT ANY ERRORS IN THE PROGRAM WILL BE + * CORRECTED. NO ORAL OR WRITTEN ADVICE PROVIDED BY ELECTRONIC ARTS OR + * ANY AUTHORIZED REPRESENTATIVE SHALL CREATE A WARRANTY. SOME + * JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF OR LIMITATIONS ON IMPLIED + * WARRANTIES OR THE LIMITATIONS ON THE APPLICABLE STATUTORY RIGHTS OF A + * CONSUMER, SO SOME OR ALL OF THE ABOVE EXCLUSIONS AND LIMITATIONS MAY + * NOT APPLY TO YOU. + */ + +/** + * @file fileio.cpp + * @brief File I/O operations for Micropolis game engine. + * + * Implements file loading and saving functionalities for the + * Micropolis game engine. It includes endianess conversions for data + * compatibility between different architectures, loading and saving + * city files, handling scenario files, and various utility functions + * to support file I/O operations. It also includes functions to + * report file operations to the front-end. + */ + + +//////////////////////////////////////////////////////////////////////// + + +#include "micropolis.h" + + +//////////////////////////////////////////////////////////////////////// + + +#ifdef IS_INTEL + +/** + * Convert an array of short values between MAC and Intel endian formats. + * @param buf Array with shorts. + * @param len Number of short values in the array. + */ +#define SWAP_SHORTS(buf, len) swap_shorts(buf, len) + +/** + * Convert an array of long values between MAC and Intel endian formats. + * @param buf Array with longs. + * @param len Number of long values in the array. + */ +#define HALF_SWAP_LONGS(buf, len) half_swap_longs(buf, len) + +/** + * Swap upper and lower byte of all shorts in the array. + * @param buf Array with shorts. + * @param len Number of short values in the array. + */ +static void swap_shorts(short *buf, int len) +{ + int i; + + /* Flip bytes in each short! */ + for (i = 0; i < len; i++) { + *buf = ((*buf & 0xFF) <<8) | ((*buf &0xFF00) >>8); + buf++; + } +} + + +/** + * Swap upper and lower words of all longs in the array. + * @param buf Array with longs. + * @param len Number of long values in the array. + */ +static void half_swap_longs(long *buf, int len) +{ + int i; + + /* Flip bytes in each long! */ + for (i = 0; i < len; i++) { + long l = *buf; + *buf = + ((l & 0x0000ffff) << 16) | + ((l & 0xffff0000) >> 16); + buf++; + } +} + + +#else + + +/** + * Convert an array of short values between MAC and MAC endian formats. + * @param buf Array with shorts. + * @param len Number of short values in the array. + * @note This version does not change anything since the data is already in the + * correct format. + */ +#define SWAP_SHORTS(buf, len) + +/** + * Convert an array of long values between MAC and MAC endian formats. + * @param buf Array with longs. + * @param len Number of long values in the array. + * @note This version does not change anything since the data is already in the + * correct format. + */ +#define HALF_SWAP_LONGS(buf, len) + + +#endif + +/** + * Load an array of short values from file to memory. + * + * Convert to the correct processor architecture, if necessary. + * @param buf Buffer to put the loaded short values in. + * @param len Number of short values to load. + * @param f File handle of the file to load from. + * @return Load was succesfull. + */ +static bool load_short(short *buf, int len, FILE *f) +{ + size_t result = fread(buf, sizeof(short), len, f); + + if ((int)result != len) { + return false; + } + + SWAP_SHORTS(buf, len); /* to intel */ + + return true; +} + + +/** + * Save an array of short values from memory to file. + * + * Convert to the correct endianness first, if necessary. + * @param buf Buffer containing the short values to save. + * @param len Number of short values to save. + * @param f File handle of the file to save to. + * @return Save was succesfull. + */ +static bool save_short(short *buf, int len, FILE *f) +{ + SWAP_SHORTS(buf, len); /* to MAC */ + + if ((int)fwrite(buf, sizeof(short), len, f) != len) { + return false; + } + + SWAP_SHORTS(buf, len); /* back to intel */ + + return true; +} + +/** + * Load a city file from a given filename and (optionally) directory. + * @param filename Name of the file to load. + * @param dir If not \c NULL, name of the directory containing the file. + * @return Load was succesfull. + */ +bool Micropolis::loadFileData(const std::string &filename) +{ + FILE *f; + Quad size; + + // Open the file. + f = fopen(filename.c_str(), "rb"); + + // open() failed; report failure. + if (f == NULL) { + return false; + } + + fseek(f, 0L, SEEK_END); + size = ftell(f); + fseek(f, 0L, SEEK_SET); + + bool result = + (size == 27120) && + load_short(resHist, HISTORY_LENGTH / sizeof(short), f) && + load_short(comHist, HISTORY_LENGTH / sizeof(short), f) && + load_short(indHist, HISTORY_LENGTH / sizeof(short), f) && + load_short(crimeHist, HISTORY_LENGTH / sizeof(short), f) && + load_short(pollutionHist, HISTORY_LENGTH / sizeof(short), f) && + load_short(moneyHist, HISTORY_LENGTH / sizeof(short), f) && + load_short(miscHist, MISC_HISTORY_LENGTH / sizeof(short), f) && + load_short(((short *)&map[0][0]), WORLD_W * WORLD_H, f); + + fclose(f); + + return result; +} + +/** + * Load a file, and initialize the game variables. + * @param filename Name of the file to load. + * @return Load was succesfull. + */ +bool Micropolis::loadFile(const std::string &filename) +{ + long n; + + if (!loadFileData(filename)) { + return false; + } + + /* total funds is a long..... miscHist is array of shorts */ + /* total funds is being put in the 50th & 51th word of miscHist */ + /* find the address, cast the ptr to a longPtr, take contents */ + + n = *(Quad *)(miscHist + 50); + HALF_SWAP_LONGS(&n, 1); + setFunds(n); + + n = *(Quad *)(miscHist + 8); + HALF_SWAP_LONGS(&n, 1); + cityTime = n; + + setAutoBulldoze(miscHist[52] != 0); // flag for autoBulldoze + setAutoBudget(miscHist[53] != 0); // flag for autoBudget + setAutoGoto(miscHist[54] != 0); // flag for auto-goto + setEnableSound(miscHist[55] != 0); // flag for the sound on/off + setCityTax(miscHist[56]); + setSpeed(miscHist[57]); + changeCensus(); + mustUpdateOptions = true; + + /* yayaya */ + + n = *(Quad *)(miscHist + 58); + HALF_SWAP_LONGS(&n, 1); + policePercent = ((float)n) / ((float)65536); + + n = *(Quad *)(miscHist + 60); + HALF_SWAP_LONGS(&n, 1); + firePercent = (float)n / (float)65536.0; + + n = *(Quad *)(miscHist + 62); + HALF_SWAP_LONGS(&n, 1); + roadPercent = (float)n / (float)65536.0; + + policePercent = + (float)(*(Quad*)(miscHist + 58)) / + (float)65536.0; /* and 59 */ + firePercent = + (float)(*(Quad*)(miscHist + 60)) / + (float)65536.0; /* and 61 */ + roadPercent = + (float)(*(Quad*)(miscHist + 62)) / + (float)65536.0; /* and 63 */ + + cityTime = max((Quad)0, cityTime); + + // If the tax is nonsensical, set it to a reasonable value. + if (cityTax > 20 || cityTax < 0) { + setCityTax(7); + } + + // If the speed is nonsensical, set it to a reasonable value. + if (simSpeed < 0 || simSpeed > 3) { + setSpeed(3); + } + + setSpeed(simSpeed); + setPasses(1); + initFundingLevel(); + + // Set the scenario id to 0. + initWillStuff(); + scenario = SC_NONE; + initSimLoad = 1; + doInitialEval = false; + doSimInit(); + invalidateMaps(); + + return true; +} + + +/** + * Save a game to disk. + * @param filename Name of the file to use for storing the game. + * @return The game was saved successfully. + */ +bool Micropolis::saveFile(const std::string &filename) +{ + long n; + FILE *f; + + if ((f = fopen(filename.c_str(), "wb")) == NULL) { + /// @todo Report error saving file. + return false; + } + + /* total funds is a long..... miscHist is array of ints */ + /* total funds is bien put in the 50th & 51th word of miscHist */ + /* find the address, cast the ptr to a longPtr, take contents */ + + n = totalFunds; + HALF_SWAP_LONGS(&n, 1); + (*(Quad *)(miscHist + 50)) = n; + + n = cityTime; + HALF_SWAP_LONGS(&n, 1); + (*(Quad *)(miscHist + 8)) = n; + + miscHist[52] = autoBulldoze; // flag for autoBulldoze + miscHist[53] = autoBudget; // flag for autoBudget + miscHist[54] = autoGoto; // flag for auto-goto + miscHist[55] = enableSound; // flag for the sound on/off + miscHist[57] = simSpeed; + miscHist[56] = cityTax; /* post release */ + + /* yayaya */ + + n = (int)(policePercent * 65536); + HALF_SWAP_LONGS(&n, 1); + (*(Quad *)(miscHist + 58)) = n; + + n = (int)(firePercent * 65536); + HALF_SWAP_LONGS(&n, 1); + (*(Quad *)(miscHist + 60)) = n; + + n = (int)(roadPercent * 65536); + HALF_SWAP_LONGS(&n, 1); + (*(Quad *)(miscHist + 62)) = n; + + bool result = + save_short(resHist, HISTORY_LENGTH / 2, f) && + save_short(comHist, HISTORY_LENGTH / 2, f) && + save_short(indHist, HISTORY_LENGTH / 2, f) && + save_short(crimeHist, HISTORY_LENGTH / 2, f) && + save_short(pollutionHist, HISTORY_LENGTH / 2, f) && + save_short(moneyHist, HISTORY_LENGTH / 2, f) && + save_short(miscHist, MISC_HISTORY_LENGTH / 2, f) && + save_short(((short *)&map[0][0]), WORLD_W * WORLD_H, f); + + fclose(f); + + return result; +} + + +/** + * Load a scenario. + * @param s Scenario to load. + * @note \a s cannot be \c SC_NONE. + */ +void Micropolis::loadScenario(Scenario s) +{ + std::string name = NULL; + std::string fname = NULL; + + cityFileName = ""; + + setGameLevel(LEVEL_EASY); + + if (s < SC_DULLSVILLE || s > SC_RIO) { + s = SC_DULLSVILLE; + } + + switch (s) { + case SC_DULLSVILLE: + name = "Dullsville"; + fname = "cities/scenario_dullsville.cty"; + scenario = SC_DULLSVILLE; + cityTime = ((1900 - 1900) * 48) + 2; + setFunds(5000); + break; + case SC_SAN_FRANCISCO: + name = "San Francisco"; + fname = "cities/scenario_san_francisco.cty"; + scenario = SC_SAN_FRANCISCO; + cityTime = ((1906 - 1900) * 48) + 2; + setFunds(20000); + break; + case SC_HAMBURG: + name = "Hamburg"; + fname = "cities/scenario_hamburg.cty"; + scenario = SC_HAMBURG; + cityTime = ((1944 - 1900) * 48) + 2; + setFunds(20000); + break; + case SC_BERN: + name = "Bern"; + fname = "cities/scenario_bern.cty"; + scenario = SC_BERN; + cityTime = ((1965 - 1900) * 48) + 2; + setFunds(20000); + break; + case SC_TOKYO: + name = "Tokyo"; + fname = "cities/scenario_tokyo.cty"; + scenario = SC_TOKYO; + cityTime = ((1957 - 1900) * 48) + 2; + setFunds(20000); + break; + case SC_DETROIT: + name = "Detroit"; + fname = "cities/scenario_detroit.cty"; + scenario = SC_DETROIT; + cityTime = ((1972 - 1900) * 48) + 2; + setFunds(20000); + break; + case SC_BOSTON: + name = "Boston"; + fname = "cities/scenario_boston.cty"; + scenario = SC_BOSTON; + cityTime = ((2010 - 1900) * 48) + 2; + setFunds(20000); + break; + case SC_RIO: + name = "Rio de Janeiro"; + fname = "cities/scenario_rio_de_janeiro.cty"; + scenario = SC_RIO; + cityTime = ((2047 - 1900) * 48) + 2; + setFunds(20000); + break; + default: + NOT_REACHED(); + break; + } + + setCleanCityName(name); + setSpeed(3); + setCityTax(7); + + loadFileData(fname); + + initWillStuff(); + initFundingLevel(); + updateFunds(); + invalidateMaps(); + initSimLoad = 1; + doInitialEval = false; + doSimInit(); + didLoadScenario(s, name, fname); +} + + +/** Report to the front-end that the scenario was loaded. */ +void Micropolis::didLoadScenario(int s, const std::string name, const std::string fname) +{ + callback->didLoadScenario(this, callbackVal, name, fname); +} + +/** + * Try to load a new game from disk. + * @param filename Name of the file to load. + * @return Game was loaded successfully. + * @todo In what state is the game left when loading fails? + * @todo String normalization code is duplicated in Micropolis::saveCityAs(). + * Extract to a sub-function. + * @bug Function fails if \c lastDotdidLoadCity(this, callbackVal, filename); +} + + +/** + * Report to the frontend that the game failed to load. + * @param msg File that attempted to load + */ +void Micropolis::didntLoadCity(const std::string &filename) +{ + callback->didntLoadCity(this, callbackVal, filename); +} + + +/** + * Try to save the game. + * @todo This is a no-op if the Micropolis::cityFileName is empty. + * In that case, we should probably warn the user about the failure. + */ +void Micropolis::saveCity() +{ + if (cityFileName.length() > 0) { + + doSaveCityAs(cityFileName); + + } else { + if (saveFile(cityFileName)) { + + didSaveCity(cityFileName); + + } else { + + didntSaveCity(cityFileName); + + } + } +} + + +/** + * Report to the frontend that the city is being saved. + * @param filename Name of the file used + */ +void Micropolis::doSaveCityAs(const std::string &filename) +{ + callback->saveCityAs(this, callbackVal, filename); +} + + +/** + * Report to the frontend that the city was saved successfully. + * @param filename Name of the file used + */ +void Micropolis::didSaveCity(const std::string &filename) +{ + callback->didSaveCity(this, callbackVal, filename); +} + + +/** + * Report to the frontend that the city could not be saved. + * @param filename Name of the file used + */ +void Micropolis::didntSaveCity(const std::string &filename) +{ + callback->didntSaveCity(this, callbackVal, filename); +} + + +/** + * Save the city under a new name (?) + * @param filename Name of the file to use for storing the game. + * @todo String normalization code is duplicated in Micropolis::loadCity(). + * Extract to a sub-function. + * @bug Function fails if \c lastDot. + * + * ADDITIONAL TERMS per GNU GPL Section 7 + * + * No trademark or publicity rights are granted. This license does NOT + * give you any right, title or interest in the trademark SimCity or any + * other Electronic Arts trademark. You may not distribute any + * modification of this program using the trademark SimCity or claim any + * affliation or association with Electronic Arts Inc. or its employees. + * + * Any propagation or conveyance of this program must include this + * copyright notice and these terms. + * + * If you convey this program (or any modifications of it) and assume + * contractual liability for the program to recipients of it, you agree + * to indemnify Electronic Arts for any liability that those contractual + * assumptions impose on Electronic Arts. + * + * You may not misrepresent the origins of this program; modified + * versions of the program must be marked as such and not identified as + * the original program. + * + * This disclaimer supplements the one included in the General Public + * License. TO THE FULLEST EXTENT PERMISSIBLE UNDER APPLICABLE LAW, THIS + * PROGRAM IS PROVIDED TO YOU "AS IS," WITH ALL FAULTS, WITHOUT WARRANTY + * OF ANY KIND, AND YOUR USE IS AT YOUR SOLE RISK. THE ENTIRE RISK OF + * SATISFACTORY QUALITY AND PERFORMANCE RESIDES WITH YOU. ELECTRONIC ARTS + * DISCLAIMS ANY AND ALL EXPRESS, IMPLIED OR STATUTORY WARRANTIES, + * INCLUDING IMPLIED WARRANTIES OF MERCHANTABILITY, SATISFACTORY QUALITY, + * FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT OF THIRD PARTY + * RIGHTS, AND WARRANTIES (IF ANY) ARISING FROM A COURSE OF DEALING, + * USAGE, OR TRADE PRACTICE. ELECTRONIC ARTS DOES NOT WARRANT AGAINST + * INTERFERENCE WITH YOUR ENJOYMENT OF THE PROGRAM; THAT THE PROGRAM WILL + * MEET YOUR REQUIREMENTS; THAT OPERATION OF THE PROGRAM WILL BE + * UNINTERRUPTED OR ERROR-FREE, OR THAT THE PROGRAM WILL BE COMPATIBLE + * WITH THIRD PARTY SOFTWARE OR THAT ANY ERRORS IN THE PROGRAM WILL BE + * CORRECTED. NO ORAL OR WRITTEN ADVICE PROVIDED BY ELECTRONIC ARTS OR + * ANY AUTHORIZED REPRESENTATIVE SHALL CREATE A WARRANTY. SOME + * JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF OR LIMITATIONS ON IMPLIED + * WARRANTIES OR THE LIMITATIONS ON THE APPLICABLE STATUTORY RIGHTS OF A + * CONSUMER, SO SOME OR ALL OF THE ABOVE EXCLUSIONS AND LIMITATIONS MAY + * NOT APPLY TO YOU. + */ + +/** + * @file frontendmessage.cpp + * @brief Implementation of frontend message handling in the + * Micropolis engine. + * + * This file is part of the Micropolis game engine. It defines the + * FrontendMessage class and its subclasses, which are used to handle + * communication between the game engine and the frontend. This + * includes sending messages about tool actions and sound effects. The + * design allows for a flexible way of notifying the frontend about + * various events happening within the game engine. + */ + + +//////////////////////////////////////////////////////////////////////// + + +#include "micropolis.h" + + +//////////////////////////////////////////////////////////////////////// +// Frontend message storage + + +/** Base class constructor. */ +FrontendMessage::FrontendMessage() +{ +} + + +/** Base class destructor. */ +FrontendMessage::~FrontendMessage() +{ +} + + +/** + * @fn void FrontendMessage::sendMessage(Micropolis *sim) + * @brief Send the message to the front-end. + * @param sim Simulator instance to use. + */ + + + +FrontendMessageDidTool::FrontendMessageDidTool(const std::string &tool, int x, int y) +{ + this->tool = tool; + this->x = x; + this->y = y; +} + + +FrontendMessageDidTool::~FrontendMessageDidTool() +{ +} + + +void FrontendMessageDidTool::sendMessage(Micropolis *sim) const +{ + sim->didTool(this->tool, this->x, this->y); +} + + +FrontendMessageMakeSound::FrontendMessageMakeSound( + const std::string &channel, + const std::string &sound, + int x, int y) +{ + this->channel = channel; + this->sound = sound; + this->x = x; + this->y = y; +} + + +FrontendMessageMakeSound::~FrontendMessageMakeSound() +{ +} + + +void FrontendMessageMakeSound::sendMessage(Micropolis *sim) const +{ + sim->makeSound(this->channel, this->sound, this->x, this->y); +} + + +//////////////////////////////////////////////////////////////////////// diff --git a/core/frontendmessage.h b/core/frontendmessage.h new file mode 100644 index 0000000..7e27978 --- /dev/null +++ b/core/frontendmessage.h @@ -0,0 +1,141 @@ +/* frontendmessage.h + * + * Micropolis, Unix Version. This game was released for the Unix platform + * in or about 1990 and has been modified for inclusion in the One Laptop + * Per Child program. Copyright (C) 1989 - 2007 Electronic Arts Inc. If + * you need assistance with this program, you may contact: + * http://wiki.laptop.org/go/Micropolis or email micropolis@laptop.org. + * + * This program 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. + * + * This program 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 this program. If + * not, see . + * + * ADDITIONAL TERMS per GNU GPL Section 7 + * + * No trademark or publicity rights are granted. This license does NOT + * give you any right, title or interest in the trademark SimCity or any + * other Electronic Arts trademark. You may not distribute any + * modification of this program using the trademark SimCity or claim any + * affliation or association with Electronic Arts Inc. or its employees. + * + * Any propagation or conveyance of this program must include this + * copyright notice and these terms. + * + * If you convey this program (or any modifications of it) and assume + * contractual liability for the program to recipients of it, you agree + * to indemnify Electronic Arts for any liability that those contractual + * assumptions impose on Electronic Arts. + * + * You may not misrepresent the origins of this program; modified + * versions of the program must be marked as such and not identified as + * the original program. + * + * This disclaimer supplements the one included in the General Public + * License. TO THE FULLEST EXTENT PERMISSIBLE UNDER APPLICABLE LAW, THIS + * PROGRAM IS PROVIDED TO YOU "AS IS," WITH ALL FAULTS, WITHOUT WARRANTY + * OF ANY KIND, AND YOUR USE IS AT YOUR SOLE RISK. THE ENTIRE RISK OF + * SATISFACTORY QUALITY AND PERFORMANCE RESIDES WITH YOU. ELECTRONIC ARTS + * DISCLAIMS ANY AND ALL EXPRESS, IMPLIED OR STATUTORY WARRANTIES, + * INCLUDING IMPLIED WARRANTIES OF MERCHANTABILITY, SATISFACTORY QUALITY, + * FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT OF THIRD PARTY + * RIGHTS, AND WARRANTIES (IF ANY) ARISING FROM A COURSE OF DEALING, + * USAGE, OR TRADE PRACTICE. ELECTRONIC ARTS DOES NOT WARRANT AGAINST + * INTERFERENCE WITH YOUR ENJOYMENT OF THE PROGRAM; THAT THE PROGRAM WILL + * MEET YOUR REQUIREMENTS; THAT OPERATION OF THE PROGRAM WILL BE + * UNINTERRUPTED OR ERROR-FREE, OR THAT THE PROGRAM WILL BE COMPATIBLE + * WITH THIRD PARTY SOFTWARE OR THAT ANY ERRORS IN THE PROGRAM WILL BE + * CORRECTED. NO ORAL OR WRITTEN ADVICE PROVIDED BY ELECTRONIC ARTS OR + * ANY AUTHORIZED REPRESENTATIVE SHALL CREATE A WARRANTY. SOME + * JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF OR LIMITATIONS ON IMPLIED + * WARRANTIES OR THE LIMITATIONS ON THE APPLICABLE STATUTORY RIGHTS OF A + * CONSUMER, SO SOME OR ALL OF THE ABOVE EXCLUSIONS AND LIMITATIONS MAY + * NOT APPLY TO YOU. + */ + +/** + * @file frontendmessage.h + * @brief Defines classes for handling messages between the game + * engine and the GUI frontend. + * + * This header file includes class definitions for managing and + * sending messages from the Micropolis game engine to the graphical + * user interface (GUI) frontend. It facilitates communication and + * interactions between the game's backend and frontend, ensuring a + * responsive and dynamic user experience. Classes defined here + * include the general `FrontendMessage` class and its specialized + * subclasses such as `FrontendMessageDidTool` and + * `FrontendMessageMakeSound` for specific message types. + */ + + +#ifndef _H_FRONTENDMESSAGE +#define _H_FRONTENDMESSAGE + + +//////////////////////////////////////////////////////////////////////// + + +class Micropolis; // Forward declaration. + + +/** A message to the GUI frontend. */ +class FrontendMessage { + +public: + + FrontendMessage(); + + virtual ~FrontendMessage(); + + virtual void sendMessage(Micropolis *sim) const = 0; + +}; + + +/** Store a 'didTool' message. */ +class FrontendMessageDidTool : public FrontendMessage { + +public: + + std::string tool; + int x, y; + + FrontendMessageDidTool(const std::string &tool, int x, int y); + + virtual ~FrontendMessageDidTool(); + + virtual void sendMessage(Micropolis *sim) const; + +}; + + +/** Store a 'makeSound' message. */ +class FrontendMessageMakeSound : public FrontendMessage { + +public: + + std::string channel; + std::string sound; + int x, y; + + FrontendMessageMakeSound(const std::string &channel, const std::string &sound, int x, int y); + + virtual ~FrontendMessageMakeSound(); + + virtual void sendMessage(Micropolis *sim) const; + +}; + + +//////////////////////////////////////////////////////////////////////// + + +#endif diff --git a/core/generate.cpp b/core/generate.cpp new file mode 100644 index 0000000..e7e4e4e --- /dev/null +++ b/core/generate.cpp @@ -0,0 +1,761 @@ +/* generate.cpp + * + * Micropolis, Unix Version. This game was released for the Unix platform + * in or about 1990 and has been modified for inclusion in the One Laptop + * Per Child program. Copyright (C) 1989 - 2007 Electronic Arts Inc. If + * you need assistance with this program, you may contact: + * http://wiki.laptop.org/go/Micropolis or email micropolis@laptop.org. + * + * This program 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. + * + * This program 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 this program. If + * not, see . + * + * ADDITIONAL TERMS per GNU GPL Section 7 + * + * No trademark or publicity rights are granted. This license does NOT + * give you any right, title or interest in the trademark SimCity or any + * other Electronic Arts trademark. You may not distribute any + * modification of this program using the trademark SimCity or claim any + * affliation or association with Electronic Arts Inc. or its employees. + * + * Any propagation or conveyance of this program must include this + * copyright notice and these terms. + * + * If you convey this program (or any modifications of it) and assume + * contractual liability for the program to recipients of it, you agree + * to indemnify Electronic Arts for any liability that those contractual + * assumptions impose on Electronic Arts. + * + * You may not misrepresent the origins of this program; modified + * versions of the program must be marked as such and not identified as + * the original program. + * + * This disclaimer supplements the one included in the General Public + * License. TO THE FULLEST EXTENT PERMISSIBLE UNDER APPLICABLE LAW, THIS + * PROGRAM IS PROVIDED TO YOU "AS IS," WITH ALL FAULTS, WITHOUT WARRANTY + * OF ANY KIND, AND YOUR USE IS AT YOUR SOLE RISK. THE ENTIRE RISK OF + * SATISFACTORY QUALITY AND PERFORMANCE RESIDES WITH YOU. ELECTRONIC ARTS + * DISCLAIMS ANY AND ALL EXPRESS, IMPLIED OR STATUTORY WARRANTIES, + * INCLUDING IMPLIED WARRANTIES OF MERCHANTABILITY, SATISFACTORY QUALITY, + * FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT OF THIRD PARTY + * RIGHTS, AND WARRANTIES (IF ANY) ARISING FROM A COURSE OF DEALING, + * USAGE, OR TRADE PRACTICE. ELECTRONIC ARTS DOES NOT WARRANT AGAINST + * INTERFERENCE WITH YOUR ENJOYMENT OF THE PROGRAM; THAT THE PROGRAM WILL + * MEET YOUR REQUIREMENTS; THAT OPERATION OF THE PROGRAM WILL BE + * UNINTERRUPTED OR ERROR-FREE, OR THAT THE PROGRAM WILL BE COMPATIBLE + * WITH THIRD PARTY SOFTWARE OR THAT ANY ERRORS IN THE PROGRAM WILL BE + * CORRECTED. NO ORAL OR WRITTEN ADVICE PROVIDED BY ELECTRONIC ARTS OR + * ANY AUTHORIZED REPRESENTATIVE SHALL CREATE A WARRANTY. SOME + * JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF OR LIMITATIONS ON IMPLIED + * WARRANTIES OR THE LIMITATIONS ON THE APPLICABLE STATUTORY RIGHTS OF A + * CONSUMER, SO SOME OR ALL OF THE ABOVE EXCLUSIONS AND LIMITATIONS MAY + * NOT APPLY TO YOU. + */ + +/** + * @file generate.cpp + * @brief Contains functions related to terrain generation in + * Micropolis. + * + * This file is a part of Micropolis and is responsible for generating + * various terrain features such as rivers, lakes, islands, and + * forests. It includes functions for creating randomized maps and + * modifying terrain features. The terrain generation methods take + * into account different parameters like seed value for random + * generation and terrain characteristics to create diverse and unique + * city landscapes. + */ + + +//////////////////////////////////////////////////////////////////////// + + +#include "micropolis.h" + + +//////////////////////////////////////////////////////////////////////// + + +/** + * Create a new map for a city. + * @bug We use a random number generator to draw a seed for initializing the + * random number generator? + */ +void Micropolis::generateSomeRandomCity() +{ + generateSomeCity(getRandom16()); +} + + +/** + * Generate a map for a city. + * @param seed Random number generator initializing seed + */ +void Micropolis::generateSomeCity(int seed) +{ + cityFileName = ""; + + generateMap(seed); + scenario = SC_NONE; + cityTime = 0; + initSimLoad = 2; + doInitialEval = false; + + initWillStuff(); + resetMapState(); + resetEditorState(); + invalidateMaps(); + updateFunds(); + doSimInit(); + + simUpdate(); + + callback->didGenerateMap(this, callbackVal, seed); +} + + +/** + * Generate a map. + * @param seed Initialization seed for the random generator. + */ +void Micropolis::generateMap(int seed) +{ + generatedCitySeed = seed; + + seedRandom(seed); + + // Construct land. + if (terrainCreateIsland < 0) { + if (getRandom(100) < 10) { /* chance that island is generated */ + makeIsland(); + return; + } + } + + if (terrainCreateIsland == 1) { + makeNakedIsland(); + } else { + clearMap(); + } + + // Lay a river. + if (terrainCurveLevel != 0) { + int terrainXStart = 40 + getRandom(WORLD_W - 80); + int terrainYStart = 33 + getRandom(WORLD_H - 67); + + Position terrainPos(terrainXStart, terrainYStart); + + doRivers(terrainPos); + } + + // Lay a few lakes. + if (terrainLakeLevel != 0) { + makeLakes(); + } + + smoothRiver(); + + // And add trees. + if (terrainTreeLevel != 0) { + doTrees(); + } + +} + + +/** Clear the whole world to ::DIRT tiles */ +void Micropolis::clearMap() +{ + short x, y; + + for (x = 0; x < WORLD_W; x++) { + for (y = 0; y < WORLD_H; y++) { + map[x][y] = DIRT; + } + } +} + + +/** Clear everything from all land */ +void Micropolis::clearUnnatural() +{ + short x, y; + + for (x = 0; x < WORLD_W; x++) { + for (y = 0; y < WORLD_H; y++) { + if (map[x][y] > WOODS) { + map[x][y] = DIRT; + } + } + } +} + +/** + * Construct a plain island as world, surrounded by 5 tiles of river. + */ +void Micropolis::makeNakedIsland() +{ + const int terrainIslandRadius = ISLAND_RADIUS; + int x, y; + + for (x = 0; x < WORLD_W; x++) { + for (y = 0; y < WORLD_H; y++) { + if ((x < 5) || (x >= WORLD_W - 5) || + (y < 5) || (y >= WORLD_H - 5)) { + map[x][y] = RIVER; + } else { + map[x][y] = DIRT; + } + } + } + + for (x = 0; x < WORLD_W - 5; x += 2) { + + int mapY = getERandom(terrainIslandRadius); + plopBRiver(Position(x, mapY)); + + mapY = (WORLD_H - 10) - getERandom(terrainIslandRadius); + plopBRiver(Position(x, mapY)); + + plopSRiver(Position(x, 0)); + plopSRiver(Position(x, WORLD_H - 6)); + } + + for (y = 0; y < WORLD_H - 5; y += 2) { + + int mapX = getERandom(terrainIslandRadius); + plopBRiver(Position(mapX, y)); + + mapX = (WORLD_W - 10) - getERandom(terrainIslandRadius); + plopBRiver(Position(mapX, y)); + + plopSRiver(Position(0, y)); + plopSRiver(Position(WORLD_W - 6, y)); + } + +} + + +/** Construct a new world as an island */ +void Micropolis::makeIsland() +{ + makeNakedIsland(); + smoothRiver(); + doTrees(); +} + + +/** + * Make a number of lakes, depending on the Micropolis::terrainLakeLevel. + */ +void Micropolis::makeLakes() +{ + short numLakes; + + if (terrainLakeLevel < 0) { + numLakes = getRandom(10); + } else { + numLakes = terrainLakeLevel / 2; + } + + while (numLakes > 0) { + int x = getRandom(WORLD_W - 21) + 10; + int y = getRandom(WORLD_H - 20) + 10; + + makeSingleLake(Position(x, y)); + + numLakes--; + } +} + +/** + * Make a random lake at \a pos. + * @param pos Rough position of the lake. + */ +void Micropolis::makeSingleLake(const Position &pos) +{ + int numPlops = getRandom(12) + 2; + + while (numPlops > 0) { + Position plopPos(pos, getRandom(12) - 6, getRandom(12) - 6); + + if (getRandom(4)) { + plopSRiver(plopPos); + } else { + plopBRiver(plopPos); + } + + numPlops--; + } +} + + +/** + * Splash a bunch of trees down near (\a xloc, \a yloc). + * + * Amount of trees is controlled by Micropolis::terrainTreeLevel. + * @param xloc Horizontal position of starting point for splashing trees. + * @param yloc Vertical position of starting point for splashing trees. + * @note Trees are not smoothed. + * @bug Function generates trees even if Micropolis::terrainTreeLevel is 0. + */ +void Micropolis::treeSplash(short xloc, short yloc) +{ + short numTrees; + + if (terrainTreeLevel < 0) { + numTrees = getRandom(150) + 50; + } else { + numTrees = getRandom(100 + (terrainTreeLevel * 2)) + 50; + } + + Position treePos(xloc, yloc); + + while (numTrees > 0) { + Direction2 dir = (Direction2)(DIR2_NORTH + getRandom(7)); + treePos.move(dir); + + if (!treePos.testBounds()) { + return; + } + + if ((map[treePos.posX][treePos.posY] & LOMASK) == DIRT) { + map[treePos.posX][treePos.posY] = WOODS | BLBNBIT; + } + + numTrees--; + } +} + + +/** Splash trees around the world. */ +void Micropolis::doTrees() +{ + short Amount, x, xloc, yloc; + + if (terrainTreeLevel < 0) { + Amount = getRandom(100) + 50; + } else { + Amount = terrainTreeLevel + 3; + } + + for (x = 0; x < Amount; x++) { + xloc = getRandom(WORLD_W - 1); + yloc = getRandom(WORLD_H - 1); + treeSplash(xloc, yloc); + } + + smoothTrees(); + smoothTrees(); +} + + +void Micropolis::smoothRiver() +{ + static short dx[4] = { -1, 0, 1, 0 }; + static short dy[4] = { 0, 1, 0, -1 }; + static short REdTab[16] = { + 13 | BULLBIT, 13 | BULLBIT, 17 | BULLBIT, 15 | BULLBIT, + 5 | BULLBIT, 2, 19 | BULLBIT, 17 | BULLBIT, + 9 | BULLBIT, 11 | BULLBIT, 2, 13 | BULLBIT, + 7 | BULLBIT, 9 | BULLBIT, 5 | BULLBIT, 2 }; + + short bitIndex, z, xTemp, yTemp; + short temp, x, y; + + for (x = 0; x < WORLD_W; x++) { + for (y = 0; y < WORLD_H; y++) { + + if (map[x][y] == REDGE) { + bitIndex = 0; + + for (z = 0; z < 4; z++) { + bitIndex = bitIndex << 1; + xTemp = x + dx[z]; + yTemp = y + dy[z]; + if (testBounds(xTemp, yTemp) && + ((map[xTemp][yTemp] & LOMASK) != DIRT) && + (((map[xTemp][yTemp] & LOMASK) < WOODS_LOW) || + ((map[xTemp][yTemp] & LOMASK) > WOODS_HIGH))) { + bitIndex++; + } + } + + temp = REdTab[bitIndex & 15]; + + if ((temp != RIVER) && + getRandom(1)) { + temp++; + } + + map[x][y] = temp; + } + } + } +} + + +bool Micropolis::isTree(MapValue cell) +{ + if ((cell & LOMASK) >= WOODS_LOW && (cell & LOMASK) <= WOODS_HIGH) { + return true; + } + + return false; +} + + +void Micropolis::smoothTrees() +{ + short x, y; + for (x = 0; x < WORLD_W; x++) { + for (y = 0; y < WORLD_H; y++) { + if (isTree(map[x][y])) { + smoothTreesAt(x, y, false); + } + } + } +} + +/** Temporary function to prevent breaking a lot of code. */ +void Micropolis::smoothTreesAt(int x, int y, bool preserve) +{ + ToolEffects effects(this); + + smoothTreesAt(x, y, preserve, &effects); + effects.modifyWorld(); +} + + +/** + * Smooth trees at a position. + */ +void Micropolis::smoothTreesAt(int x, int y, bool preserve, + ToolEffects *effects) +{ + static short dx[4] = { -1, 0, 1, 0 }; + static short dy[4] = { 0, 1, 0, -1 }; + static const short treeTable[16] = { + 0, 0, 0, 34, + 0, 0, 36, 35, + 0, 32, 0, 33, + 30, 31, 29, 37, + }; + + if (!isTree(effects->getMapValue(x, y))) { + return; + } + + int bitIndex = 0; + int z; + for (z = 0; z < 4; z++) { + bitIndex = bitIndex << 1; + int xTemp = x + dx[z]; + int yTemp = y + dy[z]; + if (testBounds(xTemp, yTemp) + && isTree(effects->getMapValue(xTemp, yTemp))) { + bitIndex++; + } + } + + int temp = treeTable[bitIndex & 15]; + if (temp) { + if (temp != WOODS) { + if ((x + y) & 1) { + temp = temp - 8; + } + } + effects->setMapValue(x, y, temp | BLBNBIT); + } else { + if (!preserve) { + effects->setMapValue(x, y, temp); + } + } +} + + +/** + * Construct rivers. + * @param terrainPos Coordinate to start making a river. + */ +void Micropolis::doRivers(const Position &terrainPos) +{ + Direction2 riverDir; // Global direction of the river + Direction2 terrainDir; // Local direction of the river + + riverDir = (Direction2)(DIR2_NORTH + (getRandom(3) * 2)); + doBRiver(terrainPos, riverDir, riverDir); + + riverDir = rotate180(riverDir); + terrainDir = doBRiver(terrainPos, riverDir, riverDir); + + riverDir = (Direction2)(DIR2_NORTH + (getRandom(3) * 2)); + doSRiver(terrainPos, riverDir, terrainDir); +} + + +/** + * Make a big river. + * @param pos Start position of making a river. + * @param riverDir Global direction of the river. + * @param terrainDir Local direction of the terrain. + * @return Last used local terrain direction. + */ +Direction2 Micropolis::doBRiver(const Position &riverPos, + Direction2 riverDir, Direction2 terrainDir) +{ + int rate1, rate2; + + if (terrainCurveLevel < 0) { + rate1 = 100; + rate2 = 200; + } else { + rate1 = terrainCurveLevel + 10; + rate2 = terrainCurveLevel + 100; + } + + Position pos(riverPos); + + while (testBounds(pos.posX + 4, pos.posY + 4)) { + plopBRiver(pos); + if (getRandom(rate1) < 10) { + terrainDir = riverDir; + } else { + if (getRandom(rate2) > 90) { + terrainDir = rotate45(terrainDir); + } + if (getRandom(rate2) > 90) { + terrainDir = rotate45(terrainDir, 7); + } + } + pos.move(terrainDir); + } + + return terrainDir; +} + +/** + * Make a small river. + * @param pos Start position of making a river. + * @param riverDir Global direction of the river. + * @param terrainDir Local direction of the terrain. + * @return Last used local terrain direction. + */ +Direction2 Micropolis::doSRiver(const Position &riverPos, + Direction2 riverDir, Direction2 terrainDir) +{ + int rate1, rate2; + + if (terrainCurveLevel < 0) { + rate1 = 100; + rate2 = 200; + } else { + rate1 = terrainCurveLevel + 10; + rate2 = terrainCurveLevel + 100; + } + + Position pos(riverPos); + + while (testBounds(pos.posX + 3, pos.posY + 3)) { + //printf("doSRiver %d %d td %d rd %d\n", pos.posX, pos.posY, terrainDir, riverDir); + plopSRiver(pos); + if (getRandom(rate1) < 10) { + terrainDir = riverDir; + } else { + if (getRandom(rate2) > 90) { + terrainDir = rotate45(terrainDir); + } + if (getRandom(rate2) > 90) { + terrainDir = rotate45(terrainDir, 7); + } + } + pos.move(terrainDir); + } + + return terrainDir; +} + + +/** + * Put \a mChar onto the map at position \a xLoc, \a yLoc if possible. + * @param mChar Map value to put ont the map. + * @param xLoc Horizontal position at the map to put \a mChar. + * @param yLoc Vertical position at the map to put \a mChar. + */ +void Micropolis::putOnMap(MapValue mChar, short xLoc, short yLoc) +{ + if (mChar == 0) { + return; + } + + if (!testBounds(xLoc, yLoc)) { + return; + } + + MapValue temp = map[xLoc][yLoc]; + + if (temp != DIRT) { + temp = temp & LOMASK; + if (temp == RIVER) { + if (mChar != CHANNEL) { + return; + } + } + if (temp == CHANNEL) { + return; + } + } + map[xLoc][yLoc] = mChar; +} + +/** + * Put down a big river diamond-like shape. + * @param pos Base coordinate of the blob (top-left position). + */ +void Micropolis::plopBRiver(const Position &pos) +{ + short x, y; + static MapValue BRMatrix[9][9] = { + { 0, 0, 0, REDGE, REDGE, REDGE, 0, 0, 0 }, + { 0, 0, REDGE, RIVER, RIVER, RIVER, REDGE, 0, 0 }, + { 0, REDGE, RIVER, RIVER, RIVER, RIVER, RIVER, REDGE, 0 }, + { REDGE, RIVER, RIVER, RIVER, RIVER, RIVER, RIVER, RIVER, REDGE }, + { REDGE, RIVER, RIVER, RIVER, CHANNEL, RIVER, RIVER, RIVER, REDGE }, + { REDGE, RIVER, RIVER, RIVER, RIVER, RIVER, RIVER, RIVER, REDGE }, + { 0, REDGE, RIVER, RIVER, RIVER, RIVER, RIVER, REDGE, 0 }, + { 0, 0, REDGE, RIVER, RIVER, RIVER, REDGE, 0, 0 }, + { 0, 0, 0, REDGE, REDGE, REDGE, 0, 0, 0 }, + }; + + for (x = 0; x < 9; x++) { + for (y = 0; y < 9; y++) { + putOnMap(BRMatrix[y][x], pos.posX + x, pos.posY + y); + } + } +} + + +/** + * Put down a small river diamond-like shape. + * @param pos Base coordinate of the blob (top-left position). + */ +void Micropolis::plopSRiver(const Position &pos) +{ + short x, y; + static MapValue SRMatrix[6][6] = { + { 0, 0, REDGE, REDGE, 0, 0 }, + { 0, REDGE, RIVER, RIVER, REDGE, 0 }, + { REDGE, RIVER, RIVER, RIVER, RIVER, REDGE }, + { REDGE, RIVER, RIVER, RIVER, RIVER, REDGE }, + { 0, REDGE, RIVER, RIVER, REDGE, 0 }, + { 0, 0, REDGE, REDGE, 0, 0 }, + }; + + for (x = 0; x < 6; x++) { + for (y = 0; y < 6; y++) { + putOnMap(SRMatrix[y][x], pos.posX + x, pos.posY + y); + } + } +} + + +void Micropolis::smoothWater() +{ + int x, y; + MapTile tile; + Direction2 dir; + + for (x = 0; x < WORLD_W; x++) { + for (y = 0; y < WORLD_H; y++) { + + tile = map[x][y] & LOMASK; + + /* If (x, y) is water: */ + if (tile >= WATER_LOW && tile <= WATER_HIGH) { + + const Position pos(x, y); + for (dir = DIR2_BEGIN; dir < DIR2_END; dir = increment90(dir)) { + + /* If getting a tile off-map, condition below fails. */ + // @note I think this may have been a bug, since it always uses DIR2_WEST instead of dir. + //tile = getTileFromMap(pos, DIR2_WEST, WATER_LOW); + tile = getTileFromMap(pos, dir, WATER_LOW); + + /* If nearest object is not water: */ + if (tile < WATER_LOW || tile > WATER_HIGH) { + map[x][y] = REDGE; /* set river edge */ + break; // Continue with next tile + } + } + } + } + } + + for (x = 0; x < WORLD_W; x++) { + for (y = 0; y < WORLD_H; y++) { + + tile = map[x][y] & LOMASK; + + /* If water which is not a channel: */ + if (tile != CHANNEL && tile >= WATER_LOW && tile <= WATER_HIGH) { + + bool makeRiver = true; // make (x, y) a river + + const Position pos(x, y); + for (dir = DIR2_BEGIN; dir < DIR2_END; dir = increment90(dir)) { + + /* If getting a tile off-map, condition below fails. */ + // @note I think this may have been a bug, since it always uses DIR2_WEST instead of dir. + //tile = getTileFromMap(pos, DIR2_WEST, WATER_LOW); + tile = getTileFromMap(pos, dir, WATER_LOW); + + /* If nearest object is not water: */ + if (tile < WATER_LOW || tile > WATER_HIGH) { + makeRiver = false; + break; + } + } + + if (makeRiver) { + map[x][y] = RIVER; /* make it a river */ + } + } + } + } + + for (x = 0; x < WORLD_W; x++) { + for (y = 0; y < WORLD_H; y++) { + + tile = map[x][y] & LOMASK; + + /* If woods: */ + if (tile >= WOODS_LOW && tile <= WOODS_HIGH) { + + const Position pos(x, y); + for (dir = DIR2_BEGIN; dir < DIR2_END; dir = increment90(dir)) { + + /* If getting a tile off-map, condition below fails. */ + // @note I think this may have been a bug, since it always uses DIR2_WEST instead of dir. + //tile = getTileFromMap(pos, DIR2_WEST, WATER_LOW); + tile = getTileFromMap(pos, dir, TILE_INVALID); + + if (tile == RIVER || tile == CHANNEL) { + map[x][y] = REDGE; /* make it water's edge */ + break; + } + } + } + } + } +} + + +//////////////////////////////////////////////////////////////////////// diff --git a/core/graph.cpp b/core/graph.cpp new file mode 100644 index 0000000..50f8e27 --- /dev/null +++ b/core/graph.cpp @@ -0,0 +1,399 @@ +/* graph.cpp + * + * Micropolis, Unix Version. This game was released for the Unix platform + * in or about 1990 and has been modified for inclusion in the One Laptop + * Per Child program. Copyright (C) 1989 - 2007 Electronic Arts Inc. If + * you need assistance with this program, you may contact: + * http://wiki.laptop.org/go/Micropolis or email micropolis@laptop.org. + * + * This program 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. + * + * This program 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 this program. If + * not, see . + * + * ADDITIONAL TERMS per GNU GPL Section 7 + * + * No trademark or publicity rights are granted. This license does NOT + * give you any right, title or interest in the trademark SimCity or any + * other Electronic Arts trademark. You may not distribute any + * modification of this program using the trademark SimCity or claim any + * affliation or association with Electronic Arts Inc. or its employees. + * + * Any propagation or conveyance of this program must include this + * copyright notice and these terms. + * + * If you convey this program (or any modifications of it) and assume + * contractual liability for the program to recipients of it, you agree + * to indemnify Electronic Arts for any liability that those contractual + * assumptions impose on Electronic Arts. + * + * You may not misrepresent the origins of this program; modified + * versions of the program must be marked as such and not identified as + * the original program. + * + * This disclaimer supplements the one included in the General Public + * License. TO THE FULLEST EXTENT PERMISSIBLE UNDER APPLICABLE LAW, THIS + * PROGRAM IS PROVIDED TO YOU "AS IS," WITH ALL FAULTS, WITHOUT WARRANTY + * OF ANY KIND, AND YOUR USE IS AT YOUR SOLE RISK. THE ENTIRE RISK OF + * SATISFACTORY QUALITY AND PERFORMANCE RESIDES WITH YOU. ELECTRONIC ARTS + * DISCLAIMS ANY AND ALL EXPRESS, IMPLIED OR STATUTORY WARRANTIES, + * INCLUDING IMPLIED WARRANTIES OF MERCHANTABILITY, SATISFACTORY QUALITY, + * FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT OF THIRD PARTY + * RIGHTS, AND WARRANTIES (IF ANY) ARISING FROM A COURSE OF DEALING, + * USAGE, OR TRADE PRACTICE. ELECTRONIC ARTS DOES NOT WARRANT AGAINST + * INTERFERENCE WITH YOUR ENJOYMENT OF THE PROGRAM; THAT THE PROGRAM WILL + * MEET YOUR REQUIREMENTS; THAT OPERATION OF THE PROGRAM WILL BE + * UNINTERRUPTED OR ERROR-FREE, OR THAT THE PROGRAM WILL BE COMPATIBLE + * WITH THIRD PARTY SOFTWARE OR THAT ANY ERRORS IN THE PROGRAM WILL BE + * CORRECTED. NO ORAL OR WRITTEN ADVICE PROVIDED BY ELECTRONIC ARTS OR + * ANY AUTHORIZED REPRESENTATIVE SHALL CREATE A WARRANTY. SOME + * JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF OR LIMITATIONS ON IMPLIED + * WARRANTIES OR THE LIMITATIONS ON THE APPLICABLE STATUTORY RIGHTS OF A + * CONSUMER, SO SOME OR ALL OF THE ABOVE EXCLUSIONS AND LIMITATIONS MAY + * NOT APPLY TO YOU. + */ + +/** + * @file graph.cpp + * @brief Implements functionality for graph data management in + * Micropolis. + * + * This file contains functions for managing historical data used in + * graphs, such as population and pollution levels. It includes + * methods for initializing graphs, updating historical data, scaling + * data for graph display, and retrieving specific historical values. + * This file plays a key role in visualizing the evolution of the city + * over time in various aspects. + */ + + +//////////////////////////////////////////////////////////////////////// + + +#include "micropolis.h" + + +//////////////////////////////////////////////////////////////////////// + + +//char *Micropolis::histName[] = { +// "Residential", "Commercial", "Industrial", +// "Cash Flow", "Crime", "Pollution" +//}; + +//unsigned char Micropolis::histColor[] = { +// COLOR_LIGHTGREEN, COLOR_DARKBLUE, COLOR_YELLOW, +// COLOR_DARKGREEN, COLOR_RED, COLOR_OLIVE +//}; + + +//////////////////////////////////////////////////////////////////////// + + +/** + * Copy history data to new array, scaling as needed. + * @param hist Source history data. + * @param s Destination byte array. + * @param scale Scale factor. + * @todo Figure out why we copy data. + */ +void Micropolis::drawMonth(short *hist, unsigned char *s, float scale) +{ + int val, x; + + for (x = 0; x < 120; x++) { + val = (int)(hist[x] * scale); + s[119 - x] = (unsigned char)clamp(val, 0, 255); + } +} + + +/** + * Set flag that graph data has been changed and graphs should be updated. + * @todo Rename function. + */ +void Micropolis::changeCensus() +{ + censusChanged = true; +} + + +/** + * If graph data has been changed, update all graphs. + * If graphs have been changed, tell the user front-end about it. + */ +void Micropolis::graphDoer() +{ + if (censusChanged) { + callback->updateHistory(this, callbackVal); + censusChanged = false; + } +} + + +/** Initialize graphs */ +void Micropolis::initGraphs() +{ + if (!historyInitialized) { + historyInitialized = true; + } +} + + +/** Compute various max ranges of graphs */ +void Micropolis::initGraphMax() +{ + int x; + + resHist10Max = 0; + comHist10Max = 0; + indHist10Max = 0; + + for (x = 118; x >= 0; x--) { + + if (resHist[x] < 0) { + resHist[x] = 0; + } + if (comHist[x] < 0) { + comHist[x] = 0; + } + if (indHist[x] < 0) { + indHist[x] = 0; + } + + resHist10Max = max(resHist10Max, resHist[x]); + comHist10Max = max(comHist10Max, comHist[x]); + indHist10Max = max(indHist10Max, indHist[x]); + + } + + graph10Max = + max(resHist10Max, + max(comHist10Max, + indHist10Max)); + + resHist120Max = 0; + comHist120Max = 0; + indHist120Max = 0; + + for (x = 238; x >= 120; x--) { + + if (resHist[x] < 0) { + resHist[x] = 0; + } + if (comHist[x] < 0) { + comHist[x] = 0; + } + if (indHist[x] < 0) { + indHist[x] = 0; + } + + resHist120Max = max(resHist120Max, resHist[x]); + comHist120Max = max(comHist120Max, comHist[x]); + indHist120Max = max(indHist120Max, indHist[x]); + + } + + graph120Max = + max(resHist120Max, + max(comHist120Max, + indHist120Max)); +} + + +/** + * Get the minimal and maximal values of a historic graph. + * @param historyType Type of history information. @see HistoryType + * @param historyScale Scale of history data. @see HistoryScale + * @param minValResult Pointer to variable to write minimal value to. + * @param maxValResult Pointer to variable to write maximal value to. + */ +void Micropolis::getHistoryRange(int historyType, int historyScale, + short *minValResult, short *maxValResult) +{ + if (historyType < 0 || historyType >= HISTORY_TYPE_COUNT + || historyScale < 0 || historyScale >= HISTORY_SCALE_COUNT) { + *minValResult = 0; + *maxValResult = 0; + return; + } + + short *history = NULL; + switch (historyType) { + case HISTORY_TYPE_RES: + history = resHist; + break; + case HISTORY_TYPE_COM: + history = comHist; + break; + case HISTORY_TYPE_IND: + history = indHist; + break; + case HISTORY_TYPE_MONEY: + history = moneyHist; + break; + case HISTORY_TYPE_CRIME: + history = crimeHist; + break; + case HISTORY_TYPE_POLLUTION: + history = pollutionHist; + break; + default: + NOT_REACHED(); + break; + } + + int offset = 0; + switch (historyScale) { + case HISTORY_SCALE_SHORT: + offset = 0; + break; + case HISTORY_SCALE_LONG: + offset = 120; + break; + default: + NOT_REACHED(); + break; + } + + short minVal = 32000; + short maxVal = -32000; + + for (int i = 0; i < HISTORY_COUNT; i++) { + short val = history[i + offset]; + + minVal = min(val, minVal); + maxVal = max(val, maxVal); + } + + *minValResult = minVal; + *maxValResult = maxVal; +} + + +/** + * Get a value from the history tables. + * @param historyType Type of history information. @see HistoryType + * @param historyScale Scale of history data. @see HistoryScale + * @param historyIndex Index in the data to obtain + * @return Historic data value of the requested graph + */ +short Micropolis::getHistory(int historyType, int historyScale, + int historyIndex) +{ + if (historyType < 0 || historyType >= HISTORY_TYPE_COUNT + || historyScale < 0 || historyScale >= HISTORY_SCALE_COUNT + || historyIndex < 0 || historyIndex >= HISTORY_COUNT) { + return 0; + } + + short *history = NULL; + switch (historyType) { + case HISTORY_TYPE_RES: + history = resHist; + break; + case HISTORY_TYPE_COM: + history = comHist; + break; + case HISTORY_TYPE_IND: + history = indHist; + break; + case HISTORY_TYPE_MONEY: + history = moneyHist; + break; + case HISTORY_TYPE_CRIME: + history = crimeHist; + break; + case HISTORY_TYPE_POLLUTION: + history = pollutionHist; + break; + default: + NOT_REACHED(); + break; + } + + int offset = 0; + switch (historyScale) { + case HISTORY_SCALE_SHORT: + offset = 0; + break; + case HISTORY_SCALE_LONG: + offset = 120; + break; + default: + NOT_REACHED(); + break; + } + + short result = history[historyIndex + offset]; + + return result; +} + + +/** + * Store a value into the history tables. + * @param historyType Type of history information. @see HistoryType + * @param historyScale Scale of history data. @see HistoryScale + * @param historyIndex Index in the data to obtain + * @param historyValue Index in the value to store + */ +void Micropolis::setHistory(int historyType, int historyScale, + int historyIndex, short historyValue) +{ + if (historyType < 0 || historyType >= HISTORY_TYPE_COUNT + || historyScale < 0 || historyScale >= HISTORY_SCALE_COUNT + || historyIndex < 0 || historyIndex >= HISTORY_COUNT) { + return; + } + + short *history = NULL; + switch (historyType) { + case HISTORY_TYPE_RES: + history = resHist; + break; + case HISTORY_TYPE_COM: + history = comHist; + break; + case HISTORY_TYPE_IND: + history = indHist; + break; + case HISTORY_TYPE_MONEY: + history = moneyHist; + break; + case HISTORY_TYPE_CRIME: + history = crimeHist; + break; + case HISTORY_TYPE_POLLUTION: + history = pollutionHist; + break; + default: + NOT_REACHED(); + break; + } + + int offset = 0; + switch (historyScale) { + case HISTORY_SCALE_SHORT: + offset = 0; + break; + case HISTORY_SCALE_LONG: + offset = 120; + break; + default: + NOT_REACHED(); + break; + } + + history[historyIndex + offset] = historyValue; +} + + +//////////////////////////////////////////////////////////////////////// diff --git a/core/initialize.cpp b/core/initialize.cpp new file mode 100644 index 0000000..9ff81d0 --- /dev/null +++ b/core/initialize.cpp @@ -0,0 +1,146 @@ +/* initialize.cpp + * + * Micropolis, Unix Version. This game was released for the Unix platform + * in or about 1990 and has been modified for inclusion in the One Laptop + * Per Child program. Copyright (C) 1989 - 2007 Electronic Arts Inc. If + * you need assistance with this program, you may contact: + * http://wiki.laptop.org/go/Micropolis or email micropolis@laptop.org. + * + * This program 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. + * + * This program 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 this program. If + * not, see . + * + * ADDITIONAL TERMS per GNU GPL Section 7 + * + * No trademark or publicity rights are granted. This license does NOT + * give you any right, title or interest in the trademark SimCity or any + * other Electronic Arts trademark. You may not distribute any + * modification of this program using the trademark SimCity or claim any + * affliation or association with Electronic Arts Inc. or its employees. + * + * Any propagation or conveyance of this program must include this + * copyright notice and these terms. + * + * If you convey this program (or any modifications of it) and assume + * contractual liability for the program to recipients of it, you agree + * to indemnify Electronic Arts for any liability that those contractual + * assumptions impose on Electronic Arts. + * + * You may not misrepresent the origins of this program; modified + * versions of the program must be marked as such and not identified as + * the original program. + * + * This disclaimer supplements the one included in the General Public + * License. TO THE FULLEST EXTENT PERMISSIBLE UNDER APPLICABLE LAW, THIS + * PROGRAM IS PROVIDED TO YOU "AS IS," WITH ALL FAULTS, WITHOUT WARRANTY + * OF ANY KIND, AND YOUR USE IS AT YOUR SOLE RISK. THE ENTIRE RISK OF + * SATISFACTORY QUALITY AND PERFORMANCE RESIDES WITH YOU. ELECTRONIC ARTS + * DISCLAIMS ANY AND ALL EXPRESS, IMPLIED OR STATUTORY WARRANTIES, + * INCLUDING IMPLIED WARRANTIES OF MERCHANTABILITY, SATISFACTORY QUALITY, + * FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT OF THIRD PARTY + * RIGHTS, AND WARRANTIES (IF ANY) ARISING FROM A COURSE OF DEALING, + * USAGE, OR TRADE PRACTICE. ELECTRONIC ARTS DOES NOT WARRANT AGAINST + * INTERFERENCE WITH YOUR ENJOYMENT OF THE PROGRAM; THAT THE PROGRAM WILL + * MEET YOUR REQUIREMENTS; THAT OPERATION OF THE PROGRAM WILL BE + * UNINTERRUPTED OR ERROR-FREE, OR THAT THE PROGRAM WILL BE COMPATIBLE + * WITH THIRD PARTY SOFTWARE OR THAT ANY ERRORS IN THE PROGRAM WILL BE + * CORRECTED. NO ORAL OR WRITTEN ADVICE PROVIDED BY ELECTRONIC ARTS OR + * ANY AUTHORIZED REPRESENTATIVE SHALL CREATE A WARRANTY. SOME + * JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF OR LIMITATIONS ON IMPLIED + * WARRANTIES OR THE LIMITATIONS ON THE APPLICABLE STATUTORY RIGHTS OF A + * CONSUMER, SO SOME OR ALL OF THE ABOVE EXCLUSIONS AND LIMITATIONS MAY + * NOT APPLY TO YOU. + */ + +/** + * @file initialize.cpp + * @brief Contains initialization functions for various game state + * components in Micropolis. + * + * This file includes functions responsible for initializing and + * resetting game state variables, maps, and editor tools. It sets up + * initial values for game parameters and clears previous game data to + * prepare for a new game session or to reset the current state. + */ + + +//////////////////////////////////////////////////////////////////////// + + +#include "micropolis.h" + + +//////////////////////////////////////////////////////////////////////// + + +/** Reset many game state variables */ +void Micropolis::initWillStuff() +{ + randomlySeedRandom(); + initGraphMax(); + destroyAllSprites(); + + roadEffect = MAX_ROAD_EFFECT; + policeEffect = MAX_POLICE_STATION_EFFECT; + fireEffect = MAX_FIRE_STATION_EFFECT; + cityScore = 500; + cityPop = -1; + cityTimeLast = -1; + cityYearLast = -1; + cityMonthLast = -1; + totalFundsLast = -1; + resLast = comLast = indLast = -999999; + roadFund = 0; + policeFund = 0; + fireFund = 0; + valveFlag = true; + disasterEvent = SC_NONE; + taxFlag = false; + + populationDensityMap.clear(); + trafficDensityMap.clear(); + pollutionDensityMap.clear(); + landValueMap.clear(); + crimeRateMap.clear(); + terrainDensityMap.clear(); + rateOfGrowthMap.clear(); + comRateMap.clear(); + policeStationMap.clear(); + policeStationEffectMap.clear(); + fireStationMap.clear(); + fireStationEffectMap.clear(); + + doNewGame(); + doUpdateHeads(); +} + + +/** + * Reset all maps in the simulator. + * @note Function is empty + * @todo What should be done with this empty function? + */ +void Micropolis::resetMapState() +{ +} + + +/** + * Reset all tools in the simulator editor. + * @note Function is empty + * @todo What should be done with this empty function? + */ +void Micropolis::resetEditorState() +{ +} + + +//////////////////////////////////////////////////////////////////////// diff --git a/core/map.cpp b/core/map.cpp new file mode 100644 index 0000000..dfbcf39 --- /dev/null +++ b/core/map.cpp @@ -0,0 +1,1025 @@ +/* map.cpp + * + * Micropolis, Unix Version. This game was released for the Unix platform + * in or about 1990 and has been modified for inclusion in the One Laptop + * Per Child program. Copyright (C) 1989 - 2007 Electronic Arts Inc. If + * you need assistance with this program, you may contact: + * http://wiki.laptop.org/go/Micropolis or email micropolis@laptop.org. + * + * This program 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. + * + * This program 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 this program. If + * not, see . + * + * ADDITIONAL TERMS per GNU GPL Section 7 + * + * No trademark or publicity rights are granted. This license does NOT + * give you any right, title or interest in the trademark SimCity or any + * other Electronic Arts trademark. You may not distribute any + * modification of this program using the trademark SimCity or claim any + * affliation or association with Electronic Arts Inc. or its employees. + * + * Any propagation or conveyance of this program must include this + * copyright notice and these terms. + * + * If you convey this program (or any modifications of it) and assume + * contractual liability for the program to recipients of it, you agree + * to indemnify Electronic Arts for any liability that those contractual + * assumptions impose on Electronic Arts. + * + * You may not misrepresent the origins of this program; modified + * versions of the program must be marked as such and not identified as + * the original program. + * + * This disclaimer supplements the one included in the General Public + * License. TO THE FULLEST EXTENT PERMISSIBLE UNDER APPLICABLE LAW, THIS + * PROGRAM IS PROVIDED TO YOU "AS IS," WITH ALL FAULTS, WITHOUT WARRANTY + * OF ANY KIND, AND YOUR USE IS AT YOUR SOLE RISK. THE ENTIRE RISK OF + * SATISFACTORY QUALITY AND PERFORMANCE RESIDES WITH YOU. ELECTRONIC ARTS + * DISCLAIMS ANY AND ALL EXPRESS, IMPLIED OR STATUTORY WARRANTIES, + * INCLUDING IMPLIED WARRANTIES OF MERCHANTABILITY, SATISFACTORY QUALITY, + * FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT OF THIRD PARTY + * RIGHTS, AND WARRANTIES (IF ANY) ARISING FROM A COURSE OF DEALING, + * USAGE, OR TRADE PRACTICE. ELECTRONIC ARTS DOES NOT WARRANT AGAINST + * INTERFERENCE WITH YOUR ENJOYMENT OF THE PROGRAM; THAT THE PROGRAM WILL + * MEET YOUR REQUIREMENTS; THAT OPERATION OF THE PROGRAM WILL BE + * UNINTERRUPTED OR ERROR-FREE, OR THAT THE PROGRAM WILL BE COMPATIBLE + * WITH THIRD PARTY SOFTWARE OR THAT ANY ERRORS IN THE PROGRAM WILL BE + * CORRECTED. NO ORAL OR WRITTEN ADVICE PROVIDED BY ELECTRONIC ARTS OR + * ANY AUTHORIZED REPRESENTATIVE SHALL CREATE A WARRANTY. SOME + * JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF OR LIMITATIONS ON IMPLIED + * WARRANTIES OR THE LIMITATIONS ON THE APPLICABLE STATUTORY RIGHTS OF A + * CONSUMER, SO SOME OR ALL OF THE ABOVE EXCLUSIONS AND LIMITATIONS MAY + * NOT APPLY TO YOU. + */ + +/** + * @file map.cpp + * @brief Handles drawing and managing various map overlays in + * Micropolis. + * + * This file includes functions for drawing different types of map + * overlays, such as residential, commercial, industrial areas, power + * grid, and various types of density maps. It also contains functions + * for applying dynamic filters to maps and managing map state. + */ + + +//////////////////////////////////////////////////////////////////////// + + +#include "micropolis.h" + + +// NOTE: This is disabled, and should be re-implementd in the front-end. + + +#if 0 + + +//////////////////////////////////////////////////////////////////////// +// Disabled this small map drawing, filtering and overlaying code. +// Going to re-implement it in the tile engine and Python. + + +#define VAL_NONE 0 +#define VAL_LOW 1 +#define VAL_MEDIUM 2 +#define VAL_HIGH 3 +#define VAL_VERYHIGH 4 +#define VAL_PLUS 5 +#define VAL_VERYPLUS 6 +#define VAL_MINUS 7 +#define VAL_VERYMINUS 8 + + +/* These are names of the 16 colors */ +#define COLOR_WHITE 0 +#define COLOR_YELLOW 1 +#define COLOR_ORANGE 2 +#define COLOR_RED 3 +#define COLOR_DARKRED 4 +#define COLOR_DARKBLUE 5 +#define COLOR_LIGHTBLUE 6 +#define COLOR_BROWN 7 +#define COLOR_LIGHTGREEN 8 +#define COLOR_DARKGREEN 9 +#define COLOR_OLIVE 10 +#define COLOR_LIGHTBROWN 11 +#define COLOR_LIGHTGRAY 12 +#define COLOR_MEDIUMGRAY 13 +#define COLOR_DARKGRAY 14 +#define COLOR_BLACK 15 + + +/* + +static short valMap[] = { + -1, // VAL_NONE + COLOR_LIGHTGRAY, // VAL_LOW + COLOR_YELLOW, // VAL_MEDIUM + COLOR_ORANGE, // VAL_HIGH + COLOR_RED, // VAL_VERYHIGH + COLOR_DARKGREEN, // VAL_PLUS + COLOR_LIGHTGREEN, // VAL_VERYPLUS + COLOR_ORANGE, // VAL_MINUS + COLOR_YELLOW, // VAL_VERYMINUS +}; + + +static short valGrayMap[] = { + -1, 31, 127, 191, 255, + 223, 255, 31, 0 +}; + +*/ + + +/* color pixel values */ +#define UNPOWERED COLOR_LIGHTBLUE +#define POWERED COLOR_RED +#define CONDUCTIVE COLOR_LIGHTGRAY + + +#define DRAW_BEGIN \ + int col, row; \ + unsigned short tile; \ + short *mp; \ + unsigned char *imageBase; \ + unsigned char *image; \ + UQuad *mem; \ + UQuad m; \ + int lineBytes = view->line_bytes8; \ + int pixelBytes = view->pixel_bytes; \ + mp = &map[0][0]; \ + imageBase = view->x->color ? view->data : view->data8; \ + for (col = 0; col < WORLD_W; col++) { \ + image = imageBase + (3 * pixelBytes * col); \ + for (row = 0; row < WORLD_H; row++) { \ + tile = *(mp++) & LOMASK; \ + if (tile >= TILE_COUNT) { \ + tile -= TILE_COUNT; \ + } + + +#ifdef IS_INTEL + +#define ROW1_8(n) \ + m = mem[n]; \ + image[0] = (unsigned char)(m); \ + image[1] = (unsigned char)(m >>8); \ + image[2] = (unsigned char)(m >>16); \ + image += lineBytes; + +#define ROW1_16(n) \ + memcpy((char *)image, ((char *)mem) + (n * 4 * 2), (3 * 2)); \ + image += lineBytes; + +#define ROW1_24(n) \ + memcpy((char *)image, ((char *)mem) + (n * 4 * 3), (3 * 3)); \ + image += lineBytes; + +#define ROW1_32(n) \ + memcpy((char *)image, ((char *)mem) + (n * 4 * 4), (3 * 4)); \ + image += lineBytes; + +#else + +#define ROW1_8(n) \ + m = (UQuad)(mem[n]); \ + image[0] = (unsigned char)(m >>24); \ + image[1] = (unsigned char)(m >>16); \ + image[2] = (unsigned char)(m >>8); \ + image += lineBytes; + +#define ROW1_16(n) \ + m = (UQuad)mem[n]; /* XXX: WRONG. handle depth */ \ + image[0] = (unsigned char)(m >>24); \ + image[1] = (unsigned char)(m >>16); \ + image[2] = (unsigned char)(m >>8); \ + image += lineBytes; + +#define ROW1_24(n) \ + m = (UQuad)mem[n]; /* XXX: WRONG. handle depth */ \ + image[0] = (unsigned char)(m >>24); \ + image[1] = (unsigned char)(m >>16); \ + image[2] = (unsigned char)(m >>8); \ + image += lineBytes; + +#define ROW1_32(n) \ + m = (UQuad)mem[n]; /* XXX: WRONG. handle depth */ \ + image[0] = (unsigned char)(m >>24); \ + image[1] = (unsigned char)(m >>16); \ + image[2] = (unsigned char)(m >>8); \ + image += lineBytes; + +#endif + +#define ROW3_8 ROW1_8(0) ROW1_8(1) ROW1_8(2) +#define ROW3_16 ROW1_16(0) ROW1_16(1) ROW1_16(2) +#define ROW3_24 ROW1_24(0) ROW1_24(1) ROW1_24(2) +#define ROW3_32 ROW1_32(0) ROW1_32(1) ROW1_32(2) + +#define ROW3 \ + switch (view->x->depth) { \ + case 1: \ + case 8: \ + ROW3_8 \ + break; \ + case 15: \ + case 16: \ + ROW3_16 \ + break; \ + case 24: \ + ROW3_24 \ + break; \ + case 32: \ + ROW3_32 \ + break; \ + default: \ + assert(0); /* Undefined depth */ \ + break; \ + } + +#define DRAW_END \ + mem = (UQuad *)&view->smalltiles[tile * 4 * 4 * pixelBytes]; \ + ROW3 \ + } \ + } + + +void Micropolis::drawAll() +{ + DRAW_BEGIN + DRAW_END +} + + +void Micropolis::drawRes() +{ + DRAW_BEGIN + if (tile >= COMBASE) { + tile = DIRT; + } + DRAW_END +} + + +void Micropolis::drawCom() +{ + DRAW_BEGIN + if ((tile > COMLAST) || + ((tile >= LVRAIL6) && + (tile < COMBASE))) { + tile = DIRT; + } + DRAW_END +} + + +void Micropolis::drawInd() + +{ + DRAW_BEGIN + if (((tile >= RESBASE) && (tile < INDBASE)) || + ((tile >= PORTBASE) && (tile < SMOKEBASE)) || + ((tile >= TINYEXP) && (tile <= TINYEXPLAST)) || + (tile >= FOOTBALLGAME1)) { + tile = DIRT; + } + DRAW_END +} + + +void Micropolis::drawLilTransMap() +{ + DRAW_BEGIN + if ((tile >= RESBASE) || + ((tile >= BRWXXX7) && (tile <= LVPOWER10)) || + (tile == UNUSED_TRASH6)) { + tile = DIRT; + } + DRAW_END +} + + +void Micropolis::drawPowerGrid() +{ + short col, row; + unsigned short tile; + short *mp; + unsigned char *image, *imageBase; + UQuad *mem; + UQuad m; + int lineBytes = view->line_bytes8; + int pixelBytes = view->pixel_bytes; + + int pix; + int powered, unpowered, conductive; + + if (view->x->color) { + powered = view->pixels[POWERED]; + unpowered = view->pixels[UNPOWERED]; + conductive = view->pixels[CONDUCTIVE]; + } else { + powered = 255; + unpowered = 0; + conductive = 127; + } + + mp = + &map[0][0]; + imageBase = + view->x->color ? view->data : view->data8; + + for (col = 0; col < WORLD_W; col++) { + + image = + imageBase + (3 * pixelBytes * col); + + for (row = 0; row < WORLD_H; row++) { + tile = *(mp++); + + if ((tile & LOMASK) >= TILE_COUNT) { + tile -= TILE_COUNT; + } + + if ((tile & LOMASK) <= LASTFIRE) { + tile &= LOMASK; + pix = -1; + } else if (tile & ZONEBIT) { + pix = (tile & PWRBIT) ? powered : unpowered; + } else { + if (tile & CONDBIT) { + pix = conductive; + } else { + tile = DIRT; + pix = -1; + } + } + + if (pix < 0) { + mem = (UQuad *)&view->smalltiles[tile * 4 * 4 * pixelBytes]; + ROW3 + } else { + switch (view->x->depth) { + + case 1: + case 8: + image[0] = image[1] = image[2] = pix; + image += lineBytes; + image[0] = image[1] = image[2] = pix; + image += lineBytes; + image[0] = image[1] = image[2] = pix; + image += lineBytes; + break; + + case 15: + case 16: { + unsigned short *p; + p = (unsigned short *)image; + p[0] = p[1] = p[2] = pix; + image += lineBytes; + p = (unsigned short *)image; + p[0] = p[1] = p[2] = pix; + image += lineBytes; + p = (unsigned short *)image; + p[0] = p[1] = p[2] = pix; + image += lineBytes; + break; + } + + case 24: + case 32: { + int x, y; + for (y = 0; y < 3; y++) { + unsigned char *img = image; + for (x = 0; x < 4; x++) { + *(img++) = (pix >> 0) & 0xff; + *(img++) = (pix >> 8) & 0xff; + *(img++) = (pix >> 16) & 0xff; + if (pixelBytes == 4) { + img++; + } // if + } // for x + image += lineBytes; + } // for y + break; + } + + default: + assert(0); /* Undefined depth */ + break; + + } + } + } + } +} + + +bool Micropolis::dynamicFilter( + int col, + int row) +{ + int populationDensity = populationDensityMap.worldGet(col, row); + int rateOfGrowth = rateOfGrowthMap.worldGet(col, row); + int traffic = trafficDensityMap.worldGet(col, row); + int pollution = pollutionDensityMap.worldGet(col, row); + int crime = crimeRateMap.worldGet(col, row); + int landValue = landValueMap.worldGet(col, row); + int police = policeStationEffectMap.worldGet(col, row); + int fire = fireStationEffectMap.worldGet(col, row); + + + return ( + ((dynamicData[0] > dynamicData[1]) || + (populationDensity >= dynamicData[0]) && + (populationDensity <= dynamicData[1])) && + ((dynamicData[2] > dynamicData[3]) || + (rateOfGrowth >= ((2 * dynamicData[2]) - 256)) && + (rateOfGrowth <= ((2 * dynamicData[3]) - 256))) && + ((dynamicData[4] > dynamicData[5]) || + (traffic >= dynamicData[4]) && + (traffic <= dynamicData[5])) && + ((dynamicData[6] > dynamicData[7]) || + (pollution >= dynamicData[6]) && + (pollution <= dynamicData[7])) && + ((dynamicData[8] > dynamicData[9]) || + (crime >= dynamicData[8]) && + (crime <= dynamicData[9])) && + ((dynamicData[10] > dynamicData[11]) || + (landValue >= dynamicData[10]) && + (landValue <= dynamicData[11])) && + ((dynamicData[12] > dynamicData[13]) || + (police >= dynamicData[12]) && + (police <= dynamicData[13])) && + ((dynamicData[14] > dynamicData[15]) || + (fire >= dynamicData[14]) && + (fire <= dynamicData[15]))); +} + + +void Micropolis::drawDynamic() +{ + DRAW_BEGIN + if (tile > LASTFIRE) { + if (!dynamicFilter(col, row)) { + tile = DIRT; + } // if + } // if + DRAW_END +} + + +short Micropolis::getCI(short x) +{ + if (x < 50) { + return VAL_NONE; + } + if (x < 100) { + return VAL_LOW; + } + if (x < 150) { + return VAL_MEDIUM; + } + if (x < 200) { + return VAL_HIGH; + } + return VAL_VERYHIGH; +} + +/** Draw population density overlay at small map */ +void Micropolis::drawPopulationDensity() +{ + short x, y; + + drawAll(); + for (x = 0; x < WORLD_W; x += populationDensityMap.MAP_BLOCKSIZE) { + for (y = 0; y < WORLD_H; y += populationDensityMap.MAP_BLOCKSIZE) { + maybeDrawRect( + getCI(populationDensityMap.worldGet(x, y)), + x * 3, + y * 3, + 3 * populationDensityMap.MAP_BLOCKSIZE, + 3 * populationDensityMap.MAP_BLOCKSIZE); + } + } +} + + +void Micropolis::drawRateOfGrowth() +{ + short x, y; + + drawAll(); + + for (x = 0; x < rateOfGrowthMap.MAP_W; x++) { + for (y = 0; y < rateOfGrowthMap.MAP_H; y++) { + short val; + short z = rateOfGrowthMap.get(x, y); + if (z > 100) { + val = VAL_VERYPLUS; + } else { + if (z > 20) { + val = VAL_PLUS; + } else { + if (z < -100) { + val = VAL_VERYMINUS; + } else { + if (z < -20) { + val = VAL_MINUS; + } else { + val = VAL_NONE; + } + } + } + } + maybeDrawRect( + val, + x * 24, + y * 24, + 24, + 24); + } + } +} + + +/** Draw traffic density overlay at the small map */ +void Micropolis::drawTrafficDensityMap() +{ + short x; + short y; + + drawLilTransMap(); + + for (x = 0; x < WORLD_W; x += trafficDensityMap.MAP_BLOCKSIZE) { + for (y = 0; y < WORLD_H; y += trafficDensityMap.MAP_BLOCKSIZE) { + maybeDrawRect( + getCI(trafficDensityMap.worldGet(x, y)), + x * 3, + y * 3, + 3 * trafficDensityMap.MAP_BLOCKSIZE, + 3 * trafficDensityMap.MAP_BLOCKSIZE); + } + } +} + + +/** Draw pollution overlay at the small map */ +void Micropolis::drawPollutionMap() +{ + short x, y; + + drawAll(view); + + for (x = 0; x < WORLD_W; x += pollutionDensityMap.MAP_BLOCKSIZE) { + for (y = 0; y < WORLD_H; y += pollutionDensityMap.MAP_BLOCKSIZE) { + maybeDrawRect( + getCI(10 + pollutionDensityMap.worldGet(x, y)), + x * 3, + y * 3, + 3 * pollutionDensityMap.MAP_BLOCKSIZE, + 3 * pollutionDensityMap.MAP_BLOCKSIZE); + } + } +} + + +/** Draw crime overlay at the small map */ +void Micropolis::drawCrimeRateMap() +{ + short x, y; + + drawAll(); + + for (x = 0; x < WORLD_W; x += crimeRateMap.MAP_BLOCKSIZE) { + for (y = 0; y < WORLD_H; y += crimeRateMap.MAP_BLOCKSIZE) { + maybeDrawRect( + getCI(crimeRateMap.worldGet(x, y)), + x * 3, + y * 3, + 3 * crimeRateMap.MAP_BLOCKSIZE, + 3 * crimeRateMap.MAP_BLOCKSIZE); + } + } +} + + +void Micropolis::drawLandValueMap() +{ + short x, y; + + drawAll(); + + for (x = 0; x < landValueMap.MAP_W; x++) { + for (y = 0; y < landValueMap.MAP_H; y++) { + maybeDrawRect( + view, + getCI(landValueMap.get(x, y)), + x * 6, + y * 6, + 6, + 6); + } + } +} + + +void Micropolis::drawFireRadius() +{ + short x, y; + + drawAll(); + for (x = 0; x < fireStationEffectMap.MAP_W; x++) { + for (y = 0; y < fireStationEffectMap.MAP_H; y++) { + maybeDrawRect( + getCI(fireStationEffectMap.get(x, y)), + x * 24, + y * 24, + 24, + 24); + } + } +} + + +void Micropolis::drawPoliceRadius() +{ + short x, y; + + drawAll(); + for (x = 0; x < policeStationEffectMap.MAP_W; x++) { + for (y = 0; y < policeStationEffectMap.MAP_H; y++) { + maybeDrawRect( + getCI(policeStationEffectMap.get(x, y)), + x * 24, + y * 24, + 24, + 24); + } + } +} + + +void Micropolis::memDrawMap() +{ + + switch (view->map_state) { + + case MAP_TYPE_ALL: + drawAll(view); + break; + + case MAP_TYPE_RES: + drawRes(view); + break; + + case MAP_TYPE_COM: + drawCom(view); + break; + + case MAP_TYPE_IND: + drawInd(view); + break; + + case MAP_TYPE_POWER: + drawPowerGrid(view); + break; + + case MAP_TYPE_ROAD: + drawLilTransMap(view); + break; + + case MAP_TYPE_POPULATION_DENSITY: + drawPopulationDensity(view); + break; + + case MAP_TYPE_RATE_OF_GROWTH: + drawRateOfGrowth(view); + break; + + case MAP_TYPE_TRAFFIC: + drawTrafficDensityMap(view); + break; + + case MAP_TYPE_POLLUTION: + drawPollutionDensityMap(view); + break; + + case MAP_TYPE_CRIME: + drawCrimeRateMap(view); + break; + + case MAP_TYPE_LAND_VALUE: + drawLandValueMap(view); + break; + + case MAP_TYPE_FIRE_RADIUS: + drawFireRadius(view); + break; + + case MAP_TYPE_POLICE_RADIUS: + drawPoliceRadius(view); + break; + + case MAP_TYPE_DYNAMIC: + drawDynamic(view); + break; + + default: + assert(0); /* Undefined map */ + break; + + } + + /* + if (!view->x->color) { + ditherMap(view); + XSetForeground(view->x->dpy, view->x->gc, view->pixels[COLOR_BLACK]); + XSetBackground(view->x->dpy, view->x->gc, view->pixels[COLOR_WHITE]); + XPutImage(view->x->dpy, view->pixmap, view->x->gc, view->image, + 0, 0, 0, 0, view->m_width, view->m_height); + } + */ + +} + + +void Micropolis::ditherMap() +{ +/* + int i, x, y, width, height; + int err, pixel1, pixel8; + int line_bytes1 = view->line_bytes; + int line_bytes8 = view->line_bytes8; + unsigned char *image1 = view->data; + unsigned char *image8 = view->data8; + int *errors; + + width = view->m_width; + height = view->m_height; + + errors = (int *)newPtr(sizeof(int) * width); + + for (i = 0; i < width; i++) { + errors[i] = (getRandom16() & 15) - 7; + } + + err = (getRandom16() & 15) - 7; + + for (y = 0; y < height; y += 2) { + unsigned char *i1 = image1; + unsigned char *i8 = image8; + + image1 += line_bytes1; + image8 += line_bytes8; + + for (x = 0; x < width; x += 8) { + pixel1 = 0; + for (i = 0; i < 8; i++) { + pixel1 <<= 1; + pixel8 = *(i8++) + err + errors[x + i]; + if (pixel8 > 127) { + err = pixel8 - 255; + } else { + pixel1 |= 1; + err = pixel8; + } + errors[x + i] = err/2; + err = err/2; + } + *(i1++) = pixel1; + } + + i1 = image1 + (width / 8) - 1; + i8 = image8 + width - 1; + + image1 += line_bytes1; + image8 += line_bytes8; + + for (x = width - 8; x >= 0; x -= 8) { + pixel1 = 0; + for (i = 7; i >= 0; i--) { + pixel1 >>= 1; + pixel8 = *(i8--) + err + errors[x + i]; + if (pixel8 > 127) { + err = pixel8 - 255; + } else { + pixel1 |= 128; + err = pixel8; + } + errors[x + i] = err/2; + err = err/2; + } + *(i1--) = pixel1; + } + } + + freePtr(errors); +*/ +} + + +void Micropolis::maybeDrawRect( + int val, + int x, + int y, + int w, + int h) +{ + if (val == VAL_NONE) { + return; + } + +/* + if (view->x->color) { + drawRect(view, view->pixels[valMap[val]], 0, x, y, w, h); + } else { + drawRect(view, valGrayMap[val], 1, x, y, w, h); + } +*/ +} + + +void Micropolis::drawRect( + int pixel, + int solid, + int x, + int y, + int w, + int h) +{ +/* + int W = view->m_width, H = view->m_height; + + if (x < 0) { + if ((w += x) < 0) { + w = 0; + } + x = 0; + } else if (x > W) { + x = 0; + w = 0; + } + if (x + w > W) { + w = W - x; + } + if (y < 0) { + if ((h += y) < 0) { + h = 0; + } + y = 0; + } else if (y > H) { + y = 0; + h = 0; + } + if (y + h > H) { + h = H - y; + } + + if (w && h) { + int i, j, stipple = (x ^ y) & 1; + unsigned char *data = + view->x->color ? view->data : view->data8; + + // In the case of black and white, we use an 8 bit buffer and dither it. + int pixelBytes = + view->x->color ? view->pixel_bytes : 1; + Quad line = + view->x->color ? view->line_bytes : view->line_bytes8; + + unsigned char *image = + &(data[(line * y) + (x * pixelBytes)]); + + switch (pixelBytes) { + + case 1: { + unsigned char *data = + view->data8; + unsigned char *image = + &data[(line * y) + (x * pixelBytes)]; + + if (solid) { + for (i = h; i > 0; i--) { + for (j = w; j > 0; j--) { + *image = pixel; + image++; + } + image += line - w; + } + } else { + for (i = h; i > 0; i--) { + for (j = w; j > 0; j--) { + if (stipple++ & 1) { + *image = pixel; + } + image++; + } + if (!(w & 1)) + stipple++; + image += line - w; + } + } + break; + } + + case 2: { + unsigned short *data = + (unsigned short *)view->data; + unsigned short *image; + line >>= 1; // Convert from byte offset to short offset + image = + &data[(line * y) + x]; + + if (solid) { + for (i = h; i > 0; i--) { + for (j = w; j > 0; j--) { + *image = pixel; + image++; + } + image += line - w; + } + } else { + for (i = h; i > 0; i--) { + for (j = w; j > 0; j--) { + if (stipple++ & 1) { + *image = pixel; + } + image++; + } + if (!(w & 1)) { + stipple++; + } + image += line - w; + } + } + break; + } + + case 3: + case 4: { + unsigned char *data = + (unsigned char *)view->data; + unsigned char *image; + int bitmapPad = view->x->small_tile_image->bitmap_pad; + int rowBytes = view->x->small_tile_image->bytes_per_line; + line = rowBytes >> 1; // Convert from byte offset to short offset + image = &data[(line * y) + x]; + + if (solid) { + for (i = h; i > 0; i--) { + for (j = w; j > 0; j--) { + *(image++) = (pixel >> 0) & 0xff; + *(image++) = (pixel >> 8) & 0xff; + *(image++) = (pixel >> 16) & 0xff; + if (bitmapPad == 32) { + image++; + } + } + image += line - w; + } + } else { + for (i = h; i > 0; i--) { + for (j = w; j > 0; j--) { + if (stipple++ & 1) { + *(image++) = (pixel >> 0) & 0xff; + *(image++) = (pixel >> 8) & 0xff; + *(image++) = (pixel >> 16) & 0xff; + if (bitmapPad == 32) { + image++; + } + } + } + if (!(w & 1)) { + stipple++; + } + image += line - w; + } + } + break; + } + + default: + assert(0); // Undefined depth + break; + + } + + } +*/ +} + + +#endif + + +//////////////////////////////////////////////////////////////////////// diff --git a/core/map_type.h b/core/map_type.h new file mode 100644 index 0000000..0b9ccdd --- /dev/null +++ b/core/map_type.h @@ -0,0 +1,354 @@ +/* map_type.h + * + * Micropolis, Unix Version. This game was released for the Unix platform + * in or about 1990 and has been modified for inclusion in the One Laptop + * Per Child program. Copyright (C) 1989 - 2007 Electronic Arts Inc. If + * you need assistance with this program, you may contact: + * http://wiki.laptop.org/go/Micropolis or email micropolis@laptop.org. + * + * This program 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. + * + * This program 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 this program. If + * not, see . + * + * ADDITIONAL TERMS per GNU GPL Section 7 + * + * No trademark or publicity rights are granted. This license does NOT + * give you any right, title or interest in the trademark SimCity or any + * other Electronic Arts trademark. You may not distribute any + * modification of this program using the trademark SimCity or claim any + * affliation or association with Electronic Arts Inc. or its employees. + * + * Any propagation or conveyance of this program must include this + * copyright notice and these terms. + * + * If you convey this program (or any modifications of it) and assume + * contractual liability for the program to recipients of it, you agree + * to indemnify Electronic Arts for any liability that those contractual + * assumptions impose on Electronic Arts. + * + * You may not misrepresent the origins of this program; modified + * versions of the program must be marked as such and not identified as + * the original program. + * + * This disclaimer supplements the one included in the General Public + * License. TO THE FULLEST EXTENT PERMISSIBLE UNDER APPLICABLE LAW, THIS + * PROGRAM IS PROVIDED TO YOU "AS IS," WITH ALL FAULTS, WITHOUT WARRANTY + * OF ANY KIND, AND YOUR USE IS AT YOUR SOLE RISK. THE ENTIRE RISK OF + * SATISFACTORY QUALITY AND PERFORMANCE RESIDES WITH YOU. ELECTRONIC ARTS + * DISCLAIMS ANY AND ALL EXPRESS, IMPLIED OR STATUTORY WARRANTIES, + * INCLUDING IMPLIED WARRANTIES OF MERCHANTABILITY, SATISFACTORY QUALITY, + * FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT OF THIRD PARTY + * RIGHTS, AND WARRANTIES (IF ANY) ARISING FROM A COURSE OF DEALING, + * USAGE, OR TRADE PRACTICE. ELECTRONIC ARTS DOES NOT WARRANT AGAINST + * INTERFERENCE WITH YOUR ENJOYMENT OF THE PROGRAM; THAT THE PROGRAM WILL + * MEET YOUR REQUIREMENTS; THAT OPERATION OF THE PROGRAM WILL BE + * UNINTERRUPTED OR ERROR-FREE, OR THAT THE PROGRAM WILL BE COMPATIBLE + * WITH THIRD PARTY SOFTWARE OR THAT ANY ERRORS IN THE PROGRAM WILL BE + * CORRECTED. NO ORAL OR WRITTEN ADVICE PROVIDED BY ELECTRONIC ARTS OR + * ANY AUTHORIZED REPRESENTATIVE SHALL CREATE A WARRANTY. SOME + * JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF OR LIMITATIONS ON IMPLIED + * WARRANTIES OR THE LIMITATIONS ON THE APPLICABLE STATUTORY RIGHTS OF A + * CONSUMER, SO SOME OR ALL OF THE ABOVE EXCLUSIONS AND LIMITATIONS MAY + * NOT APPLY TO YOU. + */ + +/** + * @file map_type.h + * @brief Map data structures for the Micropolis game engine. + * + * This header file defines the Map template class used for + * representing various types of 2D grid maps in the Micropolis game + * engine. It includes definitions for map dimensions and provides + * specialized map types with different data storage granularities. + * These map types are crucial for managing different aspects of the + * game world, like terrain, population density, and resource + * distribution. The Map class template offers flexibility in defining + * maps with various data types and block sizes, optimizing memory + * usage and access patterns for different game scenarios. + */ + + +#ifndef H_MAP_TYPE +#define H_MAP_TYPE + + +//////////////////////////////////////////////////////////////////////// +// Constants + + +/** + * Size of the world in horizontal direction. + */ +static const int WORLD_W = 120; + +/** + * Size of the world in vertical direction. + */ +static const int WORLD_H = 100; + + +//////////////////////////////////////////////////////////////////////// +// Template class definitions + + +/** + * Generic class for maps in the Micropolis game. + * + * A map is assumed to cover a 2D grid of #WORLD_W times #WORLD_H positions. + * A block of positions may be clustered, and represented by a single data + * value. + * @tparam DATA Data type of a data value. + * @tparam BLKSIZE Size of the cluster. + */ +template +class Map +{ +public: + Map(DATA defaultValue); + Map(const Map& map); + Map& operator=(const Map &map); + ~Map(); + + /** Size of a cluster in number of world positions. */ + const int MAP_BLOCKSIZE; + const int MAP_W; ///< Number of clusters in horizontal direction. + const int MAP_H; ///< Number of clusters in vertical direction. + + void fill(DATA val); + void clear(); + + inline void set(int x, int y, DATA val); + inline DATA get(int x, int y) const; + inline bool onMap(int x, int y) const; + + inline void worldSet(int x, int y, DATA val); + inline DATA worldGet(int x, int y) const; + inline bool worldOnMap(int x, int y) const; + + DATA *getBase(); + + inline size_t getTotalByteSize() const { + return sizeof(DATA) * + ((WORLD_W + BLKSIZE - 1) / BLKSIZE) * + ((WORLD_H + BLKSIZE - 1) / BLKSIZE); + } + +private: + /** Data fields of the map in column-major mode. */ + DATA _mapData[((WORLD_W + BLKSIZE - 1) / BLKSIZE) * + ((WORLD_H + BLKSIZE - 1) / BLKSIZE)]; + + const DATA _MAP_DEFAULT_VALUE; ///< Default value of a cluster. +}; + + +/** + * Generic map constructor. + * @param defaultValue Default value to use for off-map positions, and + * for clearing the map. + */ +template +Map::Map(DATA defaultValue): + MAP_BLOCKSIZE(BLKSIZE), + MAP_W((WORLD_W + BLKSIZE - 1) / BLKSIZE), + MAP_H((WORLD_H + BLKSIZE - 1) / BLKSIZE), + _MAP_DEFAULT_VALUE(defaultValue) +{ +} + + +/** Copy constructor */ +template +Map::Map(const Map &map): + MAP_BLOCKSIZE(BLKSIZE), + MAP_W((WORLD_W + BLKSIZE - 1) / BLKSIZE), + MAP_H((WORLD_H + BLKSIZE - 1) / BLKSIZE), + _MAP_DEFAULT_VALUE(map._MAP_DEFAULT_VALUE) +{ + for (int i = 0; i < this->MAP_W * this->MAP_H; i++) { + this->_mapData[i] = map._mapData[i]; + } +} + + +/** Assignment operator */ +template +Map &Map::operator=(const Map &map) +{ + if(this != &map) { + for (int i = 0; i < this->MAP_W * this->MAP_H; i++) { + this->_mapData[i] = map._mapData[i]; + } + } + return *this; +} + + +/** Generic map destructor */ +template +Map::~Map() +{ +} + + +/** + * Generic fill routine. + * + * @param value Value with which to fill the map. + */ +template +void Map::fill(DATA value) +{ + for (int i = 0; i < this->MAP_W * this->MAP_H; i++) { + this->_mapData[i] = value; + } +} + + +/** + * Generic clear routine. + * + * Resets all data of the map to #_MAP_DEFAULT_VALUE. + */ +template +void Map::clear() +{ + fill(this->_MAP_DEFAULT_VALUE); +} + + +/** + * Return the base address of the map data. + * @note Data is stored in column-major mode. + */ +template +DATA *Map::getBase() +{ + return this->_mapData; +} + + +/** + * Set the value of a cluster. + * + * If the coordinate is off the map, the value is not stored. + * @param x X cluster position (at world position \a x * #MAP_BLOCKSIZE). + * @param y Y cluster position (at world position \a y * #MAP_BLOCKSIZE). + * @param value Value to use. + */ +template +inline void Map::set(int x, int y, DATA value) +{ + if(this->onMap(x, y)) { + this->_mapData[x * MAP_H + y] = value; + } +} + + +/** + * Return the value of a cluster. + * + * If the coordinate is off the map, the #_MAP_DEFAULT_VALUE is returned. + * @param x X cluster position (at world position \a x * #MAP_BLOCKSIZE). + * @param y Y cluster position (at world position \a y * #MAP_BLOCKSIZE). + * @return Value of the cluster. + */ +template +inline DATA Map::get(int x, int y) const +{ + if(!this->onMap(x, y)) { + return this->_MAP_DEFAULT_VALUE; + } + + return this->_mapData[x * MAP_H + y]; +} + + +/** + * Verify that cluster coordinates are within map boundaries. + * @param x X cluster position (at world position \a x * #MAP_BLOCKSIZE). + * @param y Y cluster position (at world position \a y * #MAP_BLOCKSIZE). + * @return Coordinate is within map boundaries. + */ +template +inline bool Map::onMap(int x, int y) const +{ + return (x >= 0 && x < this->MAP_W) && (y >= 0 && y < this->MAP_H); +} + + +/** + * Set the value of a cluster. + * + * If the coordinate is off the map, the value is not stored. + * @param x X world position. + * @param y Y world position. + * @param value Value to use. + */ +template +inline void Map::worldSet(int x, int y, DATA value) +{ + if(this->worldOnMap(x, y)) { + x /= BLKSIZE; + y /= BLKSIZE; + this->_mapData[x * MAP_H + y] = value; + } +} + + +/** + * Return the value of a cluster. + * + * If the coordinate is off the map, the #_MAP_DEFAULT_VALUE is returned. + * @param x X world position. + * @param y Y world position. + * @return Value of the cluster. + */ +template +inline DATA Map::worldGet(int x, int y) const +{ + if(!this->worldOnMap(x, y)) { + return this->_MAP_DEFAULT_VALUE; + } + + x /= BLKSIZE; + y /= BLKSIZE; + return this->_mapData[x * MAP_H + y]; +} + + +/** + * Verify that world coordinates are within map boundaries. + * @param x X world position. + * @param y Y world position. + * @return Coordinate is within map boundaries. + */ +template +inline bool Map::worldOnMap(int x, int y) const +{ + return (x >= 0 && x < WORLD_W) && (y >= 0 && y < WORLD_H); +} + + +//////////////////////////////////////////////////////////////////////// +// Type definitions + + +typedef Map MapByte1; ///< Map of ::Byte, with cluster size 1 +typedef Map MapByte2; ///< Map of ::Byte, with cluster size 2 +typedef Map MapByte4; ///< Map of ::Byte, with cluster size 4 +typedef Map MapShort8; ///< Map of ::short, with cluster size 8 + + +//////////////////////////////////////////////////////////////////////// + + +#endif diff --git a/core/message.cpp b/core/message.cpp new file mode 100644 index 0000000..3aaa335 --- /dev/null +++ b/core/message.cpp @@ -0,0 +1,477 @@ +/* message.cpp + * + * Micropolis, Unix Version. This game was released for the Unix platform + * in or about 1990 and has been modified for inclusion in the One Laptop + * Per Child program. Copyright (C) 1989 - 2007 Electronic Arts Inc. If + * you need assistance with this program, you may contact: + * http://wiki.laptop.org/go/Micropolis or email micropolis@laptop.org. + * + * This program 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. + * + * This program 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 this program. If + * not, see . + * + * ADDITIONAL TERMS per GNU GPL Section 7 + * + * No trademark or publicity rights are granted. This license does NOT + * give you any right, title or interest in the trademark SimCity or any + * other Electronic Arts trademark. You may not distribute any + * modification of this program using the trademark SimCity or claim any + * affliation or association with Electronic Arts Inc. or its employees. + * + * Any propagation or conveyance of this program must include this + * copyright notice and these terms. + * + * If you convey this program (or any modifications of it) and assume + * contractual liability for the program to recipients of it, you agree + * to indemnify Electronic Arts for any liability that those contractual + * assumptions impose on Electronic Arts. + * + * You may not misrepresent the origins of this program; modified + * versions of the program must be marked as such and not identified as + * the original program. + * + * This disclaimer supplements the one included in the General Public + * License. TO THE FULLEST EXTENT PERMISSIBLE UNDER APPLICABLE LAW, THIS + * PROGRAM IS PROVIDED TO YOU "AS IS," WITH ALL FAULTS, WITHOUT WARRANTY + * OF ANY KIND, AND YOUR USE IS AT YOUR SOLE RISK. THE ENTIRE RISK OF + * SATISFACTORY QUALITY AND PERFORMANCE RESIDES WITH YOU. ELECTRONIC ARTS + * DISCLAIMS ANY AND ALL EXPRESS, IMPLIED OR STATUTORY WARRANTIES, + * INCLUDING IMPLIED WARRANTIES OF MERCHANTABILITY, SATISFACTORY QUALITY, + * FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT OF THIRD PARTY + * RIGHTS, AND WARRANTIES (IF ANY) ARISING FROM A COURSE OF DEALING, + * USAGE, OR TRADE PRACTICE. ELECTRONIC ARTS DOES NOT WARRANT AGAINST + * INTERFERENCE WITH YOUR ENJOYMENT OF THE PROGRAM; THAT THE PROGRAM WILL + * MEET YOUR REQUIREMENTS; THAT OPERATION OF THE PROGRAM WILL BE + * UNINTERRUPTED OR ERROR-FREE, OR THAT THE PROGRAM WILL BE COMPATIBLE + * WITH THIRD PARTY SOFTWARE OR THAT ANY ERRORS IN THE PROGRAM WILL BE + * CORRECTED. NO ORAL OR WRITTEN ADVICE PROVIDED BY ELECTRONIC ARTS OR + * ANY AUTHORIZED REPRESENTATIVE SHALL CREATE A WARRANTY. SOME + * JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF OR LIMITATIONS ON IMPLIED + * WARRANTIES OR THE LIMITATIONS ON THE APPLICABLE STATUTORY RIGHTS OF A + * CONSUMER, SO SOME OR ALL OF THE ABOVE EXCLUSIONS AND LIMITATIONS MAY + * NOT APPLY TO YOU. + */ + +/** + * @file message.cpp + * @brief Handles messaging and notifications within the Micropolis + * game. + * + * This file includes functions for sending messages to the player, + * based on various game events and scenario progress. It handles + * displaying messages related to city growth, requirements, + * disasters, and other significant events. It also deals with + * triggering sound effects associated with specific messages. + */ + + +//////////////////////////////////////////////////////////////////////// + + +#include "micropolis.h" +#include "text.h" + + +//////////////////////////////////////////////////////////////////////// + + +/** Check progress of the user, and send him messages about it. */ +void Micropolis::sendMessages() +{ + short PowerPop; + float TM; + + // Running a scenario, and waiting it to 'end' so we can give a score + if (scenario > SC_NONE && scoreType > SC_NONE && scoreWait > 0) { + scoreWait--; + if (scoreWait == 0) { + doScenarioScore(scoreType); + } + } + + checkGrowth(); + + totalZonePop = resZonePop + comZonePop + indZonePop; + PowerPop = nuclearPowerPop + coalPowerPop; + + switch (cityTime & 63) { + + case 1: + if (totalZonePop / 4 >= resZonePop) { + sendMessage(MESSAGE_NEED_MORE_RESIDENTIAL); + } + break; + + case 5: + if (totalZonePop / 8 >= comZonePop) { + sendMessage(MESSAGE_NEED_MORE_COMMERCIAL); + } + break; + + case 10: + if (totalZonePop / 8 >= indZonePop) { + sendMessage(MESSAGE_NEED_MORE_INDUSTRIAL); + } + break; + + case 14: + if (totalZonePop > 10 && totalZonePop * 2 > roadTotal) { + sendMessage(MESSAGE_NEED_MORE_ROADS); + } + break; + + case 18: + if (totalZonePop > 50 && totalZonePop > railTotal) { + sendMessage(MESSAGE_NEED_MORE_RAILS); + } + break; + + case 22: + if (totalZonePop > 10 && PowerPop == 0) { + sendMessage(MESSAGE_NEED_ELECTRICITY); + } + break; + + case 26: + if (resPop > 500 && stadiumPop == 0) { + sendMessage(MESSAGE_NEED_STADIUM); + resCap = true; + } else { + resCap = false; + } + break; + + case 28: + if (indPop > 70 && seaportPop == 0) { + sendMessage(MESSAGE_NEED_SEAPORT); + indCap = true; + } else { + indCap = false; + } + break; + + case 30: + if (comPop > 100 && airportPop == 0) { + sendMessage(MESSAGE_NEED_AIRPORT); + comCap = true; + } else { + comCap = false; + } + break; + + case 32: + TM = (float)(unpoweredZoneCount + poweredZoneCount); /* dec score for unpowered zones */ + if (TM > 0) { + if (poweredZoneCount / TM < 0.7) { + sendMessage(MESSAGE_BLACKOUTS_REPORTED); + } + } + break; + + case 35: + if (pollutionAverage > /* 80 */ 60) { + sendMessage(MESSAGE_HIGH_POLLUTION, -1, -1, true); + } + break; + + case 42: + if (crimeAverage > 100) { + sendMessage(MESSAGE_HIGH_CRIME, -1, -1, true); + } + break; + + case 45: + if (totalPop > 60 && fireStationPop == 0) { + sendMessage(MESSAGE_NEED_FIRE_STATION); + } + break; + + case 48: + if (totalPop > 60 && policeStationPop == 0) { + sendMessage(MESSAGE_NEED_POLICE_STATION); + } + break; + + case 51: + if (cityTax > 12) { + sendMessage(MESSAGE_TAX_TOO_HIGH); + } + break; + + case 54: + // If roadEffect < 5/8 of max effect + if (roadEffect < (5 * MAX_ROAD_EFFECT / 8) && roadTotal > 30) { + sendMessage(MESSAGE_ROAD_NEEDS_FUNDING); + } + break; + + case 57: + // If fireEffect < 0.7 of max effect + if (fireEffect < (7 * MAX_FIRE_STATION_EFFECT / 10) && totalPop > 20) { + sendMessage(MESSAGE_FIRE_STATION_NEEDS_FUNDING); + } + break; + + case 60: + // If policeEffect < 0.7 of max effect + if (policeEffect < (7 * MAX_POLICE_STATION_EFFECT / 10) + && totalPop > 20) { + sendMessage(MESSAGE_POLICE_NEEDS_FUNDING); + } + break; + + case 63: + if (trafficAverage > 60) { + sendMessage(MESSAGE_TRAFFIC_JAMS, -1, -1, true); + } + break; + + } +} + + +/** + * Detect a change in city class, and produce a message if the player has + * reached the next class. + * @todo This code is very closely related to Micropolis::doPopNum(). + * Maybe merge both in some way? + * (This function gets called much more often however then doPopNum(). + * Also, at the first call, the difference between thisCityPop and + * cityPop is huge.) + */ +void Micropolis::checkGrowth() +{ + if ((cityTime & 3) == 0) { + short category = 0; + Quad thisCityPop = getPopulation(); + + if (cityPopLast > 0) { + + CityClass lastClass = getCityClass(cityPopLast); + CityClass newClass = getCityClass(thisCityPop); + + if (lastClass != newClass) { + + // Switched class, find appropiate message. + switch (newClass) { + + case CC_VILLAGE: + // Don't mention it. + break; + + case CC_TOWN: + category = MESSAGE_REACHED_TOWN; + break; + + case CC_CITY: + category = MESSAGE_REACHED_CITY; + break; + + case CC_CAPITAL: + category = MESSAGE_REACHED_CAPITAL; + break; + + case CC_METROPOLIS: + category = MESSAGE_REACHED_METROPOLIS; + break; + + case CC_MEGALOPOLIS: + category = MESSAGE_REACHED_MEGALOPOLIS; + break; + + default: + NOT_REACHED(); + break; + + } + } + } + + if (category > 0 && category != categoryLast) { + sendMessage(category, NOWHERE, NOWHERE, true); + categoryLast = category; + } + + cityPopLast = thisCityPop; + } +} + + +/** + * Compute score for each scenario + * @param type Scenario used + * @note Parameter \a type may not be \c SC_NONE + */ +void Micropolis::doScenarioScore(Scenario type) +{ + short z = MESSAGE_SCENARIO_LOST; /* you lose */ + + switch (type) { + + case SC_DULLSVILLE: + if (cityClass >= CC_METROPOLIS) { + z = MESSAGE_SCENARIO_WON; + } + break; + + case SC_SAN_FRANCISCO: + if (cityClass >= CC_METROPOLIS) { + z = MESSAGE_SCENARIO_WON; + } + break; + + case SC_HAMBURG: + if (cityClass >= CC_METROPOLIS) { + z = MESSAGE_SCENARIO_WON; + } + break; + + case SC_BERN: + if (trafficAverage < 80) { + z = MESSAGE_SCENARIO_WON; + } + break; + + case SC_TOKYO: + if (cityScore > 500) { + z = MESSAGE_SCENARIO_WON; + } + break; + + case SC_DETROIT: + if (crimeAverage < 60) { + z = MESSAGE_SCENARIO_WON; + } + break; + + case SC_BOSTON: + if (cityScore > 500) { + z = MESSAGE_SCENARIO_WON; + } + break; + + case SC_RIO: + if (cityScore > 500) { + z = MESSAGE_SCENARIO_WON; + } + break; + + default: + NOT_REACHED(); + break; + + } + + sendMessage(z, NOWHERE, NOWHERE, true, true); + + if (z == MESSAGE_SCENARIO_LOST) { + doLoseGame(); + } +} + + +/** + * Send the user a message of an event that happens at a particular position + * in the city. + * @param messageIndex Message number of the message to display. + * @param x X coordinate of the position of the event. + * @param y Y coordinate of the position of the event. + * @param picture Flag that is true if a picture should be shown. + * @param important Flag that is true if the message is important. + */ +void Micropolis::sendMessage(short messageIndex, short x, short y, bool picture, bool important) +{ + callback->sendMessage(this, callbackVal, messageIndex, x, y, picture, important); +} + + +/** + * Make a sound for message \a mesgNum if appropriate. + * @param mesgNum Message number displayed. + * @param x Horizontal coordinate in the city of the sound. + * @param y Vertical coordinate in the city of the sound. + */ +void Micropolis::doMakeSound(int mesgNum, int x, int y) +{ + assert(mesgNum >= 0); + + switch (mesgNum) { + + case MESSAGE_TRAFFIC_JAMS: + if (getRandom(5) == 1) { + makeSound("city", "HonkHonkMed", x, y); + } else if (getRandom(5) == 1) { + makeSound("city", "HonkHonkLow", x, y); + } else if (getRandom(5) == 1) { + makeSound("city", "HonkHonkHigh", x, y); + } + break; + + case MESSAGE_HIGH_CRIME: + case MESSAGE_FIRE_REPORTED: + case MESSAGE_TORNADO_SIGHTED: + case MESSAGE_EARTHQUAKE: + case MESSAGE_PLANE_CRASHED: + case MESSAGE_SHIP_CRASHED: + case MESSAGE_TRAIN_CRASHED: + case MESSAGE_HELICOPTER_CRASHED: + makeSound("city", "Siren", x, y); + break; + + case MESSAGE_MONSTER_SIGHTED: + makeSound("city", "Monster", x, y); + break; + + case MESSAGE_FIREBOMBING: + makeSound("city", "ExplosionLow", x, y); + makeSound("city", "Siren", x, y); + break; + + case MESSAGE_NUCLEAR_MELTDOWN: + makeSound("city", "ExplosionHigh", x, y); + makeSound("city", "ExplosionLow", x, y); + makeSound("city", "Siren", x, y); + break; + + case MESSAGE_RIOTS_REPORTED: + makeSound("city", "Siren", x, y); + break; + + } +} + +/** + * Tell the front-end that it should perform an auto-goto + * @param x X position at the map + * @param y Y position at the map + * @param message Message + */ +void Micropolis::doAutoGoto(short x, short y, const std::string &message) +{ + callback->autoGoto(this, callbackVal, x, y, message); +} + + +/** Tell the front-end that the player has lost the game */ +void Micropolis::doLoseGame() +{ + callback->didLoseGame(this, callbackVal); +} + + +/** Tell the front-end that the player has won the game */ +void Micropolis::doWinGame() +{ + callback->didWinGame(this, callbackVal); +} + + +//////////////////////////////////////////////////////////////////////// diff --git a/core/micropolis.cpp b/core/micropolis.cpp new file mode 100644 index 0000000..f972283 --- /dev/null +++ b/core/micropolis.cpp @@ -0,0 +1,1599 @@ +/* micropolis.cpp + * + * Micropolis, Unix Version. This game was released for the Unix platform + * in or about 1990 and has been modified for inclusion in the One Laptop + * Per Child program. Copyright (C) 1989 - 2007 Electronic Arts Inc. If + * you need assistance with this program, you may contact: + * http://wiki.laptop.org/go/Micropolis or email micropolis@laptop.org. + * + * This program 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. + * + * This program 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 this program. If + * not, see . + * + * ADDITIONAL TERMS per GNU GPL Section 7 + * + * No trademark or publicity rights are granted. This license does NOT + * give you any right, title or interest in the trademark SimCity or any + * other Electronic Arts trademark. You may not distribute any + * modification of this program using the trademark SimCity or claim any + * affliation or association with Electronic Arts Inc. or its employees. + * + * Any propagation or conveyance of this program must include this + * copyright notice and these terms. + * + * If you convey this program (or any modifications of it) and assume + * contractual liability for the program to recipients of it, you agree + * to indemnify Electronic Arts for any liability that those contractual + * assumptions impose on Electronic Arts. + * + * You may not misrepresent the origins of this program; modified + * versions of the program must be marked as such and not identified as + * the original program. + * + * This disclaimer supplements the one included in the General Public + * License. TO THE FULLEST EXTENT PERMISSIBLE UNDER APPLICABLE LAW, THIS + * PROGRAM IS PROVIDED TO YOU "AS IS," WITH ALL FAULTS, WITHOUT WARRANTY + * OF ANY KIND, AND YOUR USE IS AT YOUR SOLE RISK. THE ENTIRE RISK OF + * SATISFACTORY QUALITY AND PERFORMANCE RESIDES WITH YOU. ELECTRONIC ARTS + * DISCLAIMS ANY AND ALL EXPRESS, IMPLIED OR STATUTORY WARRANTIES, + * INCLUDING IMPLIED WARRANTIES OF MERCHANTABILITY, SATISFACTORY QUALITY, + * FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT OF THIRD PARTY + * RIGHTS, AND WARRANTIES (IF ANY) ARISING FROM A COURSE OF DEALING, + * USAGE, OR TRADE PRACTICE. ELECTRONIC ARTS DOES NOT WARRANT AGAINST + * INTERFERENCE WITH YOUR ENJOYMENT OF THE PROGRAM; THAT THE PROGRAM WILL + * MEET YOUR REQUIREMENTS; THAT OPERATION OF THE PROGRAM WILL BE + * UNINTERRUPTED OR ERROR-FREE, OR THAT THE PROGRAM WILL BE COMPATIBLE + * WITH THIRD PARTY SOFTWARE OR THAT ANY ERRORS IN THE PROGRAM WILL BE + * CORRECTED. NO ORAL OR WRITTEN ADVICE PROVIDED BY ELECTRONIC ARTS OR + * ANY AUTHORIZED REPRESENTATIVE SHALL CREATE A WARRANTY. SOME + * JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF OR LIMITATIONS ON IMPLIED + * WARRANTIES OR THE LIMITATIONS ON THE APPLICABLE STATUTORY RIGHTS OF A + * CONSUMER, SO SOME OR ALL OF THE ABOVE EXCLUSIONS AND LIMITATIONS MAY + * NOT APPLY TO YOU. + */ + +/** + * @file micropolis.cpp + * @brief Primary implementation file for the Micropolis game engine. + * + * This file contains the core implementation of the Micropolis game + * engine. It includes the main class constructor, destructor, + * initialization and destruction functions, and other essential + * methods that underpin the game's functionality. The file covers + * various aspects of the game such as simulation control, disaster + * handling, sound effects, and map manipulation. + */ + + +//////////////////////////////////////////////////////////////////////// + + +#include "micropolis.h" + + +//////////////////////////////////////////////////////////////////////// + + +/** + * Simulator constructor. + */ +Micropolis::Micropolis() : + populationDensityMap(0), + trafficDensityMap(0), + pollutionDensityMap(0), + landValueMap(0), + crimeRateMap(0), + terrainDensityMap(0), + tempMap1(0), + tempMap2(0), + tempMap3(0), + powerGridMap(0), + rateOfGrowthMap(0), + fireStationMap(0), + fireStationEffectMap(0), + policeStationMap(0), + policeStationEffectMap(0), + comRateMap(0) +{ + setCallback(new ConsoleCallback(), emscripten::val::null()); + init(); +} + + +/** Simulator destructor. */ +Micropolis::~Micropolis() +{ + setCallback(NULL, emscripten::val::null()); + destroy(); +} + + +void Micropolis::setCallback(Callback *callback0, emscripten::val callbackVal0) +{ + if (callback != NULL) { + delete callback; + } + callback = callback0; + callbackVal = callbackVal0; +} + + +/** Initialize simulator variables to a sane default. */ +void Micropolis::init() +{ + + //////////////////////////////////////////////////////////////////////// + // allocate.cpp + + + // short roadTotal; + roadTotal = 0; + + // short railTotal; + railTotal = 0; + + // short firePop; + firePop = 0; + + // short resPop; + resPop = 0; + + // short comPop; + comPop = 0; + + // short indPop; + indPop = 0; + + // short totalPop; + totalPop = 0; + + // short totalPopLast; + totalPopLast = 0; + + // short resZonePop; + resZonePop = 0; + + // short comZonePop; + comZonePop = 0; + + // short indZonePop; + indZonePop = 0; + + // short totalZonePop; + totalZonePop = 0; + + // short hospitalPop; + hospitalPop = 0; + + // short churchPop; + churchPop = 0; + + // short faith; + faith = 0; + + // short stadiumPop; + stadiumPop = 0; + + // short policeStationPop; + policeStationPop = 0; + + // short fireStationPop; + fireStationPop = 0; + + // short coalPowerPop; + coalPowerPop = 0; + + // short nuclearPowerPop; + nuclearPowerPop = 0; + + // short seaportPop; + seaportPop = 0; + + // short airportPop; + airportPop = 0; + + // short needHospital; + needHospital = 0; + + // short needChurch; + needChurch = 0; + + // short crimeAverage; + crimeAverage = 0; + + // short pollutionAverage; + pollutionAverage = 0; + + // short landValueAverage; + landValueAverage = 0; + + // Quad cityTime; + cityTime = 0; + + // Quad cityMonth; + cityMonth = 0; + + // Quad cityYear; + cityYear = 0; + + // short startingYear; + startingYear = 0; + + // short *map[WORLD_W]; + memset(map, 0, sizeof(short *) * WORLD_W); + + // short resHist10Max; + resHist10Max = 0; + + // short resHist120Max; + resHist120Max = 0; + + // short comHist10Max; + comHist10Max = 0; + + // short comHist120Max; + comHist120Max = 0; + + // short indHist10Max; + indHist10Max = 0; + + // short indHist120Max; + indHist120Max = 0; + + censusChanged = false; + + // Quad roadSpend; + roadSpend = 0; + + // Quad policeSpend; + policeSpend = 0; + + // Quad fireSpend; + fireSpend = 0; + + // Quad roadFund; + roadFund = 0; + + // Quad policeFund; + policeFund = 0; + + // Quad fireFund; + fireFund = 0; + + roadEffect = 0; + policeEffect = 0; + fireEffect = 0; + + // Quad taxFund; + taxFund = 0; + + // short cityTax; + cityTax = 0; + + // bool taxFlag; + taxFlag = false; + + populationDensityMap.clear(); + trafficDensityMap.clear(); + pollutionDensityMap.clear(); + landValueMap.clear(); + crimeRateMap.clear(); + powerGridMap.clear(); + terrainDensityMap.clear(); + rateOfGrowthMap.clear(); + fireStationMap.clear(); + fireStationEffectMap.clear(); + policeStationMap.clear(); + policeStationEffectMap.clear(); + comRateMap.clear(); + + // unsigned short *mapBase; + mapBase = NULL; + + // short *resHist; + resHist = NULL; + + // short *comHist; + comHist = NULL; + + // short *indHist; + indHist = NULL; + + // short *moneyHist; + moneyHist = NULL; + + // short *pollutionHist; + pollutionHist = NULL; + + // short *crimeHist; + crimeHist = NULL; + + // short *miscHist; + miscHist = NULL; + + + //////////////////////////////////////////////////////////////////////// + // budget.cpp + + + // float roadPercent; + roadPercent = (float)0.0; + + // float policePercent; + policePercent = (float)0.0; + + // float firePercent; + firePercent = (float)0.0; + + // Quad roadValue; + roadValue = 0; + + // Quad policeValue; + policeValue = 0; + + // Quad fireValue; + fireValue = 0; + + // int mustDrawBudget; + mustDrawBudget = 0; + + + //////////////////////////////////////////////////////////////////////// + // disasters.cpp + + + // short floodCount; + floodCount = 0; + + + //////////////////////////////////////////////////////////////////////// + // evaluate.cpp + + + // short cityYes; + cityYes = 0; + + // short problemVotes[PROBNUM]; /* these are the votes for each */ + memset(problemVotes, 0, sizeof(short) * PROBNUM); + + // short problemOrder[CVP_PROBLEM_COMPLAINTS]; /* sorted index to above */ + memset(problemOrder, 0, sizeof(short) * CVP_PROBLEM_COMPLAINTS); + + // Quad cityPop; + cityPop = 0; + + // Quad cityPopDelta; + cityPopDelta = 0; + + // Quad cityAssessedValue; + cityAssessedValue = 0; + + cityClass = CC_VILLAGE; + + // short cityScore; + cityScore = 0; + + // short cityScoreDelta; + cityScoreDelta = 0; + + // short trafficAverage; + trafficAverage = 0; + + + //////////////////////////////////////////////////////////////////////// + // generate.cpp + + + // int TreeLevel; /* level for tree creation */ + terrainTreeLevel = -1; + + // int LakeLevel; /* level for lake creation */ + terrainLakeLevel = -1; + + // int CurveLevel; /* level for river curviness */ + terrainCurveLevel = -1; + + // int CreateIsland; /* -1 => 10%, 0 => never, 1 => always */ + terrainCreateIsland = -1; + + + //////////////////////////////////////////////////////////////////////// + // graph.cpp + + + graph10Max = 0; + graph120Max = 0; + + + //////////////////////////////////////////////////////////////////////// + // main.cpp + + // int simLoops; + simLoops = 0; + + // int simPasses; + simPasses = 0; + + // int simPass; + simPass = 0; + + simPaused = false; // Simulation is running + + // int simPausedSpeed; + simPausedSpeed = 3; + + // int heatSteps; + heatSteps = 0; + + // int heatFlow; + heatFlow = -7; + + // int heatRule; + heatRule = 0; + + // int heatWrap; + heatWrap = 3; + + // std::string cityFileName; + cityFileName = ""; + + // std::string cityName; + cityName = ""; + + // bool tilesAnimated; + tilesAnimated = false; + + // bool doAnimaton; + doAnimation = true; + + // bool doMessages; + doMessages = true; + + // bool doNotices; + doNotices = true; + + // short *cellSrc; + cellSrc = NULL; + + // short *cellDst; + cellDst = NULL; + + + //////////////////////////////////////////////////////////////////////// + // message.cpp + + + // Quad cityPopLast; + cityPopLast = 0; + + // short categoryLast; + categoryLast = 0; + + autoGoto = false; + + + //////////////////////////////////////////////////////////////////////// + // power.cpp + + + powerStackPointer = 0; + + // Position powerStackXY[POWER_STACK_SIZE]; + for (int i = 0; i < POWER_STACK_SIZE; i++) { + powerStackXY[i] = Position(); + } + + + //////////////////////////////////////////////////////////////////////// + // random.cpp + + + // UQuad nextRandom; + nextRandom = 1; + + + //////////////////////////////////////////////////////////////////////// + // scan.cpp + + // short newMap; + newMap = 0; + + // short newMapFlags[MAP_TYPE_COUNT]; + memset(newMapFlags, 0, sizeof(short) * MAP_TYPE_COUNT); + + // short cityCenterX; + cityCenterX = 0; + + // short cityCenterY; + cityCenterY = 0; + + // short pollutionMaxX; + pollutionMaxX = 0; + + // short pollutionMaxY; + pollutionMaxY = 0; + + // short crimeMaxX; + crimeMaxX = 0; + + // short crimeMaxY; + crimeMaxY = 0; + + // Quad donDither; + donDither = 0; + + + //////////////////////////////////////////////////////////////////////// + // simulate.cpp + + + valveFlag = false; + + // short crimeRamp; + crimeRamp = 0; + + // short pollutionRamp; + pollutionRamp = 0; + + resCap = false; // Do not block residential growth + comCap = false; // Do not block commercial growth + indCap = false; // Do not block industrial growth + + // short cashFlow; + cashFlow = 0; + + // float externalMarket; + externalMarket = (float)4.0; + + disasterEvent = SC_NONE; + + // short disasterWait; + disasterWait = 0; + + scoreType = SC_NONE; + + // short scoreWait; + scoreWait = 0; + + // short poweredZoneCount; + poweredZoneCount = 0; + + // short unpoweredZoneCount; + unpoweredZoneCount = 0; + + newPower = false; + + // short cityTaxAverage; + cityTaxAverage = 0; + + // short simCycle; + simCycle = 0; + + // short phaseCycle; + phaseCycle = 0; + + // short speedCycle; + speedCycle = 0; + + // bool doInitialEval + doInitialEval = false; + + // int mapSerial; + mapSerial = 1; + + // short resValve; + resValve = 0; + + // short comValve; + comValve = 0; + + // short indValve; + indValve = 0; + + + //////////////////////////////////////////////////////////////////////// + // sprite.cpp + + + //SimSprite *spriteList; + spriteList = NULL; + + // SimSprite *freeSprites; + freeSprites = NULL; + + // SimSprite *globalSprites[SPRITE_COUNT]; + memset(globalSprites, 0, sizeof(SimSprite *) * SPRITE_COUNT); + + // int absDist; + absDist = 0; + + // short spriteCycle; + spriteCycle = 0; + + + //////////////////////////////////////////////////////////////////////// + // stubs.cpp + + + // Quad totalFunds; + totalFunds = 0; + + autoBulldoze = true; + + autoBudget = true; + + gameLevel = LEVEL_EASY; + + // short initSimLoad; + initSimLoad = 0; + + scenario = SC_NONE; + + // short simSpeed; + simSpeed = 0; + + // short simSpeedMeta; + simSpeedMeta = 0; + + enableSound = false; + + enableDisasters = true; + + evalChanged = false; + + // short blinkFlag; + blinkFlag = 0; + + + //////////////////////////////////////////////////////////////////////// + // traffic.cpp + + + // short curMapStackPointer; + curMapStackPointer = 0; + + // Position curMapStackXY[MAX_TRAFFIC_DISTANCE+1]; + for (int i = 0; i < MAX_TRAFFIC_DISTANCE + 1; i++) { + curMapStackXY[i] = Position(); + } + + // short trafMaxX, trafMaxY; + trafMaxX = 0; + trafMaxY = 0; + + + //////////////////////////////////////////////////////////////////////// + // update.cpp + + + mustUpdateFunds = false; + + mustUpdateOptions = false; + + // Quad cityTimeLast; + cityTimeLast = 0; + + // Quad cityYearLast; + cityYearLast = 0; + + // Quad cityMonthLast; + cityMonthLast = 0; + + // Quad totalFundsLast; + totalFundsLast = 0; + + // Quad resLast; + resLast = 0; + + // Quad comLast; + comLast = 0; + + // Quad indLast; + indLast = 0; + + simInit(); + +} + + +void Micropolis::destroy() +{ + + destroyMapArrays(); + + // TODO: Clean up all other stuff: + +} + + +/** + * Check whether \a dir points to a directory. + * If not, report an error. + * @param dir Directory to search. + * @param envVar Environment variable controlling searchpath of the directory. + * @return Directory has been found. + */ +static bool testDirectory(const std::string& dir, const std::string &envVar) +{ + struct stat statbuf; + + if (stat(dir.c_str(), &statbuf) == 0 && S_ISDIR(statbuf.st_mode)) { + + return true; + } + + fprintf(stderr, "Can't find the directory \"%s\"!\n", dir.c_str()); + fprintf(stderr, + "The environment variable \"%s\" should name a directory.\n", + envVar.c_str()); + + return false; +} + + +/** Initialize for a simulation */ +void Micropolis::simInit() +{ + setEnableSound(true); // Enable sound + mustUpdateOptions = true; // Update options displayed at user + scenario = SC_NONE; + startingYear = 1900; + simPasses = 1; + simPass = 0; + setAutoGoto(true); // Enable auto-goto + setCityTax(7); + cityTime = 50; + setEnableDisasters(true); // Enable disasters + setAutoBulldoze(true); // Enable auto bulldoze + setAutoBudget(true); // Enable auto-budget + blinkFlag = 1; + simSpeed = 3; + changeEval(); + simPaused = false; // Simulation is running + simLoops = 0; + initSimLoad = 2; + + initMapArrays(); + initGraphs(); + initFundingLevel(); + resetMapState(); + resetEditorState(); + clearMap(); + initWillStuff(); + setFunds(5000); + setGameLevelFunds(LEVEL_EASY); + setSpeed(0); + setPasses(1); +} + + +/** + * Update ???? + * @todo What is the purpose of this function? (also in relation with + * Micropolis::simTick()). + */ +void Micropolis::simUpdate() +{ + //printf("simUpdate\n"); + blinkFlag = ((tickCount() % 60) < 30) ? 1 : -1; + + if (simSpeed && !heatSteps) { + tilesAnimated = false; + } + + doUpdateHeads(); + graphDoer(); + updateBudget(); + scoreDoer(); +} + + +/** + * ???? + * @todo Why is Micropolis::cellSrc not allocated together with all the other + * variables? + * @todo What is the purpose of this function? + * @todo KILL the define. + */ +void Micropolis::simHeat() +{ + int x, y; + static int a = 0; + short *src, *dst; + int fl = heatFlow; + + const int SRCCOL = WORLD_H + 2; + const int DSTCOL = WORLD_H; + + + if (cellSrc == NULL) { + cellSrc = (short *)newPtr((WORLD_W + 2) * (WORLD_H + 2) * sizeof (short)); + cellDst = (short *)&map[0][0]; + } + + src = cellSrc + SRCCOL + 1; + dst = cellDst; + + /* + * Copy wrapping edges: + * + * 0 ff f0 f1 ... fe ff f0 + * + * 1 0f 00 01 ... 0e 0f 00 + * 2 1f 10 11 ... 1e 1f 10 + * .. .. .. .. .. .. + * ef e0 e1 ... ee ef e0 + * h ff f0 f1 ... fe ff f0 + * + * h+1 0f 00 01 ... 0e 0f 00 + * + * wrap value: effect: + * 0 no effect + * 1 copy future=>past, no wrap + * 2 no copy, wrap edges + * 3 copy future=>past, wrap edges + * 4 copy future=>past, same edges + */ + + switch (heatWrap) { + case 0: + break; + case 1: + for (x = 0; x < WORLD_W; x++) { + memcpy(src, dst, WORLD_H * sizeof (short)); + src += SRCCOL; + dst += DSTCOL; + } + break; + case 2: + for (x = 0; x < WORLD_W; x++) { + src[-1] = src[WORLD_H - 1]; + src[WORLD_H] = src[0]; + src += SRCCOL; + dst += DSTCOL; + } + memcpy( + cellSrc, + cellSrc + (SRCCOL * WORLD_W), + SRCCOL * sizeof (short)); + memcpy( + cellSrc + SRCCOL * (WORLD_W + 1), + cellSrc + SRCCOL, + SRCCOL * sizeof (short)); + break; + case 3: + for (x = 0; x < WORLD_W; x++) { + memcpy(src, dst, WORLD_H * sizeof (short)); + src[-1] = src[WORLD_H - 1]; + src[WORLD_H] = src[0]; + src += SRCCOL; + dst += DSTCOL; + } + memcpy( + cellSrc, + cellSrc + (SRCCOL * WORLD_W), + SRCCOL * sizeof (short)); + memcpy( + cellSrc + SRCCOL * (WORLD_W + 1), + cellSrc + SRCCOL, + SRCCOL * sizeof (short)); + break; + case 4: + src[0] = + dst[0]; + src[1 + WORLD_H] = + dst[WORLD_H - 1]; + src[(1 + WORLD_W) * SRCCOL] = + dst[(WORLD_W - 1) * DSTCOL]; + src[((2 + WORLD_W) * SRCCOL) - 1] = + dst[(WORLD_W * WORLD_H) - 1]; + for (x = 0; x < WORLD_W; x++) { + memcpy(src, dst, WORLD_H * sizeof (short)); + src[-1] = src[0]; + src[WORLD_H] = src[WORLD_H - 1]; + src += SRCCOL; + dst += DSTCOL; + } + memcpy( + cellSrc + (SRCCOL * (WORLD_W + 1)), + cellSrc + (SRCCOL * WORLD_W), + SRCCOL * sizeof (short)); + memcpy( + cellSrc, + cellSrc + SRCCOL, + SRCCOL * sizeof (short)); + break; + default: + NOT_REACHED(); + break; + } + + +#define CLIPPER_LOOP_BODY(CODE) \ + src = cellSrc; dst = cellDst; \ + for (x = 0; x < WORLD_W;) { \ + short nw, n, ne, w, c, e, sw, s, se; \ + src = cellSrc + (x * SRCCOL); \ + dst = cellDst + (x * DSTCOL); \ + w = src[0]; c = src[SRCCOL]; e = src[2 * SRCCOL]; \ + sw = src[1]; s = src[SRCCOL + 1]; se = src[(2 * SRCCOL) + 1]; \ + for (y = 0; y < WORLD_H; y++) { \ + nw = w; w = sw; sw = src[2]; \ + n = c; c = s; s = src[SRCCOL + 2]; \ + ne = e; e = se; se = src[(2 * SRCCOL) + 2]; \ + { CODE } \ + src++; dst++; \ + } \ + x++; \ + src = cellSrc + ((x + 1) * SRCCOL) - 3; \ + dst = cellDst + ((x + 1) * DSTCOL) - 1; \ + nw = src[1]; n = src[SRCCOL + 1]; ne = src[(2 * SRCCOL) + 1]; \ + w = src[2]; c = src[SRCCOL + 2]; e = src[(2 * SRCCOL) + 2]; \ + for (y = WORLD_H - 1; y >= 0; y--) { \ + sw = w; w = nw; nw = src[0]; \ + s = c; c = n; n = src[SRCCOL]; \ + se = e; e = ne; ne = src[2 * SRCCOL]; \ + { CODE } \ + src--; dst--; \ + } \ + x++; \ + } + + + switch (heatRule) { + + case 0: + +#define HEAT \ + a += nw + n + ne + w + e + sw + s + se + fl; \ + dst[0] = ((a >> 3) & LOMASK) | ANIMBIT | BURNBIT | BULLBIT; \ + a &= 7; + + CLIPPER_LOOP_BODY(HEAT); + break; + + case 1: + +#define ECOMASK 0x3fc +#define ECO \ + { \ + c -= fl; n -= fl; s -= fl; e -= fl; w -= fl; \ + ne -= fl; nw -= fl; se -= fl; sw -= fl; \ + /* anneal */ \ + int sum = \ + (c&1) + (n&1) + (s&1) + (e&1) + (w&1) + \ + (ne&1) + (nw&1) + (se&1) + (sw&1), cell; \ + if (((sum > 5) || (sum == 4))) { \ + /* brian's brain */ \ + cell = \ + ((c <<1) & (0x3fc)) | \ + (((((c >>1)&3) == 0) && \ + (((n&2) + (s&2) + (e&2) + (w&2) + \ + (ne&2) + (nw&2) + (se&2) + (sw&2)) == (2 <<1)) \ + ) ? 2 : 0) | \ + 1; \ + } else { \ + /* anti-life */ \ + sum = \ + ((n&2) + (s&2) + (e&2) + (w&2) + \ + (ne&2) + (nw&2) + (se&2) + (sw&2)) >>1; \ + cell = \ + (((c ^ 2) <<1) & ECOMASK) | \ + ((c&2) \ + ? ((sum != 5) ? 2 : 0) \ + : (((sum != 5) && (sum != 6)) ? 2 : 0)); \ + } \ + dst[0] = \ + ((fl + cell) & LOMASK) | ANIMBIT | BURNBIT | BULLBIT; \ + c += fl; n += fl; s += fl; e += fl; w += fl; \ + ne += fl; nw += fl; se += fl; sw += fl; \ + } + + CLIPPER_LOOP_BODY(ECO); + + break; + + default: + NOT_REACHED(); + break; + } +} + + +void Micropolis::simLoop(bool doSim) +{ + if (heatSteps) { + int j; + + for (j = 0; j < heatSteps; j++) { + simHeat(); + } + + moveObjects(); + simulateRobots(); + + newMap = 1; + + } else { + if (doSim) { + simFrame(); + } + + moveObjects(); + simulateRobots(); + } + + simLoops++; +} + + +/** + * Move simulaton forward. + * @todo What is the purpose of this function? (also in relation with + * Micropolis::simUpdate()). + */ +void Micropolis::simTick() +{ + if (simSpeed) { + for (simPass = 0; simPass < simPasses; simPass++) { + simLoop(true); + } + } + simUpdate(); +} + + +void Micropolis::simulateRobots() +{ + callback->simulateRobots(this, callbackVal); +} + + +/** + * Deduct \a dollars from the player funds. + * @param dollars Amount of money spent. + */ +void Micropolis::spend(int dollars) +{ + setFunds(totalFunds - dollars); +} + + +/** + * Set player funds to \a dollars. + * + * Modify the player funds, and warn the front-end about the new amount of + * money. + * @param dollars New value for the player funds. + */ +void Micropolis::setFunds(int dollars) +{ + totalFunds = dollars; + updateFunds(); +} + + +/** + * Get number of ticks. + * @todo Figure out what a 'tick' is. + * @bug Unix version looks wrong, \c time.tv_usec should be divided to get + * seconds or \c time.tc_sec should be multiplied. + */ +Quad Micropolis::tickCount() +{ + struct timeval time; + gettimeofday(&time, 0); + return (Quad)((time.tv_sec * 60) + (time.tv_usec * 60) / 1000000); +} + + +/** + * Claim \a size bytes of memory. + * @param size Number of bytes to claim. + * @return Pointer to the claimed memory. + */ +Ptr Micropolis::newPtr(int size) +{ + return (Ptr)malloc(size); +} + + +/** + * Release claimed memory. + * @param data Pointer to previously claimed memory. + */ +void Micropolis::freePtr(void *data) +{ + free(data); +} + + +/** + * Tell the front-end a scenario is started. + * @param scenario The scenario being started. + * @see Scenario. + */ +void Micropolis::doStartScenario(int scenario) +{ + callback->startScenario(this, callbackVal, scenario); +} + + +/** + * Tell the front-end a game is started. + */ +void Micropolis::doStartGame() +{ + callback->startGame(this, callbackVal); +} + + +/** + * Initialize the game. + * This is called from the scripting language. + * @todo we seem to have several of these functions. + */ +void Micropolis::initGame() +{ + simPaused = false; // Simulation is running. + simPausedSpeed = 0; + simPass = 0; + simPasses = 1; + heatSteps = 0; // Disable cellular automata machine. + setSpeed(0); +} + + +/** + * Tell the front-end to show an earthquake to the user (shaking the map for + * some time). + */ +void Micropolis::doEarthquake(int strength) +{ + makeSound("city", "ExplosionLow"); // Make the sound all over. + + callback->startEarthquake(this, callbackVal, strength); +} + + +/** Tell the front-end that the maps are not valid any more */ +void Micropolis::invalidateMaps() +{ + mapSerial++; + callback->updateMap(this, callbackVal); +} + + +/** + * Instruct the front-end to make a sound. + * @param channel Name of the sound channel, which can effect the + * sound (location, volume, spatialization, etc). + * Use "city" for city sounds effects, and "interface" + * for user interface sounds. + * @param sound Name of the sound. + * @param x Tile X position of sound, 0 to WORLD_W, or -1 for everywhere. + * @param y Tile Y position of sound, 0 to WORLD_H, or -1 for everywhere. + */ +void Micropolis::makeSound(const std::string &channel, + const std::string &sound, + int x, int y) +{ + if (enableSound) { + callback->makeSound(this, callbackVal, channel, sound, x, y); + } +} + + +/** + * Get a tile from the map. + * @param x X coordinate of the position to get, 0 to WORLD_W. + * @param y Y coordinate of the position to get, 0 to WORLD_H. + * @return Value of the map at the given position. + * @note Off-map positions are considered to contain #DIRT. + */ +int Micropolis::getTile(int x, int y) +{ + if (!testBounds(x, y)) { + return DIRT; + } + + return map[x][y]; +} + + +/** + * Set a tile into the map. + * @param x X coordinate of the position to get, 0 to WORLD_W. + * @param y Y coordinate of the position to get, 0 to WORLD_H. + * @param tile the tile value to set. + * @note Off-map positions are ignored. + */ +void Micropolis::setTile(int x, int y, int tile) +{ + if (!testBounds(x, y)) { + return; + } + + map[x][y] = (unsigned short)tile; +} + + +/** + * Get the address of the internal buffer containing the map. This is + * used to enable the tile engine to access the tiles directly. + * @return Pointer to the start of the world map buffer. + */ +void *Micropolis::getMapBuffer() +{ + return (void *)mapBase; +} + + +/** + * Get a value from the power grid map. + * @param x X coordinate of the position to get, 0 to WORLD_W. + * @param y Y coordinate of the position to get, 0 to WORLD_H. + * @return Value of the power grid map at the given position. + * @note Off-map positions are considered to contain 0. + * @todo Use world coordinates instead (use powerGridMap.worldGet() instead). + */ +int Micropolis::getPowerGrid(int x, int y) +{ + return powerGridMap.worldGet(x, y); +} + + +/** + * Set a value in the power grid map. + * @param x X coordinate of the position to get, 0 to WORLD_W. + * @param y Y coordinate of the position to get, 0 to WORLD_H. + * @param power the value to set. + * @note Off-map positions are ignored. + * @todo Use world coordinates instead (use powerGridMap.worldSet() instead). + */ +void Micropolis::setPowerGrid(int x, int y, int power) +{ + powerGridMap.worldSet(x, y, power); +} + + +/** + * Get the address of the internal buffer containing the power grid + * map. This is used to enable the tile engine to access the power + * grid map directly. + * @return Pointer to the start of the power grid map buffer. + */ +void *Micropolis::getPowerGridMapBuffer() +{ + return (void *)powerGridMap.getBase(); +} + + +/** + * Get a value from the population density map. + * @param x X coordinate of the position to get, 0 to WORLD_W_2. + * @param y Y coordinate of the position to get, 0 to WORLD_H_2. + * @return Value of the population density map at the given position. + * @note Off-map positions are considered to contain 0. + * @todo Use world coordinates instead (use populationDensityMap.worldGet() instead). + */ +int Micropolis::getPopulationDensity(int x, int y) +{ + return populationDensityMap.get(x, y); +} + + +/** + * Set a value in the population density map. + * @param x X coordinate of the position to get, 0 to WORLD_W_2. + * @param y Y coordinate of the position to get, 0 to WORLD_H_2. + * @param density the value to set. + * @note Off-map positions are ignored. + * @todo Use world coordinates instead (use populationDensityMap.worldSet() instead). + */ +void Micropolis::setPopulationDensity(int x, int y, int density) +{ + populationDensityMap.set(x, y, density); +} + + +/** + * Get the address of the internal buffer containing the population + * density map. This is used to enable the tile engine to access the + * population density map directly. + * @return Pointer to the start of the population density map buffer. + */ +void *Micropolis::getPopulationDensityMapBuffer() +{ + return (void *)populationDensityMap.getBase(); +} + + +/** + * Get a value from the rate of growth map. + * @param x X coordinate of the position to get, 0 to WORLD_W_8. + * @param y Y coordinate of the position to get, 0 to WORLD_H_8. + * @return Value of the rate of growth map at the given position. + * @note Off-map positions are considered to contain 0. + * @todo Use world coordinates instead (use rateOfGrowthMap.worldGet() instead). + */ +int Micropolis::getRateOfGrowth(int x, int y) +{ + return rateOfGrowthMap.get(x, y); +} + + +/** + * Set a value in the rate of growth map. + * @param x X coordinate of the position to get, 0 to WORLD_W_8. + * @param y Y coordinate of the position to get, 0 to WORLD_H_8. + * @param rate the value to set. + * @note Off-map positions are ignored. + * @todo Use world coordinates instead (use rateOfGrowthMap.worldSet() instead). + */ +void Micropolis::setRateOfGrowth(int x, int y, int rate) +{ + rateOfGrowthMap.set(x, y, rate); +} + + +/** + * Get the address of the internal buffer containing the rate of + * growth map. This is used to enable the tile engine to access the + * rate of growth map directly. + * @return Pointer to the start of the rate of growth map buffer. + */ +void *Micropolis::getRateOfGrowthMapBuffer() +{ + return (void *)rateOfGrowthMap.getBase(); +} + + +/** + * Get a value from the traffic density map. + * @param x X coordinate of the position to get, 0 to WORLD_W_2. + * @param y Y coordinate of the position to get, 0 to WORLD_H_2. + * @return Value of the traffic density at the given position. + * @note Off-map positions are considered to contain 0. + * @todo Use world coordinates instead (use trafficDensityMap.worldGet() instead). + */ +int Micropolis::getTrafficDensity(int x, int y) +{ + return trafficDensityMap.get(x, y); +} + + +/** + * Set a value in the traffic density map. + * @param x X coordinate of the position to get, 0 to WORLD_W_2. + * @param y Y coordinate of the position to get, 0 to WORLD_H_2. + * @param density the value to set. + * @note Off-map positions are ignored. + * @todo Use world coordinates instead (use trafficDensityMap.worldSet() instead). + */ +void Micropolis::setTrafficDensity(int x, int y, int density) +{ + trafficDensityMap.set(x, y, density); +} + + +/** + * Get the address of the internal buffer containing the traffic + * density map. This is used to enable the tile engine to access the + * traffic density map directly. + * @return Pointer to the start of the traffic density map buffer. + */ +void *Micropolis::getTrafficDensityMapBuffer() +{ + return (void *)trafficDensityMap.getBase(); +} + + +/** + * Get a value from the pollution density map. + * @param x X coordinate of the position to get, 0 to WORLD_W_2. + * @param y Y coordinate of the position to get, 0 to WORLD_H_2. + * @return Value of the rate of pollution density map at the given position. + * @note Off-map positions are considered to contain 0. + * @todo Use world coordinates instead (use pollutionDensityMap.worldGet() instead). + */ +int Micropolis::getPollutionDensity(int x, int y) +{ + return pollutionDensityMap.get(x, y); +} + + +/** + * Set a value in the pollition density map. + * @param x X coordinate of the position to get, 0 to WORLD_W_2. + * @param y Y coordinate of the position to get, 0 to WORLD_H_2. + * @param density the value to set. + * @note Off-map positions are ignored. + * @todo Use world coordinates instead (use pollutionDensityMap.worldSet() instead). + */ +void Micropolis::setPollutionDensity(int x, int y, int density) +{ + pollutionDensityMap.set(x, y, density); +} + + +/** + * Get the address of the internal buffer containing the pollution + * density map. This is used to enable the tile engine to access the + * pollution density map directly. + * @return Pointer to the start of the pollution density map buffer. + */ +void *Micropolis::getPollutionDensityMapBuffer() +{ + return (void *)pollutionDensityMap.getBase(); +} + + +/** + * Get a value from the crime rate map. + * @param x X coordinate of the position to get, 0 to WORLD_W_2. + * @param y Y coordinate of the position to get, 0 to WORLD_H_2. + * @return Value of the population density map at the given position. + * @note Off-map positions are considered to contain 0. + * @todo Use world coordinates instead (use crimeRateMap.worldGet() instead). + */ +int Micropolis::getCrimeRate(int x, int y) +{ + return crimeRateMap.get(x, y); +} + + +/** + * Set a value in the crime rate map. + * @param x X coordinate of the position to get, 0 to WORLD_W_2. + * @param y Y coordinate of the position to get, 0 to WORLD_H_2. + * @param rate the value to set. + * @note Off-map positions are ignored. + * @todo Use world coordinates instead (use crimeRateMap.worldSet() instead). + */ +void Micropolis::setCrimeRate(int x, int y, int rate) +{ + crimeRateMap.set(x, y, rate); +} + + +/** + * Get the address of the internal buffer containing the crime rate + * map. This is used to enable the tile engine to access the crime + * rate map directly. + * @return Pointer to the start of the crime rate map buffer. + */ +void *Micropolis::getCrimeRateMapBuffer() +{ + return (void *)crimeRateMap.getBase(); +} + + +/** + * Get a value from the land value map. + * @param x X coordinate of the position to get, 0 to WORLD_W_2. + * @param y Y coordinate of the position to get, 0 to WORLD_H_2. + * @return Value of the land value map at the given position. + * @note Off-map positions are considered to contain 0. + * @todo Use world coordinates instead (use landValueMap.worldGet() instead). + */ +int Micropolis::getLandValue(int x, int y) +{ + return landValueMap.get(x, y); +} + + +/** + * Set a value in the land value map. + * @param x X coordinate of the position to get, 0 to WORLD_W_2. + * @param y Y coordinate of the position to get, 0 to WORLD_H_2. + * @param value the value to set. + * @note Off-map positions are ignored. + * @todo Use world coordinates instead (use landValueMap.worldSet() instead). + */ +void Micropolis::setLandValue(int x, int y, int value) +{ + landValueMap.set(x, y, value); +} + + +/** + * Get the address of the internal buffer containing the land value + * map. This is used to enable the tile engine to access the land + * value map directly. + * @return Pointer to the start of the land value map buffer. + */ +void *Micropolis::getLandValueMapBuffer() +{ + return (void *)landValueMap.getBase(); +} + + +/** + * Get a value from the fire coverage map. + * @param x X coordinate of the position to get, 0 to WORLD_W_8. + * @param y Y coordinate of the position to get, 0 to WORLD_H_8. + * @return Value of the fir coverage map at the given position. + * @note Off-map positions are considered to contain 0. + * @todo Use world coordinates instead (use fireStationEffectMap.worldGet() instead). + */ +int Micropolis::getFireCoverage(int x, int y) +{ + return fireStationEffectMap.get(x, y); +} + + +/** + * Set a value in the fire coverage map. + * @param x X coordinate of the position to get, 0 to WORLD_W_8. + * @param y Y coordinate of the position to get, 0 to WORLD_H_8. + * @param coverage the value to set. + * @note Off-map positions are ignored. + * @todo Use world coordinates instead (use fireStationEffectMap.worldSet() instead). + */ +void Micropolis::setFireCoverage(int x, int y, int coverage) +{ + fireStationEffectMap.set(x, y, coverage); +} + + +/** + * Get the address of the internal buffer containing the fire coverage + * map. This is used to enable the tile engine to access the fire + * coverage map directly. + * @return Pointer to the start of the fire coverage map buffer. + */ +void *Micropolis::getFireCoverageMapBuffer() +{ + return (void *)fireStationEffectMap.getBase(); +} + +/** + * Get a value from the police coverage map. + * @param x X coordinate of the position to get, 0 to WORLD_W_8. + * @param y Y coordinate of the position to get, 0 to WORLD_H_8. + * @return Value of the fir coverage map at the given position. + * @note Off-map positions are considered to contain 0. + * @todo Use world coordinates instead (use policeStationEffectMap.worldGet() instead). + */ +int Micropolis::getPoliceCoverage(int x, int y) +{ + return policeStationEffectMap.get(x, y); +} + + +/** + * Set a value in the police coverage map. + * @param x X coordinate of the position to get, 0 to WORLD_W_8. + * @param y Y coordinate of the position to get, 0 to WORLD_H_8. + * @param coverage the value to set. + * @note Off-map positions are ignored. + * @todo Use world coordinates instead (use policeStationEffectMap.worldSet() instead). + */ +void Micropolis::setPoliceCoverage(int x, int y, int coverage) +{ + policeStationEffectMap.set(x, y, coverage); +} + + +/** + * Get the address of the internal buffer containing the police coverage + * map. This is used to enable the tile engine to access the police + * coverage map directly. + * @return Pointer to the start of the police coverage map buffer. + */ +void *Micropolis::getPoliceCoverageMapBuffer() +{ + return (void *)policeStationEffectMap.getBase(); +} + + +//////////////////////////////////////////////////////////////////////// diff --git a/core/micropolis.h b/core/micropolis.h new file mode 100644 index 0000000..2330b3f --- /dev/null +++ b/core/micropolis.h @@ -0,0 +1,2702 @@ +/* micropolis.h + * + * Micropolis, Unix Version. This game was released for the Unix platform + * in or about 1990 and has been modified for inclusion in the One Laptop + * Per Child program. Copyright (C) 1989 - 2007 Electronic Arts Inc. If + * you need assistance with this program, you may contact: + * http://wiki.laptop.org/go/Micropolis or email micropolis@laptop.org. + * + * This program 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. + * + * This program 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 this program. If + * not, see . + * + * ADDITIONAL TERMS per GNU GPL Section 7 + * + * No trademark or publicity rights are granted. This license does NOT + * give you any right, title or interest in the trademark SimCity or any + * other Electronic Arts trademark. You may not distribute any + * modification of this program using the trademark SimCity or claim any + * affliation or association with Electronic Arts Inc. or its employees. + * + * Any propagation or conveyance of this program must include this + * copyright notice and these terms. + * + * If you convey this program (or any modifications of it) and assume + * contractual liability for the program to recipients of it, you agree + * to indemnify Electronic Arts for any liability that those contractual + * assumptions impose on Electronic Arts. + * + * You may not misrepresent the origins of this program; modified + * versions of the program must be marked as such and not identified as + * the original program. + * + * This disclaimer supplements the one included in the General Public + * License. TO THE FULLEST EXTENT PERMISSIBLE UNDER APPLICABLE LAW, THIS + * PROGRAM IS PROVIDED TO YOU "AS IS," WITH ALL FAULTS, WITHOUT WARRANTY + * OF ANY KIND, AND YOUR USE IS AT YOUR SOLE RISK. THE ENTIRE RISK OF + * SATISFACTORY QUALITY AND PERFORMANCE RESIDES WITH YOU. ELECTRONIC ARTS + * DISCLAIMS ANY AND ALL EXPRESS, IMPLIED OR STATUTORY WARRANTIES, + * INCLUDING IMPLIED WARRANTIES OF MERCHANTABILITY, SATISFACTORY QUALITY, + * FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT OF THIRD PARTY + * RIGHTS, AND WARRANTIES (IF ANY) ARISING FROM A COURSE OF DEALING, + * USAGE, OR TRADE PRACTICE. ELECTRONIC ARTS DOES NOT WARRANT AGAINST + * INTERFERENCE WITH YOUR ENJOYMENT OF THE PROGRAM; THAT THE PROGRAM WILL + * MEET YOUR REQUIREMENTS; THAT OPERATION OF THE PROGRAM WILL BE + * UNINTERRUPTED OR ERROR-FREE, OR THAT THE PROGRAM WILL BE COMPATIBLE + * WITH THIRD PARTY SOFTWARE OR THAT ANY ERRORS IN THE PROGRAM WILL BE + * CORRECTED. NO ORAL OR WRITTEN ADVICE PROVIDED BY ELECTRONIC ARTS OR + * ANY AUTHORIZED REPRESENTATIVE SHALL CREATE A WARRANTY. SOME + * JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF OR LIMITATIONS ON IMPLIED + * WARRANTIES OR THE LIMITATIONS ON THE APPLICABLE STATUTORY RIGHTS OF A + * CONSUMER, SO SOME OR ALL OF THE ABOVE EXCLUSIONS AND LIMITATIONS MAY + * NOT APPLY TO YOU. + */ + +/** + * @file micropolis.h + * @brief Header file for Micropolis game engine. + * + * This file contains class and method declarations, constant + * definitions, enumerations, and other essential elements for the + * Micropolis game engine. It serves as the central include file that + * brings together various components of the simulation, such as map + * handling, disaster events, budgeting, and zone management. It also + * defines key data structures, such as the SimSprite class for + * handling sprites within the game. This header file is crucial for + * providing the necessary declarations for different parts of the + * game engine to interact and function cohesively. + */ + +#ifndef H_MICROPOLIS +#define H_MICROPOLIS + +//////////////////////////////////////////////////////////////////////// +// Includes + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include + +#include "data_types.h" +#include "map_type.h" +#include "position.h" +#include "text.h" +#include "frontendmessage.h" +#include "tool.h" +#include "callback.h" + +//////////////////////////////////////////////////////////////////////// +// Definitions + +/** + * Used to determine byte order. + * + * @todo Determine byte order a better way. + */ +#define IS_INTEL 1 + +//////////////////////////////////////////////////////////////////////// +// Constants + +/** + * The number of bits per tile. + * @todo Only used in python/micropolisdrawingarea.py + */ +static const int BITS_PER_TILE = 16; + +/** + * The number of bytes per tile. + * @todo Only used in python/micropolisdrawingarea.py + */ +static const int BYTES_PER_TILE = 2; + +/** + * Horizontal size of the world for a map that stores a value for every 2x2 + * square. + * @todo Make a Map class that keeps its 2x2 square storage details internally, + * so the code doesn't need to bother with it. + */ +static const int WORLD_W_2 = WORLD_W / 2; + +/** + * Vertical size of the world for a map that stores a value for every 2x2 + * square. + */ +static const int WORLD_H_2 = WORLD_H / 2; + +/** + * Horizontal size of the world for a map that stores a value for every 4x4 + * square. + * @todo Make a Map class that keeps its 4x4 square storage details internally, + * so the code doesn't need to bother with it. + */ +static const int WORLD_W_4 = WORLD_W / 4; + +/** + * Vertical size of the world for a map that stores a value for every 4x4 + * square. + */ +static const int WORLD_H_4 = WORLD_H / 4; + +/** + * Horizontal size of the world for a map that stores a value for every 8x8 + * square. + * @todo Make a Map class that keeps its 8x8 square storage details internally, + * so the code doesn't need to bother with it. + */ +static const int WORLD_W_8 = WORLD_W / 8; + +/** + * Vertical size of the world for a map that stores a value for every 8x8 + * square. + */ +static const int WORLD_H_8 = (WORLD_H + 7) / 8; + +/** + * The size of the editor view tiles, in pixels. + */ +static const int EDITOR_TILE_SIZE = 16; + +/** + * The number of simulator passes per #cityTime unit. + */ +static const int PASSES_PER_CITYTIME = 16; + +/** + * The number of #cityTime units per month. + */ +static const int CITYTIMES_PER_MONTH = 4; + +/** + * The number of #cityTime units per year. + */ +static const int CITYTIMES_PER_YEAR = CITYTIMES_PER_MONTH * 12; + +/** + * The number of history entries. + */ +static const int HISTORY_LENGTH = 480; + +/** + * The number of miscellaneous history entries. + */ +static const int MISC_HISTORY_LENGTH = 240; + +/** + * Length of the history tables. + * @todo It is not really a count of histories, rename to something else? + */ +static const int HISTORY_COUNT = 120; + +/** + * The size of the power stack. + */ +static const int POWER_STACK_SIZE = (WORLD_W * WORLD_H) / 4; + +/** + * A constant used in place of an x or y position to indicate + * "nowhere". + */ +static const int NOWHERE = -1; + +/** + * The default radius of an island, used by the terrain generator. + */ +static const int ISLAND_RADIUS = 18; + +/////////////////////////////////////////////////// +// Traffic + +/** + * Maximal number of map tiles to drive, looking for a destination + */ +static const int MAX_TRAFFIC_DISTANCE = 30; + +/** + * Maximal value of Micropolis::roadEffect + */ +static const int MAX_ROAD_EFFECT = 32; + +/** + * Maximal value of Micropolis::policeEffect + */ +static const int MAX_POLICE_STATION_EFFECT = 1000; + +/** + * Maximal value of Micropolis::fireEffect + */ +static const int MAX_FIRE_STATION_EFFECT = 1000; + +//////////////////////////////////////////////////////////////////////// +// Valves + +static const int RES_VALVE_RANGE = 2000; +static const int COM_VALVE_RANGE = 1500; +static const int IND_VALVE_RANGE = 1500; + +//////////////////////////////////////////////////////////////////////// +// Enumerated types. + +/** + * Available types of historic data. + */ +enum HistoryType +{ + HISTORY_TYPE_RES, ///< Residiential history type + HISTORY_TYPE_COM, ///< Commercial history type + HISTORY_TYPE_IND, ///< Industry history type + HISTORY_TYPE_MONEY, ///< Money history type + HISTORY_TYPE_CRIME, ///< Crime history type + HISTORY_TYPE_POLLUTION, ///< Pollution history type + + HISTORY_TYPE_COUNT, ///< Number of history types +}; + +/** + * Available historic scales. + */ +enum HistoryScale +{ + HISTORY_SCALE_SHORT, ///< Short scale data (10 years) + HISTORY_SCALE_LONG, ///< Long scale data (120 years) + + HISTORY_SCALE_COUNT, ///< Number of history scales available +}; + +/** + * Available map types. + */ +enum MapType +{ + MAP_TYPE_ALL, ///< All zones + MAP_TYPE_RES, ///< Residential zones + MAP_TYPE_COM, ///< Commercial zones + MAP_TYPE_IND, ///< Industrial zones + MAP_TYPE_POWER, ///< Power connectivity + MAP_TYPE_ROAD, ///< Roads + MAP_TYPE_POPULATION_DENSITY, ///< Population density + MAP_TYPE_RATE_OF_GROWTH, ///< Rate of growth + MAP_TYPE_TRAFFIC_DENSITY, ///< Traffic + MAP_TYPE_POLLUTION, ///< Pollution + MAP_TYPE_CRIME, ///< Crime rate + MAP_TYPE_LAND_VALUE, ///< Land value + MAP_TYPE_FIRE_RADIUS, ///< Fire station coverage radius + MAP_TYPE_POLICE_RADIUS, ///< Police station coverage radius + MAP_TYPE_DYNAMIC, ///< Dynamic filter + + MAP_TYPE_COUNT, ///< Number of map types +}; + +/* Object & Sound Numbers */ + +enum SpriteType +{ + SPRITE_NOTUSED = 0, + + SPRITE_TRAIN, ///< Train sprite + SPRITE_HELICOPTER, ///< Helicopter sprite + SPRITE_AIRPLANE, ///< Airplane sprite + SPRITE_SHIP, ///< Ship + SPRITE_MONSTER, ///< Scary monster + SPRITE_TORNADO, ///< Tornado sprite + SPRITE_EXPLOSION, ///< Explosion sprite + SPRITE_BUS, ///< Bus sprite + + SPRITE_COUNT, ///< Number of sprite objects +}; + +/////////////////////////////////////////////////// +// Tiles + +/** + * Connect tile commands. + */ +enum ConnectTileCommand +{ + CONNECT_TILE_FIX, ///< Fix zone (connect wire, road, and rail). + CONNECT_TILE_BULLDOZE, ///< Bulldoze and fix zone. + CONNECT_TILE_ROAD, ///< Lay road and fix zone. + CONNECT_TILE_RAILROAD, ///< Lay rail and fix zone. + CONNECT_TILE_WIRE, ///< Lay wire and fix zone. +}; + +/** + * Tool result. + * @todo Make the rest of the code use this instead of magic numbers. + */ +enum ToolResult +{ + TOOLRESULT_NO_MONEY = -2, ///< User has not enough money for tool. + TOOLRESULT_NEED_BULLDOZE = -1, ///< Clear the area first. + TOOLRESULT_FAILED = 0, ///< Cannot build here. + TOOLRESULT_OK = 1, ///< Build succeeded. +}; + +/** + * Characters of the map tiles, the lower 10 bits (0--9). + * @see LOMASK MapTileBitmasks + * @todo Add TILE_ prefix + * @todo Make LOW/BASE and LAST/HIGH consistent everywhere? + * @todo Figure out what sprite groups really exist (maybe we can learn more by + * examining the actual sprites, and/or by using hexadecimal or bite-wise + * notation?) + * @todo Add comments for each sprite (0--1023) + */ +enum Tiles +{ + DIRT = 0, ///< Clear tile + // tile 1 ? + + /* Water */ + RIVER = 2, + REDGE = 3, + CHANNEL = 4, + FIRSTRIVEDGE = 5, + // tile 6 -- 19 ? + LASTRIVEDGE = 20, + WATER_LOW = RIVER, ///< First water tile + WATER_HIGH = LASTRIVEDGE, ///< Last water tile (inclusive) + + TREEBASE = 21, + WOODS_LOW = TREEBASE, + LASTTREE = 36, + WOODS = 37, + UNUSED_TRASH1 = 38, + UNUSED_TRASH2 = 39, + WOODS_HIGH = UNUSED_TRASH2, // Why is an 'UNUSED' tile used? + WOODS2 = 40, + WOODS3 = 41, + WOODS4 = 42, + WOODS5 = 43, + + /* Rubble (4 tiles) */ + RUBBLE = 44, + LASTRUBBLE = 47, + + FLOOD = 48, + // tile 49, 50 ? + LASTFLOOD = 51, + + RADTILE = 52, ///< Radio-active contaminated tile + + UNUSED_TRASH3 = 53, + UNUSED_TRASH4 = 54, + UNUSED_TRASH5 = 55, + + /* Fire animation (8 tiles) */ + FIRE = 56, + FIREBASE = FIRE, + LASTFIRE = 63, + + HBRIDGE = 64, ///< Horizontal bridge + ROADBASE = HBRIDGE, + VBRIDGE = 65, ///< Vertical bridge + ROADS = 66, + ROADS2 = 67, + ROADS3 = 68, + ROADS4 = 69, + ROADS5 = 70, + ROADS6 = 71, + ROADS7 = 72, + ROADS8 = 73, + ROADS9 = 74, + ROADS10 = 75, + INTERSECTION = 76, + HROADPOWER = 77, + VROADPOWER = 78, + BRWH = 79, + LTRFBASE = 80, ///< First tile with low traffic + // tile 81 -- 94 ? + BRWV = 95, + // tile 96 -- 110 ? + BRWXXX1 = 111, + // tile 96 -- 110 ? + BRWXXX2 = 127, + // tile 96 -- 110 ? + BRWXXX3 = 143, + HTRFBASE = 144, ///< First tile with high traffic + // tile 145 -- 158 ? + BRWXXX4 = 159, + // tile 160 -- 174 ? + BRWXXX5 = 175, + // tile 176 -- 190 ? + BRWXXX6 = 191, + // tile 192 -- 205 ? + LASTROAD = 206, + BRWXXX7 = 207, + + /* Power lines */ + HPOWER = 208, + VPOWER = 209, + LHPOWER = 210, + LVPOWER = 211, + LVPOWER2 = 212, + LVPOWER3 = 213, + LVPOWER4 = 214, + LVPOWER5 = 215, + LVPOWER6 = 216, + LVPOWER7 = 217, + LVPOWER8 = 218, + LVPOWER9 = 219, + LVPOWER10 = 220, + RAILHPOWERV = 221, ///< Horizontal rail, vertical power + RAILVPOWERH = 222, ///< Vertical rail, horizontal power + POWERBASE = HPOWER, + LASTPOWER = RAILVPOWERH, + + UNUSED_TRASH6 = 223, + + /* Rail */ + HRAIL = 224, + VRAIL = 225, + LHRAIL = 226, + LVRAIL = 227, + LVRAIL2 = 228, + LVRAIL3 = 229, + LVRAIL4 = 230, + LVRAIL5 = 231, + LVRAIL6 = 232, + LVRAIL7 = 233, + LVRAIL8 = 234, + LVRAIL9 = 235, + LVRAIL10 = 236, + HRAILROAD = 237, + VRAILROAD = 238, + RAILBASE = HRAIL, + LASTRAIL = 238, + + ROADVPOWERH = 239, /* bogus? */ + + // Residential zone tiles + + RESBASE = 240, // Empty residential, tiles 240--248 + FREEZ = 244, // center-tile of 3x3 empty residential + + HOUSE = 249, // Single tile houses until 260 + LHTHR = HOUSE, + HHTHR = 260, + + RZB = 265, // center tile first 3x3 tile residential + + HOSPITALBASE = 405, // Center of hospital (tiles 405--413) + HOSPITAL = 409, // Center of hospital (tiles 405--413) + + CHURCHBASE = 414, // Center of church (tiles 414--422) + CHURCH0BASE = 414, // numbered alias + CHURCH = 418, // Center of church (tiles 414--422) + CHURCH0 = 418, // numbered alias + + // Commercial zone tiles + + COMBASE = 423, // Empty commercial, tiles 423--431 + // tile 424 -- 426 ? + COMCLR = 427, + // tile 428 -- 435 ? + CZB = 436, + // tile 437 -- 608 ? + COMLAST = 609, + // tile 610, 611 ? + + // Industrial zone tiles. + INDBASE = 612, ///< Top-left tile of empty industrial zone. + INDCLR = 616, ///< Center tile of empty industrial zone. + LASTIND = 620, ///< Last tile of empty industrial zone. + + // Industrial zone population 0, value 0: 621 -- 629 + IND1 = 621, ///< Top-left tile of first non-empty industry zone. + IZB = 625, ///< Center tile of first non-empty industry zone. + + // Industrial zone population 1, value 0: 630 -- 638 + + // Industrial zone population 2, value 0: 639 -- 647 + IND2 = 641, + IND3 = 644, + + // Industrial zone population 3, value 0: 648 -- 656 + IND4 = 649, + IND5 = 650, + + // Industrial zone population 0, value 1: 657 -- 665 + + // Industrial zone population 1, value 1: 666 -- 674 + + // Industrial zone population 2, value 1: 675 -- 683 + IND6 = 676, + IND7 = 677, + + // Industrial zone population 3, value 1: 684 -- 692 + IND8 = 686, + IND9 = 689, + + // Seaport + PORTBASE = 693, ///< Top-left tile of the seaport. + PORT = 698, ///< Center tile of the seaport. + LASTPORT = 708, ///< Last tile of the seaport. + + AIRPORTBASE = 709, + // tile 710 ? + RADAR = 711, + // tile 712 -- 715 ? + AIRPORT = 716, + // tile 717 -- 744 ? + + // Coal power plant (4x4). + COALBASE = 745, ///< First tile of coal power plant. + POWERPLANT = 750, ///< 'Center' tile of coal power plant. + LASTPOWERPLANT = 760, ///< Last tile of coal power plant. + + // Fire station (3x3). + FIRESTBASE = 761, ///< First tile of fire station. + FIRESTATION = 765, ///< 'Center tile' of fire station. + // 769 last tile fire station. + + POLICESTBASE = 770, + // tile 771 -- 773 ? + POLICESTATION = 774, + // tile 775 -- 778 ? + + // Stadium (4x4). + STADIUMBASE = 779, ///< First tile stadium. + STADIUM = 784, ///< 'Center tile' stadium. + // Last tile stadium 794. + + // tile 785 -- 799 ? + FULLSTADIUM = 800, + // tile 801 -- 810 ? + + // Nuclear power plant (4x4). + NUCLEARBASE = 811, ///< First tile nuclear power plant. + NUCLEAR = 816, ///< 'Center' tile nuclear power plant. + LASTZONE = 826, ///< Also last tile nuclear power plant. + + LIGHTNINGBOLT = 827, + HBRDG0 = 828, + HBRDG1 = 829, + HBRDG2 = 830, + HBRDG3 = 831, + HBRDG_END = 832, + RADAR0 = 832, + RADAR1 = 833, + RADAR2 = 834, + RADAR3 = 835, + RADAR4 = 836, + RADAR5 = 837, + RADAR6 = 838, + RADAR7 = 839, + FOUNTAIN = 840, + // tile 841 -- 843: fountain animation. + INDBASE2 = 844, + TELEBASE = 844, + // tile 845 -- 850 ? + TELELAST = 851, + SMOKEBASE = 852, + // tile 853 -- 859 ? + TINYEXP = 860, + // tile 861 -- 863 ? + SOMETINYEXP = 864, + // tile 865 -- 866 ? + LASTTINYEXP = 867, + // tile 868 -- 882 ? + TINYEXPLAST = 883, + // tile 884 -- 915 ? + + COALSMOKE1 = 916, ///< Chimney animation at coal power plant (2, 0). + ///< 919 last animation tile for chimney at coal power plant (2, 0). + + COALSMOKE2 = 920, ///< Chimney animation at coal power plant (3, 0). + ///< 923 last animation tile for chimney at coal power plant (3, 0). + + COALSMOKE3 = 924, ///< Chimney animation at coal power plant (2, 1). + ///< 927 last animation tile for chimney at coal power plant (2, 1). + + COALSMOKE4 = 928, ///< Chimney animation at coal power plant (3, 1). + ///< 931 last animation tile for chimney at coal power plant (3, 1). + + FOOTBALLGAME1 = 932, + // tile 933 -- 939 ? + FOOTBALLGAME2 = 940, + // tile 941 -- 947 ? + VBRDG0 = 948, + VBRDG1 = 949, + VBRDG2 = 950, + VBRDG3 = 951, + + NUKESWIRL1 = 952, + NUKESWIRL2 = 953, + NUKESWIRL3 = 954, + NUKESWIRL4 = 955, + + // Tiles 956-959 unused (originally) + // TILE_COUNT = 960, + + // Extended zones: 956-1019 + + CHURCH1BASE = 956, + CHURCH1 = 960, + CHURCH2BASE = 965, + CHURCH2 = 969, + CHURCH3BASE = 974, + CHURCH3 = 978, + CHURCH4BASE = 983, + CHURCH4 = 987, + CHURCH5BASE = 992, + CHURCH5 = 996, + CHURCH6BASE = 1001, + CHURCH6 = 1005, + CHURCH7BASE = 1010, + CHURCH7 = 1014, + CHURCH7LAST = 1018, + + // Tiles 1020-1023 unused + + TILE_COUNT = 1024, + + TILE_INVALID = -1, ///< Invalid tile (not used in the world map). +}; + +/////////////////////////////////////////////////// +// Scenarios + +/** Available scenarios */ +enum Scenario +{ + SC_NONE, ///< No scenario (free playing) + + SC_DULLSVILLE, ///< Dullsville (boredom) + SC_SAN_FRANCISCO, ///< San francisco (earthquake) + SC_HAMBURG, ///< Hamburg (fire bombs) + SC_BERN, ///< Bern (traffic) + SC_TOKYO, ///< Tokyo (scary monster) + SC_DETROIT, ///< Detroit (crime) + SC_BOSTON, ///< Boston (nuclear meltdown) + SC_RIO, ///< Rio (flooding) + + SC_COUNT, ///< Number of scenarios +}; + +/////////////////////////////////////////////////// +// Zones + +/** Available zone types */ +enum ZoneType +{ + ZT_COMMERCIAL, ///< Commercial zone + ZT_INDUSTRIAL, ///< Industrial zone + ZT_RESIDENTIAL, ///< Residential zone + + ZT_NUM_DESTINATIONS, ///< Number of available zones +}; + +/////////////////////////////////////////////////// +// City problems + +/** + * Problems in the city where citizens vote on + * @todo Eliminate PROBNUM + */ +enum CityVotingProblems +{ + CVP_CRIME, ///< Crime + CVP_POLLUTION, ///< Pollution + CVP_HOUSING, ///< Housing + CVP_TAXES, ///< Taxes + CVP_TRAFFIC, ///< Traffic + CVP_UNEMPLOYMENT, ///< Unemployment + CVP_FIRE, ///< Fire + + CVP_NUMPROBLEMS, ///< Number of problems + + CVP_PROBLEM_COMPLAINTS = 4, ///< Number of problems to complain about. + + PROBNUM = 10, +}; + +/** Available classes of cities */ +enum CityClass +{ + CC_VILLAGE, ///< Village + CC_TOWN, ///< Town, > 2000 citizens + CC_CITY, ///< City, > 10000 citizens + CC_CAPITAL, ///< Capital, > 50000 citizens + CC_METROPOLIS, ///< Metropolis, > 100000 citizens + CC_MEGALOPOLIS, ///< Megalopolis, > 500000 citizens + + CC_NUM_CITIES, ///< Number of city classes +}; + +/** Game levels */ +enum GameLevel +{ + LEVEL_EASY, ///< Simple game level + LEVEL_MEDIUM, ///< Intermediate game level + LEVEL_HARD, ///< Difficult game level + + LEVEL_COUNT, ///< Number of game levels + + LEVEL_FIRST = LEVEL_EASY, ///< First game level value + LEVEL_LAST = LEVEL_HARD, ///< Last game level value +}; + +//////////////////////////////////////////////////////////////////////// +// Inline functions + +/** + * Compute minimal value. + * @param a First value. + * @param b Second value. + * @return Minimum of \a a and \a b. + */ +template +static inline T min(const T a, const T b) +{ + return (a < b) ? a : b; +} + +/** + * Compute maximal value. + * @param a First value. + * @param b Second value. + * @return Maximum of \a a and \a b. + */ +template +static inline T max(const T a, const T b) +{ + return (a > b) ? a : b; +} + +/** + * Clamp value between lower and upper bound. + * @param val Value. + * @param lower Lower bound (inclusive). + * @param upper Upper bound (inclusive). + * @return \a val, limited to the range given by the lower and upper bound. + */ +template +static inline T clamp(const T val, const T lower, const T upper) +{ + if (val < lower) + { + return lower; + } + if (val > upper) + { + return upper; + } + return val; +} + +/** + * Compute absolute value. + * @param val Input value. + * @return Absolute value of \a val. + */ +template +static inline T absoluteValue(const T val) +{ + if (val < 0) + { + return -val; + } + return val; +} + +//////////////////////////////////////////////////////////////////////// +// Macros + +/** + * Compute length of array + * @param array Array to get length from + * @note Macro only works for statically allocated arrays + */ +#define LENGTH_OF(array) (sizeof(array) / sizeof((array)[0])) + +/** + * Give a fatal error and exit. + */ +#define NOT_REACHED() not_reached(__LINE__, __FILE__) + +/** + * Give a fatal error and exit the program. + * @param line Source line number of the fatal error. + * @param fname Filename of the source file. + * @return Does not return to the caller. + * @todo Generalize error handling/exiting of the simulator. + */ +static inline void not_reached(int line, const char *fname) +{ + fprintf(stderr, "Code unexpectedly executed at line %d, at file %s\n", line, fname); + exit(1); +} + +//////////////////////////////////////////////////////////////////////// +// Forward class definitions + +class Micropolis; +class Callback; +class ConsoleCallback; +class ToolEffects; +class BuildingProperties; + +//////////////////////////////////////////////////////////////////////// +// Classes + +/** Sprite in the simulator. + * @todo SimSprite::name is never set to anything else than \c "", and only + * used to detect a non-removed non-active sprite (in a non-robust way). + */ +class SimSprite +{ + +public: + SimSprite *next; ///< Pointer to next #SimSprite object in the list. + std::string name; ///< Name of the sprite. + int type; ///< Type of the sprite (TRA -- BUS). + int frame; ///< Frame (\c 0 means non-active sprite) + int x; ///< X coordinate of the sprite in pixels? + int y; ///< Y coordinate of the sprite in pixels? + int width; + int height; + int xOffset; + int yOffset; + int xHot; ///< Offset of the hot-spot relative to SimSprite::x? + int yHot; ///< Offset of the hot-spot relative to SimSprite::y? + int origX; + int origY; + int destX; ///< Destination X coordinate of the sprite. + int destY; ///< Destination Y coordinate of the sprite. + int count; + int soundCount; + int dir; + int newDir; + int step; + int flag; + int control; + int turn; + int accel; + int speed; +}; + +/** + * Main simulator class + * @todo Modify Micropolis::roadPercent, Micropolis::policePercent, and + * Micropolis::firePercent to hold real percentage from \c 0 to \c 100 + * instead of a floating point fraction + * @todo Micropolis::crimeMaxX and Micropolis::crimeMaxY seem unused. + */ +class Micropolis +{ + +public: + //////////////////////////////////////////////////////////////////////// + + Micropolis(); + + ~Micropolis(); + + void setCallback(Callback *callback, emscripten::val callbackVal); + +private: + void destroy(); + + void init(); + + //////////////////////////////////////////////////////////////////////// + // allocate.cpp + +public: + /** + * Callback interface. + */ + Callback *callback; + + /** + * Number of road tiles in the game. + * + * Bridges count as 4 tiles, and high density traffic counts as + * 2 tiles. + */ + short roadTotal; + + /** + * Total number of rails. + * + * No penalty for bridges or high traffic density. + */ + short railTotal; + + /** + * Number of fires. + */ + short firePop; + + /** + * Number of people in the residential zones. + * + * Depends on level of zone development. + */ + short resPop; + + /** + * Commercial zone population. + * + * Depends on level of zone development. + */ + short comPop; + + /** + * Industrial zone population. + * + * Depends on level of zone development. + */ + short indPop; + + /** + * Total population. + * + * Includes residential pop / 8 plus industrial pop plus commercial + * pop. + */ + short totalPop; + + /** + * Last total population. + * + * Not used? + */ + short totalPopLast; + + short resZonePop; ///< Number of residential zones. + short comZonePop; ///< Number of commercial zones. + short indZonePop; ///< Number of industrial zones. + + /** + * Total zone population. + */ + short totalZonePop; + + short hospitalPop; ///< Number of hospitals. + short churchPop; ///< Number of churches. + short faith; ///< Faith bias. + short stadiumPop; ///< Number of stadiums. + + /** + * Police station population. + */ + short policeStationPop; + + /** + * Fire station population. + */ + short fireStationPop; + + /** + * Coal power plant population. + */ + short coalPowerPop; + + /** + * Nuclear power plant population. + */ + short nuclearPowerPop; + + /** + * Seaport population. + */ + short seaportPop; + + /** + * Airport population. + */ + short airportPop; + + /** + * Average crime. + * + * Affected by land value, population density, police station + * distance. + */ + short crimeAverage; + + /** + * Average pollution. + * + * Affected by PollutionMem, which is effected by traffic, fire, + * radioactivity, industrial zones, seaports, airports, power + * plants. + */ + short pollutionAverage; + + /** + * Land value average. + * + * Affected by distance from city center, development density + * (terrainMem), pollution, and crime. + */ + short landValueAverage; + + /** @name Dates */ + //@{ + + /** + * City time unit counter, increnented once every 16 runs through + * the simulator (at fast speed). A time unit is 7.6 days. 4 units + * per month, 48 units per year, relative to #startingYear + * + * Four units per month, so one unit is about a week (7.6 days). + */ + Quad cityTime; + + /** + * City month, 4 time units per month. + * @todo Remove, can be computed from Micropolis::cityTime. + */ + Quad cityMonth; + + /** + * City year, (Micropolis::cityTime / 48) + Micropolis::startingYear. + * @todo Remove, can be computed from Micropolis::cityTime. + */ + Quad cityYear; + + /** + * City starting year. + */ + short startingYear; + + //@} + + /* Maps */ + + /** + * Two-dimensional array of map tiles. + * + * Map[0 <= x < 120][0 <= y < 100] + */ + unsigned short *map[WORLD_W]; + + /** + * 10 year residential history maximum value. + */ + short resHist10Max; + + /** + * 120 year residential history maximum value. + */ + short resHist120Max; + + /** + * 10 year commercial history maximum value. + */ + short comHist10Max; + + /** + * 120 year commercial history maximum value. + */ + short comHist120Max; + + /** + * 10 year industrial history maximum value. + */ + short indHist10Max; + + /** + * 120 year industrial history maximum value. + */ + short indHist120Max; + + /** + * Census changed flag. + * + * Need to redraw census dependent stuff. + */ + bool censusChanged; + + /** @name Budget */ + //@{ + + /** + * Spending on roads. + */ + Quad roadSpend; + + /** + * Spending on police stations. + */ + Quad policeSpend; + + /** + * Spending on fire stations. + */ + Quad fireSpend; + + /** + * Requested funds for roads. + * + * Depends on number of roads, rails, and game level. + */ + Quad roadFund; + + /** + * Requested funds for police stations. + * + * Depends on police station population. + */ + Quad policeFund; + + /** + * Requested funds for fire stations. + * + * Depends on fire station population. + */ + Quad fireFund; + + /** + * Ratio of road spending over road funding, times #MAX_ROAD_EFFECT. + */ + Quad roadEffect; + + /** + * Ratio of police spending over police funding, times #MAX_POLICE_EFFECT. + */ + Quad policeEffect; + + /** + * Ratio of fire spending over fire funding, times #MAX_FIRE_EFFECT. + */ + Quad fireEffect; + + /** + * Funds from taxes. + * + * Depends on total population, average land value, city tax, and + * game level. + */ + Quad taxFund; + + /** + * City tax rate. + */ + short cityTax; + + /** + * Tax port flag. + * + * Apparently never used. CollectTax checks it. + * + * @todo Apparently taxFlag is never set to true in MicropolisEngine + * or the TCL code. + * @todo Don should check old Mac code to see if it's ever set. + * @todo Variable is always \c 0. Decide whether to keep it, and if yes, + * create means to modify its value + */ + bool taxFlag; + + //@} + + /** @name Maps */ + //@{ + + MapByte2 populationDensityMap; ///< Population density map. + MapByte2 trafficDensityMap; ///< Traffic density map. + MapByte2 pollutionDensityMap; ///< Pollution density map. + MapByte2 landValueMap; ///< Land value map. + MapByte2 crimeRateMap; ///< Crime rate map. + + /** + * Terrain development density map. + * + * Used to calculate land value. + */ + MapByte4 terrainDensityMap; + + /** + * Temporary map 1. + * + * Used to smooth population density, pollution. + */ + MapByte2 tempMap1; + + /** + * Temporary map 2. + * + * Used to smooth population density, pollution. + */ + MapByte2 tempMap2; + + /** + * Temporary map 3. + * + * Used to smooth development density, for terrainDensityMap. + */ + MapByte4 tempMap3; + + /** + * Power grid map. + */ + MapByte1 powerGridMap; + + /** + * Rate of growth map. + * + * Affected by DecROGMem, incROG called by zones. Decreased by fire + * explosions from sprites, fire spreading. Doesn't seem to + * actually feed back into the simulation. Output only. + */ + MapShort8 rateOfGrowthMap; + + /** + * Fire station map. + * + * Effectivity of fire control in this area. + * + * Affected by fire stations, powered, fire funding ratio, road + * access. Affects how long fires burn. + * @see #fireEffect + */ + MapShort8 fireStationMap; + + /** + * Copy of fire station map to display. + */ + MapShort8 fireStationEffectMap; + + /** + * Police station map. + * + * Effectivity of police in fighting crime. + * + * Affected by police stations, powered, police funding ratio, road + * access. Affects crime rate. + * @see #policeEffect + */ + MapShort8 policeStationMap; + + /** + * Copy of police station map to display. + */ + MapShort8 policeStationEffectMap; + + /** + * Commercial rate map. + * + * Depends on distance to city center. Affects commercial zone + * evaluation. + */ + MapShort8 comRateMap; + + //@} + + /** @name Historic graphs. */ + //@{ + + /** + * Residential population history. + */ + short *resHist; + + /** + * Commercial population history. + */ + short *comHist; + + /** + * Industrial population history. + */ + short *indHist; + + /** + * Money history. + */ + short *moneyHist; + + /** + * Pollution history. + */ + short *pollutionHist; + + /** + * Crime history. + */ + short *crimeHist; + + /** + * Memory used to save miscelaneous game values in save file. + */ + short *miscHist; + + //@} + +private: + /** + * Need hospital? + * + * 0 if no, 1 if yes, -1 if too many. + */ + short needHospital; + + /** + * Need church? + * + * 0 if no, 1 if yes, -1 if too many. + */ + short needChurch; + + /** + * Memory for map array. + */ + unsigned short *mapBase; + + void initMapArrays(); + + void destroyMapArrays(); + + //////////////////////////////////////////////////////////////////////// + // animate.cpp + +public: + void animateTiles(); + + static int getNextAnimatedTile(int index); + + //////////////////////////////////////////////////////////////////////// + // budget.cpp + +public: + /** + * Percentage of requested road and rail costs to funding level. + * + * Value between \c 0 and ::MAX_ROAD_EFFECT. + * Affected by road funds slider and budgetary constraints. + */ + float roadPercent; + + /** + * Percentage of requested police station costs to funding level. + * + * Value between \c 0 and ::MAX_POLICESTATION_EFFECT. + * Affected by road funds slider and budgetary constraints. + */ + float policePercent; + + /** + * Percentage of requested fire station costs to funding level. + * + * Value between \c 0 and ::MAX_FIRESTATION_EFFECT. + * Affected by road funds slider and budgetary constraints. + */ + float firePercent; + + /** + * Amount of road funding granted. + */ + Quad roadValue; + + /** + * Amount of police funding granted. + */ + Quad policeValue; + + /** + * Amount of fire station funding granted. + */ + Quad fireValue; + + /** + * Flag set when budget window needs to be updated. + */ + int mustDrawBudget; + + void initFundingLevel(); + + void doBudget(); + + void doBudgetFromMenu(); + + void doBudgetNow(bool fromMenu); + + void updateBudget(); + + void showBudgetWindowAndStartWaiting(); + + void setCityTax(short tax); + + //////////////////////////////////////////////////////////////////////// + // connect.cpp + +private: + ToolResult connectTile(short x, short y, + ConnectTileCommand cmd, ToolEffects *effects); + + ToolResult layDoze(int x, int y, ToolEffects *effects); + + ToolResult layRoad(int x, int y, ToolEffects *effects); + + ToolResult layRail(int x, int y, ToolEffects *effects); + + ToolResult layWire(int x, int y, ToolEffects *effects); + + void fixZone(int x, int y, ToolEffects *effects); + + void fixSingle(int x, int y, ToolEffects *effects); + + //////////////////////////////////////////////////////////////////////// + // disasters.cpp + +public: + /** + * Size of flooding disaster. + */ + short floodCount; + + void makeMeltdown(); + + void makeFireBombs(); + + void makeEarthquake(); + + void makeFire(); + + void makeFlood(); + + void setFire(); + + void fireBomb(); + +private: + void doDisasters(); + + void scenarioDisaster(); + + bool vulnerable(int tem); + + void doFlood(const Position &pos); + + //////////////////////////////////////////////////////////////////////// + // evaluate.cpp + +public: + /** + * Yes votes. + * + * Percentage of people who think the mayor is doing a good job. + */ + short cityYes; + + /** + * Problem votes. + * + * The number of votes for each problem. + * @see CityVotingProblems + */ + short problemVotes[PROBNUM]; + + /** + * Order of taken problems. + * + * Contains index of MicropolisEngine::problemVotes of taken problems, in decreasing order. + * @note Value CVP_NUMPROBLEMS means that the entry is not used + */ + short problemOrder[CVP_PROBLEM_COMPLAINTS]; + + /** + * City population. + * + * Depends of ResPop, ComPop and IndPop. + */ + Quad cityPop; + + /** + * Change in the city population. + * + * Depends on last cityPop. + */ + Quad cityPopDelta; + + /** + * City assessed value. + * + * Depends on roadTotal, railTotal, policeStationPop, + * fireStationPop, hospitalPop, stadiumPop, seaportPop, + * airportPop, coalPowerPop, and nuclearPowerPop, and their + * respective values. + */ + Quad cityAssessedValue; + + CityClass cityClass; ///< City class, affected by city population. + + /** + * City score. + * + * Affected by average of problems, residential cap, commercial cap, + * industrial cap, road effect, police effect, fire effect, + * residential valve, commercial valve, industrial valve, city + * population, delta city population, fires, tax rate, and unpowered + * zones. + */ + short cityScore; + + /** + * Change in the city score. + * + * Depends on city score. + */ + short cityScoreDelta; + + /** + * Average traffic. + * + * Depends on average traffic density of tiles with non-zero land value. + */ + short trafficAverage; + + void cityEvaluation(); + + void evalInit(); + + void doScoreCard(); + + void changeEval(); + + void scoreDoer(); + + int countProblems(); + + int getProblemNumber(int i); + + int getProblemVotes(int i); + +private: + void getAssessedValue(); + + void doPopNum(); + + Quad getPopulation(); + CityClass getCityClass(Quad cityPop); + + void doProblems(short problemTable[PROBNUM]); + + void voteProblems(const short problemTable[PROBNUM]); + + short getTrafficAverage(); + + short getUnemployment(); + + short getFireSeverity(); + + void getScore(const short problemTable[PROBNUM]); + + void doVotes(); + + //////////////////////////////////////////////////////////////////////// + // fileio.cpp + +public: + bool loadFileData(const std::string &filename); + + bool loadFile(const std::string &filename); + + bool saveFile(const std::string &filename); + + void loadScenario(Scenario s); + + void didLoadScenario(int s, const std::string name, const std::string fname); + + bool loadCity(const std::string &filename); + + void didLoadCity(const std::string &filename); + + void didntLoadCity(const std::string &msg); + + void saveCity(); + + void doSaveCityAs(const std::string &filename); + + void didSaveCity(const std::string &filename); + + void didntSaveCity(const std::string &msg); + + void saveCityAs(const std::string &filename); + + //////////////////////////////////////////////////////////////////////// + // generate.cpp + +public: + /** @name Terrain generator. + * features available incrementally as city building tools. + * + * The user should be able to place water and trees, and it should + * dynamically smooth the edges. + * + * The user interface could restrict the user to only drawing + * terrain before any zones were built, but it would be best if + * the terrain editing tools worked properly when there were zones + * built (by automatically bulldozing zones whose underlying + * terrain it's modifying). + */ + //@{ + + /** + * Controls the level of tree creation. + * -1 => create default number of trees, 0 => never create trees, >0 => create more trees + */ + int terrainTreeLevel; + + /** + * Controls the level of lake creation. + * -1 => create default number of lakes, 0 => never create lakes, >0 => create more lakes + */ + int terrainLakeLevel; + + /** + * Controls the level of river curviness. + * -1 => default curve level, 0 => never create rivers, >0 => create curvier rivers + */ + int terrainCurveLevel; + + /** + * Controls how often to create an island. + * -1 => 10% chance of island, 0 => never create island, 1 => always create island + */ + int terrainCreateIsland; + + /** + * The seed of the most recently generated city. + */ + int generatedCitySeed; + + void generateSomeRandomCity(); + + void clearMap(); + + void clearUnnatural(); + + void makeIsland(); + + void treeSplash(short xloc, short yloc); + + void makeSingleLake(const Position &pos); + + void plopBRiver(const Position &pos); + void plopSRiver(const Position &pos); + + void generateSomeCity(int seed); + + void generateMap(int seed); + +private: + void makeNakedIsland(); + + void doTrees(); + + bool isTree(MapValue cell); + + void smoothTrees(); + + void smoothTreesAt(int x, int y, bool preserve); + void smoothTreesAt(int x, int y, bool preserve, ToolEffects *effects); + + void makeLakes(); + + void doRivers(const Position &terrainPos); + + Direction2 doBRiver(const Position &riverPos, + Direction2 riverDir, Direction2 terrainDir); + Direction2 doSRiver(const Position &riverPos, + Direction2 riverDir, Direction2 terrainDir); + + void smoothRiver(); + + void smoothWater(); + + void putOnMap(MapValue mChar, short xLoc, short yLoc); + + //@} + + //////////////////////////////////////////////////////////////////////// + // graph.cpp + +public: + /** + * @todo Nobody uses this variable. Can it be removed? + */ + bool historyInitialized; + + /** + * @todo Write-only variable. Can it be removed? + */ + short graph10Max; + + /** + * @todo Write-only variable. Can it be removed? + */ + short graph120Max; + + void drawMonth(short *hist, unsigned char *s, float scale); + + void changeCensus(); + + void graphDoer(); + + void initGraphs(); + + void initGraphMax(); + +#ifdef SWIG +// This tells SWIG that minValResult, maxValResult are output parameters, +// which will be returned in a tuple of length two. +%apply short *OUTPUT { short *minValResult }; +%apply short *OUTPUT { short *maxValResult }; +#endif + + void getHistoryRange(int historyType, int historyScale, + short *minValResult, short *maxValResult); + + short getHistory(int historyType, int historyScale, + int historyIndex); + + void setHistory(int historyType, int historyScale, + int historyIndex, short historyValue); + + //////////////////////////////////////////////////////////////////////// + // initialize.cpp + +private: + void initWillStuff(); + + void resetMapState(); + + void resetEditorState(); + + //////////////////////////////////////////////////////////////////////// + // main.cpp + +public: + int simLoops; + + /** + * The number of passes through the simulator loop to take each tick. + */ + int simPasses; + + /** + * The count of the current pass through the simulator loop. + */ + int simPass; + + /** + * Simulation is paused + * @todo Variable has reversed logic, maybe use sim_running instead? + */ + bool simPaused; + + int simPausedSpeed; + + bool tilesAnimated; ///< @todo Not currently used, should hook it up. + + /** + * Enable animation. + * @todo Currently always \c true. Should connect it to a frontend option. + */ + bool doAnimation; + + bool doMessages; ///< @todo Not currently used, should hook it up. + + bool doNotices; ///< @todo Not currently used, should hook it up. + + std::string getMicropolisVersion(); + + void simUpdate(); + + void simTick(); + + void simulateRobots(); + +public: + std::string cityFileName; ///< Filename of the last loaded city + + /** + * Name of the city. + */ + std::string cityName; ///< Name of the city + + /** + * Heat steps. + */ + int heatSteps; + + /** + * Heat flow. + */ + int heatFlow; + + /** + * Heat rule. + */ + int heatRule; + + /** + * Heat wrap. + */ + int heatWrap; + +private: + short *cellSrc; + + short *cellDst; + + void simInit(); + + void simHeat(); + + void simLoop(bool doSim); + + //////////////////////////////////////////////////////////////////////// + // message.cpp + +public: + Quad cityPopLast; ///< Population of last city class check. @see CheckGrowth + short categoryLast; ///< City class of last city class check. @see CheckGrowth + + /** + * Enable auto goto + * + * When enabled and an important event happens, the map display will jump to + * the location of the event + */ + bool autoGoto; + + void sendMessages(); + + void checkGrowth(); + + void doScenarioScore(Scenario type); + + void sendMessage( + short Mnum, + short x = NOWHERE, short y = NOWHERE, + bool picture = false, bool important = false); + + void doMakeSound(int mesgNum, int x, int y); + + void doAutoGoto(short x, short y, const std::string &message); + + void doLoseGame(); + void doWinGame(); ///< @todo This may not be called. Call it when appropriate. + + //////////////////////////////////////////////////////////////////////// + // power.cpp + +private: + /** @name Power stack + * Stack used to find powered tiles by tracking conductive tiles. + */ + //@{ + + int powerStackPointer; ///< Stack counter, points to top-most item. + + /** Stack of X/Y positions for traversing setting the power grid. */ + Position powerStackXY[POWER_STACK_SIZE]; + + void doPowerScan(); + + bool testForConductive(const Position &pos, Direction2 testDir); + + void pushPowerStack(const Position &pos); + + Position pullPowerStack(); + + //@} + + //////////////////////////////////////////////////////////////////////// + // random.cpp + +public: + UQuad nextRandom; + + int simRandom(); + + short getRandom(short range); + + int getRandom16(); + int getRandom16Signed(); + + short getERandom(short limit); + + void randomlySeedRandom(); + + void seedRandom(int seed); + + //////////////////////////////////////////////////////////////////////// + // scan.cpp + +private: + /** @todo Write-only variable, can be removed? */ + short newMap; + + /** @todo Write-only variable, can be removed? */ + short newMapFlags[MAP_TYPE_COUNT]; + + short cityCenterX; ///< X coordinate of city center + short cityCenterY; ///< Y coordinate of city center + + short pollutionMaxX; ///< X coordinate of most polluted area + short pollutionMaxY; ///< Y coordinate of most polluted area + + short crimeMaxX; ///< X coordinate of most criminal area. Not used. + short crimeMaxY; ///< Y coordinate of most criminal area. Not used. + + /** + * Integer with bits 0..2 that control smoothing. + */ + Quad donDither; + + void fireAnalysis(); + + void populationDensityScan(); + + int getPopulationDensity(const Position &pos, MapTile tile); + + void pollutionTerrainLandValueScan(); + + int getPollutionValue(int loc); + + int getCityCenterDistance(int x, int y); + + void crimeScan(); + + void smoothTerrain(); + + void doSmooth1(); + + void doSmooth2(); + + void computeComRateMap(); + + //////////////////////////////////////////////////////////////////////// + // simulate.cpp + +public: + bool valveFlag; + + short crimeRamp; + + short pollutionRamp; + + bool resCap; ///< Block residential growth + bool comCap; ///< Block commercial growth + bool indCap; ///< Block industrial growth + + short cashFlow; + + float externalMarket; + + Scenario disasterEvent; ///< The disaster for which a count-down is running + short disasterWait; ///< Count-down timer for the disaster + + Scenario scoreType; ///< The type of score table to use + short scoreWait; ///< Time to wait before computing the score + + short poweredZoneCount; ///< Number of powered tiles in all zone + short unpoweredZoneCount; ///< Number of unpowered tiles in all zones + + bool newPower; /* post */ + + short cityTaxAverage; + + short simCycle; + + short phaseCycle; + + short speedCycle; + + bool doInitialEval; ///< Need to perform initial city evaluation. + + int mapSerial; ///< The invalidateMaps method increases the map serial number every time the maps changes. + +private: + short resValve; + short comValve; + short indValve; + +public: + void updateFundEffects(); + +private: + /** Generate a random animated Tiles::FIRE tile */ + inline MapValue randomFire() + { + return (FIRE + (getRandom16() & 7)) | ANIMBIT; + }; + + /** Generate a random Tiles::RUBBLE tile */ + inline MapValue randomRubble() + { + return (RUBBLE + (getRandom16() & 3)) | BULLBIT; + }; + + void simFrame(); + + void simulate(); + + void doSimInit(); + + void doNilPower(); + + void decTrafficMap(); + + void decRateOfGrowthMap(); + + void initSimMemory(); + + void simLoadInit(); + + void setCommonInits(); + + void setValves(); + + void clearCensus(); + + void take10Census(); + + void take120Census(); + + void collectTax(); + + void mapScan(int x1, int x2); + + void doRail(const Position &pos); + + void doRadTile(const Position &pos); + + void doRoad(const Position &pos); + + bool doBridge(const Position &pos, MapTile tile); + + int getBoatDistance(const Position &pos); + + void doFire(const Position &pos); + + void fireZone(const Position &pos, MapValue ch); + + void repairZone(const Position &pos, MapTile zCent, short zSize); + + void doSpecialZone(const Position &pos, bool PwrOn); + + void drawStadium(const Position ¢er, MapTile z); + + void doAirport(const Position &pos); + + void coalSmoke(const Position &pos); + + void doMeltdown(const Position &pos); + + //////////////////////////////////////////////////////////////////////// + // sprite.cpp + +public: + SimSprite *spriteList; ///< List of active sprites. + + SimSprite *newSprite(const std::string &name, int type, int x, int y); + + void initSprite(SimSprite *sprite, int x, int y); + + void destroyAllSprites(); + + void destroySprite(SimSprite *sprite); + + SimSprite *getSprite(int type); + + SimSprite *makeSprite(int type, int x, int y); + +private: + SimSprite *freeSprites; ///< Pool of free #SimSprite objects. + + SimSprite *globalSprites[SPRITE_COUNT]; + + int absDist; + + short spriteCycle; + +public: + short getChar(int x, int y); + + short turnTo(int p, int d); + + bool tryOther(int Tpoo, int Told, int Tnew); + + bool spriteNotInBounds(SimSprite *sprite); + + short getDir(int orgX, int orgY, int desX, int desY); + + int getDistance(int x1, int y1, int x2, int y2); + + bool checkSpriteCollision(SimSprite *s1, SimSprite *s2); + + void moveObjects(); + + void doTrainSprite(SimSprite *sprite); + + void doCopterSprite(SimSprite *sprite); + + void doAirplaneSprite(SimSprite *sprite); + + void doShipSprite(SimSprite *sprite); + + void doMonsterSprite(SimSprite *sprite); + + void doTornadoSprite(SimSprite *sprite); + + void doExplosionSprite(SimSprite *sprite); + + void doBusSprite(SimSprite *sprite); + + int canDriveOn(int x, int y); + + void explodeSprite(SimSprite *sprite); + + bool checkWet(int x); + + void destroyMapTile(int ox, int oy); + + void startFireInZone(int Xloc, int Yloc, int ch); + + void startFire(int x, int y); + + void generateTrain(int x, int y); + + void generateBus(int x, int y); + + void generateShip(); + + void makeShipHere(int x, int y); + + void makeMonster(); + + void makeMonsterAt(int x, int y); + + void generateCopter(const Position &pos); + + void generatePlane(const Position &pos); + + void makeTornado(); + + void makeExplosion(int x, int y); + + void makeExplosionAt(int x, int y); + + //////////////////////////////////////////////////////////////////////// + // stubs.cpp + +public: + Quad totalFunds; ///< Funds of the player + + /** + * Enable auto-bulldoze + * + * When enabled, the game will silently clear tiles when the user + * builds something on non-clear and bulldozable tiles + */ + bool autoBulldoze; + + /** + * Enable auto budget + * + * When enabled, the program will perform budgetting of the city + */ + bool autoBudget; + + Quad messageTimeLast; + + GameLevel gameLevel; ///< Difficulty level of the game (0..2) + + short initSimLoad; + + Scenario scenario; ///< Scenario being played + + short simSpeed; + + short simSpeedMeta; + + bool enableSound; ///< Enable sound + + bool enableDisasters; ///< Enable disasters + + short messageNumber; + + bool evalChanged; ///< The evaluation window should be shown to the user + + /** + * @todo Variable is not used, can we remove it? + */ + short blinkFlag; + + emscripten::val callbackVal; + + /** + * Hook for scripting language to store scripted callback function. + * (i.e. a callable Python object.) + */ + void *callbackData; + + /** + * Hook for scripting language to store context (i.e. peer object). + * (i.e. Python SWIG wrapper of this Micropolis object.) + */ + void *userData; + + /** + * Check that the given coordinate is within world bounds + * @param wx World x coordinate + * @param wy World y coordinate + * @return Boolean indicating (wx, wy) is inside the world bounds + */ + static inline bool testBounds(int wx, int wy) + { + return (wx >= 0 && wx < WORLD_W && wy >= 0 && wy < WORLD_H); + }; + + void spend(int dollars); + + void setFunds(int dollars); + + Quad tickCount(); + + Ptr newPtr(int size); + + void freePtr(void *data); + + void doStartScenario(int scenario); + + void doStartGame(); + + void initGame(); + + void doEarthquake(int strength); + + void invalidateMaps(); + + void makeSound( + const std::string &channel, + const std::string &sound, + int x = -1, + int y = -1); + + // Map + + int getTile(int x, int y); + + void setTile(int x, int y, int tile); + + void *getMapBuffer(); + + // Residential. + + // Commercial. + + // Industrial. + + // Power. + + int getPowerGrid(int x, int y); + + void setPowerGrid(int x, int y, int power); + + void *getPowerGridMapBuffer(); + + // Roads. + + // Population density. + + int getPopulationDensity(int x, int y); + + void setPopulationDensity(int x, int y, int density); + + void *getPopulationDensityMapBuffer(); + + // Rate of growth. + + int getRateOfGrowth(int x, int y); + + void setRateOfGrowth(int x, int y, int rate); + + void *getRateOfGrowthMapBuffer(); + + // Traffic density. + + int getTrafficDensity(int x, int y); + + void setTrafficDensity(int x, int y, int density); + + void *getTrafficDensityMapBuffer(); + + // Pollution density. + + int getPollutionDensity(int x, int y); + + void setPollutionDensity(int x, int y, int density); + + void *getPollutionDensityMapBuffer(); + + // Crime rate. + + int getCrimeRate(int x, int y); + + void setCrimeRate(int x, int y, int rate); + + void *getCrimeRateMapBuffer(); + + // Land value. + + int getLandValue(int x, int y); + + void setLandValue(int x, int y, int value); + + void *getLandValueMapBuffer(); + + // Fire coverage. + + int getFireCoverage(int x, int y); + + void setFireCoverage(int x, int y, int coverage); + + void *getFireCoverageMapBuffer(); + + // Police coverage. + + int getPoliceCoverage(int x, int y); + + void setPoliceCoverage(int x, int y, int coverage); + + void *getPoliceCoverageMapBuffer(); + + //////////////////////////////////////////////////////////////////////// + // tool.cpp + +public: + ToolResult doTool(EditingTool tool, short tileX, short tileY); + + void toolDown(EditingTool tool, short tileX, short tileY); + + void toolDrag(EditingTool tool, short fromX, short fromY, + short toX, short toY); + + void didTool(std::string name, short x, short y); + +private: + ToolResult queryTool(short x, short y); + + ToolResult bulldozerTool(short x, short y); + ToolResult bulldozerTool(short x, short y, ToolEffects *effects); + + ToolResult roadTool(short x, short y, ToolEffects *effects); + + ToolResult railroadTool(short x, short y, ToolEffects *effects); + + ToolResult wireTool(short x, short y, ToolEffects *effects); + + ToolResult parkTool(short x, short y, ToolEffects *effects); + + ToolResult buildBuildingTool(short x, short y, + const BuildingProperties *bprops, + ToolEffects *effects); + + ToolResult networkTool(short x, short y, ToolEffects *effects); + + ToolResult waterTool(short x, short y, ToolEffects *effects); + + ToolResult landTool(short x, short y, ToolEffects *effects); + + ToolResult forestTool(short x, short y, ToolEffects *effects); + + ToolResult putDownPark(short mapH, short mapV, ToolEffects *effects); + + ToolResult putDownNetwork(short mapH, short mapV, ToolEffects *effects); + + ToolResult putDownWater(short mapH, short mapV, ToolEffects *effects); + + ToolResult putDownLand(short mapH, short mapV, ToolEffects *effects); + + ToolResult putDownForest(short mapH, short mapV, ToolEffects *effects); + + void doZoneStatus(short mapH, short mapV); + + void doShowZoneStatus( + int tileCategoryIndex, + int populationDensityIndex, + int landValueIndex, + int crimeRateIndex, + int pollutionIndex, + int growthRateIndex, + int x, + int y); + + void putBuilding(int leftX, int topY, int sizeX, int sizeY, + MapTile baseTile, bool aniFlag, + ToolEffects *effects); + + ToolResult prepareBuildingSite(int leftX, int topY, int sizeX, int sizeY, + ToolEffects *effects); + + ToolResult buildBuilding(int mapH, int mapV, + const BuildingProperties *bprops, + ToolEffects *effects); + + int getDensity(short catNo, short mapH, short mapV); + + bool tally(short tileValue); + + short checkSize(short tileValue); + + void checkBorder(short xMap, short yMap, int sizeX, int sizeY, + ToolEffects *effects); + + void putRubble(int x, int y, int size, ToolEffects *effects); + + //////////////////////////////////////////////////////////////////////// + // traffic.cpp + +public: + short makeTrafficAt(int x, int y, ZoneType dest); + + short makeTraffic(int x, int y, ZoneType dest); + +private: + short makeTraffic(const Position &startPos, ZoneType dest); + + /* Position stack */ + + /** Position stack top pointer, points to top position. */ + short curMapStackPointer; + Position curMapStackXY[MAX_TRAFFIC_DISTANCE + 1]; ///< Position stack. + + short trafMaxX; ///< X coordinate of a position with heavy traffic + short trafMaxY; ///< Y coordinate of a position with heavy traffic + + void addToTrafficDensityMap(); + + void pushPos(const Position &pos); + + Position pullPos(); + + bool findPerimeterRoad(Position *pos); + + bool findPerimeterTelecom(const Position &pos); + + bool tryDrive(const Position &startPos, ZoneType destZone); + + Direction2 tryGo(const Position &pos, Direction2 dirLast); + + MapTile getTileFromMap(const Position &pos, + Direction2 dir, MapTile defaultTile); + + bool driveDone(const Position &pos, ZoneType destZone); + + bool roadTest(MapValue tile); + + //////////////////////////////////////////////////////////////////////// + // update.cpp + +public: + bool mustUpdateFunds; + + bool mustUpdateOptions; ///< Options displayed at user need updating. + + Quad cityTimeLast; + + Quad cityYearLast; + + Quad cityMonthLast; + + Quad totalFundsLast; + + Quad resLast; + + Quad comLast; + + Quad indLast; + + void doUpdateHeads(); + + void updateMaps(); + + void updateGraphs(); + + void updateEvaluation(); + + void updateHeads(); + + void updateFunds(); + + void reallyUpdateFunds(); + + void doTimeStuff(); + + void updateDate(); + + void showValves(); + + void drawValve(); + + void setDemand(float r, float c, float i); + + void updateOptions(); + + void updateUserInterface(); + + //////////////////////////////////////////////////////////////////////// + // utilities.cpp + +public: + void pause(); + + void resume(); + + void setSpeed(short speed); + + void setPasses(int passes); + + void setGameLevelFunds(GameLevel level); + + void setGameLevel(GameLevel level); + + void updateGameLevel(); + + void setCityName(const std::string &name); + + void setCleanCityName(const std::string &name); + + void setYear(int year); + + int currentYear(); + + void doNewGame(); + + void setEnableDisasters(bool value); + + void setAutoBudget(bool value); + + void setAutoBulldoze(bool value); + + void setAutoGoto(bool value); + + void setEnableSound(bool value); + + void setDoAnimation(bool value); + + void setDoMessages(bool value); + + void setDoNotices(bool value); + +#ifdef SWIG +// This tells SWIG that resDemandResult, comDemandResult and indDemandResult +// are output parameters, which will be returned in a tuple of length three. +%apply float *OUTPUT { float *resDemandResult }; +%apply float *OUTPUT { float *comDemandResult }; +%apply float *OUTPUT { float *indDemandResult }; +#endif + + void getDemands( + float *resDemandResult, + float *comDemandResult, + float *indDemandResult); + +private: + std::string makeDollarDecimalStr(const std::string &numStr); + + //////////////////////////////////////////////////////////////////////// + // zone.cpp + +private: + void doZone(const Position &pos); + + void doHospitalChurch(const Position &pos); + + void setSmoke(const Position &pos, bool zonePower); + + void makeHospital(const Position &pos); + + short getLandPollutionValue(const Position &pos); + + void incRateOfGrowth(const Position &pos, int amount); + + bool zonePlop(const Position &pos, int base); + + short doFreePop(const Position &pos); + + bool setZonePower(const Position &pos); + + void buildHouse(const Position &pos, int value); + + short evalLot(int x, int y); + + void doResidential(const Position &pos, bool zonePower); + + void doResIn(const Position &pos, int pop, int value); + + void doResOut(const Position &pos, int pop, int value); + + short getResZonePop(MapTile mapTile); + + void resPlop(const Position &pos, int Den, int Value); + + short evalRes(const Position &pos, int traf); + + // Commercial zone handling + + void doCommercial(const Position &pos, bool zonePower); + + void doComIn(const Position &pos, int pop, int value); + + void doComOut(const Position &pos, int pop, int value); + + short getComZonePop(MapTile tile); + + void comPlop(const Position &pos, int Den, int Value); + + short evalCom(const Position &pos, int traf); + + // Industrial zone handling + + void doIndustrial(const Position &pos, bool zonePower); + + void doIndIn(const Position &pos, int pop, int value); + + void doIndOut(const Position &pos, int pop, int value); + + short getIndZonePop(MapTile tile); + + void indPlop(const Position &pos, int den, int value); + + short evalInd(int traf); + + //////////////////////////////////////////////////////////////////////// +}; + +//////////////////////////////////////////////////////////////////////// + +#endif diff --git a/core/micropolisengine_lib.js b/core/micropolisengine_lib.js new file mode 100644 index 0000000..8194297 --- /dev/null +++ b/core/micropolisengine_lib.js @@ -0,0 +1 @@ +// micropolisengine_lib.js diff --git a/core/micropolisengine_template.html b/core/micropolisengine_template.html new file mode 100644 index 0000000..d302809 --- /dev/null +++ b/core/micropolisengine_template.html @@ -0,0 +1,13 @@ + + + + + Micropolis Engine + + + + {{{ SCRIPT }}} + + diff --git a/core/position.cpp b/core/position.cpp new file mode 100644 index 0000000..19564c6 --- /dev/null +++ b/core/position.cpp @@ -0,0 +1,238 @@ +/* position.cpp + * + * Micropolis, Unix Version. This game was released for the Unix platform + * in or about 1990 and has been modified for inclusion in the One Laptop + * Per Child program. Copyright (C) 1989 - 2007 Electronic Arts Inc. If + * you need assistance with this program, you may contact: + * http://wiki.laptop.org/go/Micropolis or email micropolis@laptop.org. + * + * This program 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. + * + * This program 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 this program. If + * not, see . + * + * ADDITIONAL TERMS per GNU GPL Section 7 + * + * No trademark or publicity rights are granted. This license does NOT + * give you any right, title or interest in the trademark SimCity or any + * other Electronic Arts trademark. You may not distribute any + * modification of this program using the trademark SimCity or claim any + * affliation or association with Electronic Arts Inc. or its employees. + * + * Any propagation or conveyance of this program must include this + * copyright notice and these terms. + * + * If you convey this program (or any modifications of it) and assume + * contractual liability for the program to recipients of it, you agree + * to indemnify Electronic Arts for any liability that those contractual + * assumptions impose on Electronic Arts. + * + * You may not misrepresent the origins of this program; modified + * versions of the program must be marked as such and not identified as + * the original program. + * + * This disclaimer supplements the one included in the General Public + * License. TO THE FULLEST EXTENT PERMISSIBLE UNDER APPLICABLE LAW, THIS + * PROGRAM IS PROVIDED TO YOU "AS IS," WITH ALL FAULTS, WITHOUT WARRANTY + * OF ANY KIND, AND YOUR USE IS AT YOUR SOLE RISK. THE ENTIRE RISK OF + * SATISFACTORY QUALITY AND PERFORMANCE RESIDES WITH YOU. ELECTRONIC ARTS + * DISCLAIMS ANY AND ALL EXPRESS, IMPLIED OR STATUTORY WARRANTIES, + * INCLUDING IMPLIED WARRANTIES OF MERCHANTABILITY, SATISFACTORY QUALITY, + * FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT OF THIRD PARTY + * RIGHTS, AND WARRANTIES (IF ANY) ARISING FROM A COURSE OF DEALING, + * USAGE, OR TRADE PRACTICE. ELECTRONIC ARTS DOES NOT WARRANT AGAINST + * INTERFERENCE WITH YOUR ENJOYMENT OF THE PROGRAM; THAT THE PROGRAM WILL + * MEET YOUR REQUIREMENTS; THAT OPERATION OF THE PROGRAM WILL BE + * UNINTERRUPTED OR ERROR-FREE, OR THAT THE PROGRAM WILL BE COMPATIBLE + * WITH THIRD PARTY SOFTWARE OR THAT ANY ERRORS IN THE PROGRAM WILL BE + * CORRECTED. NO ORAL OR WRITTEN ADVICE PROVIDED BY ELECTRONIC ARTS OR + * ANY AUTHORIZED REPRESENTATIVE SHALL CREATE A WARRANTY. SOME + * JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF OR LIMITATIONS ON IMPLIED + * WARRANTIES OR THE LIMITATIONS ON THE APPLICABLE STATUTORY RIGHTS OF A + * CONSUMER, SO SOME OR ALL OF THE ABOVE EXCLUSIONS AND LIMITATIONS MAY + * NOT APPLY TO YOU. + */ + +/** + * @file position.cpp + * @brief Defines the Position class for coordinate handling in + * Micropolis. + * + * This file provides the implementation of the Position class, which + * is used throughout the Micropolis game engine for managing x and y + * coordinates. It includes various constructors for different + * scenarios, a copy constructor, an assignment operator, and a method + * for moving the position in a specified direction. + */ + + +///////////////////////////////////////////////////////////////////////////// + + +#include "micropolis.h" + + +///////////////////////////////////////////////////////////////////////////// + + +/** Default constructor. */ +Position::Position() +{ + this->posX = 0; + this->posY = 0; +} + + +/** + * Construct a position at a given \a x and \a y coordinate. + * @param x X coordinate of the new position. + * @param y Y coordinate of the new position. + */ +Position::Position(int x, int y) +{ + this->posX = x; + this->posY = y; +} + + +/** + * Copy constructor. + * @param pos Position to copy. + */ +Position::Position(const Position &pos) +{ + this->posX = pos.posX; + this->posY = pos.posY; +} + + +/** + * Copy constructor with a single tile movement. + * @param pos Position to copy. + * @param dir Direction to move into. + */ +Position::Position(const Position &pos, Direction2 dir) +{ + this->posX = pos.posX; + this->posY = pos.posY; + this->move(dir); +} + + +/** + * Copy constructor with arbitrary movement. + * @param pos Position to copy. + * @param dx Horizontal offset. + * @param dy Vertical offset. + */ +Position::Position(const Position &pos, int dx, int dy) +{ + this->posX = pos.posX + dx; + this->posY = pos.posY + dy; +} + + +/** + * Assignment operator. + * @param pos Position to copy. + */ +Position &Position::operator=(const Position &pos) +{ + if (this != &pos) { + this->posX = pos.posX; + this->posY = pos.posY; + } + return *this; +} + + +/** + * Move the position one step in the indicated direction. + * @param dir Direction to move into. + * @return Position moved in the indicated direction. + */ +bool Position::move(Direction2 dir) +{ + switch (dir) { + case DIR2_INVALID: + return true; + + case DIR2_NORTH: + if (this->posY > 0) { + this->posY--; + return true; + } + break; + + case DIR2_NORTH_EAST: + if (this->posX < WORLD_W - 1 && this->posY > 0) { + this->posX++; + this->posY--; + return true; + } + case DIR2_EAST: + if (this->posX < WORLD_W - 1) { + this->posX++; + return true; + } + break; + + case DIR2_SOUTH_EAST: + if (this->posX < WORLD_W -1 && this->posY < WORLD_H - 1) { + this->posX++; + this->posY++; + return true; + } + break; + + case DIR2_SOUTH: + if (this->posY < WORLD_H - 1) { + this->posY++; + return true; + } + break; + + case DIR2_SOUTH_WEST: this->posX--; this->posY++; break; + if (this->posX > 0 && this->posY < WORLD_H - 1) { + this->posX--; + this->posY++; + return true; + } + break; + + case DIR2_WEST: + if (this->posX > 0) { + this->posX--; + return true; + } + break; + + case DIR2_NORTH_WEST: + if (this->posX > 0 && this->posY > 0) { + this->posX--; + this->posY--; + return true; + } + break; + + + default: NOT_REACHED(); + } + + // Movement was not possible, silently repair the position. + if (this->posX < 0) this->posX = 0; + if (this->posX >= WORLD_W) this->posX = WORLD_W - 1; + if (this->posY < 0) this->posY = 0; + if (this->posY >= WORLD_H) this->posY = WORLD_H - 1; + return false; +} + + +///////////////////////////////////////////////////////////////////////////// diff --git a/core/position.h b/core/position.h new file mode 100644 index 0000000..f424d00 --- /dev/null +++ b/core/position.h @@ -0,0 +1,197 @@ +/* position.h + * + * Micropolis, Unix Version. This game was released for the Unix platform + * in or about 1990 and has been modified for inclusion in the One Laptop + * Per Child program. Copyright (C) 1989 - 2007 Electronic Arts Inc. If + * you need assistance with this program, you may contact: + * http://wiki.laptop.org/go/Micropolis or email micropolis@laptop.org. + * + * This program 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. + * + * This program 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 this program. If + * not, see . + * + * ADDITIONAL TERMS per GNU GPL Section 7 + * + * No trademark or publicity rights are granted. This license does NOT + * give you any right, title or interest in the trademark SimCity or any + * other Electronic Arts trademark. You may not distribute any + * modification of this program using the trademark SimCity or claim any + * affliation or association with Electronic Arts Inc. or its employees. + * + * Any propagation or conveyance of this program must include this + * copyright notice and these terms. + * + * If you convey this program (or any modifications of it) and assume + * contractual liability for the program to recipients of it, you agree + * to indemnify Electronic Arts for any liability that those contractual + * assumptions impose on Electronic Arts. + * + * You may not misrepresent the origins of this program; modified + * versions of the program must be marked as such and not identified as + * the original program. + * + * This disclaimer supplements the one included in the General Public + * License. TO THE FULLEST EXTENT PERMISSIBLE UNDER APPLICABLE LAW, THIS + * PROGRAM IS PROVIDED TO YOU "AS IS," WITH ALL FAULTS, WITHOUT WARRANTY + * OF ANY KIND, AND YOUR USE IS AT YOUR SOLE RISK. THE ENTIRE RISK OF + * SATISFACTORY QUALITY AND PERFORMANCE RESIDES WITH YOU. ELECTRONIC ARTS + * DISCLAIMS ANY AND ALL EXPRESS, IMPLIED OR STATUTORY WARRANTIES, + * INCLUDING IMPLIED WARRANTIES OF MERCHANTABILITY, SATISFACTORY QUALITY, + * FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT OF THIRD PARTY + * RIGHTS, AND WARRANTIES (IF ANY) ARISING FROM A COURSE OF DEALING, + * USAGE, OR TRADE PRACTICE. ELECTRONIC ARTS DOES NOT WARRANT AGAINST + * INTERFERENCE WITH YOUR ENJOYMENT OF THE PROGRAM; THAT THE PROGRAM WILL + * MEET YOUR REQUIREMENTS; THAT OPERATION OF THE PROGRAM WILL BE + * UNINTERRUPTED OR ERROR-FREE, OR THAT THE PROGRAM WILL BE COMPATIBLE + * WITH THIRD PARTY SOFTWARE OR THAT ANY ERRORS IN THE PROGRAM WILL BE + * CORRECTED. NO ORAL OR WRITTEN ADVICE PROVIDED BY ELECTRONIC ARTS OR + * ANY AUTHORIZED REPRESENTATIVE SHALL CREATE A WARRANTY. SOME + * JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF OR LIMITATIONS ON IMPLIED + * WARRANTIES OR THE LIMITATIONS ON THE APPLICABLE STATUTORY RIGHTS OF A + * CONSUMER, SO SOME OR ALL OF THE ABOVE EXCLUSIONS AND LIMITATIONS MAY + * NOT APPLY TO YOU. + */ + +/** + * @file position.h + * @brief Defines position handling and direction enumeration for the + * Micropolis game engine. + * + * This header file provides classes and functions for handling + * positions and directions within the Micropolis game world. It + * includes the 'Position' class for representing X/Y coordinates and + * 'Direction2' enumeration for defining 8 cardinal directions. + * Functions for manipulating and querying these positions and + * directions are also provided, which are essential for navigating + * and interacting with the game world's grid. + */ + + +#ifndef H_POSITION +#define H_POSITION + + +/** Another direction enumeration class, with 8 possible directions. + * @todo Eliminate #Direction. + * @todo After eliminating #Direction, rename this enum to Direction. + */ +enum Direction2 { + DIR2_INVALID, ///< Invalid direction. + DIR2_NORTH, ///< Direction pointing north. + DIR2_NORTH_EAST, ///< Direction pointing north-east. + DIR2_EAST, ///< Direction pointing east. + DIR2_SOUTH_EAST, ///< Direction pointing south-east. + DIR2_SOUTH, ///< Direction pointing south. + DIR2_SOUTH_WEST, ///< Direction pointing south-west. + DIR2_WEST, ///< Direction pointing west. + DIR2_NORTH_WEST, ///< Direction pointing north-west. + + DIR2_BEGIN = DIR2_NORTH, ///< First valid direction. + DIR2_END = DIR2_NORTH_WEST + 1, ///< End-condition for directions +}; + +/** + * Increment the direction by 45 degrees. + * @param dir Direction to rotate. + * @return Rotated direction, possibly >= DIR2_END. + */ +static inline Direction2 increment45(Direction2 dir, int count = 1) +{ + return (Direction2)(dir + count); +} + + +/** + * Increment the direction by 90 degrees. + * @param dir Direction to rotate. + * @return Rotated direction, possibly >= DIR2_END. + */ +static inline Direction2 increment90(Direction2 dir) +{ + return increment45(dir, 2); +} + +/** + * Increment the direction by 45 degrees. + * @param dir Direction to rotate. + * @return Rotated direction. + */ +static inline Direction2 rotate45(Direction2 dir, int count = 1) +{ + return (Direction2)(((dir - DIR2_NORTH + count) & 7) + DIR2_NORTH); +} + +/** + * Rotate the direction by 90 degrees. + * @param dir Direction to rotate. + * @return Rotated direction. + */ +static inline Direction2 rotate90(Direction2 dir) +{ + return rotate45(dir, 2); +} + +/** + * Rotate the direction by 180 degrees. + * @param dir Direction to rotate. + * @return Rotated direction. + */ +static inline Direction2 rotate180(Direction2 dir) +{ + return rotate45(dir, 4); +} + + +/** X/Y position. */ +class Position { + +public: + + Position(); + Position(int x, int y); + Position(const Position &pos); + Position(const Position &pos, Direction2 dir); + Position(const Position &pos, int dx, int dy); + Position &operator=(const Position &pos); + + bool move(Direction2 dir); + inline bool testBounds(); + + int posX; ///< Horizontal coordinate of the position. + int posY; ///< Vertical coordnate of the position. +}; + + +/** + * Test whether the position is on-map. + * @return Position is on-map. + */ +inline bool Position::testBounds() +{ + return (this->posX >= 0 && this->posX < WORLD_W + && this->posY >= 0 && this->posY < WORLD_H); +} + +/** + * Less-than comparison on positions (needed for map since Position is used as + * key value). + * @param pos1 First position. + * @param pos2 Second position. + * @return First position is smaller than second position. + */ +inline bool operator<(const Position &pos1, const Position &pos2) +{ + if (pos1.posX != pos2.posX) return pos1.posX < pos2.posX; + return pos1.posY < pos2.posY; +} + + +#endif diff --git a/core/power.cpp b/core/power.cpp new file mode 100644 index 0000000..18db0ac --- /dev/null +++ b/core/power.cpp @@ -0,0 +1,195 @@ +/* power.cpp + * + * Micropolis, Unix Version. This game was released for the Unix platform + * in or about 1990 and has been modified for inclusion in the One Laptop + * Per Child program. Copyright (C) 1989 - 2007 Electronic Arts Inc. If + * you need assistance with this program, you may contact: + * http://wiki.laptop.org/go/Micropolis or email micropolis@laptop.org. + * + * This program 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. + * + * This program 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 this program. If + * not, see . + * + * ADDITIONAL TERMS per GNU GPL Section 7 + * + * No trademark or publicity rights are granted. This license does NOT + * give you any right, title or interest in the trademark SimCity or any + * other Electronic Arts trademark. You may not distribute any + * modification of this program using the trademark SimCity or claim any + * affliation or association with Electronic Arts Inc. or its employees. + * + * Any propagation or conveyance of this program must include this + * copyright notice and these terms. + * + * If you convey this program (or any modifications of it) and assume + * contractual liability for the program to recipients of it, you agree + * to indemnify Electronic Arts for any liability that those contractual + * assumptions impose on Electronic Arts. + * + * You may not misrepresent the origins of this program; modified + * versions of the program must be marked as such and not identified as + * the original program. + * + * This disclaimer supplements the one included in the General Public + * License. TO THE FULLEST EXTENT PERMISSIBLE UNDER APPLICABLE LAW, THIS + * PROGRAM IS PROVIDED TO YOU "AS IS," WITH ALL FAULTS, WITHOUT WARRANTY + * OF ANY KIND, AND YOUR USE IS AT YOUR SOLE RISK. THE ENTIRE RISK OF + * SATISFACTORY QUALITY AND PERFORMANCE RESIDES WITH YOU. ELECTRONIC ARTS + * DISCLAIMS ANY AND ALL EXPRESS, IMPLIED OR STATUTORY WARRANTIES, + * INCLUDING IMPLIED WARRANTIES OF MERCHANTABILITY, SATISFACTORY QUALITY, + * FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT OF THIRD PARTY + * RIGHTS, AND WARRANTIES (IF ANY) ARISING FROM A COURSE OF DEALING, + * USAGE, OR TRADE PRACTICE. ELECTRONIC ARTS DOES NOT WARRANT AGAINST + * INTERFERENCE WITH YOUR ENJOYMENT OF THE PROGRAM; THAT THE PROGRAM WILL + * MEET YOUR REQUIREMENTS; THAT OPERATION OF THE PROGRAM WILL BE + * UNINTERRUPTED OR ERROR-FREE, OR THAT THE PROGRAM WILL BE COMPATIBLE + * WITH THIRD PARTY SOFTWARE OR THAT ANY ERRORS IN THE PROGRAM WILL BE + * CORRECTED. NO ORAL OR WRITTEN ADVICE PROVIDED BY ELECTRONIC ARTS OR + * ANY AUTHORIZED REPRESENTATIVE SHALL CREATE A WARRANTY. SOME + * JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF OR LIMITATIONS ON IMPLIED + * WARRANTIES OR THE LIMITATIONS ON THE APPLICABLE STATUTORY RIGHTS OF A + * CONSUMER, SO SOME OR ALL OF THE ABOVE EXCLUSIONS AND LIMITATIONS MAY + * NOT APPLY TO YOU. + */ + +/** + * @file power.cpp + * @brief Manages power distribution in the Micropolis game. + * + * This file contains functions for scanning the game map to + * distribute power from power plants to other structures. It utilizes + * a power stack to track and update the power status of tiles. The + * file includes constants for the power strength of coal and nuclear + * power plants, and functions to test for conductive tiles, scan the + * map for power distribution, and manipulate the power stack. + */ + + +//////////////////////////////////////////////////////////////////////// + + +#include "micropolis.h" +#include "text.h" + +//////////////////////////////////////////////////////////////////////// +// Constants + +/** Number of tiles that a coal power plant can supply power to. */ +static const Quad COAL_POWER_STRENGTH = 700L; + +/** Number of tiles that a nuclear power plant can supply power to. */ +static const Quad NUCLEAR_POWER_STRENGTH = 2000L; + + +//////////////////////////////////////////////////////////////////////// + + +/** + * Check at position \a pos for a power-less conducting tile in the + * direction \a testDir. + * @param pos Position to start from. + * @param testDir Direction to investigate. + * @return Unpowered tile has been found in the indicated direction. + * @todo Re-use something like Micropolis::getFromMap(), and fold this function + * into its caller. + */ +bool Micropolis::testForConductive(const Position& pos, Direction2 testDir) +{ + Position movedPos(pos); + + if (movedPos.move(testDir)) { + if ((map[movedPos.posX][movedPos.posY] & CONDBIT) == CONDBIT) { + if (!powerGridMap.worldGet(movedPos.posX, movedPos.posY)) { + return true; + } + } + } + + return false; +} + + +/** + * Scan the map for powered tiles, and copy them to the Micropolis::powerGridMap + * array. + * Also warns the user about using too much power ('buy another power plant'). + */ +void Micropolis::doPowerScan() +{ + Direction2 anyDir,dir; + int conNum; + + // Clear power map. + powerGridMap.clear(); + + // Power that the combined coal and nuclear power plants can deliver. + Quad maxPower = coalPowerPop * COAL_POWER_STRENGTH + + nuclearPowerPop * NUCLEAR_POWER_STRENGTH; + + Quad numPower = 0; // Amount of power used. + + while (powerStackPointer > 0) { + Position pos = pullPowerStack(); + anyDir = DIR2_INVALID; + do { + numPower++; + if (numPower > maxPower) { + sendMessage(MESSAGE_NOT_ENOUGH_POWER); + return; + } + if (anyDir != DIR2_INVALID) { + pos.move(anyDir); + } + powerGridMap.worldSet(pos.posX, pos.posY, 1); + conNum = 0; + dir = DIR2_BEGIN; + while (dir < DIR2_END && conNum < 2) { + if (testForConductive(pos, dir)) { + conNum++; + anyDir = dir; + } + dir = increment90(dir); + } + if (conNum > 1) { + pushPowerStack(pos); + } + } while (conNum); + } +} + + +/** + * Push position \a pos onto the power stack if there is room. + * @param pos Position to push. + */ +void Micropolis::pushPowerStack(const Position &pos) +{ + if (powerStackPointer < (POWER_STACK_SIZE - 2)) { + powerStackPointer++; + powerStackXY[powerStackPointer] = pos; + } +} + + +/** + * Pull a position from the power stack. + * @return Pulled position. + * @pre Stack must be non-empty (powerStackPointer > 0). + */ +Position Micropolis::pullPowerStack() +{ + assert(powerStackPointer > 0); + powerStackPointer--; + return powerStackXY[powerStackPointer + 1]; +} + + +//////////////////////////////////////////////////////////////////////// diff --git a/core/random.cpp b/core/random.cpp new file mode 100644 index 0000000..e701cf5 --- /dev/null +++ b/core/random.cpp @@ -0,0 +1,183 @@ +/* random.cpp + * + * Micropolis, Unix Version. This game was released for the Unix platform + * in or about 1990 and has been modified for inclusion in the One Laptop + * Per Child program. Copyright (C) 1989 - 2007 Electronic Arts Inc. If + * you need assistance with this program, you may contact: + * http://wiki.laptop.org/go/Micropolis or email micropolis@laptop.org. + * + * This program 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. + * + * This program 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 this program. If + * not, see . + * + * ADDITIONAL TERMS per GNU GPL Section 7 + * + * No trademark or publicity rights are granted. This license does NOT + * give you any right, title or interest in the trademark SimCity or any + * other Electronic Arts trademark. You may not distribute any + * modification of this program using the trademark SimCity or claim any + * affliation or association with Electronic Arts Inc. or its employees. + * + * Any propagation or conveyance of this program must include this + * copyright notice and these terms. + * + * If you convey this program (or any modifications of it) and assume + * contractual liability for the program to recipients of it, you agree + * to indemnify Electronic Arts for any liability that those contractual + * assumptions impose on Electronic Arts. + * + * You may not misrepresent the origins of this program; modified + * versions of the program must be marked as such and not identified as + * the original program. + * + * This disclaimer supplements the one included in the General Public + * License. TO THE FULLEST EXTENT PERMISSIBLE UNDER APPLICABLE LAW, THIS + * PROGRAM IS PROVIDED TO YOU "AS IS," WITH ALL FAULTS, WITHOUT WARRANTY + * OF ANY KIND, AND YOUR USE IS AT YOUR SOLE RISK. THE ENTIRE RISK OF + * SATISFACTORY QUALITY AND PERFORMANCE RESIDES WITH YOU. ELECTRONIC ARTS + * DISCLAIMS ANY AND ALL EXPRESS, IMPLIED OR STATUTORY WARRANTIES, + * INCLUDING IMPLIED WARRANTIES OF MERCHANTABILITY, SATISFACTORY QUALITY, + * FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT OF THIRD PARTY + * RIGHTS, AND WARRANTIES (IF ANY) ARISING FROM A COURSE OF DEALING, + * USAGE, OR TRADE PRACTICE. ELECTRONIC ARTS DOES NOT WARRANT AGAINST + * INTERFERENCE WITH YOUR ENJOYMENT OF THE PROGRAM; THAT THE PROGRAM WILL + * MEET YOUR REQUIREMENTS; THAT OPERATION OF THE PROGRAM WILL BE + * UNINTERRUPTED OR ERROR-FREE, OR THAT THE PROGRAM WILL BE COMPATIBLE + * WITH THIRD PARTY SOFTWARE OR THAT ANY ERRORS IN THE PROGRAM WILL BE + * CORRECTED. NO ORAL OR WRITTEN ADVICE PROVIDED BY ELECTRONIC ARTS OR + * ANY AUTHORIZED REPRESENTATIVE SHALL CREATE A WARRANTY. SOME + * JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF OR LIMITATIONS ON IMPLIED + * WARRANTIES OR THE LIMITATIONS ON THE APPLICABLE STATUTORY RIGHTS OF A + * CONSUMER, SO SOME OR ALL OF THE ABOVE EXCLUSIONS AND LIMITATIONS MAY + * NOT APPLY TO YOU. + */ + +/** + * @file random.cpp + * @brief Contains functions for generating random numbers in + * Micropolis. + * + * This file includes functions for generating random numbers used in + * various aspects of the Micropolis game. It provides functions for + * generating random numbers within specific ranges, signed and + * unsigned random numbers, and a method to initialize the random + * number generator with a random seed. + * + * @bug Code seems to assume that \c sizeof(short)==2 and \c + * sizeof(int)==4 However, this depends on the compiler. We should + * introduce typedefs for them, and check correctness of our + * assumptions w.r.t. size of them (eg in + * Micropolis::randomlySeedRandom() or in Micropolis::Micropolis()). + * + * @bug Code stores unsigned 16 bit numbers in \c short which is a + * signed type. + */ + +//////////////////////////////////////////////////////////////////////// + + +#include "micropolis.h" + + +//////////////////////////////////////////////////////////////////////// + + +/** + * Draw a random number (internal function). + * @todo Use Wolfram's fast cellular automata pseudo random number generator. + * @return Unsigned 16 bit random number. + */ +int Micropolis::simRandom() +{ + nextRandom = nextRandom * 1103515245 + 12345; + return (nextRandom & 0xffff00) >> 8; +} + + +/** + * Draw a random number in a given range. + * @param range Upper bound of the range (inclusive). + * @return Random number between \c 0 and \a range (inclusive). + */ +short Micropolis::getRandom(short range) +{ + int maxMultiple, rnum; + + range++; /// @bug Increment may cause range overflow. + maxMultiple = 0xffff / range; + maxMultiple *= range; + + do { + rnum = getRandom16(); + } while (rnum >= maxMultiple); + + return (rnum % range); +} + + +/** + * Get random 16 bit number. + * @return Unsigned 16 bit random number. + */ +int Micropolis::getRandom16() +{ + return simRandom() & 0x0000ffff; +} + + +/** Get signed 16 bit random number. */ +int Micropolis::getRandom16Signed() +{ + int i = getRandom16(); + + if (i > 0x7fff) { + i = 0x7fff - i; + } + + return i; +} + + +/** + * Get a random number within a given range, with a preference to smaller + * values. + * @param limit Upper bound of the range (inclusive). + * @return Random number between \c 0 and \a limit (inclusive). + */ +short Micropolis::getERandom(short limit) +{ + short z = getRandom(limit); + short x = getRandom(limit); + + return min(z, x); +} + + +/** Initialize the random number generator with a 'random' seed. */ +void Micropolis::randomlySeedRandom() +{ + struct timeval time; + gettimeofday(&time, NULL); + seedRandom(time.tv_usec ^ time.tv_sec); +} + + +/** + * Set seed of the random number generator. + * @param seed New seed. + */ +void Micropolis::seedRandom(int seed) +{ + nextRandom = seed; +} + + +//////////////////////////////////////////////////////////////////////// diff --git a/core/scan.cpp b/core/scan.cpp new file mode 100644 index 0000000..4b4e3a6 --- /dev/null +++ b/core/scan.cpp @@ -0,0 +1,600 @@ +/* scan.cpp + * + * Micropolis, Unix Version. This game was released for the Unix platform + * in or about 1990 and has been modified for inclusion in the One Laptop + * Per Child program. Copyright (C) 1989 - 2007 Electronic Arts Inc. If + * you need assistance with this program, you may contact: + * http://wiki.laptop.org/go/Micropolis or email micropolis@laptop.org. + * + * This program 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. + * + * This program 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 this program. If + * not, see . + * + * ADDITIONAL TERMS per GNU GPL Section 7 + * + * No trademark or publicity rights are granted. This license does NOT + * give you any right, title or interest in the trademark SimCity or any + * other Electronic Arts trademark. You may not distribute any + * modification of this program using the trademark SimCity or claim any + * affliation or association with Electronic Arts Inc. or its employees. + * + * Any propagation or conveyance of this program must include this + * copyright notice and these terms. + * + * If you convey this program (or any modifications of it) and assume + * contractual liability for the program to recipients of it, you agree + * to indemnify Electronic Arts for any liability that those contractual + * assumptions impose on Electronic Arts. + * + * You may not misrepresent the origins of this program; modified + * versions of the program must be marked as such and not identified as + * the original program. + * + * This disclaimer supplements the one included in the General Public + * License. TO THE FULLEST EXTENT PERMISSIBLE UNDER APPLICABLE LAW, THIS + * PROGRAM IS PROVIDED TO YOU "AS IS," WITH ALL FAULTS, WITHOUT WARRANTY + * OF ANY KIND, AND YOUR USE IS AT YOUR SOLE RISK. THE ENTIRE RISK OF + * SATISFACTORY QUALITY AND PERFORMANCE RESIDES WITH YOU. ELECTRONIC ARTS + * DISCLAIMS ANY AND ALL EXPRESS, IMPLIED OR STATUTORY WARRANTIES, + * INCLUDING IMPLIED WARRANTIES OF MERCHANTABILITY, SATISFACTORY QUALITY, + * FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT OF THIRD PARTY + * RIGHTS, AND WARRANTIES (IF ANY) ARISING FROM A COURSE OF DEALING, + * USAGE, OR TRADE PRACTICE. ELECTRONIC ARTS DOES NOT WARRANT AGAINST + * INTERFERENCE WITH YOUR ENJOYMENT OF THE PROGRAM; THAT THE PROGRAM WILL + * MEET YOUR REQUIREMENTS; THAT OPERATION OF THE PROGRAM WILL BE + * UNINTERRUPTED OR ERROR-FREE, OR THAT THE PROGRAM WILL BE COMPATIBLE + * WITH THIRD PARTY SOFTWARE OR THAT ANY ERRORS IN THE PROGRAM WILL BE + * CORRECTED. NO ORAL OR WRITTEN ADVICE PROVIDED BY ELECTRONIC ARTS OR + * ANY AUTHORIZED REPRESENTATIVE SHALL CREATE A WARRANTY. SOME + * JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF OR LIMITATIONS ON IMPLIED + * WARRANTIES OR THE LIMITATIONS ON THE APPLICABLE STATUTORY RIGHTS OF A + * CONSUMER, SO SOME OR ALL OF THE ABOVE EXCLUSIONS AND LIMITATIONS MAY + * NOT APPLY TO YOU. + */ + +/** + * @file scan.cpp + * @brief Implements various scanning and analysis algorithms for + * Micropolis. + * + * This file contains functions for scanning and analyzing different + * aspects of the city in the Micropolis game, including fire and + * police station coverage, population density, pollution, land value, + * crime rates, and terrain. It also includes utility functions for + * smoothing maps and calculating distances. + */ + + +//////////////////////////////////////////////////////////////////////// + + +#include "micropolis.h" + + +//////////////////////////////////////////////////////////////////////// + +/** + * Smooth a station map. + * + * Used for smoothing fire station and police station coverage maps. + * @param map Map to smooth. + */ +static void smoothStationMap(MapShort8 *map) +{ + short x, y, edge; + MapShort8 tempMap(*map); + + for (x = 0; x < tempMap.MAP_W; x++) { + for (y = 0; y < tempMap.MAP_H; y++) { + edge = 0; + if (x > 0) { + edge += tempMap.get(x - 1, y); + } + if (x < tempMap.MAP_W - 1) { + edge += tempMap.get(x + 1, y); + } + if (y > 0) { + edge += tempMap.get(x, y - 1); + } + if (y < tempMap.MAP_H - 1) { + edge += tempMap.get(x, y + 1); + } + edge = tempMap.get(x, y) + edge / 4; + map->set(x, y, edge / 2); + } + } +} + +/** + * Make firerate map from firestation map. + * @todo Comment seems wrong; what's a firerate map? + */ +void Micropolis::fireAnalysis() +{ + smoothStationMap(&fireStationMap); + smoothStationMap(&fireStationMap); + smoothStationMap(&fireStationMap); + + fireStationEffectMap = fireStationMap; + + newMapFlags[MAP_TYPE_FIRE_RADIUS] = 1; + newMapFlags[MAP_TYPE_DYNAMIC] = 1; +} + + +/** @todo The tempMap1 has MAP_BLOCKSIZE > 1, so we may be able to optimize + * the first x, y loop. + */ +void Micropolis::populationDensityScan() +{ + /* sets: populationDensityMap, , , comRateMap */ + tempMap1.clear(); + Quad Xtot = 0; + Quad Ytot = 0; + Quad Ztot = 0; + for (int x = 0; x < WORLD_W; x++) { + for (int y = 0; y < WORLD_H; y++) { + MapValue mapValue = map[x][y]; + if (mapValue & ZONEBIT) { + MapTile mapTile = mapValue & LOMASK; + int pop = getPopulationDensity(Position(x, y), mapTile) * 8; + pop = min(pop, 254); + + tempMap1.worldSet(x, y, (Byte)pop); + Xtot += x; + Ytot += y; + Ztot++; + } + } + } + + doSmooth1(); // tempMap1 -> tempMap2 + doSmooth2(); // tempMap2 -> tempMap1 + doSmooth1(); // tempMap1 -> tempMap2 + + assert(populationDensityMap.MAP_W == tempMap2.MAP_W); + assert(populationDensityMap.MAP_H == tempMap2.MAP_H); + + // Copy tempMap2 to populationDensityMap, multiplying by 2 + Byte *srcMap = tempMap2.getBase(); + Byte *destMap = populationDensityMap.getBase(); + for (int i = 0; i < tempMap2.MAP_W * tempMap2.MAP_H; i++) { + destMap[i] = srcMap[i] * 2; + } + + computeComRateMap(); /* Compute the comRateMap */ + + + // Compute new city center + if (Ztot > 0) { /* Find Center of Mass for City */ + cityCenterX = (short)(Xtot / Ztot); + cityCenterY = (short)(Ytot / Ztot); + } else { + cityCenterX = WORLD_W / 2; /* if pop==0 center of map is city center */ + cityCenterY = WORLD_H / 2; + } + + // Set flags for updated maps + newMapFlags[MAP_TYPE_POPULATION_DENSITY] = 1; + newMapFlags[MAP_TYPE_RATE_OF_GROWTH] = 1; + newMapFlags[MAP_TYPE_DYNAMIC] = 1; +} + + +/** + * Get population of a zone. + * @param pos Position of the zone to count. + * @param tile Tile of the zone. + * @return Population of the zone. + */ +int Micropolis::getPopulationDensity(const Position &pos, MapTile tile) +{ + int pop; + + if (tile == FREEZ) { + pop = doFreePop(pos); + return pop; + } + + if (tile < COMBASE) { + pop = getResZonePop(tile); + return pop; + } + + if (tile < INDBASE) { + pop = getComZonePop(tile) * 8; + return pop; + } + + if (tile < PORTBASE) { + pop = getIndZonePop(tile) * 8; + return pop; + } + + return 0; +} + + +/* comefrom: simulate SpecialInit */ +void Micropolis::pollutionTerrainLandValueScan() +{ + /* Does pollution, terrain, land value */ + Quad ptot, LVtot; + int x, y, z, dis; + int pollutionLevel, loc, worldX, worldY, Mx, My, pnum, LVnum, pmax; + + // tempMap3 is a map of development density, smoothed into terrainMap. + tempMap3.clear(); + + LVtot = 0; + LVnum = 0; + + for (x = 0; x < landValueMap.MAP_W; x++) { + for (y = 0; y < landValueMap.MAP_H; y++) { + pollutionLevel = 0; + bool landValueFlag = false; + worldX = x * 2; + worldY = y * 2; + + for (Mx = worldX; Mx <= worldX + 1; Mx++) { + for (My = worldY; My <= worldY + 1; My++) { + loc = (map[Mx][My] & LOMASK); + if (loc) { + if (loc < RUBBLE) { + // Increment terrain memory. + Byte value = tempMap3.get(x >>1, y >>1); + tempMap3.set(x >>1, y >>1, value + 15); + continue; + } + pollutionLevel += getPollutionValue(loc); + if (loc >= ROADBASE) { + landValueFlag = true; + } + } + } + } + +/* XXX ??? This might have to do with the radiation tile returning -40. + if (pollutionLevel < 0) { + pollutionLevel = 250; + } +*/ + + pollutionLevel = min(pollutionLevel, 255); + tempMap1.set(x, y, pollutionLevel); + + if (landValueFlag) { /* LandValue Equation */ + dis = 34 - getCityCenterDistance(worldX, worldY) / 2; + dis = dis <<2; + dis += terrainDensityMap.get(x >>1, y >>1); + dis -= pollutionDensityMap.get(x, y); + if (crimeRateMap.get(x, y) > 190) { + dis -= 20; + } + dis = clamp(dis, 1, 250); + landValueMap.set(x, y, dis); + LVtot += dis; + LVnum++; + } else { + landValueMap.set(x, y, 0); + } + } + } + + if (LVnum > 0) { + landValueAverage = (short)(LVtot / LVnum); + } else { + landValueAverage = 0; + } + + doSmooth1(); // tempMap1 -> tempMap2 + doSmooth2(); // tempMap2 -> tempMap1 + + pmax = 0; + pnum = 0; + ptot = 0; + + for (x = 0; x < WORLD_W; x += pollutionDensityMap.MAP_BLOCKSIZE) { + for (y = 0; y < WORLD_H; y += pollutionDensityMap.MAP_BLOCKSIZE) { + z = tempMap1.worldGet(x, y); + pollutionDensityMap.worldSet(x, y, z); + + if (z) { /* get pollute average */ + pnum++; + ptot += z; + /* find max pol for monster */ + if (z > pmax || (z == pmax && (getRandom16() & 3) == 0)) { + pmax = z; + pollutionMaxX = x; + pollutionMaxY = y; + } + } + } + } + if (pnum) { + pollutionAverage = (short)(ptot / pnum); + } else { + pollutionAverage = 0; + } + + smoothTerrain(); + + newMapFlags[MAP_TYPE_POLLUTION] = 1; + newMapFlags[MAP_TYPE_LAND_VALUE] = 1; + newMapFlags[MAP_TYPE_DYNAMIC] = 1; +} + + +/** + * Return pollution of a tile value + * @param loc Tile character + * @return Value of the pollution (0..255, bigger is worse) + */ +int Micropolis::getPollutionValue(int loc) +{ + if (loc < POWERBASE) { + + if (loc >= HTRFBASE) { + return /* 25 */ 75; /* heavy traf */ + } + + if (loc >= LTRFBASE) { + return /* 10 */ 50; /* light traf */ + } + + if (loc < ROADBASE) { + + if (loc > FIREBASE) { + return /* 60 */ 90; + } + + /* XXX: Why negative pollution from radiation? */ + if (loc >= RADTILE) { + return /* -40 */ 255; /* radioactivity */ + } + + } + return 0; + } + + if (loc <= LASTIND) { + return 0; + } + + if (loc < PORTBASE) { + return 50; /* Ind */ + } + + if (loc <= LASTPOWERPLANT) { + return /* 60 */ 100; /* prt, aprt, cpp */ + } + + return 0; +} + + +/** + * Compute Manhattan distance between given world position and center of the + * city. + * @param x X world coordinate of given position. + * @param y Y world coordinate of given position. + * @return Manhattan distance (\c dx+dy ) between both positions. + * @note For long distances (> 64), value 64 is returned. + */ +int Micropolis::getCityCenterDistance(int x, int y) +{ + int xDis, yDis; + + if (x > cityCenterX) { + xDis = x - cityCenterX; + } else { + xDis = cityCenterX - x; + } + + if (y > cityCenterY) { + yDis = y - cityCenterY; + } else { + yDis = cityCenterY - y; + } + + return min(xDis + yDis, 64); +} + + +/** Smooth police station map and compute crime rate */ +void Micropolis::crimeScan() +{ + smoothStationMap(&policeStationMap); + smoothStationMap(&policeStationMap); + smoothStationMap(&policeStationMap); + + Quad totz = 0; + int numz = 0; + int cmax = 0; + + for (int x = 0; x < WORLD_W; x += crimeRateMap.MAP_BLOCKSIZE) { + for (int y = 0; y < WORLD_H; y += crimeRateMap.MAP_BLOCKSIZE) { + int z = landValueMap.worldGet(x, y); + if (z > 0) { + ++numz; + z = 128 - z; + z += populationDensityMap.worldGet(x, y); + z = min(z, 300); + z -= policeStationMap.worldGet(x, y); + z = clamp(z, 0, 250); + crimeRateMap.worldSet(x, y, (Byte)z); + totz += z; + + // Update new crime hot-spot + if (z > cmax || (z == cmax && (getRandom16() & 3) == 0)) { + cmax = z; + crimeMaxX = x; + crimeMaxY = y; + } + + } else { + crimeRateMap.worldSet(x, y, 0); + } + } + } + + if (numz > 0) { + crimeAverage = (short)(totz / numz); + } else { + crimeAverage = 0; + } + + policeStationEffectMap = policeStationMap; + + newMapFlags[MAP_TYPE_CRIME] = 1; + newMapFlags[MAP_TYPE_POLICE_RADIUS] = 1; + newMapFlags[MAP_TYPE_DYNAMIC] = 1; +} + + +/* comefrom: pollutionTerrainLandValueScan */ +void Micropolis::smoothTerrain() +{ + if (donDither & 1) { + int x, y = 0, dir = 1; + unsigned z = 0; + + for (x = 0; x < terrainDensityMap.MAP_W; x++) { + for (; y != terrainDensityMap.MAP_H && y != -1; y += dir) { + z += + tempMap3.get((x == 0) ? x : (x - 1), y) + + tempMap3.get((x == (terrainDensityMap.MAP_W - 1)) ? x : (x + 1), y) + + tempMap3.get(x, (y == 0) ? (0) : (y - 1)) + + tempMap3.get(x, (y == (terrainDensityMap.MAP_H - 1)) ? y : (y + 1)) + + (tempMap3.get(x, y) <<2); + Byte val = (Byte)(z / 8); + terrainDensityMap.set(x, y, val); + z &= 0x7; + } + dir = -dir; + y += dir; + } + } else { + short x, y; + + for (x = 0; x < terrainDensityMap.MAP_W; x++) { + for (y = 0; y < terrainDensityMap.MAP_H; y++) { + unsigned z = 0; + if (x > 0) { + z += tempMap3.get(x - 1, y); + } + if (x < (terrainDensityMap.MAP_W - 1)) { + z += tempMap3.get(x + 1, y); + } + if (y > 0) { + z += tempMap3.get(x, y - 1); + } + if (y < (terrainDensityMap.MAP_H - 1)) { + z += tempMap3.get(x, y + 1); + } + Byte val = (Byte)(z / 4 + tempMap3.get(x, y)) / 2; + terrainDensityMap.set(x, y, val); + } + } + } +} + +/** + * Perform smoothing with or without dithering. + * @param srcMap Source map. + * @param destMap Destination map. + * @param ditherFlag Function should apply dithering. + */ +static void smoothDitherMap(const MapByte2 &srcMap, + MapByte2 *destMap, + bool ditherFlag) +{ + if (ditherFlag) { + int x, y = 0, z = 0, dir = 1; + + for (x = 0; x < srcMap.MAP_W; x++) { + for (; y != srcMap.MAP_H && y != -1; y += dir) { + z += + srcMap.get((x == 0) ? x : (x - 1), y) + + srcMap.get((x == srcMap.MAP_W - 1) ? x : (x + 1), y) + + srcMap.get(x, (y == 0) ? (0) : (y - 1)) + + srcMap.get(x, (y == (srcMap.MAP_H - 1)) ? y : (y + 1)) + + srcMap.get(x, y); + Byte val = (Byte)(z / 4); + destMap->set(x, y, val); + z &= 3; + } + dir = -dir; + y += dir; + } + } else { + short x, y, z; + + for (x = 0; x < srcMap.MAP_W; x++) { + for (y = 0; y < srcMap.MAP_H; y++) { + z = 0; + if (x > 0) { + z += srcMap.get(x - 1, y); + } + if (x < srcMap.MAP_W - 1) { + z += srcMap.get(x + 1, y); + } + if (y > 0) { + z += srcMap.get(x, y - 1); + } + if (y < (srcMap.MAP_H - 1)) { + z += srcMap.get(x, y + 1); + } + z = (z + srcMap.get(x, y)) >>2; + if (z > 255) { + z = 255; + } + destMap->set(x, y, (Byte)z); + } + } + } +} + + +/* Smooth Micropolis::tempMap1 to Micropolis::tempMap2 */ +void Micropolis::doSmooth1() +{ + smoothDitherMap(tempMap1, &tempMap2, donDither & 2); +} + + +/* Smooth Micropolis::tempMap2 to Micropolis::tempMap1 */ +void Micropolis::doSmooth2() +{ + smoothDitherMap(tempMap2, &tempMap1, donDither & 4); +} + + +/** + * Compute distance to city center for the entire map. + * @see comRateMap + */ +void Micropolis::computeComRateMap() +{ + short x, y, z; + + for (x = 0; x < comRateMap.MAP_W; x++) { + for (y = 0; y < comRateMap.MAP_H; y++) { + z = (short)(getCityCenterDistance(x * 8,y * 8) / 2); // 0..32 + z = z * 4; // 0..128 + z = 64 - z; // 64..-64 + comRateMap.set(x, y, z); + } + } +} + + +//////////////////////////////////////////////////////////////////////// diff --git a/core/simulate.cpp b/core/simulate.cpp new file mode 100644 index 0000000..72396b0 --- /dev/null +++ b/core/simulate.cpp @@ -0,0 +1,1723 @@ +/* simulate.cpp + * + * Micropolis, Unix Version. This game was released for the Unix platform + * in or about 1990 and has been modified for inclusion in the One Laptop + * Per Child program. Copyright (C) 1989 - 2007 Electronic Arts Inc. If + * you need assistance with this program, you may contact: + * http://wiki.laptop.org/go/Micropolis or email micropolis@laptop.org. + * + * This program 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. + * + * This program 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 this program. If + * not, see . + * + * ADDITIONAL TERMS per GNU GPL Section 7 + * + * No trademark or publicity rights are granted. This license does NOT + * give you any right, title or interest in the trademark SimCity or any + * other Electronic Arts trademark. You may not distribute any + * modification of this program using the trademark SimCity or claim any + * affliation or association with Electronic Arts Inc. or its employees. + * + * Any propagation or conveyance of this program must include this + * copyright notice and these terms. + * + * If you convey this program (or any modifications of it) and assume + * contractual liability for the program to recipients of it, you agree + * to indemnify Electronic Arts for any liability that those contractual + * assumptions impose on Electronic Arts. + * + * You may not misrepresent the origins of this program; modified + * versions of the program must be marked as such and not identified as + * the original program. + * + * This disclaimer supplements the one included in the General Public + * License. TO THE FULLEST EXTENT PERMISSIBLE UNDER APPLICABLE LAW, THIS + * PROGRAM IS PROVIDED TO YOU "AS IS," WITH ALL FAULTS, WITHOUT WARRANTY + * OF ANY KIND, AND YOUR USE IS AT YOUR SOLE RISK. THE ENTIRE RISK OF + * SATISFACTORY QUALITY AND PERFORMANCE RESIDES WITH YOU. ELECTRONIC ARTS + * DISCLAIMS ANY AND ALL EXPRESS, IMPLIED OR STATUTORY WARRANTIES, + * INCLUDING IMPLIED WARRANTIES OF MERCHANTABILITY, SATISFACTORY QUALITY, + * FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT OF THIRD PARTY + * RIGHTS, AND WARRANTIES (IF ANY) ARISING FROM A COURSE OF DEALING, + * USAGE, OR TRADE PRACTICE. ELECTRONIC ARTS DOES NOT WARRANT AGAINST + * INTERFERENCE WITH YOUR ENJOYMENT OF THE PROGRAM; THAT THE PROGRAM WILL + * MEET YOUR REQUIREMENTS; THAT OPERATION OF THE PROGRAM WILL BE + * UNINTERRUPTED OR ERROR-FREE, OR THAT THE PROGRAM WILL BE COMPATIBLE + * WITH THIRD PARTY SOFTWARE OR THAT ANY ERRORS IN THE PROGRAM WILL BE + * CORRECTED. NO ORAL OR WRITTEN ADVICE PROVIDED BY ELECTRONIC ARTS OR + * ANY AUTHORIZED REPRESENTATIVE SHALL CREATE A WARRANTY. SOME + * JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF OR LIMITATIONS ON IMPLIED + * WARRANTIES OR THE LIMITATIONS ON THE APPLICABLE STATUTORY RIGHTS OF A + * CONSUMER, SO SOME OR ALL OF THE ABOVE EXCLUSIONS AND LIMITATIONS MAY + * NOT APPLY TO YOU. + */ + +/** + * @file simulate.cpp + * @brief Handles the main simulation logic for Micropolis. + * + * This file contains the primary functions responsible for advancing + * the simulation state in the Micropolis game. It includes methods + * for handling various aspects of the game world, such as power + * generation, population growth, resource management, and disaster + * events. The simulation is divided into multiple phases, with each + * phase focusing on specific components of the game world. + */ + + +//////////////////////////////////////////////////////////////////////// + + +#include "micropolis.h" +#include "text.h" + + +//////////////////////////////////////////////////////////////////////// +// Constants + +/** + * How often to perform the short term census. + * @todo Rename to CENSUS_MONTHLY_FREQUENCY or so? + */ +static const int CENSUS_FREQUENCY_10 = 4; + +/** + * How often to perform the long term census. + * @todo Rename to CENSUS_YEARLY_FREQUENCY or so? + */ +static const int CENSUS_FREQUENCY_120 = CENSUS_FREQUENCY_10 * 12; + +/** + * How often to collect taxes. + */ +static const int TAX_FREQUENCY = 48; + + +//////////////////////////////////////////////////////////////////////// + + +/* comefrom: doEditWindow scoreDoer doMapInFront graphDoer doNilEvent */ +void Micropolis::simFrame() +{ + + if (simSpeed == 0) { + return; + } + + if (++speedCycle > 1023) { + speedCycle = 0; + } + + if (simSpeed == 1 && (speedCycle % 5) != 0) { + return; + } + + if (simSpeed == 2 && (speedCycle % 3) != 0) { + return; + } + + simulate(); +} + + +/* comefrom: simFrame */ +void Micropolis::simulate() +{ + static const short speedPowerScan[3] = + { 2, 4, 5 }; + static const short SpeedPollutionTerrainLandValueScan[3] = + { 2, 7, 17 }; + static const short speedCrimeScan[3] = + { 1, 8, 18 }; + static const short speedPopulationDensityScan[3] = + { 1, 9, 19 }; + static const short speedFireAnalysis[3] = + { 1, 10, 20 }; + + short speedIndex = clamp((short)(simSpeed - 1), (short)0, (short)2); + + // The simulator has 16 different phases, which we cycle through + // according to phaseCycle, which is incremented and wrapped at + // the end of this switch. + + if (initSimLoad) { + phaseCycle = 0; + } else { + phaseCycle &= 15; + } + + switch (phaseCycle) { + + case 0: + + if (++simCycle > 1023) { + simCycle = 0; // This is cosmic! + } + + if (doInitialEval) { + doInitialEval = false; + cityEvaluation(); + } + + cityTime++; + cityTaxAverage += cityTax; + + if (!(simCycle & 1)) { + setValves(); + } + + clearCensus(); + + break; + + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + + // Scan 1/8 of the map for each of the 8 phases 1..8: + mapScan((phaseCycle - 1) * WORLD_W / 8, phaseCycle * WORLD_W / 8); + + break; + + case 9: + if (cityTime % CENSUS_FREQUENCY_10 == 0) { + take10Census(); + } + + if (cityTime % CENSUS_FREQUENCY_120 == 0) { + take120Census(); + } + + if (cityTime % TAX_FREQUENCY == 0) { + collectTax(); + cityEvaluation(); + } + + break; + + case 10: + + if (!(simCycle % 5)) { + decRateOfGrowthMap(); + } + + decTrafficMap(); + + newMapFlags[MAP_TYPE_TRAFFIC_DENSITY] = 1; + newMapFlags[MAP_TYPE_ROAD] = 1; + newMapFlags[MAP_TYPE_ALL] = 1; + newMapFlags[MAP_TYPE_RES] = 1; + newMapFlags[MAP_TYPE_COM] = 1; + newMapFlags[MAP_TYPE_IND] = 1; + newMapFlags[MAP_TYPE_DYNAMIC] = 1; + + sendMessages(); + + break; + + case 11: + + if ((simCycle % speedPowerScan[speedIndex]) == 0) { + doPowerScan(); + newMapFlags[MAP_TYPE_POWER] = 1; + newPower = true; /* post-release change */ + } + + break; + + case 12: + + if ((simCycle % SpeedPollutionTerrainLandValueScan[speedIndex]) == 0) { + pollutionTerrainLandValueScan(); + } + + break; + + case 13: + + if ((simCycle % speedCrimeScan[speedIndex]) == 0) { + crimeScan(); + } + + break; + + case 14: + + if ((simCycle % speedPopulationDensityScan[speedIndex]) == 0) { + populationDensityScan(); + } + + break; + + case 15: + + if ((simCycle % speedFireAnalysis[speedIndex]) == 0) { + fireAnalysis(); + } + + doDisasters(); + + break; + + } + + // Go on the the next phase. + phaseCycle = (phaseCycle + 1) & 15; +} + + +/** + * Initialize simulation. + * @todo Create constants for initSimLoad. + */ +void Micropolis::doSimInit() +{ + phaseCycle = 0; + simCycle = 0; + + if (initSimLoad == 2) { + /* if new city */ + initSimMemory(); + } + + if (initSimLoad == 1) { + /* if city just loaded */ + simLoadInit(); + } + + setValves(); + clearCensus(); + mapScan(0, WORLD_W); + doPowerScan(); + newPower = true; /* post rel */ + pollutionTerrainLandValueScan(); + crimeScan(); + populationDensityScan(); + fireAnalysis(); + newMap = 1; + censusChanged = true; + totalPop = 1; + doInitialEval = true; +} + + +/** + * Copy bits from powerGridMap to the #PWRBIT in the map for all zones in the + * world. + */ +void Micropolis::doNilPower() +{ + short x, y; + + for (x = 0; x < WORLD_W; x++) { + for (y = 0; y < WORLD_H; y++) { + MapValue z = map[x][y]; + if (z & ZONEBIT) { + setZonePower(Position(x, y)); + } + } + } +} + + +/** Decrease traffic memory */ +void Micropolis::decTrafficMap() +{ + /* tends to empty trafficDensityMap */ + short x, y, z; + + for (x = 0; x < WORLD_W; x += trafficDensityMap.MAP_BLOCKSIZE) { + for (y = 0; y < WORLD_H; y += trafficDensityMap.MAP_BLOCKSIZE) { + z = trafficDensityMap.worldGet(x, y); + if (z == 0) { + continue; + } + + if (z <= 24) { + trafficDensityMap.worldSet(x, y, 0); + continue; + } + + if (z > 200) { + trafficDensityMap.worldSet(x, y, z - 34); + } else { + trafficDensityMap.worldSet(x, y, z - 24); + } + } + } +} + + +/** + * Decrease rate of grow. + * @todo Limiting rate should not be done here, but when we add a new value to + * it. + */ +void Micropolis::decRateOfGrowthMap() +{ + /* tends to empty rateOfGrowthMap */ + short x, y, z; + + for (x = 0; x < rateOfGrowthMap.MAP_W; x++) { + for (y = 0; y < rateOfGrowthMap.MAP_H; y++) { + z = rateOfGrowthMap.get(x, y); + if (z == 0) { + continue; + } + + if (z > 0) { + z--; + z = clamp(z, (short)-200, (short)200); + rateOfGrowthMap.set(x, y, z); + continue; + } + + if (z < 0) { + z++; + z = clamp(z, (short)-200, (short)200); + rateOfGrowthMap.set(x, y, z); + } + } + } +} + + +/* comefrom: doSimInit */ +void Micropolis::initSimMemory() +{ + setCommonInits(); + + for (short x = 0; x < 240; x++) { + resHist[x] = 0; + comHist[x] = 0; + indHist[x] = 0; + moneyHist[x] = 128; + crimeHist[x] = 0; + pollutionHist[x] = 0; + } + + crimeRamp = 0; + pollutionRamp = 0; + totalPop = 0; + resValve = 0; + comValve = 0; + indValve = 0; + resCap = false; // Do not block residential growth + comCap = false; // Do not block commercial growth + indCap = false; // Do not block industrial growth + + externalMarket = 6.0; + disasterEvent = SC_NONE; + scoreType = SC_NONE; + + /* This clears powermem */ + powerStackPointer = 0; + doPowerScan(); + newPower = true; /* post rel */ + + initSimLoad = 0; +} + + +/* comefrom: doSimInit */ +void Micropolis::simLoadInit() +{ + // Disaster delay table for each scenario + static const short disasterWaitTable[SC_COUNT] = { + 0, // No scenario (free playing) + 2, // Dullsville (boredom) + 10, // San francisco (earth quake) + 4 * 10, // Hamburg (fire bombs) + 20, // Bern (traffic) + 3, // Tokyo (scary monster) + 5, // Detroit (crime) + 5, // Boston (nuclear meltdown) + 2 * 48, // Rio (flooding) + }; + + // Time to wait before score calculation for each scenario + static const short scoreWaitTable[SC_COUNT] = { + 0, // No scenario (free playing) + 30 * 48, // Dullsville (boredom) + 5 * 48, // San francisco (earth quake) + 5 * 48, // Hamburg (fire bombs) + 10 * 48, // Bern (traffic) + 5 * 48, // Tokyo (scary monster) + 10 * 48, // Detroit (crime) + 5 * 48, // Boston (nuclear meltdown) + 10 * 48, // Rio (flooding) + }; + + externalMarket = (float)miscHist[1]; + resPop = miscHist[2]; + comPop = miscHist[3]; + indPop = miscHist[4]; + resValve = miscHist[5]; + comValve = miscHist[6]; + indValve = miscHist[7]; + crimeRamp = miscHist[10]; + pollutionRamp = miscHist[11]; + landValueAverage = miscHist[12]; + crimeAverage = miscHist[13]; + pollutionAverage = miscHist[14]; + gameLevel = (GameLevel)miscHist[15]; + + if (cityTime < 0) { + cityTime = 0; + } + + if (!externalMarket) { + externalMarket = 4.0; + } + + // Set game level + if (gameLevel > LEVEL_LAST || gameLevel < LEVEL_FIRST) { + gameLevel = LEVEL_FIRST; + } + setGameLevel(gameLevel); + + setCommonInits(); + + // Load cityClass + cityClass = (CityClass)(miscHist[16]); + if (cityClass > CC_MEGALOPOLIS || cityClass < CC_VILLAGE) { + cityClass = CC_VILLAGE; + } + + cityScore = miscHist[17]; + if (cityScore > 999 || cityScore < 1) { + cityScore = 500; + } + + resCap = false; + comCap = false; + indCap = false; + + cityTaxAverage = (cityTime % 48) * 7; /* post */ + + // Set power map. + /// @todo What purpose does this serve? Weird... + powerGridMap.fill(1); + + doNilPower(); + + roadEffect = MAX_ROAD_EFFECT; + policeEffect = MAX_POLICE_STATION_EFFECT; + fireEffect = MAX_FIRE_STATION_EFFECT; + initSimLoad = 0; + + if (scenario >= SC_COUNT) { + scenario = SC_NONE; + } + + if (scenario != SC_NONE) { + assert(LENGTH_OF(disasterWaitTable) == SC_COUNT); + assert(LENGTH_OF(scoreWaitTable) == SC_COUNT); + + disasterEvent = scenario; + disasterWait = disasterWaitTable[disasterEvent]; + scoreType = disasterEvent; + scoreWait = scoreWaitTable[disasterEvent]; + + doStartScenario(scenario); + } else { + disasterEvent = SC_NONE; + disasterWait = 0; + scoreType = SC_NONE; + scoreWait = 0; + } + + doStartGame(); +} + + +/* comefrom: initSimMemory simLoadInit */ +void Micropolis::setCommonInits() +{ + evalInit(); + roadEffect = MAX_ROAD_EFFECT; + policeEffect = MAX_POLICE_STATION_EFFECT; + fireEffect = MAX_FIRE_STATION_EFFECT; + taxFlag = false; + taxFund = 0; +} + + +/* comefrom: simulate doSimInit */ +void Micropolis::setValves() +{ + /// @todo Break the tax table out into configurable parameters. + static const short taxTable[21] = { + 200, 150, 120, 100, 80, 50, 30, 0, -10, -40, -100, + -150, -200, -250, -300, -350, -400, -450, -500, -550, -600, + }; + static const float extMarketParamTable[3] = { + 1.2f, 1.1f, 0.98f, + }; + assert(LEVEL_COUNT == LENGTH_OF(extMarketParamTable)); + + /// @todo Make configurable parameters. + short resPopDenom = 8; + float birthRate = 0.02; + float laborBaseMax = 1.3; + float internalMarketDenom = 3.7; + float projectedIndPopMin = 5.0; + float resRatioDefault = 1.3; + float resRatioMax = 2; + float comRatioMax = 2; + float indRatioMax = 2; + short taxMax = 20; + float taxTableScale = 600; + + /// @todo Break the interesting values out into public member + /// variables so the user interface can display them. + float employment, migration, births, laborBase, internalMarket; + float resRatio, comRatio, indRatio; + float normalizedResPop, projectedResPop, projectedComPop, projectedIndPop; + + miscHist[1] = (short)externalMarket; + miscHist[2] = resPop; + miscHist[3] = comPop; + miscHist[4] = indPop; + miscHist[5] = resValve; + miscHist[6] = comValve; + miscHist[7] = indValve; + miscHist[10] = crimeRamp; + miscHist[11] = pollutionRamp; + miscHist[12] = landValueAverage; + miscHist[13] = crimeAverage; + miscHist[14] = pollutionAverage; + miscHist[15] = gameLevel; + miscHist[16] = (short)cityClass; + miscHist[17] = cityScore; + + normalizedResPop = (float)resPop / (float)resPopDenom; + totalPopLast = totalPop; + totalPop = (short)(normalizedResPop + comPop + indPop); + + if (resPop > 0) { + employment = (comHist[1] + indHist[1]) / normalizedResPop; + } else { + employment = 1; + } + + migration = normalizedResPop * (employment - 1); + births = normalizedResPop * birthRate; + projectedResPop = normalizedResPop + migration + births; // Projected res pop. + + // Compute laborBase + float temp = comHist[1] + indHist[1]; + if (temp > 0.0) { + laborBase = (resHist[1] / temp); + } else { + laborBase = 1; + } + laborBase = clamp(laborBase, 0.0f, laborBaseMax); + + internalMarket = (float)(normalizedResPop + comPop + indPop) / internalMarketDenom; + + projectedComPop = internalMarket * laborBase; + + assert(gameLevel >= LEVEL_FIRST && gameLevel <= LEVEL_LAST); + projectedIndPop = indPop * laborBase * extMarketParamTable[gameLevel]; + projectedIndPop = max(projectedIndPop, projectedIndPopMin); + + if (normalizedResPop > 0) { + resRatio = (float)projectedResPop / (float)normalizedResPop; // projected -vs- actual. + } else { + resRatio = resRatioDefault; + } + + if (comPop > 0) { + comRatio = (float)projectedComPop / (float)comPop; + } else { + comRatio = (float)projectedComPop; + } + + if (indPop > 0) { + indRatio = (float)projectedIndPop / (float)indPop; + } else { + indRatio = (float)projectedIndPop; + } + + resRatio = min(resRatio, resRatioMax); + comRatio = min(comRatio, comRatioMax); + resRatio = min(indRatio, indRatioMax); + + // Global tax and game level effects. + short z = min((short)(cityTax + gameLevel), taxMax); + resRatio = (resRatio - 1) * taxTableScale + taxTable[z]; + comRatio = (comRatio - 1) * taxTableScale + taxTable[z]; + indRatio = (indRatio - 1) * taxTableScale + taxTable[z]; + + // Ratios are velocity changes to valves. + resValve = clamp(resValve + (short)resRatio, -RES_VALVE_RANGE, RES_VALVE_RANGE); + comValve = clamp(comValve + (short)comRatio, -COM_VALVE_RANGE, COM_VALVE_RANGE); + indValve = clamp(indValve + (short)indRatio, -IND_VALVE_RANGE, IND_VALVE_RANGE); + + if (resCap && resValve > 0) { + resValve = 0; // Need a stadium, so cap resValve. + } + + if (comCap && comValve > 0) { + comValve = 0; // Need a airport, so cap comValve. + } + + if (indCap && indValve > 0) { + indValve = 0; // Need an seaport, so cap indValve. + } + + valveFlag = true; +} + + +/* comefrom: simulate doSimInit */ +void Micropolis::clearCensus() +{ + poweredZoneCount = 0; + unpoweredZoneCount = 0; + firePop = 0; + roadTotal = 0; + railTotal = 0; + resPop = 0; + comPop = 0; + indPop = 0; + resZonePop = 0; + comZonePop = 0; + indZonePop = 0; + hospitalPop = 0; + churchPop = 0; + policeStationPop = 0; + fireStationPop = 0; + stadiumPop = 0; + coalPowerPop = 0; + nuclearPowerPop = 0; + seaportPop = 0; + airportPop = 0; + powerStackPointer = 0; /* Reset before Mapscan */ + + fireStationMap.clear(); + //fireStationEffectMap.clear(); // Added in rev293 + policeStationMap.clear(); + //policeStationEffectMap.clear(); // Added in rev293 + +} + + +/** + * Take monthly snaphsot of all relevant data for the historic graphs. + * Also update variables that control building new churches and hospitals. + * @todo Rename to takeMonthlyCensus (or takeMonthlySnaphshot?). + * @todo A lot of this max stuff is also done in graph.cpp + */ +void Micropolis::take10Census() +{ + // TODO: Make configurable parameters. + int resPopDenom = 8; + + short x; + + /* put census#s in Historical Graphs and scroll data */ + resHist10Max = 0; + comHist10Max = 0; + indHist10Max = 0; + + for (x = 118; x >= 0; x--) { + + resHist10Max = max(resHist10Max, resHist[x]); + comHist10Max = max(comHist10Max, comHist[x]); + indHist10Max = max(indHist10Max, indHist[x]); + + resHist[x + 1] = resHist[x]; + comHist[x + 1] = comHist[x]; + indHist[x + 1] = indHist[x]; + crimeHist[x + 1] = crimeHist[x]; + pollutionHist[x + 1] = pollutionHist[x]; + moneyHist[x + 1] = moneyHist[x]; + + } + + graph10Max = resHist10Max; + graph10Max = max(graph10Max, comHist10Max); + graph10Max = max(graph10Max, indHist10Max); + + resHist[0] = resPop / resPopDenom; + comHist[0] = comPop; + indHist[0] = indPop; + + crimeRamp += (crimeAverage - crimeRamp) / 4; + crimeHist[0] = min(crimeRamp, (short)255); + + pollutionRamp += (pollutionAverage - pollutionRamp) / 4; + pollutionHist[0] = min(pollutionRamp, (short)255); + + x = (cashFlow / 20) + 128; /* scale to 0..255 */ + moneyHist[0] = clamp(x, (short)0, (short)255); + + changeCensus(); + + short resPopScaled = resPop >> 8; + + if (hospitalPop < resPopScaled) { + needHospital = 1; + } + + if (hospitalPop > resPopScaled) { + needHospital = -1; + } + + if (hospitalPop == resPopScaled) { + needHospital = 0; + } + + int faithfulPop = resPopScaled + faith; + + if (churchPop < faithfulPop) { + needChurch = 1; + } + + if (churchPop > faithfulPop) { + needChurch = -1; + } + + if (churchPop == faithfulPop) { + needChurch = 0; + } +} + + +/* comefrom: simulate */ +void Micropolis::take120Census() +{ + // TODO: Make configurable parameters. + int resPopDenom = 8; + + /* Long Term Graphs */ + short x; + + resHist120Max = 0; + comHist120Max = 0; + indHist120Max = 0; + + for (x = 238; x >= 120; x--) { + + resHist120Max = max(resHist120Max, resHist[x]); + comHist120Max = max(comHist120Max, comHist[x]); + indHist120Max = max(indHist120Max, indHist[x]); + + resHist[x + 1] = resHist[x]; + comHist[x + 1] = comHist[x]; + indHist[x + 1] = indHist[x]; + crimeHist[x + 1] = crimeHist[x]; + pollutionHist[x + 1] = pollutionHist[x]; + moneyHist[x + 1] = moneyHist[x]; + + } + + graph120Max = resHist120Max; + graph120Max = max(graph120Max, comHist120Max); + graph120Max = max(graph120Max, indHist120Max); + + resHist[120] = resPop / resPopDenom; + comHist[120] = comPop; + indHist[120] = indPop; + crimeHist[120] = crimeHist[0] ; + pollutionHist[120] = pollutionHist[0]; + moneyHist[120] = moneyHist[0]; + changeCensus(); +} + + +/** Collect taxes + * @bug Function seems to be doing different things depending on + * Micropolis::totalPop value. With an non-empty city it does fund + * calculations. For an empty city, it immediately sets effects of + * funding, which seems inconsistent at least, and may be wrong + * @bug If Micropolis::taxFlag is set, no variable is touched which seems + * non-robust at least + */ +void Micropolis::collectTax() +{ + short z; + + /** + * @todo Break out so the user interface can configure this. + */ + static const float RLevels[3] = { 0.7, 0.9, 1.2 }; + static const float FLevels[3] = { 1.4, 1.2, 0.8 }; + + assert(LEVEL_COUNT == LENGTH_OF(RLevels)); + assert(LEVEL_COUNT == LENGTH_OF(FLevels)); + + cashFlow = 0; + + /** + * @todo Apparently taxFlag is never set to true in MicropolisEngine + * or the TCL code, so this always runs. + * @todo Check old Mac code to see if it's ever set, and why. + */ + + if (!taxFlag) { // If the Tax Port is clear + + /// @todo Do something with z? Check old Mac code to see if it's used. + z = cityTaxAverage / 48; // post release + + cityTaxAverage = 0; + + policeFund = (long)policeStationPop * 100; + fireFund = (long)fireStationPop * 100; + roadFund = (long)((roadTotal + (railTotal * 2)) * RLevels[gameLevel]); + taxFund = (long)((((Quad)totalPop * landValueAverage) / 120) * cityTax * FLevels[gameLevel]); + + if (totalPop > 0) { + /* There are people to tax. */ + cashFlow = (short)(taxFund - (policeFund + fireFund + roadFund)); + doBudget(); + } else { + /* Nobody lives here. */ + roadEffect = MAX_ROAD_EFFECT; + policeEffect = MAX_POLICE_STATION_EFFECT; + fireEffect = MAX_FIRE_STATION_EFFECT; + } + } +} + + +/** + * Update effects of (possibly reduced) funding + * + * It updates effects with respect to roads, police, and fire. + * @note This function should probably not be used when #totalPop is + * clear (ie with an empty) city. See also bugs of #collectTax() + * @bug I think this should be called after loading a city, or any + * time anything it depends on changes. + */ +void Micropolis::updateFundEffects() +{ + // Compute road effects of funding + roadEffect = MAX_ROAD_EFFECT; + if (roadFund > 0) { + // Multiply with funding fraction + roadEffect = (short)((float)roadEffect * (float)roadSpend / (float)roadFund); + } + + // Compute police station effects of funding + policeEffect = MAX_POLICE_STATION_EFFECT; + if (policeFund > 0) { + // Multiply with funding fraction + policeEffect = (short)((float)policeEffect * (float)policeSpend / (float)policeFund); + } + + // Compute fire station effects of funding + fireEffect = MAX_FIRE_STATION_EFFECT; + if (fireFund > 0) { + // Multiply with funding fraction + fireEffect = (short)((float)fireEffect * (float)fireSpend / (float)fireFund); + } + +#if 0 + printf("========== updateFundEffects road %d %d %d fire %d %d %d police %d %d %d\n", + (int)roadEffect, (int)roadSpend, (int)roadFund, + (int)fireEffect, (int)fireSpend, (int)fireFund, + (int)policeEffect, (int)policeSpend, (int)policeFund); +#endif + + mustDrawBudget = 1; +} + + +/* comefrom: simulate doSimInit */ +void Micropolis::mapScan(int x1, int x2) +{ + short x, y; + + for (x = x1; x < x2; x++) { + for (y = 0; y < WORLD_H; y++) { + + MapValue mapVal = map[x][y]; + if (mapVal == DIRT) { + continue; + } + + MapTile tile = mapVal & LOMASK; /* Mask off status bits */ + + if (tile < FLOOD) { + continue; + } + + // tile >= FLOOD + + Position pos(x, y); + + + if (tile < ROADBASE) { + + if (tile >= FIREBASE) { + firePop++; + if (!(getRandom16() & 3)) { + doFire(pos); /* 1 in 4 times */ + } + continue; + } + + if (tile < RADTILE) { + doFlood(pos); + } else { + doRadTile(pos); + } + + continue; + } + + if (newPower && (mapVal & CONDBIT)) { + // Copy PWRBIT from powerGridMap + setZonePower(pos); + } + + if (tile >= ROADBASE && tile < POWERBASE) { + doRoad(pos); + continue; + } + + if (mapVal & ZONEBIT) { /* process Zones */ + doZone(pos); + continue; + } + + if (tile >= RAILBASE && tile < RESBASE) { + doRail(pos); + continue; + } + + if (tile >= SOMETINYEXP && tile <= LASTTINYEXP) { + /* clear AniRubble */ + map[x][y] = randomRubble(); + } + } + } +} + + +/** + * Handle rail track. + * Generate a train, and handle road deteriorating effects. + * @param pos Position of the rail. + */ +void Micropolis::doRail(const Position &pos) +{ + railTotal++; + + generateTrain(pos.posX, pos.posY); + + if (roadEffect < (15 * MAX_ROAD_EFFECT / 16)) { + + // roadEffect < 15/16 of max road, enable deteriorating rail + if (!(getRandom16() & 511)) { + + MapValue curValue = map[pos.posX][pos.posY]; + if (!(curValue & CONDBIT)) { + + // Otherwise the '(getRandom16() & 31)' makes no sense + assert(MAX_ROAD_EFFECT == 32); + if (roadEffect < (getRandom16() & 31)) { + MapTile tile = curValue & LOMASK; + if (tile < RAILBASE + 2) { + map[pos.posX][pos.posY] = RIVER; + } else { + map[pos.posX][pos.posY] = randomRubble(); + } + return; + } + } + } + } +} + + +/** + * Handle decay of radio-active tile + * @param pos Position of the radio-active tile. + */ +void Micropolis::doRadTile(const Position &pos) +{ + if ((getRandom16() & 4095) == 0) { + map[pos.posX][pos.posY] = DIRT; /* Radioactive decay */ + } +} + + +/** + * Handle road tile. + * @param pos Position of the road. + */ +void Micropolis::doRoad(const Position &pos) +{ + short tden, z; + static const short densityTable[3] = { ROADBASE, LTRFBASE, HTRFBASE }; + + roadTotal++; + + MapValue mapValue = map[pos.posX][pos.posY]; + MapTile tile = mapValue & LOMASK; + + /* generateBus(pos.posX, pos.posY); */ + + if (roadEffect < (15 * MAX_ROAD_EFFECT / 16)) { + // roadEffect < 15/16 of max road, enable deteriorating road + if ((getRandom16() & 511) == 0) { + if (!(mapValue & CONDBIT)) { + assert(MAX_ROAD_EFFECT == 32); // Otherwise the '(getRandom16() & 31)' makes no sense + if (roadEffect < (getRandom16() & 31)) { + if ((tile & 15) < 2 || (tile & 15) == 15) { + map[pos.posX][pos.posY] = RIVER; + } else { + map[pos.posX][pos.posY] = randomRubble(); + } + return; + } + } + } + } + + if ((mapValue & BURNBIT) == 0) { /* If Bridge */ + roadTotal += 4; // Bridge counts as 4 road tiles + if (doBridge(Position(pos.posX, pos.posY), tile)) { + return; + } + } + + if (tile < LTRFBASE) { + tden = 0; + } else if (tile < HTRFBASE) { + tden = 1; + } else { + roadTotal++; // Heavy traffic counts as 2 roads. + tden = 2; + } + + short trafficDensity = trafficDensityMap.worldGet(pos.posX, pos.posY) >>6; + + if (trafficDensity > 1) { + trafficDensity--; + } + + if (tden != trafficDensity) { /* tden 0..2 */ + z = ((tile - ROADBASE) & 15) + densityTable[trafficDensity]; + z |= mapValue & (ALLBITS - ANIMBIT); + + if (trafficDensity > 0) { + z |= ANIMBIT; + } + + map[pos.posX][pos.posY] = z; + } +} + + +/** + * Handle a bridge. + * @param pos Position of the bridge. + * @param tile Tile value of the bridge. + * @return ??? + * + * @todo What does this function return? + * @todo Discover the structure of all the magic constants. + */ +bool Micropolis::doBridge(const Position &pos, MapTile tile) +{ + static short HDx[7] = { -2, 2, -2, -1, 0, 1, 2 }; + static short HDy[7] = { -1, -1, 0, 0, 0, 0, 0 }; + static short HBRTAB[7] = { + HBRDG1 | BULLBIT, HBRDG3 | BULLBIT, HBRDG0 | BULLBIT, + RIVER, BRWH | BULLBIT, RIVER, HBRDG2 | BULLBIT, + }; + static short HBRTAB2[7] = { + RIVER, RIVER, HBRIDGE | BULLBIT, HBRIDGE | BULLBIT, HBRIDGE | BULLBIT, + HBRIDGE | BULLBIT, HBRIDGE | BULLBIT, + }; + static short VDx[7] = { 0, 1, 0, 0, 0, 0, 1 }; + static short VDy[7] = { -2, -2, -1, 0, 1, 2, 2 }; + static short VBRTAB[7] = { + VBRDG0 | BULLBIT, VBRDG1 | BULLBIT, RIVER, BRWV | BULLBIT, + RIVER, VBRDG2 | BULLBIT, VBRDG3 | BULLBIT, + }; + static short VBRTAB2[7] = { + VBRIDGE | BULLBIT, RIVER, VBRIDGE | BULLBIT, VBRIDGE | BULLBIT, + VBRIDGE | BULLBIT, VBRIDGE | BULLBIT, RIVER, + }; + int z, x, y, MPtem; + + if (tile == BRWV) { /* Vertical bridge close */ + + if ((!(getRandom16() & 3)) && getBoatDistance(pos) > 340) { + + for (z = 0; z < 7; z++) { /* Close */ + + x = pos.posX + VDx[z]; + y = pos.posY + VDy[z]; + + if (testBounds(x, y)) { + + if ((map[x][y] & LOMASK) == (VBRTAB[z] & LOMASK)) { + map[x][y] = VBRTAB2[z]; + } + + } + } + } + return true; + } + + if (tile == BRWH) { /* Horizontal bridge close */ + + if ((!(getRandom16() & 3)) && getBoatDistance(pos) > 340) { + + for (z = 0; z < 7; z++) { /* Close */ + + x = pos.posX + HDx[z]; + y = pos.posY + HDy[z]; + + if (testBounds(x, y)) { + + if ((map[x][y] & LOMASK) == (HBRTAB[z] & LOMASK)) { + + map[x][y] = HBRTAB2[z]; + + } + } + } + } + return true; + } + + if (getBoatDistance(pos) < 300 || (!(getRandom16() & 7))) { + if (tile & 1) { + if (pos.posX < WORLD_W - 1) { + if (map[pos.posX + 1][pos.posY] == CHANNEL) { /* Vertical open */ + + for (z = 0; z < 7; z++) { + + x = pos.posX + VDx[z]; + y = pos.posY + VDy[z]; + + if (testBounds(x, y)) { + + MPtem = map[x][y]; + if (MPtem == CHANNEL || ((MPtem & 15) == (VBRTAB2[z] & 15))) { + map[x][y] = VBRTAB[z]; + } + } + } + return true; + } + } + return false; + + } else { + + if (pos.posY > 0) { + if (map[pos.posX][pos.posY - 1] == CHANNEL) { + + /* Horizontal open */ + for (z = 0; z < 7; z++) { + + x = pos.posX + HDx[z]; + y = pos.posY + HDy[z]; + + if (testBounds(x, y)) { + + MPtem = map[x][y]; + if (((MPtem & 15) == (HBRTAB2[z] & 15)) || MPtem == CHANNEL) { + map[x][y] = HBRTAB[z]; + } + } + } + return true; + } + } + return false; + } + + } + return false; +} + + +/** + * Compute distance to nearest boat from a given bridge. + * @param pos Position of bridge. + * @return Distance to nearest boat. + */ +int Micropolis::getBoatDistance(const Position &pos) +{ + int sprDist; + SimSprite *sprite; + + int dist = 99999; + int mx = pos.posX * 16 + 8; + int my = pos.posY * 16 + 8; + + for (sprite = spriteList; sprite != NULL; sprite = sprite->next) { + if (sprite->type == SPRITE_SHIP && sprite->frame != 0) { + + sprDist = absoluteValue(sprite->x + sprite->xHot - mx) + + absoluteValue(sprite->y + sprite->yHot - my); + + dist = min(dist, sprDist); + } + } + return dist; +} + + +/** + * Handle tile being on fire. + * @param pos Position of the fire. + * + * @todo Needs a notion of iterative neighbour tiles computing. + * @todo Use a getFromMap()-like function here. + * @todo Extract constants of fire station effectiveness from here. + */ +void Micropolis::doFire(const Position &pos) +{ + static const short DX[4] = { -1, 0, 1, 0 }; + static const short DY[4] = { 0, -1, 0, 1 }; + + // Try to set neighbouring tiles on fire as well + for (short z = 0; z < 4; z++) { + + if ((getRandom16() & 7) == 0) { + + short xTem = pos.posX + DX[z]; + short yTem = pos.posY + DY[z]; + + if (testBounds(xTem, yTem)) { + + MapValue c = map[xTem][yTem]; + if (!(c & BURNBIT)) { + continue; + } + + if (c & ZONEBIT) { + // Neighbour is a zone and burnable + fireZone(Position(xTem, yTem), c); + + if ((c & LOMASK) > IZB) { /* Explode */ + makeExplosionAt(xTem *16 + 8, yTem * 16 + 8); + } + } + + map[xTem][yTem] = randomFire(); + } + } + } + + // Compute likelyhood of fire running out of fuel + short rate = 10; // Likelyhood of extinguishing (bigger means less chance) + short z = fireStationEffectMap.worldGet(pos.posX, pos.posY); + + if (z > 0) { + rate = 3; + if (z > 20) { + rate = 2; + } + if (z > 100) { + rate = 1; + } + } + + // Decide whether to put out the fire. + if (getRandom(rate) == 0) { + map[pos.posX][pos.posY] = randomRubble(); + } +} + + +/** + * Handle a zone on fire. + * + * Decreases rate of growth of the zone, and makes remaining tiles bulldozable. + * + * @param pos Position of the zone on fire. + * @param ch Character of the zone. + */ +void Micropolis::fireZone(const Position &pos, MapValue ch) +{ + short XYmax; + + int value = rateOfGrowthMap.worldGet(pos.posX, pos.posY); + value = clamp(value - 20, -200, 200); + rateOfGrowthMap.worldSet(pos.posX, pos.posY, value); + + ch = ch & LOMASK; + + if (ch < PORTBASE) { + XYmax = 2; + } else { + if (ch == AIRPORT) { + XYmax = 5; + } else { + XYmax = 4; + } + } + + // Make remaining tiles of the zone bulldozable + for (short x = -1; x < XYmax; x++) { + for (short y = -1; y < XYmax; y++) { + + short xTem = pos.posX + x; + short yTem = pos.posY + y; + + if (!testBounds(xTem, yTem)) { + continue; + } + + if ((MapTile)(map[xTem][yTem] & LOMASK) >= ROADBASE) { + /* post release */ + map[xTem][yTem] |= BULLBIT; + } + + } + } +} + + +/** + * Repair a zone at \a pos. + * @param pos Center-tile position of the zone. + * @param zCent Value of the center tile. + * @param zSize Size of the zone (in both directions). + */ +void Micropolis::repairZone(const Position &pos, MapTile zCent, short zSize) +{ + MapTile tile = zCent - 2 - zSize; + + // y and x loops one position shifted to compensate for the center-tile position. + for (short y = -1; y < zSize - 1; y++) { + for (short x = -1; x < zSize - 1; x++) { + + int xx = pos.posX + x; + int yy = pos.posY + y; + + tile++; + + if (testBounds(xx, yy)) { + + MapValue mapValue = map[xx][yy]; + + if (mapValue & ZONEBIT) { + continue; + } + + if (mapValue & ANIMBIT) { + continue; + } + + MapTile mapTile = mapValue & LOMASK; + + if (mapTile < RUBBLE || mapTile >= ROADBASE) { + map[xx][yy] = tile | CONDBIT | BURNBIT; + } + } + } + } +} + + +/** + * Update special zones. + * @param pos Position of the zone. + * @param powerOn Zone is powered. + */ +void Micropolis::doSpecialZone(const Position &pos, bool powerOn) +{ + // Bigger numbers reduce chance of nuclear melt down + static const short meltdownTable[3] = { 30000, 20000, 10000 }; + + MapTile tile = map[pos.posX][pos.posY] & LOMASK; + + switch (tile) { + + case POWERPLANT: + + coalPowerPop++; + + if ((cityTime & 7) == 0) { + repairZone(pos, POWERPLANT, 4); /* post */ + } + + pushPowerStack(pos); + coalSmoke(pos); + + return; + + case NUCLEAR: + + assert(LEVEL_COUNT == LENGTH_OF(meltdownTable)); + + if (enableDisasters && !getRandom(meltdownTable[gameLevel])) { + doMeltdown(pos); + return; + } + + nuclearPowerPop++; + + if ((cityTime & 7) == 0) { + repairZone(pos, NUCLEAR, 4); /* post */ + } + + pushPowerStack(pos); + + return; + + case FIRESTATION: { + + int z; + + fireStationPop++; + + if (!(cityTime & 7)) { + repairZone(pos, FIRESTATION, 3); /* post */ + } + + if (powerOn) { + z = fireEffect; /* if powered get effect */ + } else { + z = fireEffect / 2; /* from the funding ratio */ + } + + Position pos2(pos); + bool foundRoad = findPerimeterRoad(&pos2); + + if (!foundRoad) { + z = z / 2; /* post FD's need roads */ + } + + int value = fireStationMap.worldGet(pos2.posX, pos2.posY); + value += z; + fireStationMap.worldSet(pos2.posX, pos2.posY, value); + + return; + } + + case POLICESTATION: { + + int z; + + policeStationPop++; + + if (!(cityTime & 7)) { + repairZone(pos, POLICESTATION, 3); /* post */ + } + + if (powerOn) { + z = policeEffect; + } else { + z = policeEffect / 2; + } + + Position pos2(pos); + bool foundRoad = findPerimeterRoad(&pos2); + + if (!foundRoad) { + z = z / 2; /* post PD's need roads */ + } + + int value = policeStationMap.worldGet(pos2.posX, pos2.posY); + value += z; + policeStationMap.worldSet(pos2.posX, pos2.posY, value); + + return; + } + + case STADIUM: // Empty stadium + + stadiumPop++; + + if (!(cityTime & 15)) { + repairZone(pos, STADIUM, 4); + } + + if (powerOn) { + // Every now and then, display a match + if (((cityTime + pos.posX + pos.posY) & 31) == 0) { + drawStadium(pos, FULLSTADIUM); + map[pos.posX + 1][pos.posY] = FOOTBALLGAME1 + ANIMBIT; + map[pos.posX + 1][pos.posY + 1] = FOOTBALLGAME2 + ANIMBIT; + } + } + + return; + + case FULLSTADIUM: // Full stadium + + stadiumPop++; + + if (((cityTime + pos.posX + pos.posY) & 7) == 0) { + // Stop the match + drawStadium(pos, STADIUM); + } + + return; + + case AIRPORT: + + airportPop++; + + if ((cityTime & 7) == 0) { + repairZone(pos, AIRPORT, 6); + } + + // If powered, display a rotating radar + if (powerOn) { + if ((map[pos.posX + 1][pos.posY - 1] & LOMASK) == RADAR) { + map[pos.posX + 1][pos.posY - 1] = RADAR0 + ANIMBIT + CONDBIT + BURNBIT; + } + } else { + map[pos.posX + 1][pos.posY - 1] = RADAR + CONDBIT + BURNBIT; + } + + if (powerOn) { // Handle the airport only if there is power + doAirport(pos); + } + + return; + + case PORT: + + seaportPop++; + + if ((cityTime & 15) == 0) { + repairZone(pos, PORT, 4); + } + + // If port has power and there is no ship, generate one + if (powerOn && getSprite(SPRITE_SHIP) == NULL) { + generateShip(); + } + + return; + } +} + + +/** + * Draw a stadium (either full or empty). + * @param center Center tile position of the stadium. + * @param z Base tile value. + * + * @todo Merge with zonePlop()-like function. + */ +void Micropolis::drawStadium(const Position ¢er, MapTile z) +{ + int x, y; + + z = z - 5; + + for (y = center.posY - 1; y < center.posY + 3; y++) { + for (x = center.posX - 1; x < center.posX + 3; x++) { + map[x][y] = z | BNCNBIT; + z++; + } + } + + map[center.posX][center.posY] |= ZONEBIT | PWRBIT; +} + + +/** + * Generate a airplane or helicopter every now and then. + * @param pos Position of the airport to start from. + */ +void Micropolis::doAirport(const Position &pos) +{ + if (getRandom(5) == 0) { + generatePlane(pos); + return; + } + + if (getRandom(12) == 0) { + generateCopter(pos); + } +} + + +/** + * Draw coal smoke tiles around given position (of a coal power plant). + * @param pos Center tile of the coal power plant + */ +void Micropolis::coalSmoke(const Position &pos) +{ + static const short SmTb[4] = { + COALSMOKE1, COALSMOKE2, + COALSMOKE3, COALSMOKE4, + }; + static const short dx[4] = { 1, 2, 1, 2 }; + static const short dy[4] = { -1, -1, 0, 0 }; + + for (short x = 0; x < 4; x++) { + map[pos.posX + dx[x]][pos.posY + dy[x]] = + SmTb[x] | ANIMBIT | CONDBIT | PWRBIT | BURNBIT; + } +} + + +/** + * Perform a nuclear melt-down disaster + * @param pos Position of the nuclear power plant that melts. + */ +void Micropolis::doMeltdown(const Position &pos) +{ + makeExplosion(pos.posX - 1, pos.posY - 1); + makeExplosion(pos.posX - 1, pos.posY + 2); + makeExplosion(pos.posX + 2, pos.posY - 1); + makeExplosion(pos.posX + 2, pos.posY + 2); + + // Whole power plant is at fire + for (int x = pos.posX - 1; x < pos.posX + 3; x++) { + for (int y = pos.posY - 1; y < pos.posY + 3; y++) { + map[x][y] = randomFire(); + } + } + + // Add lots of radiation tiles around the plant + for (int z = 0; z < 200; z++) { + + int x = pos.posX - 20 + getRandom(40); + int y = pos.posY - 15 + getRandom(30); + + if (!testBounds(x, y)) { // Ignore off-map positions + continue; + } + + MapValue t = map[x][y]; + + if (t & ZONEBIT) { + continue; // Ignore zones + } + + if ((t & BURNBIT) || t == DIRT) { + map[x][y] = RADTILE; // Make tile radio-active + } + + } + + // Report disaster to the user + sendMessage(MESSAGE_NUCLEAR_MELTDOWN, pos.posX, pos.posY, true, true); +} + + +//////////////////////////////////////////////////////////////////////// diff --git a/core/sprite.cpp b/core/sprite.cpp new file mode 100644 index 0000000..5cab2c8 --- /dev/null +++ b/core/sprite.cpp @@ -0,0 +1,2039 @@ +/* sprite.cpp + * + * Micropolis, Unix Version. This game was released for the Unix platform + * in or about 1990 and has been modified for inclusion in the One Laptop + * Per Child program. Copyright (C) 1989 - 2007 Electronic Arts Inc. If + * you need assistance with this program, you may contact: + * http://wiki.laptop.org/go/Micropolis or email micropolis@laptop.org. + * + * This program 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. + * + * This program 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 this program. If + * not, see . + * + * ADDITIONAL TERMS per GNU GPL Section 7 + * + * No trademark or publicity rights are granted. This license does NOT + * give you any right, title or interest in the trademark SimCity or any + * other Electronic Arts trademark. You may not distribute any + * modification of this program using the trademark SimCity or claim any + * affliation or association with Electronic Arts Inc. or its employees. + * + * Any propagation or conveyance of this program must include this + * copyright notice and these terms. + * + * If you convey this program (or any modifications of it) and assume + * contractual liability for the program to recipients of it, you agree + * to indemnify Electronic Arts for any liability that those contractual + * assumptions impose on Electronic Arts. + * + * You may not misrepresent the origins of this program; modified + * versions of the program must be marked as such and not identified as + * the original program. + * + * This disclaimer supplements the one included in the General Public + * License. TO THE FULLEST EXTENT PERMISSIBLE UNDER APPLICABLE LAW, THIS + * PROGRAM IS PROVIDED TO YOU "AS IS," WITH ALL FAULTS, WITHOUT WARRANTY + * OF ANY KIND, AND YOUR USE IS AT YOUR SOLE RISK. THE ENTIRE RISK OF + * SATISFACTORY QUALITY AND PERFORMANCE RESIDES WITH YOU. ELECTRONIC ARTS + * DISCLAIMS ANY AND ALL EXPRESS, IMPLIED OR STATUTORY WARRANTIES, + * INCLUDING IMPLIED WARRANTIES OF MERCHANTABILITY, SATISFACTORY QUALITY, + * FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT OF THIRD PARTY + * RIGHTS, AND WARRANTIES (IF ANY) ARISING FROM A COURSE OF DEALING, + * USAGE, OR TRADE PRACTICE. ELECTRONIC ARTS DOES NOT WARRANT AGAINST + * INTERFERENCE WITH YOUR ENJOYMENT OF THE PROGRAM; THAT THE PROGRAM WILL + * MEET YOUR REQUIREMENTS; THAT OPERATION OF THE PROGRAM WILL BE + * UNINTERRUPTED OR ERROR-FREE, OR THAT THE PROGRAM WILL BE COMPATIBLE + * WITH THIRD PARTY SOFTWARE OR THAT ANY ERRORS IN THE PROGRAM WILL BE + * CORRECTED. NO ORAL OR WRITTEN ADVICE PROVIDED BY ELECTRONIC ARTS OR + * ANY AUTHORIZED REPRESENTATIVE SHALL CREATE A WARRANTY. SOME + * JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF OR LIMITATIONS ON IMPLIED + * WARRANTIES OR THE LIMITATIONS ON THE APPLICABLE STATUTORY RIGHTS OF A + * CONSUMER, SO SOME OR ALL OF THE ABOVE EXCLUSIONS AND LIMITATIONS MAY + * NOT APPLY TO YOU. + */ + +/** + * @file sprite.cpp + * @brief Manages sprite objects and their behavior in Micropolis. + * + * This file defines functions related to the creation, movement, + * interaction, and destruction of various sprites such as trains, + * helicopters, airplanes, ships, monsters, tornadoes, and explosions + * within the Micropolis game. It handles the logic for sprite + * behavior, including movement patterns, interactions with other + * sprites and the game map, and event-triggered actions like + * explosions and sound effects. + */ + + +//////////////////////////////////////////////////////////////////////// + + +#include "micropolis.h" +#include "text.h" + + +//////////////////////////////////////////////////////////////////////// + + +#define TRA_GROOVE_X -39 +#define TRA_GROOVE_Y 6 +#define BUS_GROOVE_X -39 +#define BUS_GROOVE_Y 6 + + +//////////////////////////////////////////////////////////////////////// + + +/** + * Create and initialize a sprite. + * @param name Name of the sprite (always \c ""). + * @param type Type pf the sprite. @see SpriteType. + * @param x X coordinate of the sprite (in pixels). + * @param y Y coordinate of the sprite (in pixels). + * @return New sprite object. + */ +SimSprite *Micropolis::newSprite(const std::string &name, int type, int x, int y) +{ + SimSprite *sprite; + + // If a sprite is available at the pool, use one. + // else, allocate a new one. + if (freeSprites) { + sprite = freeSprites; + freeSprites = sprite->next; + } else { + sprite = (SimSprite *)newPtr(sizeof (SimSprite)); + } + + sprite->name = name; + sprite->type = type; + + initSprite(sprite, x, y); + + sprite->next = spriteList; + spriteList = sprite; + + return sprite; +} + + +/** Re-initialize an existing sprite. + * @param sprite Sprite to re-use. + * @param x New x coordinate of the sprite (in pixels?). + * @param y New y coordinate of the sprite (in pixels?). + * @todo Make derived classes for each type. + * @todo Move code to (derived) #SimSprite methods. + */ +void Micropolis::initSprite(SimSprite *sprite, int x, int y) +{ + sprite->x = x; + sprite->y = y; + sprite->frame = 0; + sprite->origX = 0; + sprite->origY = 0; + sprite->destX = 0; + sprite->destY = 0; + sprite->count = 0; + sprite->soundCount = 0; + sprite->dir = 0; + sprite->newDir = 0; + sprite->step = 0; + sprite->flag = 0; + sprite->control = -1; + sprite->turn = 0; + sprite->accel = 0; + sprite->speed = 100; + + if (globalSprites[sprite->type] == NULL) { + globalSprites[sprite->type] = sprite; + } + + switch (sprite->type) { + + case SPRITE_TRAIN: + sprite->width = 32; + sprite->height = 32; + sprite->xOffset = 32; + sprite->yOffset = -16; + sprite->xHot = 40; + sprite->yHot = -8; + sprite->frame = 1; + sprite->dir = 4; + break; + + case SPRITE_SHIP: + sprite->width = 48; + sprite->height = 48; + sprite->xOffset = 32; + sprite->yOffset = -16; + sprite->xHot = 48; + sprite->yHot = 0; + + if (x < (4 <<4)) { + sprite->frame = 3; + } else if (x >= ((WORLD_W - 4) <<4)) { + sprite->frame = 7; + } else if (y < (4 <<4)) { + sprite->frame = 5; + } else if (y >= ((WORLD_H - 4) <<4)) { + sprite->frame = 1; + } else { + sprite->frame = 3; + } + + sprite->newDir = sprite->frame; + sprite->dir = 10; + sprite->count = 1; + break; + + case SPRITE_MONSTER: + sprite->width = 48; + sprite->height = 48; + sprite->xOffset = 24; + sprite->yOffset = 0; + sprite->xHot = 40; + sprite->yHot = 16; + + if (x > ((WORLD_W <<4) / 2)) { + if (y > ((WORLD_H <<4) / 2)) { + sprite->frame = 10; + } else { + sprite->frame = 7; + } + } else if (y > ((WORLD_H <<4) / 2)) { + sprite->frame = 1; + } else { + sprite->frame = 4; + } + + sprite->count = 1000; + sprite->destX = pollutionMaxX <<4; + sprite->destY = pollutionMaxY <<4; + sprite->origX = sprite->x; + sprite->origY = sprite->y; + break; + + case SPRITE_HELICOPTER: + sprite->width = 32; + sprite->height = 32; + sprite->xOffset = 32; + sprite->yOffset = -16; + sprite->xHot = 40; + sprite->yHot = -8; + sprite->frame = 5; + sprite->count = 1500; + sprite->destX = getRandom((WORLD_W <<4) - 1); + sprite->destY = getRandom((WORLD_H <<4) - 1); + sprite->origX = x - 30; + sprite->origY = y; + break; + + case SPRITE_AIRPLANE: + sprite->width = 48; + sprite->height = 48; + sprite->xOffset = 24; + sprite->yOffset = 0; + sprite->xHot = 48; + sprite->yHot = 16; + if (x > ((WORLD_W - 20) <<4)) { + sprite->x -= 100 + 48; + sprite->destX = sprite->x - 200; + sprite->frame = 7; + } else { + sprite->destX = sprite->x + 200; + sprite->frame = 11; + } + sprite->destY = sprite->y; + break; + + case SPRITE_TORNADO: + sprite->width = 48; + sprite->height = 48; + sprite->xOffset = 24; + sprite->yOffset = 0; + sprite->xHot = 40; + sprite->yHot = 36; + sprite->frame = 1; + sprite->count = 200; + break; + + case SPRITE_EXPLOSION: + sprite->width = 48; + sprite->height = 48; + sprite->xOffset = 24; + sprite->yOffset = 0; + sprite->xHot = 40; + sprite->yHot = 16; + sprite->frame = 1; + break; + + case SPRITE_BUS: + sprite->width = 32; + sprite->height = 32; + sprite->xOffset = 30; + sprite->yOffset = -18; + sprite->xHot = 40; + sprite->yHot = -8; + sprite->frame = 1; + sprite->dir = 1; + break; + + } +} + + +/** + * Destroy all sprites by de-activating them all (setting their + * SimSprite::frame to 0). + */ +void Micropolis::destroyAllSprites() +{ + SimSprite *sprite; + + for (sprite = spriteList; sprite != NULL; sprite = sprite->next) { + sprite->frame = 0; + } +} + + +/** + * Destroy the sprite by taking it out of the active list. + * @param sprite Sprite to destroy. + * @todo Break the connection between any views that are following this sprite. + */ +void Micropolis::destroySprite(SimSprite *sprite) +{ + SimSprite **sp; + + if (globalSprites[sprite->type] == sprite) { + globalSprites[sprite->type] = (SimSprite *)NULL; + } + + for (sp = &spriteList; *sp != NULL; sp = &((*sp)->next)) { + if (sprite == (*sp)) { + *sp = sprite->next; + break; + } + } + + sprite->next = freeSprites; + freeSprites = sprite; +} + + +/** + * Return the sprite of the give type, if available. + * @param type Type of the sprite. + * @return Pointer to the active sprite if avaiable, else \c NULL. + */ +SimSprite *Micropolis::getSprite(int type) +{ + SimSprite *sprite = globalSprites[type]; + if (sprite == NULL || sprite->frame == 0) { + return (SimSprite *)NULL; + } else { + return sprite; + } +} + + +/** + * Make a sprite either by re-using the old one, or by making a new one. + * @param type Sprite type of the new sprite. + * @param x X coordinate of the new sprite. + * @param y Y coordinate of the new sprite. + */ +SimSprite *Micropolis::makeSprite(int type, int x, int y) +{ + SimSprite *sprite; + + sprite = globalSprites[type]; + if (sprite == NULL) { + sprite = newSprite("", type, x, y); + } else { + initSprite(sprite, x, y); + } + return sprite; +} + + +/** + * Get character from the map. + * @param x X coordinate in pixels. + * @param y Y coordinate in pixels. + * @return Map character if on-map, or \c -1 if off-map. + */ +short Micropolis::getChar(int x, int y) +{ + // Convert sprite coordinates to tile coordinates. + x >>= 4; + y >>= 4; + + if (!testBounds(x, y)) { + return -1; + } else { + return map[x][y] & LOMASK; + } +} + + +/** + * Turn. + * @param p Present direction (1..8). + * @param d Destination direction (1..8). + * @return New direction. + * @todo Remove local magic constants and document the code. + */ +short Micropolis::turnTo(int p, int d) +{ + if (p == d) { + return p; + } + + if (p < d) { + if (d - p < 4) { + p++; + } else { + p--; + } + } else { + if (p - d < 4) { + p--; + } else { + p++; + } + } + + if (p > 8) { + p = 1; + } + + if (p < 1) { + p = 8; + } + + return p; +} + +/** ??? + * @todo Figure out what this function is doing. + * @todo Remove local magic constants and document the code. + */ +bool Micropolis::tryOther(int Tpoo, int Told, int Tnew) +{ + short z; + + z = Told + 4; + + if (z > 8) { + z -= 8; + } + + if (Tnew != z) { + return false; + } + + if (Tpoo == POWERBASE || Tpoo == POWERBASE + 1 + || Tpoo == RAILBASE || Tpoo == RAILBASE + 1) { + return true; + } + + return false; +} + + +/** + * Check whether a sprite is still entirely on-map. + * @param sprite Sprite to check. + * @return Sprite is at least partly off-map. + */ +bool Micropolis::spriteNotInBounds(SimSprite *sprite) +{ + int x = sprite->x + sprite->xHot; + int y = sprite->y + sprite->yHot; + + return x < 0 || y < 0 || x >= (WORLD_W <<4) || y >= (WORLD_H <<4); +} + +/** + * Get direction (0..8?) to get from starting point to destination point. + * @param orgX X coordinate starting point. + * @param orgY Y coordinate starting point. + * @param desX X coordinate destination point. + * @param desY Y coordinate destination point. + * @return Direction to go in. + * @todo Remove local magic constants and document the code. + * @bug Has a condition that never holds. + */ +short Micropolis::getDir(int orgX, int orgY, int desX, int desY) +{ + static const short Gdtab[13] = { 0, 3, 2, 1, 3, 4, 5, 7, 6, 5, 7, 8, 1 }; + int dispX, dispY, z; + + dispX = desX - orgX; + dispY = desY - orgY; + + if (dispX < 0) { + if (dispY < 0) { + z = 11; + } else { + z = 8; + } + } else { + if (dispY < 0) { + z = 2; + } else { + z = 5; + } + } + + dispX = absoluteValue(dispX); + dispY = absoluteValue(dispY); + absDist = dispX + dispY; + + if (dispX * 2 < dispY) { + z++; + } else if (dispY * 2 < dispY) { // XXX This never holds!! + z--; + } + + if (z < 0 || z > 12) { + z = 0; + } + + return Gdtab[z]; +} + + +/** + * Compute Manhattan distance between two points. + * @param x1 X coordinate first point. + * @param y1 Y coordinate first point. + * @param x2 X coordinate second point. + * @param y2 Y coordinate second point. + * @return Manhattan distance between both points. + */ +int Micropolis::getDistance(int x1, int y1, int x2, int y2) +{ + return absoluteValue(x1 - x2) + absoluteValue(y1 - y2); +} + + +/** + * Check whether two sprites collide with each other. + * @param s1 First sprite. + * @param s2 Second sprite. + * @return Sprites are colliding. + */ +bool Micropolis::checkSpriteCollision(SimSprite *s1, SimSprite *s2) +{ + return s1->frame != 0 && s2->frame != 0 && + getDistance(s1->x + s1->xHot, s1->y + s1->yHot, + s2->x + s2->xHot, s2->y + s2->yHot) < 30; +} + + +/** + * Move all sprites. + * + * Sprites with SimSprite::frame == 0 are removed. + * @todo It uses SimSprite::name[0] == '\0' as condition which seems stupid. + * @todo Micropolis::destroySprite modifies the Micropolis::spriteList + * while we loop over it. + */ +void Micropolis::moveObjects() +{ + SimSprite *sprite; + + if (!simSpeed) { + return; + } + + spriteCycle++; + + for (sprite = spriteList; sprite != NULL;) { + if (sprite->frame > 0) { + switch (sprite->type) { + + case SPRITE_TRAIN: + doTrainSprite(sprite); + break; + + case SPRITE_HELICOPTER: + doCopterSprite(sprite); + break; + + case SPRITE_AIRPLANE: + doAirplaneSprite(sprite); + break; + + case SPRITE_SHIP: + doShipSprite(sprite); + break; + + case SPRITE_MONSTER: + doMonsterSprite(sprite); + break; + + case SPRITE_TORNADO: + doTornadoSprite(sprite); + break; + + case SPRITE_EXPLOSION: + doExplosionSprite(sprite); + break; + + case SPRITE_BUS: + doBusSprite(sprite); + break; + + } + + sprite = sprite->next; + + } else { + + if (sprite->name[0] == '\0') { + SimSprite *s = sprite; + sprite = sprite->next; + destroySprite(s); + } else { + sprite = sprite->next; + } + + } + } +} + + +/** + * Move train sprite. + * @param sprite Train sprite. + * @todo Remove local magic constants and document the code. + */ +void Micropolis::doTrainSprite(SimSprite *sprite) +{ + /* Offset in pixels of sprite x and y to map tile */ + static const short Cx[4] = { 0, 16, 0, -16 }; + static const short Cy[4] = { -16, 0, 16, 0 }; + /* X and Y movement of the sprite in pixels */ + static const short Dx[5] = { 0, 4, 0, -4, 0 }; + static const short Dy[5] = { -4, 0, 4, 0, 0 }; + + static const short TrainPic2[5] = { 1, 2, 1, 2, 5 }; + short z, dir, dir2; + short c; + + if (sprite->frame == 3 || sprite->frame == 4) { + sprite->frame = TrainPic2[sprite->dir]; + } + + sprite->x += Dx[sprite->dir]; + sprite->y += Dy[sprite->dir]; + + if ((spriteCycle & 3) == 0) { + + dir = getRandom16() & 3; + for (z = dir; z < dir + 4; z++) { + dir2 = z & 3; + + if (sprite->dir != 4) { + if (dir2 == ((sprite->dir + 2) & 3)) { + continue; + } + } + + c = getChar(sprite->x + Cx[dir2] + 48, sprite->y + Cy[dir2]); + + if ((c >= RAILBASE && c <= LASTRAIL) /* track? */ + || c == RAILVPOWERH || c == RAILHPOWERV) { + + if (sprite->dir != dir2 && sprite->dir != 4) { + + if (sprite->dir + dir2 == 3) { + sprite->frame = 3; + } else { + sprite->frame = 4; + } + + } else { + sprite->frame = TrainPic2[dir2]; + } + + if (c == HRAIL || c == VRAIL) { + sprite->frame = 5; + } + + sprite->dir = dir2; + return; + } + } + + if (sprite->dir == 4) { + sprite->frame = 0; + return; + } + + sprite->dir = 4; + } +} + +/** + * Move helicopter sprite. + * @param sprite Helicopter sprite. + * @todo Remove local magic constants and document the code. + */ +void Micropolis::doCopterSprite( + SimSprite *sprite) +{ + static const short CDx[9] = { 0, 0, 3, 5, 3, 0, -3, -5, -3 }; + static const short CDy[9] = { 0, -5, -3, 0, 3, 5, 3, 0, -3 }; + + if (sprite->soundCount > 0) { + sprite->soundCount--; + } + + if (sprite->control < 0) { + + if (sprite->count > 0) { + sprite->count--; + } + + if (sprite->count == 0) { + + /* Attract copter to monster so it blows up more often */ + SimSprite *s = getSprite(SPRITE_MONSTER); + + if (s != NULL) { + sprite->destX = s->x; + sprite->destY = s->y; + } else { + + /* Attract copter to tornado so it blows up more often */ + s = getSprite(SPRITE_TORNADO); + + if (s != NULL) { + sprite->destX = s->x; + sprite->destY = s->y; + } else { + sprite->destX = sprite->origX; + sprite->destY = sprite->origY; + } + + } + } + + if (sprite->count == 0) { /* land */ + getDir(sprite->x, sprite->y, sprite->origX, sprite->origY); + + if (absDist < 30) { + sprite->frame = 0; + return; + } + + } + + } else { + + getDir(sprite->x, sprite->y, sprite->destX, sprite->destY); + + if (absDist < 16) { + sprite->destX = sprite->origX; + sprite->destY = sprite->origY; + sprite->control = -1; + } + + } + + if (sprite->soundCount == 0) { /* send report */ + + // Convert sprite coordinates to world coordinates. + short x = (sprite->x + 48) / 16; + short y = sprite->y / 16; + + if (x >= 0 && x < WORLD_W && y >= 0 && y < WORLD_H) { + + /* Don changed from 160 to 170 to shut the #$%#$% thing up! */ + + int chopperX = x + 1; + int chopperY = y + 1; + if (trafficDensityMap.worldGet(x, y) > 170 && (getRandom16() & 7) == 0) { + sendMessage(MESSAGE_HEAVY_TRAFFIC, chopperX, chopperY, true); + makeSound("city", "HeavyTraffic", chopperX, chopperY); /* chopper */ + sprite->soundCount = 200; + } + + } + + } + + short z = sprite->frame; + + if ((spriteCycle & 3) == 0) { + short d = getDir(sprite->x, sprite->y, sprite->destX, sprite->destY); + z = turnTo(z, d); + sprite->frame = z; + } + + sprite->x += CDx[z]; + sprite->y += CDy[z]; +} + + +/** + * Move airplane sprite. + * @param sprite Airplane sprite. + * @todo Remove local magic constants and document the code. + * @todo absDist gets updated by Micropolis::getDir(), which is not always + * called before reading it (or worse, we just turned towards the old + * destination). + */ +void Micropolis::doAirplaneSprite( + SimSprite *sprite) +{ + static const short CDx[12] = { 0, 0, 6, 8, 6, 0, -6, -8, -6, 8, 8, 8 }; + static const short CDy[12] = { 0, -8, -6, 0, 6, 8, 6, 0, -6, 0, 0, 0 }; + + short z = sprite->frame; + + if ((spriteCycle % 5) == 0) { + + if (z > 8) { /* TakeOff */ + z--; + if (z < 9) { + z = 3; + } + sprite->frame = z; + } else { /* goto destination */ + short d = getDir(sprite->x, sprite->y, sprite->destX, sprite->destY); + z = turnTo(z, d); + sprite->frame = z; + } + + } + + if (absDist < 50) { /* at destination */ + sprite->destX = getRandom((WORLD_W * 16) + 100) - 50; + sprite->destY = getRandom((WORLD_H * 16) + 100) - 50; + } + + /* deh added test for enableDisasters */ + if (enableDisasters) { + SimSprite *s; + bool explode = false; + + /* Check whether another sprite is near enough to collide with */ + for (s = spriteList; s != NULL; s = s->next) { + if (s->frame == 0 || s == sprite) { + /* Non-active sprite, or self: skip */ + continue; + } + + if ((s->type == SPRITE_HELICOPTER || s->type == SPRITE_AIRPLANE) + && checkSpriteCollision(sprite, s)) { + explodeSprite(s); + explode = true; + } + } + + if (explode) { + explodeSprite(sprite); + } + } + + sprite->x += CDx[z]; + sprite->y += CDy[z]; + + if (spriteNotInBounds(sprite)) { + sprite->frame = 0; + } +} + + +/** + * Move ship sprite. + * @param sprite Ship sprite. + * @todo Remove local magic constants and document the code. + */ +void Micropolis::doShipSprite(SimSprite *sprite) +{ + static const short BDx[9] = { 0, 0, 1, 1, 1, 0, -1, -1, -1 }; + static const short BDy[9] = { 0, -1, -1, 0, 1, 1, 1, 0, -1 }; + static const short BPx[9] = { 0, 0, 2, 2, 2, 0, -2, -2, -2 }; + static const short BPy[9] = { 0, -2, -2, 0, 2, 2, 2, 0, -2 }; + static const short BtClrTab[8] = { RIVER, CHANNEL, POWERBASE, POWERBASE + 1, + RAILBASE, RAILBASE + 1, BRWH, BRWV }; + short x, y, z, t = RIVER; + short tem, pem; + + if (sprite->soundCount > 0) { + sprite->soundCount--; + } + + if (!sprite->soundCount) { + + if ((getRandom16() & 3) == 1) { + + // Convert sprite coordinates to tile coordinates. + int shipX = sprite->x >>4; + int shipY = sprite->y >>4; + + if (scenario == SC_SAN_FRANCISCO && getRandom(10) < 5) { + makeSound("city", "FogHornLow", shipX, shipY); + } else { + makeSound("city", "HonkHonkLow", shipX, shipY); + } + + } + + sprite->soundCount = 200; + } + + if (sprite->count > 0) { + sprite->count--; + } + + if (sprite->count == 0) { + + sprite->count = 9; + + if (sprite->frame != sprite->newDir) { + sprite->frame = turnTo(sprite->frame, sprite->newDir); + return; + } + + tem = getRandom16() & 7; + + for (pem = tem; pem < (tem + 8); pem++) { + + z = (pem & 7) + 1; + + if (z == sprite->dir) { + continue; + } + + x = ((sprite->x + (48 - 1)) >>4) + BDx[z]; + y = (sprite->y >>4) + BDy[z]; + + if (testBounds(x, y)) { + + t = map[x][y] & LOMASK; + + if (t == CHANNEL || t == BRWH || t == BRWV + || tryOther(t, sprite->dir, z)) { + + sprite->newDir = z; + sprite->frame = turnTo(sprite->frame, sprite->newDir); + sprite->dir = z + 4; + + if (sprite->dir > 8) { + sprite->dir -= 8; + } + + break; + } + } + } + + if (pem == (tem + 8)) { + sprite->dir = 10; + sprite->newDir = (getRandom16() & 7) + 1; + } + + } else { + + z = sprite->frame; + + if (z == sprite->newDir) { + sprite->x += BPx[z]; + sprite->y += BPy[z]; + } + } + + if (spriteNotInBounds(sprite)) { + sprite->frame = 0; + return; + } + + for (z = 0; z < 8; z++) { + + if (t == BtClrTab[z]) { + break; + } + + if (z == 7) { + explodeSprite(sprite); + destroyMapTile(sprite->x + 48, sprite->y); + } + + } +} + + +/** + * Move monster sprite. + * + * There are 16 monster sprite frames: + * + * Frame 0: NorthEast Left Foot + * Frame 1: NorthEast Both Feet + * Frame 2: NorthEast Right Foot + * Frame 3: SouthEast Right Foot + * Frame 4: SouthEast Both Feet + * Frame 5: SouthEast Left Foot + * Frame 6: SouthWest Right Foot + * Frame 7: SouthWest Both Feet + * Frame 8: SouthWest Left Foot + * Frame 9: NorthWest Left Foot + * Frame 10: NorthWest Both Feet + * Frame 11: NorthWest Right Foot + * Frame 12: North Left Foot + * Frame 13: East Left Foot + * Frame 14: South Right Foot + * Frame 15: West Right Foot + * + * @param sprite Monster sprite. + * @todo Remove local magic constants and document the code. + */ +void Micropolis::doMonsterSprite(SimSprite *sprite) +{ + static const short Gx[5] = { 2, 2, -2, -2, 0 }; + static const short Gy[5] = { -2, 2, 2, -2, 0 }; + static const short ND1[4] = { 0, 1, 2, 3 }; + static const short ND2[4] = { 1, 2, 3, 0 }; + static const short nn1[4] = { 2, 5, 8, 11 }; + static const short nn2[4] = { 11, 2, 5, 8 }; + short d, z, c; + + if (sprite->soundCount > 0) { + sprite->soundCount--; + } + + if (sprite->control < 0) { + /* business as usual */ + + if (sprite->control == -2) { + + d = (sprite->frame - 1) / 3; + z = (sprite->frame - 1) % 3; + + if (z == 2) { + sprite->step = 0; + } + + if (z == 0) { + sprite->step = 1; + } + + if (sprite->step) { + z++; + } else { + z--; + } + + c = getDir(sprite->x, sprite->y, sprite->destX, sprite->destY); + + if (absDist < 18) { + + sprite->control = -1; + sprite->count = 1000; + sprite->flag = 1; + sprite->destX = sprite->origX; + sprite->destY = sprite->origY; + + } else { + + c = (c - 1) / 2; + + if ((c != d && getRandom(5) == 0) || getRandom(20) == 0) { + + int diff = (c - d) & 3; + + if (diff == 1 || diff == 3) { + d = c; + } else { + + if (getRandom16() & 1) { + d++; + } else { + d--; + } + + d &= 3; + } + } else { + + if (getRandom(20) == 0) { + + if (getRandom16() & 1) { + d++; + } else { + d--; + } + + d &= 3; + } + } + } + } else { + + d = (sprite->frame - 1) / 3; + + if (d < 4) { /* turn n s e w */ + + z = (sprite->frame - 1) % 3; + + if (z == 2) { + sprite->step = 0; + } + + if (z == 0) { + sprite->step = 1; + } + + if (sprite->step) { + z++; + } else { + z--; + } + + getDir(sprite->x, sprite->y, sprite->destX, sprite->destY); + + if (absDist < 60) { + + if (sprite->flag == 0) { + + sprite->flag = 1; + sprite->destX = sprite->origX; + sprite->destY = sprite->origY; + + } else { + + sprite->frame = 0; + return; + + } + + } + + c = getDir(sprite->x, sprite->y, sprite->destX, sprite->destY); + c = (c - 1) / 2; + + if ((c != d) && (!getRandom(10))) { + + if (getRandom16() & 1) { + z = ND1[d]; + } else { + z = ND2[d]; + } + + d = 4; + + if (!sprite->soundCount) { + // Convert sprite coordinates to tile coordinates. + int monsterX = sprite->x >>4; + int monsterY = sprite->y >>4; + makeSound("city", "Monster", monsterX, monsterY); /* monster */ + sprite->soundCount = 50 + getRandom(100); + } + + } + + } else { + + d = 4; + c = sprite->frame; + z = (c - 13) & 3; + + if (!(getRandom16() & 3)) { + + if (getRandom16() & 1) { + z = nn1[z]; + } else { + z = nn2[z]; + } + + d = (z - 1) / 3; + z = (z - 1) % 3; + + } + + } + + } + + } else { + + /* somebody's taken control of the monster */ + + d = sprite->control; + z = (sprite->frame - 1) % 3; + + if (z == 2) { + sprite->step = 0; + } + + if (z == 0) { + sprite->step = 1; + } + + if (sprite->step) { + z++; + } else { + z--; + } + + } + + z = d * 3 + z + 1; + + if (z > 16) { + z = 16; + } + + sprite->frame = z; + + sprite->x += Gx[d]; + sprite->y += Gy[d]; + + if (sprite->count > 0) { + sprite->count--; + } + + c = getChar(sprite->x + sprite->xHot, sprite->y + sprite->yHot); + + if (c == -1 + || (c == RIVER && sprite->count != 0 && sprite->control == -1)) { + sprite->frame = 0; /* kill scary monster */ + } + + { + SimSprite *s; + for (s = spriteList; s != NULL; s = s->next) { + if (s->frame != 0 && + (s->type == SPRITE_AIRPLANE || s->type == SPRITE_HELICOPTER + || s->type == SPRITE_SHIP || s->type == SPRITE_TRAIN) && + checkSpriteCollision(sprite, s)) { + explodeSprite(s); + } + } + } + + destroyMapTile(sprite->x + 48, sprite->y + 16); +} + +/** + * Move tornado. + * @param sprite Tornado sprite to move. + * @todo Remove local magic constants and document the code. + */ +void Micropolis::doTornadoSprite(SimSprite *sprite) +{ + static const short CDx[9] = { 2, 3, 2, 0, -2, -3 }; + static const short CDy[9] = { -2, 0, 2, 3, 2, 0 }; + short z; + + z = sprite->frame; + + if (z == 2) { + + /* cycle animation... post Rel */ + + if (sprite->flag) { + z = 3; + } else { + z = 1; + } + + } else { + + if (z == 1) { + sprite->flag = 1; + } else { + sprite->flag = 0; + } + + z = 2; + } + + if (sprite->count > 0) { + sprite->count--; + } + + sprite->frame = z; + + { + SimSprite *s; + for (s = spriteList; s != NULL; s = s->next) { + if (s->frame != 0 && + (s->type == SPRITE_AIRPLANE || s->type == SPRITE_HELICOPTER + || s->type == SPRITE_SHIP || s->type == SPRITE_TRAIN) && + checkSpriteCollision(sprite, s)) { + explodeSprite(s); + } + } + } + + z = getRandom(5); + sprite->x += CDx[z]; + sprite->y += CDy[z]; + + if (spriteNotInBounds(sprite)) { + sprite->frame = 0; + } + + if (sprite->count != 0 && getRandom(500) == 0) { + sprite->frame = 0; + } + + destroyMapTile(sprite->x + 48, sprite->y + 40); +} + + +/** + * 'Move' fire sprite. + * @param sprite Fire sprite. + */ +void Micropolis::doExplosionSprite(SimSprite *sprite) +{ + short x, y; + + if ((spriteCycle & 1) == 0) { + + if (sprite->frame == 1) { + // Convert sprite coordinates to tile coordinates. + int explosionX = sprite->x >>4; + int explosionY = sprite->y >>4; + makeSound("city", "ExplosionHigh", explosionX, explosionY); /* explosion */ + x = (sprite->x >>4) + 3; + y = (sprite->y >>4); + sendMessage(MESSAGE_EXPLOSION_REPORTED, x, y); + } + + sprite->frame++; + } + + if (sprite->frame > 6) { + sprite->frame = 0; + + startFire(sprite->x + 48 - 8, sprite->y + 16); + startFire(sprite->x + 48 - 24, sprite->y); + startFire(sprite->x + 48 + 8, sprite->y); + startFire(sprite->x + 48 - 24, sprite->y + 32); + startFire(sprite->x + 48 + 8, sprite->y + 32); + } +} + + +/** + * Move bus sprite. + * @param sprite Bus sprite. + * @todo Remove local magic constants and document the code. + */ +void Micropolis::doBusSprite(SimSprite *sprite) +{ + static const short Dx[5] = { 0, 1, 0, -1, 0 }; + static const short Dy[5] = { -1, 0, 1, 0, 0 }; + static const short Dir2Frame[4] = { 1, 2, 1, 2 }; + int dx, dy, tx, ty, otx, oty; + int turned = 0; + int speed = 0; + int z; + +#ifdef DEBUGBUS + printf("Bus dir %d turn %d frame %d\n", + sprite->dir, sprite->turn, sprite->frame); +#endif + + if (sprite->turn) { + + if (sprite->turn < 0) { /* ccw */ + + if (sprite->dir & 1) { /* up or down */ + sprite->frame = 4; + } else { /* left or right */ + sprite->frame = 3; + } + + sprite->turn++; + sprite->dir = (sprite->dir - 1) & 3; + + } else { /* cw */ + + if (sprite->dir & 1) { /* up or down */ + sprite->frame = 3; + } else { /* left or right */ + sprite->frame = 4; + } + + sprite->turn--; + sprite->dir = (sprite->dir + 1) & 3; + + } + + turned = 1; + + } else { + + /* finish turn */ + if ((sprite->frame == 3) || + (sprite->frame == 4)) { + turned = 1; + sprite->frame = Dir2Frame[sprite->dir]; + } + } + + if (sprite->speed == 0) { + + /* brake */ + dx = 0; dy = 0; + + } else { /* cruise at traffic speed */ + + tx = (sprite->x + sprite->xHot) >>5; + ty = (sprite->y + sprite->yHot) >>5; + + if (tx >= 0 && tx < WORLD_W_2 && ty >= 0 && ty < WORLD_H_2) { + + z = trafficDensityMap.worldGet(tx << 1, ty << 1) >>6; + + if (z > 1) { + z--; + } + + } else { + + z = 0; + + } + + switch (z) { + + case 0: + speed = 8; + break; + + case 1: + speed = 4; + break; + + case 2: + speed = 1; + break; + + } + + /* govern speed */ + if (speed > sprite->speed) { + speed = sprite->speed; + } + + if (turned) { + +#ifdef DEBUGBUS + printf("turned\n"); +#endif + + if (speed > 1) { + speed = 1; + } + + dx = Dx[sprite->dir] * speed; + dy = Dy[sprite->dir] * speed; + + } else { + + dx = Dx[sprite->dir] * speed; + dy = Dy[sprite->dir] * speed; + + tx = (sprite->x + sprite->xHot) >>4; + ty = (sprite->y + sprite->yHot) >>4; + + /* drift into the right lane */ + switch (sprite->dir) { + + case 0: /* up */ + + z = ((tx <<4) + 4) - (sprite->x + sprite->xHot); + + if (z < 0) { + dx = -1; + } else if (z > 0) { + dx = 1; + } + +#ifdef DEBUGBUS + printf("moving up x %x z %d dx %d\n", sprite->x + sprite->xHot, z, dx); +#endif + + break; + + case 1: /* right */ + + z = ((ty <<4) + 4) - (sprite->y + sprite->yHot); + + if (z < 0) { + dy = -1; + } else if (z > 0) { + dy = 1; + } + +#ifdef DEBUGBUS + printf("moving right y %x z %d dy %d\n", sprite->y + sprite->yHot, z, dy); +#endif + + break; + + case 2: /* down */ + + z = (tx <<4) - (sprite->x + sprite->xHot); + + if (z < 0) { + dx = -1; + } else if (z > 0) { + dx = 1; + } + +#ifdef DEBUGBUS + printf("moving down x %x z %d dx %d\n", sprite->x + sprite->xHot, z, dx); +#endif + + break; + + case 3: /* left */ + + z = (ty <<4) - (sprite->y + sprite->yHot); + + if (z < 0) { + dy = -1; + } else if (z > 0) { + dy = 1; + } + +#ifdef DEBUGBUS + printf("moving left y %x z %d dy %d\n", sprite->y + sprite->yHot, z, dy); +#endif + + break; + } + } + } + +#ifdef DEBUGBUS + printf("speed dx %d dy %d\n", dx, dy); +#endif + +#define AHEAD 8 + + otx = (sprite->x + sprite->xHot + (Dx[sprite->dir] * AHEAD)) >>4; + oty = (sprite->y + sprite->yHot + (Dy[sprite->dir] * AHEAD)) >>4; + + otx = clamp(otx, 0, WORLD_W - 1); + oty = clamp(oty, 0, WORLD_H - 1); + + tx = (sprite->x + sprite->xHot + dx + (Dx[sprite->dir] * AHEAD)) >>4; + ty = (sprite->y + sprite->yHot + dy + (Dy[sprite->dir] * AHEAD)) >>4; + + tx = clamp(tx, 0, WORLD_W - 1); + ty = clamp(ty, 0, WORLD_H - 1); + + if (tx != otx || ty != oty) { + +#ifdef DEBUGBUS + printf("drive from tile %d %d to %d %d\n", + otx, oty, tx, ty); +#endif + + z = canDriveOn(tx, ty); + + if (z == 0) { + + /* can't drive forward into a new tile */ + if (speed == 8) { + bulldozerTool(tx, ty); + } else { + } + + } else { + + /* drive forward into a new tile */ + if (z > 0) { + /* smooth */ + } else { + /* bumpy */ + dx /= 2; + dy /= 2; + } + + } + } + + tx = (sprite->x + sprite->xHot + dx) >>4; + ty = (sprite->y + sprite->yHot + dy) >>4; + + z = canDriveOn(tx, ty); + + if (z > 0) { + /* cool, cruise along */ + } else { + if (z < 0) { + /* bumpy */ + } else { + /* something in the way */ + } + } + + sprite->x += dx; + sprite->y += dy; + + if (enableDisasters) { + SimSprite *s; + int explode = 0; + + for (s = spriteList; s != NULL; s = s->next) { + if (sprite != s && s->frame != 0 + && (s->type == SPRITE_BUS + || (s->type == SPRITE_TRAIN && s->frame != 5)) + && checkSpriteCollision(sprite, s)) { + explodeSprite(s); + explode = 1; + } + } + + if (explode) { + explodeSprite(sprite); + } + + } +} + + +/** + * Can one drive at the specified tile? + * @param x X coordinate at map. + * @param y Y coordinate at map. + * @return 0 if not, 1 if you can, -1 otherwise + */ +int Micropolis::canDriveOn(int x, int y) +{ + int tile; + + if (!testBounds(x, y)) { + return 0; + } + + tile = map[x][y] & LOMASK; + + if ((tile >= ROADBASE && tile <= LASTROAD && tile != BRWH && tile != BRWV) + || tile == HRAILROAD || tile == VRAILROAD) { + return 1; + } + + if (tile == DIRT || tally(tile)) { + return -1; + } + + return 0; +} + + +/** + * Handle explosion of sprite (mostly due to collision?). + * @param sprite that should explode. + * @todo Add a 'bus crashed' message to #MessageNumber. + */ +void Micropolis::explodeSprite(SimSprite *sprite) +{ + int x, y; + + sprite->frame = 0; + + x = sprite->x + sprite->xHot; + y = sprite->y + sprite->yHot; + makeExplosionAt(x, y); + + x = (x >>4); + y = (y >>4); + + switch (sprite->type) { + + case SPRITE_AIRPLANE: + sendMessage(MESSAGE_PLANE_CRASHED, x, y, true); + break; + + case SPRITE_SHIP: + sendMessage(MESSAGE_SHIP_CRASHED, x, y, true); + break; + + case SPRITE_TRAIN: + sendMessage(MESSAGE_TRAIN_CRASHED, x, y, true); + break; + + case SPRITE_HELICOPTER: + sendMessage(MESSAGE_HELICOPTER_CRASHED, x, y, true); + break; + + case SPRITE_BUS: + sendMessage(MESSAGE_TRAIN_CRASHED, x, y, true); /* XXX for now */ + break; + + } + + // Convert sprite coordinates to tile coordinates. + makeSound("city", "ExplosionHigh", x, y); /* explosion */ + + return; +} + + +bool Micropolis::checkWet(int x) +{ + if (x == HPOWER || x == VPOWER || x == HRAIL || x == VRAIL + || x == BRWH || x == BRWV) { + return true; + } else { + return false; + } +} + + +/** + * Destroy a map tile. + * @param ox X coordinate in pixels. + * @param oy Y coordinate in pixels. + */ +void Micropolis::destroyMapTile(int ox, int oy) +{ + short t, z, x, y; + + x = ox >>4; + y = oy >>4; + + if (!testBounds(x, y)) { + return; + } + + z = map[x][y]; + t = z & LOMASK; + + if (t >= TREEBASE) { + if (!(z & BURNBIT)) { + + if (t >= ROADBASE && t <= LASTROAD) { + map[x][y] = RIVER; + } + + return; + } + + if (z & ZONEBIT) { + + startFireInZone(x, y, z); + + if (t > RZB) { + makeExplosionAt(ox, oy); + } + + } + + if (checkWet(t)) { + map[x][y] = RIVER; + } else { + map[x][y] = (doAnimation ? TINYEXP : (LASTTINYEXP - 3)) + | BULLBIT | ANIMBIT; + } + } +} + + +/** + * Start a fire in a zone. + * @param Xloc X coordinate in map coordinate. + * @param Yloc Y coordinate in map coordinate. + * @param ch Map character at (\a Xloc, \a Yloc). + */ +void Micropolis::startFireInZone(int Xloc, int Yloc, int ch) +{ + short Xtem, Ytem; + short x, y, XYmax; + + int value = rateOfGrowthMap.worldGet(Xloc, Yloc); + value = clamp(value - 20, -200, 200); + rateOfGrowthMap.worldSet(Xloc, Yloc, value); + + ch &= LOMASK; + + if (ch < PORTBASE) { + XYmax = 2; + } else { + if (ch == AIRPORT) { + XYmax = 5; + } else { + XYmax = 4; + } + } + + for (x = -1; x < XYmax; x++) { + for (y = -1; y < XYmax; y++) { + + Xtem = Xloc + x; + Ytem = Yloc + y; + + if (testBounds(Xtem, Ytem) && (map[Xtem][Ytem] & LOMASK) >= ROADBASE) { + map[Xtem][Ytem] |= BULLBIT; + } + + } + } +} + + +/** + * Start a fire at a single tile. + * @param x X coordinate in map coordinate. + * @param y Y coordinate in map coordinate. + */ +void Micropolis::startFire(int x, int y) +{ + int t, z; + + x >>= 4; + y >>= 4; + + if (!testBounds(x, y)) { + return; + } + + z = map[x][y]; + t = z & LOMASK; + + if (!(z & BURNBIT) && t != DIRT) { + return; + } + + if (z & ZONEBIT) { + return; + } + + map[x][y] = randomFire(); +} + + +/** + * Try to start a new train sprite at the given map tile. + * @param x X coordinate in map coordinate. + * @param y Y coordinate in map coordinate. + */ +void Micropolis::generateTrain(int x, int y) +{ + if (totalPop > 20 && getSprite(SPRITE_TRAIN) == NULL && getRandom(25) == 0) { + makeSprite(SPRITE_TRAIN, (x <<4) + TRA_GROOVE_X, (y <<4) + TRA_GROOVE_Y); + } +} + + +/** + * Try to start a new bus sprite at the given map tile. + * @param x X coordinate in map coordinate. + * @param y Y coordinate in map coordinate. + */ +void Micropolis::generateBus(int x, int y) +{ + if (getSprite(SPRITE_BUS) == NULL && getRandom(25) == 0) { + makeSprite(SPRITE_BUS, (x <<4) + BUS_GROOVE_X, (y <<4) + BUS_GROOVE_Y); + } +} + + +/** Try to construct a new ship sprite */ +void Micropolis::generateShip() +{ + short x, y; + + if (!(getRandom16() & 3)) { + for (x = 4; x < WORLD_W - 2; x++) { + if (map[x][0] == CHANNEL) { + makeShipHere(x, 0); + return; + } + } + } + + if (!(getRandom16() & 3)) { + for (y = 1; y < WORLD_H - 2; y++) { + if (map[0][y] == CHANNEL) { + makeShipHere(0, y); + return; + } + } + } + + if (!(getRandom16() & 3)) { + for (x = 4; x < WORLD_W - 2; x++) { + if (map[x][WORLD_H - 1] == CHANNEL) { + makeShipHere(x, WORLD_H - 1); + return; + } + } + } + + if (!(getRandom16() & 3)) { + for (y = 1; y < WORLD_H - 2; y++) { + if (map[WORLD_W - 1][y] == CHANNEL) { + makeShipHere(WORLD_W - 1, y); + return; + } + } + } +} + + +/** + * Start a new ship sprite at the given map tile. + * @param x X coordinate in map coordinate. + * @param y Y coordinate in map coordinate. + */ +void Micropolis::makeShipHere(int x, int y) +{ + makeSprite(SPRITE_SHIP, (x <<4) - (48 - 1), (y <<4)); +} + + +/** + * Start a new monster sprite. + * @todo Make monster over land, because it disappears if it's made over water. + * Better yet make monster not disappear for a while after it's created, + * over land or water. Should never disappear prematurely. + */ +void Micropolis::makeMonster() +{ + int x, y, z, done = 0; + SimSprite *sprite; + + sprite = getSprite(SPRITE_MONSTER); + if (sprite != NULL) { + sprite->soundCount = 1; + sprite->count = 1000; + sprite->destX = pollutionMaxX <<4; + sprite->destY = pollutionMaxY <<4; + return; + } + + for (z = 0; z < 300; z++) { + + x = getRandom(WORLD_W - 20) + 10; + y = getRandom(WORLD_H - 10) + 5; + + if (map[x][y] == RIVER || map[x][y] == RIVER + BULLBIT) { + makeMonsterAt(x, y); + done = 1; + break; + } + + } + + if (!done) { + makeMonsterAt(60, 50); + } + +} + + +/** + * Start a new monster sprite at the given map tile. + * @param x X coordinate in map coordinate. + * @param y Y coordinate in map coordinate. + */ +void Micropolis::makeMonsterAt(int x, int y) +{ + makeSprite(SPRITE_MONSTER, (x << 4) + 48, (y << 4)); + sendMessage(MESSAGE_MONSTER_SIGHTED, x + 5, y, true, true); +} + + +/** + * Ensure a helicopter sprite exists. + * + * If it does not exist, create one at the given coordinates. + * @param pos Start position in map coordinates. + */ +void Micropolis::generateCopter(const Position &pos) +{ + if (getSprite(SPRITE_HELICOPTER) != NULL) { + return; + } + + makeSprite(SPRITE_HELICOPTER, (pos.posX << 4), (pos.posY << 4) + 30); +} + + +/** + * Ensure an airplane sprite exists. + * + * If it does not exist, create one at the given coordinates. + * @param pos Start position in map coordinates. + */ +void Micropolis::generatePlane(const Position &pos) +{ + if (getSprite(SPRITE_AIRPLANE) != NULL) { + return; + } + + makeSprite(SPRITE_AIRPLANE, (pos.posX <<4) + 48, (pos.posY <<4) + 12); +} + + +/** Ensure a tornado sprite exists. */ +void Micropolis::makeTornado() +{ + short x, y; + SimSprite *sprite; + + sprite = getSprite(SPRITE_TORNADO); + if (sprite != NULL) { + sprite->count = 200; + return; + } + + x = getRandom((WORLD_W <<4) - 800) + 400; + y = getRandom((WORLD_H <<4) - 200) + 100; + + makeSprite(SPRITE_TORNADO, x, y); + sendMessage(MESSAGE_TORNADO_SIGHTED, (x >>4) + 3, (y >>4) + 2, true, true); +} + + +/** + * Construct an explosion sprite. + * @param x X coordinate of the explosion (in map coordinates). + * @param y Y coordinate of the explosion (in map coordinates). + */ +void Micropolis::makeExplosion(int x, int y) +{ + if (testBounds(x, y)) { + makeExplosionAt((x << 4) + 8, (y << 4) + 8); + } +} + + +/** + * Construct an explosion sprite. + * @param x X coordinate of the explosion (in pixels). + * @param y Y coordinate of the explosion (in pixels). + */ +void Micropolis::makeExplosionAt( int x, int y) +{ + newSprite("", SPRITE_EXPLOSION, x - 40, y - 16); +} + + +//////////////////////////////////////////////////////////////////////// diff --git a/core/text.h b/core/text.h new file mode 100644 index 0000000..2019577 --- /dev/null +++ b/core/text.h @@ -0,0 +1,178 @@ +/* text.h + * + * Micropolis, Unix Version. This game was released for the Unix platform + * in or about 1990 and has been modified for inclusion in the One Laptop + * Per Child program. Copyright (C) 1989 - 2007 Electronic Arts Inc. If + * you need assistance with this program, you may contact: + * http://wiki.laptop.org/go/Micropolis or email micropolis@laptop.org. + * + * This program 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. + * + * This program 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 this program. If + * not, see . + * + * ADDITIONAL TERMS per GNU GPL Section 7 + * + * No trademark or publicity rights are granted. This license does NOT + * give you any right, title or interest in the trademark SimCity or any + * other Electronic Arts trademark. You may not distribute any + * modification of this program using the trademark SimCity or claim any + * affliation or association with Electronic Arts Inc. or its employees. + * + * Any propagation or conveyance of this program must include this + * copyright notice and these terms. + * + * If you convey this program (or any modifications of it) and assume + * contractual liability for the program to recipients of it, you agree + * to indemnify Electronic Arts for any liability that those contractual + * assumptions impose on Electronic Arts. + * + * You may not misrepresent the origins of this program; modified + * versions of the program must be marked as such and not identified as + * the original program. + * + * This disclaimer supplements the one included in the General Public + * License. TO THE FULLEST EXTENT PERMISSIBLE UNDER APPLICABLE LAW, THIS + * PROGRAM IS PROVIDED TO YOU "AS IS," WITH ALL FAULTS, WITHOUT WARRANTY + * OF ANY KIND, AND YOUR USE IS AT YOUR SOLE RISK. THE ENTIRE RISK OF + * SATISFACTORY QUALITY AND PERFORMANCE RESIDES WITH YOU. ELECTRONIC ARTS + * DISCLAIMS ANY AND ALL EXPRESS, IMPLIED OR STATUTORY WARRANTIES, + * INCLUDING IMPLIED WARRANTIES OF MERCHANTABILITY, SATISFACTORY QUALITY, + * FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT OF THIRD PARTY + * RIGHTS, AND WARRANTIES (IF ANY) ARISING FROM A COURSE OF DEALING, + * USAGE, OR TRADE PRACTICE. ELECTRONIC ARTS DOES NOT WARRANT AGAINST + * INTERFERENCE WITH YOUR ENJOYMENT OF THE PROGRAM; THAT THE PROGRAM WILL + * MEET YOUR REQUIREMENTS; THAT OPERATION OF THE PROGRAM WILL BE + * UNINTERRUPTED OR ERROR-FREE, OR THAT THE PROGRAM WILL BE COMPATIBLE + * WITH THIRD PARTY SOFTWARE OR THAT ANY ERRORS IN THE PROGRAM WILL BE + * CORRECTED. NO ORAL OR WRITTEN ADVICE PROVIDED BY ELECTRONIC ARTS OR + * ANY AUTHORIZED REPRESENTATIVE SHALL CREATE A WARRANTY. SOME + * JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF OR LIMITATIONS ON IMPLIED + * WARRANTIES OR THE LIMITATIONS ON THE APPLICABLE STATUTORY RIGHTS OF A + * CONSUMER, SO SOME OR ALL OF THE ABOVE EXCLUSIONS AND LIMITATIONS MAY + * NOT APPLY TO YOU. + */ + +/** + * @file text.h + * @brief Defines string identification numbers for texts used in the + * Micropolis game engine. + * + * This file provides enumerations for identifying various strings and + * messages used within the game. It includes definitions for scoring + * metrics, in-game messages, and notifications. These identifications + * facilitate the retrieval and display of context-specific text, + * contributing to the user interface and game interactions. + */ + + +#ifndef _H_TEXT +#define _H_TEXT + + +//////////////////////////////////////////////////////////////////////// + + +/** String numbers of score card. */ +enum Stri202 { + STR202_POPULATIONDENSITY_LOW = 0, ///< Low + STR202_POPULATIONDENSITY_MEDIUM = 1, ///< Medium + STR202_POPULATIONDENSITY_HIGH = 2, ///< High + STR202_POPULATIONDENSITY_VERYHIGH = 3, ///< Very High + + STR202_LANDVALUE_SLUM = 4, ///< Slum + STR202_LANDVALUE_LOWER_CLASS = 5, ///< Lower Class + STR202_LANDVALUE_MIDDLE_CLASS = 6, ///< Middle Class + STR202_LANDVALUE_HIGH_CLASS = 7, ///< High + + STR202_CRIME_NONE = 8, ///< Safe + STR202_CRIME_LIGHT = 9, ///< Light + STR202_CRIME_MODERATE = 10, ///< Moderate + STR202_CRIME_DANGEROUS = 11, ///< Dangerous + + STR202_POLLUTION_NONE = 12, ///< None + STR202_POLLUTION_MODERATE = 13, ///< Moderate + STR202_POLLUTION_HEAVY = 14, ///< Heavy + STR202_POLLUTION_VERY_HEAVY = 15, ///< Very Heavy + + STR202_GROWRATE_DECLINING = 16, ///< Declining + STR202_GROWRATE_STABLE = 17, ///< Stable + STR202_GROWRATE_SLOWGROWTH = 18, ///< Slow Growth + STR202_GROWRATE_FASTGROWTH = 19, ///< Fast Growth +}; + +/** String numbers of messages. */ +enum MessageNumber { + MESSAGE_NEED_MORE_RESIDENTIAL = 1, ///< More residential zones needed. + MESSAGE_NEED_MORE_COMMERCIAL, ///< More commercial zones needed. + MESSAGE_NEED_MORE_INDUSTRIAL, ///< More industrial zones needed. + MESSAGE_NEED_MORE_ROADS, ///< More roads required. + MESSAGE_NEED_MORE_RAILS, ///< 5: Inadequate rail system. + MESSAGE_NEED_ELECTRICITY, ///< Build a Power Plant. + MESSAGE_NEED_STADIUM, ///< Residents demand a Stadium. + MESSAGE_NEED_SEAPORT, ///< Industry requires a Sea Port. + MESSAGE_NEED_AIRPORT, ///< Commerce requires an Airport. + MESSAGE_HIGH_POLLUTION, ///< 10: Pollution very high. + MESSAGE_HIGH_CRIME, ///< Crime very high. + MESSAGE_TRAFFIC_JAMS, ///< Frequent traffic jams reported. + MESSAGE_NEED_FIRE_STATION, ///< Citizens demand a Fire Department. + MESSAGE_NEED_POLICE_STATION, ///< Citizens demand a Police Department. + MESSAGE_BLACKOUTS_REPORTED, ///< 15: Blackouts reported. Check power map. + MESSAGE_TAX_TOO_HIGH, ///< Citizens upset. The tax rate is too high. + MESSAGE_ROAD_NEEDS_FUNDING, ///< Roads deteriorating, due to lack of funds. + MESSAGE_FIRE_STATION_NEEDS_FUNDING, ///< Fire departments need funding. + MESSAGE_POLICE_NEEDS_FUNDING, ///< Police departments need funding. + MESSAGE_FIRE_REPORTED, ///< 20: Fire reported ! + MESSAGE_MONSTER_SIGHTED, ///< A Monster has been sighted !! + MESSAGE_TORNADO_SIGHTED, ///< Tornado reported !! + MESSAGE_EARTHQUAKE, ///< Major earthquake reported !!! + MESSAGE_PLANE_CRASHED, ///< A plane has crashed ! + MESSAGE_SHIP_CRASHED, ///< 25: Shipwreck reported ! + MESSAGE_TRAIN_CRASHED, ///< A train crashed ! + MESSAGE_HELICOPTER_CRASHED, ///< A helicopter crashed ! + MESSAGE_HIGH_UNEMPLOYMENT, ///< Unemployment rate is high. + MESSAGE_NO_MONEY, ///< YOUR CITY HAS GONE BROKE! + MESSAGE_FIREBOMBING, ///< 30: Firebombing reported ! + MESSAGE_NEED_MORE_PARKS, ///< Need more parks. + MESSAGE_EXPLOSION_REPORTED, ///< Explosion detected ! + MESSAGE_NOT_ENOUGH_FUNDS, ///< Insufficient funds to build that. + MESSAGE_BULLDOZE_AREA_FIRST, ///< Area must be bulldozed first. + MESSAGE_REACHED_TOWN, ///< 35: Population has reached 2,000. + MESSAGE_REACHED_CITY, ///< Population has reached 10,000. + MESSAGE_REACHED_CAPITAL, ///< Population has reached 50,000. + MESSAGE_REACHED_METROPOLIS, ///< Population has reached 100,000. + MESSAGE_REACHED_MEGALOPOLIS, ///< Population has reached 500,000. + MESSAGE_NOT_ENOUGH_POWER, ///< 40: Brownouts, build another Power Plant. + MESSAGE_HEAVY_TRAFFIC, ///< Heavy Traffic reported. + MESSAGE_FLOODING_REPORTED, ///< Flooding reported !! + MESSAGE_NUCLEAR_MELTDOWN, ///< A Nuclear Meltdown has occurred !!! + MESSAGE_RIOTS_REPORTED, ///< They're rioting in the streets !! + MESSAGE_STARTED_NEW_CITY, ///< 45: Started a New City. + MESSAGE_LOADED_SAVED_CITY, ///< Restored a Saved City. + MESSAGE_SCENARIO_WON, ///< You won the scenario + MESSAGE_SCENARIO_LOST, ///< You lose the scenario + MESSAGE_ABOUT_MICROPOLIS, ///< About micropolis. + MESSAGE_SCENARIO_DULLSVILLE, ///< 50: Dullsville scenario. + MESSAGE_SCENARIO_SAN_FRANCISCO, ///< San Francisco scenario. + MESSAGE_SCENARIO_HAMBURG, ///< Hamburg scenario. + MESSAGE_SCENARIO_BERN, ///< Bern scenario. + MESSAGE_SCENARIO_TOKYO, ///< Tokyo scenario. + MESSAGE_SCENARIO_DETROIT, ///< 55: Detroit scenario. + MESSAGE_SCENARIO_BOSTON, ///< Boston scenario. + MESSAGE_SCENARIO_RIO_DE_JANEIRO, ///< 57: Rio de Janeiro scenario. + + MESSAGE_LAST = 57, ///< Last valid message +}; + + +//////////////////////////////////////////////////////////////////////// + + +#endif diff --git a/core/tool.cpp b/core/tool.cpp new file mode 100644 index 0000000..d79ee1c --- /dev/null +++ b/core/tool.cpp @@ -0,0 +1,1617 @@ +/* tool.cpp + * + * Micropolis, Unix Version. This game was released for the Unix platform + * in or about 1990 and has been modified for inclusion in the One Laptop + * Per Child program. Copyright (C) 1989 - 2007 Electronic Arts Inc. If + * you need assistance with this program, you may contact: + * http://wiki.laptop.org/go/Micropolis or email micropolis@laptop.org. + * + * This program 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. + * + * This program 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 this program. If + * not, see . + * + * ADDITIONAL TERMS per GNU GPL Section 7 + * + * No trademark or publicity rights are granted. This license does NOT + * give you any right, title or interest in the trademark SimCity or any + * other Electronic Arts trademark. You may not distribute any + * modification of this program using the trademark SimCity or claim any + * affliation or association with Electronic Arts Inc. or its employees. + * + * Any propagation or conveyance of this program must include this + * copyright notice and these terms. + * + * If you convey this program (or any modifications of it) and assume + * contractual liability for the program to recipients of it, you agree + * to indemnify Electronic Arts for any liability that those contractual + * assumptions impose on Electronic Arts. + * + * You may not misrepresent the origins of this program; modified + * versions of the program must be marked as such and not identified as + * the original program. + * + * This disclaimer supplements the one included in the General Public + * License. TO THE FULLEST EXTENT PERMISSIBLE UNDER APPLICABLE LAW, THIS + * PROGRAM IS PROVIDED TO YOU "AS IS," WITH ALL FAULTS, WITHOUT WARRANTY + * OF ANY KIND, AND YOUR USE IS AT YOUR SOLE RISK. THE ENTIRE RISK OF + * SATISFACTORY QUALITY AND PERFORMANCE RESIDES WITH YOU. ELECTRONIC ARTS + * DISCLAIMS ANY AND ALL EXPRESS, IMPLIED OR STATUTORY WARRANTIES, + * INCLUDING IMPLIED WARRANTIES OF MERCHANTABILITY, SATISFACTORY QUALITY, + * FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT OF THIRD PARTY + * RIGHTS, AND WARRANTIES (IF ANY) ARISING FROM A COURSE OF DEALING, + * USAGE, OR TRADE PRACTICE. ELECTRONIC ARTS DOES NOT WARRANT AGAINST + * INTERFERENCE WITH YOUR ENJOYMENT OF THE PROGRAM; THAT THE PROGRAM WILL + * MEET YOUR REQUIREMENTS; THAT OPERATION OF THE PROGRAM WILL BE + * UNINTERRUPTED OR ERROR-FREE, OR THAT THE PROGRAM WILL BE COMPATIBLE + * WITH THIRD PARTY SOFTWARE OR THAT ANY ERRORS IN THE PROGRAM WILL BE + * CORRECTED. NO ORAL OR WRITTEN ADVICE PROVIDED BY ELECTRONIC ARTS OR + * ANY AUTHORIZED REPRESENTATIVE SHALL CREATE A WARRANTY. SOME + * JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF OR LIMITATIONS ON IMPLIED + * WARRANTIES OR THE LIMITATIONS ON THE APPLICABLE STATUTORY RIGHTS OF A + * CONSUMER, SO SOME OR ALL OF THE ABOVE EXCLUSIONS AND LIMITATIONS MAY + * NOT APPLY TO YOU. + */ + +/** + * @file tool.cpp + * @brief Implements tool actions and effects for Micropolis game. + * + * This file defines the behavior and effects of various tools (like + * bulldozer, road construction, zone creation) used in Micropolis. It + * includes functions for handling tool actions, applying their + * effects to the game world, and managing the cost and consequences + * of these actions. The file also contains logic for specific tools + * such as query, wire, park, land alteration, and various zone + * constructions (residential, commercial, industrial, etc.). + */ + + +//////////////////////////////////////////////////////////////////////// + + +#include "micropolis.h" + + +//////////////////////////////////////////////////////////////////////// + +/** Constructor. */ +ToolEffects::ToolEffects(Micropolis *mpolis) +{ + this->sim = mpolis; + + this->clear(); +} + +ToolEffects::~ToolEffects() +{ + /* free all frontend messages */ + while(!this->frontendMessages.empty()) { + delete this->frontendMessages.back(); + this->frontendMessages.pop_back(); + } +} + +/** Reset all effects. */ +void ToolEffects::clear() +{ + this->cost = 0; + this->modifications.clear(); + + /* free all frontend messages */ + while(!this->frontendMessages.empty()) { + delete this->frontendMessages.back(); + this->frontendMessages.pop_back(); + } +} + +/** + * Perform the effects stored in the object to the simulator world. + * @param sim Simulator object to modify. + * @post Effects have been copied to the simulator world, and the #ToolEffects + * object is ready for the next use. + */ +void ToolEffects::modifyWorld() +{ + WorldModificationsMap::const_iterator modIter; + FrontendMessages::const_iterator msgIter; + Micropolis *mpolis = this->sim; + + mpolis->spend(this->cost); // Spend the costs + mpolis->updateFunds(); + + /* Modify the world. */ + for (modIter = this->modifications.begin(); + modIter != this->modifications.end(); modIter++) { + Position pos(modIter->first); + mpolis->map[pos.posX][pos.posY] = modIter->second; + } + + /* And finally send the messages. */ + for (msgIter = this->frontendMessages.begin(); + msgIter != this->frontendMessages.end(); msgIter++) { + (*msgIter)->sendMessage(mpolis); + } + + this->clear(); +} + +/** + * If there are enough funds, apply the effects. + * @return The effects have been applied. + * @note If funding was not adequate, the object is not modified (that is, the + * effects are still available). + */ +bool ToolEffects::modifyIfEnoughFunding() +{ + if (this->sim->totalFunds < this->cost) { + return false; // Not enough money + } + + this->modifyWorld(); + return true; +} + +/** + * Get a map value from the world. + * Unlike the simulator world, this method takes modifications made + * previously by (other) tools into account. + * @param pos Position of queried map value. Position must be on-map. + * @return Map value of the queried position. + */ +MapValue ToolEffects::getMapValue(const Position &pos) const +{ + WorldModificationsMap::const_iterator iter; + + iter = this->modifications.find(pos); + if (iter == this->modifications.end()) { + return this->sim->map[pos.posX][pos.posY]; + } + + return (*iter).second; +} + +/** + * Set a new map value. + * @param pos Position to set. + * @param mapVal Value to set. + */ +void ToolEffects::setMapValue(const Position &pos, MapValue mapVal) +{ + this->modifications[pos] = mapVal; +} + +//////////////////////////////////////////////////////////////////////// +// BuildingProperties + +BuildingProperties::BuildingProperties(int xs, int ys, MapTile base, + EditingTool tl, std::string tName, bool anim) : + sizeX(xs), + sizeY(ys), + baseTile(base), + tool(tl), + toolName(tName), + buildingIsAnimated(anim) +{ +} + +BuildingProperties::~BuildingProperties() +{ +} + + +//////////////////////////////////////////////////////////////////////// + +/** + * Cost of each tool. + * Maybe move this information to eg #BuildingProperties? + */ +static const short gCostOf[] = { + 100, 100, 100, 500, /* res, com, ind, fire */ + 500, 0, 5, 1, /* police, query, wire, bulldozer */ + 20, 10, 5000, 10, /* rail, road, stadium, park */ + 3000, 3000, 5000, 10000, /* seaport, coal, nuclear, airport */ + 100, 0, 0, 0, /* network, water, land, forest */ + 0, +}; + +/** + * Size of each tool. + * @note Actually it is the size of the building rather than the tool. + * @todo This information is duplicated in the #BuildingProperties at least. + */ +static const short gToolSize[] = { + 3, 3, 3, 3, + 3, 1, 1, 1, + 1, 1, 4, 1, + 4, 4, 4, 6, + 1, 1, 1, 1, + 0, +}; + + +//////////////////////////////////////////////////////////////////////// +// Utilities + + +/** + * Put a park down at the give tile. + * @param mapH X coordinate of the tile. + * @param mapV Y coordinate of the tile. + * @param effects Storage of effects of putting down the park. + * @return Tool result. + * @todo Add auto-bulldoze? (seems to be missing). + */ +ToolResult Micropolis::putDownPark(short mapH, short mapV, ToolEffects *effects) +{ + short value = getRandom(4); + MapValue tile = BURNBIT | BULLBIT; + + if (value == 4) { + tile |= FOUNTAIN | ANIMBIT; + } else { + tile |= value + WOODS2; + } + + if (effects->getMapValue(mapH, mapV) != DIRT) { + return TOOLRESULT_NEED_BULLDOZE; + } + + effects->addCost(gCostOf[TOOL_PARK]); + effects->setMapValue(mapH, mapV, tile); + + return TOOLRESULT_OK; +} + + +/** + * Put down a communication network. + * @param mapH X coordinate of the tile. + * @param mapV Y coordinate of the tile. + * @return Tool result. + * @param effects Storage of effects of putting down the park. + * @todo Auto-bulldoze costs should be pulled from a table/constant. + */ +ToolResult Micropolis::putDownNetwork(short mapH, short mapV, + ToolEffects *effects) +{ + MapTile tile = effects->getMapTile(mapH, mapV); + + if (tile != DIRT && tally(tile)) { + effects->addCost(gCostOf[TOOL_BULLDOZER]); + effects->setMapValue(mapH, mapV, DIRT); + tile = DIRT; + } + + if (tile != DIRT) return TOOLRESULT_NEED_BULLDOZE; + + effects->setMapValue(mapH, mapV, + TELEBASE | CONDBIT | BURNBIT | BULLBIT | ANIMBIT); + + effects->addCost(gCostOf[TOOL_NETWORK]); + + return TOOLRESULT_OK; +} + + +/** + * Put down a water tile. + * @param mapH X coordinate of the tile. + * @param mapV Y coordinate of the tile. + * @return Tool result. + */ +ToolResult Micropolis::putDownWater(short mapH, short mapV, + ToolEffects *effects) +{ + MapTile tile = effects->getMapTile(mapH, mapV); + + if (tile == RIVER) return TOOLRESULT_FAILED; + + effects->setMapValue(mapH, mapV, RIVER); + + effects->addCost(gCostOf[TOOL_WATER]); + + return TOOLRESULT_OK; +} + + +/** + * Put down a land tile. + * @param mapH X coordinate of the tile. + * @param mapV Y coordinate of the tile. + * @return Tool result. + * @todo Auto-bulldoze deducts always 1. + * @todo Auto-bulldoze costs should be pulled from a table/constant. + */ +ToolResult Micropolis::putDownLand(short mapH, short mapV, ToolEffects *effects) +{ + int tile = effects->getMapTile(mapH, mapV); +// static short dx[8] = { -1, 0, 1, -1, 1, -1, 0, 1, }; +// static short dy[8] = { -1, -1, -1, 0, 0, 1, 1, 1, }; + + + if (tile == DIRT) return TOOLRESULT_FAILED; + + effects->setMapValue(mapH, mapV, DIRT); + +// int i; +// for (i = 0; i < 8; i++) { +// int xx = mapH + dx[i]; +// int yy = mapV + dy[i]; +// if (testBounds(xx, yy)) { +// //smoothTreesAt(xx, yy, true); +// } +// } + + effects->addCost(gCostOf[TOOL_LAND]); + + return TOOLRESULT_OK; +} + + +/** + * Put down a forest tile. + * @param mapH X coordinate of the tile. + * @param mapV Y coordinate of the tile. + * @return Tool result. + * @todo Auto-bulldoze deducts always 1. + */ +ToolResult Micropolis::putDownForest(short mapH, short mapV, + ToolEffects *effects) +{ + static short dx[8] = { -1, 0, 1, -1, 1, -1, 0, 1, }; + static short dy[8] = { -1, -1, -1, 0, 0, 1, 1, 1, }; + + effects->setMapValue(mapH, mapV, WOODS | BLBNBIT); + + int i; + for (i = 0; i < 8; i++) { + int xx = mapH + dx[i]; + int yy = mapV + dy[i]; + if (testBounds(xx, yy)) { + smoothTreesAt(xx, yy, true, effects); + } + } + + effects->addCost(gCostOf[TOOL_FOREST]); + + return TOOLRESULT_OK; +} + + +/** + * Compute where the 'center' (at (1,1)) of the zone is, depending on where the + * user clicked. + * + * Only inner tiles are recognized, and possibly not even complete (ie stadium + * while game is playing). + * + * @param id Tile character value of the tile that the user clicked on. + * @param deltaHPtr Pointer where horizontal position correction is written to. + * @param deltaVPtr Pointer where vertical position correction is written to. + * @return Size of the zone clicked at (or \c 0 if clicked outside zone). + * @todo Make this table driven. + */ +static short checkBigZone(MapTile id, short *deltaHPtr, short *deltaVPtr) +{ + switch (id) { + + case POWERPLANT: /* check coal plant */ + case PORT: /* check sea port */ + case NUCLEAR: /* check nuc plant */ + case STADIUM: /* check stadium */ + *deltaHPtr = 0; + *deltaVPtr = 0; + return 4; + + case POWERPLANT + 1: /* check coal plant */ + case COALSMOKE3: /* check coal plant, smoke */ + case COALSMOKE3 + 1: /* check coal plant, smoke */ + case COALSMOKE3 + 2: /* check coal plant, smoke */ + case PORT + 1: /* check sea port */ + case NUCLEAR + 1: /* check nuc plant */ + case STADIUM + 1: /* check stadium */ + *deltaHPtr = -1; + *deltaVPtr = 0; + return 4; + + case POWERPLANT + 4: /* check coal plant */ + case PORT + 4: /* check sea port */ + case NUCLEAR + 4: /* check nuc plant */ + case STADIUM + 4: /* check stadium */ + *deltaHPtr = 0; + *deltaVPtr = -1; + return 4; + + case POWERPLANT + 5: /* check coal plant */ + case PORT + 5: /* check sea port */ + case NUCLEAR + 5: /* check nuc plant */ + case STADIUM + 5: /* check stadium */ + *deltaHPtr = -1; + *deltaVPtr = -1; + return 4; + + case AIRPORT: /* check airport */ + *deltaHPtr = 0; + *deltaVPtr = 0; + return 6; + + case AIRPORT + 1: + *deltaHPtr = -1; + *deltaVPtr = 0; + return 6; + + case AIRPORT + 2: + *deltaHPtr = -2; + *deltaVPtr = 0; + return 6; + + case AIRPORT + 3: + *deltaHPtr = -3; + *deltaVPtr = 0; + return 6; + + case AIRPORT + 6: + *deltaHPtr = 0; + *deltaVPtr = -1; + return 6; + + case AIRPORT + 7: + *deltaHPtr = -1; + *deltaVPtr = -1; + return 6; + + case AIRPORT + 8: + *deltaHPtr = -2; + *deltaVPtr = -1; + return 6; + + case AIRPORT + 9: + *deltaHPtr = -3; + *deltaVPtr = -1; + return 6; + + case AIRPORT + 12: + *deltaHPtr = 0; + *deltaVPtr = -2; + return 6; + + case AIRPORT + 13: + *deltaHPtr = -1; + *deltaVPtr = -2; + return 6; + + case AIRPORT + 14: + *deltaHPtr = -2; + *deltaVPtr = -2; + return 6; + + case AIRPORT + 15: + *deltaHPtr = -3; + *deltaVPtr = -2; + return 6; + + case AIRPORT + 18: + *deltaHPtr = 0; + *deltaVPtr = -3; + return 6; + + case AIRPORT + 19: + *deltaHPtr = -1; + *deltaVPtr = -3; + return 6; + + case AIRPORT + 20: + *deltaHPtr = -2; + *deltaVPtr = -3; + return 6; + + case AIRPORT + 21: + *deltaHPtr = -3; + *deltaVPtr = -3; + return 6; + + default: + *deltaHPtr = 0; + *deltaVPtr = 0; + return 0; + + } +} + + +/** + * Can the tile be auto-bulldozed?. + * @param tileValue Value of the tile. + * @return \c True if the tile can be auto-bulldozed, else \c false. + */ +bool Micropolis::tally(short tileValue) +{ + return (tileValue >= FIRSTRIVEDGE && tileValue <= LASTRUBBLE) || + (tileValue >= POWERBASE + 2 && tileValue <= POWERBASE + 12) || + (tileValue >= TINYEXP && tileValue <= LASTTINYEXP + 2); +} + + +/** + * Return the size of the zone that the tile belongs to. + * @param tileValue Value of the tile in the zone. + * @return Size of the zone if it is a known tile value, else \c 0. + */ +short Micropolis::checkSize(short tileValue) +{ + // check for the normal com, resl, ind 3x3 zones & the fireDept & PoliceDept + if ((tileValue >= RESBASE - 1 && tileValue <= PORTBASE - 1) || + (tileValue >= LASTPOWERPLANT + 1 && tileValue <= POLICESTATION + 4) || + (tileValue >= CHURCH1BASE && tileValue <= CHURCH7LAST)) { + return 3; + } + + if ((tileValue >= PORTBASE && tileValue <= LASTPORT) || + (tileValue >= COALBASE && tileValue <= LASTPOWERPLANT) || + (tileValue >= STADIUMBASE && tileValue <= LASTZONE)) { + return 4; + } + + return 0; +} + + +/** + * Check and connect a new zone around the border. + * @param xMap X coordinate of top-left tile. + * @param yMap Y coordinate of top-left tile. + * @param sizeX Horizontal size of the new zone. + * @param sizeY Vertical size of the new zone. + * @param effects Storage of the effects. + */ +void Micropolis::checkBorder(short xMap, short yMap, int sizeX, int sizeY, + ToolEffects *effects) +{ + short cnt; + + /* this will do the upper bordering row */ + for (cnt = 0; cnt < sizeX; cnt++) { + connectTile(xMap + cnt, yMap - 1, CONNECT_TILE_FIX, effects); + } + + /* this will do the left bordering row */ + for (cnt = 0; cnt < sizeY; cnt++) { + connectTile(xMap - 1, yMap + cnt, CONNECT_TILE_FIX, effects); + } + + /* this will do the bottom bordering row */ + for (cnt = 0; cnt < sizeX; cnt++) { + connectTile(xMap + cnt, yMap + sizeY, CONNECT_TILE_FIX, effects); + } + + /* this will do the right bordering row */ + for (cnt = 0; cnt < sizeY; cnt++) { + connectTile(xMap + sizeX, yMap + cnt, CONNECT_TILE_FIX, effects); + } +} + +/** + * Put down a building, starting at (\a leftX, \a topY) with size + * (\a sizeX, \a sizeY). + * @param leftX Position of left column of tiles of the building. + * @param topY Position of top row of tiles of the building. + * @param sizeX Horizontal size of the building. + * @param sizeY Vertical size of the building. + * @param baseTile Tile value to use at the top-left position. Tiles are laid + * in column major mode. + * @param aniFlag Set animation flag at relative position (1, 2) + * @param effects Storage of the effects. + * + * @pre All tiles are within world boundaries. + * + * @todo We should ask the buildings themselves how they should be drawn. + */ +void Micropolis::putBuilding(int leftX, int topY, int sizeX, int sizeY, + MapTile baseTile, bool aniFlag, + ToolEffects *effects) +{ + for (int dy = 0; dy < sizeY; dy++) { + int posY = topY + dy; + + for (int dx = 0; dx < sizeX; dx++) { + int posX = leftX + dx; + + MapValue tileValue = baseTile | BNCNBIT; + if (dx == 1) { + if (dy == 1) { + tileValue |= ZONEBIT; + } else if (dy == 2 && aniFlag) { + tileValue |= ANIMBIT; + } + } + + effects->setMapValue(posX, posY, tileValue); + + baseTile++; + } + } +} + +/** + * Prepare the site where a building is about to be put down. + * + * This function performs some basic sanity checks, and implements the + * auto-bulldoze functionality to prepare the site. + * All effects are stored in the \a effects object. + * + * @param leftX Position of left column of tiles of the building. + * @param topY Position of top row of tiles of the building. + * @param sizeX Horizontal size of the building. + * @param sizeY Vertical size of the building. + * @param effects Storage of effects of preparing the site. + * @return: Result of preparation. + */ +ToolResult Micropolis::prepareBuildingSite(int leftX, int topY, + int sizeX, int sizeY, + ToolEffects *effects) +{ + // Check that the entire site is on the map + if (leftX < 0 || leftX + sizeX > WORLD_W) { + return TOOLRESULT_FAILED; + } + if (topY < 0 || topY + sizeY > WORLD_H) { + return TOOLRESULT_FAILED; + } + + // Check whether the tiles are clear + for (int dy = 0; dy < sizeY; dy++) { + int posY = topY + dy; + + for (int dx = 0; dx < sizeX; dx++) { + int posX = leftX + dx; + + unsigned short tileValue = effects->getMapTile(posX, posY); + + if (tileValue == DIRT) { // DIRT tile is buidable + continue; + } + + if (!autoBulldoze) { + // No DIRT and no bull-dozer => not buildable + return TOOLRESULT_NEED_BULLDOZE; + } + if (!tally(tileValue)) { + // tilevalue cannot be auto-bulldozed + return TOOLRESULT_NEED_BULLDOZE; + } + + effects->setMapValue(posX, posY, DIRT); + effects->addCost(gCostOf[TOOL_BULLDOZER]); + } + } + + return TOOLRESULT_OK; +} + + +/** + * Build a building. + * @param mapH Horizontal position of the 'center' tile in the world. + * @param mapV Vertical position of the 'center' tile in the world. + * @param buildingProps Building properties of the building being constructed. + * @param effects Storage of effects of putting down the building. + * @return Tool result. + * + * @todo Give #putBuilding a #BuildingProperties pointer instead. + * @todo Move cost into building properties? + */ +ToolResult Micropolis::buildBuilding(int mapH, int mapV, + const BuildingProperties *buildingProps, + ToolEffects *effects) +{ + mapH--; mapV--; // Move position to top-left + + ToolResult prepareResult = prepareBuildingSite(mapH, mapV, + buildingProps->sizeX, + buildingProps->sizeY, + effects); + if (prepareResult != TOOLRESULT_OK) { + return prepareResult; + } + + /* Preparation was ok, put down the building. */ + effects->addCost(gCostOf[buildingProps->tool]); + + putBuilding(mapH, mapV, buildingProps->sizeX, buildingProps->sizeY, + buildingProps->baseTile, buildingProps->buildingIsAnimated, + effects); + + checkBorder(mapH, mapV, + buildingProps->sizeX, buildingProps->sizeY, + effects); + + return TOOLRESULT_OK; +} + + +/* Query */ + +/* search table for zone status string match */ +static short idArray[29] = { + DIRT, RIVER, TREEBASE, RUBBLE, + FLOOD, RADTILE, FIRE, ROADBASE, + POWERBASE, RAILBASE, RESBASE, COMBASE, + INDBASE, PORTBASE, AIRPORTBASE, COALBASE, + FIRESTBASE, POLICESTBASE, STADIUMBASE, NUCLEARBASE, + // FIXME: I think HBRDG_END should be HBRDG0...? + HBRDG0, RADAR0, FOUNTAIN, INDBASE2, + // FIXME: What are tiles 952 and 956? + FOOTBALLGAME1, VBRDG0, 952, 956, + 9999, // a huge short +}; + +/* + 0, 2, 21, 44, + 48, 52, 53, 64, + 208, 224, 240, 423, + 612, 693, 709, 745, + 761, 770, 779, 811, + 827, 832, 840, 844, + 932, 948, 952, 956 + + Clear, Water, Trees, Rubble, + Flood, Radioactive Waste, Fire, Road, + Power, Rail, Residential, Commercial, + Industrial, Port, AirPort, Coal Power, + Fire Department, Police Department, Stadium, Nuclear Power, + Draw Bridge, Radar Dish, Fountain, Industrial, + 49er's 38 Bears 3, Draw Bridge, Ur 238, Unknown +*/ + + +/** + * Get string index for a status report on tile \a mapH, \a mapV on a + * given status category. + * @param catNo Category number: + * 0: population density + * 1: land value. + * 2: crime rate. + * 3: pollution. + * 4: growth rate. + * @param mapH X coordinate of the tile. + * @param mapV Y coordinate of the tile. + * @return Index into stri.202 file. + */ +int Micropolis::getDensity(short catNo, short mapH, short mapV) +{ + int z; + + switch (catNo) { + + case 0: + default: + z = populationDensityMap.worldGet(mapH, mapV); + z = z >> 6; + z = z & 3; + return z + STR202_POPULATIONDENSITY_LOW; + + case 1: + z = landValueMap.worldGet(mapH, mapV); + if (z < 30) return STR202_LANDVALUE_SLUM; + if (z < 80) return STR202_LANDVALUE_LOWER_CLASS; + if (z < 150) return STR202_LANDVALUE_MIDDLE_CLASS; + return STR202_LANDVALUE_HIGH_CLASS; + + case 2: + z = crimeRateMap.worldGet(mapH, mapV); + z = z >> 6; + z = z & 3; + return z + STR202_CRIME_NONE; + + case 3: + z = pollutionDensityMap.worldGet(mapH, mapV); + if (z < 64 && z > 0) return 13; + z = z >> 6; + z = z & 3; + return z + STR202_POLLUTION_NONE; + + case 4: + z = rateOfGrowthMap.worldGet(mapH, mapV); + if (z < 0) return STR202_GROWRATE_DECLINING; + if (z == 0) return STR202_GROWRATE_STABLE; + if (z > 100) return STR202_GROWRATE_FASTGROWTH; + return STR202_GROWRATE_SLOWGROWTH; + + } +} + + +/** + * Report about the status of a tile. + * @param mapH X coordinate of the tile. + * @param mapV Y coordinate of the tile. + * @bug Program breaks for status on 'dirt' + */ +void Micropolis::doZoneStatus(short mapH, short mapV) +{ + int tileCategory; + int status[5]; + + short tileNum = map[mapH][mapV] & LOMASK; + + if (tileNum >= COALSMOKE1 && tileNum < FOOTBALLGAME1) { + tileNum = COALBASE; + } + + // Find the category where the tile belongs to + // Note: If 'tileNum < idArray[i]', it belongs to category i-1 + short i; + for (i = 1; i < 29; i++) { + if (tileNum < idArray[i]) { + break; + } + } + + i--; + // i contains the category that the tile belongs to (in theory 0..27). + // However, it is 0..26, since 956 is the first unused tile + + // FIXME: This needs to be fixed to support plug-in churches. + + // TODO: This should also return the bounding box and hot spot of + // the zone to the user interface, as well as other interesting + // information. + + // Code below looks buggy, 0 is a valid value (namely 'dirt'), and upper + // limit is not correctly checked either ('stri.219' has only 27 lines). + + // FIXME: This is strange... Normalize to zero based index. + if (i < 1 || i > 28) { + i = 28; // This breaks the program (when you click 'dirt') + } + + // Obtain the string index of the tile category. + // 'stri.219' has only 27 lines, so 0 <= i <= 26 is acceptable. + tileCategory = i + 1; + + for (i = 0; i < 5; i++) { + int id = clamp(getDensity(i, mapH, mapV) + 1, 1, 20); + status[i] = id; + } + + doShowZoneStatus( + tileCategory, + status[0], status[1], status[2], + status[3], status[4], + mapH, mapV); +} + + +/** Tell front-end to report on status of a tile. + * @param tileCategoryIndex Category of the tile text index. + * @param populationDensityIndex Population density text index. + * @param landValueIndex Land value text index. + * @param crimeRateIndex Crime rate text index. + * @param pollutionIndex Pollution text index. + * @param growthRateIndex Grow rate text index. + * @param x X coordinate of the tile. + * @param y Y coordinate of the tile. + */ +void Micropolis::doShowZoneStatus( + int tileCategoryIndex, + int populationDensityIndex, + int landValueIndex, + int crimeRateIndex, + int pollutionIndex, + int growthRateIndex, + int x, + int y) +{ + callback->showZoneStatus(this, callbackVal, tileCategoryIndex, populationDensityIndex, landValueIndex, crimeRateIndex, pollutionIndex, growthRateIndex, x, y); +} + + +/** + * Make a \a size by \a size tiles square of rubble + * @param x Horizontal position of the left-most tile + * @param y Vertical position of the left-most tile + * @param size Size of the rubble square + */ +void Micropolis::putRubble(int x, int y, int size, ToolEffects *effects) +{ + for (int xx = x; xx < x + size; xx++) { + for (int yy = y; yy < y + size; yy++) { + + if (testBounds(xx, yy)) { + int tile = effects->getMapTile(xx, yy); + + if (tile != RADTILE && tile != DIRT) { + tile = (doAnimation ? (TINYEXP + getRandom(2)) : SOMETINYEXP); + effects->setMapValue(xx, yy, tile | ANIMBIT | BULLBIT); + } + } + } + } +} + + +/** + * Report to the front-end that a tool was used. + * @param name: Name of the tool. + * @param x X coordinate of where the tool was applied. + * @param y Y coordinate of where the tool was applied. + */ +void Micropolis::didTool(std::string name, short x, short y) +{ + std::string json; + json += "["; + json += name; + json += "\","; + json += std::to_string(x); + json += ","; + json += std::to_string(y); + json += "]"; + + callback->didTool(this, callbackVal, name, x, y); +} + + +//////////////////////////////////////////////////////////////////////// +// Tools + + +/** + * Do query tool. + * @param x X coordinate of the position of the query. + * @param y Y coordinate of the position of the query. + * @return Tool result. + */ +ToolResult Micropolis::queryTool(short x, short y) +{ + if (!testBounds(x, y)) { + return TOOLRESULT_FAILED; + } + + doZoneStatus(x, y); + didTool("Qry", x, y); + + return TOOLRESULT_OK; +} + +ToolResult Micropolis::bulldozerTool(short x, short y) +{ + ToolEffects effects(this); + + ToolResult result = bulldozerTool(x, y, &effects); + + if (result == TOOLRESULT_OK) { + effects.modifyWorld(); + } + + return result; +} + +/** + * Apply bulldozer tool. + * @param x X coordinate of the position of the query. + * @param y Y coordinate of the position of the query. + * @return Tool result. + * + * @todo Code is too complex/long. + * @bug Tool does not return TOOLRESULT_NO_MONEY. + * @bug Sometimes we can delete parts of a residential zone, but not always. + * Decide what rule we should have, and fix accordingly. + * + * @note Auto-bulldoze functionality is in Micropolis::prepareBuildingSite() + */ +ToolResult Micropolis::bulldozerTool(short x, short y, ToolEffects *effects) +{ + ToolResult result = TOOLRESULT_OK; + + if (!testBounds(x, y)) { + return TOOLRESULT_FAILED; + } + + MapValue mapVal = effects->getMapValue(x, y); + MapTile tile = mapVal & LOMASK; + + short zoneSize = 0; // size of the zone, 0 means invalid. + short deltaH; // Amount of horizontal shift to the center tile of the zone. + short deltaV; // Amount of vertical shift to the center tile of the zone. + FrontendMessage *frontendMsg; + + if (mapVal & ZONEBIT) { /* zone center bit is set */ + zoneSize = checkSize(tile); + deltaH = 0; + deltaV = 0; + } else { + zoneSize = checkBigZone(tile, &deltaH, &deltaV); + } + + if (zoneSize > 0) { + effects->addCost(gCostOf[TOOL_BULLDOZER]); + + int dozeX = x; + int dozeY = y; + int centerX = x + deltaH; + int centerY = y + deltaV; + + switch (zoneSize) { + + case 3: + frontendMsg = new FrontendMessageMakeSound( + "city", "Explosion-High", dozeX, dozeY); + effects->addFrontendMessage(frontendMsg); + + putRubble(centerX - 1, centerY - 1, 3, effects); + break; + + case 4: + frontendMsg = new FrontendMessageMakeSound( + "city", "Explosion-Low", dozeX, dozeY); + effects->addFrontendMessage(frontendMsg); + + putRubble(centerX - 1, centerY - 1, 4, effects); + break; + + case 6: + frontendMsg = new FrontendMessageMakeSound( + "city", "Explosion-High", dozeX, dozeY); + effects->addFrontendMessage(frontendMsg); + + frontendMsg = new FrontendMessageMakeSound( + "city", "Explosion-Low", dozeX, dozeY); + effects->addFrontendMessage(frontendMsg); + + putRubble(centerX - 1, centerY - 1, 6, effects); + break; + + default: + NOT_REACHED(); + break; + + } + + + if (result == TOOLRESULT_OK) { + /* send 'didtool' message */ + frontendMsg = new FrontendMessageDidTool("Dozr", x, y); + effects->addFrontendMessage(frontendMsg); + } + + return result; + + } + + + if (tile == RIVER || tile == REDGE || tile == CHANNEL) { + + result = connectTile(x, y, CONNECT_TILE_BULLDOZE, effects); + + if (tile != effects->getMapTile(x, y)) { + effects->addCost(5); + } + } else { + result = connectTile(x, y, CONNECT_TILE_BULLDOZE, effects); + } + + if (result == TOOLRESULT_OK) { + /* send 'didtool' message */ + frontendMsg = new FrontendMessageDidTool("Dozr", x, y); + didTool("Dozr", x, y); + effects->addFrontendMessage(frontendMsg); + } + + return result; +} + + +/** + * Build a road at a tile. + * @param x Horizontal position of the tile to lay road. + * @param y Vertical position of the tile to lay road. + * @param effects Storage of effects of laying raod at the tile. + * @return Tool result. + * @todo Merge roadTool, railroadTool, wireTool, and parkTool functions. + */ +ToolResult Micropolis::roadTool(short x, short y, ToolEffects *effects) +{ + if (!testBounds(x, y)) { + return TOOLRESULT_FAILED; + } + + ToolResult result = connectTile(x, y, CONNECT_TILE_ROAD, effects); + + if (result == TOOLRESULT_OK) { + /* send 'didtool' message */ + FrontendMessage *didToolMsg; + didToolMsg = new FrontendMessageDidTool("Road", x, y); + effects->addFrontendMessage(didToolMsg); + } + + return result; +} + + +/** + * Build a rail track at a tile. + * @param x Horizontal position of the tile. + * @param y Vertical position of the tile. + * @param effects Storage of effects of laying the rail. + * @return Tool result. + */ +ToolResult Micropolis::railroadTool(short x, short y, ToolEffects *effects) +{ + if (!testBounds(x, y)) { + return TOOLRESULT_FAILED; + } + + ToolResult result = connectTile(x, y, CONNECT_TILE_RAILROAD, effects); + + if (result == TOOLRESULT_OK) { + /* send 'didtool' message */ + FrontendMessage *didToolMsg; + didToolMsg = new FrontendMessageDidTool("Rail", x, y); + effects->addFrontendMessage(didToolMsg); + } + + return result; +} + + +/** + * Build a wire at a tile. + * @param x Horizontal position of the tile to wire. + * @param y Vertical position of the tile to wire. + * @param effects Storage of effects of wiring the tile. + * @return Tool result. + */ +ToolResult Micropolis::wireTool(short x, short y, ToolEffects *effects) +{ + if (!testBounds(x, y)) { + return TOOLRESULT_FAILED; + } + + ToolResult result = connectTile(x, y, CONNECT_TILE_WIRE, effects); + + if (result == TOOLRESULT_OK) { + /* send 'didtool' message */ + FrontendMessage *didToolMsg; + didToolMsg = new FrontendMessageDidTool("Wire", x, y); + effects->addFrontendMessage(didToolMsg); + } + + return result; +} + + +/** + * Build a park. + * @param x Horizontal position of 'center tile' of the park. + * @param y Vertical position of 'center tile' of the park. + * @param effects Storage of effects of putting down the park. + * @return Tool result. + */ +ToolResult Micropolis::parkTool(short x, short y, ToolEffects *effects) +{ + if (!testBounds(x, y)) { + return TOOLRESULT_FAILED; + } + + ToolResult result = putDownPark(x, y, effects); + + if (result == TOOLRESULT_OK) { + /* send 'didtool' message */ + FrontendMessage *didToolMsg; + didToolMsg = new FrontendMessageDidTool("Park", x, y); + effects->addFrontendMessage(didToolMsg); + } + + return result; +} + + +/** + * Build a building. + * @param x Horizontal position of center tile of the new building. + * @param y Vertical position of center tile of the new building. + * @param buildingProps Building properties of the building being constructed. + * @param effects Storage of effects of putting down the building. + * @return Tool result. + */ +ToolResult Micropolis::buildBuildingTool(short x, short y, + const BuildingProperties *buildingProps, + ToolEffects *effects) +{ + ToolResult result = buildBuilding(x, y, buildingProps, effects); + + if (result == TOOLRESULT_OK) { + /* send 'didtool' message */ + FrontendMessage *didToolMsg; + didToolMsg = new FrontendMessageDidTool(buildingProps->toolName, x, y); + effects->addFrontendMessage(didToolMsg); + } + + return result; +} + +/** Building properties of a residential zone. */ +static const BuildingProperties residentialZoneBuilding = + BuildingProperties(3, 3, RESBASE, TOOL_RESIDENTIAL, "Res", false); + +/** Building properties of a commercial zone. */ +static const BuildingProperties commercialZoneBuilding = + BuildingProperties(3, 3, COMBASE, TOOL_COMMERCIAL, "Com", false); + +/** Building properties of a industrial zone. */ +static const BuildingProperties industrialZoneBuilding = + BuildingProperties(3, 3, INDBASE, TOOL_INDUSTRIAL, "Ind", false); + +/** Building properties of a police station. */ +static const BuildingProperties policeStationBuilding = + BuildingProperties(3, 3, POLICESTBASE, TOOL_POLICESTATION, "Pol", false); + +/** Building properties of a fire station. */ +static const BuildingProperties fireStationBuilding = + BuildingProperties(3, 3, FIRESTBASE, TOOL_FIRESTATION, "Fire", false); + +/** Building properties of a stadium. */ +static const BuildingProperties stadiumBuilding = + BuildingProperties(4, 4, STADIUMBASE, TOOL_STADIUM, "Stad", false); + +/** Building properties of a coal power station. */ +static const BuildingProperties coalPowerBuilding = + BuildingProperties(4, 4, COALBASE, TOOL_COALPOWER, "Coal", false); + +/** Building properties of a nuclear power station. */ +static const BuildingProperties nuclearPowerBuilding = + BuildingProperties(4, 4, NUCLEARBASE, TOOL_NUCLEARPOWER, "Nuc", true); + +/** Building properties of a seaport. */ +static const BuildingProperties seaportBuilding = + BuildingProperties(4, 4, PORTBASE, TOOL_SEAPORT, "Seap", false); + +/** Building properties of a airport. */ +static const BuildingProperties airportBuilding = + BuildingProperties(6, 6, AIRPORTBASE, TOOL_AIRPORT, "Airp", false); + + +/** + * Put down a network. + * @todo Is this ever used? + */ +ToolResult Micropolis::networkTool(short x, short y, ToolEffects *effects) +{ + if (!testBounds(x, y)) { + return TOOLRESULT_FAILED; + } + + ToolResult result = putDownNetwork(x, y, effects); + + if (result == TOOLRESULT_OK) { + /* send 'didtool' message */ + FrontendMessage *didToolMsg; + didToolMsg = new FrontendMessageDidTool("Net", x, y); + effects->addFrontendMessage(didToolMsg); + } + + return result; +} + + +ToolResult Micropolis::waterTool(short x, short y, ToolEffects *effects) +{ + if (!testBounds(x, y)) { + return TOOLRESULT_FAILED; + } + + ToolResult result = bulldozerTool(x, y, effects); + + if (result == TOOLRESULT_OK) { + result = putDownWater(x, y, effects); + } + + if (result == TOOLRESULT_OK) { + /* send 'didtool' message */ + FrontendMessage *didToolMsg; + didToolMsg = new FrontendMessageDidTool("Water", x, y); + effects->addFrontendMessage(didToolMsg); + } + + return result; +} + + +ToolResult Micropolis::landTool(short x, short y, ToolEffects *effects) +{ + if (!testBounds(x, y)) { + return TOOLRESULT_FAILED; + } + + /// @todo: Is this good? It is not auto-bulldoze!! + /// @todo: Handle result value (probably) + ToolResult result = bulldozerTool(x, y, effects); + + result = putDownLand(x, y, effects); + + if (result == TOOLRESULT_OK) { + /* send 'didtool' message */ + FrontendMessage *didToolMsg; + didToolMsg = new FrontendMessageDidTool("Land", x, y); + effects->addFrontendMessage(didToolMsg); + } + + return result; +} + + +ToolResult Micropolis::forestTool(short x, short y, ToolEffects *effects) +{ + ToolResult result = TOOLRESULT_OK; + + if (!testBounds(x, y)) { + return TOOLRESULT_FAILED; + } + + MapValue tile = effects->getMapValue(x, y); + + if (isTree(tile)) { + return TOOLRESULT_OK; + } + + if ((tile & LOMASK) != DIRT) { + /// @todo bulldozer should be free in terrain mode or from a free tool. + result = bulldozerTool(x, y, effects); + } + + tile = effects->getMapValue(x, y); + + if (tile == DIRT) { + result = putDownForest(x, y, effects); + + if (result == TOOLRESULT_OK) { + /* send 'didtool' message */ + FrontendMessage *didToolMsg; + didToolMsg = new FrontendMessageDidTool("Forest", x, y); + effects->addFrontendMessage(didToolMsg); + } + + } else { + result = TOOLRESULT_FAILED; + } + + return result; +} + + +/** + * Apply a tool. + * @param tool Tool to use. + * @param tileX Horizontal position in the city map. + * @param tileY Vertical position in the city map. + * @return Tool result. + */ +ToolResult Micropolis::doTool(EditingTool tool, short tileX, short tileY) +{ + ToolEffects effects(this); + ToolResult result; + + switch (tool) { + + case TOOL_RESIDENTIAL: + result = buildBuildingTool(tileX, tileY, &residentialZoneBuilding, + &effects); + break; + + case TOOL_COMMERCIAL: + result = buildBuildingTool(tileX, tileY, &commercialZoneBuilding, + &effects); + break; + + case TOOL_INDUSTRIAL: + result = buildBuildingTool(tileX, tileY, &industrialZoneBuilding, + &effects); + break; + + case TOOL_FIRESTATION: + result = buildBuildingTool(tileX, tileY, &fireStationBuilding, + &effects); + break; + + case TOOL_POLICESTATION: + result = buildBuildingTool(tileX, tileY, &policeStationBuilding, + &effects); + break; + + case TOOL_QUERY: + return queryTool(tileX, tileY); + + case TOOL_WIRE: + result = wireTool(tileX, tileY, &effects); + break; + + case TOOL_BULLDOZER: + result = bulldozerTool(tileX, tileY, &effects); + break; + + case TOOL_RAILROAD: + result = railroadTool(tileX, tileY, &effects); + break; + + case TOOL_ROAD: + result = roadTool(tileX, tileY, &effects); + break; + + case TOOL_STADIUM: + result = buildBuildingTool(tileX, tileY, &stadiumBuilding, + &effects); + break; + + case TOOL_PARK: + result = parkTool(tileX, tileY, &effects); + break; + + case TOOL_SEAPORT: + result = buildBuildingTool(tileX, tileY, &seaportBuilding, + &effects); + break; + + case TOOL_COALPOWER: + result = buildBuildingTool(tileX, tileY, &coalPowerBuilding, + &effects); + break; + + case TOOL_NUCLEARPOWER: + result = buildBuildingTool(tileX, tileY, &nuclearPowerBuilding, + &effects); + break; + + case TOOL_AIRPORT: + result = buildBuildingTool(tileX, tileY, &airportBuilding, + &effects); + break; + + case TOOL_NETWORK: + result = networkTool(tileX, tileY, &effects); + break; + + case TOOL_WATER: + result = waterTool(tileX, tileY, &effects); + break; + + case TOOL_LAND: + result = landTool(tileX, tileY, &effects); + break; + + case TOOL_FOREST: + result = forestTool(tileX, tileY, &effects); + break; + + default: + return TOOLRESULT_FAILED; + + } + + // Perform the effects of applying the tool if enough funds. + if (result == TOOLRESULT_OK) { + if (!effects.modifyIfEnoughFunding()) { + return TOOLRESULT_NO_MONEY; + } + } + + return result; +} + + +void Micropolis::toolDown(EditingTool tool, short tileX, short tileY) +{ + ToolResult result = doTool(tool, tileX, tileY); + + if (result == TOOLRESULT_NEED_BULLDOZE) { + sendMessage(MESSAGE_BULLDOZE_AREA_FIRST, NOWHERE, NOWHERE, false, true); + /// @todo: Multi player: This sound should only be heard by the user + /// who called this function. + makeSound("interface", "UhUh", tileX <<4, tileY <<4); + + } else if (result == TOOLRESULT_NO_MONEY) { + sendMessage(MESSAGE_NOT_ENOUGH_FUNDS, NOWHERE, NOWHERE, false, true); + /// @todo: Multi player: This sound should only be heard by the user + /// who called this function. + makeSound("interface", "Sorry", tileX <<4, tileY <<4); + } + + simPass = 0; + invalidateMaps(); +} + +/** + * Drag a tool from (\a fromX, \a fromY) to (\a toX, \a toY). + * @param tool Tool being dragged. + * @param fromX Horizontal coordinate of the starting position. + * @param fromY Vertical coordinate of the starting position. + * @param toX Horizontal coordinate of the ending position. + * @param toY Vertical coordinate of the ending position. + */ +void Micropolis::toolDrag(EditingTool tool, + short fromX, short fromY, short toX, short toY) +{ + // Do not drag big tools. + int toolSize = gToolSize[tool]; + if (toolSize > 1) { + doTool(tool, toX, toY); + + simPass = 0; // update editors overlapping this one + invalidateMaps(); + return; + } + + short dirX = (toX > fromX) ? 1 : -1; // Horizontal step direction. + short dirY = (toY > fromY) ? 1 : -1; // Vertical step direction. + + + if (fromX == toX && fromY == toY) { + return; + } + + doTool(tool, fromX, fromY); // Ensure the start position is done. + + // Vertical line up or down + if (fromX == toX && fromY != toY) { + + while (fromY != toY) { + fromY += dirY; + doTool(tool, fromX, fromY); + } + + simPass = 0; // update editors overlapping this one + invalidateMaps(); + return; + } + + // Horizontal line left/right + if (fromX != toX && fromY == toY) { + + while (fromX != toX) { + fromX += dirX; + doTool(tool, fromX, fromY); + } + + simPass = 0; // update editors overlapping this one + invalidateMaps(); + return; + } + + // General case: both X and Y change. + + short dx = absoluteValue(fromX - toX); // number of horizontal steps. + short dy = absoluteValue(fromY - toY); // number of vertical steps. + + short subX = 0; // Each X step is dy sub-steps. + short subY = 0; // Each Y step is dx sub-steps. + short numSubsteps = min(dx, dy); // Number of sub-steps we can do. + + while (fromX != toX || fromY != toY) { + subX += numSubsteps; + if (subX >= dy) { + subX -= dy; + fromX += dirX; + doTool(tool, fromX, fromY); + } + + subY += numSubsteps; + if (subY >= dx) { + subY -= dx; + fromY += dirY; + doTool(tool, fromX, fromY); + } + } + + simPass = 0; + invalidateMaps(); +} + + +//////////////////////////////////////////////////////////////////////// diff --git a/core/tool.h b/core/tool.h new file mode 100644 index 0000000..4e6daf7 --- /dev/null +++ b/core/tool.h @@ -0,0 +1,347 @@ +/* tool.h + * + * Micropolis, Unix Version. This game was released for the Unix platform + * in or about 1990 and has been modified for inclusion in the One Laptop + * Per Child program. Copyright (C) 1989 - 2007 Electronic Arts Inc. If + * you need assistance with this program, you may contact: + * http://wiki.laptop.org/go/Micropolis or email micropolis@laptop.org. + * + * This program 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. + * + * This program 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 this program. If + * not, see . + * + * ADDITIONAL TERMS per GNU GPL Section 7 + * + * No trademark or publicity rights are granted. This license does NOT + * give you any right, title or interest in the trademark SimCity or any + * other Electronic Arts trademark. You may not distribute any + * modification of this program using the trademark SimCity or claim any + * affliation or association with Electronic Arts Inc. or its employees. + * + * Any propagation or conveyance of this program must include this + * copyright notice and these terms. + * + * If you convey this program (or any modifications of it) and assume + * contractual liability for the program to recipients of it, you agree + * to indemnify Electronic Arts for any liability that those contractual + * assumptions impose on Electronic Arts. + * + * You may not misrepresent the origins of this program; modified + * versions of the program must be marked as such and not identified as + * the original program. + * + * This disclaimer supplements the one included in the General Public + * License. TO THE FULLEST EXTENT PERMISSIBLE UNDER APPLICABLE LAW, THIS + * PROGRAM IS PROVIDED TO YOU "AS IS," WITH ALL FAULTS, WITHOUT WARRANTY + * OF ANY KIND, AND YOUR USE IS AT YOUR SOLE RISK. THE ENTIRE RISK OF + * SATISFACTORY QUALITY AND PERFORMANCE RESIDES WITH YOU. ELECTRONIC ARTS + * DISCLAIMS ANY AND ALL EXPRESS, IMPLIED OR STATUTORY WARRANTIES, + * INCLUDING IMPLIED WARRANTIES OF MERCHANTABILITY, SATISFACTORY QUALITY, + * FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT OF THIRD PARTY + * RIGHTS, AND WARRANTIES (IF ANY) ARISING FROM A COURSE OF DEALING, + * USAGE, OR TRADE PRACTICE. ELECTRONIC ARTS DOES NOT WARRANT AGAINST + * INTERFERENCE WITH YOUR ENJOYMENT OF THE PROGRAM; THAT THE PROGRAM WILL + * MEET YOUR REQUIREMENTS; THAT OPERATION OF THE PROGRAM WILL BE + * UNINTERRUPTED OR ERROR-FREE, OR THAT THE PROGRAM WILL BE COMPATIBLE + * WITH THIRD PARTY SOFTWARE OR THAT ANY ERRORS IN THE PROGRAM WILL BE + * CORRECTED. NO ORAL OR WRITTEN ADVICE PROVIDED BY ELECTRONIC ARTS OR + * ANY AUTHORIZED REPRESENTATIVE SHALL CREATE A WARRANTY. SOME + * JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF OR LIMITATIONS ON IMPLIED + * WARRANTIES OR THE LIMITATIONS ON THE APPLICABLE STATUTORY RIGHTS OF A + * CONSUMER, SO SOME OR ALL OF THE ABOVE EXCLUSIONS AND LIMITATIONS MAY + * NOT APPLY TO YOU. + */ + +/** + * @file tool.h + * @brief Defines tools, building properties, and tool effects for the + * Micropolis game. + * + * This header file includes definitions for various tools used in the + * game, along with the properties of buildings and the effects tools + * have on the game's world. It encompasses the core functionalities + * of tools, such as building, bulldozing, and querying, and their + * impact on the game's map and financial aspects. The classes and + * enumerations in this file form an integral part of the game's + * interaction mechanics, allowing players to modify and interact with + * the game world. + */ + + +#ifndef _H_TOOL +#define _H_TOOL + + +//////////////////////////////////////////////////////////////////////// + + +#include +#include + + +//////////////////////////////////////////////////////////////////////// +// Forward declarations + + +class Micropolis; + + +//////////////////////////////////////////////////////////////////////// + + +/** Value of a tile in the map array incuding the #MapTileBits. */ +typedef unsigned short MapValue; + + +/** + * Value of a tile in the map array excluding the #MapTileBits (that is, just + * a value from #MapCharacters). + */ +typedef unsigned short MapTile; + + +/** + * Status bits of a map tile. + * @see MapTile MapCharacters MapTile MapValue + * @todo #ALLBITS should end with MASK. + * @todo Decide what to do with #ANIMBIT (since sim-backend may not be the + * optimal place to do animation). + * @todo How many of these bits can be derived from the displayed tile? + */ +enum MapTileBits { + PWRBIT = 0x8000, ///< bit 15, tile has power. + CONDBIT = 0x4000, ///< bit 14. tile can conduct electricity. + BURNBIT = 0x2000, ///< bit 13, tile can be lit. + BULLBIT = 0x1000, ///< bit 12, tile is bulldozable. + ANIMBIT = 0x0800, ///< bit 11, tile is animated. + ZONEBIT = 0x0400, ///< bit 10, tile is the center tile of the zone. + + /// Mask for the bits-part of the tile + ALLBITS = ZONEBIT | ANIMBIT | BULLBIT | BURNBIT | CONDBIT | PWRBIT, + LOMASK = 0x03ff, ///< Mask for the #Tiles part of the tile + + BLBNBIT = BULLBIT | BURNBIT, + BLBNCNBIT = BULLBIT | BURNBIT | CONDBIT, + BNCNBIT = BURNBIT | CONDBIT, +}; + + +/** + * Available tools. + * + * These describe the wand values, the object dragged around on the screen. + */ +enum EditingTool { + TOOL_RESIDENTIAL, + TOOL_COMMERCIAL, + TOOL_INDUSTRIAL, + TOOL_FIRESTATION, + TOOL_POLICESTATION, + TOOL_QUERY, + TOOL_WIRE, + TOOL_BULLDOZER, + TOOL_RAILROAD, + TOOL_ROAD, + TOOL_STADIUM, + TOOL_PARK, + TOOL_SEAPORT, + TOOL_COALPOWER, + TOOL_NUCLEARPOWER, + TOOL_AIRPORT, + TOOL_NETWORK, + TOOL_WATER, + TOOL_LAND, + TOOL_FOREST, + + TOOL_COUNT, + TOOL_FIRST = TOOL_RESIDENTIAL, + TOOL_LAST = TOOL_FOREST, +}; + + +/** Set of modifications in the world accessible by position. */ +typedef std::map WorldModificationsMap; + + +/** List of messages to send to the frontend. */ +typedef std::list FrontendMessages; + +/** + * Class for storing effects of applying a tool to the world. + * + * When applying a tool, two things change: + * - The world map. + * - The funds of the player. + * - Messages sent to the player and the front-end. + * - Sounds played for the player. + * + * The funds gives a decision problem. To decide whether the tool can be + * applied, you need to know the cost. To know the cost you need to know the + * exact changes being made. + * The simplest way to compute the exact changes is to simply apply the tool to + * the world. This holds especially when tools get stacked on top of each + * other. + * + * This class provides an easy way out, greatly simplifying the problem. + * All tools do not modify the world directly, but instead put their results + * in an instance of this class, thus collecting all the modifications. + * After the whole operation is 'done', the #ToolEffects instance can tell the + * precise cost and what has been changed in the world. At that moment, the + * yes/no decision can be made, and the effects can be copied to the real map + * and funds. + * + * @todo Extend the class for storing messages and sounds. + */ +class ToolEffects +{ +public: + ToolEffects(Micropolis *sim); + ~ToolEffects(); + + void clear(); + void modifyWorld(); + bool modifyIfEnoughFunding(); + + MapValue getMapValue(const Position& pos) const; + inline MapValue getMapValue(int x, int y) const; + inline MapTile getMapTile(const Position& pos) const; + inline MapTile getMapTile(int x, int y) const; + inline int getCost() const; + + inline void addCost(int amount); + void setMapValue(const Position& pos, MapValue mapVal); + inline void setMapValue(int x, int y, MapValue mapVal); + inline void addFrontendMessage(FrontendMessage *msg); + +private: + Micropolis *sim; ///< Simulator to get map values from, and to apply changes. + int cost; ///< Accumulated costs. + WorldModificationsMap modifications; ///< Collected world modifications. + FrontendMessages frontendMessages; ///< Collected messages to send. +}; + + +//////////////////////////////////////////////////////////////////////// + + +/** + * Get the tile of a map position. + * @param pos Position being queried. + * @return Tile at the specified position. + * + * @pre Position must be within map limits + */ +inline MapTile ToolEffects::getMapTile(const Position& pos) const +{ + return this->getMapValue(pos) & LOMASK; +} + + +/** + * Get the tile of a map position. + * @param x Horizontal coordinate of position being queried. + * @param y Vertical coordinate of position being queried. + * @return Tile at the specified position. + * + * @pre Position must be within map limits + */ +inline MapValue ToolEffects::getMapTile(int x, int y) const +{ + return this->getMapValue(Position(x, y)) & LOMASK; +} + + +/** + * Get the total cost collected so far. + * @return Total cost. + */ +inline int ToolEffects::getCost() const +{ + return this->cost; +} + + +/** + * Add some amount to the total. + */ +inline void ToolEffects::addCost(int amount) +{ + assert(amount >= 0); // To be on the safe side. + this->cost += amount; +} + + +/** + * Get the value of a map position. + * @param x Horizontal coordinate of position being queried. + * @param y Vertical coordinate of position being queried. + * @return Map value at the specified position. + * + * @pre Position must be within map limits + */ +inline MapValue ToolEffects::getMapValue(int x, int y) const +{ + return this->getMapValue(Position(x, y)); +} + + +/** + * Set a new map value. + * @param pos Position to set. + * @param x Horizontal coordinate of position to set. + * @param y Vertical coordinate of position to set. + * @param mapVal Value to set. + */ +inline void ToolEffects::setMapValue(int x, int y, MapValue mapVal) +{ + this->setMapValue(Position(x, y), mapVal); +} + + +/** + * Add a #FrontendMessage to the queue to send. + * @param msg Frontend message to send. + */ +inline void ToolEffects::addFrontendMessage(FrontendMessage *msg) +{ + this->frontendMessages.push_back(msg); +} + + +//////////////////////////////////////////////////////////////////////// + + +/** Properties of a building with respect to its construction. */ +class BuildingProperties +{ +public: + BuildingProperties(int xs, int ys, MapTile base, EditingTool tool, + std::string tName, bool anim); + ~BuildingProperties(); + + const int sizeX; ///< Number of tiles in horizontal direction. + const int sizeY; ///< Number of tiles in vertical direction. + + const MapTile baseTile; ///< Tile value at top-left in the map. + + const EditingTool tool; ///< Tool needed for making the building. + + /** Name of the tool needed for making the building. */ + std::string toolName; + + const bool buildingIsAnimated; ///< Building has animated tiles. +}; + + +//////////////////////////////////////////////////////////////////////// + + +#endif diff --git a/core/traffic.cpp b/core/traffic.cpp new file mode 100644 index 0000000..dfa260b --- /dev/null +++ b/core/traffic.cpp @@ -0,0 +1,519 @@ +/* traffic.cpp + * + * Micropolis, Unix Version. This game was released for the Unix platform + * in or about 1990 and has been modified for inclusion in the One Laptop + * Per Child program. Copyright (C) 1989 - 2007 Electronic Arts Inc. If + * you need assistance with this program, you may contact: + * http://wiki.laptop.org/go/Micropolis or email micropolis@laptop.org. + * + * This program 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. + * + * This program 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 this program. If + * not, see . + * + * ADDITIONAL TERMS per GNU GPL Section 7 + * + * No trademark or publicity rights are granted. This license does NOT + * give you any right, title or interest in the trademark SimCity or any + * other Electronic Arts trademark. You may not distribute any + * modification of this program using the trademark SimCity or claim any + * affliation or association with Electronic Arts Inc. or its employees. + * + * Any propagation or conveyance of this program must include this + * copyright notice and these terms. + * + * If you convey this program (or any modifications of it) and assume + * contractual liability for the program to recipients of it, you agree + * to indemnify Electronic Arts for any liability that those contractual + * assumptions impose on Electronic Arts. + * + * You may not misrepresent the origins of this program; modified + * versions of the program must be marked as such and not identified as + * the original program. + * + * This disclaimer supplements the one included in the General Public + * License. TO THE FULLEST EXTENT PERMISSIBLE UNDER APPLICABLE LAW, THIS + * PROGRAM IS PROVIDED TO YOU "AS IS," WITH ALL FAULTS, WITHOUT WARRANTY + * OF ANY KIND, AND YOUR USE IS AT YOUR SOLE RISK. THE ENTIRE RISK OF + * SATISFACTORY QUALITY AND PERFORMANCE RESIDES WITH YOU. ELECTRONIC ARTS + * DISCLAIMS ANY AND ALL EXPRESS, IMPLIED OR STATUTORY WARRANTIES, + * INCLUDING IMPLIED WARRANTIES OF MERCHANTABILITY, SATISFACTORY QUALITY, + * FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT OF THIRD PARTY + * RIGHTS, AND WARRANTIES (IF ANY) ARISING FROM A COURSE OF DEALING, + * USAGE, OR TRADE PRACTICE. ELECTRONIC ARTS DOES NOT WARRANT AGAINST + * INTERFERENCE WITH YOUR ENJOYMENT OF THE PROGRAM; THAT THE PROGRAM WILL + * MEET YOUR REQUIREMENTS; THAT OPERATION OF THE PROGRAM WILL BE + * UNINTERRUPTED OR ERROR-FREE, OR THAT THE PROGRAM WILL BE COMPATIBLE + * WITH THIRD PARTY SOFTWARE OR THAT ANY ERRORS IN THE PROGRAM WILL BE + * CORRECTED. NO ORAL OR WRITTEN ADVICE PROVIDED BY ELECTRONIC ARTS OR + * ANY AUTHORIZED REPRESENTATIVE SHALL CREATE A WARRANTY. SOME + * JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF OR LIMITATIONS ON IMPLIED + * WARRANTIES OR THE LIMITATIONS ON THE APPLICABLE STATUTORY RIGHTS OF A + * CONSUMER, SO SOME OR ALL OF THE ABOVE EXCLUSIONS AND LIMITATIONS MAY + * NOT APPLY TO YOU. + */ + +/** + * @file traffic.cpp + * @brief Implements traffic simulation for the Micropolis game + * engine. + * + * This file handles the generation, management, and effects of + * traffic within the Micropolis game. It includes functions for + * simulating traffic flow, connecting destinations, and updating + * traffic density maps. The code manages various traffic-related + * tasks such as finding road connections, driving to destinations, + * and handling dead-end situations. Additionally, it updates the + * simulation's internal state based on traffic conditions. + */ + + +//////////////////////////////////////////////////////////////////////// + + +#include "micropolis.h" + + +//////////////////////////////////////////////////////////////////////// + + +/** + * Makes traffic starting from the road tile at \x, \y. + * @param x Start x position of the attempt + * @param y Start y position of the attempt + * @param dest Zone type to go to. + * @return \c 1 if connection found, \c 0 if not found, + * \c -1 if no connection to road found. + */ +short Micropolis::makeTrafficAt(int x, int y, ZoneType dest) +{ + Position pos; + pos.posX = x; + pos.posY = y; + + if (tryDrive(pos, dest)) { /* attempt to drive somewhere */ + addToTrafficDensityMap(); /* if sucessful, inc trafdensity */ + return 1; /* traffic passed */ + } + + return 0; /* traffic failed */ +} + + +/** + * Find a connection over a road from position \a x \a y to a specified zone type. + * @param x Start x position of the attempt + * @param y Start y position of the attempt + * @param dest Zone type to go to. + * @return \c 1 if connection found, \c 0 if not found, + * \c -1 if no connection to road found. + */ +short Micropolis::makeTraffic(int x, int y, ZoneType dest) +{ + Position startPos; + startPos.posX = x; + startPos.posY = y; + return makeTraffic(startPos, dest); +} + + +/** + * Find a connection over a road from \a startPos to a specified zone type. + * @param startPos Start position of the attempt. + * @param dest Zone type to go to. + * @return \c 1 if connection found, \c 0 if not found, + * \c -1 if no connection to road found. + */ +short Micropolis::makeTraffic(const Position &startPos, ZoneType dest) +{ + curMapStackPointer = 0; // Clear position stack + + Position pos(startPos); + +#if 0 + if ((!getRandom(2)) && findPerimeterTelecom(pos)) { + /* printf("Telecom!\n"); */ + return 1; + } +#endif + + if (findPerimeterRoad(&pos)) { /* look for road on zone perimeter */ + + if (tryDrive(pos, dest)) { /* attempt to drive somewhere */ + addToTrafficDensityMap(); /* if sucessful, inc trafdensity */ + return 1; /* traffic passed */ + } + + return 0; /* traffic failed */ + } else { + return -1; /* no road found */ + } +} + + +/** + * Update the #trafficDensityMap from the positions at the + * #curMapStackXY stack. + */ +void Micropolis::addToTrafficDensityMap() +{ + /* For each saved position of the drive */ + while (curMapStackPointer > 0) { + + Position pos = pullPos(); + if (pos.testBounds()) { + + MapTile tile = map[pos.posX][pos.posY] & LOMASK; + + if (tile >= ROADBASE && tile < POWERBASE) { + SimSprite *sprite; + + // Update traffic density. + int traffic = trafficDensityMap.worldGet(pos.posX, pos.posY); + traffic += 50; + traffic = min(traffic, 240); + trafficDensityMap.worldSet(pos.posX, pos.posY, (Byte)traffic); + + // Check for heavy traffic. + if (traffic >= 240 && getRandom(5) == 0) { + + trafMaxX = pos.posX; + trafMaxY = pos.posY; + + /* Direct helicopter towards heavy traffic */ + sprite = getSprite(SPRITE_HELICOPTER); + if (sprite != NULL && sprite->control == -1) { + + sprite->destX = trafMaxX * 16; + sprite->destY = trafMaxY * 16; + + } + } + } + } + } +} + + +/** + * Push a position onto the position stack. + * @param pos Position to push. + * @pre Stack may not be full. + */ +void Micropolis::pushPos(const Position &pos) +{ + curMapStackPointer++; + assert(curMapStackPointer < MAX_TRAFFIC_DISTANCE + 1); + curMapStackXY[curMapStackPointer] = pos; +} + + +/** + * Pull top-most position from the position stack. + * @return Pulled position. + * @pre Stack may not be empty (curMapStackPointer > 0) + */ +Position Micropolis::pullPos() +{ + assert(curMapStackPointer > 0); + curMapStackPointer--; + return curMapStackXY[curMapStackPointer + 1]; +} + + +/** + * Find a connection to a road at the perimeter. + * @param pos Starting position. + * Gets updated when a perimeter has been found. + * @return Indication that a connection has been found. + * + * @todo We could randomize the search. + */ +bool Micropolis::findPerimeterRoad(Position *pos) +{ + /* look for road on edges of zone */ + static const short PerimX[12] = {-1, 0, 1, 2, 2, 2, 1, 0,-1,-2,-2,-2}; + static const short PerimY[12] = {-2,-2,-2,-1, 0, 1, 2, 2, 2, 1, 0,-1}; + short tx, ty; + + for (short z = 0; z < 12; z++) { + + tx = pos->posX + PerimX[z]; + ty = pos->posY + PerimY[z]; + + if (testBounds(tx, ty)) { + + if (roadTest(map[tx][ty])) { + + pos->posX = tx; + pos->posY = ty; + + return true; + } + } + } + + return false; +} + + +/** + * Find a telecom connection at the perimeter. + * @param pos Position to start searching. + * @return A telecom connection has been found. + * + * @todo Decide whether we want telecomm code. + */ +bool Micropolis::findPerimeterTelecom(const Position &pos) +{ + /* look for telecom on edges of zone */ + static const short PerimX[12] = {-1, 0, 1, 2, 2, 2, 1, 0,-1,-2,-2,-2}; + static const short PerimY[12] = {-2,-2,-2,-1, 0, 1, 2, 2, 2, 1, 0,-1}; + short tx, ty, tile; + + for (short z = 0; z < 12; z++) { + + tx = pos.posX + PerimX[z]; + ty = pos.posX + PerimY[z]; + + if (testBounds(tx, ty)) { + + tile = map[tx][ty] & LOMASK; + if (tile >= TELEBASE && tile <= TELELAST) { + return true; + } + } + } + + return false; +} + + +/** + * Try to drive to a destination. + * @param startPos Starting position. + * @param destZone Zonetype to drive to. + * @return Was drive succesful? + * @post Position stack (curMapStackXY) is filled with some intermediate + * positions of the drive. + * + * @bug The stack is popped, but position (and dirLast) is not updated. + */ +bool Micropolis::tryDrive(const Position &startPos, ZoneType destZone) +{ + Direction2 dirLast = DIR2_INVALID; + Position drivePos(startPos); + + /* Maximum distance to try */ + for (short dist = 0; dist < MAX_TRAFFIC_DISTANCE; dist++) { + + Direction2 dir = tryGo(drivePos, dirLast); + if (dir != DIR2_INVALID) { // we found a road + drivePos.move(dir); + dirLast = rotate180(dir); + + /* Save pos every other move. + * This also relates to + * Micropolis::trafficDensityMap::MAP_BLOCKSIZE + */ + if (dist & 1) { + pushPos(drivePos); + } + + if (driveDone(drivePos, destZone)) { // if destination is reached + return true; /* pass */ + } + + } else { + + if (curMapStackPointer > 0) { /* dead end, backup */ + curMapStackPointer--; + dist += 3; + } else { + return false; /* give up at start */ + } + + } + } + + return false; /* gone MAX_TRAFFIC_DISTANCE */ +} + + +/** + * Try to drive one tile in a random direction. + * @param pos Current position. + * @param dirLast Forbidden direction for movement (to prevent reversing). + * @return Direction of movement, \c #DIR2_INVALID is returned if not moved. + */ +Direction2 Micropolis::tryGo(const Position &pos, Direction2 dirLast) +{ + Direction2 directions[4]; + + // Find connections from current position. + Direction2 dir = DIR2_NORTH; + int count = 0; + for (int i = 0; i < 4; i++) { + if (dir != dirLast && roadTest(getTileFromMap(pos, dir, DIRT))) { + // found a road in an allowed direction + directions[i] = dir; + count++; + } else { + directions[i] = DIR2_INVALID; + } + + dir = rotate90(dir); + } + + if (count == 0) { // dead end + return DIR2_INVALID; + } + + // We have at least one way to go. + + if (count == 1) { // only one solution + for (int i = 0; i < 4; i++) { + if (directions[i] != DIR2_INVALID) { + return directions[i]; + } + } + } + + // more than one choice, draw a random number. + int i = getRandom16() & 3; + while (directions[i] == DIR2_INVALID) { + i = (i + 1) & 3; + } + return directions[i]; +} + + +/** + * Get neighbouring tile from the map. + * @param pos Current position. + * @param dir Direction of neighbouring tile, only horizontal and + * vertical directions are supported. + * @param defaultTile Tile to return if off-map. + * @return The tile in the indicated direction. If tile is off-world or an + * incorrect direction is given, \c DIRT is returned. + */ +MapTile Micropolis::getTileFromMap(const Position &pos, + Direction2 dir, MapTile defaultTile) +{ + switch (dir) { + + case DIR2_NORTH: + if (pos.posY > 0) { + return map[pos.posX][pos.posY - 1] & LOMASK; + } + + return defaultTile; + + case DIR2_EAST: + if (pos.posX < WORLD_W - 1) { + return map[pos.posX + 1][pos.posY] & LOMASK; + } + + return defaultTile; + + case DIR2_SOUTH: + if (pos.posY < WORLD_H - 1) { + return map[pos.posX][pos.posY + 1] & LOMASK; + } + + return defaultTile; + + case DIR2_WEST: + if (pos.posX > 0) { + return map[pos.posX - 1][pos.posY] & LOMASK; + } + + return defaultTile; + + default: + return defaultTile; + + } +} + + +/** + * Has the journey arrived at its destination? + * @param pos Current position. + * @param destZone Zonetype to drive to. + * @return Destination has been reached. + */ +bool Micropolis::driveDone(const Position &pos, ZoneType destZone) +{ + // FIXME: Use macros to determine the zone type: residential, commercial or industrial. + /* commercial, industrial, residential destinations */ + static const MapTile targetLow[3] = {COMBASE, LHTHR, LHTHR}; + static const MapTile targetHigh[3] = {NUCLEAR, PORT, COMBASE}; + + assert(ZT_NUM_DESTINATIONS == LENGTH_OF(targetLow)); + assert(ZT_NUM_DESTINATIONS == LENGTH_OF(targetHigh)); + + MapTile l = targetLow[destZone]; // Lowest acceptable tile value + MapTile h = targetHigh[destZone]; // Highest acceptable tile value + + if (pos.posY > 0) { + MapTile z = map[pos.posX][pos.posY - 1] & LOMASK; + if (z >= l && z <= h) { + return true; + } + } + + if (pos.posX < (WORLD_W - 1)) { + MapTile z = map[pos.posX + 1][pos.posY] & LOMASK; + if (z >= l && z <= h) { + return true; + } + } + + if (pos.posY < (WORLD_H - 1)) { + MapTile z = map[pos.posX][pos.posY + 1] & LOMASK; + if (z >= l && z <= h) { + return true; + } + } + + if (pos.posX > 0) { + MapTile z = map[pos.posX - 1][pos.posY] & LOMASK; + if (z >= l && z <= h) { + return true; + } + } + + return false; +} + + +/** + * Can the given tile be used as road? + * @param mv Value from the map. + * @return Indication that you can drive on the given tile + */ +bool Micropolis::roadTest(MapValue mv) +{ + MapTile tile = mv & LOMASK; + + if (tile < ROADBASE || tile > LASTRAIL) { + return false; + } + + if (tile >= POWERBASE && tile < LASTPOWER) { + return false; + } + + return true; +} + + +//////////////////////////////////////////////////////////////////////// diff --git a/core/update.cpp b/core/update.cpp new file mode 100644 index 0000000..1c737cc --- /dev/null +++ b/core/update.cpp @@ -0,0 +1,281 @@ +/* update.cpp + * + * Micropolis, Unix Version. This game was released for the Unix platform + * in or about 1990 and has been modified for inclusion in the One Laptop + * Per Child program. Copyright (C) 1989 - 2007 Electronic Arts Inc. If + * you need assistance with this program, you may contact: + * http://wiki.laptop.org/go/Micropolis or email micropolis@laptop.org. + * + * This program 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. + * + * This program 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 this program. If + * not, see . + * + * ADDITIONAL TERMS per GNU GPL Section 7 + * + * No trademark or publicity rights are granted. This license does NOT + * give you any right, title or interest in the trademark SimCity or any + * other Electronic Arts trademark. You may not distribute any + * modification of this program using the trademark SimCity or claim any + * affliation or association with Electronic Arts Inc. or its employees. + * + * Any propagation or conveyance of this program must include this + * copyright notice and these terms. + * + * If you convey this program (or any modifications of it) and assume + * contractual liability for the program to recipients of it, you agree + * to indemnify Electronic Arts for any liability that those contractual + * assumptions impose on Electronic Arts. + * + * You may not misrepresent the origins of this program; modified + * versions of the program must be marked as such and not identified as + * the original program. + * + * This disclaimer supplements the one included in the General Public + * License. TO THE FULLEST EXTENT PERMISSIBLE UNDER APPLICABLE LAW, THIS + * PROGRAM IS PROVIDED TO YOU "AS IS," WITH ALL FAULTS, WITHOUT WARRANTY + * OF ANY KIND, AND YOUR USE IS AT YOUR SOLE RISK. THE ENTIRE RISK OF + * SATISFACTORY QUALITY AND PERFORMANCE RESIDES WITH YOU. ELECTRONIC ARTS + * DISCLAIMS ANY AND ALL EXPRESS, IMPLIED OR STATUTORY WARRANTIES, + * INCLUDING IMPLIED WARRANTIES OF MERCHANTABILITY, SATISFACTORY QUALITY, + * FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT OF THIRD PARTY + * RIGHTS, AND WARRANTIES (IF ANY) ARISING FROM A COURSE OF DEALING, + * USAGE, OR TRADE PRACTICE. ELECTRONIC ARTS DOES NOT WARRANT AGAINST + * INTERFERENCE WITH YOUR ENJOYMENT OF THE PROGRAM; THAT THE PROGRAM WILL + * MEET YOUR REQUIREMENTS; THAT OPERATION OF THE PROGRAM WILL BE + * UNINTERRUPTED OR ERROR-FREE, OR THAT THE PROGRAM WILL BE COMPATIBLE + * WITH THIRD PARTY SOFTWARE OR THAT ANY ERRORS IN THE PROGRAM WILL BE + * CORRECTED. NO ORAL OR WRITTEN ADVICE PROVIDED BY ELECTRONIC ARTS OR + * ANY AUTHORIZED REPRESENTATIVE SHALL CREATE A WARRANTY. SOME + * JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF OR LIMITATIONS ON IMPLIED + * WARRANTIES OR THE LIMITATIONS ON THE APPLICABLE STATUTORY RIGHTS OF A + * CONSUMER, SO SOME OR ALL OF THE ABOVE EXCLUSIONS AND LIMITATIONS MAY + * NOT APPLY TO YOU. + */ + +/** + * @file update.cpp + * @brief Handles updates and refreshes in various aspects of + * Micropolis. + * + * This file contains functions to update and refresh game elements + * such as maps, graphs, evaluation metrics, financial status, and + * other user interface components. It ensures that the game state is + * accurately reflected in the user interface, including changes in + * city time, budget, and city demand. The file plays a crucial role + * in syncing the game's backend calculations with frontend displays + * and interactions. + */ + + +//////////////////////////////////////////////////////////////////////// + + +#include "micropolis.h" +#include "text.h" + + +///////////////////////////////////////////////////////////////////////// + + +void Micropolis::doUpdateHeads() +{ + showValves(); + doTimeStuff(); + reallyUpdateFunds(); + updateOptions(); +} + + +void Micropolis::updateMaps() +{ + invalidateMaps(); + doUpdateHeads(); +} + + +void Micropolis::updateGraphs() +{ + changeCensus(); +} + + +void Micropolis::updateEvaluation() +{ + changeEval(); +} + + +void Micropolis::updateHeads() +{ + mustUpdateFunds = true; + valveFlag = true; + cityTimeLast = cityYearLast = cityMonthLast = totalFundsLast = + resLast = comLast = indLast = -999999; + doUpdateHeads(); +} + + +/** Set a flag that the funds display is out of date. */ +void Micropolis::updateFunds() +{ + mustUpdateFunds = true; +} + + +void Micropolis::reallyUpdateFunds() +{ + if (!mustUpdateFunds) { + return; + } + + mustUpdateFunds = false; + + if (totalFunds != totalFundsLast) { + totalFundsLast = totalFunds; + + callback->updateFunds(this, callbackVal, totalFunds); + } + +} + + +void Micropolis::doTimeStuff() +{ + updateDate(); +} + + +/** + * @bug Message is wrong. + */ +void Micropolis::updateDate() +{ + int megalinium = 1000000; + + cityTimeLast = cityTime >> 2; + + cityYear = ((int)cityTime / 48) + (int)startingYear; + cityMonth = ((int)cityTime % 48) >> 2; + + if (cityYear >= megalinium) { + setYear(startingYear); + cityYear = startingYear; + sendMessage(MESSAGE_NOT_ENOUGH_POWER, NOWHERE, NOWHERE, true); + + } + + if ((cityYearLast != cityYear) || + (cityMonthLast != cityMonth)) { + + cityYearLast = cityYear; + cityMonthLast = cityMonth; + + callback->updateDate(this, callbackVal, cityYear, cityMonth); + } +} + + +void Micropolis::showValves() +{ + if (valveFlag) { + drawValve(); + valveFlag = false; + } +} + + +void Micropolis::drawValve() +{ + float r, c, i; + + r = resValve; + + if (r < -1500) { + r = -1500; + } + + if (r > 1500) { + r = 1500; + } + + c = comValve; + + if (c < -1500) { + c = -1500; + } + + if (c > 1500) { + c = 1500; + } + + i = indValve; + + if (i < -1500) { + i = -1500; + } + + if (i > 1500) { + i = 1500; + } + + if ((r != resLast) || + (c != comLast) || + (i != indLast)) { + + resLast = (int)r; + comLast = (int)c; + indLast = (int)i; + + setDemand(r, c, i); + } +} + + +void Micropolis::setDemand(float r, float c, float i) +{ + callback->updateDemand(this, callbackVal, r, c, i); +} + + +void Micropolis::updateOptions() +{ + if (mustUpdateOptions) { + mustUpdateOptions = false; + callback->updateOptions(this, callbackVal); + } +} + + +/** @todo Keeping track of pending updates should be moved to the interface + * (the simulator generates events, the interface forwards them to + * the GUI when possible/allowed. + */ +void Micropolis::updateUserInterface() +{ + /// @todo Send all pending update messages to the user interface. + + // city: after load file, load scenario, or generate city + // map: when small overall map changes + // editor: when large close-up map changes + // graph: when graph changes + // evaluation: when evaluation changes + // budget: when budget changes + // date: when date changes + // funds: when funds change + // demand: when demand changes + // level: when level changes + // speed: when speed changes + // delay: when delay changes + // option: when options change +} + + +//////////////////////////////////////////////////////////////////////// diff --git a/core/utilities.cpp b/core/utilities.cpp new file mode 100644 index 0000000..7715c20 --- /dev/null +++ b/core/utilities.cpp @@ -0,0 +1,435 @@ +/* utilities.cpp + * + * Micropolis, Unix Version. This game was released for the Unix platform + * in or about 1990 and has been modified for inclusion in the One Laptop + * Per Child program. Copyright (C) 1989 - 2007 Electronic Arts Inc. If + * you need assistance with this program, you may contact: + * http://wiki.laptop.org/go/Micropolis or email micropolis@laptop.org. + * + * This program 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. + * + * This program 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 this program. If + * not, see . + * + * ADDITIONAL TERMS per GNU GPL Section 7 + * + * No trademark or publicity rights are granted. This license does NOT + * give you any right, title or interest in the trademark SimCity or any + * other Electronic Arts trademark. You may not distribute any + * modification of this program using the trademark SimCity or claim any + * affliation or association with Electronic Arts Inc. or its employees. + * + * Any propagation or conveyance of this program must include this + * copyright notice and these terms. + * + * If you convey this program (or any modifications of it) and assume + * contractual liability for the program to recipients of it, you agree + * to indemnify Electronic Arts for any liability that those contractual + * assumptions impose on Electronic Arts. + * + * You may not misrepresent the origins of this program; modified + * versions of the program must be marked as such and not identified as + * the original program. + * + * This disclaimer supplements the one included in the General Public + * License. TO THE FULLEST EXTENT PERMISSIBLE UNDER APPLICABLE LAW, THIS + * PROGRAM IS PROVIDED TO YOU "AS IS," WITH ALL FAULTS, WITHOUT WARRANTY + * OF ANY KIND, AND YOUR USE IS AT YOUR SOLE RISK. THE ENTIRE RISK OF + * SATISFACTORY QUALITY AND PERFORMANCE RESIDES WITH YOU. ELECTRONIC ARTS + * DISCLAIMS ANY AND ALL EXPRESS, IMPLIED OR STATUTORY WARRANTIES, + * INCLUDING IMPLIED WARRANTIES OF MERCHANTABILITY, SATISFACTORY QUALITY, + * FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT OF THIRD PARTY + * RIGHTS, AND WARRANTIES (IF ANY) ARISING FROM A COURSE OF DEALING, + * USAGE, OR TRADE PRACTICE. ELECTRONIC ARTS DOES NOT WARRANT AGAINST + * INTERFERENCE WITH YOUR ENJOYMENT OF THE PROGRAM; THAT THE PROGRAM WILL + * MEET YOUR REQUIREMENTS; THAT OPERATION OF THE PROGRAM WILL BE + * UNINTERRUPTED OR ERROR-FREE, OR THAT THE PROGRAM WILL BE COMPATIBLE + * WITH THIRD PARTY SOFTWARE OR THAT ANY ERRORS IN THE PROGRAM WILL BE + * CORRECTED. NO ORAL OR WRITTEN ADVICE PROVIDED BY ELECTRONIC ARTS OR + * ANY AUTHORIZED REPRESENTATIVE SHALL CREATE A WARRANTY. SOME + * JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF OR LIMITATIONS ON IMPLIED + * WARRANTIES OR THE LIMITATIONS ON THE APPLICABLE STATUTORY RIGHTS OF A + * CONSUMER, SO SOME OR ALL OF THE ABOVE EXCLUSIONS AND LIMITATIONS MAY + * NOT APPLY TO YOU. + */ + +/** + * @file utilities.cpp + * @brief Utility functions for the Micropolis game engine. + * + * This file includes a collection of utility functions used + * throughout the Micropolis game engine. These functions perform a + * variety of tasks such as manipulating game speed, updating game + * levels, handling city names, and managing game settings like + * disasters, auto-bulldoze, and sound. It also includes functions for + * updating the financial status and formatting numbers into currency + * strings. The utilities support the main game engine by providing + * essential services for game management and player interaction. + */ + + +//////////////////////////////////////////////////////////////////////// + + +#include "micropolis.h" + + +//////////////////////////////////////////////////////////////////////// + + +/* comefrom: drawTaxesCollected incBoxValue decBoxValue drawCurrentFunds + drawActualBox updateFunds updateCurrentCost */ +std::string Micropolis::makeDollarDecimalStr(const std::string &numStr) +{ + short leftMostSet; + short numOfDigits; + short numOfChars; + short numOfCommas; + short dollarIndex = 0; + short numIndex = 0; + short x; + + numOfDigits = numStr.length(); + + std::string dollarStr; + + dollarStr += '$'; + if (numOfDigits == 1) { + dollarStr += numStr[0]; + return dollarStr; + } else if (numOfDigits == 2) { + dollarStr += numStr[0]; + dollarStr += numStr[1]; + return dollarStr; + } else if (numOfDigits == 3) { + dollarStr += numStr[0]; + dollarStr += numStr[1]; + dollarStr += numStr[2]; + return dollarStr; + } else { + leftMostSet = numOfDigits % 3; + + if (leftMostSet == 0) { + leftMostSet = 3; + } + + numOfCommas = (numOfDigits - 1) / 3; + + /* add 1 for the dollar sign */ + numOfChars = numOfDigits + numOfCommas + 1; + + for (x = 1; x <= leftMostSet; x++) { + dollarStr += numStr[numIndex++]; + } + + for (x = 1; x <= numOfCommas; x++) { + dollarStr += ','; + dollarStr += numStr[numIndex++]; + dollarStr += numStr[numIndex++]; + dollarStr += numStr[numIndex++]; + } + + } + + return dollarStr; +} + +/** + * Pause a simulation + * @see resume + */ +void Micropolis::pause() +{ + if (!simPaused) { + simPausedSpeed = simSpeedMeta; + setSpeed(0); + simPaused = true; + } + + // Call back even if the state did not change. + callback->updatePaused(this, callbackVal, simPaused); +} + +/** + * Resume simulation after pausing it + * @see pause + */ +void Micropolis::resume() +{ + if (simPaused) { + simPaused = false; + setSpeed(simPausedSpeed); + } + + // Call back even if the state did not change. + callback->updatePaused(this, callbackVal, simPaused); +} + + +void Micropolis::setSpeed(short speed) +{ + if (speed < 0) { + speed = 0; + } else if (speed > 3) { + speed = 3; + } + + simSpeedMeta = speed; + + if (simPaused) { + simPausedSpeed = simSpeedMeta; + speed = 0; + } + + simSpeed = speed; + + callback->updateSpeed(this, callbackVal, speed); +} + + +void Micropolis::setPasses(int passes) +{ + simPasses = passes; + simPass = 0; + callback->updatePasses(this, callbackVal, passes); +} + +/** + * Set the game level and initial funds. + * @param level New game level. + */ +void Micropolis::setGameLevelFunds(GameLevel level) +{ + switch (level) { + + default: + case LEVEL_EASY: + setFunds(20000); + setGameLevel(LEVEL_EASY); + break; + + case LEVEL_MEDIUM: + setFunds(10000); + setGameLevel(LEVEL_MEDIUM); + break; + + case LEVEL_HARD: + setFunds(5000); + setGameLevel(LEVEL_HARD); + break; + + } +} + + +/** Set/change the game level. + * @param level New game level. + */ +void Micropolis::setGameLevel(GameLevel level) +{ + assert(level >= LEVEL_FIRST && level <= LEVEL_LAST); + gameLevel = level; + updateGameLevel(); +} + + +/** Report to the front-end that a new game level has been set. */ +void Micropolis::updateGameLevel() +{ + callback->updateGameLevel(this, callbackVal, gameLevel); +} + + +void Micropolis::setCityName(const std::string &name) +{ + std::string cleanName; + + int i; + int n = name.length(); + for (i = 0; i < n; i++) { + char ch = name[i]; + if (!isalnum(ch)) { + ch = '_'; + } + cleanName.push_back(ch); + } + + setCleanCityName(cleanName); +} + + +/** + * Set the name of the city. + * @param name New name of the city. + */ +void Micropolis::setCleanCityName(const std::string &name) +{ + cityName = name; + + callback->updateCityName(this, callbackVal, cityName); +} + + +void Micropolis::setYear(int year) +{ + // Must prevent year from going negative, since it screws up the non-floored modulo arithmetic. + if (year < startingYear) { + year = startingYear; + } + + year = (year - startingYear) - (cityTime / 48); + cityTime += year * 48; + doTimeStuff(); +} + + +/** + * Get the current year. + * @return The current game year. + */ +int Micropolis::currentYear() +{ + return (cityTime / 48) + startingYear; +} + + +/** + * Notify the user interface to start a new game. + */ +void Micropolis::doNewGame() +{ + callback->newGame(this, callbackVal); +} + + +/** + * set the enableDisasters flag, and set the flag to + * update the user interface. + * @param value New setting for #enableDisasters + */ +void Micropolis::setEnableDisasters(bool value) +{ + enableDisasters = value; + mustUpdateOptions = true; +} + + +/** + * Set the auto-budget to the given value. + * @param value New value for the auto-budget setting. + */ +void Micropolis::setAutoBudget(bool value) +{ + autoBudget = value; + mustUpdateOptions = true; +} + + +/** + * Set the autoBulldoze flag to the given value, + * and set the mustUpdateOptions flag to update + * the user interface. + * + * @param value The value to set autoBulldoze to. + */ +void Micropolis::setAutoBulldoze(bool value) +{ + autoBulldoze = value; + mustUpdateOptions = true; +} + + +/** + * Set the autoGoto flag to the given value, + * and set the mustUpdateOptions flag to update + * the user interface. + * + * @param value The value to set autoGoto to. + */ +void Micropolis::setAutoGoto(bool value) +{ + autoGoto = value; + mustUpdateOptions = true; +} + + +/** + * Set the enableSound flag to the given value, + * and set the mustUpdateOptions flag to update + * the user interface. + * + * @param value The value to set enableSound to. + */ +void Micropolis::setEnableSound(bool value) +{ + enableSound = value; + mustUpdateOptions = true; +} + + +/** + * Set the doAnimation flag to the given value, + * and set the mustUpdateOptions flag to update + * the user interface. + * + * @param value The value to set doAnimation to. + */ +void Micropolis::setDoAnimation(bool value) +{ + doAnimation = value; + mustUpdateOptions = true; +} + + +/** + * Set the doMessages flag to the given value, + * and set the mustUpdateOptions flag to update + * the user interface. + * + * @param value The value to set doMessages to. + */ +void Micropolis::setDoMessages(bool value) +{ + doMessages = value; + mustUpdateOptions = true; +} + + +/** + * Set the doNotices flag to the given value, + * and set the mustUpdateOptions flag to update + * the user interface. + * + * @param value The value to set doNotices to. + */ +void Micropolis::setDoNotices(bool value) +{ + doNotices = value; + mustUpdateOptions = true; +} + + +/** + * Return the residential, commercial and industrial + * development demands, as floating point numbers + * from -1 (lowest demand) to 1 (highest demand). + */ +void Micropolis::getDemands( + float *resDemandResult, + float *comDemandResult, + float *indDemandResult) +{ + *resDemandResult = (float)resValve / (float)RES_VALVE_RANGE; + *comDemandResult = (float)comValve / (float)COM_VALVE_RANGE; + *indDemandResult = (float)indValve / (float)IND_VALVE_RANGE; +} + + +//////////////////////////////////////////////////////////////////////// diff --git a/core/zone.cpp b/core/zone.cpp new file mode 100644 index 0000000..291e154 --- /dev/null +++ b/core/zone.cpp @@ -0,0 +1,1037 @@ +/* zone.cpp + * + * Micropolis, Unix Version. This game was released for the Unix platform + * in or about 1990 and has been modified for inclusion in the One Laptop + * Per Child program. Copyright (C) 1989 - 2007 Electronic Arts Inc. If + * you need assistance with this program, you may contact: + * http://wiki.laptop.org/go/Micropolis or email micropolis@laptop.org. + * + * This program 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. + * + * This program 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 this program. If + * not, see . + * + * ADDITIONAL TERMS per GNU GPL Section 7 + * + * No trademark or publicity rights are granted. This license does NOT + * give you any right, title or interest in the trademark SimCity or any + * other Electronic Arts trademark. You may not distribute any + * modification of this program using the trademark SimCity or claim any + * affliation or association with Electronic Arts Inc. or its employees. + * + * Any propagation or conveyance of this program must include this + * copyright notice and these terms. + * + * If you convey this program (or any modifications of it) and assume + * contractual liability for the program to recipients of it, you agree + * to indemnify Electronic Arts for any liability that those contractual + * assumptions impose on Electronic Arts. + * + * You may not misrepresent the origins of this program; modified + * versions of the program must be marked as such and not identified as + * the original program. + * + * This disclaimer supplements the one included in the General Public + * License. TO THE FULLEST EXTENT PERMISSIBLE UNDER APPLICABLE LAW, THIS + * PROGRAM IS PROVIDED TO YOU "AS IS," WITH ALL FAULTS, WITHOUT WARRANTY + * OF ANY KIND, AND YOUR USE IS AT YOUR SOLE RISK. THE ENTIRE RISK OF + * SATISFACTORY QUALITY AND PERFORMANCE RESIDES WITH YOU. ELECTRONIC ARTS + * DISCLAIMS ANY AND ALL EXPRESS, IMPLIED OR STATUTORY WARRANTIES, + * INCLUDING IMPLIED WARRANTIES OF MERCHANTABILITY, SATISFACTORY QUALITY, + * FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT OF THIRD PARTY + * RIGHTS, AND WARRANTIES (IF ANY) ARISING FROM A COURSE OF DEALING, + * USAGE, OR TRADE PRACTICE. ELECTRONIC ARTS DOES NOT WARRANT AGAINST + * INTERFERENCE WITH YOUR ENJOYMENT OF THE PROGRAM; THAT THE PROGRAM WILL + * MEET YOUR REQUIREMENTS; THAT OPERATION OF THE PROGRAM WILL BE + * UNINTERRUPTED OR ERROR-FREE, OR THAT THE PROGRAM WILL BE COMPATIBLE + * WITH THIRD PARTY SOFTWARE OR THAT ANY ERRORS IN THE PROGRAM WILL BE + * CORRECTED. NO ORAL OR WRITTEN ADVICE PROVIDED BY ELECTRONIC ARTS OR + * ANY AUTHORIZED REPRESENTATIVE SHALL CREATE A WARRANTY. SOME + * JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF OR LIMITATIONS ON IMPLIED + * WARRANTIES OR THE LIMITATIONS ON THE APPLICABLE STATUTORY RIGHTS OF A + * CONSUMER, SO SOME OR ALL OF THE ABOVE EXCLUSIONS AND LIMITATIONS MAY + * NOT APPLY TO YOU. + */ + +/** + * @file zone.cpp + * @brief Manages zone processing in Micropolis. + * + * This file contains functions related to zone processing in the + * Micropolis game. It includes routines for handling different types + * of zones such as residential, commercial, and industrial. Functions + * in this file are responsible for simulating zone growth, decline, + * and effects like pollution, power supply, and traffic generation. + * It also includes utility functions for evaluating zone conditions + * and performing zone transformations such as building or demolishing + * structures in response to game conditions. + */ + + +//////////////////////////////////////////////////////////////////////// + + +#include "micropolis.h" + + +//////////////////////////////////////////////////////////////////////// + + +/** + * Handle zone. + * @param pos Position of the zone. + */ +void Micropolis::doZone(const Position &pos) +{ + // Set Power Bit in Map from powerGridMap + bool zonePowerFlag = setZonePower(pos); + + + if (zonePowerFlag) { + poweredZoneCount++; + } else { + unpoweredZoneCount++; + } + + MapTile tile = map[pos.posX][pos.posY] & LOMASK; + + // Do special zones. + if ((tile > PORTBASE) && + (tile < CHURCH1BASE)) { + doSpecialZone(pos, zonePowerFlag); + return; + } + + // Do residential zones. + if (tile < HOSPITAL) { + doResidential(pos, zonePowerFlag); + return; + } + + // Do hospitals and churches. + if ((tile < COMBASE) || + ((tile >= CHURCH1BASE) && + (tile <= CHURCH7LAST))) { + doHospitalChurch(pos); + return; + } + + // Do commercial zones. + if (tile < INDBASE) { + doCommercial(pos, zonePowerFlag); + return; + } + + // Do industrial zones. + if (tile < CHURCH1BASE) { + doIndustrial(pos, zonePowerFlag); + return; + } + + printf("UNEXPOECTED ZONE: %d !!!\n", tile); +} + +/** + * Handle repairing or removing of hospitals and churches. + * @param pos Position of the hospital or church. + */ +void Micropolis::doHospitalChurch(const Position &pos) +{ + MapTile tile = map[pos.posX][pos.posY] & LOMASK; + + if (tile == HOSPITAL) { + + hospitalPop++; + + if (!(cityTime & 15)) { + repairZone(pos, HOSPITAL, 3); + } + + if (needHospital == -1) { // Too many hospitals! + if (!getRandom(20)) { + zonePlop(pos, RESBASE); // Remove hospital. + } + } + + } else if ((tile == CHURCH0) || + (tile == CHURCH1) || + (tile == CHURCH2) || + (tile == CHURCH3) || + (tile == CHURCH4) || + (tile == CHURCH5) || + (tile == CHURCH6) || + (tile == CHURCH7)) { + + churchPop++; + + //printf("CHURCH %d %d %d %d\n", churchPop, pos.posX, pos.posY, tile); + + bool simulate = true; + + if (!(cityTime & 15)) { + repairZone(pos, tile, 3); + } + + if (needChurch == -1) { // Too many churches! + if (!getRandom(20)) { + zonePlop(pos, RESBASE); // Remove church. + simulate = false; + } + } + + if (simulate) { + //printf("SIM %d %d %d\n", pos.posX, pos.posY, tile); + + int churchNumber = 0; + + switch (tile) { + case CHURCH0: + churchNumber = 0; + break; + case CHURCH1: + churchNumber = 1; + break; + case CHURCH2: + churchNumber = 2; + break; + case CHURCH3: + churchNumber = 3; + break; + case CHURCH4: + churchNumber = 4; + break; + case CHURCH5: + churchNumber = 5; + break; + case CHURCH6: + churchNumber = 6; + break; + case CHURCH7: + churchNumber = 7; + break; + default: + assert(0); // Unexpected church tile + break; + } + + callback->simulateChurch(this, callbackVal, pos.posX, pos.posY, churchNumber); + } + + } + +} + + +#define ASCBIT (ANIMBIT | CONDBIT | BURNBIT) +#define REGBIT (CONDBIT | BURNBIT) + +void Micropolis::setSmoke(const Position &pos, bool zonePower) +{ + static bool aniThis[8] = { true, false, true, true, false, false, true, true }; + static short dx1[8] = { -1, 0, 1, 0, 0, 0, 0, 1 }; + static short dy1[8] = { -1, 0, -1, -1, 0, 0, -1, -1 }; + static short aniTabA[8] = { 0, 0, 32, 40, 0, 0, 48, 56 }; + static short aniTabB[8] = { 0, 0, 36, 44, 0, 0, 52, 60 }; + static short aniTabC[8] = { IND1, 0, IND2, IND4, 0, 0, IND6, IND8 }; + static short aniTabD[8] = { IND1, 0, IND3, IND5, 0, 0, IND7, IND9 }; + + MapTile tile = map[pos.posX][pos.posY] & LOMASK; + + if (tile < IZB) { + return; + } + + int z = (tile - IZB) >>3; /// @todo Why div 8? Industry is 9 tiles long!! + z = z & 7; + + if (aniThis[z]) { + int xx = pos.posX + dx1[z]; + int yy = pos.posY + dy1[z]; + + if (testBounds(xx, yy)) { + + if (zonePower) { + + /// @todo Why do we assign the same map position twice? + /// @todo Add #SMOKEBASE into aniTabA and aniTabB tables? + if ((map[xx][yy] & LOMASK) == aniTabC[z]) { + map[xx][yy] = ASCBIT | (SMOKEBASE + aniTabA[z]); + map[xx][yy] = ASCBIT | (SMOKEBASE + aniTabB[z]); + } + + } else { + + /// @todo Why do we assign the same map position twice? + if ((map[xx][yy] & LOMASK) > aniTabC[z]) { + map[xx][yy] = REGBIT | aniTabC[z]; + map[xx][yy] = REGBIT | aniTabD[z]; + } + + } + + } + + } + +} + + +/** + * If needed, add a new hospital or a new church. + * @param pos Center position of the new hospital or church. + */ +void Micropolis::makeHospital(const Position &pos) +{ + if (needHospital > 0) { + zonePlop(pos, HOSPITAL - 4); + needHospital = 0; + return; + } + + if (needChurch > 0) { + int churchType = getRandom(7); // 0 to 7 inclusive + int tile; + if (churchType == 0) { + tile = CHURCH0; + } else { + tile = CHURCH1 + ((churchType - 1) * 9); + } + + //printf("NEW CHURCH tile %d x %d y %d type %d\n", tile, pos.posX, pos.posY, churchType); + + zonePlop(pos, tile - 4); + needChurch = 0; + return; + } +} + +/** + * Compute land value at \a pos, taking pollution into account. + * @param pos Position of interest. + * @return Indication of land-value adjusted for pollution + * (\c 0 => low value, \c 3 => high value) + */ +short Micropolis::getLandPollutionValue(const Position &pos) +{ + short landVal; + + landVal = landValueMap.worldGet(pos.posX, pos.posY); + landVal -= pollutionDensityMap.worldGet(pos.posX, pos.posY); + + if (landVal < 30) { + return 0; + } + + if (landVal < 80) { + return 1; + } + + if (landVal < 150) { + return 2; + } + + return 3; +} + + +/** + * Update the rate of growth at position \a pos by \a amount. + * @param pos Position to modify. + * @param amount Amount of change (can both be positive and negative). + */ +void Micropolis::incRateOfGrowth(const Position &pos, int amount) +{ + int value = rateOfGrowthMap.worldGet(pos.posX, pos.posY); + + value = clamp(value + amount * 4, -200, 200); + rateOfGrowthMap.worldSet(pos.posX, pos.posY, value); +} + + +/** + * Put down a 3x3 zone around the center tile at \a pos.. + * @param base Tile number of the top-left tile. @see Tiles + * @return Build was a success. + * @bug This function allows partial on-map construction. Is that intentional? No! + */ +bool Micropolis::zonePlop(const Position &pos, int base) +{ + short z, x; + static const short Zx[9] = {-1, 0, 1,-1, 0, 1,-1, 0, 1}; + static const short Zy[9] = {-1,-1,-1, 0, 0, 0, 1, 1, 1}; + + for (z = 0; z < 9; z++) { /* check for fire */ + int xx = pos.posX + Zx[z]; + int yy = pos.posY + Zy[z]; + + if (testBounds(xx, yy)) { + x = map[xx][yy] & LOMASK; + + if ((x >= FLOOD) && (x < ROADBASE)) { + return false; + } + + } + + } + + for (z = 0; z < 9; z++) { + int xx = pos.posX + Zx[z]; + int yy = pos.posY + Zy[z]; + + if (testBounds(xx, yy)) { + map[xx][yy] = base + BNCNBIT; + } + + base++; + } + + setZonePower(pos); + map[pos.posX][pos.posY] |= ZONEBIT + BULLBIT; + + return true; +} + +/** + * Count the number of single tile houses in a residential zone. + * @param pos Position of the residential zone. + * @return Number of single tile houses. + */ +short Micropolis::doFreePop(const Position &pos) +{ + short count = 0; + + for (short x = pos.posX - 1; x <= pos.posX + 1; x++) { + for (short y = pos.posY - 1; y <= pos.posY + 1; y++) { + if (x >= 0 && x < WORLD_W && y >= 0 && y < WORLD_H) { + MapTile tile = map[x][y] & LOMASK; + if (tile >= LHTHR && tile <= HHTHR) { + count++; + } + } + } + } + + return count; +} + + +/** + * Copy the value of #powerGridMap at position \a pos to the map. + * @param pos Position to copy. + * @return Does the tile have power? + */ +bool Micropolis::setZonePower(const Position &pos) +{ + MapValue mapValue = map[pos.posX][pos.posY]; + MapTile tile = mapValue & LOMASK; + + if (tile == NUCLEAR || tile == POWERPLANT) { + map[pos.posX][pos.posY] = mapValue | PWRBIT; + return true; + } + + if (powerGridMap.worldGet(pos.posX, pos.posY)) { + map[pos.posX][pos.posY] = mapValue | PWRBIT; + return true; + } else { + map[pos.posX][pos.posY] = mapValue & (~PWRBIT); + return false; + } +} + + +/** + * Try to build a house at the zone at \a pos. + * @param pos Center tile of the zone. + * @param value Value to build (land value?) + * @todo Have some form of looking around the center tile (like getFromMap()) + */ +void Micropolis::buildHouse(const Position &pos, int value) +{ + short z, score, hscore, BestLoc; + static short ZeX[9] = { 0,-1, 0, 1,-1, 1,-1, 0, 1}; + static short ZeY[9] = { 0,-1,-1,-1, 0, 0, 1, 1, 1}; + + BestLoc = 0; + hscore = 0; + + for (z = 1; z < 9; z++) { + int xx = pos.posX + ZeX[z]; + int yy = pos.posY + ZeY[z]; + + if (testBounds(xx, yy)) { + + score = evalLot(xx, yy); + + /// @bug score is never 0 !! + if (score != 0) { + + if (score > hscore) { + hscore = score; + BestLoc = z; + } + + /// @todo Move the code below to a better place. + /// If we just updated hscore above, we could + // trigger this code too. + if (score == hscore && !(getRandom16() & 7)) { + BestLoc = z; + } + + } + + } + + } + + if (BestLoc) { + int xx = pos.posX + ZeX[BestLoc]; + int yy = pos.posY + ZeY[BestLoc]; + + if (testBounds(xx, yy)) { + /// @todo Is HOUSE the proper constant here? + map[xx][yy] = HOUSE + BLBNCNBIT + getRandom(2) + value * 3; + } + + } +} + + +/** + * Evaluate suitability of the position for placing a new house. + * @return Suitability. + */ +short Micropolis::evalLot(int x, int y) +{ + short z, score; + static short DX[4] = { 0, 1, 0,-1}; + static short DY[4] = {-1, 0, 1, 0}; + + /* test for clear lot */ + z = map[x][y] & LOMASK; + + if (z && (z < RESBASE || z > RESBASE + 8)) { + return -1; + } + + score = 1; + + for (z = 0; z < 4; z++) { + int xx = x + DX[z]; + int yy = y + DY[z]; + + if (testBounds(xx, yy) && + map[xx][yy] != DIRT && (map[xx][yy] & LOMASK) <= LASTROAD) { + score++; /* look for road */ + } + + } + + return score; +} + +/** + * Handle residential zone. + * @param pos Center tile of the residential zone. + * @param zonePwrFlg Does the zone have power? + */ +void Micropolis::doResidential(const Position &pos, bool zonePower) +{ + short tpop, zscore, locvalve, value, TrfGood; + + resZonePop++; + + MapTile tile = map[pos.posX][pos.posY] & LOMASK; + + if (tile == FREEZ) { + tpop = doFreePop(pos); + } else { + tpop = getResZonePop(tile); + } + + resPop += tpop; + + if (tpop > getRandom(35)) { + /* Try driving from residential to commercial */ + TrfGood = makeTraffic(pos, ZT_COMMERCIAL); + } else { + TrfGood = 1; + } + + if (TrfGood == -1) { + value = getLandPollutionValue(pos); + doResOut(pos, tpop, value); + return; + } + + if (tile == FREEZ || !(getRandom16() & 7)) { + + locvalve = evalRes(pos, TrfGood); + zscore = resValve + locvalve; + + if (!zonePower) { + zscore = -500; + } + + if (zscore > -350 && + ((short)(zscore - 26380) > ((short)getRandom16Signed()))) { + + if (!tpop && !(getRandom16() & 3)) { + makeHospital(pos); + return; + } + + value = getLandPollutionValue(pos); + doResIn(pos, tpop, value); + return; + } + + if (zscore < 350 && + (((short)(zscore + 26380)) < ((short)getRandom16Signed()))) { + value = getLandPollutionValue(pos); + doResOut(pos, tpop, value); + } + } +} + + +/** + * Perform residential immigration into the current residential tile. + * @param pos Position of the tile. + * @param pop Population ? + * @param value Land value corrected for pollution. + */ +void Micropolis::doResIn(const Position &pos, int pop, int value) +{ + short pollution = pollutionDensityMap.worldGet(pos.posX, pos.posY); + + if (pollution > 128) { + return; + } + + MapTile tile = map[pos.posX][pos.posY] & LOMASK; + + if (tile == FREEZ) { + + if (pop < 8) { + buildHouse(pos, value); + incRateOfGrowth(pos, 1); + return; + } + + if (populationDensityMap.worldGet(pos.posX, pos.posY) > 64) { + resPlop(pos, 0, value); + incRateOfGrowth(pos, 8); + return; + } + + return; + } + + if (pop < 40) { + resPlop(pos, (pop / 8) - 1, value); + incRateOfGrowth(pos, 8); + } + +} + + +/** + * Perform residential emigration from the current residential tile. + * @param pos Position of the tile. + * @param pop Population ? + * @param value Land value corrected for pollution. + */ +void Micropolis::doResOut(const Position &pos, int pop, int value) +{ + static short Brdr[9] = {0,3,6,1,4,7,2,5,8}; + short x, y, loc, z; + + if (!pop) { + return; + } + + if (pop > 16) { + resPlop(pos, (pop - 24) / 8, value); + incRateOfGrowth(pos, -8); + return; + } + + if (pop == 16) { + incRateOfGrowth(pos, -8); + map[pos.posX][pos.posY] = (FREEZ | BLBNCNBIT | ZONEBIT); + for (x = pos.posX - 1; x <= pos.posX + 1; x++) { + for (y = pos.posY - 1; y <= pos.posY + 1; y++) { + if (testBounds(x, y)) { + if ((map[x][y] & LOMASK) != FREEZ) { + map[x][y] = LHTHR + value + getRandom(2) + BLBNCNBIT; + } + } + } + } + } + + if (pop < 16) { + incRateOfGrowth(pos, -1); + z = 0; + for (x = pos.posX - 1; x <= pos.posX + 1; x++) { + for (y = pos.posY - 1; y <= pos.posY + 1; y++) { + if (testBounds(x, y)) { + loc = map[x][y] & LOMASK; + if ((loc >= LHTHR) && (loc <= HHTHR)) { + map[x][y] = Brdr[z] + BLBNCNBIT + FREEZ - 4; + return; + } + } + z++; + } + } + } +} + + +/** + * Return population of a residential zone center tile + * (RZB, RZB+9, ..., HOSPITAL - 9). + * + * @param mapTile Center tile of a residential zone. + * @return Population of the residential zone. + * (16, 24, 32, 40, 16, ..., 40 ) + */ +short Micropolis::getResZonePop(MapTile mapTile) +{ + short CzDen = ((mapTile - RZB) / 9) % 4; + + return CzDen * 8 + 16; +} + +/** + * Put down a residential zone. + * @param pos Center tile of the residential zone. + * @param den Population density (0..3) + * @param value Land value - pollution (0..3), higher is better. + */ +void Micropolis::resPlop(const Position &pos, int den, int value) +{ + short base; + + base = ((value * 4 + den) * 9) + RZB - 4; + zonePlop(pos, base); +} + + +/** + * Evaluate residential zone. + */ +short Micropolis::evalRes(const Position &pos, int traf) +{ + short value; + + if (traf < 0) { + return -3000; + } + + value = landValueMap.worldGet(pos.posX, pos.posY); + value -= pollutionDensityMap.worldGet(pos.posX, pos.posY); + + if (value < 0) { + value = 0; /* Cap at 0 */ + } else { + value = min(value * 32, 6000); /* Cap at 6000 */ + } + + value = value - 3000; + + return value; +} + + +/** + * Handle commercial zone. + * @param pos Position of the commercial zone. + * @param zonePwrFlg Does the zone have power? + * @todo Make zonePwrFlg a boolean. + */ +void Micropolis::doCommercial(const Position &pos, bool zonePower) +{ + short tpop, TrfGood; + short zscore, locvalve, value; + + MapTile tile = map[pos.posX][pos.posY] & LOMASK; + + comZonePop++; + tpop = getComZonePop(tile); + comPop += tpop; + + if (tpop > getRandom(5)) { + /* Try driving from commercial to industrial */ + TrfGood = makeTraffic(pos, ZT_INDUSTRIAL); + } else { + TrfGood = 1; + } + + if (TrfGood == -1) { + value = getLandPollutionValue(pos); + doComOut(pos, tpop, value); + return; + } + + if (!(getRandom16() & 7)) { + + locvalve = evalCom(pos, TrfGood); + zscore = comValve + locvalve; + + if (!zonePower) { + zscore = -500; + } + + if (TrfGood && + (zscore > -350) && + (((short)(zscore - 26380)) > ((short)getRandom16Signed()))) { + value = getLandPollutionValue(pos); + doComIn(pos, tpop, value); + return; + } + + if ((zscore < 350) && + (((short)(zscore + 26380)) < ((short)getRandom16Signed()))) { + value = getLandPollutionValue(pos); + doComOut(pos, tpop, value); + } + + } + +} + + +/** + * Handle immigration of commercial zone. + * @param pos Position of the commercial zone. + * @param pop Population ? + * @param value Land value corrected for pollution. + */ +void Micropolis::doComIn(const Position &pos, int pop, int value) +{ + short z; + + z = landValueMap.worldGet(pos.posX, pos.posY); + z = z >>5; + + if (pop > z) { + return; + } + + if (pop < 5) { + comPlop(pos, pop, value); + incRateOfGrowth(pos, 8); + } +} + +/** + * Handle emigration of commercial zone. + * @param pos Position of the commercial zone. + * @param pop Population ? + * @param value Land value corrected for pollution. + */ +void Micropolis::doComOut(const Position &pos, int pop, int value) +{ + if (pop > 1) { + comPlop(pos, pop - 2, value); + incRateOfGrowth(pos, -8); + return; + } + + if (pop == 1) { + zonePlop(pos, COMBASE); + incRateOfGrowth(pos, -8); + } +} + + +/** + * Get commercial zone population number. + * @param tile Tile of the commercial zone. + * @return Population number of the zone. + */ +short Micropolis::getComZonePop(MapTile tile) +{ + if (tile == COMCLR) { + return 0; + } + + short CzDen = ((tile - CZB) / 9) % 5 + 1; + return CzDen; +} + + +/** + * Build a commercial zone. + * @param pos Position of the commercial zone. + * @param Den Density + * @param Value Land value corrected for pollution. + */ +void Micropolis::comPlop(const Position &pos, int Den, int Value) +{ + short base; + + base = ((Value * 5) + Den) * 9 + CZB - 4; + zonePlop(pos, base); +} + + +/** + * Compute evaluation of a commercial zone. + * @param traf Result if traffic attempt. + * @return Evaluation value of the commercial zone. + */ +short Micropolis::evalCom(const Position &pos, int traf) +{ + short Value; + + if (traf < 0) { + return -3000; + } + + Value = comRateMap.worldGet(pos.posX, pos.posY); + + return Value; +} + + +/** + * Handle industrial zone. + * @param pos Position of the industrial zone. + * @param zonePwrFlg Does the zone have power? + * @todo Make zonePwrFlg a boolean. + */ +void Micropolis::doIndustrial(const Position &pos, bool zonePower) +{ + short tpop, zscore, TrfGood; + + MapTile tile = map[pos.posX][pos.posY] & LOMASK; + + indZonePop++; + setSmoke(pos, zonePower); + tpop = getIndZonePop(tile); + indPop += tpop; + + if (tpop > getRandom(5)) { + /* Try driving from industrial to residential */ + TrfGood = makeTraffic(pos, ZT_RESIDENTIAL); + } else { + TrfGood = 1; + } + + if (TrfGood == -1) { + doIndOut(pos, tpop, getRandom16() & 1); + return; + } + + if (!(getRandom16() & 7)) { + zscore = indValve + evalInd(TrfGood); + + if (!zonePower) { + zscore = -500; + } + + if (zscore > -350 && + (((short)(zscore - 26380)) > ((short)getRandom16Signed()))) { + doIndIn(pos, tpop, getRandom16() & 1); + return; + } + + if (zscore < 350 && + (((short)(zscore + 26380)) < ((short)getRandom16Signed()))) { + doIndOut(pos, tpop, getRandom16() & 1); + } + } +} + + +/** + * Handle immigration of industrial zone. + * @param pos Position of the center tile of the industrial tile. + * @param pos Population value of the industrial zone. + * @param value Random land value (it seems). + */ +void Micropolis::doIndIn(const Position &pos, int pop, int value) +{ + if (pop < 4) { + indPlop(pos, pop, value); + incRateOfGrowth(pos, 8); + } +} + +/** + * Handle industrial zone emigration. + * @param pos Position of the center tile of the industrial tile. + * @param pos Population value of the industrial zone. + * @param value Random land value (it seems). + */ +void Micropolis::doIndOut(const Position &pos, int pop, int value) +{ + if (pop > 1) { + indPlop(pos, pop - 2, value); + incRateOfGrowth(pos, -8); + return; + } + + if (pop == 1) { + zonePlop(pos, INDBASE); // empty industrial zone + incRateOfGrowth(pos, -8); + } +} + + +/** + * Get the population value for the given industrial tile. + * @param tile Center tile value of the industrial zone. + * @return Population value. + */ +short Micropolis::getIndZonePop(MapTile tile) +{ + if (tile == INDCLR) { + return 0; + } + + short CzDen = (((tile - IZB) / 9) % 4) + 1; + return CzDen; +} + +/** + * Place an industrial zone around center tile \a pos. + * @param pos Center of the industrial zone. + * @param den Population density of the industrial zone (0, 1, 2, or 3). + * @param value Landvalue of the industrial zone (0 or 1). + */ +void Micropolis::indPlop(const Position &pos, int den, int value) +{ + short base = ((value * 4) + den) * 9 + IND1; + zonePlop(pos, base); +} + + +/** + * Compute evaluation of an industrial zone. + * @param traf Result if traffic attempt. + * @return Evaluation value of the industrial zone. + */ +short Micropolis::evalInd(int traf) +{ + if (traf < 0) { + return -1000; + } + + return 0; +} + + +//////////////////////////////////////////////////////////////////////// diff --git a/docs/HAR2009Transcript.html b/docs/HAR2009Transcript.html new file mode 100644 index 0000000..637bd0b --- /dev/null +++ b/docs/HAR2009Transcript.html @@ -0,0 +1,1374 @@ + + + + Constructionist Educational Open Source SimCity, by Don Hopkins, at HAR 2009. + + + + + + + + + + + +

HAR 2009 Lightning Talk Transcript: Constructionist Educational Open Source SimCity, by Don Hopkins.

+ +
+ + Illustrated and edited transcript of the + YouTube video playlist: HAR 2009: Lightning talks Friday. + +
+
+ + + + + + + Constructionist Educational Open Source SimCity
+ By Don Hopkins,
+ Stupid Fun Club, Amsterdam.
+ Email: don@DonHopkins.com
+ Blog: http://www.DonHopkins.com
+ Demo: http://www.MicropolisOnline.com
+ Project: http://code.google.com/p/micropolis
+ Facebook: http://apps.facebook.com/micropolisonline
+
+ +
+ +
+ + + + + + + +
+
+ + + + + +

+ I'm Don Hopkins, and this is the + Micropolis + Online project. +

+ +

+ I'll give you a quick history, and then try to get through the slides + to the demo. +

+ +

+ I started working on + SimCity + about 1992. +

+ +

+ When I saw it at + college + before that, I just fell in love with it, and really wanted to + figure out how it worked, and do stuff with the user + interface and everything. +

+ +

+ So when I had the chance to port + SimCity to the Sun Workstation, + I jumped at that, and made a version of it using the + NeWS + window system, + James Gosling's + PostScript based window system. +

+ +

+ And then I developed an + X11 version of + SimCity, + which was multi player. We sold that as a + Unix product. Then the contract expired on that. +

+ +

+ Later on I went on to + Maxis + to work on + The Sims + with + Will Wright. +

+ + + +

+ I dredged up this SimCity code, and we talked Electronic Arts into + making it open source under the + GPLv3 + a few years ago. +

+ +

+ The argument -- not the argument: actually they were very pleasant + about it -- the thing that convinced them that it was a good idea was + the + One Laptop Per Child + project. +

+ +

+ The OLPC project is focused on + "Constructionist Education", + which is about children learning -- anyone learning, by building + things. +

+ +

+ And SimCity is pretty much the + quintessential constructionist education game. +

+ +

+ But it needed to be + opened up, + so that it can be even better. +

+ + + +

+ This OLPC project is based on + Seymour Papert's + ideas about + teaching children to program, + even when they're very young, and + Alan Kay's + ideas about the + Dynabook + and + object oriented programming, + and + how kids learn. +

+ +

+ One of the important things about constructionism is kids helping + each other, communicating, and learning from each other. +

+ +

+ I adapted the old X11/Unix version of SimCity to the + OLPC XO-I Children's Laptop. + The original X11 version supported multi player mode, + but I disabled that feature to simplify the game, because it + didn't scale well, was complex to configure, and not well + designed. OLPC games for kids need to be very easy to use. +

+ +

+ What we really needed to do was to make a new version that had a + much better user interface designed to take advantage of the + OLPC collaboration features and social networking platforms like + Facebook. It needs to have meaningful, scalable, easy to use + multi player interaction. +

+ +

+ Fortunately, the OLPC project chose to use + Python + as the official scripting language. Python is a + powerful, easy to learn language, + that is + widely used in education. + It's also very useful as a web programming language, for implementing a multi player game server. +

+ +

+ But let me go on: +

+ +

+ Micropolis Project Goals +

+ +

+
    +
  • + Develop a fun web based educational game, based on the original + SimCity source code. +
      +
    • + Focused on constructionist education. +
    • +
    • + Built out of free open source software. +
    • +
    • + Runs on the server, plays in the browser. +
    • +
    • + Supports collaborative, democratic, multi-user play. +
    • +
    +
  • +
+

+ + + +

+ The goals: We want to make a fun game that's based on the original + source code. +

+ +

+ "Constructionist Education" is a the overall theme, but it's not + obvious how that actually manifests itself in a game, and it + takes a lot of experimentation, trial and error to figure out. +

+ +

+ We're using free open source software, distributing it over the + web, and running it on centralized servers. So it's easy to make + updates to the game as the design evolves. +

+ +

+ We want to put in features to support collaboration, voting, + teach democracy, and also teach language skills and + interpersonal communication skills. +

+ +

+ Accomplishments So Far +

+ +

+
    +
  • + Ported and shipped the TC L/Tk/X11 version of Micropolis + on the One Laptop Per Child XO-I. +
  • +
  • + Developed a cross platform, desktop version of Micropolis, based + on GTK/Python. +
  • +
  • + Developed an open source, internationalized, web based version + of Micropolis. +
      +
    • + Client based on OpenLaszlo/Flash. +
    • +
    • + Server based on TurboGears/Python/C++. +
    • +
    +
  • +
  • + Renovated, re-factored and documented the code. +
  • +
  • + Established a solid groundwork and open framework for developing + an educational, collaborative, multi-player game. +
  • +
+

+ + + +

+ So far what's been done: First, we took the old + TCL/Tk/X11 + version, cleaned it up, got it through EA's Quality Assurance, + and put it on the One Laptop Per Child. +

+ +

+ Then we stripped down the code, translated it into C++, then + cleaned it up, refactored it, and took out all the user + interface. Then we started building a new user interface on top + of that. +

+ +

+ I had some really great help from some talented people. + John Gilmore + supported me for many years during the development of SimCity, + and shepherded it through the complex legal process of + relicensing it under GPLv3. +

+ +

+ Albert Hofkamp + is a software developer at the Eindhoven University of + Technology. He helped me clean up this code, and put Doxygen + documentation into it. Now the code is much sturdier and easier + to do something with. +

+ +

+ Tom Tjon A Loi + is a an artist who's also helping on the project. I'll + show you some ideas that we've put together about what direction it's + going to go in the future. +

+ +

+ We're also benefiting from + Kennisnet + and + IBM Netherlands, + who are helping us make an educational version of this game. +

+ +

+ The OLPC has been something for people to focus on, and get a + bunch of people on board to make this happen. But we want + Micropolis to run on as many different platforms as possible. +

+ +

+ What's really wonderful is that I have had some really great + conversations about this and encouragement from Alan Kay, who has been + trying to do this stuff for years with kids. +

+ +

+ Alan Kay's criticism of SimCity + is that you can't see inside of it and understand what it's + doing, and you have to accept it as a black box. So now I'm + trying to solve that problem. +

+ +

+ Open Source Software +

+ +

+
    +
  • + Micropolis is built with a carefully chosen, well proven, widely + supported set of open source, cross platform tools and libraries. +
  • +
  • + Micropolis itself and its TileEngine module are open source + (GPL3). The client runs on the proprietary Adobe Flash + player. With a little more work, The client will also run in + standard browsers, thanks to OpenLaszlo. +
  • +
  • + Linux. Apache. MySQL. Python. Cairo. Pango. GTK. GCC. SWIG. + PyCairo. PyGTK. TurboGears. Genshi. SQLAlchemy. CherryPy. + PyAMF. AMFast. Pie menus. OpenLaszlo. Red5. Java. Tomcat. + MediaWiki. PHP. Subversion. Doxygen. +
  • +
+

+ + + +

+ We're using a whole bunch of + Free and open source software, + building on top of it, and then making new software that's open + source. +

+ +

+ One of the things that the OLPC project wants + game developers + to do is to make games out of modular components that can be + plugged together to make other games. +

+ +

+ So I've been separating out the + tile engine + of SimCity, and the sprites, and the sound, and trying to make + those work for other things. +

+ +

+ Web Server and Client +

+ +

+
    +
  • + Server: Linux, Apache, MySQL, Python, TurboGears, SWIG, C++ +
      +
    • + Portable, cross platform C++ and Python code. +
    • +
    • + Linux and Unix +
    • +
    • + Mac OS/X +
    • +
    • + Windows (not currently maintained but viable) +
    • +
    • + Deploys on standard Fedora Linux server, i.e. Amazon Elastic + Computing Server, etc. +
    • +
    +
  • +
  • + Client: OpenLaszlo, XML, JavaScript, AMF +
      +
    • + Web based client runs in Adobe Flash player, widely supported on + most web browsers and operating systems. +
    • +
    +
  • +
+

+ + + +

+ The architecture of the web version is that there's a C++ core + MicropolisEngine, which is plugged into the Python programming + language as an extension module. Then Python is used to script + the higher level parts of the game, graphics and web server. + The user interface is implemented in the client, which is + written in OpenLaszlo and runs on Flash in the web browser. +

+ +

+ I'm using + SWIG, + a tool for making wrappers for libraries, and plugging + them into extension language. And it lets you get your library to a + whole bunch of different extension languages. So right now it's + Python, but it could be Lua or Java or whatever. +

+ +

+ The SWIG wrapper layer around the C++ game engine is glue that + binds the game's C++ classes into Python. So C++ can call + Python, and Python can call C++, and they can access and modify + each other's data structures. One nice thing about SWIG is that + you can subclass your C++ classes in Python, and then just + script everything in a nice language. +

+ +

+ It's all open source stuff. +

+ +

+ The web server does HTTP and it does + Adobe AMF, + which is kind of like binary JSON for Flash. +

+ +

+ Now I'm doing the client in another open source scripting language called + OpenLaszlo. + It's like JavaScript and XML that gets compiled into Flash. + But it will also compile into generic DHTML. +

+ + + +

+ Right now I'm concentrating on just getting the Flash interface + working, and once the paint's dry on that, I can then do the + parts that were Flash specific using the Canvas and DHTML and + nice open standards like that. +

+ +

+ The intention is to get it independent of Flash, but Flash is the + fastest way to get it working first. +

+ +

+ The other thing I have is a Python scripted GTK based user + interface, for the desktop. +

+ +

+ Internationalization +

+ +

+
    +
  • + All text comes from Unicode XML localization files, so the + text can be translated to support different languages and + countries. +
  • +
  • + Currently supports English and Dutch, but other languages are + easy to add, given translation resources. +
  • +
  • + Web based tools for conveniently reviewing and editing + translations. +
  • +
  • + This is a very important feature, since we're initially + delivering to the Dutch educational system, and we intend + to support many other languages in the future. +
  • +
+

+ +

+ Another important thing is internationalizing it and taking all the + strings out. I would love to have volunteers to help translate it to + other languages. I made a little web based tool to do that. We're + doing this for the Dutch educational system, with Kennisnet's support. +

+ +

+ Multi Player Collaboration +

+ +

+
    +
  • + Designed, developed and shipped a multi-player X11 version of + SimCity in 1993 for DUX Software, demonstrated in Amsterdam + at INTERCHI '93. +
  • +
  • + Micropolis has been systematically redesigned with multi-player + collaboration and constructionist education in mind. +
  • +
  • + Currently laying the groundwork for multi player and online + community support, while getting the single player game up and + running first. +
  • +
  • + User accounts. Saved cities. Shared cities. Chat. Robots and + Avatars. Basic MediaWiki integration. Client/server session, + messaging and simulation engine plumbing. +
  • +
+

+ + + + + + + +

+ Previously I made a + multi player version of this for + X11. + But X11 doesn't scale very well, and it was kind of an experiment. +

+ +

+ But it did test out some ideas of making it a collaborative, + cooperative game, instead of a competitive game. +

+ +

+ I didn't want to mess up the game, but I wanted to layer another + social game on top of it. +

+ +

+ We're all sharing the same money, we're trying to achieve the same + goals, so if somebody does something that pisses you off, you're going + to be mad at them, and won't play with them. That will play out at a + higher level than the game. +

+ +

+ It's got voting for expensive things, like making a nuclear power + plant, or changing the taxes. And the non-expensive things are just a + free-for-all. +

+ +

+ I want to re-visit the multi player game, but first get a really + solid base to build it on top of. Doing a web based game is the + best way to do that. +

+ +

+ Constructionist Education +

+ +

+
    +
  • + The original SimCity game was an exemplary constructionist + educational game, which has been successfully used in many + classrooms, but it was a closed commercial product, not + specifically designed to support education. +
  • +
  • + Since Micropolis is open source SimCity, we can open up, + renovate, visualize, document and extend it in wonderful ways, + to specifically support constructionist education, social + networking and collaborative democratic play. +
  • +
  • + "One of the most wonderful possibilities about this venture is + that it will bring together very fluent designers from many + worlds of computing (more worlds than usually combine to make a + game) in the service of the children. We should really try to + pull this off!" -Alan Kay +
  • +
+

+ + + +

+ I'm adding stuff, like integrating it with + MediaWiki. +

+ +

+ One of the important things about Constructionist Education is getting + people to help each other out, and chat. +

+ +

+ I want to teach language skills with this. Not just how to be a good + mayor. That's not the goal. It's how to write about what you want to + do, and convince other people to vote for it. +

+ +

+ I think it's going to be nice to embed this in things like + Facebook + and + MediaWiki, + because what you're doing is writing stories and + newspapers, and blogging. +

+ + + +

+ The Sims 1 (and later versions) had something called + The Sims Exchange, + where when you save your game file, it also writes out a bunch + of web files, that describe your house, your family, the story + you've told about them with pictures. And then it uploads that + to the web. +

+ +

+ So really, the game is a web publishing tool. I want to apply + those ideas to SimCity, and that would be in the form of a + newspaper. So you could act as a journalist when something + happened. +

+ +

+ These events in the game are generating opportunities for you to click + on it, open it up, and write about what your interpretation of it + is. And then automatically push it into a wiki page or a blog. +

+ +

+ So the result of playing a game will be this rich save file that has + points of interest with stories attached to them. You could look at it + geographically as a map, to see all the points of interest. You could + look at it as a calendar, like a blog. And then all these things that + happened with the story can link to a save file, so you can then jump + back into the game at that point. +

+ + + +

+ The eventual goal is to make it sort of like TiVo for + SimCity. You have all these save file snapshots, and then you + can fast forward and reverse by replaying the edits that you + did. +

+ +

+ And you will have branching. You can imagine that when you play + game, at any point, if you decide "let's raise taxes", you could + make a checkpoint there. And then you could revisit that + decision, and then branch reality out to another thing, if you + didn't raise taxes. +

+ +

+ I want players to be able to make a tree of possibilities, and then + share all these save files, and then comment on them, and write about + them. +

+ +

+ That's where the educational stuff comes in. The teacher should be + able to write scenarios that plug into the game, that generate events, + and give people things to discuss. +

+ + + +

+ Alan Kay said some really wonderful things about the project to + bring open source SimCity to the OLPC: +

+ +

+

+ "One of the most wonderful possibilities about this venture is that + it will bring together very fluent designers from many worlds of + computing (more worlds than usually combine to make a game) in the + service of the children. We should really try to pull this off!" + -Alan Kay +
+

+ +

+ I'm looking for volunteers. I never thought I'd be working directly or + indirectly with Alan Kay, so it just blew my mind that he was + interested in it. And he's very supportive. +

+ +

+ Here's the long term goal: There's a game, and there's a robot or a + monster. You double click on a monster, and it should open up a window + that has a visual program that controls how it behaves. +

+ +

+ This has already been done in the 80's on the Apple ][, and it was a + game called + Robot Odyssey, + by + Warren Robinett, + who made + Atari Adventure. + And it was so before its time. It turns out that it is one of + Alan Kay's favorite games, + and that he's + waiting for the other shoe to drop. +

+ +

+ Robot Odyssey taught + visual programming + and logic to kids. You go inside a robot, and it's a room, with + plugs and sensors, and you have logic parts that you can bring + out, and make a circuit inside that robot. +

+ +

+ What I'm trying to do -- oh I'd better get to the demo -- is do this + within SimCity. And with a visual programming language that's just a + layer on top of + Python. + We already have Python. I like Python. It's well designed. I'm + not going to try to invent something different, I just want to + give you a visual way to get to everything Python can do, which + is anything. +

+ + + + + +
+ + + + + +
+ +

+ Educational Applications +

+ +

+
    +
  • + Encourage creative writing by blogging, twittering, chatting, + debating, writing and publishing newspaper articles about + events and issues in the city. +
  • +
  • + Teach democratic processes. Writing proposals. Campaigning for + support. Discussing and debating issues. Voting on bills. +
  • +
  • + Publish wiki pages with interactive annotated maps, timelines of + events and creative writing about the cities. +
  • +
  • + Open up the simulator to enable plug-in programmable zones, + tools, robots, avatars, events, policies, courseware, etc. +
  • +
  • + Teach older kids to program Python and C++. Implement a visual + behavior programming language (like Robot Odyssey and + SimAntics). Teach younger kids to think logically and program + robots (like Logo turtles and Lego Robotics). +
  • +
+

+ + + +

+ How does Constructionist Education manifest itself in something + like SimCity? +

+ +

+ Creative writing, blogging, twittering and chatting: and all this + social stuff that people do. +

+ +

+ Democracy. Writing proposals. Trying to get somebody to support your + proposal. Publishing things into wikis. +

+ +

+ Opening it up to enable plugin programming. The first step is to look + at the code to see how it works. And then tweak it and change it, and + then make your whole new thing. +

+ +

+ The teachers should be able to write courseware, scenarios, + teaching events and educational content that plugs into the game, + without any programming. +

+ +

+ The older kids and adults can use existing examples to learn + Python and C++ programming. +

+ +

+ And younger kids plus everyone else will have an easier, higher + level visual programming language in which to discover and + customize the system. +

+ +

+ That is version three. I'm only at version one right now. +

+ +

+ Next Steps +

+ +

+
    +
  • + Shared city library. Ratings. Tagging. Journals. Discussions. + Linking. History browsing. Sharing. Voting. Profiles. Friends. +
  • +
  • + Text, voice and video chat. In-game chat with avatars on the + map. Integrated video player for help, tutorials and + lessons. Integrated html frame for synchronized web browsing. +
  • +
  • + MediaWiki integration, to support creative writing by students + and courseware development by teachers. +
  • +
  • + PayPal integrations. Donations, subscriptions and + micro-payments, for virtual money, cheats, high speed + simulation, extra storage, fund raising, etc. +
  • +
+

+ + + +

+ I have the web server and browser client running. I want to put + in sharing cities, tagging, journals, discussions -- you know, + the whole social net thing. It occurs to me that maybe I should + just let Facebook handle a lot of that stuff. I'll just make a + Facebook + application. +

+ +

+ Slow the game down a lot, so your Facebook wall will let your + friends vote on things. I'm getting ahead of myself. +

+ +

+ MediaWiki + integration. Take well known things that solve a problem + well, and piggy back on top of them, instead of trying to invent your + own things. +

+ +

+ PayPay, so we can pay for all the CPU time it takes. +

+ +

+ Social Networking +

+ +

+ Tom Tjon A Loi made these mock-ups of what SimCity might look like inside a + social network like Facebook. +

+ +

+ Identity +

+ + +
+ +

+ The important thing is that you have to have an identity. It knows + about you. You're part of a community of real people. +

+ +

+ Voting +

+ + +
+ +

+ You've got friends, and this could be a Facebook app. If you add + the app, you can do all this stuff and play it yourself. But + even if you don't add the app, you can still see and interact + with what other people are doing. +

+ +

+ Citizen +

+ + +
+ +

+ It's all about showing other people what you're doing, + explaining it to them, discussing the issues, and getting their + feedback. +

+ +

+ Journal +

+ + +
+ +

+ You can have these links into the save files, and people saying + things. I want to make it so one game might last a week, and take + many little steps. +

+ +

+ Community +

+ + +
+ +

+ What I have already made to prove the concept of plugins, is plugin + zones. The first plugin zone I made was a plugin church, because + that's controversial and will upset people. +

+ +

+ The idea is that I want to be able to script churches and other + zones in Python. And create new zones and content for them + without even programming. The other plugin is a plugin + character, or agent. Like the monster or helicopter, with + programmable behavior. +

+ +

+ Chat +

+ + +
+ +

+ In a multiplayer game, there could be several people in the same + game, and you're all on the same map in one place, and you can + chat embedded in the game, with collaborative editing. +

+ +

+ If you put something down, it would open up an interface that + says: "Hey, Don wants to make this. Do you vote for it? Yes or + no." And then have a chat associated with that, where you can + discuss the issue. +

+ +

+ Squatters +

+ + +
+ +

+ And then imagine + other people could come into you game, + and they find: "Hey this zone is not developed. We're going to + put a coffeeshop here!" +

+ +

+ I want it eventually to be open enough that other people can come in + and effect your game. And of course you always have a save file. +

+ +

+ Micropolis Demo +

+ +

+ There's a tool for doing translations. +

+ + +
+ +

+ The source code, designs and documentation are all in + Google Code. +

+ + +
+ +

+ Ah, that's the robot! I wanted to + show some code. + This is how PacMan works. He follows the road. +

+ +

+ So I wrote a plugin robot that you can put into the city. +

+ + +
+ +

+ I'd better get to the actual code that's running. +

+ + +
+ +

+ These are the different scenarios, we could load, or generate + something randomly. Here, we'll do one of my favorite cities here. I + made this city. +

+ + +
+ +

+ This is a neat kind of a + lazy tile view. + There are 120 by 100 tiles on the server, and we're telling the + server where we're looking at. And it's sending just the tiles + that we need to see. +

+ + +
+ +

+ Things that happen in the city get logged, and there's a chat. +

+ +

+ This will help you figure out what you need to do to improve you + city. +

+ +

+ This is a history. +

+ + +
+ +

+ Here's the nice one here: we can raise taxes a lot. It was so funny + because the taxes in the Netherlands are so much more than 20%. +

+ + +
+ +

+ We can look at the population density map overlay. +

+ + +
+ +

+ Ok, now here's a meltdown. And when you get a meltdown, the notice + window says "Hey there's a meltdown!", and has a live view showing it, + that you can click on to go there. +

+ + +
+ +

+ Now this little window up here, when something interesting happens in + the game, will show you a live view, and tell you something. But we + can also have a link to Wikipedia or whatever. +

+ +

+ I want to put in more educational stuff. Like the church says "Hey, + did you know that Scientologists believe this?" and "Click here for + more!". We can think of the churches as in-game advertising. +

+ +

+ And then if you have too many churches, you use the bulldozer to get + rid of them. +

+ +

+ There's a speed control. I can make it go super-duper fast. And + everybody just left. This is more like a twitch game. +

+ +

+ Let me do the cheat. Ok, what is it? I just added this, so I'm + not quite sure. You go "!faith 1000". That makes them want a lot + more churches. Woah! Ok, so I'm getting many churches. There + goes the tax base. +

+ +

+ I've programmed a plug-in church with a plug-in agent: the + Church of Pacmania, and the PacBot. The church spawn PacBots on + the road next to it, which eat the traffic on the roads + (lowering the pollution and raising their score, of course). So + naturally the Church of Pacmania generate a lot of traffic, to + attract and feed the PacBots. I'm going to have a "Tax the + Churches" option, too. If I lower the taxes, then more people + will come in, and the churches will recruit them, and they'll + all drive to church. So then there will be a lot more traffic + for the PacBots to eat. +

+ +

+ Oh, I ran out of money. Let me do the robots real quick. So this is + PacBot. You can put him down. Oh, I'm out of money! The fastest way is + to just refresh the screen, and start fresh. +

+ +

+ We'll go straight in, we'll get rid of this. Oh, pie menus, right! If + you click... (Dutch "Taartmenu" cursor pops up!) I've got to have a + talk with my translator. +

+ + +
+ +

+ You click, and you get a pie menu, which has items around the cursor + in different directions. So if you click and go right, you get a road. + And then you can do a little road. And if you click and go up and + right, you get a bulldozer. +

+ + +
+ +

+ And then there are submenus for zoning parks, and stuff like + that. This gives you a nice quick gesture interface. +

+ + +
+ +

+ The one I wanted was PacBot. So if you click him, that's running + Python code that is looking at the map, and is looks for the traffic, + and it goes up, up, up, up, up. See? +

+ + +
+ +

+ Wait, you haven't -- hang on, wait: you can have lots of them. And + then they compete. You get this wonderful emergent behavior of PacBot + looking for traffic, and then the other PacBot eats it. You really + need to zoom this up a little bit. +

+ + +
+ +

+ The great thing about this: this is another game layered on top. You + can make your PacBot maze, and then you can torture them. They'll go + crazy, it's like a lion in his cage here. Ah, caught one! Ah! He's + blue. Let's get him here. He's not going to be happy about + this. Where'd he go? Oh oh, there's a menu to get rid of him, so I + think I deleted him. Here, we'll put one there. He's just going nuts + there. +

+ + +
+ +

+ Wait, where were we? Real quick. Where's my iPhone? Did I leave the + phone down here? You can't see it so you'll have to believe me. +

+ +

+ The first multi-player interface I'm making is an iPhone app, so it + loads the city, and it lets you zoom and run over it. And I'm just + about to hook it up to the server, so you can come into the game as a + helicopter, and just tilt to run around, and then just chat. +

+ +

+ Eventually I want to do the whole game on the iPhone, Andriod and + whatever else. The first step is to just get presence and chatting in + there. +

+ +

+ One interesting thing: Micropolis is + GPLv3. + So you can't put it on the iPhone, because of the + anti-TiVoization + clause, which prohibits using hardware restrictions to prevent users from running modified versions of the software + on that hardware. +

+ +

+ But it's possible to have the simulation running on the server + and a client displaying and interacting on the iPhone. I think + it's more interesting to have the simulation running on the + server, in order to enable social interactions; and anyway + there's already an authentic single player SimCity that runs on + the iPhone. +

+ + + +

+ Any questions? +

+ +

+ Q: What's the cheat code to get money? +

+ +

+ Mike: War! +

+ +

+ Don: That's what churches are for. +

+ +

+ I encourage you to script your own church and plug it in. I'm totally + going to have the + Flying Spaghetti Monster, + and he's going to actually convert all the other churches to + Flying Spaghetti Monster churches, so it will be a moot point, + and there will be no war. +

+ +

+ Announcer: Please thank Mr. Hopkins for his nice solution to the + traffic problem. +

+ +

+ Micropolis on Facebook +

+ +

+ You can now play + Micropolis on Facebook! +

+ + +
+ + + + \ No newline at end of file diff --git a/docs/HackingAtRandomTalk.txt b/docs/HackingAtRandomTalk.txt new file mode 100644 index 0000000..6103b34 --- /dev/null +++ b/docs/HackingAtRandomTalk.txt @@ -0,0 +1,93 @@ +Micropolis, the open source version of SimCity, is a fun, engaging +game, that helps teach kids about science, language, mathematics, art +and politics. Its goal is to fulfill SimCity's potential as a +microworld for children's learning and exploration. + +A web based version of Micropolis is the best way to quickly reach the +largest audience, and an important step towards the long term goal of +developing an open source, collaborative multi player, educationally +oriented simulation gaming platform. + +This project is about creating educational open source software. It's +the culmination of years of research and development, that is now +possible thanks to Electronic Arts making SimCity open source. + +Will Wright wrote the original SimCity city simulation game, first +released in 1989. Since 1992, Don Hopkins ported SimCity to various +platforms, redesigned the user interface, added multi player support, +cleaned and refactored the code, and integrated it with scripting +languages and web servers. + +On January 10, 2008 the SimCity source code was released under the +free software GPL 3 license, under the name "Micropolis". Now that +it's GPL, it can be adapted to many platforms, including Linux, Mac, +and Windows guis, as well as web servers, cell phones and embedded +devices! And it can be improved and extended to make it a better +educational tool and open source programming example. + +The Micropolis project is building an exemplary open source game out +of modular reusable components, that other people can learn from, +build on top of, integrate with other languages and user interfaces, +and use as a starting point for their own projects. + +The plan to develop Micropolis into an educational gaming platform +draws heavily on the vision and experience of educators, researchers +and designers including Seymour Papert, Hal Abelson, Alan Kay, Will +Wright, Ben Shneiderman, and Mark Weiser. + +Accomplishments of the Micropolis project so far: + +Translated the original C SimCity code to C++. + +Cleaned up all the code, organized into types and classes, refactored +and rewrote old crappy code, renamed variables and functions, measured +performance and optimized bottlenecks, applied a consistent +programming style, and heavily commented the code, wrote lots of +documentation and designs. + +Used doxygen to generate extensive online documentation from formatted +commments in the code, with an html reference manual, member and +parameter descriptions, usage cross references, hyperlinked listings, +bug and todo lists, etc. + +Removed all of the user interface code from the core simulation engine +(called MicropolisCore), and added programming interfaces to +efficiently access the internal data and control the simulation. + +Implemented a general purpose TileEngine module, used by but +independent of Micropolis. Supports various memory formats, efficient +rendering techniques, graphics sets, tile mapping, lazy procedural +tile rendering, scaling and panning, caching, and tile animation +compressed network protocols. The CellEngine cellular automata machine +module also uses the TileEngine. + +Integrated MicropolisCore, TileEngine and CellEngine with Python by +using SWIG, a scripting language interface wrapper generator. SWIG +makes it easy to develop and change the programming interface (C++ +classes, etc), and automatically generate all the glue code that makes +it possible to access and control the C++ objects from Python (or +other languages). SWIG's advantage is that it makes it easy to plug +the same C++ code into many other languages like Lua, Ruby, Java, etc. + +Implemented a desktop based GTK user interface to Micropolis, which +runs on Mac, Windows and Linux. The user interface is written in +Python, and based on PyGTK for user interface widgets, Cairo for +graphics, and Pango for text. + +Implemented a desktop based GTK user interface to the CellEngine +module, a cellular automata machine simulation, which uses the same +TileEngine as Micropolis. + +Implemented a web server based OpenLaszlo (Flash) user interface to +Micropolis, which runs the simulation on the web server, and displays +the user interface in a web browser with Flash (or eventually any +mainstream DHTML browser). + +Internationalized the web based version of Micropolis, and implemented +a web based tool for localization, managing and editing translations +into different languages. + +Implemented a MediaWiki extension for embedding OpenLaszlo +applications in wiki pages, so you can write Wiki pages including live +playable views of cities. + diff --git a/docs/MicropolisHARTalk.key/Contents/PkgInfo b/docs/MicropolisHARTalk.key/Contents/PkgInfo new file mode 100644 index 0000000..b0bc8e0 --- /dev/null +++ b/docs/MicropolisHARTalk.key/Contents/PkgInfo @@ -0,0 +1 @@ +???????? \ No newline at end of file diff --git a/docs/MicropolisHARTalk.key/QuickLook/Thumbnail.jpg b/docs/MicropolisHARTalk.key/QuickLook/Thumbnail.jpg new file mode 100644 index 0000000..50dcde3 Binary files /dev/null and b/docs/MicropolisHARTalk.key/QuickLook/Thumbnail.jpg differ diff --git a/docs/MicropolisHARTalk.key/color-profile b/docs/MicropolisHARTalk.key/color-profile new file mode 100644 index 0000000..fe74975 Binary files /dev/null and b/docs/MicropolisHARTalk.key/color-profile differ diff --git a/docs/MicropolisHARTalk.key/index.apxl.gz b/docs/MicropolisHARTalk.key/index.apxl.gz new file mode 100644 index 0000000..fb468a2 Binary files /dev/null and b/docs/MicropolisHARTalk.key/index.apxl.gz differ diff --git a/docs/MicropolisHARTalk.key/presentation_micropolis1-3.jpg b/docs/MicropolisHARTalk.key/presentation_micropolis1-3.jpg new file mode 100644 index 0000000..0ec1d51 Binary files /dev/null and b/docs/MicropolisHARTalk.key/presentation_micropolis1-3.jpg differ diff --git a/docs/MicropolisHARTalk.key/presentation_micropolis2-5.jpg b/docs/MicropolisHARTalk.key/presentation_micropolis2-5.jpg new file mode 100644 index 0000000..80bcb5c Binary files /dev/null and b/docs/MicropolisHARTalk.key/presentation_micropolis2-5.jpg differ diff --git a/docs/MicropolisHARTalk.key/presentation_micropolis3-3.jpg b/docs/MicropolisHARTalk.key/presentation_micropolis3-3.jpg new file mode 100644 index 0000000..68025b1 Binary files /dev/null and b/docs/MicropolisHARTalk.key/presentation_micropolis3-3.jpg differ diff --git a/docs/MicropolisHARTalk.key/presentation_micropolis4-3.jpg b/docs/MicropolisHARTalk.key/presentation_micropolis4-3.jpg new file mode 100644 index 0000000..0b3d56a Binary files /dev/null and b/docs/MicropolisHARTalk.key/presentation_micropolis4-3.jpg differ diff --git a/docs/MicropolisHARTalk.key/presentation_micropolis5-3.jpg b/docs/MicropolisHARTalk.key/presentation_micropolis5-3.jpg new file mode 100644 index 0000000..7f6956d Binary files /dev/null and b/docs/MicropolisHARTalk.key/presentation_micropolis5-3.jpg differ diff --git a/docs/MicropolisHARTalk.key/presentation_micropolis6-3.jpg b/docs/MicropolisHARTalk.key/presentation_micropolis6-3.jpg new file mode 100644 index 0000000..2edae3d Binary files /dev/null and b/docs/MicropolisHARTalk.key/presentation_micropolis6-3.jpg differ diff --git a/docs/MicropolisHARTalk.key/presentation_micropolis7-3.jpg b/docs/MicropolisHARTalk.key/presentation_micropolis7-3.jpg new file mode 100644 index 0000000..4f37bb1 Binary files /dev/null and b/docs/MicropolisHARTalk.key/presentation_micropolis7-3.jpg differ diff --git a/docs/MicropolisHARTalk.key/thumbs/st0.tiff b/docs/MicropolisHARTalk.key/thumbs/st0.tiff new file mode 100644 index 0000000..0c5c45b Binary files /dev/null and b/docs/MicropolisHARTalk.key/thumbs/st0.tiff differ diff --git a/docs/MicropolisHARTalk.key/thumbs/st1.tiff b/docs/MicropolisHARTalk.key/thumbs/st1.tiff new file mode 100644 index 0000000..b3fee84 Binary files /dev/null and b/docs/MicropolisHARTalk.key/thumbs/st1.tiff differ diff --git a/docs/MicropolisHARTalk.key/thumbs/st11-2.tiff b/docs/MicropolisHARTalk.key/thumbs/st11-2.tiff new file mode 100644 index 0000000..fc731bf Binary files /dev/null and b/docs/MicropolisHARTalk.key/thumbs/st11-2.tiff differ diff --git a/docs/MicropolisHARTalk.key/thumbs/st11-3.tiff b/docs/MicropolisHARTalk.key/thumbs/st11-3.tiff new file mode 100644 index 0000000..d4c6428 Binary files /dev/null and b/docs/MicropolisHARTalk.key/thumbs/st11-3.tiff differ diff --git a/docs/MicropolisHARTalk.key/thumbs/st11-4.tiff b/docs/MicropolisHARTalk.key/thumbs/st11-4.tiff new file mode 100644 index 0000000..9b2ea3b Binary files /dev/null and b/docs/MicropolisHARTalk.key/thumbs/st11-4.tiff differ diff --git a/docs/MicropolisHARTalk.key/thumbs/st11-5.tiff b/docs/MicropolisHARTalk.key/thumbs/st11-5.tiff new file mode 100644 index 0000000..3803982 Binary files /dev/null and b/docs/MicropolisHARTalk.key/thumbs/st11-5.tiff differ diff --git a/docs/MicropolisHARTalk.key/thumbs/st11-6.tiff b/docs/MicropolisHARTalk.key/thumbs/st11-6.tiff new file mode 100644 index 0000000..c096fd2 Binary files /dev/null and b/docs/MicropolisHARTalk.key/thumbs/st11-6.tiff differ diff --git a/docs/MicropolisHARTalk.key/thumbs/st11-7.tiff b/docs/MicropolisHARTalk.key/thumbs/st11-7.tiff new file mode 100644 index 0000000..38ebb03 Binary files /dev/null and b/docs/MicropolisHARTalk.key/thumbs/st11-7.tiff differ diff --git a/docs/MicropolisHARTalk.key/thumbs/st11-8.tiff b/docs/MicropolisHARTalk.key/thumbs/st11-8.tiff new file mode 100644 index 0000000..d6c5bec Binary files /dev/null and b/docs/MicropolisHARTalk.key/thumbs/st11-8.tiff differ diff --git a/docs/MicropolisHARTalk.key/thumbs/st2.tiff b/docs/MicropolisHARTalk.key/thumbs/st2.tiff new file mode 100644 index 0000000..15b0307 Binary files /dev/null and b/docs/MicropolisHARTalk.key/thumbs/st2.tiff differ diff --git a/docs/MicropolisHARTalk.key/thumbs/st3-1.tiff b/docs/MicropolisHARTalk.key/thumbs/st3-1.tiff new file mode 100644 index 0000000..696b201 Binary files /dev/null and b/docs/MicropolisHARTalk.key/thumbs/st3-1.tiff differ diff --git a/docs/MicropolisHARTalk.key/thumbs/st3-2.tiff b/docs/MicropolisHARTalk.key/thumbs/st3-2.tiff new file mode 100644 index 0000000..48555d6 Binary files /dev/null and b/docs/MicropolisHARTalk.key/thumbs/st3-2.tiff differ diff --git a/docs/MicropolisHARTalk.key/thumbs/st3-3.tiff b/docs/MicropolisHARTalk.key/thumbs/st3-3.tiff new file mode 100644 index 0000000..3247243 Binary files /dev/null and b/docs/MicropolisHARTalk.key/thumbs/st3-3.tiff differ diff --git a/docs/MicropolisHARTalk.key/thumbs/st3-4.tiff b/docs/MicropolisHARTalk.key/thumbs/st3-4.tiff new file mode 100644 index 0000000..4176d9f Binary files /dev/null and b/docs/MicropolisHARTalk.key/thumbs/st3-4.tiff differ diff --git a/docs/MicropolisHARTalk.key/thumbs/st3-5.tiff b/docs/MicropolisHARTalk.key/thumbs/st3-5.tiff new file mode 100644 index 0000000..788e07b Binary files /dev/null and b/docs/MicropolisHARTalk.key/thumbs/st3-5.tiff differ diff --git a/docs/MicropolisHARTalk.key/thumbs/st3-6.tiff b/docs/MicropolisHARTalk.key/thumbs/st3-6.tiff new file mode 100644 index 0000000..ff6de2b Binary files /dev/null and b/docs/MicropolisHARTalk.key/thumbs/st3-6.tiff differ diff --git a/docs/MicropolisHARTalk.key/thumbs/st3-7.tiff b/docs/MicropolisHARTalk.key/thumbs/st3-7.tiff new file mode 100644 index 0000000..5235988 Binary files /dev/null and b/docs/MicropolisHARTalk.key/thumbs/st3-7.tiff differ diff --git a/docs/bibliography.html b/docs/bibliography.html new file mode 100755 index 0000000..9aa10c6 --- /dev/null +++ b/docs/bibliography.html @@ -0,0 +1,196 @@ + + + + Bibliography + + + + +

Bibliography

+ +

City Planning Bibliography

+ +
    + +
  • Boyer, R., and D. Savageau. Places Rated + Almanac. Chicago: Rand McNally & Co., 1986.
  • + +
  • Callenbach, Ernest. Ecotopia. Berkeley: Banyan Tree + Books, 1975.
  • + +
  • Choay, Francoise. The Modern City: Planning in the 19th + Century. New York: George Braziller, 1969.
  • + +
  • Clark, David. Urban Geography. Baltimore: The Johns + Hopkins University Press, 1982.
  • + +
  • Clay, Grady. Close-Up, How to Read the American + City. Chicago: The University of Chicago Press, 1980.
  • + +
  • Gallion, A., and S. Eisner. The Urban Pattern. New York: + Van Nostrand Reinhold Company, 1986.
  • + +
  • Greenburg, M., D. Krueckeberg, and C. Michaelson. Local + population and Employment Projection Techniques. New Brunswick: + Center for Urban Policy Research, 1987.
  • + +
  • Hoskin, Frank P. The Language of Cities. Cambridge: + Schenkman Publishing Company, 1972.
  • + +
  • Jacobs, Jane. The Death and Life of Great American + Cities. New York: John Wiley & Sons, 1974.
  • + +
  • Le Corbusier. The City of Tomorrow and Its Planning. New + York: Dover Publications, Inc., 1987.
  • + +
  • Lynch, Kevin. A Theory of Good City Form. Cambridge: MIT + Press, 1981.
  • + +
  • Register, Richard. Ecocity Berkeley. Berkeley: North + Atlantic Books, 1987
  • + +
  • Planning: The magazine of the American Planning + Association. 1313 E. 60th St. Chicago, IL 60637.
  • + +
+ +

Related Reading for Children

+ +

Fiction

+ +
    + +
  • Burton, Virginia Lee. The Little House. Boston: Houghton Mifflin, + 1942 (reissued 1969).
  • + +
  • Murphy, Shirley, and Murphy, Pat. Mrs. Tortino's Return to the + Sun. Shepard Books, 1980.
  • + +
  • Dr. Seuss. The Lorax. New Youk: Random House, 1971.
  • + +
+ +

Nonfiction

+ +
    + +
  • Barker, Albert. From Settlement to City. New York: Julian + Messner, 1978.
  • + +
  • Eichner, James A. The First Book of Local Government. New + York: Franklin Watts, 1976.
  • + +
  • Macaulay, David. City: A Story of Roman Planning and + Construction. Boston: Houghton Mifflin, 1974.
  • + +
  • Macaulay, David. Underground. Boston: Houghton Mifflin, + 1976.
  • + +
  • Monroe, Roxie. Artchitects Make Zigzags: Looking at + Architecture from A to Z. Washington D.C.: National Trust for + Historic Preservation, 1986.
  • + +
  • Rhodes, Dorthy. How to Read a City Map. Chicago: Elk + Grove Press, 1967.
  • + +
+ +

+ For information on city planning and related subjects, contact: +

+ +
+ American Planning Association +
+ Planners Bookstore +
+ 1313 E. 60th St. Chicago, IL 60637 +
+ (312) 955-9100 +
+
+ +
+ +
+

+

Micropolis, Unix Version.

+ This game was released for the Unix platform + in or about 1990 and has been modified for inclusion in the One Laptop + Per Child program. Copyright © 1989 - 2007 Electronic Arts Inc. If + you need assistance with this program, you may contact: + http://wiki.laptop.org/go/Micropolis or email micropolis@laptop.org. +

+

+ + This program 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. +

+

+ + This program 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 this program. If + not, see http://www.gnu.org/licenses/. +

+

+ +

ADDITIONAL TERMS per GNU GPL Section 7

+ +

+

+ No trademark or publicity rights are granted. This license does NOT + give you any right, title or interest in the trademark SimCity or any + other Electronic Arts trademark. You may not distribute any + modification of this program using the trademark SimCity or claim any + affliation or association with Electronic Arts Inc. or its employees. +

+

+ + Any propagation or conveyance of this program must include this + copyright notice and these terms. +

+

+ + If you convey this program (or any modifications of it) and assume + contractual liability for the program to recipients of it, you agree + to indemnify Electronic Arts for any liability that those contractual + assumptions impose on Electronic Arts. +

+

+ + You may not misrepresent the origins of this program; modified + versions of the program must be marked as such and not identified as + the original program. +

+

+ + This disclaimer supplements the one included in the General Public + License. TO THE FULLEST EXTENT PERMISSIBLE UNDER APPLICABLE LAW, THIS + PROGRAM IS PROVIDED TO YOU "AS IS," WITH ALL FAULTS, WITHOUT WARRANTY + OF ANY KIND, AND YOUR USE IS AT YOUR SOLE RISK. THE ENTIRE RISK OF + SATISFACTORY QUALITY AND PERFORMANCE RESIDES WITH YOU. ELECTRONIC ARTS + DISCLAIMS ANY AND ALL EXPRESS, IMPLIED OR STATUTORY WARRANTIES, + INCLUDING IMPLIED WARRANTIES OF MERCHANTABILITY, SATISFACTORY QUALITY, + FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT OF THIRD PARTY + RIGHTS, AND WARRANTIES (IF ANY) ARISING FROM A COURSE OF DEALING, + USAGE, OR TRADE PRACTICE. ELECTRONIC ARTS DOES NOT WARRANT AGAINST + INTERFERENCE WITH YOUR ENJOYMENT OF THE PROGRAM; THAT THE PROGRAM WILL + MEET YOUR REQUIREMENTS; THAT OPERATION OF THE PROGRAM WILL BE + UNINTERRUPTED OR ERROR-FREE, OR THAT THE PROGRAM WILL BE COMPATIBLE + WITH THIRD PARTY SOFTWARE OR THAT ANY ERRORS IN THE PROGRAM WILL BE + CORRECTED. NO ORAL OR WRITTEN ADVICE PROVIDED BY ELECTRONIC ARTS OR + ANY AUTHORIZED REPRESENTATIVE SHALL CREATE A WARRANTY. SOME + JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF OR LIMITATIONS ON IMPLIED + WARRANTIES OR THE LIMITATIONS ON THE APPLICABLE STATUTORY RIGHTS OF A + CONSUMER, SO SOME OR ALL OF THE ABOVE EXCLUSIONS AND LIMITATIONS MAY + NOT APPLY TO YOU. +

+ + + \ No newline at end of file diff --git a/docs/credits.html b/docs/credits.html new file mode 100755 index 0000000..ab46f9c --- /dev/null +++ b/docs/credits.html @@ -0,0 +1,131 @@ + + + + Credits + + + + +

Credits

+ +
    + +
  • Unix Implementation, User Interface, Graphics and Multi-Player Game Design: + Don Hopkins + +
  • TCL/Tk Scripting Language and Toolkit: John Ousterhout (Scriptics). + +
  • HyperLook User Interface System: + Arthur van Hoff, Doug Scoular, Don Hopkins (The Turing Institute, Ltd.) + +
  • Original Micropolis Concept and Design: + Will Wright (Maxis Software) + +
  • Contributors to Design: + Don Hopkins, Arthur van Hoff, Jeff Braun, Robert Strobel, Brian Witt + +
  • Graphic Artwork: + Don Bayless, Will Wright, Scott Martindale, Don Hopkins + +
  • Documentation: + Michael Bremer, Cliff Ellis, Akila Redmer, Tom Bentlery, Will Wright, Don Hopkins + +
  • Sounds: + Will Wright, Steve Hales, Don Hopkins + +
  • City Scenarios: + Jonathan Trachtenberg, Brett G. Durrett + +
  • Special Thanks to: + Will Wright, Lucy Bradshaw, Upmanu Lall, + Arthur van Hoff, Dug Scoular, Marcel van Vuure, Bob Adams, Carol + Adams, Rafael Bracho, Josh Siegel, John Gilmore, Tim Niblett, + Maxis, Dux Software, The Turing Institute, HyperNeWS Fund Contributers + +
+ + Software and Manual Copyright (C) 2002 by Electronic Arts. +

+ +


+

+

Micropolis, Unix Version.

+ This game was released for the Unix platform + in or about 1990 and has been modified for inclusion in the One Laptop + Per Child program. Copyright © 1989 - 2007 Electronic Arts Inc. If + you need assistance with this program, you may contact: + http://wiki.laptop.org/go/Micropolis or email micropolis@laptop.org. +

+

+ + This program 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. +

+

+ + This program 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 this program. If + not, see http://www.gnu.org/licenses/. +

+

+ +

ADDITIONAL TERMS per GNU GPL Section 7

+ +

+

+ No trademark or publicity rights are granted. This license does NOT + give you any right, title or interest in the trademark SimCity or any + other Electronic Arts trademark. You may not distribute any + modification of this program using the trademark SimCity or claim any + affliation or association with Electronic Arts Inc. or its employees. +

+

+ + Any propagation or conveyance of this program must include this + copyright notice and these terms. +

+

+ + If you convey this program (or any modifications of it) and assume + contractual liability for the program to recipients of it, you agree + to indemnify Electronic Arts for any liability that those contractual + assumptions impose on Electronic Arts. +

+

+ + You may not misrepresent the origins of this program; modified + versions of the program must be marked as such and not identified as + the original program. +

+

+ + This disclaimer supplements the one included in the General Public + License. TO THE FULLEST EXTENT PERMISSIBLE UNDER APPLICABLE LAW, THIS + PROGRAM IS PROVIDED TO YOU "AS IS," WITH ALL FAULTS, WITHOUT WARRANTY + OF ANY KIND, AND YOUR USE IS AT YOUR SOLE RISK. THE ENTIRE RISK OF + SATISFACTORY QUALITY AND PERFORMANCE RESIDES WITH YOU. ELECTRONIC ARTS + DISCLAIMS ANY AND ALL EXPRESS, IMPLIED OR STATUTORY WARRANTIES, + INCLUDING IMPLIED WARRANTIES OF MERCHANTABILITY, SATISFACTORY QUALITY, + FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT OF THIRD PARTY + RIGHTS, AND WARRANTIES (IF ANY) ARISING FROM A COURSE OF DEALING, + USAGE, OR TRADE PRACTICE. ELECTRONIC ARTS DOES NOT WARRANT AGAINST + INTERFERENCE WITH YOUR ENJOYMENT OF THE PROGRAM; THAT THE PROGRAM WILL + MEET YOUR REQUIREMENTS; THAT OPERATION OF THE PROGRAM WILL BE + UNINTERRUPTED OR ERROR-FREE, OR THAT THE PROGRAM WILL BE COMPATIBLE + WITH THIRD PARTY SOFTWARE OR THAT ANY ERRORS IN THE PROGRAM WILL BE + CORRECTED. NO ORAL OR WRITTEN ADVICE PROVIDED BY ELECTRONIC ARTS OR + ANY AUTHORIZED REPRESENTATIVE SHALL CREATE A WARRANTY. SOME + JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF OR LIMITATIONS ON IMPLIED + WARRANTIES OR THE LIMITATIONS ON THE APPLICABLE STATUTORY RIGHTS OF A + CONSUMER, SO SOME OR ALL OF THE ABOVE EXCLUSIONS AND LIMITATIONS MAY + NOT APPLY TO YOU. +

+ + + \ No newline at end of file diff --git a/docs/history.html b/docs/history.html new file mode 100755 index 0000000..17c6940 --- /dev/null +++ b/docs/history.html @@ -0,0 +1,698 @@ + + + + History Of Cities And City Planning + + + + +

History Of Cities And City Planning

+ +

By Cliff Ellis

+ +

Introduction

+ + The building of cities has a long and complex history. Although city + planning as an organized profession has existed for less than a + century, all cities display various degrees of forethought and + conscious design in their layout and functioning.

+ + Early humans led a nomadic existence, relying on hunting and gathering + for sustenance. Between 8,000 and 10,000 years ago, systematic + cultivation of plants and the domestication of animals allowed for + more permanent settlements. During the fourth millennium B.C., the + requirements for the "urban revolution" were finally met: the + production of a surplus of storable food, a system of writing, a more + complex social organization, and technological advances such as the + plough, potter's wheel, loom, and metallurgy. +

+ + Cities exist for many reasons, and the diversity of urban forms can be + traced to the complex functions that cities perform. Cities serve as + centers of storage, trade, and manufacture. The agricultural surplus + from the surrounding countryside is processed and distributed in + cities. Cities also grew up around marketplaces, where goods from + distant places could be exchanged for local products. Throughout + history, cities have been founded at the intersections of + transportation routes, or at points where goods must shift from one + mode of transportation to another, as at river and ocean ports. +

+ + Religious elements have been crucial throughout urban history. Ancient + peoples had sacred places, often associated with cemeteries or + shrines, around which cities grew. Ancient cities usually had large + temple precincts with monumental religious buildings. Many medieval + cities were built near monasteries and cathedrals. +

+ + Cities often provide protection in a precarious world. During attacks, + the rural populace could flee behind city walls, where defence forces + assembled to repel the enemy. The wall served this purpose for + millennia, until the invention of heavy artillery rendered walls + useless in warfare. With the advent of modern aerial warfare, cities + have become prime targets for destruction rather than safe havens. +

+ + Cities serve as centers of government. In particular, the emergence of + the great nation-states of Europe between 1400 and 1800 led to the + creation of new capital cities or the investing of existing cities + with expanded governmental functions. +

+ + Washington, D.C., for example, displays the monumental buildings, + radial street pattern, and large public spaces typical of capital + cities. +

+ + Cities, with their concentration of talent, mixture of peoples, and + economic surplus, have provided a fertile ground for the evolution of + human culture: the arts, scientific research, and technical + innovation. They serve as centers of communication, where new ideas + and information are spread to the surrounding territory and to foreign + lands. +

+ +

Constraints on City Form

+ + Cities are physical artifacts inserted into a preexisting natural + world, and natural constraints must be respected if a settlement is to + survive and prosper. Cities must conform to the landscape in which + they are located, although technologies have gradually been developed + to reorganize the land to suit human purposes. Moderately sloping land + provides the best urban site, but spectacular effects have been + achieved on hilly sites such as San Francisco, Rio de Janeiro, and + Athens.

+ + Climate influences city form. For example, streets have been aligned + to take advantage of cooling breezes, and arcades designed to shield + pedestrians from sun and rain. The architecture of individual + buildings often reflects adaptations to temperature, rainfall, snow, + wind and other climatic characteristics. +

+ + Cities must have a healthy water supply, and locations along rivers + and streams, or near underground watercourses, have always been + favored. Many large modern cities have outgrown their local water + supplies and rely upon distant water sources diverted by elaborate + systems of pipes and canals. +

+ + City location and internal structure have been profoundly influenced + by natural transportation routes. Cities have often been sited near + natural harbors, on navigable rivers, or along land routes determined + by regional topography. +

+ + Finally, cities have had to survive periodic natural disasters such as + earthquakes, hurricanes, tornados, and floods. The San Francisco + earthquake of 1906 demonstrated how natural forces can undo decades of + human labor in a very short time. +

+ +

Elements of Urban Structure

+ + City planners must weave a complex, ever-changing array of elements + into a working whole: that is the perennial challenge of city + planning. The physical elements of the city can be divided into three + categories: networks, buildings, and open spaces. Many alternative + arrangements of these components have been tried throughout history, + but no ideal city form has ever been agreed upon. Lively debates about + the best way to arrange urban anatomies continue to rage, and show no + signs of abating.

+ +

Networks

+ + Every modern city contains an amazing array of pathways to carry flows + of people, goods, water, energy, and information. Transportation + networks are the largest and most visible of these. Ancient cities + relied on streets, most of them quite narrow by modern standards, to + carry foot traffic and carts. The modern city contains a complex + hierarchy of transportation channels, ranging from ten-lane freeways + to sidewalks. In the United States, the bulk of trips are carried by + the private automobile, with mass transit a distant second. American + cities display the low-density sprawl characteristic of auto-centered + urban development. In contrast, many European cities have the high + densities necessary to support rail transit.

+ + Modern cities rely on complex networks of utilities. When cities were + small, obtaining pure water and disposing of wastes was not a major + problem, but cities with large populations and high densities require + expensive public infrastructure. During the nineteenth century, rapid + urban growth and industrialization caused overcrowding, pollution, and + disease in urban areas. After the connection between impure water and + disease was established, American and European cities began to install + adequate sewer and water systems. Since the late nineteenth century, + cities have also been laced with wires and conduits carrying + electricity, gas, and communications signals. +

+ +

Buildings

+ + Buildings are the most visible elements of the city, the features that + give each city its unique character. Residential structures occupy + almost half of all urban land, with the building types ranging from + scattered single-family homes to dense high-rise apartments. + Commercial buildings are clustered downtown and at various subcenters, + with skyscrapers packed into the central business district and + low-rise structures prevailing elsewhere, although tall buildings are + becoming more common in the suburbs. Industrial buildings come in many + forms ranging from large factory complexes in industrial districts to + small workshops.

+ + City planners engage in a constant search for the proper arrangement + of these different types of land use, paying particular attention to + the compatibility of different activities, population densities, + traffic generation, economic efficiency, social relationships, and the + height and bulk of buildings. +

+ +

Open Spaces

+ + Open space is sometimes treated as a leftover, but it contributes + greatly to the quality of urban life. "Hard" spaces such as plazas, + malls, and courtyards provide settings for public activities of all + kinds. "Soft" spaces such as parks, gardens, lawns, and nature + preserves provide essential relief from harsh urban conditions and + serve as space for recreational activities. These "amenities" + increasingly influence which cities will be perceived as desirable + places to live.

+ +

Evolution of Urban Form

+ + The first true urban settlements appeared around 3,000 B.C. in ancient + Mesopotamia, Egypt, and the Indus Valley. Ancient cities displayed + both "organic" and "planned" types of urban form. These societies had + elaborate religious, political, and military hierarchies. Precincts + devoted to the activities of the elite were often highly planned and + regular in form. In contrast, residential areas often grew by a slow + process of accretion, producing complex, irregular patterns that we + term "organic." Two typical features of the ancient city are the wall + and the citadel: the wall for defense in regions periodically swept by + conquering armies, and the citadel -- a large, elevated precinct + within the city -- devoted to religious and state functions.

+ + Greek cities did not follow a single pattern. Cities growing slowly + from old villages often had an irregular, organic form, adapting + gradually to the accidents of topography and history. Colonial cities, + however, were planned prior to settlement using the grid system. The + grid is easy to lay out, easy to comprehend, and divides urban land + into uniform rectangular lots suitable for development. +

+ + The Romans engaged in extensive city-building activities as they + consolidated their empire. Rome itself displayed the informal + complexity created by centuries of organic growth, although particular + temple and public districts were highly planned. In contrast, the + Roman military and colonial towns were laid out in a variation of the + grid. Many European cities, like London and Paris, sprang from these + Roman origins. +

+ + We usually associate medieval cities with narrow winding streets + converging on a market square with a cathedral and city hall. Many + cities of this period display this pattern, the product of thousands + of incremental additions to the urban fabric. However, new towns + seeded throughout undeveloped regions of Europe were based upon the + familiar grid. In either case, large encircling walls were built for + defense against marauding armies; new walls enclosing more land were + built as the city expanded and outgrew its former container. +

+ + During the Renaissance, architects began to systematically study the + shaping of urban space, as though the city itself were a piece of + architecture that could be given an aesthetically pleasing and + functional order. Many of the great public spaces of Rome and other + Italian cities date from this era. Parts of old cities were rebuilt to + create elegant squares, long street vistas, and symmetrical building + arrangements. Responding to advances in firearms during the fifteenth + century, new city walls were designed with large earthworks to deflect + artillery, and star-shaped points to provide defenders with sweeping + lines of fire. Spanish colonial cities in the New World were built + according to rules codified in the Laws of the Indies of 1573, + specifying an orderly grid of streets with a central plaza, defensive + wall, and uniform building style. +

+ + We associate the baroque city with the emergence of great + nation-states between 1600 and 1750. Ambitious monarchs constructed + new palaces, courts, and bureaucratic offices. The grand scale was + sought in urban public spaces: long avenues, radial street networks, + monumental squares, geometric parks and gardens. Versailles is a clear + expression of this city-building model; Washington, D.C. is an example + from the United States. Baroque principles of urban design were used + by Baron Haussmann in his celebrated restructuring of Paris between + 1853 and 1870. Haussmann carved broad new thoroughfares through the + tangled web of old Parisian streets, linking major subcenters of the + city with one another in a pattern which has served as a model for + many other modernization plans. +

+ + Toward the latter half of the eighteenth century, particularly in + America, the city as a setting for commerce assumed primacy. The + buildings of the bourgeoisie expand along with their owners' + prosperity: banks, office buildings, warehouses, hotels, and small + factories. New towns founded during this period were conceived as + commercial enterprises, and the neutral grid was the most effective + means to divide land up into parcels for sale. The city became a + checkerboard on which players speculated on shifting land values. No + longer would religious, political, and cultural imperatives shape + urban development; rather, the market would be allowed to determine + the pattern of urban growth. New York, Philadelphia, and Boston around + 1920 exemplify the commercial city of this era, with their bustling, + mixed-use waterfront districts. +

+ +

Transition to the Industrial City

+ + Cities have changed more since the Industrial Revolution than in all + the previous centuries of their existence. New York had a population + of about 313,000 in 1840 but had reached 4,767,000 in 1910. Chicago + exploded from 4.000 to 2,185,000 during the same period. Millions of + rural dwellers no longer needed on farms flocked to the cities, where + new factories churned out products for the new markets made accessible + by railroads and steamships. In the United States, millions of + immigrants from Europe swelled the urban populations. Increasingly, + urban economies were being woven more rightly into the national and + international economies.

+ + Technological innovations poured forth, many with profound impacts on + urban form. Railroad tracks were driven into the heart of the city. + Internal rail transportation systems greatly expanded the radius of + urban settlement: horsecars beginning in the 1830s, cable cars in the + 1870s, and electric trolleys in the 1880s. In the 1880s, the first + central power plants began providing electrical power to urban areas. + The rapid communication provided by the telegraph and the telephone + allowed formerly concentrated urban activities to disperse across a + wider field. +

+ + The industrial city still focused on the city center, which contained + both the central business district, defined by large office buildings, + and substantial numbers of factory and warehouse structures. Both + trolleys and railroad systems converged on the center of the city, + which boasted the premier entertainment and shopping establishments. + The working class lived in crowded districts close to the city center, + near their place of employment. +

+ + Early American factories were located outside of major cities along + rivers which provided water power for machinery. After steam power + became widely available in the 1930s, factories could be located + within the city in proximity to port facilities, rail lines, and the + urban labor force. Large manufacturing zones emerged within the major + northeastern and midwestern cities such as Pittsburgh, Detroit, and + Cleveland. But by the late nineteenth century, factory + decentralization had already begun, as manufacturers sought larger + parcels of land away from the congestion of the city. Gary, Indiana, + for example, was founded in 1906 on the southern shore of Lake + Michigan by the United States Steel Company. +

+ + The increasing crowding, pollution, and disease in the central city + produced a growing desire to escape to a healthier environment in the + suburbs. The upper classes had always been able to retreat to homes in + the countryside. Beginning in the 1830s, commuter railroads enabled + the upper middle class to commute in to the city center. Horsecar + lines were built in many cities between the 1830s and 1880s, allowing + the middle class to move out from the central cities into more + spacious suburbs. Finally, during the 1890s electric trolleys and + elevated rapid transit lines proliferated, providing cheap urban + transportation for the majority of the population. +

+ + The central business district of the city underwent a radical + transformation with the development of the skyscraper between 1870 and + 1900. These tall buildings were not technically feasible until the + invention of the elevator and steel-frame construction methods. + Skyscrapers reflect the dynamics of the real estate market; the tall + building extracts the maximum economic value from a limited parcel of + land. These office buildings housed the growing numbers of + white-collar employees in banking, finance, management, and business + services, all manifestations of the shift from an economy of small + firms to one of large corporations. +

+ +

The Form of the Modern City + in the Age of the Automobile

+ + The city of today may be divided into two parts:

+ +

    + +
  • An inner zone, coextensive with the boundaries of the old industrial city. + +
  • Suburban areas, dating from the 1920s, which have been designed for the automobile from the beginning. + +
+ + The central business districts of American cities have become centers + of information processing, finance, and administration rather than + manufacturing. White-collar employees in these economic sectors + commute in from the suburbs on a network of urban freeways built + during the 1950s and 1960s; this "hub-and-wheel" freeway pattern can + be observed on many city maps. New bridges have spanned rivers and + bays, as in New York and San Francisco, linking together formerly + separate cities into vast urbanized regions.

+ + Waves of demolition and rebuilding have produced "Manhattanized" + downtowns across the land. During the 1950s and 1960s, urban renewal + programs cleared away large areas of the old city, releasing the land + for new office buildings, convention centers, hotels, and sports + complexes. Building surges have converted the downtowns of American + cities into forests of tall office buildings. More recently, office + functions not requiring a downtown location have been moved to huge + office parks in the suburbs. +

+ + Surrounding the central business area lies a large band of old + mixed-use and residential buildings which hose the urban poor. High + crime, low income, deteriorating services, inadequate housing, and + intractable social problems plague these neglected areas of urban + America. The manufacturing jobs formerly available to inner city + residents are no longer there, and resources have not been committed + to replace them. +

+ + These inner city areas have been left behind by a massive migration to + the suburbs, which began in the late nineteenth century but + accelerated in the 1920s with the spread of the automobile. Freeway + building after World War II opened up even larger areas of suburban + land, which were quickly filled by people fleeing central city + decline. Today, more people live in suburbs than in cities proper. + Manufacturers have also moved their production facilities to suburban + locations which have freeway and rail accessibility. +

+ + Indeed, we have reached a new stage of urbanization beyond the + metropolis. Most major cities are no longer focused exclusively on the + traditional downtown. New subcenters have arisen round the periphery, + and these subcenters supply most of the daily needs of their adjacent + populations. The old metropolis has become a multi-centered urban + region. In turn, many of these urban regions have expanded to the + point where they have coalesced into vast belts of urbanization -- + what the geographer Jean Gottman termed "megalopolis." The prime + example is the eastern seaboard of the United States from Boston to + Washington. The planner C.A. Doxiadis has speculated that similar vast + corridors of urbanization will appear throughout the world during the + next century. Thus far, American planners have not had much success in + imposing a rational form on this process. However, New Town and + greenbelt programs in Britain and the Scandinavian countries have, to + some extent, prevented formless sprawl from engulfing the countryside. +

+ +

The Economics of Urban Areas

+ + Since the 1950s, city planners have increasingly paid attention to the + economics of urban areas. When many American cities experienced fiscal + crises during the 1970s, urban financial management assumed even + greater importance. Today, planners routinely assess the economic + consequences of all major changes in the form of the city.

+ + Several basic concepts underlie urban and regional economic analysis. + First, cities cannot grow if their residents simply provide services + for one another. The city must create products which can be sold to an + external purchaser, bringing in money which can be reinvested in new + production facilities and raw materials. This "economic base" of + production for external markets is crucial. Without it, the economic + engine of the city grinds to a halt. +

+ + Once the economic base is established, an elaborate internal market + can evolve. This market includes the production of goods and services + for businesses and residents within the city. Obviously, a large part + of the city's physical plant is devoted to facilities for internal + transactions: retail stores of all kinds, restaurants, local + professional services, and so on. +

+ + Modern cities are increasingly engaged in competition for economic + resources such as industrial plants, corporate headquarters, + high-technology firms, and government facilities. Cities try to lure + investment with an array of features: low tax rates, improved + transportation and utility infrastructure, cheap land, and skilled + labor force. Amenities such as climate, proximity to recreation, + parks, elegant architecture, and cultural activities influence the + location decisions of businesses and individuals. Many older cities + have difficulty surviving in this new economic game. Abandoned by + traditional industries, they're now trying to create a new economic + base involving growth sectors such as high technology. +

+ + Today, cities no longer compete in mere regional or national markets: + the market is an international one. Multinational firms close plants + in Chicago or Detroit and build replacements in Asia or Latin America. + Foreign products dominate whole sectors of the American consumer goods + market. Huge sums of money shift around the globe in instantaneous + electronic transactions. Cities must struggle for survival in a + volatile environment in which the rules are always changing. This + makes city planning even more challenging than before. +

+ +

Modern City Planning

+ + Modern city planning can be divided into two distinct but related + types of planning. visionary city planning proposes radical changes in + the form of the city, often in conjunction with sweeping changes in + the social and economic order. Institutionalized city planning is + lodged within the existing structures of government, and modifies + urban growth processes in moderate, pragmatic ways. It is constrained + by the prevailing alignment of political and economic forces within + the city.

+ +

Visionary or Utopian City Planning

+ + People have imagined ideal cities for millennia. Plato's Republic was + an ideal city, although lacking in the spatial detail of later + schemes. Renaissance architects designed numerous geometric cities, + and ever since architects have been the chief source of imaginative + urban proposals. In the twentieth century, Le Corbusier, Frank Lloyd + Wright, Paolo Soleri, and dozens of other architects have designed + cities on paper. Although few have been realized in pure form, they + have influenced the layout of many new towns and urban redevelopment + projects.

+ + In his "Contemporary City for Three Million People" of 1922 and + "Radiant City" of 1935, Le Corbusier advocated a high-density urban + alternative, with skyscraper office buildings and mid-rise apartments + placed within park-like open spaces. Different land uses were located + in separate districts, forming a rigid geometric pattern with a + sophisticated system of superhighways and rail transit. +

+ + Frank Lloyd Wright envisioned a decentralized low-density city in + keeping with his distaste for large cities and belief in frontier + individualism. The Broadacre City plan of 1935 is a large grid of + arterials spread across the countryside, with most of the internal + space devoted to single-family homes on large lots. Areas are also + carefully set aside for small farms, light industry, orchards, + recreation areas, and other urban facilities. A network of + superhighways knits the region together, so spatially dispersed + facilities are actually very close in terms of travel time. In many + ways, Wright's Broadacre City resembles American suburban and exurban + developments of the post-WWII period. +

+ + Many other utopian plans could be catalogued, but the point is that + planners and architects have generated a complex array of urban + patterns from which to draw ideas and inspiration. Most city planners, + however, do not work on a blank canvas; they can only make incremental + changes to an urban scene already shaped by a complicated historical + process. +

+ +

Institutionalized City Planning

+ + The form of the city is determined primarily by thousands of private + decisions to construct buildings, within a framework of public + infrastructure and regulations administered by the city, state, and + federal governments. City planning actions can have enormous impacts + on land values. From the point of view of land economics, the city is + an enormous playing field on which thousands of competitors struggle + to capture value by constructing or trading land and buildings. The + goal of city planning is to intervene in this game in order to protect + widely shared public values such as health, safety, environmental + quality, social equality, and aesthetics.

+ + The roots of American city planning lie in an array of reform efforts + of the late nineteenth century: the Parks movement, the City Beautiful + movement, campaigns for housing regulations, the Progressive movement + for government reform, and efforts to improve public health through + the provision of sanitary sewers and clean water supplies. The First + National Conference on City Planning occurred in 1909, the same year + as Daniel Burnham's famous Plan of Chicago. That date may be used to + mark the inauguration of the new profession. The early city planners + actually came from diverse backgrounds such as architecture, landscape + architecture, engineering, and law, but they shared a common desire to + produce a more orderly urban pattern. +

+ + The zoning of land became, and still is, the most potent instrument + available to American city planners for controlling urban development. + Zoning is basically the dividing of the city into discrete areas + within which only certain land uses and types of buildings can be + constructed. The rationale is that certain activities of building + types don't mix well; factories and homes, for example. Illogical + mixtures create nuisances for the parties involved and lower land + values. After several decades of gradual development, land-use zoning + received legal approval from the Supreme Court in 1926. +

+ + Zoning isn't the same as planning: it is a legal tool for the + implementation of plans. Zoning should be closely integrated with a + Master Plan or Comprehensive Plan that spells out a logical path for + the city's future in areas such as land use, transportation, parks and + recreation, environmental quality, and public works construction. In + the early days of zoning this was often neglected, but this lack of + coordination between zoning and planning is less common now. +

+ + The other important elements of existing city planning are subdivision + regulations and environmental regulations. Subdivision regulations + require that land being subdivided for development be provided with + adequate street, sewers, water, schools, utilities, and various design + features. The goal is to prevent shabby, deficient developments that + produce headaches for both their residents and the city. Since the + late 1960s, environmental regulations have exerted a stronger + influence on patterns of urban growth by restricting development in + floodplains, on unstable slopes, on earthquake faults, or near + sensitive natural areas. Businesses have been forced to reduce smoke + emissions and the disposal of wastes has been more closely monitored. + Overall, the pace of environmental degradation has been slowed, but + certainly not stopped, and a dismaying backlog of environmental + hazards remains to be cleaned up. City planners have plenty of work to + do as we move into the twenty-first century. +

+ +

Conclusion: Good City Form

+ + What is the good city? We are unlikely to arrive at an unequivocal + answer; the diversity of human needs and tastes frustrates all + attempts to provide recipes or instruction manuals for the building of + cities. However, we can identify the crucial dimensions of city + performance, and specify the many ways in which cities can achieve + success along these dimensions.

+ + A most useful guide in this enterprise is Kevin Lynch's A Theory of + Good City Form (Cambridge, MA, MIT Press, 1981). Lynch offers five + basic dimensions of city performance: vitality, sense, fit, access, + and control. To these he adds two "meta-criteria," efficiency and + justice. +

+ + For Lynch, a vital city successfully fulfils the biological needs of + its inhabitants, and provides a safe environment for their activities. + A sensible city is organized so that its residents can perceive and + understand the city's form and function. A city with good fit provides + the buildings, spaces, and networks required for its residents to + pursue their projects successfully. An accessible city allows people + of all ages and background to gain the activities, resources, + services, and information that they need. A city with good control is + arranged so that its citizens have a say in the management of the + spaces in which they work and reside. +

+ + Finally, an efficient city achieves the goals listed above at the + least cost, and balances the achievement of the goals with one + another. They cannot all be maximized at the same time. And a just + city distributes benefits among its citizens according to some fair + standard. Clearly, these two meta-criteria raise difficult issues + which will continue to spark debates for the foreseeable future. +

+ + These criteria tell aspiring city builders where to aim, while + acknowledging the diverse ways of achieving good city form. Cities are + endlessly fascinating because each is unique, the product of decades, + centuries, or even millennia of historical evolution. As we walk + through city streets, we walk through time, encountering the + city-building legacy of past generations. Paris, Venice, Rome, New + York, Chicago, San Francisco -- each has its glories and its failures. + In theory, we should be able to learn the lessons of history and build + cities that our descendants will admire and wish to preserve. That + remains a constant challenge for all those who undertake the task of + city planning. +

+ +

+ +


+

+

Micropolis, Unix Version.

+ This game was released for the Unix platform + in or about 1990 and has been modified for inclusion in the One Laptop + Per Child program. Copyright © 1989 - 2007 Electronic Arts Inc. If + you need assistance with this program, you may contact: + http://wiki.laptop.org/go/Micropolis or email micropolis@laptop.org. +

+

+ + This program 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. +

+

+ + This program 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 this program. If + not, see http://www.gnu.org/licenses/. +

+

+ +

ADDITIONAL TERMS per GNU GPL Section 7

+ +

+

+ No trademark or publicity rights are granted. This license does NOT + give you any right, title or interest in the trademark SimCity or any + other Electronic Arts trademark. You may not distribute any + modification of this program using the trademark SimCity or claim any + affliation or association with Electronic Arts Inc. or its employees. +

+

+ + Any propagation or conveyance of this program must include this + copyright notice and these terms. +

+

+ + If you convey this program (or any modifications of it) and assume + contractual liability for the program to recipients of it, you agree + to indemnify Electronic Arts for any liability that those contractual + assumptions impose on Electronic Arts. +

+

+ + You may not misrepresent the origins of this program; modified + versions of the program must be marked as such and not identified as + the original program. +

+

+ + This disclaimer supplements the one included in the General Public + License. TO THE FULLEST EXTENT PERMISSIBLE UNDER APPLICABLE LAW, THIS + PROGRAM IS PROVIDED TO YOU "AS IS," WITH ALL FAULTS, WITHOUT WARRANTY + OF ANY KIND, AND YOUR USE IS AT YOUR SOLE RISK. THE ENTIRE RISK OF + SATISFACTORY QUALITY AND PERFORMANCE RESIDES WITH YOU. ELECTRONIC ARTS + DISCLAIMS ANY AND ALL EXPRESS, IMPLIED OR STATUTORY WARRANTIES, + INCLUDING IMPLIED WARRANTIES OF MERCHANTABILITY, SATISFACTORY QUALITY, + FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT OF THIRD PARTY + RIGHTS, AND WARRANTIES (IF ANY) ARISING FROM A COURSE OF DEALING, + USAGE, OR TRADE PRACTICE. ELECTRONIC ARTS DOES NOT WARRANT AGAINST + INTERFERENCE WITH YOUR ENJOYMENT OF THE PROGRAM; THAT THE PROGRAM WILL + MEET YOUR REQUIREMENTS; THAT OPERATION OF THE PROGRAM WILL BE + UNINTERRUPTED OR ERROR-FREE, OR THAT THE PROGRAM WILL BE COMPATIBLE + WITH THIRD PARTY SOFTWARE OR THAT ANY ERRORS IN THE PROGRAM WILL BE + CORRECTED. NO ORAL OR WRITTEN ADVICE PROVIDED BY ELECTRONIC ARTS OR + ANY AUTHORIZED REPRESENTATIVE SHALL CREATE A WARRANTY. SOME + JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF OR LIMITATIONS ON IMPLIED + WARRANTIES OR THE LIMITATIONS ON THE APPLICABLE STATUTORY RIGHTS OF A + CONSUMER, SO SOME OR ALL OF THE ABOVE EXCLUSIONS AND LIMITATIONS MAY + NOT APPLY TO YOU. +

+ + + \ No newline at end of file diff --git a/docs/images/Alan_Kay.jpg b/docs/images/Alan_Kay.jpg new file mode 100644 index 0000000..6443f9d Binary files /dev/null and b/docs/images/Alan_Kay.jpg differ diff --git a/docs/images/Alan_Kay_Thumb.jpg b/docs/images/Alan_Kay_Thumb.jpg new file mode 100644 index 0000000..02f5f19 Binary files /dev/null and b/docs/images/Alan_Kay_Thumb.jpg differ diff --git a/docs/images/Don_Hopkins_Handwaving.jpg b/docs/images/Don_Hopkins_Handwaving.jpg new file mode 100644 index 0000000..0fd51dc Binary files /dev/null and b/docs/images/Don_Hopkins_Handwaving.jpg differ diff --git a/docs/images/Don_Hopkins_Handwaving_Thumb.jpg b/docs/images/Don_Hopkins_Handwaving_Thumb.jpg new file mode 100644 index 0000000..c9cf83b Binary files /dev/null and b/docs/images/Don_Hopkins_Handwaving_Thumb.jpg differ diff --git a/docs/images/Don_Hopkins_OLPC.jpg b/docs/images/Don_Hopkins_OLPC.jpg new file mode 100644 index 0000000..131f71d Binary files /dev/null and b/docs/images/Don_Hopkins_OLPC.jpg differ diff --git a/docs/images/Don_Hopkins_OLPC_Thumb.jpg b/docs/images/Don_Hopkins_OLPC_Thumb.jpg new file mode 100644 index 0000000..e5c4f70 Binary files /dev/null and b/docs/images/Don_Hopkins_OLPC_Thumb.jpg differ diff --git a/docs/images/Don_Hopkins_Talk_1.jpg b/docs/images/Don_Hopkins_Talk_1.jpg new file mode 100644 index 0000000..48014a0 Binary files /dev/null and b/docs/images/Don_Hopkins_Talk_1.jpg differ diff --git a/docs/images/Don_Hopkins_Talk_1_Thumb.jpg b/docs/images/Don_Hopkins_Talk_1_Thumb.jpg new file mode 100644 index 0000000..396acc3 Binary files /dev/null and b/docs/images/Don_Hopkins_Talk_1_Thumb.jpg differ diff --git a/docs/images/Don_Hopkins_Talk_2.jpg b/docs/images/Don_Hopkins_Talk_2.jpg new file mode 100644 index 0000000..e133aa4 Binary files /dev/null and b/docs/images/Don_Hopkins_Talk_2.jpg differ diff --git a/docs/images/Don_Hopkins_Talk_2_Thumb.jpg b/docs/images/Don_Hopkins_Talk_2_Thumb.jpg new file mode 100644 index 0000000..2f78c4c Binary files /dev/null and b/docs/images/Don_Hopkins_Talk_2_Thumb.jpg differ diff --git a/docs/images/Don_Hopkins_Talk_3.jpg b/docs/images/Don_Hopkins_Talk_3.jpg new file mode 100644 index 0000000..7776a75 Binary files /dev/null and b/docs/images/Don_Hopkins_Talk_3.jpg differ diff --git a/docs/images/Don_Hopkins_Talk_3_Thumb.jpg b/docs/images/Don_Hopkins_Talk_3_Thumb.jpg new file mode 100644 index 0000000..ea35319 Binary files /dev/null and b/docs/images/Don_Hopkins_Talk_3_Thumb.jpg differ diff --git a/docs/images/Facebook.png b/docs/images/Facebook.png new file mode 100644 index 0000000..dbe5fcf Binary files /dev/null and b/docs/images/Facebook.png differ diff --git a/docs/images/Facebook_Thumb.png b/docs/images/Facebook_Thumb.png new file mode 100644 index 0000000..5ab40c3 Binary files /dev/null and b/docs/images/Facebook_Thumb.png differ diff --git a/docs/images/HAR2009_Slides_001.png b/docs/images/HAR2009_Slides_001.png new file mode 100644 index 0000000..088b547 Binary files /dev/null and b/docs/images/HAR2009_Slides_001.png differ diff --git a/docs/images/HAR2009_Slides_002.png b/docs/images/HAR2009_Slides_002.png new file mode 100644 index 0000000..6b76c70 Binary files /dev/null and b/docs/images/HAR2009_Slides_002.png differ diff --git a/docs/images/HAR2009_Slides_003.png b/docs/images/HAR2009_Slides_003.png new file mode 100644 index 0000000..9a34356 Binary files /dev/null and b/docs/images/HAR2009_Slides_003.png differ diff --git a/docs/images/HAR2009_Slides_004.png b/docs/images/HAR2009_Slides_004.png new file mode 100644 index 0000000..2cb9f5e Binary files /dev/null and b/docs/images/HAR2009_Slides_004.png differ diff --git a/docs/images/HAR2009_Slides_005.png b/docs/images/HAR2009_Slides_005.png new file mode 100644 index 0000000..61017fe Binary files /dev/null and b/docs/images/HAR2009_Slides_005.png differ diff --git a/docs/images/HAR2009_Slides_006.png b/docs/images/HAR2009_Slides_006.png new file mode 100644 index 0000000..4ed7d13 Binary files /dev/null and b/docs/images/HAR2009_Slides_006.png differ diff --git a/docs/images/HAR2009_Slides_007.png b/docs/images/HAR2009_Slides_007.png new file mode 100644 index 0000000..92561da Binary files /dev/null and b/docs/images/HAR2009_Slides_007.png differ diff --git a/docs/images/HAR2009_Slides_008.png b/docs/images/HAR2009_Slides_008.png new file mode 100644 index 0000000..13a19ed Binary files /dev/null and b/docs/images/HAR2009_Slides_008.png differ diff --git a/docs/images/HAR2009_Slides_009.png b/docs/images/HAR2009_Slides_009.png new file mode 100644 index 0000000..52b9f7b Binary files /dev/null and b/docs/images/HAR2009_Slides_009.png differ diff --git a/docs/images/HAR2009_Slides_010.png b/docs/images/HAR2009_Slides_010.png new file mode 100644 index 0000000..44c76bb Binary files /dev/null and b/docs/images/HAR2009_Slides_010.png differ diff --git a/docs/images/HAR2009_Slides_011.png b/docs/images/HAR2009_Slides_011.png new file mode 100644 index 0000000..c35e487 Binary files /dev/null and b/docs/images/HAR2009_Slides_011.png differ diff --git a/docs/images/HAR2009_Slides_011_Thumb.png b/docs/images/HAR2009_Slides_011_Thumb.png new file mode 100644 index 0000000..ece9455 Binary files /dev/null and b/docs/images/HAR2009_Slides_011_Thumb.png differ diff --git a/docs/images/HAR2009_Slides_012.png b/docs/images/HAR2009_Slides_012.png new file mode 100644 index 0000000..9c0f4f8 Binary files /dev/null and b/docs/images/HAR2009_Slides_012.png differ diff --git a/docs/images/HAR2009_Slides_012_Thumb.png b/docs/images/HAR2009_Slides_012_Thumb.png new file mode 100644 index 0000000..8fa77f4 Binary files /dev/null and b/docs/images/HAR2009_Slides_012_Thumb.png differ diff --git a/docs/images/HAR2009_Slides_013.png b/docs/images/HAR2009_Slides_013.png new file mode 100644 index 0000000..d50058a Binary files /dev/null and b/docs/images/HAR2009_Slides_013.png differ diff --git a/docs/images/HAR2009_Slides_013_Thumb.png b/docs/images/HAR2009_Slides_013_Thumb.png new file mode 100644 index 0000000..72ae27e Binary files /dev/null and b/docs/images/HAR2009_Slides_013_Thumb.png differ diff --git a/docs/images/HAR2009_Slides_014.png b/docs/images/HAR2009_Slides_014.png new file mode 100644 index 0000000..76acf21 Binary files /dev/null and b/docs/images/HAR2009_Slides_014.png differ diff --git a/docs/images/HAR2009_Slides_014_Thumb.png b/docs/images/HAR2009_Slides_014_Thumb.png new file mode 100644 index 0000000..3613226 Binary files /dev/null and b/docs/images/HAR2009_Slides_014_Thumb.png differ diff --git a/docs/images/HAR2009_Slides_015.png b/docs/images/HAR2009_Slides_015.png new file mode 100644 index 0000000..e5f14dc Binary files /dev/null and b/docs/images/HAR2009_Slides_015.png differ diff --git a/docs/images/HAR2009_Slides_015_Thumb.png b/docs/images/HAR2009_Slides_015_Thumb.png new file mode 100644 index 0000000..82b078f Binary files /dev/null and b/docs/images/HAR2009_Slides_015_Thumb.png differ diff --git a/docs/images/HAR2009_Slides_016.png b/docs/images/HAR2009_Slides_016.png new file mode 100644 index 0000000..046cd49 Binary files /dev/null and b/docs/images/HAR2009_Slides_016.png differ diff --git a/docs/images/HAR2009_Slides_016_Thumb.png b/docs/images/HAR2009_Slides_016_Thumb.png new file mode 100644 index 0000000..077a8c3 Binary files /dev/null and b/docs/images/HAR2009_Slides_016_Thumb.png differ diff --git a/docs/images/HAR2009_Slides_017.png b/docs/images/HAR2009_Slides_017.png new file mode 100644 index 0000000..74da42f Binary files /dev/null and b/docs/images/HAR2009_Slides_017.png differ diff --git a/docs/images/HAR2009_Slides_017_Thumb.png b/docs/images/HAR2009_Slides_017_Thumb.png new file mode 100644 index 0000000..f32a6f7 Binary files /dev/null and b/docs/images/HAR2009_Slides_017_Thumb.png differ diff --git a/docs/images/MediaWiki.png b/docs/images/MediaWiki.png new file mode 100644 index 0000000..d401f4a Binary files /dev/null and b/docs/images/MediaWiki.png differ diff --git a/docs/images/MediaWiki_Thumb.png b/docs/images/MediaWiki_Thumb.png new file mode 100644 index 0000000..850b456 Binary files /dev/null and b/docs/images/MediaWiki_Thumb.png differ diff --git a/docs/images/Micropolis_Demo_01.jpg b/docs/images/Micropolis_Demo_01.jpg new file mode 100644 index 0000000..e816920 Binary files /dev/null and b/docs/images/Micropolis_Demo_01.jpg differ diff --git a/docs/images/Micropolis_Demo_01_Thumb.jpg b/docs/images/Micropolis_Demo_01_Thumb.jpg new file mode 100644 index 0000000..300b2d2 Binary files /dev/null and b/docs/images/Micropolis_Demo_01_Thumb.jpg differ diff --git a/docs/images/Micropolis_Demo_02.jpg b/docs/images/Micropolis_Demo_02.jpg new file mode 100644 index 0000000..f485713 Binary files /dev/null and b/docs/images/Micropolis_Demo_02.jpg differ diff --git a/docs/images/Micropolis_Demo_02_Thumb.jpg b/docs/images/Micropolis_Demo_02_Thumb.jpg new file mode 100644 index 0000000..91402e1 Binary files /dev/null and b/docs/images/Micropolis_Demo_02_Thumb.jpg differ diff --git a/docs/images/Micropolis_Demo_03.jpg b/docs/images/Micropolis_Demo_03.jpg new file mode 100644 index 0000000..0b6b096 Binary files /dev/null and b/docs/images/Micropolis_Demo_03.jpg differ diff --git a/docs/images/Micropolis_Demo_03_Thumb.jpg b/docs/images/Micropolis_Demo_03_Thumb.jpg new file mode 100644 index 0000000..67137f1 Binary files /dev/null and b/docs/images/Micropolis_Demo_03_Thumb.jpg differ diff --git a/docs/images/Micropolis_Demo_04.jpg b/docs/images/Micropolis_Demo_04.jpg new file mode 100644 index 0000000..9e5341b Binary files /dev/null and b/docs/images/Micropolis_Demo_04.jpg differ diff --git a/docs/images/Micropolis_Demo_04_Thumb.jpg b/docs/images/Micropolis_Demo_04_Thumb.jpg new file mode 100644 index 0000000..3762ccb Binary files /dev/null and b/docs/images/Micropolis_Demo_04_Thumb.jpg differ diff --git a/docs/images/Micropolis_Demo_05.jpg b/docs/images/Micropolis_Demo_05.jpg new file mode 100644 index 0000000..fe0818d Binary files /dev/null and b/docs/images/Micropolis_Demo_05.jpg differ diff --git a/docs/images/Micropolis_Demo_05_Thumb.jpg b/docs/images/Micropolis_Demo_05_Thumb.jpg new file mode 100644 index 0000000..3a09fbb Binary files /dev/null and b/docs/images/Micropolis_Demo_05_Thumb.jpg differ diff --git a/docs/images/Micropolis_Demo_06.jpg b/docs/images/Micropolis_Demo_06.jpg new file mode 100644 index 0000000..b646ae4 Binary files /dev/null and b/docs/images/Micropolis_Demo_06.jpg differ diff --git a/docs/images/Micropolis_Demo_06_Thumb.jpg b/docs/images/Micropolis_Demo_06_Thumb.jpg new file mode 100644 index 0000000..3e7511a Binary files /dev/null and b/docs/images/Micropolis_Demo_06_Thumb.jpg differ diff --git a/docs/images/Micropolis_Demo_07.jpg b/docs/images/Micropolis_Demo_07.jpg new file mode 100644 index 0000000..1dfad42 Binary files /dev/null and b/docs/images/Micropolis_Demo_07.jpg differ diff --git a/docs/images/Micropolis_Demo_07_Thumb.jpg b/docs/images/Micropolis_Demo_07_Thumb.jpg new file mode 100644 index 0000000..e56a79c Binary files /dev/null and b/docs/images/Micropolis_Demo_07_Thumb.jpg differ diff --git a/docs/images/Micropolis_Demo_08.jpg b/docs/images/Micropolis_Demo_08.jpg new file mode 100644 index 0000000..7045aa5 Binary files /dev/null and b/docs/images/Micropolis_Demo_08.jpg differ diff --git a/docs/images/Micropolis_Demo_08_Thumb.jpg b/docs/images/Micropolis_Demo_08_Thumb.jpg new file mode 100644 index 0000000..8e1521f Binary files /dev/null and b/docs/images/Micropolis_Demo_08_Thumb.jpg differ diff --git a/docs/images/Micropolis_Demo_09.jpg b/docs/images/Micropolis_Demo_09.jpg new file mode 100644 index 0000000..d99a86d Binary files /dev/null and b/docs/images/Micropolis_Demo_09.jpg differ diff --git a/docs/images/Micropolis_Demo_09_Thumb.jpg b/docs/images/Micropolis_Demo_09_Thumb.jpg new file mode 100644 index 0000000..2e9d48c Binary files /dev/null and b/docs/images/Micropolis_Demo_09_Thumb.jpg differ diff --git a/docs/images/Micropolis_Demo_10.jpg b/docs/images/Micropolis_Demo_10.jpg new file mode 100644 index 0000000..3943a61 Binary files /dev/null and b/docs/images/Micropolis_Demo_10.jpg differ diff --git a/docs/images/Micropolis_Demo_10_Thumb.jpg b/docs/images/Micropolis_Demo_10_Thumb.jpg new file mode 100644 index 0000000..6ee257b Binary files /dev/null and b/docs/images/Micropolis_Demo_10_Thumb.jpg differ diff --git a/docs/images/Micropolis_Demo_11.jpg b/docs/images/Micropolis_Demo_11.jpg new file mode 100644 index 0000000..deda0b8 Binary files /dev/null and b/docs/images/Micropolis_Demo_11.jpg differ diff --git a/docs/images/Micropolis_Demo_11_Thumb.jpg b/docs/images/Micropolis_Demo_11_Thumb.jpg new file mode 100644 index 0000000..e9c9b42 Binary files /dev/null and b/docs/images/Micropolis_Demo_11_Thumb.jpg differ diff --git a/docs/images/Micropolis_Demo_12.jpg b/docs/images/Micropolis_Demo_12.jpg new file mode 100644 index 0000000..2979f1e Binary files /dev/null and b/docs/images/Micropolis_Demo_12.jpg differ diff --git a/docs/images/Micropolis_Demo_12_Thumb.jpg b/docs/images/Micropolis_Demo_12_Thumb.jpg new file mode 100644 index 0000000..d55ac81 Binary files /dev/null and b/docs/images/Micropolis_Demo_12_Thumb.jpg differ diff --git a/docs/images/Micropolis_Demo_13.jpg b/docs/images/Micropolis_Demo_13.jpg new file mode 100644 index 0000000..7ebc1fb Binary files /dev/null and b/docs/images/Micropolis_Demo_13.jpg differ diff --git a/docs/images/Micropolis_Demo_13_Thumb.jpg b/docs/images/Micropolis_Demo_13_Thumb.jpg new file mode 100644 index 0000000..8bef92b Binary files /dev/null and b/docs/images/Micropolis_Demo_13_Thumb.jpg differ diff --git a/docs/images/Micropolis_Facebook.png b/docs/images/Micropolis_Facebook.png new file mode 100644 index 0000000..c554b3c Binary files /dev/null and b/docs/images/Micropolis_Facebook.png differ diff --git a/docs/images/Micropolis_Facebook_Medium.png b/docs/images/Micropolis_Facebook_Medium.png new file mode 100644 index 0000000..054f14d Binary files /dev/null and b/docs/images/Micropolis_Facebook_Medium.png differ diff --git a/docs/images/Micropolis_Facebook_MediumSmall.png b/docs/images/Micropolis_Facebook_MediumSmall.png new file mode 100644 index 0000000..8c18893 Binary files /dev/null and b/docs/images/Micropolis_Facebook_MediumSmall.png differ diff --git a/docs/images/Micropolis_Facebook_Thumb.png b/docs/images/Micropolis_Facebook_Thumb.png new file mode 100644 index 0000000..f393eb7 Binary files /dev/null and b/docs/images/Micropolis_Facebook_Thumb.png differ diff --git a/docs/images/Micropolis_GTK.png b/docs/images/Micropolis_GTK.png new file mode 100644 index 0000000..3950980 Binary files /dev/null and b/docs/images/Micropolis_GTK.png differ diff --git a/docs/images/Micropolis_GTK_Thumb.png b/docs/images/Micropolis_GTK_Thumb.png new file mode 100644 index 0000000..ccd85d1 Binary files /dev/null and b/docs/images/Micropolis_GTK_Thumb.png differ diff --git a/docs/images/Micropolis_Google_Code.jpg b/docs/images/Micropolis_Google_Code.jpg new file mode 100644 index 0000000..e6a8d8b Binary files /dev/null and b/docs/images/Micropolis_Google_Code.jpg differ diff --git a/docs/images/Micropolis_Google_Code_Thumb.jpg b/docs/images/Micropolis_Google_Code_Thumb.jpg new file mode 100644 index 0000000..40d55c1 Binary files /dev/null and b/docs/images/Micropolis_Google_Code_Thumb.jpg differ diff --git a/docs/images/Micropolis_OpenLaszlo.png b/docs/images/Micropolis_OpenLaszlo.png new file mode 100644 index 0000000..e1e96f6 Binary files /dev/null and b/docs/images/Micropolis_OpenLaszlo.png differ diff --git a/docs/images/Micropolis_OpenLaszlo_Thumb.png b/docs/images/Micropolis_OpenLaszlo_Thumb.png new file mode 100644 index 0000000..e87d705 Binary files /dev/null and b/docs/images/Micropolis_OpenLaszlo_Thumb.png differ diff --git a/docs/images/Micropolis_Robot_Code.jpg b/docs/images/Micropolis_Robot_Code.jpg new file mode 100644 index 0000000..ae4e9fc Binary files /dev/null and b/docs/images/Micropolis_Robot_Code.jpg differ diff --git a/docs/images/Micropolis_Robot_Code_Thumb.jpg b/docs/images/Micropolis_Robot_Code_Thumb.jpg new file mode 100644 index 0000000..26aceb4 Binary files /dev/null and b/docs/images/Micropolis_Robot_Code_Thumb.jpg differ diff --git a/docs/images/Micropolis_Translations.jpg b/docs/images/Micropolis_Translations.jpg new file mode 100644 index 0000000..1faa878 Binary files /dev/null and b/docs/images/Micropolis_Translations.jpg differ diff --git a/docs/images/Micropolis_Translations_Thumb.jpg b/docs/images/Micropolis_Translations_Thumb.jpg new file mode 100644 index 0000000..e568a44 Binary files /dev/null and b/docs/images/Micropolis_Translations_Thumb.jpg differ diff --git a/docs/images/Robot_Odyssey_1.gif b/docs/images/Robot_Odyssey_1.gif new file mode 100644 index 0000000..e978ba8 Binary files /dev/null and b/docs/images/Robot_Odyssey_1.gif differ diff --git a/docs/images/Robot_Odyssey_2.png b/docs/images/Robot_Odyssey_2.png new file mode 100644 index 0000000..73e5014 Binary files /dev/null and b/docs/images/Robot_Odyssey_2.png differ diff --git a/docs/images/Robot_Odyssey_3.png b/docs/images/Robot_Odyssey_3.png new file mode 100644 index 0000000..0762e18 Binary files /dev/null and b/docs/images/Robot_Odyssey_3.png differ diff --git a/docs/images/Robot_Odyssey_4.jpg b/docs/images/Robot_Odyssey_4.jpg new file mode 100644 index 0000000..1153a0b Binary files /dev/null and b/docs/images/Robot_Odyssey_4.jpg differ diff --git a/docs/images/Robot_Odyssey_5.jpg b/docs/images/Robot_Odyssey_5.jpg new file mode 100644 index 0000000..728168a Binary files /dev/null and b/docs/images/Robot_Odyssey_5.jpg differ diff --git a/docs/images/Robot_Odyssey_6.gif b/docs/images/Robot_Odyssey_6.gif new file mode 100644 index 0000000..948b397 Binary files /dev/null and b/docs/images/Robot_Odyssey_6.gif differ diff --git a/docs/images/Robot_Odyssey_7.jpg b/docs/images/Robot_Odyssey_7.jpg new file mode 100644 index 0000000..cf6c747 Binary files /dev/null and b/docs/images/Robot_Odyssey_7.jpg differ diff --git a/docs/images/Robot_Odyssey_8.png b/docs/images/Robot_Odyssey_8.png new file mode 100644 index 0000000..ce75a74 Binary files /dev/null and b/docs/images/Robot_Odyssey_8.png differ diff --git a/docs/images/Schoolhouse_Rock.jpg b/docs/images/Schoolhouse_Rock.jpg new file mode 100644 index 0000000..8b5097e Binary files /dev/null and b/docs/images/Schoolhouse_Rock.jpg differ diff --git a/docs/images/Seymour_Papert.jpg b/docs/images/Seymour_Papert.jpg new file mode 100644 index 0000000..0010b8f Binary files /dev/null and b/docs/images/Seymour_Papert.jpg differ diff --git a/docs/images/SimCity_Classic_Cover_Art.jpg b/docs/images/SimCity_Classic_Cover_Art.jpg new file mode 100644 index 0000000..6957b92 Binary files /dev/null and b/docs/images/SimCity_Classic_Cover_Art.jpg differ diff --git a/docs/images/SimCity_Classic_Cover_Art_Thumb.jpg b/docs/images/SimCity_Classic_Cover_Art_Thumb.jpg new file mode 100644 index 0000000..29ddcd3 Binary files /dev/null and b/docs/images/SimCity_Classic_Cover_Art_Thumb.jpg differ diff --git a/docs/images/SimCity_HyperLook.gif b/docs/images/SimCity_HyperLook.gif new file mode 100644 index 0000000..4d7ed80 Binary files /dev/null and b/docs/images/SimCity_HyperLook.gif differ diff --git a/docs/images/SimCity_HyperLook_Thumb.jpg b/docs/images/SimCity_HyperLook_Thumb.jpg new file mode 100644 index 0000000..b32ebd3 Binary files /dev/null and b/docs/images/SimCity_HyperLook_Thumb.jpg differ diff --git a/docs/images/SimCity_Indigo.gif b/docs/images/SimCity_Indigo.gif new file mode 100755 index 0000000..399676e Binary files /dev/null and b/docs/images/SimCity_Indigo.gif differ diff --git a/docs/images/SimCity_Indigo_Thumb.jpg b/docs/images/SimCity_Indigo_Thumb.jpg new file mode 100644 index 0000000..5fe7024 Binary files /dev/null and b/docs/images/SimCity_Indigo_Thumb.jpg differ diff --git a/docs/images/SimCity_NCD.gif b/docs/images/SimCity_NCD.gif new file mode 100755 index 0000000..60f9ae8 Binary files /dev/null and b/docs/images/SimCity_NCD.gif differ diff --git a/docs/images/SimCity_NCD_Thumb.jpg b/docs/images/SimCity_NCD_Thumb.jpg new file mode 100644 index 0000000..eb999b6 Binary files /dev/null and b/docs/images/SimCity_NCD_Thumb.jpg differ diff --git a/docs/images/SimCity_OLPC.jpg b/docs/images/SimCity_OLPC.jpg new file mode 100644 index 0000000..304e147 Binary files /dev/null and b/docs/images/SimCity_OLPC.jpg differ diff --git a/docs/images/SimCity_OLPC_Thumb.jpg b/docs/images/SimCity_OLPC_Thumb.jpg new file mode 100644 index 0000000..272571b Binary files /dev/null and b/docs/images/SimCity_OLPC_Thumb.jpg differ diff --git a/docs/images/SimCity_Sun.gif b/docs/images/SimCity_Sun.gif new file mode 100755 index 0000000..43f955d Binary files /dev/null and b/docs/images/SimCity_Sun.gif differ diff --git a/docs/images/SimCity_Sun_Thumb.jpg b/docs/images/SimCity_Sun_Thumb.jpg new file mode 100644 index 0000000..c1c607c Binary files /dev/null and b/docs/images/SimCity_Sun_Thumb.jpg differ diff --git a/docs/images/SimCity_X11.gif b/docs/images/SimCity_X11.gif new file mode 100755 index 0000000..83c1042 Binary files /dev/null and b/docs/images/SimCity_X11.gif differ diff --git a/docs/images/SimCity_X11_Thumb.jpg b/docs/images/SimCity_X11_Thumb.jpg new file mode 100644 index 0000000..595a0af Binary files /dev/null and b/docs/images/SimCity_X11_Thumb.jpg differ diff --git a/docs/images/Terrapin_Turtle.jpg b/docs/images/Terrapin_Turtle.jpg new file mode 100644 index 0000000..0ce6a88 Binary files /dev/null and b/docs/images/Terrapin_Turtle.jpg differ diff --git a/docs/images/Terrapin_Turtle_Thumb.jpg b/docs/images/Terrapin_Turtle_Thumb.jpg new file mode 100644 index 0000000..cfa4144 Binary files /dev/null and b/docs/images/Terrapin_Turtle_Thumb.jpg differ diff --git a/docs/images/The_Sims_Box.jpg b/docs/images/The_Sims_Box.jpg new file mode 100644 index 0000000..d67300a Binary files /dev/null and b/docs/images/The_Sims_Box.jpg differ diff --git a/docs/images/The_Sims_Box_Thumb.jpg b/docs/images/The_Sims_Box_Thumb.jpg new file mode 100644 index 0000000..27fe458 Binary files /dev/null and b/docs/images/The_Sims_Box_Thumb.jpg differ diff --git a/docs/images/Tux.jpg b/docs/images/Tux.jpg new file mode 100644 index 0000000..a111e4a Binary files /dev/null and b/docs/images/Tux.jpg differ diff --git a/docs/images/Tux_Thumb.jpg b/docs/images/Tux_Thumb.jpg new file mode 100644 index 0000000..147e7a6 Binary files /dev/null and b/docs/images/Tux_Thumb.jpg differ diff --git a/docs/images/WikiMedia.png b/docs/images/WikiMedia.png new file mode 100644 index 0000000..a9b9c6a Binary files /dev/null and b/docs/images/WikiMedia.png differ diff --git a/docs/images/WikiMedia_Thumb.png b/docs/images/WikiMedia_Thumb.png new file mode 100644 index 0000000..011ac72 Binary files /dev/null and b/docs/images/WikiMedia_Thumb.png differ diff --git a/docs/images/Wikipedia.png b/docs/images/Wikipedia.png new file mode 100644 index 0000000..e00ccf9 Binary files /dev/null and b/docs/images/Wikipedia.png differ diff --git a/docs/images/Wikipedia_Thumb.png b/docs/images/Wikipedia_Thumb.png new file mode 100644 index 0000000..73647fb Binary files /dev/null and b/docs/images/Wikipedia_Thumb.png differ diff --git a/docs/images/Will_Wright.jpg b/docs/images/Will_Wright.jpg new file mode 100644 index 0000000..01ffeb4 Binary files /dev/null and b/docs/images/Will_Wright.jpg differ diff --git a/docs/images/Will_Wright_Thumb.jpg b/docs/images/Will_Wright_Thumb.jpg new file mode 100644 index 0000000..df72a73 Binary files /dev/null and b/docs/images/Will_Wright_Thumb.jpg differ diff --git a/docs/index.html b/docs/index.html new file mode 100755 index 0000000..eb3f0b3 --- /dev/null +++ b/docs/index.html @@ -0,0 +1,102 @@ + + + + Micropolis Manual + + + +

Micropolis Manual

+ + +

+ +


+

+

Micropolis, Unix Version.

+ This game was released for the Unix platform + in or about 1990 and has been modified for inclusion in the One Laptop + Per Child program. Copyright © 1989 - 2007 Electronic Arts Inc. If + you need assistance with this program, you may contact: + http://wiki.laptop.org/go/Micropolis or email micropolis@laptop.org. +

+

+ + This program 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. +

+

+ + This program 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 this program. If + not, see http://www.gnu.org/licenses/. +

+

+ +

ADDITIONAL TERMS per GNU GPL Section 7

+ +

+

+ No trademark or publicity rights are granted. This license does NOT + give you any right, title or interest in the trademark SimCity or any + other Electronic Arts trademark. You may not distribute any + modification of this program using the trademark SimCity or claim any + affliation or association with Electronic Arts Inc. or its employees. +

+

+ + Any propagation or conveyance of this program must include this + copyright notice and these terms. +

+

+ + If you convey this program (or any modifications of it) and assume + contractual liability for the program to recipients of it, you agree + to indemnify Electronic Arts for any liability that those contractual + assumptions impose on Electronic Arts. +

+

+ + You may not misrepresent the origins of this program; modified + versions of the program must be marked as such and not identified as + the original program. +

+

+ + This disclaimer supplements the one included in the General Public + License. TO THE FULLEST EXTENT PERMISSIBLE UNDER APPLICABLE LAW, THIS + PROGRAM IS PROVIDED TO YOU "AS IS," WITH ALL FAULTS, WITHOUT WARRANTY + OF ANY KIND, AND YOUR USE IS AT YOUR SOLE RISK. THE ENTIRE RISK OF + SATISFACTORY QUALITY AND PERFORMANCE RESIDES WITH YOU. ELECTRONIC ARTS + DISCLAIMS ANY AND ALL EXPRESS, IMPLIED OR STATUTORY WARRANTIES, + INCLUDING IMPLIED WARRANTIES OF MERCHANTABILITY, SATISFACTORY QUALITY, + FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT OF THIRD PARTY + RIGHTS, AND WARRANTIES (IF ANY) ARISING FROM A COURSE OF DEALING, + USAGE, OR TRADE PRACTICE. ELECTRONIC ARTS DOES NOT WARRANT AGAINST + INTERFERENCE WITH YOUR ENJOYMENT OF THE PROGRAM; THAT THE PROGRAM WILL + MEET YOUR REQUIREMENTS; THAT OPERATION OF THE PROGRAM WILL BE + UNINTERRUPTED OR ERROR-FREE, OR THAT THE PROGRAM WILL BE COMPATIBLE + WITH THIRD PARTY SOFTWARE OR THAT ANY ERRORS IN THE PROGRAM WILL BE + CORRECTED. NO ORAL OR WRITTEN ADVICE PROVIDED BY ELECTRONIC ARTS OR + ANY AUTHORIZED REPRESENTATIVE SHALL CREATE A WARRANTY. SOME + JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF OR LIMITATIONS ON IMPLIED + WARRANTIES OR THE LIMITATIONS ON THE APPLICABLE STATUTORY RIGHTS OF A + CONSUMER, SO SOME OR ALL OF THE ABOVE EXCLUSIONS AND LIMITATIONS MAY + NOT APPLY TO YOU. +

+ + + \ No newline at end of file diff --git a/docs/inside.html b/docs/inside.html new file mode 100755 index 0000000..4702d17 --- /dev/null +++ b/docs/inside.html @@ -0,0 +1,412 @@ + + + + Inside The Simulator + + + + +

Inside The Simulator

+ +

How the Simulator Works and Strategies for Using It

+ + Many factors influence the chance of your city's prospering or + floundering: both internal factors (the structure and efficiency of + your city) and external factors (the regional economy, disasters, + etc.).

+ +

Zones

+ + Your city is divided up into three primary zones: residential, + commercial and industrial. These zones symbolize the three basic + pillars upon which a city is based: population, industry, and + commerce. All three are necessary for your city to grow and thrive. +

+ +

    + +
  • Residential Zones are where the Sims live. Here they build houses, + apartments and community facilities such as churches and schools. Sims + are the work force for your city's commercial and industrial zones. +

    + +

  • Industrial Zones are used to site warehouses, factories, and other + unsightly and polluting structures which have a negative impact on + surrounding zones. One of the major goals of planning is to separate + these "nuisances" from the areas where people live. In this + simulation, industrial zones represent the "basic" production of your + city. Things produced here are sold outside the city to an "external + market," bringing money into the city for future growth.

    + +

  • Commercial Zones represent the retail stores and services in your + city, including gas stations, grocery stores, banks, and offices. + Commercial areas are mainly dedicated to producing goods and services + needed within your city. This is called "non-basic" production or + production for the "internal market."

    + +

+

+ +

Population -- Residential

+ + The major factors controlling residential population are birthrate, + availability of jobs and housing, unemployment, and quality of life + within the city.

+ + Birthrate as used here, is actually a combination of the birthrate + (positive) and the deathrate (negative). Within Micropolis there is + always a positive birthrate. +

+ + Availability of jobs (the employment rate) is a ratio of the current + commercial and industrial populations to the total residential + population. As a rule of thumb, the number of commercial and + industrial zones together should roughly equal the number of + residential zones. +

+ + If there are more jobs in your city than residents, new settlers will + be attracted. If the job market declines during a local recession, + your people will migrate away in search of jobs. +

+ + Housing for your residents is built in the residential zones. These + zones must be powered and connected to the places of employment by + roads. The structures built in residential zones are influenced by + land value and population density. +

+ + Quality of life is a measure of relative "attractiveness" assigned to + different zone locations. It is affected by negative factors such as + pollution and crime, and positive factors such as parks and + accessibility. +

+ +

External Market -- Industrial

+ + There are thousands of variables that influence your city. All these + variables can be influenced by your actions with the exception of one. +

+ + The external market (the economic conditions that exist outside of + your city) is controlled by the simulation -- there is nothing you can + do to change it. In many ways, this external market is the original + source of all city growth. Towns frequently begin as production + centers (steel towns, refineries, etc.) that service a demand in the + surrounding region. As time passes, the external market grows to + reflect the regional growth going on around your city. +

+ + The industry in your city will attempt to grow as the external market + grows. For this to happen there must be room for expansion (more + industrial zones) and an adequate labor supply (more residential + zones). +

+ +

Internal Market -- Commercial

+ + The internal market is completely influenced by the conditions within + your city. Internal production, created in the commercial zones, + represents all the things which are purchased and consumed within the + city. Food stores, gas stations, retail stores, financial services, + medical care, etc. -- all depend on a nearby population to service. + Within Micropolis, the size of the internal market determines the rate at + which commercial zones will prosper. Commercial zones need enough + zoned land to build on and an existent, sufficient work force to + employ. The structures built in commercial zones are mainly influenced + by land value and population density.

+ + Commercial zones grow and develop to serve the expanding internal + market. Commercial growth will usually be slow at first, when the + population is small and needs very little. As your city grows, + commercial growth will accelerate and the internal market will become + a much larger consumer of your total city production. This + accelerating effect, when the external/industrial production is + overtaken by the accelerating internal/commercial sector, can turn a + sleepy little town of 50,000 into a thriving capital of 200,000 in a + few short years. +

+ +

Tax Rate

+ + The tax rate you set controls the amount of income generated by your + city. As taxes are collected each year (simulation time), the Budget + Window will appear, giving you the fiscal details of your city and a + chance to adjust rates. The simulation determines the amount of + revenue collected by assessing each zone an amount based on its land + value, current level of development and the current tax rate.

+ + The tax rate has a global affect on your city's growth rate. If you + set it low (0%-4%), growth will be brisk but the city income will be + low. If you set it high (10%-20%), you will collect a lot in the short + run but in the long run tax income will decrease along with the + population. You must keep tax income high enough to invest in new + development, but low enough not to scare off residents and businesses. + A high tax rate is one way to control city growth, should you want to + experiment with "growth control measures." +

+ +

Budgeting

+ + City budgeting affects the way your city grows. City infrastructure + cost is represented by three departments: police, fire, and + transportation. You may set the funding levels separately for each. + All three departments will request a certain level of funding each + year. You may supply all or part of the requested funds, in the + attempt to balance safety needs and budgetary concerns.

+ +

    + +
  • Police Department: Police stations lower the crime rate around a + territory. The effective radius of your police station is related to + the amount of funding allocated to the police department. Police + stations cost $100 per year to fund. + +
  • Fire Department: Fire stations prevent and extinguish fires. The + level of funding determines the effective radius of a fire station. + Fire stations put out fires within this radius much sooner than + outside it, and decrease the chance that they will start in the first + place. Fire stations cost $100 per year to fund. + +
  • Transportation Department:When you build roads and rail systems + you are charged for construction and yearly maintenance. The larger + your transportation network, the more it will cost for upkeep. If you + decide not to or are unable to pay this maintenance cost, roads will + slowly deteriorate and become unusable. The maintenance cost for each + piece is: Road - $1, Bridge - $4, Rail - $4, Rail tunnel - $10. + +
+ +

Power

+ + Electrical power makes modern cities possible. Efficient and reliable + power transmission to all zones is the goal of good "power + management."

+ + The entire power grid of your city is periodically checked in the + simulation for links to power. If a zone is connected (by other zones + or power lines) to a power plant, the zone is considered powered. +

+ + Zones must be powered for development to occur. Many things (such as + fires, tornadoes, earthquakes and bulldozers) can knock down power + lines and cause blackouts in parts of your city. Development will stop + in unpowered zones, and if power is not quickly restored, the zone + will decline back to its original state of emptiness. +

+ + Redundant power plants and power connections can make your power grid + more reliable, but running more line adds construction costs. +

+ +

Transportation -- Traffic

+ + One of the most important elements of city structure is the + transportation network. It moves Sims and good throughout your city. + Roads typically occupy as much as 25%-40% of the land in urban areas. + Traffic along these roads indicates which sections of your road system + are used the most.

+ + Traffic levels are simulated by a process known as "Trip Generation." + Over time, each populated zone in the city will generate a number of + trips, depending on the population. Each generated trip starts at the + origin zone, travels down the road, and if a "proper destination" is + reached, ends at the destination zone -- otherwise, the trip fails. + Trip failure indicates inaccessibility of a zone and limits its + growth. +

+ + The majority of generated trips represent people commuting to and from + work. Additional traffic is generated by residents traveling to + shopping, recreation, etc. When analyzing traffic, the simulator tests + the following traffic routes: +

+ + Traffic Patterns +

+ +

    + +
  • From Residential +
      +
    • To Commercial +
    • To Industrial +
    + +
  • From Commercial +
      +
    • To Residential +
    • To Industrial +
    + +
  • From Industrial +
      +
    • To Residential +
    + +
+ +

+ + When Sims drive away from an origin zone, they have a limited "trip + range" in which to find a destination zone. Heavy traffic decreases + the trip range. If the destination zone is too far away, the trip is + unsuccessful. Repeated unsuccessful trips will cause the Sims to move + out of the origin zone. +

+ + Each road has a limited capacity for traffic. When this capacity is + exceeded traffic jams will form. Traffic jams drastically lower the + capacity of a road, compounding the problem and frustrating drivers. +

+ + Traffic conditions fluctuate quickly. Avoid traffic problems by + providing several routes for the traffic to take. +

+ + A road must be adjacent to a zone for the zone to be connected to the + traffic pattern. Zones do not conduct traffic the way they conduct + power. +

+ +

Pollution

+ + Pollution levels are tracked in all areas of your city. This is a + general "nuisance level" that includes air and water pollution, noise + pollution, toxic wastes, etc. Pollution has a negative impact on the + growth of residential areas.

+ + The primary cause of pollution is industrialized zones. The level of + pollution created by an industrial zone increases with its level of + growth. +

+ + Traffic is another cause of pollution. There are limited means of + combating the pollution level. Lowering traffic density, limiting + industrial development, and separating the pollution from the + residential areas will help. +

+ +

Crime

+ + Crime rates are influenced by population density, local law + enforcement, and land values. As population density increases in an + area, the number of crimes committed increases. Crime will also + increase in areas of low land value.

+ + The most effective way to deal with high crime rates is to introduce a + police station into the area. Based on its level of funding, the + police station will reduce the rate of crime in its sphere of + influence. A long-term approach to lowering crime is to raise the land + value of the area. One way to do this is to demolish and rezone (urban + renewal). +

+ +

Land Value

+ + Land value is one of the most fundamental aspects of urban structure. + The land value of an area affects how that area is used. In this + simulation the land value of an area is based on terrain, + accessibility, pollution, and distance to downtown.

+ + The farther the residents have to go to work, the lower the land value + where they live, due in part to transportation costs. The value of + commercial zones depends greatly on accessibility by the populace. +

+ + Land value is also affected by surrounding terrain. If land is closer + to water, trees, agricultural areas, or parks, its value will rise. + Creative placement of zones within the terrain, with little + bulldozing, can make good use of this natural advantage. +

+ + Land value and crime rate have a feedback effect on each other. Lower + land values cause crime rates to rise. Higher crime rates cause land + values to drop, and can cause "transition areas" near your central + city to rapidly decline in value. +

+ +

+ +


+

+

Micropolis, Unix Version.

+ This game was released for the Unix platform + in or about 1990 and has been modified for inclusion in the One Laptop + Per Child program. Copyright © 1989 - 2007 Electronic Arts Inc. If + you need assistance with this program, you may contact: + http://wiki.laptop.org/go/Micropolis or email micropolis@laptop.org. +

+

+ + This program 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. +

+

+ + This program 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 this program. If + not, see http://www.gnu.org/licenses/. +

+

+ +

ADDITIONAL TERMS per GNU GPL Section 7

+ +

+

+ No trademark or publicity rights are granted. This license does NOT + give you any right, title or interest in the trademark SimCity or any + other Electronic Arts trademark. You may not distribute any + modification of this program using the trademark SimCity or claim any + affliation or association with Electronic Arts Inc. or its employees. +

+

+ + Any propagation or conveyance of this program must include this + copyright notice and these terms. +

+

+ + If you convey this program (or any modifications of it) and assume + contractual liability for the program to recipients of it, you agree + to indemnify Electronic Arts for any liability that those contractual + assumptions impose on Electronic Arts. +

+

+ + You may not misrepresent the origins of this program; modified + versions of the program must be marked as such and not identified as + the original program. +

+

+ + This disclaimer supplements the one included in the General Public + License. TO THE FULLEST EXTENT PERMISSIBLE UNDER APPLICABLE LAW, THIS + PROGRAM IS PROVIDED TO YOU "AS IS," WITH ALL FAULTS, WITHOUT WARRANTY + OF ANY KIND, AND YOUR USE IS AT YOUR SOLE RISK. THE ENTIRE RISK OF + SATISFACTORY QUALITY AND PERFORMANCE RESIDES WITH YOU. ELECTRONIC ARTS + DISCLAIMS ANY AND ALL EXPRESS, IMPLIED OR STATUTORY WARRANTIES, + INCLUDING IMPLIED WARRANTIES OF MERCHANTABILITY, SATISFACTORY QUALITY, + FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT OF THIRD PARTY + RIGHTS, AND WARRANTIES (IF ANY) ARISING FROM A COURSE OF DEALING, + USAGE, OR TRADE PRACTICE. ELECTRONIC ARTS DOES NOT WARRANT AGAINST + INTERFERENCE WITH YOUR ENJOYMENT OF THE PROGRAM; THAT THE PROGRAM WILL + MEET YOUR REQUIREMENTS; THAT OPERATION OF THE PROGRAM WILL BE + UNINTERRUPTED OR ERROR-FREE, OR THAT THE PROGRAM WILL BE COMPATIBLE + WITH THIRD PARTY SOFTWARE OR THAT ANY ERRORS IN THE PROGRAM WILL BE + CORRECTED. NO ORAL OR WRITTEN ADVICE PROVIDED BY ELECTRONIC ARTS OR + ANY AUTHORIZED REPRESENTATIVE SHALL CREATE A WARRANTY. SOME + JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF OR LIMITATIONS ON IMPLIED + WARRANTIES OR THE LIMITATIONS ON THE APPLICABLE STATUTORY RIGHTS OF A + CONSUMER, SO SOME OR ALL OF THE ABOVE EXCLUSIONS AND LIMITATIONS MAY + NOT APPLY TO YOU. +

+ + + \ No newline at end of file diff --git a/docs/intro.html b/docs/intro.html new file mode 100755 index 0000000..ea5bafc --- /dev/null +++ b/docs/intro.html @@ -0,0 +1,273 @@ + + + + Introduction + + + + +

Introduction

+ +

Foreword

+ + Enter Micropolis and take control. Be the undisputed ruler of a + sophisticated real-time City Simulation. Become the master of existing + cities such as San Francisco, Tokyo, and Rio de Janeiro, or create + your own dream city (or nightmare slum) from the ground up.

+ + Whether you take over an existing city or build your own, you are the + Mayor and City Planner with complete authority. +

+ + Your city is populated by Sims -- Simulated Citizens. Like their human + counterparts, they build houses, condos, churches, stores and + factories. And, also like humans, they complain about things like + taxes, mayors, taxes, city planners, and taxes. If they get unhappy, + they move out; you collect fewer taxes, the city deteriorates. +

+ + The next few sections will explain the overall concept of Micropolis and + give information that will help you win Scenarios and design and build + better cities. +

+ +

About System Simulations

+ + Micropolis is the first of a new type of entertainment/educational + software, called System Simulations. We provide you with a set of + Rules and Tools that describe, create and control a system. In the + case of Micropolis the system is a city.

+ + The challenge of playing a System Simulation game is to figure out how + the system works and take control of it. As master of the system, you + are free to use the Tools to create and control an unlimited number of + systems (in this case, cities) within the framework and limits + provided by the Rules. +

+ +

Rules

+ + In Micropolis, the Rules to learn are based on city planning and + management, including:

+ +

    + +
  • Human Factors: Residential space and amenities, availability of + jobs, and quality of life. + +
  • Economic Factors: Land value, industrial and commercial space, + unemployment, internal and external markets, electric power, taxation, + and funding for city services. + +
  • Survival Factors: Strategies for dealing with disasters, crime, + and pollution. + +
  • Political Factors: Public opinion, zoning, and keeping residents + and businesses satisfied with your city and your performance. + +
+

+ +

Tools

+ + The Tools provide you with the ability to plan, lay out, zone, build, + bulldoze, re-zone, and manage a city.

+ +

    + +
  • Plan: Mapping systems give physical and demographic overviews of + the entire city. + +
  • Layout: Design living and working areas, road and transit systems, + and recreational areas. + +
  • Zone: Set zoning boundaries for parks, residential, commercial and + industrial areas. + +
  • Build: Place roads, rails, airports, seaports, fire and police + stations, sports stadiums, and power plants. + +
  • Bulldoze: Clear forests for city growth, build landfill along + waterways, clear and re-zone developed areas. + +
  • Manage: Using the mapping and graphing systems, gather up-to-date + information on traffic density, population trends, power grid status, + pollution, crime, land value, police and fire department efficiency, + and cash flow. Set the tax rate and funding levels for city services. + +
+

+ + But the most important Tool of all is the Simulator itself. Test your + plans and ideas as you watch the city grow or shrink through the + immigration and emigration of industrious Simulated Citizens. Sims + will move in and build homes, hospitals, churches, stores and + factories in the zones you provide, or move out in search of jobs or a + better life elsewhere. The success of the city is based on the quality + of the city you design and manage. +

+ +

Simulator Reaction Time

+ + The simulator is a very complex multi-tasking piece of software. It is + constantly performing many checks, calculations, and updates, as well + as keeping watch on the mouse and keyboard to respond to your demands. + When you load in a city, give the simulator some time to compile its + data and update the maps, graphs, population levels, etc. Some of the + other times when the simulator lags behind you are when powering zones + and updating the city services map after installing police and fire + stations.

+ +

The Goals of Micropolis

+ + There are many goals to be pursued and reached in Micropolis.

+ +

Scenarios

+ + Each of the eight included scenarios is actually a game in itself, + with an unlimited number of ways to win -- or lose.

+ + Each Scenario is a city which is either the victim of horrible + planning or about to be the victim of a natural disaster. After you + load in a Scenario, you will have a limited amount of time to correct + or repair the problems. If you are successful, you will be given the + key to the city. If not, you may be ridden out of town on a rail. +

+ + If one strategy doesn't work, try another. There are a million stories + in each city, and you write them. +

+ +

Your Dream City

+ + Perhaps the main goal of Micropolis is for you to design, manage and + maintain the city of your dreams.

+ + Your ideal place to live may be a bustling megalopolis, lots of + people, lots of cars, tall buildings: high-energy, high density + living. Or it may be a small rural community, or a linked group of + small communities providing slow-paced country living. +

+ + As long as your city can provide places for people to live, work, shop + and play, it will attract residents. And as long as traffic, + pollution, overcrowding, crime or taxes don't drive them away, your + city will live. +

+ +

Getting Started

+ +

Micropolis Requirements

+ + Micropolis requires an Intel processor running the Linux operating + system, with the X11 window system installed, a 16 bit deep color graphics display, + a kernel with the shared memory option enabled, + and at least 32 megabytes of memory.

+ +

Micropolis Features

+ +

On-Line Help

+ + You can get help on the Micropolis user interface, by pointing the mouse + at anything mysterious, holding down shift, and clicking the left button. + The Help window will pop up, giving instructions and useful hints on how + to use the controls.

+ +

Multiple Views

+ + You can open up any number of animated city maps and editors at once.

+ +

Pie Menus

+ + Micropolis features pop up "pie menus" for quickly selecting city editing tools. + Pie menus are radial menus with their choices in different directions, + and they're very fast and efficient to use. + Since you change editing tools quite often while building a city, + you can save much time and effort by using the pie menu shortcuts + instead of the moving back and forth to the tool pallet. +

+ +

+ +


+

+

Micropolis, Unix Version.

+ This game was released for the Unix platform + in or about 1990 and has been modified for inclusion in the One Laptop + Per Child program. Copyright © 1989 - 2007 Electronic Arts Inc. If + you need assistance with this program, you may contact: + http://wiki.laptop.org/go/Micropolis or email micropolis@laptop.org. +

+

+ + This program 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. +

+

+ + This program 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 this program. If + not, see http://www.gnu.org/licenses/. +

+

+ +

ADDITIONAL TERMS per GNU GPL Section 7

+ +

+

+ No trademark or publicity rights are granted. This license does NOT + give you any right, title or interest in the trademark SimCity or any + other Electronic Arts trademark. You may not distribute any + modification of this program using the trademark SimCity or claim any + affliation or association with Electronic Arts Inc. or its employees. +

+

+ + Any propagation or conveyance of this program must include this + copyright notice and these terms. +

+

+ + If you convey this program (or any modifications of it) and assume + contractual liability for the program to recipients of it, you agree + to indemnify Electronic Arts for any liability that those contractual + assumptions impose on Electronic Arts. +

+

+ + You may not misrepresent the origins of this program; modified + versions of the program must be marked as such and not identified as + the original program. +

+

+ + This disclaimer supplements the one included in the General Public + License. TO THE FULLEST EXTENT PERMISSIBLE UNDER APPLICABLE LAW, THIS + PROGRAM IS PROVIDED TO YOU "AS IS," WITH ALL FAULTS, WITHOUT WARRANTY + OF ANY KIND, AND YOUR USE IS AT YOUR SOLE RISK. THE ENTIRE RISK OF + SATISFACTORY QUALITY AND PERFORMANCE RESIDES WITH YOU. ELECTRONIC ARTS + DISCLAIMS ANY AND ALL EXPRESS, IMPLIED OR STATUTORY WARRANTIES, + INCLUDING IMPLIED WARRANTIES OF MERCHANTABILITY, SATISFACTORY QUALITY, + FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT OF THIRD PARTY + RIGHTS, AND WARRANTIES (IF ANY) ARISING FROM A COURSE OF DEALING, + USAGE, OR TRADE PRACTICE. ELECTRONIC ARTS DOES NOT WARRANT AGAINST + INTERFERENCE WITH YOUR ENJOYMENT OF THE PROGRAM; THAT THE PROGRAM WILL + MEET YOUR REQUIREMENTS; THAT OPERATION OF THE PROGRAM WILL BE + UNINTERRUPTED OR ERROR-FREE, OR THAT THE PROGRAM WILL BE COMPATIBLE + WITH THIRD PARTY SOFTWARE OR THAT ANY ERRORS IN THE PROGRAM WILL BE + CORRECTED. NO ORAL OR WRITTEN ADVICE PROVIDED BY ELECTRONIC ARTS OR + ANY AUTHORIZED REPRESENTATIVE SHALL CREATE A WARRANTY. SOME + JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF OR LIMITATIONS ON IMPLIED + WARRANTIES OR THE LIMITATIONS ON THE APPLICABLE STATUTORY RIGHTS OF A + CONSUMER, SO SOME OR ALL OF THE ABOVE EXCLUSIONS AND LIMITATIONS MAY + NOT APPLY TO YOU. +

+ + + \ No newline at end of file diff --git a/docs/reference.html b/docs/reference.html new file mode 100755 index 0000000..5e15768 --- /dev/null +++ b/docs/reference.html @@ -0,0 +1,1300 @@ + + + + User Reference + + + + +

User Reference Guide: Controlling Micropolis

+ +

Getting Help

+ + If you wonder about a control or graphic in Micropolis, you can point at + it with the cursor, hold down shift and click the left button, + to bring up a helpwindow describing it.

+ +

Using the Mouse

+ + In Micropolis, you will primarily use the left mouse button to edit the city. + The main function of the right mouse button is to select from pie menus. + The middle button is used to scroll the view in the Edit Window.

+ + Clicking a mouse button means to press and release it without moving. + Dragging means to press and hold the button, move the mouse, then + release the button. +

+ +

Pie Menus

+ + Pie menus are designed to be very fast and efficient to use. + You can pop up a pie menu by pressing and holding the right button, + then select from it by moving in the direction of the item you want, + then releasing the button.

+ + Once you are familiar with the directions, you can use pie menus very + quickly by smoothly pressing the right button down, + moving in the direction you want, and releasing. + If you do this without stopping, + the pie menu will not even display on the screen -- + you will just hear the name of the item spoken, + to remind you of the selection. + The more you use pie menus, the easier they are to use. + See how fast you can get! +

+ +

Micropolis Chooser Window

+ + This window lets you select which city to simulate. + You can see what the selected city looks like in the map window. + Give your city a name by typing it into the Name text field.

+ + Click on "New City" to generate a random map to start a city from scratch. + Click on "Load City" to load a saved city from disk. +

+ + You can go back and forth between your previously selected cities + with the "Previous Map" and "Next Map" buttons. +

+ + Click on any of the Scenario buttons to play any of the eight scenarios. + When you click on any of those buttons, the city is displayed in the Micropolis Map Window. + + The Scenarios provide both real and hypothetical problems for you to + deal with in seven famous (and one not-so-famous) cities. They present + various levels of difficulty. Some problems are in the form of + disasters which will occur some time after you start. Other problems + are more long-term, such as crime. +

+ + Your task is to deal with the problem at hand as well as possible + under the circumstances. After a certain amount of time the city + residents will rate your performance in a special election. If you do + very well you may be given the key to the city. However, if you do + poorly, they just might run you out of town. +

+ +

    + +
  • Dullsville, USA 1900 -- Boredom +

    + + Things haven't changed much around here in the last hundred years and + the residents are beginning to get bored. They think Dullsville could + be the next great city with the right leader. It is your job to + attract new growth and development, turning Dullsville into a + Metropolis by the 21st century. +

    + +

      +
    • Difficulty: Easy +
    • Time Limit: 30 years +
    • Win Condition: Metropolis +
    + +
  • San Francisco, CA 1906 -- 8.0 Earthquake +

    + + Damage from the earthquake was minor compared to that of the ensuing + fires, which took days to control. 1500 people died. Controlling the + fires should be your initial concern here. Afterwards, clearing the + remaining rubble will allow the city to start rebuilding. +

    + +

      +
    • Difficulty: Very difficult +
    • Time Limit: 5 years +
    • Win Condition: Metropolis +
    + +
  • Hamburg, Germany 1944 -- Fire +

    + + Allied fire-bombing of German cities in WWII caused tremendous damage + and loss of life. People living in the inner cities were at greatest + risk. You must control the firestorms during the bombing and then + rebuild the city after the war. +

    + +

      +
    • Difficulty: Very difficult +
    • Time Limit: 5 years +
    • Win Condition: Metropolis +
    + + Bern, Switzerland 1965 -- Traffic +

    + + The roads here are becoming more congested every day, and the + residents are upset. They demand that you do something about it. Some + have suggested a mass transit system as the answer, but this would + require major rezoning in the downtown area. +

    + +

      +
    • Difficulty: Easy +
    • Time Limit: 10 years +
    • Win Condition: Low Average Traffic Density +
    + + Tokyo, Japan 1957 -- Monster Attack +

    + + A large reptilian creature has been spotted heading for Tokyo bay. It + seems to be attracted to the heavy levels of industrial pollution + there. Try to control the fires, then rebuild the industrial center. +

    + +

      +
    • Difficulty: Moderately difficult +
    • Time Limit: 5 years +
    • Win Condition: City Score above 500 +
    + + Rio de Janeiro, Brazil 2047 -- Flood +

    + + In the mid-21st century, the greenhouse effect raised global + temperatures 6 degrees F. Polar ice caps melted and raised sea levels + worldwide. Coastal areas were devastated by flood and erosion. + Unfortunately, some of the largest cities in the world are located on + the coast. +

    + +

      +
    • Difficulty: Moderately difficult +
    • Time Limit: 10 years +
    • Win Condition: City Score above 500 +
    + + Boston, MA 2010 -- Nuclear Meltdown +

    + + A major meltdown is about to occur at one of the new downtown nuclear + reactors. The area in the vicinity of the reactor will be severely + contaminated by radiation, forcing you to restructure the city around + it. +

    + +

      +
    • Difficulty: Very difficult +
    • Time Limit: 5 years +
    • Win Condition: City Score above 500 +
    + + Detroit, MI 1927 -- Crime +

    + + By 1970, competition from overseas and other economic factors pushed + the once "automobile capital of the world" into recession. Plummeting + land values and unemployment then increased crime in the inner-city to + chronic levels. You have just been elected after promising to reduce + crime and rebuild the industrial base of the city. +

    + +

      +
    • Difficulty: Moderately difficult +
    • Time Limit: 10 years +
    • Win Condition: Low Average Crime Density +
    + + You can select the Game Level from the radio buttons (Easy / Medium / Hard). + Once a city is started, you cannot change the Game Level; + it remains at your initial setting for the life of the city. + The current Game Level is displayed in the evaluation window.

    + + This level -- Easy, Medium, or Hard -- adjusts the simulation to your + current abilities by altering several factors. A harder setting will + increase the chance of disasters, make residents more intolerant of + taxation, cause maintenance costs to grow, etc. +

    + + Once you have decided which city you want to play, press "Use This Map" and Micropolis will come to + life! +

    + +

    Micropolis Controls Window

    + + This window contains the main controls to Micropolis, status displays, and a scrolling text message log. + At the top is a row of menus that are enabled when the game is playing. + Beneath that is a status display panel showing the date and the current funds on the left. + In the middle is a graph and bar display of the Residential, Commercial and Industrial rates and demands. + On the right is an icon of the Micropolis simulation machine, + with a red screen when paused and green screen when running. + The bottom half of the window is occupied by a scrolling text window, + that Micropolis uses to display important messages. +
      + +
    • Menu Bar + +
        + +
      • Micropolis Menu + +
          + +
        • About...
          + Display fascinating and vital information about Micropolis. + +
        • Save City
          + Write the city to a file. + +
        • Save City As...
          + Save the city with a new file name. + +
        • Choose City!
          + Generate a new city, select a scenario or load a pre-existing city. + +
        • Quit Playing!
          + Exit Micropolis and go back to the real world. + +
        + +
      • Options Menu + +
          +
        • Auto Budget
          + Keeps your budget at the same level (or fully funded) + without asking for approval every year. + If there isn't enough money to meet the budget, + then funds will be allocated first to the Transit system, + then to the Fire Department, then to the Police. + If your city runs out of money, + the budget window comes up at the end of + the year anyway, and Auto Budget is turned off. +
        • Auto Bulldozer
          + Allows you to place zones, roadways, etc., + directly on top of trees, shoreline, power lines, and rubble, + without manually bulldozing first. + You will be charged the same amount as for manual bulldozing. +
        • Disasters
          + Enables or disables random disasters. + If disasters are disabled, you can still select them manually + from the Disasters Menu. +
        • Sound
          + Toggles the city sounds on and off. + Preserves the sanity and good will of those who have to work in the same room. +
        • Animation
          + Toggles tile animations on and off. + +
        + +
      • Disasters Menu
        + The Disasters Menu allows you to set natural (and unnatural) disasters + loose on your city. Use these disasters to test your ability to deal + with emergencies in your city or just to release some aggression. More + information on disasters, their causes, and dealing with them is + presented later.

        + + Disasters will randomly occur as you play Micropolis. At higher game + levels the disasters will happen more often. Most disasters can be + activated from the Disasters Menu. Random disasters can be eliminated + by turing off the Disasters setting of the Options Menu. +

        + +

      • Shipwreck: Shipwrecks can occur once you have an operating + seaport. They can cause fires where the ship crashes into a shore or + bridge. Shipwrecks are not available on the Disasters Menu.

        + +

          +
        • Monster
          + Sets a monster loose on your city.

          + + Monster Attacks are provoked by high levels of + pollution. A monster destroys everything in its path, starts fires, + and causes planes, helicopters, trains, and ships to crash. +

          + +

        • Fire
          + Starts a fire somewhere on the map.

          + +

        • Fires can start anywhere in the city. Fires spread fairly + rapidly through forests and buildings, somewhat slower over roadways. + Fire will not cross water or clear land.

          + + The effectiveness of the fire department (which can be viewed in the + Map Window) is based on how close it is to the fire, its funding + level, and its transit access. Fires inside this effective radius will + be extinguished automatically. If you have no operational fire + departments in the area you can try to control the fire yourself. + Since fire will not spread across clear terrain, you can build fire + breaks with the bulldozer. Just surround the fire with clear areas and + it will stop spreading and eventually burn itself out. You cannot + directly bulldoze a fire. +

          + +

        • Flood
          + Causes a flood to occur near the water.

          + + Floods gradually spread and + destroy buildings and utilities. After a while the flood waters + recede, leaving behind cleared terrain. +

          + +

        • Meltdown
          + If there's a nuclear power plant, this spills Irn-Bru + in the control room, causing a meltdown.

          + + Meltdowns are only possible if you are using a nuclear + power plant. If a meltdown occurs, your nuclear plant will explode + into flames. The surrounding area will be unusable for the remainder + of the simulation due to radioactive contamination. +

          + +

        • Tornado
          + Causes a tornado to appear somewhere on the map.

          + + Tornados can occur anywhere on the map at any time. Very + fast and unpredictable, they can appear and disappear at a moment's + notice. Tornados destroy everything in their path, and can cause + planes, helicopters, trains, and ships to crash. +

          + +

        • Earthquake
          + Causes a MAJOR earthquake.

          + + Earthquakes are the most devastating disaster. This is + a Major earthquake -- between 8.0 and 9.0 on the Richter Scale. It + will destroy buildings and start fires. The initial damage will vary + with the severity of the earthquake, and the eventual fire damage + depends on your fire-control efforts. +

          + + + When an Earthquake occurs, the Edit Window will shake for a while. + When it stops you will have to take charge and control the scattered + fires. Use the bulldozer to contain the largest fires first and work + your way down to the smaller ones. +

          + +

        • Clipper
          + The Clipper disaster violates the privacy of your simulated citizens, + and encrypts the city so only the NSA can decode it.

          + + Do not use this unless you work for the National Security Agency, + and routinely subvert the Constitution of the United States + by spying on American citizens with the Echelon Surveillance System. +

          + +

        +
      • Time Menu +
          +
        • Pause
          + Stops the passage of time entirely. +
        • Slow
          + Months pass by slowly. +
        • Medium
          + Months pass by normally. +
        • Fast
          + Months pass by fast. + +
        +
      • Priority Menu +
          +
        • Flat Out!
          + Micropolis runs really fast, hogging the CPU. +
        • Zoom Zoom
          + Micropolis runs pretty fast, but leaves some time for other programs. +
        • Buzz Buzz
          + Micropolis runs fairly quickly. +
        • Putter Putter
          + Micropolis runs slower. +
        • Snore Snore
          + Micropolis runs very slowly. + +
        +
      • Windows Menu +
          +
        • Budget
          + Open the Budget Window. + The simulation is paused as long as the budget window is open. +
        • Evaluation
          + Open the Evaluation Window. +
        • Graph
          + Open the Graph Window. +
        • Map
          + Open the Map Window. +
        • Editor
          + Open the Editor Window. +
        • Frob
          + Open the Frob-O-Matic Window. +
        • Map Copy
          + Open another copy of the Map Window. +
        • Editor Copy
          + Open another copy of the Editor Window. + +
        +
      + +
    • Status Panel +
        +
      • License Owner Name
        +
      • Date
        +
      • Funds
        +
      • Residential, Commercial, Industrial History Graph
        +
      • Residential, Commercial, Industrial Demand Chart
        + The Demand Indicator shows the demand levels for Residential (green), + Commercial (blue), and Industrial zones (yellow), and can be helpful + in planning your city. +
      • Micropolis Simulator Icon
        +
      • Scrolling Text Message Window
        +
      • Text Input Field
        +
      +
    + + + +

    Micropolis Edit Window Window

    + + This is where all actual zoning and building takes place. +

    + +

    Terrain

    + + There are three types of terrain in the Edit Window: Open Land, Trees, + and Water.

    + + Open Land is where you can zone and build. It is shown as brown with + dark brown speckles. +

    + + Trees and Forests are shown as green, with dark green speckles. You + cannot zone or build on trees. You may bulldoze trees and forests to + turn them into clear land. While some bulldozing is necessary, + clearing away too much green area will result in lower property + values. +

    + + Water is shown as blue, with dark blue speckles. You cannot zone or + build on water. You must bulldoze coastlines to create landfills + before you can build or zone there. +

    + +

    Edit Window Gadgets

    + + The Edit Window is where you will do the actual building and zoning. + In the middle of the Edit Window is a detailed map showing part of the + terrain. Around the edges are controls and fields displaying + information about the city.

    + + There is a row of Menu Buttons on the left below the title. + The Display menu lets you select how often the display is drawn. + The Options menu lets you turn on and off certain view specific features. +

    + + To the right of the menu buttons, important messages are displayed. + Below the menu bar is a tool pallet. + The palette displays the name and cost of the currently selected tool, + above an menu of colorful icons, + used for choosing the city editing mode. + Click the mouse over an icon to select an editing tool. + The currently selected tool is highlighted, + and its name and cost is displayed at the top of the panel, + and spoken. +

    + + You can use the selected tool by pressing the left mouse button over + the map in the middle of the Edit Window. Also, you can pop up a Pie + Menu to quickly switch between editing tools, by clicking the right + mouse button over the map. +

    + + You can easily scroll the map by pressing the middle mouse button down + over the map and dragging the view around. +

    + +

    Edit Window Icons

    + + You can select an icon from the Tool Icon pallet to use a city editing tool. + When an icon is selected, a rectangle will accompany the cursor + when it's over the map, to indicate the area the tool will effect. +

    + +

      + +
    • Query Tool (question mark)
      + Shows the Zone Status Window, + describing the population density, value, crime rate, pollution, + and growth rate of the zone under the cursor. + It doesn't cost anything to use.

      + +

    • Bulldozer
      + Clears trees and forests, creates landfill along the water, + and levels developed, existing zones and clears rubble caused by disasters. + The Auto Bulldoze option works on natural terrain, power + lines and rubble, but not on zones, roads and rails.

      + + It costs $1 for each square tile bulldozed. Knocking down a 3x3 zone + costs $9 since it's made up of nine tiles. You're automatically + charged $1 for each non-empty tile that you Auto Bulldoze. +

      + +

    • Road
      + Connect developed areas. + Intersections and turns are automatically created. + Lay continuous roads by pressing the left mouse button and dragging your cursor. + Be careful -- if you accidentally lay a road in the wrong place, + you will have to pay for bulldozing and rebuilding.

      + + Roads may not be placed over zoned areas. They may be placed over + trees, shrubbery, and shoreline only after bulldozing or activating + the Auto Bulldoze function from the Options Menu. Roads can cross over + power lines and rails only at right angles. +

      + + Holding down the Control key while laying roads will constrain them to + a straight line. +

      + + Laying roads across water creates a bridge. Bridges can only be built + in a straight line -- no curves, turns or intersections. Shorelines + must be bulldozed prior to building a bridge, unless the Auto Bulldoze + function from the Options Menu is active. +

      + + Roadways are maintained by the transit budget, and wear out if there + is a lack of funding. The amount of yearly funding requested by the + transportation department is $1 for each section of road, $4 for each + section of bridge. +

      + + It costs $10 to lay one section of road and $50 to lay one section of + bridge. +

      + +

    • Power Lines
      + Carry power from power plants to zoned land and between + zones. All developed land needs power to function. Power is conducted + through adjacent zones. Unpowered zones display the flashing lightning + bolt symbol. There is a delay between the time you connect power to a + zone and when the flashing symbol disappears. The delay grows longer + as the city grows larger.

      + + Power lines cannot cross zoned land. They can be built over trees, + shrubbery, and shoreline only after bulldozing, or activating the Auto + Bulldoze function from the Options Menu. +

      + + Junctions and corners are automatically created. Lay continuous power + lines by pressing the left mouse button down and dragging your cursor. + Power lines across water must be horizontal or vertical -- no turn, + curves or intersections. Power lines consume some power due to + transmission inefficiencies. +

      + + Holding down the Control key while laying power lines will constrain + them to a straight line. +

      + + It costs $5 to lay one section of power line on land, $25 on water. +

      + +

    • Transit Lines
      + Create a railway system for intra-city mass transit. + Place tracks in heavy traffic areas to help alleviate congestion.

      + + Intersections and turns are created automatically. Lay continuous + transit lines by pressing the left mouse button down and dragging with + your cursor. Tracks laid under rivers will appear as dashed lines. + These are underwater tunnels, and must be vertical or horizontal -- no + turns, curves or intersections. +

      + + Holding down the Control key while laying tracks will constrain them + to a straight line. +

      + + Transit lines are maintained by the transit budget. The level of + funding affects the efficiency of the system. The amount of yearly + funding requested by the transportation department is $4 for each + section of rail, and $10 for each section of tunnel. +

      + + It costs $20 per section of track laid on land, + $100 per section under water. +

      + +

    • Parks
      + Can be placed on clear land. Parks, like forests and water, + raise the land value of surrounding zones. Parks can be bulldozed as + fire breaks or reserve space for later mass transit expansion.

      + + Holding down the Control key while building parks will constrain them + to a straight line. +

      + + It costs $10 to zone one park. +

      + +

    • Residential Zones
      + Where the Sims live, build houses, apartments + and community facilitieslike hospitals and churches.

      + + Most residential zones develop into one of four classes: lower, + middle, upper, and high. They can range in population density from + single-family homes to high-rise apartments and condominiums. Some + residential zones will automatically develop into churches and + hospitals. +

      + + Factors influencing residential value and growth are pollution, + traffic density, population density, surrounding terrain, roadway + access, parks and utilities. +

      + + It costs $100 to zone one plot of land as residential. +

      + +

    • Commercial Zones
      + Used for many things, including retail stores, + office buildings, parking garages and gas stations.

      + + There are four values for commercial property, and five levels of + growth, from the small general store to tall skyscrapers. Factors + influencing the value and growth of commercial areas include internal + markets, pollution, traffic density, residential access, labor supply, + airports, crime rates, transit access and utilities. +

      + + It costs $100 to zone one plot of land as commercial. +

      + +

    • Industrial Zones
      + For heavy manufacturing and industrial services. + There are four levels of industrial growth, from small pumping + stations and warehouses to large factories.

      + + Factors influencing industrial growth are external markets, seaports, + transit access, residential access, labor supply and utilities. +

      + + It costs $100 to zone one plot of land as industrial. +

      + +

    • Police Departments
      + Lower the crime rate in the surrounding area. + This in turn raises property values. Place these in high-density crime + areas, as defined by your Crime Rate Map. The efficiency of a station + depends on the level of police department funding and transit access. +

      + + It costs $500 to build a police station. Full yearly maintenance of + each Police Station is $100. +

      + +

    • Fire Departments
      + Make surrounding areas less susceptible to fires. + When fires do occur, they are put out sooner and do less damage if a + station is near. The effectiveness of fire containment depends on the + level of fire department funding and transit access.

      + + It costs $500 to build a fire station. Full yearly maintenance of each + fire station is $100. +

      + +

    • Stadiums
      + Encourage residential growth, once a city has become fairly + large. You may build a stadium in a smaller city without negative (or + positive) effect. Stadiums indirectly generate a lot of revenue, but + create a lot of traffic. Properly maintaining a stadium requires a + good road and transit network.

      + + It costs $3000 to build a stadium. +

      + +

    • Power Plants
      + Can be Coal or Nuclear. + The nuclear plant is more powerful but carries a slight risk of meltdown. + The coal plant is less expensive, but less powerful and it pollutes. +

      + + All zoned land needs power to develop and grow. When developed land + loses power, it will degenerate to an undeveloped zone unless power is + restored. Connecting too many zones to a power plant causes brownouts. +

      + + Coal power plants cost $3000 to build, and supply enough energy for + about 50 zones. Nuclear power plants cost $5000 and supply electricity + for about 150 zones. +

      + +

    • Seaports
      + Increase the potential for industrial growth. They have + little effect in a small city, but contribute a lot to + industrialization in a large city.

      + + Seaports should be placed on a shoreline. The shoreline must be + bulldozed prior to zoning a Seaport, unless Auto Bulldoze is active. + Once the port is operational you may see ships in the water. +

      + + It costs $5000 to zone land for use as a seaport. +

      + +

    • Airports
      + Increase the growth potential of your commercial markets. + Once a city starts getting large, commercial growth will level off + without an airport. Airports are large and expensive and should not be + built unless your city can afford one. Position airports to keep + flight paths over water whenever possible, lessening the impact of air + disasters.

      + + Once you build an airport you will see planes flying above your city + to and from the airport. There is also a traffic helicopter that + alerts you to heavy traffic areas. +

      + + It costs $10,000 to zone land for use as an airport. +

      + +

    + +

    Micropolis Budget Window

    + + When your first taxes are collected in a new city, and each year + after, the Budget Window will appear (unless you select the Auto + Budget option). You will be asked to set the funding levels for the + fire, police, and transportation departments, and to set the property + tax rate.

    + + The Budget Window can be opened from the Windows Menu. When Auto + Budget is active, all the funding levels will remain at full funding, + or your last setting. If there is not enough money to completely fund + the budget, money will go first to the Transit Department, then the + Fire Department, then the Police Department. +

    + + You can raise and lower the tax rate and budget levels by + dragging the sliders corresponding to each category. + Press the button labeled "Continue With These Figures" + to make the Budget Window disappear. +

    + + When the Budget Window opens up, + a timer in the bottom button starts running. + When it runs out, the Budget Window automatically goes + with the currently selected figures and disappears. + You can click on the timer button to cancel it, + and the Budget Window will stay up for as long as you like. +

    + +

    Tax Rate

    + + The maximum tax rate you can set is 20%.

    + + The minimum tax rate you can set is 0%. +

    + + The optimum tax rate for fast growth is between 5% and 7%. +

    + + To slow city growth without actually shrinking, set the tax rate to 8% or 9%. +

    + +

    Funding Levels

    + + The amount of yearly funding requested for the fire and police + departments is $100 per station that you have placed. Until you + actually build fire or police stations, you cannot fund them. You + cannot allocate more than 100% of the requested funding for fire and + police departments -- Micropolis police officers and fire inspectors are + honest and will not accept your bribes.

    + + Allocating less than the requested amount will decrease the effective + coverage of the police or fire stations. +

    + + The amount of yearly funding requested for the transportation + department is $1 for each section of road, $4 for each section of + bridge (roads over water), $4 for each section of rail, and $10 for + each section of tunnel (underwater rails). You cannot allocate more + than 100% of the requested funds. +

    + + Transportation maintenance funding slightly below 100% will cause + slow, minor deterioration of the transit system -- an occasional + pothole or bad track section. Funding between 90% and 75% will cause + noticeable damage -- many sections of road and rail will be unusable. + Funding below 75% will cause rapid deterioration of your transit + system. +

    + +

    Cash Flow

    + + The cash flow is calculated as follows: +

    +

    CashFlow = TaxesCllected - TotalAllocatedFunds
    +
    +
    + + It will be a negative number if your yearly maintenance costs are + greater than your yearly tax intake.

    + + A major difference between Micropolis and a real city is that Micropolis + does not allow budget deficits. If you don't have the money, you can't + spend it. Try not to let your city run with a negative cash flow. +

    + +

    Micropolis Map Window

    + + The Map Window shows the entire area of your city. It has a pallet of + icons down the left edge, for selecting between different map types. + The maps show demographic information to help you comprehend the state + of your city.

    + + You can select between various views by pressing the left mouse button + over any of the icons. Some of the icons have submenus, that pop up + when you hold the button down, so you can select different aspects of + the view. +

    + + One or more yellow rectangular outlines overlay the map, showing the + location of the Edit Window and Surveyor Window views of the city. You + can drag the rectangles around the map to pan the other views. You can + also "throw" the view, by dragging with the left mouse button, and + releasing the button while moving the mouse. The view keeps on panning + and bounces off the edges of the map! Click on a moving rectangle to + make it sit still, or on the map to stop all the bouncing rectangles. + Use the middle button to avoid such behavior. +

    + +

    Using The Maps

    + + The Map Window should be constantly referred to in all stages of city + planning, building and managing.

    + + Before you build, use the map before beginning a new city to plan: +

    + +

      + +
    • Where you want your city center. + +
    • Where you want the high-class waterfront residential areas. + +
    • Where you will cross water with bridges, power lines and tunnels. + +
    • Where to place power plants. + +
    • Where to place large industrial sections away from the residential sections. + +
    • The general layout of your city. + +
    + +

    + + Printing the map and sketching in your plan with pencil or pen can + save a lot of bulldozing and re-zoning and rebuilding. +

    + + During city growth: +

    + +

      + +
    • Use the map to guide your city's growth around forest areas, to + preserve the trees and improve property values. + +
    • Use the Transportation Map along with the Traffic Density map to + plan traffic control and expansion. + +
    • Use the City Form Maps to make sure you have the proper ratio of + residential to commercial to industrial zones. + +
    • Use the Pollution Map to detect problem areas, and disperse the + industrial zones and/or replace roads with rails. + +
    • Printing out the map in various stages of development and doing + some preliminary expansion planning with pencil can be useful. + Printouts can also be used for city historical records. + +
    + + During city maintenance:

    + +

      + +
    • Use the Power Grid Map to locate zones that have lost power. + +
    • Use the City Services Maps to evaluate the effective coverage of + your police and fire departments. + +
    • Use the Crime Rate Map to locate problem areas that need more + police protection. + +
    • Use the Pollution Map to locate problem areas. + +
    • Use the Transportation and Traffic Density Maps to determine where + to replace roads with rails. + +
    • Use the Land Value Map to locate depressed areas for improvement + or replacement. + +
    • Use the City Form Maps to maintain the proper ratio of residential + to commercial to industrial zones. + +
    + +

    Micropolis Graph Window

    + + The Graph Window gives you time-based graphs of various city data. It + can be opened through the Windows Menu.

    + + Unlike the maps, which only show the current state of your city, the + Graphs give you a record of the past so you can gauge trends and + cycles. +

    + + You may view graphs for time periods of either the last 10 years or + the last 120 years by clicking on the "10 YRS." or "120 YRS." button. +

    + +

      + +
    • The Residential Population Graph shows the total population in + residential zones. + +
    • The Commercial Population Graph shows the total population in + commercial zones. + +
    • The Industrial Population Graph shows the total population in + industrial zones. + +
    • The Cash Flow Graph shows your city's cash flow: money collected + in taxes minus money it took to maintain your city. The center of the + Cash Flow Graph represents a cash flow of zero. Do not build more + infrastructure (roads, rails, police departments, fire stations) than + you can support with tax revenues. + +
    • The Crime Rate Graph shows the overall crime rate of the entire + city. + +
    • The Pollution Graph shows the overall average pollution reading of + the entire city. + +
    + +

    Using the Graphs

    + + The Graphs give information on many of the same factors as the maps, + but show the information over time. Graphs are for locating trends in + city life that won't be noticeable in a map. If you look at a map, for + example the Crime Rate Map, a very slight rise in the crime rate will + not be noticeable. But on the Crime Rate Graph, you would easily + locate the upward trend in crime because you will be viewing the + levels for a number of years at the same time.

    + + Residential, commercial and industrial population growth and/or + decline can be tracked and displayed. If you notice a downward trend + in any of these, refer to the User Reference Card to locate potential + problems and solutions. +

    + + Use the Cash Flow Graph to track your city's efficiency as it grows. + If your maintenance costs are higher than your tax revenues, you will + have a negative cash flow. +

    + + The Crime Rate Graph can be displayed, revealing slight but consistent + upward or downward trends. +

    + + Use the Pollution Graph to catch rising levels of pollution before + they reach a problem level. +

    + +

    Micropolis Evaluation Window

    + + The Evaluation Window gives you a performance rating. You can access + it through the Windows Menu.

    + + Public Opinion is presented in poll form, rating your overall job as + Mayor and listing what the public regards as the city's most pressing + problems. You are advised to keep your residents happy or they might + migrate away, and you will be left with a "ghost town." +

    + + In general, if more than 55% of the populace thinks you are doing a + good job, then you can feel secure of keeping your job. +

    + + If 10% or less of the people think something is a problem, then it's + not too bad. +

    + + These are most of the problems that citizens complain about, and how + to correct them: +

    + +

      + +
    • Traffic -- Replace dense sections of roads with rails. + +
    • Crime -- Add police stations and/or raise property values. + +
    • Pollution -- Replace roads with rails, disperse industrial zones. + +
    • Housing -- Zone more residences. + +
    • Housing Costs -- Zone more residences in low property value areas. + +
    • Fires -- Build more fire departments. + +
    • Taxes -- Lower taxes (if you can). Or lie through your lips. + +
    • Unemployment -- Zone more commercial and industrial areas. + +
    + + Statistics on Population, Net Migration, and Assessed Value are + displayed, along with the city's Game Level and the Overall City + Score. This data is calculated once a year at budget time.

    + + Population is the number of residents in your city. +

    + + The Net Migration statistic provides a rating of the desirability of + your city. If people are leaving in droves, then you know something is + rotten in Micropolis. +

    + + The Assessed Value is the combined value of all city-owned property: + roads, rails, power plants, police and fire stations, airports, + seaports, parks, etc. It does not include residential, commercial and + industrial zones. +

    + + The Categories are defined by population as follows: +

    + +

      + +
    • Village: 0 to 1,999 + +
    • Town: 2,000 to 9,999 + +
    • City: 10,000 to 49,999 + +
    • Capital: 50,000 to 99,999 + +
    • Metropolis: 100,000 to 499,999 + +
    • Megalopolis: 500,000 and above + +
    + + Overall City Score is a composite score based on the following factors + (some positive, some negative):

    + +

      + +
    • Major Factors: Crime, pollution, housing costs, taxes, traffic, + unemployment, fire protection, unpowered zones, city growth rate. + +
    • Minor Factors: Stadium needed (but not built), seaport needed (but + not built), airport needed (but not built), road funding, police + funding, fire department funding, and fires. + +
    + + A large population is not necessarily a sign of a successful city. + Population size does not affect the overall city score, since low + population could indicate a new or growing city.

    + + Since city growth rate does affect the overall city score, a city in + which growth has been intentionally stopped for environmental or + aesthetic reasons will have a slightly lower score. +

    + +

    City SimNotice Window

    + + The Notice Window is used to display important messages, and for + temporary control panels. When something important happens, it pops up + to the front. + Some times it displays a live view of events happening in the city, + that you can click on to scroll the editor window to the location of interest. + You can dismiss the Notice window by clicking the "Dismiss" button along the bottom edge.

    + + + + + + + + + +

    Growing a City

    + + While growing a city, refer often to the User Reference Card. It + provides a chart of City Dynamics; how all factors of city life and + growth are related.

    + + The main points to keep in mind while growing a city are: +

    + +

      + +
    • Grow slowly. Watch your money. + +
    • All zones must be powered to develop. + +
    • Zones must be developed to generate tax money. + +
    • Roads or rails must provide access to and from each zone for it to + fully develop. + +
    • There is a yearly maintenance cost for each section of road, rail, + bridge and tunnel. This can add up. Don't build too many roads and + rails and generate high maintenance costs before your city can + generate enough tax revenues to support them. + +
    • Extra power plants and redundant power lines are expensive, but + can keep zones from losing power during a disaster or emergency and + deteriorating. + +
    • Rails can carry much more traffic than roads. While building and + zoning an area that you predict will generate heavy traffic, install + rails instead of roads in the early stages of development. + +
    • If you get a lot of heavy traffic warnings, replace roads with + rails. You can build an entirely roadless city, even if you're not a + train spotter! + +
    • Grouping zones together, four of five in a row touching each + other, can eliminate a lot of power line segments. + +
    • Airports, seaports and stadiums won't help a small city grow -- so + save your money until the city gets larger. The Sims will tell you + when they need these things. + +
    • Place zones, roads, etc. carefully -- they cannot be moved, and + you will have to pay to bulldoze them and rebuild. + +
    • As a rule of thumb, the number of residential zones should be + approximately equal to the sum of commercial and industrial zones. + When your city is small, you will need more industrial zones than + commercial, and when your city gets larger, you will need more + commercial zones than industrial. + +
    • Separate the residential areas from the industrial areas. + +
    • Proximity to forests, parks, and water increases land value, which + increases the taxes collected. Don't bulldoze any more forest than you + must. Natural shoreline increases property values more than landfill + shoreline. + +
    • Keep in mind that proximity to downtown raises property values. + The simulator defines the downtown areas as "the center of mass of the + population density." It calculates the average geographical center of + the population. + +
    • A bigger, more populous city is not necessarily better. Having a + self-supporting, profitable city with pleasant surroundings is better + than a huge city that is always broke and has no forest or shoreline. + +
    • Use the various maps and graphs to plan city growth, locate + problems, and track your progress. Look for areas that need police and + fire coverage as you go, so you don't have to go back and bulldoze + developed zones to make room for police and fire stations. + +
    • Save your city to disk before trying any major new policy so you + can go back if your plan doesn't work. + +
    • Print out your city in different stages of evolution to track and + plan growth. + +
    • Check the Evaluation Window often. The Sims will let you know how + you are doing. Also the statistics can be useful; if your population + is shrinking, don't go zoning new areas that may never develop. Look + for problems in the existing zoned areas, and spend your time and + money solving them. + +
    • Save your city to disk often!!! + +
    + +

    + +


    +

    +

    Micropolis, Unix Version.

    + This game was released for the Unix platform + in or about 1990 and has been modified for inclusion in the One Laptop + Per Child program. Copyright © 1989 - 2007 Electronic Arts Inc. If + you need assistance with this program, you may contact: + http://wiki.laptop.org/go/Micropolis or email micropolis@laptop.org. +

    +

    + + This program 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. +

    +

    + + This program 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 this program. If + not, see http://www.gnu.org/licenses/. +

    +

    + +

    ADDITIONAL TERMS per GNU GPL Section 7

    + +

    +

    + No trademark or publicity rights are granted. This license does NOT + give you any right, title or interest in the trademark SimCity or any + other Electronic Arts trademark. You may not distribute any + modification of this program using the trademark SimCity or claim any + affliation or association with Electronic Arts Inc. or its employees. +

    +

    + + Any propagation or conveyance of this program must include this + copyright notice and these terms. +

    +

    + + If you convey this program (or any modifications of it) and assume + contractual liability for the program to recipients of it, you agree + to indemnify Electronic Arts for any liability that those contractual + assumptions impose on Electronic Arts. +

    +

    + + You may not misrepresent the origins of this program; modified + versions of the program must be marked as such and not identified as + the original program. +

    +

    + + This disclaimer supplements the one included in the General Public + License. TO THE FULLEST EXTENT PERMISSIBLE UNDER APPLICABLE LAW, THIS + PROGRAM IS PROVIDED TO YOU "AS IS," WITH ALL FAULTS, WITHOUT WARRANTY + OF ANY KIND, AND YOUR USE IS AT YOUR SOLE RISK. THE ENTIRE RISK OF + SATISFACTORY QUALITY AND PERFORMANCE RESIDES WITH YOU. ELECTRONIC ARTS + DISCLAIMS ANY AND ALL EXPRESS, IMPLIED OR STATUTORY WARRANTIES, + INCLUDING IMPLIED WARRANTIES OF MERCHANTABILITY, SATISFACTORY QUALITY, + FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT OF THIRD PARTY + RIGHTS, AND WARRANTIES (IF ANY) ARISING FROM A COURSE OF DEALING, + USAGE, OR TRADE PRACTICE. ELECTRONIC ARTS DOES NOT WARRANT AGAINST + INTERFERENCE WITH YOUR ENJOYMENT OF THE PROGRAM; THAT THE PROGRAM WILL + MEET YOUR REQUIREMENTS; THAT OPERATION OF THE PROGRAM WILL BE + UNINTERRUPTED OR ERROR-FREE, OR THAT THE PROGRAM WILL BE COMPATIBLE + WITH THIRD PARTY SOFTWARE OR THAT ANY ERRORS IN THE PROGRAM WILL BE + CORRECTED. NO ORAL OR WRITTEN ADVICE PROVIDED BY ELECTRONIC ARTS OR + ANY AUTHORIZED REPRESENTATIVE SHALL CREATE A WARRANTY. SOME + JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF OR LIMITATIONS ON IMPLIED + WARRANTIES OR THE LIMITATIONS ON THE APPLICABLE STATUTORY RIGHTS OF A + CONSUMER, SO SOME OR ALL OF THE ABOVE EXCLUSIONS AND LIMITATIONS MAY + NOT APPLY TO YOU. +

    + + + \ No newline at end of file diff --git a/docs/tutorial.html b/docs/tutorial.html new file mode 100755 index 0000000..7c63ee4 --- /dev/null +++ b/docs/tutorial.html @@ -0,0 +1,453 @@ + + + + Tutorial -- A Walk Through Your City + + + + +

    Tutorial -- A Walk Through Your City

    + +

    Starting Up

    + + To start up Micropolis, go to the Micropolis directory and run the shell + script named "Micropolis". The computer will chug for a while as + HyperLook and Micropolis are loaded. You'll know things are going well + when you see the Introduction Screen.

    + + The Introduction Screen +

    + + Once Micropolis is loaded, the Introduction Screen will go away and be + replaced by a Welcome Notice, and a Startup Window with a bunch of + buttons for cities and scenarios. +

    + + The Welcome Notice +

    + + The Startup Window +

    + + In case you wonder about any of the buttons or graphics, you can get + help on anything by pointing at it and pressing the "Help" key. So try + pressing "Help" over the weird little grill in the upper right corner + of the Startup Window. This brings up the HyperLook Help stack. Click + on "Done" to dismiss it. +

    + + The Help Stack +

    + +

    Generating a New City

    + + Now click the left mouse button on the "New City" button. The Welcome + Notice will turn into a control panel for setting up a New City, and + the Startup Screen will turn into a Terrain Generator with a map and + some buttons.

    + + The New City Panel +

    + + The Terrain Generator +

    + +

    City Name

    + + You can set the name of your city by clicking the left button on the + "City Name" text field, and typing the name. The delete key erases the + last character, and Control-U erases to the beginning of the line. You + can double or triple click on the name to select it, and it will be + deleted when you type a new name.

    + +

    Game Level

    + + The three exclusive settings let you select the Game Level. Choose + "Easy" for now, by clicking the left mouse button. If you're just + starting out, you can certainly use the extra money!

    + +

    Generate New Terrain

    + + If you're not satisfied with the terrain map you see, just press + "Generate New Terrain", and you will get a new map. You can do this as + many times as you like, until you get a nice map.

    + + Randomly Generated Terrain Maps +

    + +

    Use This Map

    + + When you are happy with the terrain map, press the "Use This Map" + button, and the game will begin!

    + +

    The Edit Window

    + + You're now playing Micropolis! The Edit Window, which is the main window + used for controlling Micropolis, will be displayed:

    + + The Edit Window +

    + + The Edit Window is where you will do the actual building and zoning. + In the middle of the Edit Window is a detailed map showing part of the + terrain. Around the edges are controls and fields displaying + information about the city. +

    + + Along the top edge of the window is the City Name, where the name of + your city or the scenario you selected is displayed. Clicking on it + brings the window to the front. +

    + + In the upper left corner is a picture of the City Simulator. + If you click on that, the Introduction Screen will be displayed + to show the credits, version, and copyrights. Click on the + Introduction Screen to dismiss it. +

    + + On the left edge, below the City Simulator, is a Close Box. Clicking + the left button on the Close Box closes the Edit Window into a small + icon, a miniature version of the window. Thanks to the way HyperLook + is designed, when a window is iconified, it continues to animate. You + can double click on an icon to open it back up to a full sized window. +

    + + There is a row of Menu Buttons below the title, to the right of the + Close Box. Pressing the right mouse button down over any of these + buttons pops up a menu, from which you can select using the right + mouse button. Clicking the left mouse button over a Menu Button + selects the menu's default item, without displaying the menu. The + default menu item has a black ring or rectangle around it. You can set + the default by pressing the Control key when the menu is up. +

    + + There are three fields below the Menu Buttons, that display your + Current Funds (in dollars), the Current Date (the year and month), and + important Messages (one at a time). Clicking on them just brings the + window to the front. +

    + + Along the left edge of the window are two columns of colorful Tool + Icons, used for choosing the city editing mode. Click the mouse over + an icon to select an editing tool. The currently selected tool is + highlighted in yellow. The Tool Cost field along the bottom edge of + the window tells you the name of the selected tool, and how many + dollars it costs to use. +

    + + You can use the selected tool by pressing the left mouse button over + the map in the middle of the Edit Window. Also, you can pop up a Pie + Menu to quickly switch between editing tools, by clicking the right + mouse button over the map. You can easily scroll the map by pressing + the middle mouse button down over the map and dragging the view + around. +

    + + The Demand Indicator shows the demand levels for Residential (green), + Commercial (blue), and Industrial zones (yellow), and can be helpful + in planning your city. +

    + + The Zoom Control changes the magnification of the map. You can zoom in + or out to make the graphics larger or smaller, or press the Zoom Reset + button to zoom back to normal. The animation is fastest at the normal + size. +

    + + All of the Micropolis windows have Drag Edges with which you can move the + window around, and Resize Corners to change the size of the window. + Some windows cannot be resized, so the resize corners just move them + around. To use them, press the left mouse button down over the corner + or edge, and move the outline to where you want it. The window will + move or resize to that location, when you release the button. +

    + + The main portion of the map is land. Your available land is made up of + three types of terrain. The brown areas are Clear Land, the green + areas are forests and Trees, and the blue areas are Water. You can + build only on Clear Land. You can clear forest and extend coastlines + with your bulldozer. You can run roads, rails, and power lines + straight across the Water. +

    + +

    The Map Window

    + + The other window that's shown when you start the game is the Map + Window, which displays an overview of your entire city map:

    + + The Map Window +

    + + You can see different demographic views of the city, chosen by the + icons on the left. The type of map is shown along the top edge of the + window, to the right of the Close Box. +

    + + There is a yellow rectangle in the Map Window that shows the location + of the detailed city view. (There may be more than one yellow + rectangles, if multiple views are visible.) Press the mouse button + down over the yellow rectangle, and drag it around the map, to scroll + the view. +

    + +

    Building a City

    + + To begin a city, we need: places for Sims to live, places for Sims to + work, and power.

    + + You can only build on Clear Land, so use the Bulldozer to clear away + some trees. Click the left mouse button on the Bulldozer Icon. Move + the cursor over to land. It now points to a small square, outlining + the area that will be bulldozed when you click the left button. The + Trees under your pointer are now Clear Land. Now, hold the left button + down and drag the pointer across the Trees. Mass destruction. Clear a + large area of land to prepare for building. +

    + + Click the Residential Icon, then move back to your terrain. Your + cursor will now point to a large square outline. This outline + indicates how much clear space you will need to create a Residential + Zone -- a place for Sims to live. Clicking the left mouse button in + Clear Land will "zone" that area. The "R" in the zone center indicates + that it is a Residential Zone. The flashing lightning symbol means + that the zone has no power. Place a few more Residential Zones next to + the first one. +

    + + Several New Residential Zones +

    + + Now decide where to position a Power Plant in your city. Point to the + Power Plant Icon, and press and hold the left mouse button. A menu + will appear, giving you the option of choosing a Coal or Nuclear + plant. For now, release the button over "Coal". The outline for a + Power Plant is even larger than for a Residential Zone. Place the + Power Plant in some open space near your Residential Zones. If your + Power Plant is not directly adjacent to a Residential Zone, you'll + need to run a Power Line from your Power Plant to the Residential + Zones. +

    + + To do this, click the left mouse button over the Power Line Icon. By + pointing your cursor and pressing the button, lay Power Lines from + your Power Plant to your Residential Zones. Adjacent Power Line + sections will automatically connect to each other. Road and Rail lines + connect in the same manner. +

    + + In a moment, the flashing symbols in the Residential Zones will + disappear, indicating that your zones have been powered. Any zones + that are adjacent to a powered zone do not need separate Power Lines + run to them. Soon you will see small houses start to appear. The Sims + have started to move in! +

    + + Here Comes the Neighborhood! +

    + + Once there are a few Residential Zones, where Sims can live, you need + to make it possible for your new residents to find jobs. They can't + all work at the power plant! +

    + + Residential, Commercial, and Industrial Zones +

    + + Now you're ready for Commercial and Industrial areas; places for Sims + to work, shop, and transact business. Select the Commercial Icon and + place a few Commercial Zones near your Residential ones. Then select + the Industrial Icon and place some Industrial Zones. Connect all + necessary Power Lines. +

    + + Notice that as you select different Tool Icons, the icon's description + and its associated cost will be displayed in the Tool Cost field near + the lower left corner of the Edit Window. The Current Funds field near + the top of the window displays your total funds available. +

    + + Now click the left button on the Road Icon and add Roads from your + Residential housing to the Commercial and Industrial areas to allow + the Sims to commute to work. Road sections connect themselves like + Power Line sections. Once you have Roads, traffic will be generated. +

    + + Roads with Traffic +

    + + Now move the cursor to the Menu Button labelled "Windows", and press + the right mouse button down. The Windows Menu will pop up below the + cursor. Drag the cursor to the menu item labelled "Budget", and + release the right button. This brings up the Budget Window, which lets + you set the level of funding for your fire, police, and transportation + departments. +

    + + The Budget Window +

    + + Click the left mouse button on the up and down arrows, or drag the + sliders to change the funding levels. You can also adjust the current + tax rate. If you have no police or fire departments, you can't fund + them. You cannot fund more than 100%. Since your city is so new, you + can't do much here now, but come back later. Click the left mouse + button on the "Go With These Figures" button to make the window go + away when you're done. If the hour glass runs out, the window will go + away automatically. You can click on the hourglass to keep that from + happening. +

    + + Now look at the Map Window. You can get an idea of the size of your + city, and how much room you have left. Try the different map views by + clicking the left mouse button on the icons along the left edge of the + Map Window. You will need this information to build and adjust + conditions in your city. For example, you can pinpoint the areas with + the highest crime to determine locations for new police stations. +

    + + The Map Window +

    + + Additional information can be gained through the available Graphs. + Unlike the Maps, which only show the current state of your city, the + Graphs give you a record of the past so you can gauge trends and + cycles. You can display the Graph Window by selecting the item + labelled "Graph" from the Window Menu. +

    + + The Graph Window +

    + + You can toggle the various graph displays on and off, and switch + between 10 year and 120 year graphs, by clicking on the icons at the + left of the Graph Window. +

    + + Another way to gather information about your city is by using the + Query Tool. To use this, select the Tool Icon with the magnifying + glass and question mark, or hold down the "Q" key, then press the left + mouse button over the map in the Edit Window. You will be shown a + window filled with information about the zone under the cursor. +

    + + The Zone Status Window +

    + + Now, let's Save the city to disk. Use the File Menu to select "Save + City as...". You'll see the Save File dialog. Near the top of the + window is a text field labelled "File:". You can select a directory by + typing its name into the text field, or by double clicking in the + scrolling list. Then you can type in a name for your city, ending with + the ".city" extension, and press return. Your city will be saved to + disk, so you can load it later to get back to where you are now. +

    + + Save File Dialog +

    + + To load a city, use the File Menu and select the item labelled "Load + City...". The Open File dialog looks and works almost like the Save + File dialog. It will start out in a directory named "Cities", which + contains some interesting cities included with Micropolis. You can load + and play any of them, or navigate to the directory where you saved + your city, and load that again. +

    + + Open File Dialog +

    + + This is all the basic information you need to run Micropolis, but we + suggest reading on. The User Reference section explains in detail how + to use each program function. Inside Micropolis explains the inner + workings of the simulator, and gives some brief hints and tips for + using it. There is also an essay on The History of Cities and City + Planning, and a Bibliography for serious City Planners. +

    + + Have Fun Playing Micropolis! +

    + +

    + +


    +

    +

    Micropolis, Unix Version.

    + This game was released for the Unix platform + in or about 1990 and has been modified for inclusion in the One Laptop + Per Child program. Copyright © 1989 - 2007 Electronic Arts Inc. If + you need assistance with this program, you may contact: + http://wiki.laptop.org/go/Micropolis or email micropolis@laptop.org. +

    +

    + + This program 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. +

    +

    + + This program 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 this program. If + not, see http://www.gnu.org/licenses/. +

    +

    + +

    ADDITIONAL TERMS per GNU GPL Section 7

    + +

    +

    + No trademark or publicity rights are granted. This license does NOT + give you any right, title or interest in the trademark SimCity or any + other Electronic Arts trademark. You may not distribute any + modification of this program using the trademark SimCity or claim any + affliation or association with Electronic Arts Inc. or its employees. +

    +

    + + Any propagation or conveyance of this program must include this + copyright notice and these terms. +

    +

    + + If you convey this program (or any modifications of it) and assume + contractual liability for the program to recipients of it, you agree + to indemnify Electronic Arts for any liability that those contractual + assumptions impose on Electronic Arts. +

    +

    + + You may not misrepresent the origins of this program; modified + versions of the program must be marked as such and not identified as + the original program. +

    +

    + + This disclaimer supplements the one included in the General Public + License. TO THE FULLEST EXTENT PERMISSIBLE UNDER APPLICABLE LAW, THIS + PROGRAM IS PROVIDED TO YOU "AS IS," WITH ALL FAULTS, WITHOUT WARRANTY + OF ANY KIND, AND YOUR USE IS AT YOUR SOLE RISK. THE ENTIRE RISK OF + SATISFACTORY QUALITY AND PERFORMANCE RESIDES WITH YOU. ELECTRONIC ARTS + DISCLAIMS ANY AND ALL EXPRESS, IMPLIED OR STATUTORY WARRANTIES, + INCLUDING IMPLIED WARRANTIES OF MERCHANTABILITY, SATISFACTORY QUALITY, + FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT OF THIRD PARTY + RIGHTS, AND WARRANTIES (IF ANY) ARISING FROM A COURSE OF DEALING, + USAGE, OR TRADE PRACTICE. ELECTRONIC ARTS DOES NOT WARRANT AGAINST + INTERFERENCE WITH YOUR ENJOYMENT OF THE PROGRAM; THAT THE PROGRAM WILL + MEET YOUR REQUIREMENTS; THAT OPERATION OF THE PROGRAM WILL BE + UNINTERRUPTED OR ERROR-FREE, OR THAT THE PROGRAM WILL BE COMPATIBLE + WITH THIRD PARTY SOFTWARE OR THAT ANY ERRORS IN THE PROGRAM WILL BE + CORRECTED. NO ORAL OR WRITTEN ADVICE PROVIDED BY ELECTRONIC ARTS OR + ANY AUTHORIZED REPRESENTATIVE SHALL CREATE A WARRANTY. SOME + JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF OR LIMITATIONS ON IMPLIED + WARRANTIES OR THE LIMITATIONS ON THE APPLICABLE STATUTORY RIGHTS OF A + CONSUMER, SO SOME OR ALL OF THE ABOVE EXCLUSIONS AND LIMITATIONS MAY + NOT APPLY TO YOU. +

    + + + \ No newline at end of file diff --git a/icon.png b/icon.png new file mode 100644 index 0000000..c48c7ff Binary files /dev/null and b/icon.png differ diff --git a/notes/ASSETS.txt b/notes/ASSETS.txt new file mode 100644 index 0000000..fa7bc30 --- /dev/null +++ b/notes/ASSETS.txt @@ -0,0 +1,322 @@ +Micropolis Art Assets: + + This is a list of required and optional assets for Micropolis. + + As noted, some of them are for the current TCL/Tk based version of + Micropolis that we want to get out right away. Others are for the more + advanced Python version that we're developing after releasing the + TCL/Tk version. + + The TCL/Tk version currently works ok with its current assets, and + these are just suggestions that would improve it but are not + necessary. The Python version is not yet fully designed or + implemented, and it will be more open-ended and powerful, so this is + just a rough estimate of the assets it will need. + + Sound + + NeWS and TCL/Tk sound servers supported playing sounds back at different rates, and repeating. + + Sound effects for tools. + Currently playing vocal vowles at different pitches. + + User Interface Graphics and Icons + + These aren't all necessary, but it would be nice to have some of + them to make the interface look nicer, more graphical, and kid + friendly. + + The style should be international, kid oriented, big, bright, + saturated, simple. + + Icons should look good and be readable when shown in desaturated + gray scale on the OLPC's monochrome screen in low power reflective + mode. The brightness detail can be full resolution but the color + detail should be lower resolution by about half (not depending on + color detail as fine as brightness detail), because of the nature + of the OLPC's screen: 200 dots per inch monochrome gray scale, + with lower resolution color. For example, text on an icon should + be a noticeably different brightness than the background color, + instead of relying on color variation, which is not as detailed + and won't show up in monochrome mode. + + SVG is the idea source format, because it can be scaled to any + size, rendered with antialiased edges, and will be easily used in + the Python version. Illustrator exports SVG. For now the TCL/Tk + version can use versions of the SVG files converted to "XPM" + format (which I can do). + + Later, the Python user interface will require a bunch more icons + and graphics, depending on the user interface and features we + decide to support. It would be great to be able to use the same + SVG source graphics in the Python version, scaling them as + appropriate to adapt to the screen layout. We should revisit the + icons and graphics after we port Micropolis to Python. + + What follows is a complete list of graphics we could use in the + TCL/Tk version. SVG is ideal but PNG is sufficient for this time. + + Micropolis icon for use in Sugar user interface, in SVG or PNG. + + Logos: + Micropolis logo + Micropolis lettering + OLPC Project logo + XO Laptop logo + Linux Penguin logo + Python Programming Language logo + + Small menu item icons for map overlay menus: + Zones + All + Residential + Commercial + Industrial + Transportation + Overlays + Population Density + Rate of Growth + Land Value + Crime Rate + Pollution Density + Traffic Density + Power Grid + Fire Coverage + Police Coverage + + Small menu item icons for File menu: + Save City + Save City as... + Add Player... + Choose City! + Quit Playing! + + Small menu item icons for Options menu: + Auto Budget + Auto Bulldoze + Disasters + Sound + Animation + Messages + Notices + + Small menu item icons for Disasters menu: + Monster + Fire + Flood + Meltdown + Air Crash + Tornado + Earthquake + + Small menu item icons for Time menu: + Pause + Slow + Medium + Fast + + Small menu item icons for Priority menu: + Flat Out! + Zoom Zoom + Whoosh Whoosh + Buzz Buzz + Putter Putter + Drip Drip + Snore Snore + + Small menu item icons for Windows menu (maybe the same as ones used in buttons): + Budget + Evaluation + Graph + + Small menu item icons for Map Options menu: + Auto Goto + Palette Panel + Chalk Overlay + + Small "OK" button for confirmation dialog buttons. + + Small "Cancel" button for confirmation dialog buttons. + + Large "Question" icon for dialogs asking questions (ok/cancel questions). + + Large "Notice" icon for notice window (informational). + + Large "Query" icon for zone query window (zone tricorder). + + Medium "Generate New City" icon for button to generate new city, on start screen. + + Medium Game Level icons for start screen radio buttons: + Easy + Medium + Hard + + Big "Load City" icon for load city dialog. + Meduim "Load City" icon for button to load city, on start screen. + + Big "Save City" icon for save city dialog. + Small "Save City" icon for button to save city. + + Big Evaluation icon for evaluation window. + Small Evaluation icon for button to bring up evaluation window. + + Big Graph icon for graph window. + Small Graph icon for button to bring up graph window. + + Big Simolean/Budget symbol for Budget window. + Small Simolean/Budget symbol for button to bring up budget window. + + Big Quit symbol for Quit confirmation dialog. + Small Quit symbol for button to bring up Quit confirmation dialog. + + Big About symbol for About dialog. + Small About symbol for button to open About dialog. + + Big Choose City symbol for Choose City confirmation dialog. + Small Choose City symbol for button to open Choose City confirmation dialog. + + + Simulation and User Interface Sounds + + Right now it's using the original sounds, plus some interface + sounds I recorded. I can convert them to the format required by + the Linux sound interface we use. + + I can supply a list of required interface sounds, but I think we + can go with the sounds we have right now without any trouble. + + Later, the Python version will require a bunch more sounds for its + user interface, which will depend on the user interface features + we decide to support. So we should revisit the sound effects + later once Micropolis is ported to Python. + + To be authentic, I would like to use the original sounds that the + simulator made (like the Skywatch One helicopter), or re-record + high quality replacements. Maybe we can get Will to record a fresh + version of "Skywatch One reporting heavy traffic!" in his own + voice (he made that original sound) and the sound people can add + in the helicopter sound over his voice to re-create the original + sound at high quality. The other sounds could be re-made from + scratch without any problem or help from Will. + + Voice overs reading the user interface text, notices, help text + and documentation would be great for pre-literate children. Would + need to be translated to other languages. + + + Update Documentation + + I have translated the Micropolis manual to HTML. + + It's the original version that applies to the multi player + X11/TCL/Tk version, which needs to be update in a few places where + it's specific about the user interface or installation instructions. + + It would benefit from some nice reformatting and CSS styles, as well + as some illustrations and screen snapshots. + + After we port Micropolis to Python, the interface-specific + documentation will have to be rewritten, re-illustrated, and then it + will have to be translated to different languages. + + The documentation consists of the following files: + + Index + Introduction + Tutorial + User Reference + Inside the Simulator + History of Cities and City Planning + Bibliography + Credits + + Help Text + + There are also HTML files corresponding to user interface help text. + The user interface components are tagged with help ids that are the + base names of html files. The existing HTML help files are just + placeholders that don't have any useful help text, and there are + some help files for user interface components and windows that have + since been removed, as well as some help files missing for user + interface components and windows that have been added. + + To finish implementing help, we need to go through the code and + identify all help tags and opportunities for adding missing help + tags to the user interface, then make all help files corresponding + to the existing tags, delete obsolete help files, and write all the + help text. It would be nice for the help text to hsve illustrations + of the corresponding windows and components in use. + + After we port Micropolis to Python, the help files will have to be + re-inventoried, rewritten, re-illustrated, and translated to + different languages. + + Courseware + + We need to include any Micropolis courseware or teacher's guides with + the documentation, and update it to relect the current user + interface. + + After we port Micropolis to Python, we will need to update the + courseware to reflect the features and user interface of the new + user interface. + +-- +Micropolis, Unix Version. This game was released for the Unix platform +in or about 1990 and has been modified for inclusion in the One Laptop +Per Child program. Copyright (C) 1989 - 2007 Electronic Arts Inc. If +you need assistance with this program, you may contact: + http://wiki.laptop.org/go/Micropolis or email micropolis@laptop.org. + +This program 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. + +This program 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 this program. If +not, see . + + ADDITIONAL TERMS per GNU GPL Section 7 + +No trademark or publicity rights are granted. This license does NOT +give you any right, title or interest in the trademark SimCity or any +other Electronic Arts trademark. You may not distribute any +modification of this program using the trademark SimCity or claim any +affliation or association with Electronic Arts Inc. or its employees. + +Any propagation or conveyance of this program must include this +copyright notice and these terms. + +If you convey this program (or any modifications of it) and assume +contractual liability for the program to recipients of it, you agree +to indemnify Electronic Arts for any liability that those contractual +assumptions impose on Electronic Arts. + +You may not misrepresent the origins of this program; modified +versions of the program must be marked as such and not identified as +the original program. + +This disclaimer supplements the one included in the General Public +License. TO THE FULLEST EXTENT PERMISSIBLE UNDER APPLICABLE LAW, THIS +PROGRAM IS PROVIDED TO YOU "AS IS," WITH ALL FAULTS, WITHOUT WARRANTY +OF ANY KIND, AND YOUR USE IS AT YOUR SOLE RISK. THE ENTIRE RISK OF +SATISFACTORY QUALITY AND PERFORMANCE RESIDES WITH YOU. ELECTRONIC ARTS +DISCLAIMS ANY AND ALL EXPRESS, IMPLIED OR STATUTORY WARRANTIES, +INCLUDING IMPLIED WARRANTIES OF MERCHANTABILITY, SATISFACTORY QUALITY, +FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT OF THIRD PARTY +RIGHTS, AND WARRANTIES (IF ANY) ARISING FROM A COURSE OF DEALING, +USAGE, OR TRADE PRACTICE. ELECTRONIC ARTS DOES NOT WARRANT AGAINST +INTERFERENCE WITH YOUR ENJOYMENT OF THE PROGRAM; THAT THE PROGRAM WILL +MEET YOUR REQUIREMENTS; THAT OPERATION OF THE PROGRAM WILL BE +UNINTERRUPTED OR ERROR-FREE, OR THAT THE PROGRAM WILL BE COMPATIBLE +WITH THIRD PARTY SOFTWARE OR THAT ANY ERRORS IN THE PROGRAM WILL BE +CORRECTED. NO ORAL OR WRITTEN ADVICE PROVIDED BY ELECTRONIC ARTS OR +ANY AUTHORIZED REPRESENTATIVE SHALL CREATE A WARRANTY. SOME +JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF OR LIMITATIONS ON IMPLIED +WARRANTIES OR THE LIMITATIONS ON THE APPLICABLE STATUTORY RIGHTS OF A +CONSUMER, SO SOME OR ALL OF THE ABOVE EXCLUSIONS AND LIMITATIONS MAY +NOT APPLY TO YOU. diff --git a/notes/AnimationSequences.txt b/notes/AnimationSequences.txt new file mode 100644 index 0000000..8441f4c --- /dev/null +++ b/notes/AnimationSequences.txt @@ -0,0 +1,197 @@ +# Tile animation sequences +# +# FIXME: This needs to be regenerated since I tweaked the animation sequences. +# +# This file can be processed with genAnimationTable.py to generate the same +# table as ../animate.cpp +# +# TODO: Remove water animation sequences as it animates the same tile (all +# those tiles are copies of each other) +# +# x08f -> x07f -> x06f -> x05f -> x08f +# x0cf -> x0bf -> x0af -> x09f -> x0cf + +# Fire +x038 -> x039 -> x03a -> x03b -> x03c -> x03d -> x03e -> x03f -> x038 + +# Light traffic +x080 -> x070 -> x060 -> x050 -> x080 +x081 -> x071 -> x061 -> x051 -> x081 +x082 -> x072 -> x062 -> x052 -> x082 +x083 -> x073 -> x063 -> x053 -> x083 +x084 -> x074 -> x064 -> x054 -> x084 +x085 -> x075 -> x065 -> x055 -> x085 +x086 -> x076 -> x066 -> x056 -> x086 +x087 -> x077 -> x067 -> x057 -> x087 +x088 -> x078 -> x068 -> x058 -> x088 +x089 -> x079 -> x069 -> x059 -> x089 +x08a -> x07a -> x06a -> x05a -> x08a +x08b -> x07b -> x06b -> x05b -> x08b +x08c -> x07c -> x06c -> x05c -> x08c +x08d -> x07d -> x06d -> x05d -> x08d +x08e -> x07e -> x06e -> x05e -> x08e +x08f -> x07f -> x06f -> x05f -> x08f # Water, but all tiles are the same + +# Heavy traffic +x0c0 -> x0b0 -> x0a0 -> x090 -> x0c0 +x0c1 -> x0b1 -> x0a1 -> x091 -> x0c1 +x0c2 -> x0b2 -> x0a2 -> x092 -> x0c2 +x0c3 -> x0b3 -> x0a3 -> x093 -> x0c3 +x0c4 -> x0b4 -> x0a4 -> x094 -> x0c4 +x0c5 -> x0b5 -> x0a5 -> x095 -> x0c5 +x0c6 -> x0b6 -> x0a6 -> x096 -> x0c6 +x0c7 -> x0b7 -> x0a7 -> x097 -> x0c7 +x0c8 -> x0b8 -> x0a8 -> x098 -> x0c8 +x0c9 -> x0b9 -> x0a9 -> x099 -> x0c9 +x0ca -> x0ba -> x0aa -> x09a -> x0ca +x0cb -> x0bb -> x0ab -> x09b -> x0cb +x0cc -> x0bc -> x0ac -> x09c -> x0cc +x0cd -> x0bd -> x0ad -> x09d -> x0cd +x0ce -> x0be -> x0ae -> x09e -> x0ce +x0cf -> x0bf -> x0af -> x09f -> x0cf # Water, but all tiles are the same + +# Rotating radar at top of airport +x2c7 -> x340 +x340 -> x341 -> x342 -> x343 -> x344 -> x345 -> x346 -> x347 -> x340 + +# Fountain +x348 -> x349 -> x34a -> x34b -> x348 + +# Rotating radar (elsewhere) +# TODO: Figure out whether we use this +x34c -> x34d -> x34e -> x34f -> x350 -> x351 -> x352 -> x353 -> x34c + +# Smoking chimney +# BUG-FIX: x26d was x26c originally! (which is the last tile of empty industry) +x26d -> x354 # IND1 +x354 -> x355 -> x356 -> x357 -> x358 -> x359 -> x35a -> x35b -> x354 + +# Explosion +x35c -> x35d -> x35e -> x35f -> x360 -> x361 -> x362 -> x363 +x363 -> x363 + +# Chimney +x281 -> x374 # IND2 +x374 -> x375 -> x376 -> x377 -> x374 + +# Chimney +x284 -> x378 # IND3 +x378 -> x379 -> x37a -> x37b -> x378 + +# Chimney +x289 -> x37c # IND4 +x37c -> x37d -> x37e -> x37f -> x37c + +# Chimney +x28a -> x380 # IND5 +x380 -> x381 -> x382 -> x383 -> x380 + +# Chimney +x2a4 -> x384 # IND6 +x384 -> x385 -> x386 -> x387 -> x384 + +# Chimney +x2a5 -> x388 # IND7 +x388 -> x389 -> x38a -> x38b -> x388 + +# Chimney +x2ae -> x38c # IND8 +x38c -> x38d -> x38e -> x38f -> x38c + +# Chimney +x2b1 -> x390 # IND9 +x390 -> x391 -> x392 -> x393 -> x390 + +# Chimney at coal powerplant, relative position (2, 0) +747 -> 916 +916 -> 917 -> 918 -> 919 -> 916 + +# Chimney at coal powerplant, relative position (3, 0) +748 -> 920 +920 -> 921 -> 922 -> 923 -> 920 + +# Chimney at coal powerplant, relative position (2, 1) +751 -> 924 +924 -> 925 -> 926 -> 927 -> 924 + +# Chimney at coal powerplant, relative position (3, 1) +752 -> 928 +928 -> 929 -> 930 -> 931 -> 928 + +# Stadium (top part, bottom part) +x3a4 -> x3a5 -> x3a6 -> x3a7 -> x3a8 -> x3a9 -> x3aa -> x3ab -> x3a4 +x3ac -> x3ad -> x3ae -> x3af -> x3b0 -> x3b1 -> x3b2 -> x3b3 -> x3ac + +# Nuclear swirl (at nuclear power plant?) +820 -> 952 +952 -> 953 -> 954 -> 955 -> 952 + +# Non-used tiles +956 -> 0 +957 -> 0 +958 -> 0 +959 -> 0 +960 -> 0 +961 -> 0 +962 -> 0 +963 -> 0 +964 -> 0 +965 -> 0 +966 -> 0 +967 -> 0 +968 -> 0 +969 -> 0 +970 -> 0 +971 -> 0 +972 -> 0 +973 -> 0 +974 -> 0 +975 -> 0 +976 -> 0 +977 -> 0 +978 -> 0 +979 -> 0 +980 -> 0 +981 -> 0 +982 -> 0 +983 -> 0 +984 -> 0 +985 -> 0 +986 -> 0 +987 -> 0 +988 -> 0 +989 -> 0 +990 -> 0 +991 -> 0 +992 -> 0 +993 -> 0 +994 -> 0 +995 -> 0 +996 -> 0 +997 -> 0 +998 -> 0 +999 -> 0 +1000 -> 0 +1001 -> 0 +1002 -> 0 +1003 -> 0 +1004 -> 0 +1005 -> 0 +1006 -> 0 +1007 -> 0 +1008 -> 0 +1009 -> 0 +1010 -> 0 +1011 -> 0 +1012 -> 0 +1013 -> 0 +1014 -> 0 +1015 -> 0 +1016 -> 0 +1017 -> 0 +1018 -> 0 +1019 -> 0 +1020 -> 0 +1021 -> 0 +1022 -> 0 +1023 -> 0 diff --git a/notes/CALLBACKS.txt b/notes/CALLBACKS.txt new file mode 100644 index 0000000..ef2f488 --- /dev/null +++ b/notes/CALLBACKS.txt @@ -0,0 +1,79 @@ + + +Callback("UIAutoGoto", "dd", x, y); + Useful. + +Callback("UIDidGenerateNewCity", ""); + UI notification. + +Callback("UIDidLoadCity", ""); + UI notification. + +Callback("UIDidLoadScenario", ""); + UI notification. + +Callback("UIDidSaveCity", ""); + UI notification. + +Callback("UIDidTool", "sdd", name, x, y); +Callback("UIDidntLoadCity", "s", msg); +Callback("UIDidntSaveCity", "s", msg); +Callback("UIDoPendTool", "ddd", tool, x, y); +Callback("UIDropFireBombs", ""); +Callback("UILoseGame", ""); +Callback("UIMakeSound", "ssdd", channel, sound, x, y); +Callback("UINewGame", ""); +Callback("UIPlayNewCity", ""); +Callback("UIReallyStartGame", ""); +Callback("UISaveCityAs", ""); +Callback("UISetCityName", "s", CityName); +Callback("UISetDate", "sdd", str, m, y); +Callback("UISetGameLevel", "d", GameLevel); +Callback("UISetMessage", "s", str); +Callback("UISetSpeed", "d", speed); + Should stop timer if speed == 0, and start timer if speed > 0. +Callback("UIShowBudgetAndWait", ""); +Callback("UIShowPicture", "d", id); +Callback("UIShowZoneStatus", "ssssssdd", str, s0, s1, s2, s3, s4, x, y); +Callback("UIStartEarthquake", ""); +Callback("UIStartLoad", ""); +Callback("UIStartScenario", "d", scenario); +Callback("UIStopEarthquake", "d", magnitude); +Callback("UIWinGame", ""); +Callback("UINewEvaluation", ""); +Callback("UISimRobots", ""); +Callback("UIUpdate", "s", name); + Called when an aspect of the model has changed: + map: when small overall map changes + Called by stubs.cpp. + Called by python micropolis engine subclass. + graph: when graph changes + Called by graph.cpp. + evaluation: when evaluation changes + Called by evaluation.cpp. + budget: when budget changes + Called by budget.cpp. + date: when date changes + Called by update.cpp. + funds: when funds change + Called by update.cpp. + demand: when demand changes + Called by update.cpp. + gamelevel: when game level changes + Called by utilities.cpp. + cityname: when city name changes + Called by utilities.cpp. + paused: when game is paused or resumed + Called by utilities.cpp. + speed: when speed changes + Called by utilities.cpp. + passes: when passes changes + Called by utilities.cpp. + options: when an option changed + Called by update.cpp. + taxrate: tax rate + Called by budget.cpp. + message(dddbb): message changed + Called by message.cpp. + + diff --git a/notes/CODING-STYLE.txt b/notes/CODING-STYLE.txt new file mode 100644 index 0000000..a7c64f2 --- /dev/null +++ b/notes/CODING-STYLE.txt @@ -0,0 +1,57 @@ +C++ coding style: + +- Functions/Methods: + - Functions/methods use CamelCase names. + - Private/local functions/meyhods use camelCase, except for the first letter. + - Try to give functions/methods a name with at least two words (so they are + different from variables). + +- Variables: + - Variables are lowercase_only, with an underscore connecting the words. + - Globals start with an _underscore_character. + - Do not use 'register' (compilers are much smarter about assigning variables + to registers). + +- Constants: + - Constants are written in UPPER_CASE with an underscore character between + words. + - Related constants should have a short common prefix. + - Single constants are declared with "static const MY_CONSTANT = ;" + - Groups of related constants are declared with an enum. + - Use decimal notation for values. + - Use hexadecimal notation for bitmasks (or better, express the mask as a + computation). + - End with "_BIT" in the name for bit positions. + +- Layout: + - Indentation should be 4 at each level. + - No TAB characters. + - No white space at end of the line. + - Lines should mostly fit in 80 columns. + + - Put a space between the keyword "if", "while", and "for" and the opening + bracket of the expression. + - Use space around operators ("1 + 2" instead of "1+2") and assignment + ("x = 1" instead of "x=1"). + +- Expressions: + - Avoid assignments in expressions (compilers will shuffle them into the + expression if that is better). + - Be explicit in comparisons, "if (ptr == NULL)" and "if (val != 0)". + - No brackets when not needed. + + - Avoid floating point computations. + +- Documentation: + - Document everything with Doxygen. + + + +Not decided: + +- Comment style. +- Use of "this" in methods. +- Use "0" instead of "NULL" ("0" is the official C++ NULL value, but "NULL" seems + clearer). + +- Python coding style (maybe simply use PEP-008) diff --git a/notes/DevelopmentPlan.md b/notes/DevelopmentPlan.md new file mode 100644 index 0000000..98b2c38 --- /dev/null +++ b/notes/DevelopmentPlan.md @@ -0,0 +1,48 @@ +_(This page is several (at least 16 or so) years old. Much progress rewriting the code towards those goals has been made since it was written! Technology has changed a lot, but the same basic approach applies, but with Emscripten, Embind, and JavaScript/TypeScript and HTML/Canvas/WebGL instead of SWIG and Python and GTK/Cairo.)_ + +# Notes on a development plan, in progress # + +I (Don Hopkins) have been cleaning up and translated the Micropolis (SimCity) source code to C++, and used SWIG to integrate it with Python. +It runs and animates the city on the screen, but it's not yet a playable game. + +The ongoing Micropolis Core development work is checked into subversion on google code, in the "MicropolisCore" subdirectory: http://code.google.com/p/micropolis/source/browse + +Micropolis Core is still a work in progress, of course -- the game is not yet playable, but you can scroll and zoom around the map, and I've hooked up the pie menus for switching tools. + +I've been working on the editing and navigation tools -- they are not actually hooked up for editing the map yet, but the tool framework is in place. +The TileTool base class represents an editing tool, including the tile based SimCity map editors, the ink drawing and eraser tools, and the panning tool. The TileDrawingView distributes events to the appropriate tools. There is a current editing tool, as well as a spring loaded navigation tool (for panning and zooming), which activates when you press a key. + +One consideration is that I'm factoring the TileDrawingView and TileTool code into two layers: one generic layer that is specific to the tile view but not specific to Micropolis, and then a higher level layer which subclasses the generic classes. There is a set of subclasses specific to Micropolis, as well as another set of subclasses specific to a cellular automata machine (CellEngine). This layer of abstraction makes it a bit more complicated than it would be if it were monolithic, but it's well worth it, because I want the tile engine to be useful for other projects. Using the generic classes for more than one project ensures that they will be well factored and support other projects without special cases. + +The C++ code still needs to be reorganized and cleaned up a lot -- I've just done the first cut of a translation. There is still a lot of old cruft in there that needs to be stripped out. But the tool stuff was a good obvious place to start working. + +The essential thing is to decide what is user interface stuff that goes on the outside and should not be handled by C++, and what is essential simulation stuff that goes on the inside and should be handled by C++, and then defining a nice clean simple interface between them. + +For example, one thing that I did to support the new tool stuff was to eliminate all the old "view" and "x11" oriented structures from C++ code that were being passed into the tool editing API. The old "view" was a TCL/Tk widget in the old micropolis-core code, with lots of X-Windows cruft hanging off of it. So now the view and user interface layer is implemented in Python (and another independent module, TileEngine), totally independent of the simulation engine. So somebody else could write a 3D view, or a web server view, or whatever. + +Now the C++ code does not know about any view stuff -- it just knows how to expose the information that any kind of view might need to know. The "tile engine" is a kind of view that draws the map with zoomable tile images, using the Cairo graphics library. The "Micropolis engine" (the city simulator) has an interface for getting a pointer to its tile memory buffer. Python code directly introduces the Micropolis engine's tiles to the tile drawing engine, along with some information describing the layout and format of the tiles in memory, and a bitmap of tiles to use. So there is no Python interpreter overhead when drawing the tiles. + +The high level tool user interface layer written in Python transforms mouse coordinates to tile coordinates, and calls micropolis to edit on the map in terms of tile coordinates. So the core simulator does not have to know anything about view transformations. + +The tile engine has a lazy optimization to make it zoom faster, by not scaling all possible tiles in advance. The first time it draws a tile at a certain scale, it calls back into Python to render that tiles on demand. The Python code can scale a bitmap or draw scaled graphics with Cairo or SVG. Only the needed tiles are cached at any particular scale, which makes it possible to zoom in close to the map quickly without wasting a lot of time and memory. + +There is lots of stuff that needs to be done along the lines of cleaning up and rationalizing the C++ code and interface. + +The code is cluttered with unnecessary layers of indirection, superfluous methods and unused variables, much of which is left over from the old legacy platforms like TCL/Tk, X11 and MacOS. +Right now it is one giant public cluster fuck of a C++ class that encapsulates the entire simulator. In the long term it would be good to refactor it into multiple classes that don't know as much about each other. But the prerequisite to that is to strip it down, minimalize and privatize it as much as practical, then judiciously build it back up by adding useful utilities and interfaces, to support all kinds of interesting views and editors. + +I've tried to do all the hard stuff first that requires intimate knowledge of the code and its history, and leave the stuff that is more obvious and straightforward (and fun) for other people to do. + +The C++ header file and source code is organized to reflect the files that the original code was arranged in. This was useful for the clean-up process, just getting the code to work, but now that it works, there is no reason for it to be organized the arbitrary way it is. + +For example there are several groups of randomly jumbled miscelaneuous functions, thunks, adaptors, compatibility libraries, glue, utilities, etc. Like functions that emulate old Mac APIs that are no longer necessary. They need to be ripped out and replaced by better organized code that does what is needed instead of doing what was being done for historical reasons. + +A typical example is the random number generator, which should be standardized and seedable (so it can be synchronized for the multi player game) and replaced with a much better one. Another example is the diverse set of formatting utilities (like money and time and text messages): those don't really belong in the core, because they should be part of the user interface layer because of internationalization issues. The core should just expose raw data like floating point numbers or dates, and the user interface should fish them out and format them according to the locale. + +Something that needs to be done systematically is to remove all strings hard coded into the code, and replace them with symbols that can be looked up by the user interface layer in translation files to display to the user. So any C++ code that formats messages should be rewritten to just expose the raw data, and then Python code should be written to take that data and properly format and display it so it can be internationalized and translated to other languages. + +There are a bunch of old Mac resource oriented things inherited from the old code, which are ugly and brittle, and only make it harder to internationalize the code and manage its resources. Anything that looks like it's using Mac resources should be rewritten to use a simpler lower tech way of accomplishing whatever it's trying to do, or defer the work and decisions to Python code if appropriate, and just export raw essential data out of the C++ code. + +It would be great for programmers to read over the C++ code with fresh eyes and write some notes and questions about "what the hell is it doing here" and "why is this so weird". Please send any notes or questions you have to me, and we can come up with a more detailed battle plan about what needs to be done to clean up and rationalize the code. + +-Don diff --git a/notes/DocTCL.txt b/notes/DocTCL.txt new file mode 100644 index 0000000..a5140f0 --- /dev/null +++ b/notes/DocTCL.txt @@ -0,0 +1,88 @@ +editorview .editor + -display host:0? + +.editor + configure ... + position ?x y? + size ?w h? + Pan ?x y? + ToolState ?state? + ToolMoveTo x y + ToolDragTo x y + PanStart x y + PanTo x y + Visible ?0..1? + KeyDown key + KeyUp key + TileCoord x y + +mapview .map + ?-display host:0? + +.map + configure ... + position ?x y? + size ?w h? + MapState ?0..8? + ZoneType ?0..3? + PopnRate ?0..1? + PoliceRadius ?0..1? + PanStart x y + PanTo x y + ViewAt x y + Visible ?0..1? + +sim + GameStarted + InitGame + SaveCity + GenerateNewCity + ReallyQuit + UpdateMaps + UpdateGraphs + UpdateEvaluations + UpdateBudgets + DoBudget + Pause + Resume + CheckLicense + StartBulldozer + StopBulldozer + MakeFire + MakeFlood + MakeAirCrash + MakeTornado + MakeEarthquake + MakeMonster + MakeMeltdown + SoundOff + LoadScenario 1..8 + LoadCity filename + SaveCityAs filename + MakeExplosion x y + InstallKey 0..1 key + MakeSound id + StartSound id + StopSound id + CityName ?name? + GameLevel ?1..2? + Speed ?0..7? + Delay ?int? + HeatSteps ?steps? + HeatFlow ?flow? + HeatRule ?rule? + Funds ?funds? + TaxRate ?0..20? + FireFund ?int? + PoliceFund ?int? + RoadFund ?int? + AutoBudget ?0..1? + AutoGoto ?0..1? + AutoBulldoze ?0..1? + Disasters ?0..1? + Sound ?0..1? + FlushStyle ?0..2? + MonsterGoal ?x y? + TornadoGoal ?x y? + HelicopterGoal ?x y? + MonsterDirection ?-1..7? diff --git a/notes/MultiPlayerIdeas.txt b/notes/MultiPlayerIdeas.txt new file mode 100644 index 0000000..0b12a36 --- /dev/null +++ b/notes/MultiPlayerIdeas.txt @@ -0,0 +1,474 @@ +Notice window + welcome + scenario descriptions + warnings + +zone status window + display live map picture + reconfigure to support various tasks + editors for chaging zone + invest $ => develop zone => increase land value + population density + crime prevention + environmental cleanup + enhance growth + +editor + pie menus + demand gauge + +budget + multi user dialog + hour glass timeout + auto budget toggle + pause/resume toggle (to allow changing budget while simulation is running) + +map + drag rectangles to pan map views + menus on palette + generate terrain mode + lengend + rearrange + switch overlays + dynamic zone finder + +graph + 2x3 palelet, 10/120 years + double buffering + communicate data. hard wire in c? + +evaluation + historical graphs? + +surveyor + other editors + +dynamic zone finder + washboard filter sliders + +get key dialog + +new city -- or "use map"? + "lobby" + name, level + scenario selection + random terrain generator + player can propose a city by selecting a scenario, loading a city, or generating a random terrain. + all players must vote unanimously on a city to play + selecting a new city clears all votes + players can press next/previous to page through proposed city history + you can go back to randomly generated terrains, because it saves the random number generator seed + clears votes, proposes new or old city + terrain editor todo: + Integrate terrain editor code into map editor, + and have a button on the new city map to run in terrain editor mode. + Terrain editor will include only terrain editing tools, + plus random terrain generation interface, + and simulator will be paused. + +print dialog + Newspaper printing and publishing metaphore. + + Optionally save a snapshot of the city state, to link to from the newspaper article. + + Publish in newspaper, print on paper, save to disk, copy to clipboard, + add to journal, blog, etc. + + Allow user to enter text to be printed along with an image, like blogging. + Can print any map or editor view with data overlay and chalk drawings, + entire map (fit on one page, or split across multiple pages), + or other windows like graph, evaluation, notices, messages, chat log, etc. + + Export text content as html with embedded images. + + Make an html/image city overview and journal, like The Sims family view and scrapbook. + + Printable windows and views should have a "print" button or function that pops up a + pie menu of possible destinations, for quickly making snapshots in your journal, etc. + + Publish illustrated newspapers in the game, like The Sims storybook, with newspaper + articles composed of pictures of the city, text excerpts from chat logs, etc. + + A player could be a "reporter" interviewing other player politicians via chat, + before and after the vote on building a stadium, asking them to make their case for + or against the stadium, and publish the interviews in the game's newspaper, the + "Micropolis Journal". + + Players can browse each others newspapers over the net, and download the city snapshots + the articles write about. + + Flash: Monster invades Micropolis, near nuclear reactor! + (story and link to saved city so you can read the story, then bring up the city and + play it live from the point the story was written) + +quit + confirm + multi player logout + +save dialog + +load dialog + +network city browsing and sharing + "What-If?" history tree. + Publish your cities on the net. + Download other peoples cities. + Use a URL to point to a saved city. + Grab a live snapshot of somebody's running city. + Checkpoint and branch timelines. + Save a city back to the point where it branched, + to create an alternate history that other players can load. + Multiple players build a tree of saved cities with branching alternate histories. + Like the parallel universes in Niven's All the Myriad Ways. + Rewind any city up the tree and select available alternate histories at each branch point. + Play back alternate histories edit by edit, stop them at any point and take over, + making a new branch point at that location. + When you play together in the same city, you have to discuss and agree with other players + about what to do, and convince other people of your ideas. + You can try an idea out yourself, by branching your own private history, + giving your idea a try, and reporting back to the other players in the main shared timeline + what happened (with links to the save file and history so other players can see for themselves). + GUI: Branching history tree outline viewer of saved files. + Drag and drop a history point into the chat log which other players can click on to open a + live view playing that history. + +status control + views + players + new player + new view + +Keep and export logs of simulation values + r, c, i demand + evaluation + tax rate, collected + funds + funding levels + event logs + simulation events + extend simulator to log all interesting simulation events, + so newspaper reporters can write stories about them + editing commands + Log enough information to replay all edits against a save file to recreate same city. + This is the key to high level multi player protocol between + multiple parallel lock-step simulations, like The Sims Online, + better than using low level x11 to implement the multi player + interface. + Treat any editing command as a "what-if" branch point where it could go another way. + Give players an easy interface to replay a simulation up to a branch point, and + and re-make the decision, to see how it would turn out differently. + chat logs + everything else of course + web service to access logs + export logs as xml for programs or csv for spreadsheets + import and export chalk overlay as vector drawing + support image overlays with transparency (begs for photoshop-like drawing interface)? + Careful how far down that road you go, because you could use it to paint the image of + a happy emerald green city over a dreary industrial wasteland. + The simple white chalk overlay has the advantage that you always know what's chalk and what's not. + opml outline with geo-codes + store city overlay information in opml + register the corners of the map with real-world lat/long values + allow rotation and scaling but not arbitrary shearing or distortion + register nodes of the opml outline at lat/long points and areas on the map + what's a good way to associate an opml node with an arbitrary area on the map? + an attribute with a polygon in lat/long coordinates? + a list of rectangles in lat/long coordinates? + a list of tiles in row/col coordinates? + associate geo-coded opml nodes with features on the map like + zones, buildings, streets, neighborhoods + use opml nodes to give names to features, + take notes about them, + attach pictures to them, + write stories about them, + support overlapping features, so roads can cross, + and each tile can belong to any number of features. + allow users to plant signs on the map, like micropolis 2000. + represent signs with an opml node. + signs can contains arbitrary opml outlines + with links to other opml nodes + like a sign at a crossroad, linked to the nodes representing each road, + and the regions of the city that the roads bring you to. + use opml to write a city guide + attach chalk overlays and signs to opml nodes so you can show and hide them hierarchically + +head window + Represents root window of Micropolis application to TCL, and ties all the other windows together. + Contains the application's main menus and scrolling message and chat log. + + An artifact of the way TCL/Tk/X11 works. + + With another gui, might be the main base window that contains all other subwindows. + + In X11, we depend on the user's chosen X11 window manager to manage all the separate windows. + + In a better world (Sugar) Micropolis should let users save and restore windows + configurations and multiple views, tailored for various roles and tasks. + + When a new player joins, the select a role to play, which will grant them + permissions and customize the interface, opening and positioning the appropriate + windows and tools for their role. + + Each role supports various tasks that might themselves reconfigure the user interface. + + User interface configurations should be selected based on the role and the task. + + Users first select a role that stays the same (forever or most of the time) + and which grants them a set of permissions. + + Each role supports a set of tasks (like Eclipse's "aspects"), which users may + switch between, to reconfigure the user interface. + + Players can hold elections to grant each other roles + (like mayor, treasurer, planner, builder, reporter, god, etc). + +Ownershop + + This vastly complicates the game, so I didn't try it, but I wrote down some ideas. + + Consider the screen area of the user interface it would require to + enable the user to micro-manage all the ownership issues, in terms of + the number of acres of city map it would cover. + + It seemed like it would be too complicated to be fun. + + Even if it could be magically implemented with a simple gui, would it be any fun? + + That said, here are some ideas. + + Ownership plane: 0 => nobody, 1-256 => user id + (note: Can't save ownership user ids into save files if we want multiple + players to enter and exit independently from the city itself, or if we + want to support an open-ended, possibly large number of players over time. + As I said, this gets complicated pretty fast, without a lot of beneficial fun.) + + Players have separate funds. + This raises issues about: who gets paid how much of the city's overall income, + and who pays for city services? + + Could have a main shared city budget, then certain players can be appropriated + funds from that budget earmarked to perform various tasks. + But again, that gets pretty complicated, and how is it fun? + + Competition or cooperation? + Should we attempt to make the game support competition between players, + or is it better to keep it cooperation-oriented, by requiring unanimous votes, + sharing the budget, etc. + + I think it's simpler and more educational to give players the freedom to misbehave, + while building in social networking and accountability, to let players discuss, + negotiate, make and break deals, establish reputations, reward good behavior, + and punish bad behavior, by developing real-world social interaction skills. + + What fun would politics be if you couldn't have scandals? + + Land value + higher resolution land value grid + effected by sales + + asking price + Tiles are owned by someone, and may be for sale, and given an asking price by the owner. + Requires complex user interface for selecting tiles, assigning price, etc. + How is that fun? + Groups of tiles: parcels of land, for sale all at once, to highest bidder. + M.U.L.E.-like multi player auctions for land. + Developers can build on empty tiles that are for sale, and they're bought automatically. + What's so fun about being a developer? Nothing to do after setting the price of the land. + Buyers can offer to buy something that doesn't have a price, which initiates an + M.U.L.E. dialog with the owner, and allows other players to join in the auction, + submitting their own bids. + + Transaction tool - $ (or local currency symbol) + select group of cells + negitiate deals with the owners + automatically calculates default land value suggested price (upon which the tax rate based) + based on modified land value through worth + + communication window + so people can negotiate and talk + irc-like chat rooms where people can have a side discussion + private person-to-person messages + + calculate evaluation for each player + Independent and combined scores and statistics. + Hard to define what this means in terms of the current simulation. + Would have to deeply change the way the simulation works, + but then would it still be fun? + + Zone ownership. + Develop Micropolis into a more Monopoly-like game: SimCitopoly. + A player can own power plants and other utilities, and makes money + by selling electricity and other services to other players. + Zones don't develop until someone buys them. + Own residential => collect rent, pay maintainence. + Own industrial, commercial => collect income, pay expenses. + All zone owners pay taxes. + +Multi player editig tools + + Recast editing tools/cursors as sprites/robots. + Navigate tools around the map like a turtle/car/helicopter. + Also move tools with the mouse. + + Alternative interfaces: + + Tool cursor follows cursor all the time. (current "traditional" + implementation) + + Relegates pie menu and panning to secondary status: shift/option keys. + + Move tool while shift or option key is down. + + Makes it possible to put the pie menu or pan tool on the + primary unshifted mouse click/drag gesture. + + Pick up and drag tool. + + Properties the interface should support: + + Direct manipulation. + + http://en.wikipedia.org/wiki/Direct_manipulation + + Continuous representation of objects of interest, and rapid, + reversible, incremental actions and feedback. + + Real-world metaphores for objects and actions. + + Allow a user to directly manipulate objects presented to them, + using actions that correspond at least loosely to the physical + world. + + Pick up, drag and manipulate and edit first class objects like + tools, sprites, robots, avatars, etc. + + First person. + + Represent users with in-game avaters. + + Relative polar coordinate system. (Logo turtle graphics.) + + http://en.wikipedia.org/wiki/Turtle_graphics + + Drive the helicopter around on the map. + + Keys to relatively rotate clockwise, counter-clockwise. + + Keys to turn to absolute directions (N/S/E/W/NW/NE/SW/SE + keypad). + + Keys to go forward and backward in the current direction. + + Keys to strafe left and right of the current direction. + + Also a remote control panel with graphical control for the mouse. + + iPhone app that lets you remotely control the helicopter + (or whatever) form your iPhone. + + Doesn't even need to support editing the map. Just fly + around and chat. (voice chat?) + + Operate avatar with keyboard, game controller, control panel, + etc. + + Natural language based. + + http://en.wikipedia.org/wiki/Natural_language_user_interface + + Text command interface in chat window. + + Fully usable via keyboard input and speech recognition. + + Conversational interface with intelligent, helpful "chat bots", + as well as on-line teachers and mentors. + + Educators and entertainers can write interesting, informative + personality simulation scripts for chat bots, that interactively + chat with students playing the game, answer frequently asked + questions, perform various utilities (like a banker or loan + shark you can borrow money from), and refer them to web links, + wiki pages, discussion groups, etc, for more information and + interaction with real people. Scripts can be triggered by + pattern matching on chat text from player, or monitoring game + events and conditions. Chat bots can remember things about + players, and continuously tell long stories and share + personalized knowledge over a long period of time. + + Text based command interface inspired by ideas from Jeff and Aza + Raskin's work. + + The Humane Interface + + http://en.wikipedia.org/wiki/The_Humane_Interface + + The book puts forward a large number of interface design + suggestions, from fairly trivial ones to radical ones. The + overriding theme is that current computer interfaces are + often poor and set up users to fail, as a result of poor + planning (or lack of planning) by programmers and a lack of + understanding of how people actually use software. + + Ubiquity + + http://en.wikipedia.org/wiki/Ubiquity_(Firefox) + + Ubiquity, an add-on for Mozilla Firefox, is a collection of + quick and easy natural-language-derived commands that act as + mashups of web services, thus allowing users to get + information and relate it to current and other webpages. It + also allows Web users to create new commands without + requiring much technical background. + + Multi-player tools that require more than one person to operate. + + The X11 multi player version required players to vote on expensive + zones including stadiums, seaports, nuclear power plants, coal + power plants and airports. + + When a player places an expensive zone, it is not immediately + drawn on the map. + + Instead, a shadow is cast over the tiles + where it would be placed, and the zone is animated bouncing up + and down above the shadow. + + This draws the user's attention, and makes it obvious that the + zone has not been "plugged in" yet. + + A "voting dialog" opens up in a window, that says "Don has + proposed to build a nuclear power plant for $5000. Do you + support that proposal?", with an animated view of the bouncing + building, and a "YES" and "NO" button. Or a hand with a thumb, + that you can turn up or down (a two item pie menu). + + Besides pressing the "YES" button, There is a shorthand way to + vote yes to a proposal: select the same tool, and draw the same + zone in the same place. + + When enough people have voted for the proposal (unanimous), the + zone lowers down, plugs into place, and starts simulating. + + Ideas for new design for multi player building tools: + + It takes several people to agree to buy an airport, and where to + put it. + + In-game voting dialog, around the proposed site of a building. + + Like the bouncing buildings in the X11 multi player game, but + with a in-game voting interface on the map, instead of in a + separate dialog. (direct instead of indirect manipulation) + + When you place an airport, it doesn't actually get built + immediately. It just places a "proposal" hovering over the map, + represented by a suitably ghosted image of the airport, floating + up and down, with adjacent text describing the proposal and + voting buttons. + + I think this is simpler and more "local" than the X11 voting + interface, since the text and voting controls are drawn over the + map next to the zone, instead of displayed them in a separate + window. Also, several proposals can be going on at the same time + at different (or the same!) places on the map, which the X11 + version did not support. diff --git a/notes/OLPC-notes.txt b/notes/OLPC-notes.txt new file mode 100644 index 0000000..fd9db9b --- /dev/null +++ b/notes/OLPC-notes.txt @@ -0,0 +1,366 @@ +Micropolis for OLCP Sugar User Interface +By Don Hopkins (dhopkins@DonHopkins.com) + +Why is Micropolis such a great match for OLPC's Sugar interface? + +Constructivist education. + Children learn by doing and experiencing. + Playful learning (as opposed to edutainment). + People learn effectively through making things. + Micropolis is often mentioned as a great example of an educational, + constructivist game, in the academic literature and popular press. + +Multi player + Sharing, collaborating, conferencing, voting. + +Writing journals about Micropolis + The Micropolis Journal: newspaper metaphore. + +Drive the development and prove the worthyness of the technology. + + Develop Micropolis hand-in-hand with Sugar, so they synergize with each other. + + I developed the HyperLook version of Micropolis in parallel with the + HyperLook user interface environment, and they both were better + because of it. Micropolis required HyperLook to support useful + multimedia extensions like a shared audio mixer server, an efficient + shared memory based bitmap animation system, and integration with + TNT Open Look user interface components (sliders, pin-up menus, + buttons, etc). And Micropolis was able to take full advantage of + HyperLook's features like outline graphics, scaling images, + graphical editing, printing PostScript, etc. Micropolis was extremely + useful as an engaging promotional demonstation that proved the + capabilities and quality of HyperLook. + +Use Micropolis to showcase the unique ideas and features of Sugar, in an +exciting way that many people can easily understand. + +CSound audio mixer. +Mesh networking. +D-bus messaging system. +Python scripting langauge. +GTK widgets. +Pie menus. +Communication and conferencing. +Chat, shared whiteboard, voting interface. +Learn to work together with other people, and argue your ideas. +Politics. Interpersonal communication and cooperation. +Immersive microworlds. +Inspire and teach kids to program. +Virtual datalogger, tricorder, lets you export and analyze logs and data from simulation. +Micropolis courseware. +Teach ecological and environmental issues. +Social studies. +Creative writing, developing language skills. +Science education. + +======================================================================== + +Notes on adapting Micropolis to the OLPC Sugar user interface: + +Core Ideas: + + Activities, not Applications + + First cut: + + Integrate the current TCL/Tk version of Micropolis to run as a simple activity within Sugar. + + Restructure the multi-window TCL/Tk code to run in a single full screen window. + Implement a simple activity-oriented tiled window management interface. + Disable advanced features like multiple editor and map windows, + that require more sophisticated window management. + Instead of using a traditional multi-window management approach, + + Make a simple wrapper around it that makes it appear in the Sugar user interface as an activity, like eToys does. + + Long term: + + Implement activity specific modes that reconfigure the user inteface (like Eclipse "perspectives"). + - build/edit oriented interface + - query/analysis oriented interface + - financial oriented interface + - communication/coordination oriented interface + - dynamic zone finder analysis + - grid of several overall map views, each configured to show a different overlay. + - grid of several close-up map views, each centered on a different parts of the city (or tracking a player's cursor) + + Collaboration: Enhance multi player mode to support sharing activities. + Both publishing your game for others to clone and play themselves (massively single player, like Spore), + and letting others join in your game (like the current cooperative multi-player mode)). + Multi player inte + + Expression: Enhance chat, journaling, storytelling, and personalization aspects of the game. + + Journaling: Record all events (both user edits and simulation events), chat messages and drawings. + Checkpoint the game state, and implement the ability to deterministically replay time stamped + editing events into the simulation, so you can fast forward and rewind from any checkpoint to + any step of the simulation. + Enable players to write newspaper articles about the cities, with live links to a snapshot + of the simulation and a place on the map, related to the story. Other players could browse + their published newspapers about the history of a city, and jump into that history at any time + from any story. + + Iteration: Checkpoint game save files, allowing players to rewind history, and try "what-if" experiments. + + Presence is Always Present + + First cut: + + Enhance the current X11 based multi player interface to support presence, the grid network, and messaging. + The current multi player interface runs a single Micropolis process on one laptop, + which connects to the local X server, and/or several other X servers on laptops over the net. + Rewrite the "Add User" dialog to be grid-network aware. + Instead of asking for an X server DISPLAY screen, provide a list of friends on the network. + Send an invitation to play to friends on the network. + Rewrite the built-in chat interface to integrate with the chat system used by Sugar. + Improve the shared "white board" overlay, so kids can draw on the map in different colors, + enable and disable different overlays, save overlays with the map, add text to overlays, etc. + Implement location based chat, by overlaying people icons and chat bubbles on the map. + Each player has a people icon "cursor" that they can move around the map (which follows + their selected editing cursor), and their chat messages show up in bubbles overlayed on the map. + When you select an editing tool, you can type what you're doing with the tool, + other people will be able to watch you, and make comments on what you're doing. + + Long term: + + Rewrite Micropolis in terms of Python/GTK/Cairo, and take full advantage of the Sugar libraries and services. + Support sharing, mentoring, colaboration, voting, political dialogs, journaling, etc. + Develop Micropolis into a exemplary, cutting edge demonstration of all that's great about Sugar. + + Tools of Expression + + Micropolis is great at supporting personal expression, interpretation and storytelling, + and leveraging what the player already knows to make connections to new knowledge, + and stimulating conversation, debate and analytical thinking. + + Develop a web based "Wikipedia" oriented interface to Micropolis, supporting colaboration, discussion, + annotation, history journaling, and branching alternative histories. + + Journaling + + The "Micropolis Journal" could be realized as a web-based + newspaper-like interface. + + Expose the multi player user interface through the web, instead of + using X11. + + Automatically generate a newspaper for any particular time in a + city's history, from the simulator events and state, combined with + user written articles and chat messages. + + The newspaper has sections that present automatically generated + snapshots of the information displayed in the various dialogs + (graph, evaluation, chat, notices, etc), and stories about + significant events (both user-generated and simulation-generated). + + Enrich the city save file with metadata including the chat and + event journal, overlays, snapshots at different points in time (in + a branching "what-if" tree structure), etc. + + In the Python version of Micropolis it will be easy to implement a + web server based interface that lets users read the city's + newspaper through the web browser, automatically inserting + pictures of the map corresponding to particular events in time. An + article about pollution going down could show a before and after + overall map with the polution overlay, and stuff like that. + + Plug in modules to the simulator that analyze the state of the + city and generate events for the newspaper to write articles + about, including interesting stastical information and other + parameters to insert into the story template. + + Implement "online surveys" that let newspaper readers vote on proposals + (expose the voting interface to web based users). + + Use OpenLaszlo to develop a rich graphical AJAXian web service + based Micropolis interface, eliminating the need for the X11 + interface, and enabling all kinds of interesting interface + customizations and mash-ups with other web services. + +Know your Audience + + Inexperienced + + Keep the user interface simple, low surface area, direct, obvious, redundant, forgiving. + Gentle learning curve. Self revealing interface. Direct manipulation. + Integrated help and educational content. + Playback journals with voice-overs, so kids can learn by watching and listening to + recordings of teachers playing and describing what they're doing. + Multi player support for mentoring. + + Young + + Micropolis appeals to a wide range of age levels. + + Design the user interface to support zooming, use large colorful + graphics, etc. + + Do not require high coordination, fine pointer positioning, moving + the mouse while holding down the button, etc. + + Scale across age levels by using interfaces that clearly reveal + themselves to novice users, but can be reconfigured by more + experienced users to be more streamlined. + + For example, from the current interface: the map editor window has + a palette of editing tools, which makes it easy for novice users + to see and learn all the available editing commands, but consumes + precious screen space. + + It also provides pie menus as a short cut to the palette, which + are layed out in the same arrangement as the palett (so the + palette serves as a map to the pie menus). Intermediate users can + use the palette as a map, to help learn the pie menus, and when + they are more experienced, they can close the palette to make the + map bigger, and use the pie menus exclusively. + + The pie menus themselves are self-revealing, and have their own + gradual learning curve that supports graduation from inexperienced + users (click the menu up, look at the screen, move in the + direction, select the item), intermediate users (press down and + move in the direction, look at screen to make sure the right item + is selected, then select the item), and advanced users (mouse + ahead in the correct direction without looking at the screen). + + International + + The text in Micropolis needs to be broken out into external files so + it can be translated to different languages. + + The Micropolis documentation, supporting essays about city planning, + and study guides need to be translated. + + Best to do this after converting to Python/GTK/Cairo, since the + old version of TCL/Tk that Micropolis currently uses does not support + unicode or i18n. + + Dig up the tile sets for different kinds of cities (old west, + european, futuristic, moon base, etc), develop new tile sets, and + enable children to easily develop their own tile sets and + interface skins. + +Key Design Principles + + Performance + + Micropolis was designed to run well in a C64. + + I've profiled and optimized it to run efficiently on Unix, and + take optimal advantage of the X11 window system. + + Usability + + Micropolis is fairly usable and approachable, but every effort should + be made to improve it, take maximum advantage of the Sugar user + interface, and for Micropolis to serve as a good example of Sugar + interface design, for others to emulate. + + Simplicity + + Some of the advanced features of the multi player X11 version of + Micropolis (like multiple map views and editors) will have to be + temporarily sidelined, and eventually reimplemented in simpler, + activity-oriented ways. + + Reliability + + Micropolis is currently pretty robust and can run for an indefinite + time without leaking memory or crashing. + + The scripting language interface should try to protect against hard crashes, + but once you open it up to scripting, there are an infinite number of ways + programmers could make mistakes. + + Security + + The code should be audited for security. + + User access to the scripting language and network remote control + code should be disabled. + + Currently it allows any users to type TCL expressions, which is + great for cheating, but bad for security. + + Currently there is some code in there to enable network remote + control (setting the tax rate and other parameters via a midi + slider box on a Mac running Bounce/Body Electric that sends UDP + packets to Micropolis when the user changes the slider). That should + be disabled (and eventually be replaced by a secure web service + based network interface.). + + Adaptability + + Adapt to different screen display modes and resolutions. Micropolis + has a high contrast monochrome tile set that it could use in + monochrome mode. + + The color tiles look great in monochrome mode with gray scales, + but the high contrast monochrome tiles might be easier to see. + + Need to support zooming into the map with any magnification, like + google maps (or the old PostScript-based HyperLook version of + Micropolis). + + Support playing Micropolis with the game controller in book mode. + + Instead of using X11 for multi player interaction (which will + cause the application to crash horribly if the network connection + is lost), reimplement the multi player mode on top of the dbus + messaging system, so it is more robust, and every player runs + their own instance of the simulator, so they all simulate together + in lock-step, like The Sims Online. + + Recoverability + + Use checkpointing and journaling to implement automatic back-up, + and expose a "rewind/fast forward" interface to the user, so they + can back up, change history, and replay changes at any point in time. + + This is also the key to implementing a more advanced multi player + interface (better than the current X11 based system, more like The + Sims Online, where everyone runs their own copy of the simulation + in lock-step), so anyone can join the game by cloning its current + state, subscribing to its edit event stream, and submitting all + their edits to the master simulation (or going through the voting + negotiation system, like the current voting interface for building + expensive items and changing the tax rate). + + Solve the colaborative undo/redo problem by allowing children to + branch out to their own private alternative histories. Instead of + overwriting the one main history, it inserts a branch point into + the shared history that links to their own private Idaho, which + itself may branch out into many histories. See Larry Niven's "All + the Myriad Ways". + + Interoperability + + Exposing Micropolis as a set of web services would enable all kinds + of interesting mash-ups and rich web based user interfaces. + + Mobility + + Support playing Micropolis in book mode with the game pad. + + Transparency + + The "view source" button could bring up the Micropolis source code. + Develop some source code documentation and extend the "How the + Simulator Works" documentation to link into the appropriate source + code. Annotate the C and Python source code to better explain how + it works. + + Encourage children to learn Python programming (rather than + focusing on the C source code). Develop a robust Python scripting + interface that lets you hook into and control all aspects of the + simulator. Enable users to develop various kinds of Micropolis + plug-ins (buildings, editing tools, agents, disasters, etc) that + are easily scripted in Python, by subclassing. + + Accessibility + + Enable full keyboard control. + Enable full game pad control. + Enable full network control. + Speech synthesis and recorded voice feedback. + Zooming interface. diff --git a/notes/PLAN.txt b/notes/PLAN.txt new file mode 100644 index 0000000..e929094 --- /dev/null +++ b/notes/PLAN.txt @@ -0,0 +1,317 @@ +Plan for developing Micropolis for OLPC and other platforms. + +DONE: + + First, get the old TCL/Tk/X11 version cleaned up and running on + the current OLPC platform, and passed through EA's legal and + quality assurance process. + +DONE: + + Screen depth and size: fixed size of OLPC screen. + Window management: one window. + Simplify window management. Single map and editor view. Tiled graph and evaluation windows. + Rearrange startup screen so it works in the full window mode. + Make budget window and file dialogs be transient popup windows. + Add "Enable/Disable Auto Budget" button to budget window. + Click on small R/C/I gauge to toggle evaluation window. + Click on small graph to toggle graph window. + Click on funds or tax rate to show budget window. + Disable multi player features by default (added -m flag to enable multi player mode). + Disable other experimental features (cellular automata, dynamic query, etc). + Add -S flag to enable Sugar features, and TCL access to test flag. + Enable audio: Use Sugar audio server. + Convert sounds to new audio format (currently wav). + + Fix fonts. + Pick nice Sugar fonts to use, based on Sugar flag. + + Make Sugar activity wrapper in Python. + +TODO, in progress: + + Update manual and documentation. + + Put new graphics and icons into interface and menus. + +DONE: + +Replace TCL/Tk with Python/GTK, and use Pango/Cairo for graphics. + + Implement custom components in PyGTK. + Map view. + Editor view. + Date view. + Graph view. + Pie menus. + Cellular Automata Machine view. + +DONE: + +Implement web based interface with TurboGears/Cairo/OpenLaszlo/Flash/AMF. + +TODO for OLPC: + + Integrate with Sugar and OLPC hardware. + Audio. + Support CSound audio mixer. + Switch to a smaller audio format. + Record better sounds. + Internationalization. + Graphics. + Hires monochrome. + SVG graphics and icons. + Create better icons. + Sugar integration. + Integrate with OLPC activity system, window manager, etc. + Rework user interface to follow Sugar user interface guidelines. + Keyboard control. + Support OLPC keyboard layout and device buttons. + Game keypad interface for book mode. + Optimization. + Optimize power management. + Optimize size. + Optimize speed. + Documentation. + Integrated help, tutorials, essays on city design from manual, etc. + Voiceovers, demos, journal playback. + Courseware. + Map annotation. + Journaling. + Event history. + Edit history. + Checkpointing. + Branching histories. + Rewinding and fast forwarding. + Publishing newspaper articles linking to save files. + URL to link into a city at a particular location on the map. + Grid networking. + Multi player stupport. + Sharing cities. + Colaborative editing. + Voting. + Chat. + White board. + +TODO for Education: + + Educational. + Bring old Micropolis courseware up to date, and integrate with the game. + Export simulation data to spreadsheet or xml. + Creative writing, storytelling, newspaper reporting, blogging, etc. + Scenarios and experiments. + What-if? + Branching history at decision point, and comparing different results. + Scripting. + Open up the simulator to Python. + Web services to remotely monitor and control simulation. + HTML or AJAX web server remote control interface. + Support multi player interactions through web server. + Submit a proposal to build a stadium over the web. + Style it like a real civic government web page, that allows citizens to participate online. + Enable extending the graphics, tiles, sprites. + Enable programming behaviors, defining new zones, new global variables, overlays, etc. + Cellular automata. + Visual programming. + Programming by example. + KidSim, AgentSheets. + Robot Odyssey. + +TODO for Programming: + + Visual Programming + + Simplify the Micropolis interface and make it easier for kids to + use it with the game controller, in a way that will support + multi player interaction. + + Collapse the separate concepts of game editing tool (bulldozer, + road, residential zone, etc) and agent (sprites like the + monster, tornado, helicopter, train, etc). + + Agents with specialized tool represent different roles that kids + can play. A bunch of kids can join together and play different + roles at the same time in the same city. Instead of having a + bunch of editing tools to switch between, you have a bunch of + different agents you can drive around the map, like using a + monster to crush things instead of a bulldozer, or riding around + in a helicopter to scroll around and observe the map. Make a + meta-game like pokemon trading cards or magic the gathering, + about acquiring and deploying and using agents on the map. Give + agents different budgets and constraints. + + Use an agent to represent a user in the world, and control an + editing tool. You see other users in the map driving around + their editing tool agents. + + Each editing tool can be associated with a particular agent, + with a keyboard/game controller based user interface for moving + around, as well as a mouse based interface for picking it up and + dragging it around. + + The road tool becomes a road building vehicle, that you can + easily move up/down/left/right/diagonally with the game + controller directional input. Requires much less coordination to + draw straight roads than with a mouse. + + The bulldozer tool becomes an actual bulldozer that you can + drive around the map, crushing things in your wake. + + This makes the game easily usable by little kids in book mode. + + Also support small children using Micropolis like a drawing tool or + etch-a-sketch, simply doodling with the editing tools for the + visceral pleasure of it, and setting fires and other disasters + to watch it burn and mutate. + + Logo Turtles (as a generalization of the monster, tornado, + helicopter, etc) + + Implement programmable logo turtles as agents that can move + around on the map, sense it, and edit it. + + Like Robot Odyssey agents, so you can go "inside" an agent, + and travel around with it, operate its controls, read its + sensors, and automate its behvior by wiring up visual programs + with logic and math and nested "ic chip" components. + + Plug in graphics to represent the agent: use classic logo + turtle and Micropolis sprites, but also allow kids to plug in + their own. + Micropolis sprites have 8 rotations. + SVG or Cairo drawings can be rotated continuously. + + Re-implement the classic Micropolis agents like the monster, + tornado, helicopter, train, etc in terms of logo turtles, that + kids can drive around, learn to use, open up and modify (by + turning internal tuning knobs, or even rewiring). + + Let kids reprogram the agents to do all kinds of other stuff. + + Mobile robots, that you can double click to open up into + Robot-Odyssey-esque visual program editors. + + Agents have local cellular-automata-like sensors to read + information about the current and surrounding tiles. + + KidSim / Cocoa / StageCraft Creator let kids define visual + cellular automata rules by example, based on tile patterns and + rules. Show it a pattern that you want to match by selecting + an instance of that pattern in the world, then abstract it + with wildcards if necessary, then demonstrate the result you + want it to change the cell to in the next generation. + + Sense high level information about zones and overlays, so the + agents can base their behavior on any aspect of the world + model. + + Support an extensible model by allowing users to add more + layers. + + Add layers with arbitrary names and data types at + different resolutions: + + byte, int, float, n-dimensional vector, color, boolean + mask, musical note, dict, parametric field (i.e. perlin + noise or other mathematical function) at each cell, etc. + + Edit the world. + + All Micropolis editing tools (including colored pens that draw + on overlays) should be available to the agent. + + Enable users to plug in their own editing tools, that they + can use themselves with the mouse, keyboard or game + controller, or program agents to use to edit the map under + program control. + + Robot Odyssey + + Build your own universal programmable editing tool. + Roll your own von Neuman Universal Constructor. + Smart robots you program to perform special purpose editing tasks. + + The "Painter" picture editing program had a way of recording + and playing back high level editing commands, relative to the + current cursor position. + + Remixing. Journaling. Programming by demonstration or example. + You could use a tape recorder to record a bunch of Micropolis + editing commands that you act out (or you can just select them + from the journal), then you can play those tapes back with + relative coordinates, so they apply relative to where the + agent currently is on the map. You can copy and paste and cut + and splice any editing commands into tapes that you can use to + program the robot to play back in arbitrary sequences. + + Program an urban sprawl development-bot to lay out entire + residential subdivisions, complete with zones, roads, parks and + wires. Then program a luddite roomba-bot that sucks them all + up and plants trees in their place. + + This becomes really fun when we let players plug in their own + programmed zones for the robot to lay out, and layers of data + to control the robot's behavior, out of which they can program + their own cellular automata rules and games (like KidSim / + Cocoa / StageCraft Creator). + +======================================================================== +-- +Micropolis, Unix Version. This game was released for the Unix platform +in or about 1990 and has been modified for inclusion in the One Laptop +Per Child program. Copyright (C) 1989 - 2007 Electronic Arts Inc. If +you need assistance with this program, you may contact: + http://wiki.laptop.org/go/Micropolis or email micropolis@laptop.org. + +This program 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. + +This program 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 this program. If +not, see . + + ADDITIONAL TERMS per GNU GPL Section 7 + +No trademark or publicity rights are granted. This license does NOT +give you any right, title or interest in the trademark SimCity or any +other Electronic Arts trademark. You may not distribute any +modification of this program using the trademark SimCity or claim any +affliation or association with Electronic Arts Inc. or its employees. + +Any propagation or conveyance of this program must include this +copyright notice and these terms. + +If you convey this program (or any modifications of it) and assume +contractual liability for the program to recipients of it, you agree +to indemnify Electronic Arts for any liability that those contractual +assumptions impose on Electronic Arts. + +You may not misrepresent the origins of this program; modified +versions of the program must be marked as such and not identified as +the original program. + +This disclaimer supplements the one included in the General Public +License. TO THE FULLEST EXTENT PERMISSIBLE UNDER APPLICABLE LAW, THIS +PROGRAM IS PROVIDED TO YOU "AS IS," WITH ALL FAULTS, WITHOUT WARRANTY +OF ANY KIND, AND YOUR USE IS AT YOUR SOLE RISK. THE ENTIRE RISK OF +SATISFACTORY QUALITY AND PERFORMANCE RESIDES WITH YOU. ELECTRONIC ARTS +DISCLAIMS ANY AND ALL EXPRESS, IMPLIED OR STATUTORY WARRANTIES, +INCLUDING IMPLIED WARRANTIES OF MERCHANTABILITY, SATISFACTORY QUALITY, +FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT OF THIRD PARTY +RIGHTS, AND WARRANTIES (IF ANY) ARISING FROM A COURSE OF DEALING, +USAGE, OR TRADE PRACTICE. ELECTRONIC ARTS DOES NOT WARRANT AGAINST +INTERFERENCE WITH YOUR ENJOYMENT OF THE PROGRAM; THAT THE PROGRAM WILL +MEET YOUR REQUIREMENTS; THAT OPERATION OF THE PROGRAM WILL BE +UNINTERRUPTED OR ERROR-FREE, OR THAT THE PROGRAM WILL BE COMPATIBLE +WITH THIRD PARTY SOFTWARE OR THAT ANY ERRORS IN THE PROGRAM WILL BE +CORRECTED. NO ORAL OR WRITTEN ADVICE PROVIDED BY ELECTRONIC ARTS OR +ANY AUTHORIZED REPRESENTATIVE SHALL CREATE A WARRANTY. SOME +JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF OR LIMITATIONS ON IMPLIED +WARRANTIES OR THE LIMITATIONS ON THE APPLICABLE STATUTORY RIGHTS OF A +CONSUMER, SO SOME OR ALL OF THE ABOVE EXCLUSIONS AND LIMITATIONS MAY +NOT APPLY TO YOU. diff --git a/notes/ROADMAP.txt b/notes/ROADMAP.txt new file mode 100644 index 0000000..a861d4d --- /dev/null +++ b/notes/ROADMAP.txt @@ -0,0 +1,263 @@ +======================================================================== + +Roadmap of the Micropolis source code. + +======================================================================== + +Micropolis designed and implemented by Will Wright, +Unix porting, optimization and multi player user interface design +by Don Hopkins (dhopkins@DonHopkins.com), for DUX Software. + +======================================================================== + +Documentation: + + manual + User manual and help page templates. + + src/notes + Notes, to-do lists, lists of potential bugs to work on, and screen + snapshots. + +Resources: + + res + + Resources, data, TCL code, etc. + + Modified standard TCL/Tk widget libraries to support multiple + displays, by removing uses of global variables, and instead + storing screen-specific data in tk_priv map, + keyed by "@" where screen is + "[winfo screen $w]", the screen identifier. + + Data files: + hexa.112 + hexa.232 + hexa.384 + hexa.385 + hexa.386 + hexa.387 + hexa.388 + hexa.456 + hexa.544 + hexa.563 + hexa.999 + + Scenarios: + snro.111 + snro.222 + snro.333 + snro.444 + snro.555 + snro.666 + snro.777 + snro.888 + + String resources: + stri.202 + stri.219 + stri.301 + stri.356 + + Audio files: + aaah.au + a.au + airport.au + beep.au + boing.au + bop.au + build.au + bulldoze.au + chalk.au + coal.au + com.au + computer.au + cuckoo.au + e.au + eraser.au + expl-hi.au + expl-low.au + fire.au + honk-hi.au + honk-low.au + honk-med.au + ignition.au + ind.au + monster.au + nuclear.au + o.au + oop.au + park.au + police.au + quack.au + query.au + rail.au + res.au + road.au + rumble.au + seaport.au + siren.au + skid.au + sorry.au + stadium.au + traffic.au + uhuh.au + unix.au + whip.au + wire.au + woosh.au + zone.au + + Modified TCL/Tk standard library code: + + button.tcl + Modified to support multiple displays. + menu.tcl + Modified to support multiple displays. + text.tcl + Modified to support multiple displays. + tk.tcl + Modified to support multiple displays. + buildidx.tcl + entry.tcl + init.tcl + listbox.tcl + mkindex.tcl + parray.tcl + tclinit.tcl + tkerror.tcl + wish.tcl + wishx.tcl + tclindex + tcl.tdx + tcl.tlb + tk.tdx + tk.tlb + + Micropolis user interface code: + + micropolis.tcl + Micropolis utilities and shared interface code. + help.tcl + Micropolis help messages. + wask.tcl + Ask question window. + wbudget.tcl + Budget window. + weditor.tcl + Map editor window. + weval.tcl + Evaluation window. + wfile.tcl + File open window. + wfrob.tcl + Frob window (dynamic zone finder sliders). + wgraph.tcl + Graph window. + whead.tcl + Head main application window. + whelp.tcl + Help window. + wmap.tcl + Map overview window. + wnotice.tcl + Notice message window. + wplayer.tcl + Add player window. + wscen.tcl + Choose scenario window. + + Micropolis sound server code: + + sound.tcl + Code loaded by sound server, + which runs in another process, + and is controlled via the TCL "send" command. + No longer used. + Sound should be built into Micropolis, using a modern standard sound library (and file formats). + +Base Libraries: + + src/tcl + TCL language interpreter. + Free software. + Modified for unix porting. + + src/tk + Tk user interface toolkit. + Free software. + Modified for unix porting, multiple display support, various extensions and bug fixes. + See src/notes/to.ouster (message about multiple display support), + src/notes/TkVersion (description of origin and changes in tk) + + src/tclx + Useful extensions to TCL/Tk. + Free software. + Modified for unix porting. + +Micropolis source code: + + src/sim + + src/sim/terrain + +======================================================================== +Micropolis, Unix Version. This game was released for the Unix platform +in or about 1990 and has been modified for inclusion in the One Laptop +Per Child program. Copyright (C) 1989 - 2007 Electronic Arts Inc. If +you need assistance with this program, you may contact: + http://wiki.laptop.org/go/Micropolis or email micropolis@laptop.org. + +This program 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. + +This program 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 this program. If +not, see . + + ADDITIONAL TERMS per GNU GPL Section 7 + +No trademark or publicity rights are granted. This license does NOT +give you any right, title or interest in the trademark SimCity or any +other Electronic Arts trademark. You may not distribute any +modification of this program using the trademark SimCity or claim any +affliation or association with Electronic Arts Inc. or its employees. + +Any propagation or conveyance of this program must include this +copyright notice and these terms. + +If you convey this program (or any modifications of it) and assume +contractual liability for the program to recipients of it, you agree +to indemnify Electronic Arts for any liability that those contractual +assumptions impose on Electronic Arts. + +You may not misrepresent the origins of this program; modified +versions of the program must be marked as such and not identified as +the original program. + +This disclaimer supplements the one included in the General Public +License. TO THE FULLEST EXTENT PERMISSIBLE UNDER APPLICABLE LAW, THIS +PROGRAM IS PROVIDED TO YOU "AS IS," WITH ALL FAULTS, WITHOUT WARRANTY +OF ANY KIND, AND YOUR USE IS AT YOUR SOLE RISK. THE ENTIRE RISK OF +SATISFACTORY QUALITY AND PERFORMANCE RESIDES WITH YOU. ELECTRONIC ARTS +DISCLAIMS ANY AND ALL EXPRESS, IMPLIED OR STATUTORY WARRANTIES, +INCLUDING IMPLIED WARRANTIES OF MERCHANTABILITY, SATISFACTORY QUALITY, +FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT OF THIRD PARTY +RIGHTS, AND WARRANTIES (IF ANY) ARISING FROM A COURSE OF DEALING, +USAGE, OR TRADE PRACTICE. ELECTRONIC ARTS DOES NOT WARRANT AGAINST +INTERFERENCE WITH YOUR ENJOYMENT OF THE PROGRAM; THAT THE PROGRAM WILL +MEET YOUR REQUIREMENTS; THAT OPERATION OF THE PROGRAM WILL BE +UNINTERRUPTED OR ERROR-FREE, OR THAT THE PROGRAM WILL BE COMPATIBLE +WITH THIRD PARTY SOFTWARE OR THAT ANY ERRORS IN THE PROGRAM WILL BE +CORRECTED. NO ORAL OR WRITTEN ADVICE PROVIDED BY ELECTRONIC ARTS OR +ANY AUTHORIZED REPRESENTATIVE SHALL CREATE A WARRANTY. SOME +JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF OR LIMITATIONS ON IMPLIED +WARRANTIES OR THE LIMITATIONS ON THE APPLICABLE STATUTORY RIGHTS OF A +CONSUMER, SO SOME OR ALL OF THE ABOVE EXCLUSIONS AND LIMITATIONS MAY +NOT APPLY TO YOU. diff --git a/notes/SIMULATOR.txt b/notes/SIMULATOR.txt new file mode 100644 index 0000000..482f466 --- /dev/null +++ b/notes/SIMULATOR.txt @@ -0,0 +1,96 @@ +Micropolis City Simulation Algorithm Description. + +SimFrame + + If SimSpeed is 0, then return. + + Increment Spdcycle mod 1024. + + If SimSpeed is 1, then return every 4 out of 5 frames. + + If SimSpeed is 2, then return every 2 out of 3 frames. + + Increment Fcycle mod 1024. + + Call Simulate, passing the phase parameter of (Fcycle mod 16). + + +Simulate + + Passed the phase parameter, which switches through 16 phases (0 to 15). + + Phase 0: + Increment Scycle and wrap mod 1024. + If DoInitialEval: + Clear DoInitialEval. + Call CityEvaluation. + Increment CityTime. + Increase AvCityTax by CityTax. + If Scycle is even: + Call SetValves. + Call ClearCensus. + + Phase 1: + Call MapScan on 1st 8th of map. + + Phase 2: + Call MapScan on 2nd 8th of map. + + Phase 3: + Call MapScan on 3rd 8th of map. + + Phase 4: + Call MapScan on 4th 8th of map. + + Phase 5: + Call MapScan on 5th 8th of map. + + Phase 6: + Call MapScan on 6st 8th of map. + + Phase 7: + Call MapScan on 7st 8th of map. + + Phase 8: + Call MapScan on 8st 8th of map. + + Phase 9: + If CityTime mod CENSUSRATE is 0: + Call TakeCensus. + If CityTime mod (CENSUSRATE * 12) is 0: + Call Cake2Census. + If CityTime mod TAXFREQ is 0: + Call CollectTax. + Call CityEvaluation. + + Phase 10: + If Scycle mod 5 is 0: + Call DecROGMem. + Call DecTrafficMem. + Set NewMapFlags for TDMAP, RDMAP, ALMAP, REMA, COMAP, INMAP, DYMAP. + Call SendMessages. + + Phase 11: + If Scycle mod SpdPwr[SimSpeed] is 0: + Call DoPowerScan. + Set NewMapFlags for PRMAP. + Set NewPower. + + Phase 12: + If Scycle mod SpdPtl[SimSpeed] is 0: + Call PTLScan. (Pollution, Terrain, Land Value.) + + Phase 13: + If Scycle mod SpdCri[SimSpeed] is 0: + Call CrimeScan. + + Phase 14: + If Scycle mod SpdPop[SimSpeed] is 0: + Call PopDenScan. + + Phase 15: + If Scycle mod SpdFir[SimSpeed] is 0: + Call FireAnalysis. + Call DoDisasters. + + diff --git a/notes/SharedData.txt b/notes/SharedData.txt new file mode 100644 index 0000000..4b23424 --- /dev/null +++ b/notes/SharedData.txt @@ -0,0 +1,62 @@ +* Notes: +do tile animation in parallel - tileSynch +maps on demand + +* Initialize at start of game: + +short mickStartingYear; +extern char *cityName; +extern char *CityFileName; +extern short GameLevel; + +* Share data: + +** global +long CityTime; +short *Map[WORLD_X]; +** editor window +short Oframe[OBJN]; +short GlobalX[OBJN]; +short GlobalY[OBJN]; +long totalFunds; +short RValve, CValve, IValve; +** map window +short *PowerMap; +Byte *PopDensity[HWLDX]; /* 2X2 Maps 60 x 50 */ +Byte *TrfDensity[HWLDX]; +Byte *PollutionMem[HWLDX]; +Byte *LandValueMem[HWLDX]; +Byte *CrimeMem[HWLDX]; +short RateOGMem[SmX][SmY]; +short PoliceMapEffect[SmX][SmY]; +short FireRate[SmX][SmY]; +** graph window +short ResHisMax, Res2HisMax; +short ComHisMax, Com2HisMax; +short IndHisMax, Ind2HisMax; +short *ResHis; +short *ComHis; +short *IndHis; +short *MoneyHis; +short *PollutionHis; +short *CrimeHis; +short *MiscHis; +short Graph10Max, Graph120Max; +short Res2HisMax, Com2HisMax, Ind2HisMax; +** evaluation window +** budget window +short CityTax; +long RoadSpend, PoliceSpend, FireSpend; +long RoadFund, PoliceFund, FireFund; +float roadPercent, policePercent, firePercent; +long roadMaxValue, policeMaxValue, fireMaxValue; +long TaxFund, RoadFund, PoliceFund, FireFund; + + +* Messages +censusChanged +message(msg, x, y) +earthquake +newMap + +formalize all global variable setter functions, to go through tcl diff --git a/notes/TODO.txt b/notes/TODO.txt new file mode 100644 index 0000000..2fc6008 --- /dev/null +++ b/notes/TODO.txt @@ -0,0 +1,68 @@ +Work to be done on MicropolisCore: + +======================================================================== +TODO +======================================================================== + +Replace explicit world bounds checking with a macro. + +Implement sound support. + +Implement zooming in laszlo interface. + +Implement overlays in laszlo interface. + +Need a way to blink the unpowered tiles in laszlo interface. + +Integrate map view and editor view with seamless zooming. + +Make sure the explosion decays into a static dirt tile and animates properly in the client. + +Remove all i18n related code from the simulator, and do it properly in the user interface instead. + +Web update client pushes any changes to the sessions looking at the game. + +Smart about what needs to be sent, because it tracks what it knows the client has, and sends deltas or nothing if no change. + +How do we make this robust against missed updates? + Easy, stupid: If we detect an out of sequence update, just flush all caches and re-send everything. + (Re-sync when connection is lost.) + Hard, smart: Send a simulator timestamp back and forth, so we know how long in the past to update from. + (Re-invent TCP/IP). + Try easy and stupid for now. + +======================================================================== +DOING +======================================================================== + +Rework the build system. + Old fashioned crude makefiles need to be brought up to date. + Currently using python setup.py to compile to Python extensions. + Is setup.py the thing to be using to compile SWIG python extensions? + Is using setup.py a good idea or not? What are the alternatives? (Ian Bicking would know.) + To use gnu configure or not? + I can't stand it, but I realize there are reasons to use it. + What about compiling extensions for other languages. + The code and makefiles need to be able to compile any number of wrapers for different extension langauges. + The "make clean" command should not delete the swig generated files, and we should check in and distribute the swig generated wrappers. + Different people have different versions of SWIG, or might not have it at all. + Once things stabilize, most developers won't have to change the swig bindings very often. + Have a "make cleanswig" command to clean out the SWIG output files, so you can regenerate everything from scratch. + Not checking in swig generated files any more. + make clean deletes all swig generated files. + +Implement overall map view and overlays. + +======================================================================== +DONE +======================================================================== + +Refactor the tool code. Move out of game. Make stateless tool API. All state in client. + +Implement sprites in gtk interface. + +Clean up and rationalize callbacks. +Make a generic update notification system. +Don't try formatting, converting and passing parameters, if they can be read from the simulator. +Update clients read the data out of the simulator that they need. +Format date, money, translate strings, etc, themselves. diff --git a/notes/Tiles.txt b/notes/Tiles.txt new file mode 100644 index 0000000..ade4c76 --- /dev/null +++ b/notes/Tiles.txt @@ -0,0 +1,305 @@ +Analysis of MicropolisCore/images/tiles.xpm +=========================================== +Image is 16 pixels wide, and 960*16 pixels high. Each 16x16 unit is one tile. +Tile N is copied at (0, N*16)--(16, N*16 + 16) exclusive from the tiles.xpm +image. Values N are shown below in hexadecimal notation, with an 'x' in front. +Decimal values are always 3 digits long (they are prefixed with leading 0's if +needed). The decimal values are derived from the hexadecimal values. In case +of conflict, the hexadecimal values should be trusted. + +Below, tiles are roughly grouped together. + + +000: x000 x001: Dirt +002: x002 x003: Water + +Coast: +004: x004: Water (copy of x002??) + x005 x006: Coast N + x007 x008: Coast NE + x009 x00a: Coast E + x00b x00c: Coast SE + x00d x00e: Coast S + x00f x010: Coast SW + x011 x012: Coast W + x013 x014: Coast NW + +021: x015: Trees (dirt N) + x016: Trees (dirt NE) + x017: Trees (dirt E) + x018: Trees (dirt SE) + x019: Trees (dirt S) + x01a: Trees (dirt SW) + x01b: Trees (dirt W) + x01c: Trees (dirt NW) + x01d: Trees (dirt N) + x01e: Trees (dirt NE) + x01f: Trees (dirt E) + x020: Trees (dirt SE) + x021: Trees (dirt S) + x022: Trees (dirt SW) + x023: Trees (dirt W) + x024: Trees (dirt NW) + x025: Trees (no dirt) + +038: x026 x027: ??? + +040: x028 x029 x02a x02b: Trees (with bit of dirt in the middle) + +044: x02c x02d x02e x02f: Rubble (dirt with black dots) + +048: x030 x031 x032 x033: Water (with white dots, ocean??) + +052: x034 x035 x036 x037: Nuclear explosion? + (x034 is sort-of radio-active tile, + others are black and white dots, 0x026 also looks to belong here) + +056: x038 x039 x03a x03b x03c x03d x03e x03f: Fire animation + +064: x040: Horizontal (fixed or closed) road bridge +065: x041: Vertical (fixed or closed) road bridge + +Road on dirt: +066: x042: Road WE + x043: Road NS + x044: Road NE + x045: Road SE + x046: Road SW + x047: Road NW + x048: Road crossing NWE + x049: Road crossing NSE + x04a: Road crossing SWE + x04b: Road crossing NSW + x04c: Road crossing NSWE + x04d: Road WE, power NS + x04e: Road NS, power WE + +x04f: Water + +Tiles x050-x05f + x060-x06f + x070-x07f + x080-x08f + each set of 16 as 0x040-x04f, but with light traffic animation + +080: x050 x051 x052 x053 x054 x055 x056 x057 + x058 x059 x05a x05b x05c x05d x05e x05f + +096: x060 x061 x062 x063 x064 x065 x066 x067 + x068 x069 x06a x06b x06c x06d x06e x06f + +112: x070 x071 x072 x073 x074 x075 x076 x077 + x078 x079 x07a x07b x07c x07d x07e x07f + +128: x080 x081 x082 x083 x084 x085 x086 x087 + x088 x089 x08a x08b x08c x08d x08e x08f + +Tiles x090-x09f + x0a0-x0af + x0b0-x0bf + x0c0-x0cf + each set of 16 as 0x40-0x4f, buth with heavy traffic animation + +144: x090 x091 x092 x093 x094 x095 x096 x097 + x098 x099 x09a x09b x09c x09d x09e x09f + +160: x0a0 x0a1 x0a2 x0a3 x0a4 x0a5 x0a6 x0a7 + x0a8 x0a9 x0aa x0ab x0ac x0ad x0ae x0af + +176: x0b0 x0b1 x0b2 x0b3 x0b4 x0b5 x0b6 x0b7 + x0b8 x0b9 x0ba x0bb x0bc x0bd x0be x0bf + +192: x0c0 x0c1 x0c2 x0c3 x0c4 x0c5 x0c6 x0c7 + x0c8 x0c9 x0ca x0cb x0cc x0cd x0ce x0cf + +208: x0d0: Power NS under water + x0d1: Power WE under water + x0d2: Power WE over dirt + x0d3: Power NS over dirt + x0d4: Power NE over dirt + x0d5: Power SE over dirt + x0d6: Power SW over dirt + x0d7: Power NW over dirt + x0d8: Power NWE over dirt + x0d9: Power NSE over dirt + x0da: Power SWE over dirt + x0db: Power NSW over dirt + x0dc: Power NSWE over dirt + x0dd: Rail WE, power NS over dirt + x0de: Rail NS, power WE over dirt + + x0df: ?? (blank tile) + +224: x0e0: Rail WE under water + x0e1: Rail NS under water + + x0e2: Rail WE over dirt + x0e3: Rail NS over dirt + x0e4: Rail NE over dirt + x0e5: Rail SE over dirt + x0e6: Rail SW over dirt + x0e7: Rail NW over dirt + x0e8: Rail NWE over dirt + x0e9: Rail NSE over dirt + x0ea: Rail SWE over dirt + x0eb: Rail NSW over dirt + x0ec: Rail NSWE over dirt + x0ed: Rail WE, road NS, over dirt + x0ee: Rail NS, road WE, over dirt + + x0ef: ?? (vertical road, horizontal power lines?) + +Residential (3x3): +240: x0f0 x0f1 x0f2 x0f3 x0f4 x0f5 x0f6 x0f7 x0f8: Empty residential + +Single tile houses (from small to big) +249: x0f9 x0fa x0fb x0fc x0fd x0fe x0ff x100 x101 x102 x103 x104 + +// 'population' means number of people in the residential zone. +// 'value' means land value - pollution. Higher is better. + +Residential: +261: x105 x106 x107 x108 x109 x10a x10b x10c x10d // population 16, value 0 +270: x10e x10f x110 x111 x112 x113 x114 x115 x116 // population 24, value 0 +279: x117 x118 x119 x11a x11b x11c x11d x11e x11f // population 32, value 0 +288: x120 x121 x122 x123 x124 x125 x126 x127 x128 // population 40, value 0 +297: x129 x12a x12b x12c x12d x12e x12f x130 x131 // population 16, value 1 +306: x132 x133 x134 x135 x136 x137 x138 x139 x13a // population 24, value 1 +315: x13b x13c x13d x13e x13f x140 x141 x142 x143 // population 32, value 1 +324: x144 x145 x146 x147 x148 x149 x14a x14b x14c // population 40, value 1 +333: x14d x14e x14f x150 x151 x152 x153 x154 x155 // population 16, value 2 +342: x156 x157 x158 x159 x15a x15b x15c x15d x15e // population 24, value 2 +351: x15f x160 x161 x162 x163 x164 x165 x166 x167 // population 32, value 2 +360: x168 x169 x16a x16b x16c x16d x16e x16f x170 // population 40, value 2 +369: x171 x172 x173 x174 x175 x176 x177 x178 x179 // population 16, value 3 +378: x17a x17b x17c x17d x17e x17f x180 x181 x182 // population 24, value 3 +387: x183 x184 x185 x186 x187 x188 x189 x18a x18b // population 32, value 3 +396: x18c x18d x18e x18f x190 x191 x192 x193 x194 // population 40, value 3 + +405: x195 x196 x197 x198 x199 x19a x19b x19c x19d: Hospital +414: x19e x19f x1a0 x1a1 x1a2 x1a3 x1a4 x1a5 x1a6: Church + +Commercial buildings: +423: x1a7 x1a8 x1a9 x1aa x1ab x1ac x1ad x1ae x1af: Empty +432: x1b0 x1b1 x1b2 x1b3 x1b4 x1b5 x1b6 x1b7 x1b8 +441: x1b9 x1ba x1bb x1bc x1bd x1be x1bf x1c0 x1c1 +450: x1c2 x1c3 x1c4 x1c5 x1c6 x1c7 x1c8 x1c9 x1ca +459: x1cb x1cc x1cd x1ce x1cf x1d0 x1d1 x1d2 x1d3 +468: x1d4 x1d5 x1d6 x1d7 x1d8 x1d9 x1da x1db x1dc +477: x1dd x1de x1df x1e0 x1e1 x1e2 x1e3 x1e4 x1e5 +486: x1e6 x1e7 x1e8 x1e9 x1ea x1eb x1ec x1ed x1ee +495: x1ef x1f0 x1f1 x1f2 x1f3 x1f4 x1f5 x1f6 x1f7 +504: x1f8 x1f9 x1fa x1fb x1fc x1fd x1fe x1ff x200 +513: x201 x202 x203 x204 x205 x206 x207 x208 x209 +522: x20a x20b x20c x20d x20e x20f x210 x211 x212 +531: x213 x214 x215 x216 x217 x218 x219 x21a x21b +540: x21c x21d x21e x21f x220 x221 x222 x223 x224 +549: x225 x226 x227 x228 x229 x22a x22b x22c x22d +558: x22e x22f x230 x231 x232 x233 x234 x235 x236 +567: x237 x238 x239 x23a x23b x23c x23d x23e x23f +576: x240 x241 x242 x243 x244 x245 x246 x247 x248 +585: x249 x24a x24b x24c x24d x24e x24f x250 x251 +594: x252 x253 x254 x255 x256 x257 x258 x259 x25a +603: x25b x25c x25d x25e x25f x260 x261 x262 x263 + +Industrial buildings: +612: x264 x265 x266 x267 x268 x269 x26a x26b x26c: Empty +621: x26d x26e x26f x270 x271 x272 x273 x274 x275 // population ?*0, value 0 +630: x276 x277 x278 x279 x27a x27b x27c x27d x27e // population ?*1, value 0 +639: x27f x280 x281 x282 x283 x284 x285 x286 x287 // population ?*2, value 0 +648: x288 x289 x28a x28b x28c x28d x28e x28f x290 // population ?*3, value 0 +657: x291 x292 x293 x294 x295 x296 x297 x298 x299 // population ?*0, value 1 +666: x29a x29b x29c x29d x29e x29f x2a0 x2a1 x2a2 // population ?*1, value 1 +675: x2a3 x2a4 x2a5 x2a6 x2a7 x2a8 x2a9 x2aa x2ab // population ?*2, value 1 +684: x2ac x2ad x2ae x2af x2b0 x2b1 x2b2 x2b3 x2b4 // population ?*3, value 1 + +Port (4x4): +693: x2b5 x2b6 x2b7 x2b8 + x2b9 x2ba x2bb x2bc + x2bd x2be x2bf x2c0 + x2c1 x2c2 x2c3 x2c4 + +Airport (6x6): +709: x2c5 x2c6 x2c7 x2c8 x2c9 x2ca + x2cb x2cc x2cd x2ce x2cf x2d0 + x2d1 x2d2 x2d3 x2d4 x2d5 x2d6 + x2d7 x2d8 x2d9 x2da x2db x2dc + x2dd x2de x2df x2e0 x2e1 x2e2 + x2e3 x2e4 x2e5 x2e6 x2e7 x2e8 + +Coal power plant (4x4): +745: x2e9 x2ea x2eb x2ec + x2ed x2ee x2ef x2f0 + x2f1 x2f2 x2f3 x2f4 + x2f5 x2f6 x2f7 x2f8 + +761: x2f9 x2fa x2fb x2fc x2fd x2fe x2ff x300 x301: Fire station +770: x302 x303 x304 x305 x306 x307 x308 x309 x30a: Police station + +Empty stadium (4x4): +779: x30b x30c x30d x30e + x30f x310 x311 x312 + x313 x314 x315 x316 + x317 x318 x319 x31a + +Filled stadium (4x4): +795: x31b x31c x31d x31e + x31f x320 x321 x322 + x323 x324 x325 x326 + x327 x328 x329 x32a + +Nuclear power plant (4x4): +811: x32b x32c x32d x32e + x32f x330 x331 x332 + x333 x334 x335 x336 + x337 x338 x339 x33a + +827: x33b Lack of power (flashlight with red cross through it) +828: x33c x33d Left open bridge +830: x33e x33f Right open bridge + +Animations: + +832: x340 x341 x342 x343 x344 x345 x346 x347: Rotating radar (at top) +840: x348 x349 x34a x34b: Fountain +844: x34c x34d x34e x34f x350 x351 x352 x353: Rotating radar (elsewhere) + +//SMOKEBASE +852: x354 x355 x356 x357 x358 x359 x35a x35b: Smoking chimneys (0,0) +860: x35c x35d x35e x35f x360 x361 x362 x363: Explosion +??? x364 x365 x366 x367: ?? (Black and white animation) +??? x368 x369 x36a x36b x36c x36d x36e x36f + x370 x371 x372 x373: ?? (Black and white animation) + +884: x374 x375 x376 x377: Animation industry IND2 (top right) +888: x378 x379 x37a x37b: Animation industry IND3 (right) +892: x37c x37d x37e x37f: Animation industry IND4 (middle) +896: x380 x381 x382 x383: Animation industry IND5 (right middle) +900: x384 x385 x386 x387: Animation industry IND6 (top) +904: x388 x389 x38a x38b: Animation industry IND7 (top right) +908: x38c x38d x38e x38f: Animation industry IND8 (top right) +912: x390 x391 x392 x393: Animation industry IND9 (right) +916: x394 x395 x396 x397: Animation coal powerplant (top) +920: x398 x399 x39a x39b: Animation coal powerplant (top right) +924: x39c x39d x39e x39f: Animation coal powerplant (middle) +928: x3a0 x3a1 x3a2 x3a3: Animation coal powerplant (right) +932: x3a4 x3a5 x3a6 x3a7 x3a8 x3a9 x3aa x3ab: Match in stadium (top part) +940: x3ac x3ad x3ae x3af x3b0 x3b1 x3b2 x3b3: Match in stadium (bottom part) +948: x3b4 x3b5: North open bridge +950: x3b6 x3b7: South open bridge +952: x3b8 x3b9 x3ba x3bb: Nuclear atom animation at nuclear power plant + + +Duplicate tiles: +================ +A simple file compare revealed the following duplicates: + +x002 x004 x04f x05f x06f x07f x08f x09f x0af x0bf x0cf +x02d x363 +x321 x3a6 +x325 x3b1 x3b2 +x334 x3b8 +x368 x372 +x369 x371 +x36a x370 +x3bc x3bd x3be x3bf diff --git a/notes/UserInterfacePlan.txt b/notes/UserInterfacePlan.txt new file mode 100644 index 0000000..be2ef01 --- /dev/null +++ b/notes/UserInterfacePlan.txt @@ -0,0 +1,262 @@ +Micropolis Core Engine +By Will Wright and Don Hopkins + +[TODO: Write documentation here.] + +Here are some notes about hooking up a user interface. + +In general, the philosophy is to tell the scriptinging engine that something has changed by sending a callback message out, without any parameters. +(The code may not currently be doing that, but that's how it should work.) + +Then the script handler can pull the parameters out of the simulator itself, instead of being passed the parameters in the callback. +This is so that the script can delay updating until the next time it paints the screen, consolidating a bunch of changes into one refresh. + +That avoides the overhead of converting and formatting values that don't end up getting used. +Also, we want to defer all formatting to the scripting language, instead of formatting in the core simulator, so the script can internationalize the numbers and text. + +Likewise, the simulator should not have any strings hard wired into it -- all those should be looked up by the scripting language, in translation files. +To conserve power on the OLPC, the script might want to schedule an update at the next round timer tick, so all the updates happen at once. + +There are a bunch of flags for things like the evaluation changing, the graph changing, etc. +These should be replaced by incrementing revision numbers, so the views can skip updates, +and only update if the version number has changed. + +Parts of the simulator that update the user interface: + +Budget + SetBudget + flowStr + previousStr + currentStr + collectedStr + tax + SetBudgetValues + roadGot + roadWant + policeGot + policeWant + fireGot + fireWant + ShowBudgetWindowAndStartWaiting + +Evaluation + SetEvaluation + changed: deltaCityScore + score: CityScore + ps0: ProblemOrder[0] ? probStr[ProblemOrder[0]] : "" + ps1: ProblemOrder[1] ? probStr[ProblemOrder[1]] : "" + ps2: ProblemOrder[2] ? probStr[ProblemOrder[2]] : "" + ps3: ProblemOrder[3] ? probStr[ProblemOrder[3]] : "" + pv0: ProblemOrder[0] ? ProblemVotes[ProblemOrder[0]] : "" + pv1: ProblemOrder[1] ? ProblemVotes[ProblemOrder[1]] : "" + pv2: ProblemOrder[2] ? ProblemVotes[ProblemOrder[2]] : "" + pv3: ProblemOrder[3] ? ProblemVotes[ProblemOrder[3]] : "" + pop: CityPop + delta: deltaCityPop + assessed_dollars: CityAssValue + cityclass: cityClassStr[CityClass] + citylevel: cityLevelStr[GameLevel] + goodyes: XXX% + goodno: XXX% + title: City Evaluation [YEAR] + probStr + Crime + Pollution + Housing Costs + Taxes + Traffic + Unemployment + Fires + cityClassStr + Village + Town + City + Capital + Metropolis + Megalopolis + cityLevelStr + Easy + Medium + Hard + + +==== + +User interface surfaces to implement: + +New city dialog (full screen or shared with main city view) + View of selected city (or use main city view if still on screen) + City Name Editor + Difficulty Level Selector + Easy + Medium + Hard + Generate New City Button + Load City Button + 8 Scenarios Buttons + Dullsville 1900 + San Francisco 1906 + Hamburg 1944 + Bern 1965 + Tokyo 1957 + Rio de Janeiro 2047 + Boston 2010 + Detroit 1972 + About button + Quit button + +Control Menus (visible while game playing, or disabled as appropriate) + Micropolis + About + Save City + Save city as... + New city... + Quit + Options + Auto Budget + Auto Bulldoze + Disasters + Sound + Animation + Messages + Notices + Disasters + Monster + Fire + Flood + Meltdown + Air Crash + Tornado + Earthquake + Speed + Extra Slow + Slow + Medium + Fast + Extra Fast + Window + Budget + Evaluation + Graph + New Editor + New Map + +Date Display + Click to pause + Drag to change speed + +Funds Display + Click to open budget window and pause + +Tax Rate Display + Click to open budget window and pause + +Tax Rate Slider + Drag to set tax rate without pausing + +Demand Gauge (called "valves" in code) + Shows Residential, Commercial and Industrial demand + Click to toggle evaluation window or graph window + +Message Field + Displays the current message. + Click to go to the location of that message. + +Scrolling Text Journal + Scrolling text window of messages. + Click messages to do something useful like scroll to location of event. + Messages can reconfigure the user interface to help deal with the problem described. + Click dates to rewind to save checkpoints + +Budget Window + Road Fund Requested Label + Road Fund Percentage Slider + Fire Fund Requested Label + Fire Fund Percentage Slider + Police Fund Requested Label + Police Fund Percentage Slider + Tax Rate Label + Tax Rate Slider + Taxes Collected Label + Cash Flow Label + Previous Funds Label + Current Funds Label + Continue Button + Reset Button + Cancel Button + Toggle Auto Budget Button + +Evaluation Window + Is The Mayor Doing a Good Job? + Yes: XX% + No: XX% + What are the Worst Problems? + Problem 1: XXX% + Problem 2: XXX% + Problem 3: XXX% + Problem 4: XXX% + Statistics + Population: XXX + Net Migration: XXX (last year) + Assessed Value: XXX + Category: XXX + Game Level: XXX + Overall City Score (0 - 1000) + Current Score: XXX + Annual Change: XXX + Dismiss + +Graph window + Long term graph + Short term graph + Each graph has 8 values it can overlay + Legend showing 8 labels for 8 colors + Labels + Residential: Light Green = (0.50, 0.50, 1.00) + Commercial: Dark Blue = (0.00, 0.00, 0.50) + Industrial: Yellow = (1.00, 1.00, 0.00) + Cash Flow: Dark Green = (0.00, 0.50, 0.00) + Crime: Red = (1.00, 0.00, 0.00) + Pollution: Olive = (0.33, 0.42, 0.18) + Click to toggle each graph + Point to highlight individual graphs, and show scale and value + Advanced scaling, scrolling and data mining features + Dismiss + +Edit Window + Selected Tool + Cost of Selected Tool + Tool Palette + Options + Auto Goto + Hide Panel + Show Overlay (for layers and chalk) + Dynamic Filter (for dynamic zone finder: "frob-o-matic") + +Map Window + Shows draggable location(s) of edit window(s) + Overlays + Residential + Commercial + Industrial + Transportation + Population Density + Rate of Growth + Land Value + Crime Rate + Pollution Density + Traffic Density + Power Grid + Fire Coverage + Police Coverage + Dynamic ("frob-o-matic") + Dismiss + +Notice Window + Shows messages and pictures. + Can display a live animated view of a location on the map, zoomed into wherever the message is about. + Can also be used to ask questions, like "Are you sure you want to XXX?" with yes/no/etc buttons. + Dismiss + +Help Window + A xulrunner web browser to read HTML docs. diff --git a/notes/outline.txt b/notes/outline.txt new file mode 100644 index 0000000..6eb1045 --- /dev/null +++ b/notes/outline.txt @@ -0,0 +1,475 @@ +BUGS: + + +* multi-user "select city" dialog +** Add about, configure buttons +** draw and erase on map window + +* configuration panel +** players +** keys + +* sim. +** command to set process nice +** first editor on a display gets a control window + + +* control window. +** file menu. +*** About (dialog) +*** LoadScenario (confirm) +*** StartNewCity (confirm) +*** LoadCity (file dialog) +*** SaveCity (file dialog if no file name) +*** SaveCityAs (file dialog) +*** PrintCity (print dialog) +*** GetKey (key dialog) +*** QuitMicropolis (confirm) +** options menu +*** auto budget, auto goto, auto bulldoze, disasters, sound +** disasters menu +*** monster, fire, flood, air crash, tornado, earthquake, meltdown +** window menu + defer creating windows + + +* more controls +** command field +*** type in arguments to menu commands +*** interpret tcl +** icon for each window opened and openable (dim) +*** window name, display name, user name +*** click opened icon to bring to top +*** click openable icon to make new window +*** make nice icons +*** display nice icons in x window icons too +*** save window layout +*** restore window layout +** speed slider +** priority slider + + +* editor window. +** editor view. +** tool pallet. +** various text fields. +*** funds, date, message, cost. +** initialize controls +** autogoto is a per-editor flag +** autogoto toggle +** coal/nuclear toggle +** update frequency slider +** cursor tool outline (preview?) +** pie menus +** earthquake +** demand gauge +** auto scroll +** constrained drag +** arrow keys pan +** fix autorepeat problem + + +* map window. +** set window title +** initialize pallet and menus +** legend tied to map state +** menu buttons that appear when needed +*** zone type +*** population type +*** service type +** disable manipulation of other peoples maps (unless you're god) +** click on a rectangle to bring that editor to the top +** create a new editor by clicking on the small map +** open new display by typing in a display name and creating a new editor +** update frequency slider + +* budget window. +** set window title +** hour glass +** auto budget behavior + do we or don't we pause the simulator? + do we or don't we bring up other peoples budget window? + when AutoBudget, simulator continues, and just your window opens. + when not AutoBudget, simulator pauses, so everyones window opens, + hour glasses starts + how about we just don't pause, and everyone controls their own window. + +* graph window +** set window title +** graph object +*** GraphRange ?10|120? +*** GraphType 0..5 ?0..1? +*** set window title + + +* dialogs + +** start scenario. +*** 6 scenario buttons, labeled. +*** new city. +*** load city. +*** get key +*** dynamic scenario description + +** generate city +*** label "creating new map" +*** city name text field +*** city level buttons with labels +*** map view +*** generate new terrain +*** use this map +*** load city +*** play scenario +*** get key + +** load +*** file dialog + +** save +*** file dialog + +** print +*** mono / color +*** small map / large map +*** printer command text field +*** print button + +** key +*** Instructions, Address, Phone Number (labels) +*** License Type: Node/Network (exclusive settings) +*** License Code: (field) +*** Enter Key: (text field) +*** Install Key (button) + +** zone status +*** zone type label +*** Density, Value, Crime, Pollution, Growth (fields) + +** notice +*** city size +**** city size label, description message +**** town, city, capital, metropolis, megalopolis, winner +*** warning messages +**** warning name, description message +**** pollution, crime, traffic, monster, meltdown, riots, demo, impeachment + +** about +*** text, pictures, noises + +** confirm +*** message, yes button, no button + +** error +*** message +*** ok + +* evaluation window. + + +* help + + +* printing + + +* sound + + +* new elm interface + + +* tk +** masked pixmap object for canvases (or a regular componant) +** pie menus + + + + +* stacks + +** Audio + implement audio interface + +** Micropolis + About box +*** messages + /StartGame { % HomeDir ResourceDir StackDir KeyDir => - + /ReallyStartGame { % - => - + /NewGame { % - => - + /StartLoad { % - => - + /StartScenario { % name|number => - + /DoStartNewCity { % - => - + /DoPlayNewCity { % - => - + /DoLoseGame { % - => - + /DoLoadScenario { % - => - + /DidLoadScenario { % - => - + /DoLoadCity { % - => - + /HeyLoadCity { % name => - + /CancelLoadCity { % - => - + /DidLoadCity { % - => - + /DidntLoadCity { % error => - + /DoSaveCity { % - => - + /DoSaveCityAs { % - => - + /HeySaveCityAs { % name => - + /DidSaveCity { % - => - + /DidntSaveCity { % error => - + /DoGetKey { % - => - + /DoQuitMicropolis { % - => - + /InitializeSound { % - => - + /ShutDownSound { % - => - + /SetUserSound { % bool => - + /MakeSound { % n => - + /StartSound { % n => - + /StopSound { % n => - + /SoundOff { % - => - + /UckfayEthayOlicepay { % - => - + /PrintLargeMap { % - => - + /PrintSmallMap { % - => - + /HyperDrawLargeMap { % - => - + /HyperDrawSmallMap { % - => - + /HyperDrawCityView { % - => - + /DoPrintCity { % - => - + /StartElmd { % - => - + +** Budget + Tax Rate Percent: (slider 0% 20%) + /SetTaxRate + Taxes Collected: (field) + Amount Requested (column heading) + Amount Allocated (column heading) + Funding Level (column heading) + Fire Fund: (field) (numeric) (slider 0% 100%) + /SetFireFund + Police Fund: (field) (numeric) (slider 0% 100%) + /SetPoliceFund + Trans. Fund: (field) (numeric) (slider 0% 100%) + /SetTransFund + Cash Flow: (field) + Previous Funds: (field) + Current Funds: (field) + Hour Glass (inactivity timer) + goes for 20 seconds then takes down budget window and continues + Go With These Figures (button) + /GoWithTheseFigures /ResumeSim /Hide +*** messages + /SetBudget { % [($flow) ($previous) () ($current)] ($collected) tax => - + /SetMaxFunds { % [($road)] [road] [($police)] [police] [($fire)] [fire] => - + /StartWaiting { % - => - + shows hour glass + +** Editor + File (menu) + { NIL /DoLoadScenario /Micropolis Send } + { NIL /DoStartNewCity /Micropolis Send } + { NIL /DoLoadCity /Micropolis Send } + { NIL /DoSaveCity /Micropolis Send } + { NIL /DoSaveCityAs /Micropolis Send } + { NIL /DoPrintCity /Micropolis Send } + { NIL /DoGetKey /Micropolis Send } + { NIL /DoQuitMicropolis /Micropolis Send } + Options (menu) + [exch] /SetOptions ClientSend + Disasters (menu) + { NIL /MakeMonster ClientSend } + { NIL /MakeFire ClientSend } + { NIL /MakeFlood ClientSend } + { NIL /MakeAirCrash ClientSend } + { NIL /MakeTornado ClientSend } + { NIL /MakeEarthquake ClientSend } + { NIL /MakeMeltdown ClientSend } + Time (menu) + /Action { + [exch] /SetSpeed ClientSend + } def + Priority (menu) + /Action { + { {1000 5} {500 4} {250 3} {120 2} {60 0} {25 0} {0 0} + } exch get cvx exec + [exch] /SetNice ClientSend + [exch] /SetDelay ClientSend + } def + Windows (menu) + { NIL /UpdateBudget ClientSend } + { NIL /UpdateEvaluation ClientSend + /MicropolisEvaluation ShowStack } + { /MicropolisGraph ShowStack } + { /MicropolisSurveyor ShowStack } + { /MicropolisNotice ShowStack } + { /MicropolisMap ShowStack } + { /MicropolisEditor ShowStack } + Funds: (field) + Date: (field) + Message: (field) + Editing Icons (exclusive settings) + /InitGame + /DoSetWandState /SetPowerType + Demand: (gauge) + /SetDemand { % r c i => - + Zoom In/Out (rocker switch) + Zoom Reset (button) + Tool Cost: (field) + Editor View + Editing Icons (pie menu) + /DoSetWandState + Cursor outline showing where tool will operate + color codes for tools + query gray + bulldozer brown + road black white + wire black yellow + rail black brown + park brown green + residential green + commercial blue + industrial yellow + police brown blue + fire brown red + stadium gray green + coal gray yellow + seaport gray blue + airport gray white + nuclear gray yellow + monster orange + helicopter red + + draw (colored pen) + + + + Panning with arrow keys + Panning by dragging + Dynamic panning & bouncing + Earthquake + Mouse tool handling + Tools connect corners + Constrained drag + Auto scroll +*** messages + /InitGame { % - => - + /DoEarthQuake { % - => - + /DoSetWandState { % state => - + /JustSetWandState { % n => - + /SetMessage { % str => - + +** Evaluation + Public Opinion (column header) + Is the mayor doing a good job? (field) + % yes, % no (fields) + What are the worst problems? (field) + % problem, ... (fields) + Statistics (column header) + Population, Net Migration, Assessed, Value, Category (fields) + Overall City Score (field) + current score (field) + anual change (field) +*** messages + /SetEvaluation { % [strings] => - + +** Graph + Graph Plot + /InitGraph /GraphMe + /SetGraph { % [range year month res com ind money crime pollution] => - + 10/120 Year (exclusive toggle) + /SetGraphRange + Residential, Commercial, Industrial, Money, Crime, Pollution (toggles) +*** messages + +** Map + Scenerio Screen + Noisy Grill (toggle) + Duck (button) + Key (button) + New City, Load City (buttons) + 6 scenarios (buttons) + scenario names (labels) + Map Background + Map View + Shows rectangles for editor views + Drag rectangles to scroll editor views + Terrain Generator + Generate New Terrain, Use This Map (buttons) + City Map + Map State Icons (exclusive settings) + Zone Type (menu) + Population Type (menu) + Service Type (menu) + /OnInit + /SetMapState /SetZoneType /SetPopNRate /SetPoliceRadius + Legend + Max/Min / +/- / none (picture) +*** messages + /InitGame { % - => - + +** Notice + Welcome Notice + New City (dialog) + Creating New Map ... (label) + City Name: (text field) + Game Level: Easy/Medium/Hard (exclusive settings) + Are You Sure? + Yes, No (buttons) + Really Quit? + Save City, Really Quit, Never Mind (buttons) + Print City + Monochrome/Color (exclusive settings) + Edit Small Map, Edit Large Map, Edit City View (buttons) + Printer Command: (text field) + Print Small Map, Print Large Map, Show Printer Queue (buttons) + Install Key + Instructions, Address, Phone Number (labels) + License Type: Node/Network (exclusive settings) + License Code: (field) + Enter Key: (text field) + Install Key (button) + Earthquake Control + Richter Scale: (slider .1% 10%) + Earthquake (button) + Scenario Descriptions + Zone Status + Zone Type (field) + Density, Value, Crime, Pollution, Growth (fields) + Game Level Notices + Warnings +*** messages + /InitGame { % - => - + /ShowNotice { % card => - + /ShowPicture { % id => - + /ShowZoneStatus { % type [s0 s1 s2 s3 s4] => - + /AreYouSure? { % yesResponse => - + /Respond { % target thing|null => - + /Yes { % - => - + /No { % - => - + +** Surveyor + Editor View(s) + Zoom In/Out (rocker switch) + Zoom Reset (button) + Single/Multiple View (toggle) + Click on surveyor view to center editor there +*** messages + /AutoGoto { % x y msg => - + /AutoGotoClick { % - => - + +** Help + Help Text Display + Done (button) + + + +Dullsville + Philip Glass, Powaqqatsi, That Place +San_Francisco + Grateful Dead, Fire on the Mountain + Philip Glass, Powaqqatsi, Serra Pelada +Hamburg + Yello, Oh Yeah +Bern + Yello, RubberBandMan + Philip Glass, Powaqqatsi, CAUGHT! +Tokyo + Percussions D'Asie + Philip Glass, Powaqqatsi, Serra Pelada +Detroit +Boston +Rio_de_Janeiro + Philip Glass, Powaqqatsi, From Egypt diff --git a/notes/prompt-code-review-file.txt b/notes/prompt-code-review-file.txt new file mode 100644 index 0000000..fd09d84 --- /dev/null +++ b/notes/prompt-code-review-file.txt @@ -0,0 +1,12 @@ +For each file provided: +Write a concise summary that would be a good comment at the beginning of the file, explaining what it does. +The summary should be formatted as a C++ doxygen file comment. +Break lines at 72 characters. Example: +/** + * @file micropolis.h + * @brief Header file for Micropolis game engine. + * + * Bla bla bla... + */ +After the comment code section, write as normal text a concise review of the code, mentioning any possible problems, especially relating to emscripten. + diff --git a/notes/prompt-code-review-member.txt b/notes/prompt-code-review-member.txt new file mode 100644 index 0000000..70c1889 --- /dev/null +++ b/notes/prompt-code-review-member.txt @@ -0,0 +1,18 @@ +For each function, variable, constant, method, class, or whatever: +If there is no doxygen comment, then create a new one concisely summarizing and (if a function) defining all the parameters and return values. +If there is an existing comment, then update it with a concise summary, but keep any useful information already in the comment, integrating it in with your own comments. +Keep any todos or bugs or other doxygen comments. +The summary should be formatted as a C++ doxygen comment. +Break lines at 72 characters. +Example: +/** + * Deduct \a dollars from the player funds. + * @param dollars Amount of money spent. + */ +void Micropolis::spend(int dollars) +{ + setFunds(totalFunds - dollars); +} +Write the output as a compact diff patch that I can apply to the source code, which only includes insertions and deletions with minimal context. +This prompt will be followed by the entire file. Process the whole file chunk by chunk, as much as you can at a time. + diff --git a/resources/cities/about.cty b/resources/cities/about.cty new file mode 100644 index 0000000..24139a0 Binary files /dev/null and b/resources/cities/about.cty differ diff --git a/resources/cities/badnews.cty b/resources/cities/badnews.cty new file mode 100644 index 0000000..3e901c7 Binary files /dev/null and b/resources/cities/badnews.cty differ diff --git a/resources/cities/bluebird.cty b/resources/cities/bluebird.cty new file mode 100644 index 0000000..877ad49 Binary files /dev/null and b/resources/cities/bluebird.cty differ diff --git a/resources/cities/bruce.cty b/resources/cities/bruce.cty new file mode 100644 index 0000000..b38fddd Binary files /dev/null and b/resources/cities/bruce.cty differ diff --git a/resources/cities/deadwood.cty b/resources/cities/deadwood.cty new file mode 100644 index 0000000..7a5a161 Binary files /dev/null and b/resources/cities/deadwood.cty differ diff --git a/resources/cities/finnigan.cty b/resources/cities/finnigan.cty new file mode 100644 index 0000000..80f58d3 Binary files /dev/null and b/resources/cities/finnigan.cty differ diff --git a/resources/cities/freds.cty b/resources/cities/freds.cty new file mode 100644 index 0000000..84cc7fa Binary files /dev/null and b/resources/cities/freds.cty differ diff --git a/resources/cities/haight.cty b/resources/cities/haight.cty new file mode 100644 index 0000000..e70f985 Binary files /dev/null and b/resources/cities/haight.cty differ diff --git a/resources/cities/happisle.cty b/resources/cities/happisle.cty new file mode 100644 index 0000000..786d028 Binary files /dev/null and b/resources/cities/happisle.cty differ diff --git a/resources/cities/joffburg.cty b/resources/cities/joffburg.cty new file mode 100644 index 0000000..df93e0d Binary files /dev/null and b/resources/cities/joffburg.cty differ diff --git a/resources/cities/kamakura.cty b/resources/cities/kamakura.cty new file mode 100644 index 0000000..b91944c Binary files /dev/null and b/resources/cities/kamakura.cty differ diff --git a/resources/cities/kobe.cty b/resources/cities/kobe.cty new file mode 100644 index 0000000..911765e Binary files /dev/null and b/resources/cities/kobe.cty differ diff --git a/resources/cities/kowloon.cty b/resources/cities/kowloon.cty new file mode 100644 index 0000000..52e8ab7 Binary files /dev/null and b/resources/cities/kowloon.cty differ diff --git a/resources/cities/kyoto.cty b/resources/cities/kyoto.cty new file mode 100644 index 0000000..817a78b Binary files /dev/null and b/resources/cities/kyoto.cty differ diff --git a/resources/cities/linecity.cty b/resources/cities/linecity.cty new file mode 100644 index 0000000..b178ba1 Binary files /dev/null and b/resources/cities/linecity.cty differ diff --git a/resources/cities/med_isle.cty b/resources/cities/med_isle.cty new file mode 100644 index 0000000..9db3fad Binary files /dev/null and b/resources/cities/med_isle.cty differ diff --git a/resources/cities/ndulls.cty b/resources/cities/ndulls.cty new file mode 100644 index 0000000..104279e Binary files /dev/null and b/resources/cities/ndulls.cty differ diff --git a/resources/cities/neatmap.cty b/resources/cities/neatmap.cty new file mode 100644 index 0000000..1ed2243 Binary files /dev/null and b/resources/cities/neatmap.cty differ diff --git a/resources/cities/radial.cty b/resources/cities/radial.cty new file mode 100644 index 0000000..0a180eb Binary files /dev/null and b/resources/cities/radial.cty differ diff --git a/resources/cities/scenario_bern.cty b/resources/cities/scenario_bern.cty new file mode 100644 index 0000000..a6d1437 Binary files /dev/null and b/resources/cities/scenario_bern.cty differ diff --git a/resources/cities/scenario_boston.cty b/resources/cities/scenario_boston.cty new file mode 100644 index 0000000..14e7bb8 Binary files /dev/null and b/resources/cities/scenario_boston.cty differ diff --git a/resources/cities/scenario_detroit.cty b/resources/cities/scenario_detroit.cty new file mode 100644 index 0000000..fede901 Binary files /dev/null and b/resources/cities/scenario_detroit.cty differ diff --git a/resources/cities/scenario_dullsville.cty b/resources/cities/scenario_dullsville.cty new file mode 100644 index 0000000..9fdfc3d Binary files /dev/null and b/resources/cities/scenario_dullsville.cty differ diff --git a/resources/cities/scenario_hamburg.cty b/resources/cities/scenario_hamburg.cty new file mode 100644 index 0000000..7ef3922 Binary files /dev/null and b/resources/cities/scenario_hamburg.cty differ diff --git a/resources/cities/scenario_rio_de_janeiro.cty b/resources/cities/scenario_rio_de_janeiro.cty new file mode 100644 index 0000000..c413e10 Binary files /dev/null and b/resources/cities/scenario_rio_de_janeiro.cty differ diff --git a/resources/cities/scenario_san_francisco.cty b/resources/cities/scenario_san_francisco.cty new file mode 100644 index 0000000..ddf2eb1 Binary files /dev/null and b/resources/cities/scenario_san_francisco.cty differ diff --git a/resources/cities/scenario_tokyo.cty b/resources/cities/scenario_tokyo.cty new file mode 100644 index 0000000..14bf8ed Binary files /dev/null and b/resources/cities/scenario_tokyo.cty differ diff --git a/resources/cities/senri.cty b/resources/cities/senri.cty new file mode 100644 index 0000000..827ca84 Binary files /dev/null and b/resources/cities/senri.cty differ diff --git a/resources/cities/southpac.cty b/resources/cities/southpac.cty new file mode 100644 index 0000000..daffddc Binary files /dev/null and b/resources/cities/southpac.cty differ diff --git a/resources/cities/splats.cty b/resources/cities/splats.cty new file mode 100644 index 0000000..8088000 Binary files /dev/null and b/resources/cities/splats.cty differ diff --git a/resources/cities/wetcity.cty b/resources/cities/wetcity.cty new file mode 100644 index 0000000..9168fcc Binary files /dev/null and b/resources/cities/wetcity.cty differ diff --git a/resources/cities/yokohama.cty b/resources/cities/yokohama.cty new file mode 100644 index 0000000..8d1de6a Binary files /dev/null and b/resources/cities/yokohama.cty differ diff --git a/resources/data/cities.xml b/resources/data/cities.xml new file mode 100644 index 0000000..3e9b114 --- /dev/null +++ b/resources/data/cities.xml @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/data/disasters.xml b/resources/data/disasters.xml new file mode 100644 index 0000000..020d545 --- /dev/null +++ b/resources/data/disasters.xml @@ -0,0 +1,27 @@ + + + + + + + + + \ No newline at end of file diff --git a/resources/data/notices.xml b/resources/data/notices.xml new file mode 100644 index 0000000..699c607 --- /dev/null +++ b/resources/data/notices.xml @@ -0,0 +1,331 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/data/overlays.xml b/resources/data/overlays.xml new file mode 100644 index 0000000..6391bc9 --- /dev/null +++ b/resources/data/overlays.xml @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/resources/data/scenarios.xml b/resources/data/scenarios.xml new file mode 100644 index 0000000..4bd485e --- /dev/null +++ b/resources/data/scenarios.xml @@ -0,0 +1,75 @@ + + + + + + + + + + + diff --git a/resources/data/stri.202.txt b/resources/data/stri.202.txt new file mode 100644 index 0000000..fb51d43 --- /dev/null +++ b/resources/data/stri.202.txt @@ -0,0 +1,20 @@ +Low +Medium +High +Very High +Slum +Lower Class +Middle Class +High +Safe +Light +Moderate +Dangerous +None +Moderate +Heavy +Very Heavy +Declining +Stable +Slow Growth +Fast Growth diff --git a/resources/data/stri.219.txt b/resources/data/stri.219.txt new file mode 100644 index 0000000..82129de --- /dev/null +++ b/resources/data/stri.219.txt @@ -0,0 +1,27 @@ +Clear +Water +Trees +Rubble +Flood +Radioactive Waste +Fire +Road +Power +Rail +Residential +Commercial +Industrial +Seaport +Airport +Coal Power +Fire Department +Police Department +Stadium +Nuclear Power +Draw Bridge +Radar Dish +Fountain +Industrial +Steelers 38 Bears 3 +Draw Bridge +Ur 238 diff --git a/resources/data/stri.301.txt b/resources/data/stri.301.txt new file mode 100644 index 0000000..9ce422e --- /dev/null +++ b/resources/data/stri.301.txt @@ -0,0 +1,64 @@ +More residential zones needed. +More commercial zones needed. +More industrial zones needed. +More roads required. +Inadequate rail system. +Build a Power Plant. +Residents demand a Stadium. +Industry requires a Sea Port. +Commerce requires an Airport. +Pollution very high. +Crime very high. +Frequent traffic jams reported. +Citizens demand a Fire Department. +Citizens demand a Police Department. +Blackouts reported. Check power map. +Citizens upset. The tax rate is too high. +Roads deteriorating, due to lack of funds. +Fire departments need funding. +Police departments need funding. +Fire reported ! +A Monster has been sighted !! +Tornado reported !! +Major earthquake reported !!! +A plane has crashed ! +Shipwreck reported ! +A train crashed ! +A helicopter crashed ! +Unemployment rate is high. +YOUR CITY HAS GONE BROKE! +Firebombing reported ! +Need more parks. +Explosion detected ! +Insufficient funds to build that. +Area must be bulldozed first. +Population has reached 2,000. +Population has reached 10,000. +Population has reached 50,000. +Population has reached 100,000. +Population has reached 500,000. +Brownouts, build another Power Plant. +Heavy Traffic reported. +Flooding reported !! +A Nuclear Meltdown has occurred !!! +They're rioting in the streets !! +End of Demo !! +No Sound Server! +No Multi Player License !! +Started a New City. +Restored a Saved City. +x +x +x +x +x +x +x +x +x +x +x +x +x +x +x diff --git a/resources/data/stri.356.txt b/resources/data/stri.356.txt new file mode 100644 index 0000000..a2e2d31 --- /dev/null +++ b/resources/data/stri.356.txt @@ -0,0 +1,19 @@ +Residential Zone +Commercial Zone +Industrial Zone +Fire Station +Query +Police Station +Wire Power +Bulldozer +Rail +Road +Chalk +Eraser +Stadium +Park +Seaport +Coal Power +Nuclear Power +Airport + diff --git a/resources/data/strings_cs-CZ.xml b/resources/data/strings_cs-CZ.xml new file mode 100644 index 0000000..2d2d4fa --- /dev/null +++ b/resources/data/strings_cs-CZ.xml @@ -0,0 +1,1389 @@ + + + + + + + + + + Micropolis: Vyberte si město + + Vítejte na Micropolis! <br/> Vyberte si město výběrem + scénář z záložku 'scénáře', nebo vytváření nové náhodné město od záložku 'generátoru', nebo + zatížení města v knihovně od 'knihovny 'tab. <br/> Poté stiskněte' Play s tlačítkem + Toto město 'níže, začít hrát Micropolis! + + Prosím přihlašte se + nebo vytvořte účet s cílem zachránit své město. + + /wiki/index.php/About?lang=en-US + + /wiki/index.php/Help?lang=cs-CZ + + leden + + únor + + březen + + duben + + květen + + červen + + červenec + + srpen + + září + + říjen + + listopad + + prosinec + + + + + Daně Sbíral: + + Pohyb hotovosti: + + Předchozí fondy: + + Aktuální fondy: + + Daňová sazba: + + Silniční Poptávka: + + Požární Poptávka: + + Policie Poptávka: + + + + + Chcete-li změnit své heslo, zadejte své staré heslo, + zadejte nové heslo dvakrát. + + Změna hesla + + + + + Připojení k Micropolis Online server. + + Připojení k serveru Micropolis + Online nezdařilo. + + Status: + + Znovu připojit + + + + + Jste si opravdu jisti, že chcete + začít nové město? + + Ne, ponechat si hrát s tímto městem. + + Ano, zvolit jiného města. + + Ultra Pomalé + + Super Pomalé + + Velmi pomalé + + Pomalý + + Střední + + Rychle + + Velmi rychle + + Super rychlá + + Ultra Fast + + Astronomicky rychle + + Pokračovat + + Pauza + + Simulátor + + Odmlčel. + + Běží! + + Rychlost + + Uložit města + + Nové Město + + Nápověda + + O + + Katastrofy + + Auto rozpočtu + + Auto buldozerem + + Auto Goto + + Zvuk + + Animace + + Deník + + Oznámení + + + + + Datum: + + Fondy: + + + + + R + + C + + I + + + + + Nástroje + + Zóna + + Stavět + + Více + + Záložka + + Hodnocení + + Historie + + Rozpočet + + Překryvy + + Ovládání + + Fondy + + Daňová sazba + + Policie fondů + + Silniční fondů + + Požární fondů + + + + + Zločin + + Znečištění + + Bydlení + + Daně + + Provozu + + Nezaměstnanost + + Požár + + Obec + + Město + + Město + + Kapitál + + Metropole + + Megalopolis + + Snadné + + Tvrdé + + Schválit: + + Neschválit: + + Obyvatelstvo: + + Migrace: + + Město hodnoty: + + Kategorie: + + Herní úroveň: + + Aktuální skóre: + + Roční změna: + + Popularita: + + Problémy: + + + + + Generování náhodných Mapa + + Generované mapy + + Generovány nové náhodné mapy. + + + + + Obytný + + Zobrazit obytné populace historii. + + Obchodní + + Zobrazit komerční populace historii. + + Průmyslová + + Zobrazit průmyslové populace historii. + + Peníze + + Zobrazit fondů města historie. + + Zobrazit kriminality historii. + + Zobrazit znečištění sazby historie. + + 10 let + + 120 let + + + + + Sdílené Města + + My Města + + Přihlaste se do svého města vidět. + + Nemáte uložené žádné městech dosud. + + Jste si opravdu jisti, že chcete + smazat vaše město? + + Ne, ne jej odstranit. + + Ano, odstranit své město. + + Vpřed + + Zaostalý + + podle + + Vytvořeno Datum + + Datum změny + + Vytvořeno + + Modifikovaná + + + + Jste přihlášen jako + + Prosím, přihlaste se nebo vytvořte nový účet, takže si můžete uložit + města a podílet se na komunitě Micropolis Online. + + + + Úspěšně jste přihlášeni, a můžete si nastavit + svůj účet. + + Prosím, přihlaste se nebo vytvořte nový + účet. + + Nové a registrovaní uživatelé, prosím, zadejte své + uživatelské jméno a heslo a stiskněte příslušné tlačítko. + + Uživatelské jméno: + + Staré heslo: + + Heslo: + + Přihlásit se na existující účet + + Noví uživatelé: Prosím zopakujte Vaše heslo, a zadejte své celé jméno a + e-mailovou adresu. Pak stiskněte tlačítko 'Vytvořit nový účet' tlačítko. + + Opakovat heslo: + + Celé jméno: + + EMail: + + Vytvořit nový účet + + Prosím, zadejte své celé jméno a e-mailovou adresu. + + Nové heslo: + + Odhlásit se + + Zrušit + + Přihlásit se + + + + + Micropolis + + Město simulace začalo! + + Dozvědět se více + + + + + Pan Mapa + + + + + Menu koláč + + + + + + + + Odpojen + (chyba). + + Odpojeno. + + Připojení se nezdařilo. + + Spojení odmítl. + + Připojeno. + + Zprávy se nezdařilo. + + Chcete-li + + + + + + Přehled + + + + + Scénář + + + + + Zahrajte si s touto mapou + + Scénáře + + Generátor + + Knihovna + + Uživatel + + Konfigurace města + + Název + + Popis + + Sdílet města + + Odstranit My City + + + + + Náklady + + + + + Dává lidem místo k životu. Generuje občanů a + dopravy. + + Dává lidem místo k nakupování. Vytváří pracovní místa + a dopravní. + + Dává lidem místo k práci. Vytváří pracovní místa a + dopravní. + + Požární stanice + + Klade požárů v okolí. + + Dotaz + + Popisuje zóny. + + Policejní stanice + + Snižuje trestné činnosti v okolí. + + Drát + + Připojuje zóny s výkonem. + + Buldozer + + Ničí zóny a funkce. + + Železniční + + Čerpá železnice na souši nebo tunelem pod vodou. + + Silnice + + Čerpá silnice na souši nebo most přes vodu. + + Centrum + + Posouvá umístění do středu obrazovky. + + PacBot + + Vyplývá silnice směrem k rušné, a sní vozy, omezení + dopravy. + + Stadión + + Pomáhá obytné zóny. + + Park + + Dělá město hezčí místo k životu. + + Námořní přístav + + Pomáhá průmyslových zón. + + Uhelných elektráren + + Poskytuje výkon, ale znečišťuje. + + Letiště + + Pomáhá komerční zóny. + + Jaderná elektrárna + + Poskytuje výkon, ale může roztavit. + + + + + Netvor + + Požár + + Povodňových + + Meltdown + + Tornádo + + Zemětřesení + + + + + ZNEČIŠTĚNÍ ALERT! + + Znečištění ve vašem městě překročila maximální přípustnou + částek stanovených Micropolis znečištění agentury. Používáte riziko vzniku vážné ekologické + následky. <br/> Buď vyčistit vaše jednání nebo otevřete plynovou masku koncesi na + radnici. + + + + KRIMINALITA ALERT! + + Kriminality ve vašem městě je z ruky. Angry davy jsou plenění + a demolovat metropoli. Prezident pošle v národní garda brzy, pokud nemůžete ovládat problém. + + + + DOPRAVNÍ VAROVÁNÍ! + + Dopravy v tomto městě je hrozné. Město chaosu se rozšiřuje. + Dojíždějící jsou stále militantnější. <br/> Buď postavit více silnic a kolejí, nebo si + neprůstřelné limuzíny. + + + + POŽÁR HLÁŠEN! + + Požár byl hlášen! + + + + MONSTER ATTACK! + + Velké plazí tvor byl spatřen ve vodě. Zdá se být přitahovány + k oblastem s vysokým znečištěním. Tam je cesta ničení kdekoli to jde. <br/> Jediné, co + můžete udělat, je počkat, až on odejde, pak znovu z trosek. + + + + TORNADO ALERT! + + Tornádo bylo hlášeno! Není nic, co můžete udělat pro + zastavení, takže si radši připravit uklidit po katastrofě! + + + + Zemětřesení! + + Velké zemětřesení došlo! Uhasit co nejrychleji, než se + rozšíří, pak znovu připojte napájecí sítě a přestavět město. + + + + Zřícení letadla! + + Letadlo havarovalo! + + + + Vrak! + + Loď byla zničena! + + + + Vlakové neštěstí! + + Vlak se zřítil! + + + + Zřícení vrtulníku! + + Vrtulník se zřítil! + + + + Firebombing HLÁŠEN! + + Zápalné bomby padají! + + + + VÝBUCHU HLÁŠEN! + + Došlo k výbuchu! + + + + MĚSTO + + Gratulujeme, vaše obec rozrostla na město. Nyní máte 2.000 + občanů. + + + + CITY + + Vaše město se rozrostla do plné velikosti města, se současná + populace 10,000. Pokračovat v dobré práci! + + + + KAPITÁL + + Vaše město se stalo kapitálem. Současná populace je zde + 50.000. Vaše politická budoucnost vypadá jasně. + + + + METROPOLIS + + Vaše hlavní město má nyní dosáhla statusu metropole. Aktuální + populace je 100,000. Díky své manažerské schopnosti, měli byste vážně uvažovat o běh pro + guvernéra. + + + + Megalopolis + + Gratulujeme, jste dosáhli nejvyšší kategorie rozvoje měst, + megalopolis. + + + + Rušné! + + Sky Sledujte Jeden zpráv rušné! + + + + Záplavy HLÁŠEN! + + Záplavy byly hlášeny podél břehu! + + + + Jaderného reaktoru! + + Jaderného reaktoru, došlo na své elektrárny. Nacházíte se + doporučuje vyhnout se této oblasti až do rozpadu radioaktivních izotopů. <br/> Mnoho + generací bude řešit tento problém dříve, než to jde pryč, takže se nemusíte zadržte dech. + + + + Vzpoury! + + Občané jsou nepokoje v ulicích! + + + + Start Nové Město + + Sestavte si svůj vlastní město od základu, od této mapě + neobývané země. + + + + Obnovení Uložené města + + Město bylo obnoveno. + + + + YOU'RE VÍTĚZ! + + Vaše mayorial dovednost a urbanismus zkušenosti získali jste + klíč k městu. Místní obyvatelé se postavit pomníky na své slávě a jméno jejich první-dětí + narozených po vás. Proč ne kandidovat na guvernéra? + + + + Obžaloba UPOZORNĚNÍ! + + Celá populace tohoto města má konečně dost nešikovný vašeho + plánování a nekompetentní řízení. Rozzlobený dav - pod vedením své matky - byl spatřen v + blízkosti radnice <br/> byste měli vážně zvážit, prodlužuje dovolenou -. TEĎ. (Nebo si + přečíst manuál a zkuste to znovu.) + + + + O Micropolis + + Micropolis Copyright (C) 2007 od Electronic Arts. <br/> + Na základě původního SimCity koncept, design a kód Will Wright a Fred Haslam. <br/> + Uživatelského rozhraní a vytvořil Don Hopkins. <br/> Portované do Linux, + optimalizované a přizpůsobené pro OLPC Don Hopkins. <br/> pod licencí GNU General + Public License, verze 3, s dalšími podmínkami. + + + + DULLSVILLE, USA 1900 + + Věci se příliš nezměnil tady v posledních sto let nebo tak, a + obyvatelé se začínají nudit. Myslí si, že Dullsville by mohla být další velká města s pravým + vůdcem. <br/> Vaším úkolem je přilákat nový růst a vývoj, soustružení Dullsville do + metropole do 30 let. + + + + SAN FRANCISCO, CA. 1906 + + Škoda ze zemětřesení byl menší ve srovnání s tím následné + požáry, které se dny na kontrolu. 1500 lidí zemřelo. <br/> Controlling požáry by měla + být vaše první problém. Zrušte sutiny a začít přestavět. Máte 5 let. + + + + Hamburg, Německo 1944 + + Spojenecké oheň-bombardovat německých měst v druhé světové + válce způsobila obrovské škody a ztráty na životech. Lidé žijící v centrech měst byly v + největší riziko. <br/> Musíte kontrolovat požární bouře během bombardování a pak znovu + na město po válce. Máte 5 let. + + + + Bern, Švýcarsko 1965 + + Silnice jsou zde stále více přetížené každý den, a obyvatelé + jsou naštvaní. Požadují, aby vás něco udělat. <br/> Někteří navrhli systém hromadné + dopravy jako odpověď, ale to by vyžadovalo velké rezoning v centru města. Máte 10 let. + + Silnice jsou zde stále více přetížené každý den, a obyvatelé jsou + naštvaní. Požadují, aby vás něco udělat. <br/> Někteří navrhli systém hromadné dopravy + jako odpověď, ale to by vyžadovalo velké rezoning v centru města. Máte 10 let. + + Tokio, Japonsko 1957 + + Velké plazí tvor byl spatřen okruh pro zálivu Tokiu. Zdá se, + že přitahuje velké množství průmyslového znečištění tam. <br/> Zkuste kontrolu požáry, + pak znovu průmyslové centrum. Máte 5 let. + + + + Detroit, MI. 1972 + + V roce 1970, konkurence ze zámoří a jiných ekonomických + faktorů tlačil jednou "automobil světové hlavní město", do recese. Poklesem + hodnoty půdy a nezaměstnanost pak zvýšení kriminality ve vnitřní-město chronické úrovně. + <br/> Máte 10 let, snížení kriminality a obnovit průmyslovou základnu města. + + + + BOSTON, MA. 2010 + + Hlavní zhroucení má nastat v jedné z nových reaktorů + jaderných centru. Oblasti v blízkosti reaktoru bude hrozně kontaminované radiací, nutí vás k + restrukturalizaci město kolem ní. <br/> Máš 5 let dostat situaci pod kontrolou. + + + + RIO DE JANEIRO, Brazílie 2047 + + V polovině 21. století-, skleníkový efekt zvýšila globální + teploty 6 ° F. Polar ledovců tál a zvedl hladiny moří po celém světě. Pobřežní oblasti byly + zničené povodní a eroze. <br/> Máte 10 let na přelomu tohoto bažiny zpět do města + znovu. + + + + + + Všechny zóny + + Obytných zón + + Komerční zóny + + Průmyslové zóny + + Připojení napájení + + Dopravní síť + + Hustota obyvatel + + Míra růstu + + Hustota provozu + + Hustota znečištění + + Kriminalita + + Hodnota pozemků + + Hasičská stanice pokrytí + + Policejní stanice pokrytí + + + + + Dullsville + + Nuda + + San Francsico + + Zemětřesení + + Hamburg + + Bombardování + + Bern + + Provozu + + Tokio + + Monster Attack + + Detroit + + Zločin + + Boston + + Jaderná Meltdown + + Rio de Janeiro + + Pobřežních záplav + + + + + Jste přihlášen Vítejte zpět na Micropolis on-line! + + Nesprávné uživatelské jméno nebo heslo. + + Jste již přihlášeni, a můžete se přihlásit nebo si + vytvořit účet. + + Byli jste odhlášeni. Vrať se brzy! + + Zadejte prosím uživatelské jméno. + + Uživatelské jméno obsahuje neplatné + znaky. Prosím, používejte pouze písmena, číslice, podtržítka a pomlčky. + + Prosím, zadejte heslo. + + Uživatel tohoto jména již existuje. + + Prosím, zopakujte stejné heslo + do dalšího pole. + + Účet vedený u e-mailová adresa + již existuje. + + Nový účet byl vytvořen pro vás, a vy jste + přihlášeni Vítejte na Micropolis on-line! + + Nesprávné staré heslo. + + Nová hesla se neshodují. + + Musíte zadat nové heslo dvakrát. + + Vaše heslo bylo změněno. + + + + + Autonomní + + Reset + + Ruční + + Odstranit + + Xenu + + + + + Křesťanská církev + + To je křesťanská církev. + + Pacmania církev + + Jedná se o kostel Pacmania. + + http://en.wikipedia.org/wiki/PacMan + + Kostel Pacmania + + Pacmania je náboženství věnován PacBot. + + http://en.wikipedia.org/wiki/PacMan + + Kostel Pacmania + + Pacmania je polytheistic: každý kostel Pacmania může + plodit až čtyři PacBots. + + http://en.wikipedia.org/wiki/PacMan + + Kostel Pacmania + + PacBot následuje silnicích v okolí, stravování + provozu. + + http://en.wikipedia.org/wiki/PacMan + + Kostel Pacmania + + PacBot je přitahován k rušné, který miluje konzumovat. + + http://en.wikipedia.org/wiki/PacMan + + Kostel Pacmania + + Pacmania kostely vytvářejí hodně frekventovaná, + přilákat PacBot. + + Scientologická církev + + To je Scientologická církev. + + http://en.wikipedia.org/wiki/Scientology + + Scientologická církev + + Scientologie je tělo přesvědčení a praktiky + vytvořil L. Ron Hubbard (1911-1986), od roku 1952, jako nástupce své dřívější svépomoc + systému, Dianetics. Hubbard charakterizován Scientologie jako náboženství, a v roce 1953 + začleněna Scientologické církve v New Jersey. + + http://en.wikipedia.org/wiki/Scientology + + Scientologická církev + + Scientologie učí, že lidé jsou nesmrtelné duchovní + bytosti, kteří zapomněli své skutečné povaze. Jeho metoda duchovní obnovy je typ poradenství + známý jako audit, ve kterém praktici cílem vědomě re-zkušenosti bolestivé nebo traumatické + události v jejich minulosti, aby se vymanit z jejich omezení účinků. Studijní materiály a + auditu kurzy jsou k dispozici členům na oplátku pro konkrétní dary. Scientologie je právně + uznána jako daň-vyňatý náboženství ve Spojených státech a některých jiných zemích, a + Scientologická církev zdůrazňuje to jako důkaz, že to je bona fide náboženství. Jiné země + jako Německo a Francie nadále popírat scientologické náboženské postavení. + + http://en.wikipedia.org/wiki/Scientology + + Scientologická církev + + Velké množství organizací, dohlíží na uplatňování + Scientologie byly vytvořeny, nejpozoruhodnější tito být Scientologické církve. Scientology + sponzory různých sociálních služeb programů. Mezi ně patří soubor mravních pokynů + vyjádřených v brožuře s názvem Cesta ke štěstí, Narconon anti-omámit program, věznice + Criminon rehabilitační program, obor vzdělání Tech metodiky, dobrovolnická organizace a + řízení podniku metodou. + + http://en.wikipedia.org/wiki/Scientology + + Scientologická církev + + Scientology byl obklopen spory od jeho založení. To + bylo často popisováno jako kult, který finančně defrauds a zneužívání svých členů, nabíjecí + přemrštěné poplatky za své duchovní služby. Scientologická církev důsledně používá soudního + řízení proti takové kritiky, a jeho agresivita při výkonu své nepřátele byl odsouzen za + obtěžování. Další diskuse se zaměřila na přesvědčení, že duše Scientology + ("Thetans") reinkarnovat a žili na jiných planetách než na Zemi žít. Bývalí + členové říkají, že některé spisy Hubbarda o této vzdálené mimozemské minulosti, který je + součástí důvěrné horních patrech, nejsou odhalil praktiky, dokud platí tisíce dolarů do + Scientologické církve. Další spornou víra v držení scientologů je, že praxe psychiatrie je + destruktivní a zneužívající a musí být zrušena. + + + http://en.wikipedia.org/wiki/Scientology#Beliefs_and_practices + + Scientology víry a praxe + + Scientology byl obklopen spory od jeho založení. To + bylo často popisováno jako kult, který finančně defrauds a zneužívání svých členů, nabíjecí + přemrštěné poplatky za své duchovní služby. Scientologická církev důsledně používá soudního + řízení proti takové kritiky, a jeho agresivita při výkonu své nepřátele byl odsouzen za + obtěžování. Další diskuse se zaměřila na přesvědčení, že duše Scientology + ("Thetans") reinkarnovat a žili na jiných planetách než na Zemi žít. Bývalí + členové říkají, že některé spisy Hubbarda o této vzdálené mimozemské minulosti, který je + součástí důvěrné horních patrech, nejsou odhalil praktiky, dokud platí tisíce dolarů do + Scientologické církve. Další spornou víra v držení scientologů je, že praxe psychiatrie je + destruktivní a zneužívající a musí být zrušena. + + + http://en.wikipedia.org/wiki/Scientology#Body_and_spirit + + Scientology víry a praxe: Tělo a duch + + Scientology je spojena mytologie že jeho přívrženci + drží, aby odrážel náboženskou pravdu. V Scientology, toto bájesloví se točí kolem Tetan, + věřil být individuální výraz kosmické zdroje, nebo síla života, pojmenované po řecké písmeno + theta (θ). Tetan je myšlenka být skutečnou totožnost osoby - skutečně dobrý, vševědoucí, + non-materiální jádro schopné neomezenou kreativitu. + + + http://en.wikipedia.org/wiki/Scientology#Body_and_spirit + + Scientology víry a praxe: Tělo a duch + + V prvotní minulosti, podle Scientologist učení, + Thetans přinesl materiál vesmír do bytí z velké části pro vlastní potěšení. Vesmír je + myšlenka mít žádné nezávislé reality, ale odvozovat své vyplývá ze skutečnosti, že většina + Thetans souhlasit, že existuje. Scientologové věří, že Thetans upadl v nemilost, když začali + identifikovat s jejich tvorby, spíše než jejich původní stav duchovní čistoty. Nakonec, oni + ztratili paměť jejich skutečné povahy, spolu s tím spojené duchovní a tvořivé síly. Jako + výsledek, Thetans přišel myslet na sebe jako nic, ale ztělesněný bytosti. + + + http://en.wikipedia.org/wiki/Scientology#Body_and_spirit + + Scientology víry a praxe: Tělo a duch + + Thetans jsou věřil být reborn znovu a znovu v nové + subjekty prostřednictvím procesu nazvaného "předpoklad", který je analogický k + reinkarnaci. Podobně jako hinduismus, Scientology předpokládá příčinná souvislost mezi + zkušeností z dřívějších inkarnací, a něčí současného života, a s každým znovuzrození, jsou + účinky MEST vesmír (MEST zde kandiduje na záležitosti, energie, prostor a čas) na Tetan + věřil silnější. + + + http://en.wikipedia.org/wiki/Scientology#Emotions_and_the_mind + + Scientology víry a praxe: Emoce a mysl + + Scientology představuje dvě hlavní divize mysli. + Reaktivní mysli je myšlenka pojmout všechnu bolest a emocionální trauma, zatímco analytická + mysl je racionální mechanismus, který je zodpovědný za vědomí. Reaktivní mysli ukládá + mentální obrazy, které nejsou snadno dostupné analytické (vědomé) mysli, tyto jsou + označovány jako engrams. Engrams jsou věřil být bolestivé, tak oslabující, jak se hromadí, + lidé se stěhují dál od své pravé identity. Abyste se vyhnuli tomuto osudu je Scientologist + základní cíl. Dianetic školení je nástroj, jehož prostřednictvím Scientologist postupuje + vůči státu Clear, vítězných postupné svobodě z reaktivní mysli engrams, a získání jistoty o + jeho nebo její realitu jako Tetan. + + + http://en.wikipedia.org/wiki/Scientology#Emotions_and_the_mind + + Scientology víry a praxe: Emoce a mysl + + Scientology používá emocionální klasifikační systém + nazvaný tónu stupnice. Tónová stupnice je nástroj používaný v poradenství; Scientologové + tvrdí, že věděl, osoby místo na stupnici usnadňuje předvídat jejich akce a pomáhat jim v + jejich stavu lepšit. + + + http://en.wikipedia.org/wiki/Scientology#Survival_and_ethics + + Scientology víry a praxe: Přežití a etika + + Scientology zdůrazňuje význam pro přežití, které + rozdělí do osmi klasifikace, které jsou označovány jako dynamiku. Individuální touha přežít + je považován za první dynamický, zatímco druhá se vztahuje k plození dynamické a rodině. + Zbývající dynamika zahrnují širší oblasti akce, která zahrnuje skupiny, lidstvo, celý život, + fyzický vesmír, duch, a nejvyšší bytí. Optimální řešení jakéhokoli problému, je považován za + ten, který přináší největší užitek co největšímu počtu dynamiky. + + + http://en.wikipedia.org/wiki/Scientology#Survival_and_ethics + + Scientology víry a praxe: Přežití a etika + + Scientologie učí, že duchovní pokrok vyžaduje a + umožňuje dosažení vysoké etické standardy. V Scientology, je racionalita zdůraznil nad + morálkou. Akce jsou považovány za etické, pokud podporují přežití všech osm dynamiku, což + přispěje k co největší počet lidí, možné při poškození nejméně. + + + http://en.wikipedia.org/wiki/Scientology#ARC_and_KRC_triangles + + Scientology víry a praxe: ARC a KRC trojúhelníky + + ARC a KRC trojúhelníky jsou koncepce mapy, které + ukazují vztah mezi tři koncepty tvořit další koncept. Tyto dva trojúhelníky jsou přítomny v + logu Scientology. Spodní trojúhelník, trojúhelník ARC, je souhrnem reprezentace znalostí + Scientologist usiluje o. To zahrnuje Affinity (cit, lásku či sympatie), Reality + (konsensuální realita) a komunikaci (výměnu názorů). Scientologové věří, že zlepšení jeden + ze tří aspektů trojúhelníku "zvyšuje hladinu" z dalších dvou, ale komunikace je + považována za nejdůležitější. Horní trojúhelník je trojúhelník KRC, dopisy KRC předpokládat + podobný vztah mezi znalostmi, odpovědnost a kontrolu. + + + http://en.wikipedia.org/wiki/Scientology#ARC_and_KRC_triangles + + Scientology víry a praxe: ARC a KRC trojúhelníky + + V Scientology, jsou sociální problémy připsal + poruchy ARC - jinými slovy, nedostatek dohody o reality, neschopnost efektivně komunikovat, + nebo neschopnost rozvíjet afinitu. Ty mohou mít podobu overts - škodlivé činy proti jinému, + ať už úmyslně nebo opomenutí - které jsou obvykle následuje zatají - úsilí, aby skryli + provinění, které dále zvyšují úroveň napětí ve vztahu. + + + http://en.wikipedia.org/wiki/Scientology#Social_and_antisocial_personalities + + Scientology víry a praxe: sociální a asociální + osobnosti + + Zatímco Scientology je přesvědčen, že mnohé + sociální problémy jsou neúmyslné výsledky nedokonalostí lidí, uvádí, že existují i opravdu + zlomyslný osob. Hubbard věřil, že přibližně 80 procent všech lidí je to, co on nazývá + sociální osobnosti - lidi, kteří vítají a přispívají k blahobytu druhých. Zbývajících 20 + procent populace, Hubbard myslel, bylo supresivní osob. Podle Hubbarda, jen asi 2,5 procenta + z 20 procent to jsou beznadějně antisociální osobnosti, ty tvoří malý podíl skutečně + nebezpečných jedinců v lidství: "Adolf Hitlerem a Genghis chánů, nestoudný vrahy a + drogové magnáty." Scientologové věří, že jakýkoli kontakt s represivní nebo + antisociální jedinci má nepříznivý vliv na něčí duchovní stav, která vyžaduje odpojení. + + + http://en.wikipedia.org/wiki/Scientology#Social_and_antisocial_personalities + + Scientology víry a praxe: sociální a asociální + osobnosti + + V Scientology, odpadlíci, kteří se obracejí do + kritiky hnutí jsou deklarovány potlačovací osoby, a Scientologická církev má pověst pro + pohybující se agresivně proti takové kritiky. Scientologist, kdo se aktivně při komunikaci s + supresivní osobou a jako výsledek vykazuje známky antisociálního chování se označuje jako + potenciální potíže Source. + + http://en.wikipedia.org/wiki/Scientology#audit + + Scientology víry a praxe: Audit + + Scientologie tvrdí, že lidé mají skryté + schopnosti, které dosud nebyly zcela naplněny. To je věřil, že zvýšené duchovní uvědomění a + fyzické výhody jsou prováděny prostřednictvím poradenských sezení jen audit. Prostřednictvím + auditu, to je říkal, že lidé mohou řešit své problémy a osvobodit sebe engrams. Toto je + obnoví do jejich přirozeného stavu, Thetans a umožňuje jim, aby se na příčinu v jejich + každodenním životě, reagovat racionálně a tvořivě životních událostí, spíše než na ně + reagovat pod vedením uložených engrams. V důsledku toho ti, kdo studují Scientology + materiály a obdržet auditu zasedání zálohy stavu preclear Vymazat a provozní Thetan. + Scientology utopické cílem je "jasné, planeta", svět, v němž má každý zbaven sebe + jejich engrams. + + http://en.wikipedia.org/wiki/Scientology#audit + + Scientology víry a praxe: Audit + + Audit je jeden-na-jedno sezení s poradcem + Scientology nebo auditora. To nese povrchní podobnost ke zpovědi nebo pastorační + poradenství, ale auditor nezbavuje odpuštění nebo radu, jak pastor nebo kněz mohl udělat. + Místo toho, auditora úkolem je pomoci osobě, objevit a pochopit engrams, a jejich limitující + účinky, pro sebe. Většina audit vyžaduje E-metr, přístroj, který opatření minutu změny + elektrického odporu v těle, když člověk drží elektrody (kovové "plechovky"), a + malý proud je prošel ně. Scientologie tvrdí, že sleduje změny v E-metr na displeji pomáhá + lokalizovat engrams. Poté, co oblast zájmu byla identifikována, auditor požádá jednotlivé + konkrétní otázky na to, aby jim pomohla odstranit engram, a používá E-metr potvrdit, že + engram je "poplatek" byl prostopášný a engram má v Skutečnost byla vymazána. Jako + jednotlivec postupuje, zaměření auditu se pohybuje od jednoduchých až engrams engrams + rostoucí složitosti. Na pokročilé úrovni OT auditu, scientologové hrát sólo auditu zasedání, + jako jejich vlastní auditory. + + + http://en.wikipedia.org/wiki/Scientology#The_Bridge_to_Total_Freedom + + Scientology víry a praxe: Most do naprosté + svobody + + Duchovní vývoj uvnitř Scientology je dosaženo tím, + že studuje Scientology materiálů. Scientology materiály (tzv. technologie či technika v + žargonu Scientology) jsou strukturovány sekvenční úrovních (nebo přechody), takže se + snadněji kroky první a větší složitost jsou vyřizovány ve vhodnou dobu. Tento proces je + někdy označováno jako pohybující se podél mostu k naprosté svobody, nebo prostě most. To má + dvě strany: školení a zpracování. Školení se rozumí vzdělávání v zásad a postupů auditu. + Zpracování je osobní rozvoj prostřednictvím účasti na zasedáních auditu. + + + http://en.wikipedia.org/wiki/Scientology#The_Bridge_to_Total_Freedom + + Scientology víry a praxe: Most do naprosté + svobody + + Scientologická církev věří v zásadě reciprocity, + zahrnující dát-a-brát v každé lidské transakci. V důsledku toho jsou členové požadováno, aby + dary pro studijní obory a auditu, jak oni se pohybují nahoru most, částky zvyšující se jako + vyšší úrovně je dosaženo. Účast na vyšší úrovni-kurzy na mostě může stát několik tisíc + dolarů, a scientologové obvykle pohybovat nahoru na most rychlostí řídí jejich příjmů. + + + http://en.wikipedia.org/wiki/Scientology#Space_opera_and_confidential_materials + + Scientology víry a praxe: Space opera a důvěrných + materiálů + + Scientologická církev si myslí, že na vyšších + úrovních o zahájení (OT úrovně) mystické učení je předával, které mohou být škodlivé pro + nepřipravené čtenáře. Tato učení jsou chované tajemství od členů, kteří nedosáhli těchto + úrovních. Církev říká, že tajemství je zaručeno, aby využila svého materiály 'v kontextu, a + chránit své členy před vystaveni materiály, které ještě nejsou připraveni. + + + http://en.wikipedia.org/wiki/Scientology#Space_opera_and_confidential_materials + + Scientology víry a praxe: Space opera a důvěrných + materiálů + + Jedná se o OT úrovně, úrovní nad Clear, jejichž + obsah je hlídané uvnitř Scientology. OT úroveň výuky zahrnují účty různých kosmických + katastrof, které postihly Thetans. Hubbard popsal tyto události brzy kolektivně jako space + opera. + + + http://en.wikipedia.org/wiki/Scientology#Space_opera_and_confidential_materials + + Scientology víry a praxe: Space opera a důvěrných + materiálů + + V OT úrovně, Hubbard vysvětluje, jak zvrátit + účinky vzory v minulosti-život trauma, které údajně rozšířit miliony let do minulosti. Mezi + tyto moderní učení je příběh Xenu (někdy Xemu), představil jako cizí pravítko + "galaktické konfederace." Podle tohoto příběhu, před 75 miliony let Xenu přinesl + miliardy lidí na Zemi v kosmické lodi se podobat Douglas DC-8 letadla, skládali je kolem + sopky a odpálili vodíkové bomby v sopkách. Thetans pak seskupeny, přilepená na těla živých, + a pokračovat, jak to udělat dnes. Scientologové na pokročilé úrovni kladou značný důraz na + izolaci těla Thetans a neutralizovat jejich škodlivé účinky. + + + http://en.wikipedia.org/wiki/Scientology#Space_opera_and_confidential_materials + + Scientology víry a praxe: Space opera a důvěrných + materiálů + + Materiálu obsažené v OT úrovně byl charakterizován + jako špatné sci-fi kritiky, zatímco jiní prohlašují, že to nese strukturální podobnosti s + gnostické myšlení a starověké hinduistické mýty o stvoření a kosmického boje. J. Gordon + Melton naznačuje, že tyto prvky OT úrovně může nikdy byli určeni jako popis historických + událostí, a že, stejně jako jiné náboženské mytologie, mohou mít svou pravdu v realitě těla + a mysli, které symbolizují. Dodává, že na jakékoliv úrovni scientologů by obdrželi tento + mytologie, zdá se, že zjistil, že je užitečné v jejich duchovního hledání. + + + http://en.wikipedia.org/wiki/Scientology#Space_opera_and_confidential_materials + + Scientology víry a praxe: Space opera a důvěrných + materiálů + + Vysoce postavený OT úrovně jsou k dispozici pouze + na pozvání scientology, po přezkoumání kandidáta charakter a přispět k dosažení cílů + scientologie. Jedinci, kteří četli tyto materiály nesmí sdělovat, co obsahují, aniž by + ohrozily jejich postavení v církvi. Výňatky a popisy OT materiály byly publikovány online + bývalý člen v roce 1995 a pak rozeslána v médiích hlavního proudu. To se stalo po vyučování + byla předložena jako důkaz u soudu případech týkajících se scientologie, čímž se stal + předmětem veřejného záznamu. Existuje osm veřejně známé-OT úrovně, OT I až VIII. Nejvyšší + úrovni, OT VIII, je pouze zveřejněny na moři, na výletní lodi Freewinds Scientology. To bylo + propuštěno v pozdní 1980. To se říkalo, že další OT úrovně, řekl, aby byl založený na + materiálu napsal Hubbard dávno, budou zveřejněny na nějaké vhodné místo v budoucnosti. + + + http://en.wikipedia.org/wiki/Scientology#Space_opera_and_confidential_materials + + Scientology víry a praxe: Space opera a důvěrných + materiálů + + Tam je velký kostel duchovní symbol technologie + vytesaný do země na Trementina Base Scientology, které je viditelné ze vzduchu. Washington + Post reportér Richard Leiby napsal: "Bývalý scientologové obeznámen s učením Hubbard o + reinkarnaci říci symbol ochranné známky 'návrat bod' tak loajální zaměstnanci vědí, kde + mohou najít zakladatele funguje, když cestují zde v budoucnu od jiných míst ve vesmíru . + " + + http://en.wikipedia.org/wiki/Scientology#Ceremonies + + Scientology víry a praxe: obřady + + V Scientology, jsou pozorovány obřady pro akce + jako jsou svatby, dítě jmenovat, a pohřby. Pátek služby jsou drženy připomínat dokončení + osoby bohoslužeb v průběhu předchozího týdne. Vysvěcen Scientology ministři mohou provádět + takové obřady. Nicméně, tyto služby a duchovenstvo, které vykonávají jim hrají jen malou + roli v náboženské scientologů 'života. + + http://en.wikipedia.org/wiki/Scientology#Influences + + Scientology víry a praxe: Vlivy + + V Dianetika, Hubbard dá úvěr Francis Bacon a + Herbert Spencer. Hubbard připomenout zasedání Cmdr. Joseph Cheesman Thompson, americký + námořní důstojník, který studoval s Sigmund Freud, když mu bylo 12 let, a když Hubbard + napsal Americké psychologické asociace v roce 1949, on říkal, že on byl provádějící výzkum + založený na "rané dílo Freud". Scientology je pohled na mysl má některé podobnosti + s freudovské jeden. + + http://en.wikipedia.org/wiki/Scientology#Influences + + Scientology víry a praxe: Vlivy + + V roce 1940, Hubbard byl v kontaktu s Jack + Parsons, raketový vědec a člen Ordo Templi Orientis pak vedl o Aleister Crowley, a tam byly + návrhy že této souvislosti ovlivnila některé myšlenky a symboly Scientology. Náboženští + učenci, jako Gerald Willms a J. Gordon Melton poukazují na to, že učení + "satanismu" Crowleyho jen málo, pokud nějakou podobnost s doktrínou Scientology. + + http://en.wikipedia.org/wiki/Scientology#Influences + + Scientology víry a praxe: Vlivy + + Jak již bylo uvedeno, existují prvky východních + náboženství evidentní v scientologii, zejména pojetí karmy, jak je přítomný v hinduismu a + džinismu, a dharma. Kromě odkazů na hinduistické texty, Hubbard se pokusili připojit + Scientology s taoismu a buddhismu. Scientology byl řekl, aby sdílí rysy s Gnosticism stejně. + + + \ No newline at end of file diff --git a/resources/data/strings_de-DE.xml b/resources/data/strings_de-DE.xml new file mode 100644 index 0000000..0e135a4 --- /dev/null +++ b/resources/data/strings_de-DE.xml @@ -0,0 +1,1103 @@ + + + + + + + + + + @de-DE@ Micropolis: Choose a City + + @de-DE@ Welcome to Micropolis!<br/><br/>Choose a city by selecting a scenario from the 'Scenarios' tab, or generating a new random city from the 'Generator' tab, or loading a city in the library from the 'Library' tab.<br/><br/>Then press the 'Play with This City' button below, to start playing Micropolis! + + @de-DE@ Please log in or create an account in order to save your city. + + @de-DE@ /wiki/index.php/About?lang=en-US + + @de-DE@ /wiki/index.php/Help?lang=en-US + + @de-DE@ Jan + + @de-DE@ Feb + + @de-DE@ Mar + + @de-DE@ Apr + + @de-DE@ May + + @de-DE@ Jun + + @de-DE@ Jul + + @de-DE@ Aug + + @de-DE@ Sep + + @de-DE@ Oct + + @de-DE@ Nov + + @de-DE@ Dec + + + + + @de-DE@ Taxes Collected: + + @de-DE@ Cash Flow: + + @de-DE@ Previous Funds: + + @de-DE@ Current Funds: + + @de-DE@ Tax Rate: + + @de-DE@ Road Request: + + @de-DE@ Fire Request: + + @de-DE@ Police Request: + + + + + @de-DE@ To change your password, first enter your old password, then enter your new password twice. + + @de-DE@ Change Password + + + + + @de-DE@ Connecting to Micropolis Online server. + + @de-DE@ Connection to Micropolis Online server failed. + + @de-DE@ Status: + + @de-DE@ Reconnect + + + + + @de-DE@ Are you really sure you want to start a new city? + + @de-DE@ No, keep playing with this city. + + @de-DE@ Yes, choose another city. + + @de-DE@ Ultra Slow + + @de-DE@ Super Slow + + @de-DE@ Very Slow + + @de-DE@ Slow + + @de-DE@ Medium + + @de-DE@ Fast + + @de-DE@ Very Fast + + @de-DE@ Super Fast + + @de-DE@ Ultra Fast + + @de-DE@ Astronomically Fast + + @de-DE@ Resume + + @de-DE@ Pause + + @de-DE@ Simulator + + @de-DE@ Paused. + + @de-DE@ Running! + + @de-DE@ Speed + + @de-DE@ Save City + + @de-DE@ New City + + @de-DE@ Help + + @de-DE@ About + + @de-DE@ Disasters + + @de-DE@ Auto Budget + + @de-DE@ Auto Bulldoze + + @de-DE@ Auto Goto + + @de-DE@ Sound + + @de-DE@ Animation + + @de-DE@ Journal + + @de-DE@ Notices + + + + + @de-DE@ Date: + + @de-DE@ Funds: + + + + + @de-DE@ R + + @de-DE@ C + + @de-DE@ I + + + + + @de-DE@ Tools + + @de-DE@ Zone + + @de-DE@ Build + + @de-DE@ More + + @de-DE@ Tab + + @de-DE@ Evaluation + + @de-DE@ History + + @de-DE@ Budget + + @de-DE@ Overlays + + @de-DE@ Control + + @de-DE@ Funds + + @de-DE@ Tax Rate + + @de-DE@ Police Funds + + @de-DE@ Road Funds + + @de-DE@ Fire Funds + + + + + @de-DE@ Crime + + @de-DE@ Pollution + + @de-DE@ Housing + + @de-DE@ Taxes + + @de-DE@ Traffic + + @de-DE@ Unemployment + + @de-DE@ Fire + + @de-DE@ Village + + @de-DE@ Town + + @de-DE@ City + + @de-DE@ Capital + + @de-DE@ Metropolis + + @de-DE@ Megalopolis + + @de-DE@ Easy + + @de-DE@ Hard + + @de-DE@ Approve: + + @de-DE@ Disapprove: + + @de-DE@ Population: + + @de-DE@ Migration: + + @de-DE@ City Value: + + @de-DE@ Category: + + @de-DE@ Game Level: + + @de-DE@ Current Score: + + @de-DE@ Annual Change: + + @de-DE@ Popularity: + + @de-DE@ Problems: + + + + + @de-DE@ Generate Random Map + + @de-DE@ Generated Map + + @de-DE@ Generated a new random map. + + + + + @de-DE@ Residential + + @de-DE@ Show the residential population history. + + @de-DE@ Commercial + + @de-DE@ Show the commercial population history. + + @de-DE@ Industrial + + @de-DE@ Show the industrial population history. + + @de-DE@ Money + + @de-DE@ Show the city funds history. + + @de-DE@ Show the crime rate history. + + @de-DE@ Show the pollution rate history. + + @de-DE@ 10 Years + + @de-DE@ 120 Years + + + + + @de-DE@ Shared Cities + + @de-DE@ My Cities + + @de-DE@ Log in to see your cities. + + @de-DE@ You haven't saved any cities yet. + + @de-DE@ Are you really sure you want to delete your city? + + @de-DE@ No, don't delete it. + + @de-DE@ Yes, delete my city. + + @de-DE@ Forward + + @de-DE@ Backward + + @de-DE@ by + + @de-DE@ Created Date + + @de-DE@ Modified Date + + @de-DE@ Created + + @de-DE@ Modified + + + + @de-DE@ You are logged in as + + @de-DE@ Please log in or create a new account, so you can save your cities and participate in the Micropolis Online community. + + + + @de-DE@ You have successfully logged in, and you can configure your account. + + @de-DE@ Please log in or create a new account. + + @de-DE@ New and Registered Users, please enter your user name and password, and press the appropriate button. + + @de-DE@ User Name: + + @de-DE@ Old Password: + + @de-DE@ Password: + + @de-DE@ Log In to Existing Account + + @de-DE@ New Users: Please repeat your password, and enter your full name and email address. Then press the 'Create New Account' button. + + @de-DE@ Repeat Password: + + @de-DE@ Full Name: + + @de-DE@ EMail: + + @de-DE@ Create New Account + + @de-DE@ Please enter your full name and email address below. + + @de-DE@ New Password: + + @de-DE@ Log Out + + @de-DE@ Cancel + + @de-DE@ Log In + + + + + @de-DE@ Micropolis + + @de-DE@ The city simulation has begun! + + @de-DE@ Learn More + + + + + @de-DE@ Pan Map + + + + + @de-DE@ Pie Menu + + + + + + + + @de-DE@ Disconnected (error). + + @de-DE@ Disconnected. + + @de-DE@ Connection failed. + + @de-DE@ Connection rejected. + + @de-DE@ Connected. + + @de-DE@ Message failed. + + @de-DE@ To + + + + + + @de-DE@ Score + + + + + @de-DE@ Scenario + + + + + @de-DE@ Play With This Map + + @de-DE@ Scenarios + + @de-DE@ Generator + + @de-DE@ Library + + @de-DE@ User + + @de-DE@ Configure Your City + + @de-DE@ Title + + @de-DE@ Description + + @de-DE@ Share My City + + @de-DE@ Delete My City + + + + + @de-DE@ Cost + + + + + @de-DE@ Gives people a place to live. Generates citizens and traffic. + + @de-DE@ Gives people a place to shop. Generates jobs and traffic. + + @de-DE@ Gives people a place to work. Generates jobs and traffic. + + @de-DE@ Fire Station + + @de-DE@ Puts out fires nearby. + + @de-DE@ Query + + @de-DE@ Describes zones. + + @de-DE@ Police Station + + @de-DE@ Reduces crime nearby. + + @de-DE@ Wire + + @de-DE@ Connects zones with power. + + @de-DE@ Bulldozer + + @de-DE@ Destroys zones and features. + + @de-DE@ Railroad + + @de-DE@ Draws a railroad on land or a tunnel under water. + + @de-DE@ Road + + @de-DE@ Draws a road on land or a bridge over water. + + @de-DE@ Center + + @de-DE@ Scrolls location to center of screen. + + @de-DE@ PacBot + + @de-DE@ Follows roads towards heavy traffic, and eats cars, reducing traffic. + + @de-DE@ Stadium + + @de-DE@ Helps residential zones. + + @de-DE@ Park + + @de-DE@ Makes the city a nicer place to live. + + @de-DE@ Seaport + + @de-DE@ Helps industrial zones. + + @de-DE@ Coal Power + + @de-DE@ Generates power, but pollutes. + + @de-DE@ Airport + + @de-DE@ Helps commercial zones. + + @de-DE@ Nuclear Power + + @de-DE@ Generates power, but might melt down. + + + + + @de-DE@ Monster + + @de-DE@ Fire + + @de-DE@ Flood + + @de-DE@ Meltdown + + @de-DE@ Tornado + + @de-DE@ Earthquake + + + + + @de-DE@ POLLUTION ALERT! + + @de-DE@ Pollution in your city has exceeded the maximum allowable amounts established by the Micropolis Pollution Agency. You are running the risk of grave ecological consequences.<br/>Either clean up your act or open a gas mask concession at city hall. + + @de-DE@ + + @de-DE@ CRIME ALERT! + + @de-DE@ Crime in your city is out of hand. Angry mobs are looting and vandalizing the central city. The president will send in the national guard soon if you cannot control the problem. + + @de-DE@ + + @de-DE@ TRAFFIC WARNING! + + @de-DE@ Traffic in this city is horrible. The city gridlock is expanding. The commuters are getting militant.<br/>Either build more roads and rails or get a bulletproof limo. + + @de-DE@ + + @de-DE@ FIRE REPORTED! + + @de-DE@ A fire has been reported! + + @de-DE@ + + @de-DE@ MONSTER ATTACK! + + @de-DE@ A large reptilian creature has been spotted in the water. It seems to be attracted to areas of high pollution. There is a trail of destruction wherever it goes.<br/>All you can do is wait till he leaves, then rebuild from the rubble. + + @de-DE@ + + @de-DE@ TORNADO ALERT! + + @de-DE@ A tornado has been reported! There's nothing you can do to stop it, so you'd better prepare to clean up after the disaster! + + @de-DE@ + + @de-DE@ EARTHQUAKE! + + @de-DE@ A major earthquake has occurred! Put out the fires as quickly as possible, before they spread, then reconnect the power grid and rebuild the city. + + @de-DE@ + + @de-DE@ PLANE CRASH! + + @de-DE@ A plane has crashed! + + @de-DE@ + + @de-DE@ SHIPWRECK! + + @de-DE@ A ship has wrecked! + + @de-DE@ + + @de-DE@ TRAIN CRASH! + + @de-DE@ A train has crashed! + + @de-DE@ + + @de-DE@ HELICOPTER CRASH! + + @de-DE@ A helicopter has crashed! + + @de-DE@ + + @de-DE@ FIREBOMBING REPORTED! + + @de-DE@ Firebombs are falling!! + + @de-DE@ + + @de-DE@ EXPLOSION REPORTED! + + @de-DE@ There has been an explosion!! + + @de-DE@ + + @de-DE@ TOWN + + @de-DE@ Congratulations, your village has grown to town status. You now have 2,000 citizens. + + @de-DE@ + + @de-DE@ CITY + + @de-DE@ Your town has grown into a full sized city, with a current population of 10,000. Keep up the good work! + + @de-DE@ + + @de-DE@ CAPITAL + + @de-DE@ Your city has become a capital. The current population here is 50,000. Your political future looks bright. + + @de-DE@ + + @de-DE@ METROPOLIS + + @de-DE@ Your capital city has now achieved the status of metropolis. The current population is 100,000. With your management skills, you should seriously consider running for governor. + + @de-DE@ + + @de-DE@ MEGALOPOLIS + + @de-DE@ Congratulation, you have reached the highest category of urban development, the megalopolis. + + @de-DE@ + + @de-DE@ HEAVY TRAFFIC! + + @de-DE@ Sky Watch One reporting heavy traffic! + + @de-DE@ + + @de-DE@ FLOODING REPORTED! + + @de-DE@ Flooding has been been reported along the water's edge! + + @de-DE@ + + @de-DE@ NUCLEAR MELTDOWN! + + @de-DE@ A nuclear meltdown has occured at your power plant. You are advised to avoid the area until the radioactive isotopes decay.<br/>Many generations will confront this problem before it goes away, so don't hold your breath. + + @de-DE@ + + @de-DE@ RIOTS! + + @de-DE@ The citizens are rioting in the streets! + + @de-DE@ + + @de-DE@ Start a New City + + @de-DE@ Build your very own city from the ground up, starting with this map of uninhabited land. + + @de-DE@ + + @de-DE@ Restore a Saved City + + @de-DE@ The city was restored. + + @de-DE@ + + @de-DE@ YOU'RE A WINNER! + + @de-DE@ Your mayorial skill and city planning expertise have earned you the KEY TO THE CITY. Local residents will erect monuments to your glory and name their first-born children after you. Why not run for governor? + + @de-DE@ + + @de-DE@ IMPEACHMENT NOTICE! + + @de-DE@ The entire population of this city has finally had enough of your inept planning and incompetant management. An angry mob - led by your mother - has been spotted in the vicinity of city hall.<br/>You should seriously consider taking an extended vacation - NOW. (Or read the manual and try again.) + + @de-DE@ + + @de-DE@ About Micropolis + + @de-DE@ Micropolis Copyright (C) 2007 by Electronic Arts.<br/>Based on the original SimCity concept, design and code by Will Wright and Fred Haslam.<br/>User Interface Designed and created by Don Hopkins.<br/>Ported to Linux, Optimized and Adapted for OLPC by Don Hopkins.<br/>Licensed under the GNU General Public License, version 3, with additional conditions. + + @de-DE@ + + @de-DE@ DULLSVILLE, USA 1900 + + @de-DE@ Things haven't changed much around here in the last hundred years or so and the residents are beginning to get bored. They think Dullsville could be the next great city with the right leader.<br/>It is your job to attract new growth and development, turning Dullsville into a Metropolis within 30 years. + + @de-DE@ + + @de-DE@ SAN FRANCISCO, CA. 1906 + + @de-DE@ Damage from the earthquake was minor compared to that of the ensuing fires, which took days to control. 1500 people died.<br/>Controlling the fires should be your initial concern. Then clear the rubble and start rebuilding. You have 5 years. + + @de-DE@ + + @de-DE@ HAMBURG, GERMANY 1944 + + @de-DE@ Allied fire-bombing of German cities in WWII caused tremendous damage and loss of life. People living in the inner cities were at greatest risk.<br/>You must control the firestorms during the bombing and then rebuild the city after the war. You have 5 years. + + @de-DE@ + + @de-DE@ BERN, SWITZERLAND 1965 + + @de-DE@ The roads here are becoming more congested every day, and the residents are upset. They demand that you do something about it.<br/>Some have suggested a mass transit system as the answer, but this would require major rezoning in the downtown area. You have 10 years. + + @de-DE@ + + @de-DE@ TOKYO, JAPAN 1957 + + @de-DE@ A large reptilian creature has been spotted heading for Tokyo bay. It seems to be attracted to the heavy levels of industrial pollution there.<br/>Try to control the fires, then rebuild the industrial center. You have 5 years. + + @de-DE@ + + @de-DE@ DETROIT, MI. 1972 + + @de-DE@ By 1970, competition from overseas and other economic factors pushed the once "automobile capital of the world" into recession. Plummeting land values and unemployment then increased crime in the inner-city to chronic levels.<br/>You have 10 years to reduce crime and rebuild the industrial base of the city. + + @de-DE@ + + @de-DE@ BOSTON, MA. 2010 + + @de-DE@ A major meltdown is about to occur at one of the new downtown nuclear reactors. The area in the vicinity of the reactor will be severly contaminated by radiation, forcing you to restructure the city around it.<br/>You have 5 years to get the situation under control. + + @de-DE@ + + @de-DE@ RIO DE JANEIRO, BRAZIL 2047 + + @de-DE@ In the mid-21st century, the greenhouse effect raised global temperatures 6 degrees F. Polar icecaps melted and raised sea levels worldwide. Coastal areas were devastated by flood and erosion.<br/>You have 10 years to turn this swamp back into a city again. + + @de-DE@ + + + + @de-DE@ All Zones + + @de-DE@ Residential Zones + + @de-DE@ Commercial Zones + + @de-DE@ Industrial Zones + + @de-DE@ Power Connectivity + + @de-DE@ Transportation Network + + @de-DE@ Population Density + + @de-DE@ Rate of Growth + + @de-DE@ Traffic Density + + @de-DE@ Pollution Density + + @de-DE@ Crime Rate + + @de-DE@ Land Value + + @de-DE@ Fire Station Coverage + + @de-DE@ Police Station Coverage + + + + + @de-DE@ Dullsville + + @de-DE@ Boredom + + @de-DE@ San Francsico + + @de-DE@ Earthquake + + @de-DE@ Hamburg + + @de-DE@ Bombing + + @de-DE@ Bern + + @de-DE@ Traffic + + @de-DE@ Tokyo + + @de-DE@ Monster Attack + + @de-DE@ Detroit + + @de-DE@ Crime + + @de-DE@ Boston + + @de-DE@ Nuclear Meltdown + + @de-DE@ Rio de Janeiro + + @de-DE@ Coastal Flooding + + + + + @de-DE@ You are logged in. Welcome back to Micropolis Online! + + @de-DE@ Incorrect user name or password. + + @de-DE@ You are already logged out, and you may log in or create an account. + + @de-DE@ You are logged out. Come back soon! + + @de-DE@ Please enter a user name. + + @de-DE@ The user name contains invalid characters. Please use only letters, numbers, underscores or dashes. + + @de-DE@ Please enter a password. + + @de-DE@ A user of that name already exists. + + @de-DE@ Please repeat the same password in the next field. + + @de-DE@ An account with that email address already exists. + + @de-DE@ A new account has been created for you, and you are logged in. Welcome to Micropolis Online! + + @de-DE@ Incorrect old password. + + @de-DE@ The new passwords do not match. + + @de-DE@ You must enter your new password twice. + + @de-DE@ Your password has been changed. + + + + + @de-DE@ Autonomous + + @de-DE@ Reset + + @de-DE@ Manual + + @de-DE@ Delete + + @de-DE@ Xenu + + + + + @de-DE@ Christian Church + + @de-DE@ This is a Christian church. + + @de-DE@ Pacmania Church + + @de-DE@ This is a Pacmania church. + + @de-DE@ http://en.wikipedia.org/wiki/PacMan + + @de-DE@ The Church of Pacmania + + @de-DE@ Pacmania is a religion dedicated to the PacBot. + + @de-DE@ http://en.wikipedia.org/wiki/PacMan + + @de-DE@ The Church of Pacmania + + @de-DE@ Pacmania is polytheistic: each Pacmania church can spawn up to four PacBots. + + @de-DE@ http://en.wikipedia.org/wiki/PacMan + + @de-DE@ The Church of Pacmania + + @de-DE@ The PacBot follows roads around, eating traffic. + + @de-DE@ http://en.wikipedia.org/wiki/PacMan + + @de-DE@ The Church of Pacmania + + @de-DE@ The PacBot is attracted to heavy traffic, which it loves to consume. + + @de-DE@ http://en.wikipedia.org/wiki/PacMan + + @de-DE@ The Church of Pacmania + + @de-DE@ Pacmania churches generate lots of traffic, to attract the PacBot. + + @de-DE@ Church of Scientology + + @de-DE@ This is a Church of Scientology. + + @de-DE@ http://en.wikipedia.org/wiki/Scientology + + @de-DE@ The Church of Scientology + + @de-DE@ Scientology is a body of beliefs and related practices created by L. Ron Hubbard (1911–1986), starting in 1952, as a successor to his earlier self-help system, Dianetics. Hubbard characterized Scientology as a religion, and in 1953 incorporated the Church of Scientology in New Jersey. + + @de-DE@ http://en.wikipedia.org/wiki/Scientology + + @de-DE@ The Church of Scientology + + @de-DE@ Scientology teaches that people are immortal spiritual beings who have forgotten their true nature. Its method of spiritual rehabilitation is a type of counseling known as auditing, in which practitioners aim to consciously re-experience painful or traumatic events in their past, in order to free themselves of their limiting effects. Study materials and auditing courses are made available to members in return for specified donations. Scientology is legally recognized as a tax-exempt religion in the United States and some other countries, and the Church of Scientology emphasizes this as proof that it is a bona fide religion. Other countries such as Germany and France continue to deny Scientology religious status. + + @de-DE@ http://en.wikipedia.org/wiki/Scientology + + @de-DE@ The Church of Scientology + + @de-DE@ A large number of organizations overseeing the application of Scientology have been established, the most notable of these being the Church of Scientology. Scientology sponsors a variety of social service programs. These include a set of moral guidelines expressed in a brochure called The Way to Happiness, the Narconon anti-drug program, the Criminon prison rehabilitation program, the Study Tech education methodology, a volunteer organization, and a business management method. + + @de-DE@ http://en.wikipedia.org/wiki/Scientology + + @de-DE@ The Church of Scientology + + @de-DE@ Scientology has been surrounded by controversies since its inception. It has often been described as a cult that financially defrauds and abuses its members, charging exorbitant fees for its spiritual services. The Church of Scientology has consistently used litigation against such critics, and its aggressiveness in pursuing its foes has been condemned as harassment. Further controversy has focused on Scientology's belief that souls ("thetans") reincarnate and have lived on other planets before living on Earth. Former members say that some of Hubbard's writings on this remote extraterrestrial past, included in confidential Upper Levels, are not revealed to practitioners until they have paid thousands of dollars to the Church of Scientology. Another controversial belief held by Scientologists is that the practice of psychiatry is destructive and abusive and must be abolished. + + @de-DE@ http://en.wikipedia.org/wiki/Scientology#Beliefs_and_practices + + @de-DE@ Scientology beliefs and practices + + @de-DE@ Scientology has been surrounded by controversies since its inception. It has often been described as a cult that financially defrauds and abuses its members, charging exorbitant fees for its spiritual services. The Church of Scientology has consistently used litigation against such critics, and its aggressiveness in pursuing its foes has been condemned as harassment. Further controversy has focused on Scientology's belief that souls ("thetans") reincarnate and have lived on other planets before living on Earth. Former members say that some of Hubbard's writings on this remote extraterrestrial past, included in confidential Upper Levels, are not revealed to practitioners until they have paid thousands of dollars to the Church of Scientology. Another controversial belief held by Scientologists is that the practice of psychiatry is destructive and abusive and must be abolished. + + @de-DE@ http://en.wikipedia.org/wiki/Scientology#Body_and_spirit + + @de-DE@ Scientology beliefs and practices: Body and spirit + + @de-DE@ Scientology has an associated mythology that its adherents hold to reflect religious truth. In Scientology, this mythology revolves around the thetan, believed to be the individualized expression of the cosmic source, or life force, named after the Greek letter theta (θ). The thetan is thought to be the true identity of a person – an intrinsically good, omniscient, non-material core capable of unlimited creativity. + + @de-DE@ http://en.wikipedia.org/wiki/Scientology#Body_and_spirit + + @de-DE@ Scientology beliefs and practices: Body and spirit + + @de-DE@ In the primordial past, according to Scientologist teachings, thetans brought the material universe into being largely for their own pleasure. The universe is thought to have no independent reality, but to derive its apparent reality from the fact that most thetans agree it exists. Scientologists believe that thetans fell from grace when they began to identify with their creation, rather than their original state of spiritual purity. Eventually, they lost their memory of their true nature, along with the associated spiritual and creative powers. As a result, thetans came to think of themselves as nothing but embodied beings. + + @de-DE@ http://en.wikipedia.org/wiki/Scientology#Body_and_spirit + + @de-DE@ Scientology beliefs and practices: Body and spirit + + @de-DE@ Thetans are believed to be reborn time and time again in new bodies through a process called "assumption" which is analogous to reincarnation. Like Hinduism, Scientology posits a causal relationship between the experiences of earlier incarnations and one's present life, and with each rebirth, the effects of the MEST universe (MEST here stands for matter, energy, space, and time) on the thetan are believed to become stronger. + + @de-DE@ http://en.wikipedia.org/wiki/Scientology#Emotions_and_the_mind + + @de-DE@ Scientology beliefs and practices: Emotions and the mind + + @de-DE@ Scientology presents two major divisions of the mind. The reactive mind is thought to absorb all pain and emotional trauma, while the analytical mind is a rational mechanism which is responsible for consciousness. The reactive mind stores mental images which are not readily available to the analytical (conscious) mind; these are referred to as engrams. Engrams are believed to be painful and debilitating; as they accumulate, people move further away from their true identity. To avoid this fate is the Scientologist's basic goal. Dianetic training is the tool through which the Scientologist progresses towards the Clear state, winning gradual freedom from the reactive mind's engrams, and acquiring certainty of his or her reality as a thetan. + + @de-DE@ http://en.wikipedia.org/wiki/Scientology#Emotions_and_the_mind + + @de-DE@ Scientology beliefs and practices: Emotions and the mind + + @de-DE@ Scientology uses an emotional classification system called the tone scale. The tone scale is a tool used in counseling; Scientologists maintain that knowing a person's place on the scale makes it easier to predict their actions and to assist them in bettering their condition. + + @de-DE@ http://en.wikipedia.org/wiki/Scientology#Survival_and_ethics + + @de-DE@ Scientology beliefs and practices: Survival and ethics + + @de-DE@ Scientology emphasizes the importance of survival, which it subdivides into eight classifications that are referred to as dynamics. An individual's desire to survive is considered to be the first dynamic, while the second dynamic relates to procreation and family. The remaining dynamics encompass wider fields of action, involving groups, mankind, all life, the physical universe, the spirit, and the Supreme Being. The optimum solution to any problem is held to be the one that brings the greatest benefit to the greatest number of dynamics. + + @de-DE@ http://en.wikipedia.org/wiki/Scientology#Survival_and_ethics + + @de-DE@ Scientology beliefs and practices: Survival and ethics + + @de-DE@ Scientology teaches that spiritual progress requires and enables the attainment of high ethical standards. In Scientology, rationality is stressed over morality. Actions are considered ethical if they promote survival across all eight dynamics, thus benefiting the greatest number of people possible while harming the fewest. + + @de-DE@ http://en.wikipedia.org/wiki/Scientology#ARC_and_KRC_triangles + + @de-DE@ Scientology beliefs and practices: ARC and KRC triangles + + @de-DE@ The ARC and KRC triangles are concept maps which show a relationship between three concepts to form another concept. These two triangles are present in the Scientology logo. The lower triangle, the ARC triangle, is a summary representation of the knowledge the Scientologist strives for. It encompasses Affinity (affection, love or liking), Reality (consensual reality) and Communication (the exchange of ideas). Scientologists believe that improving one of the three aspects of the triangle "increases the level" of the other two, but Communication is held to be the most important. The upper triangle is the KRC triangle, the letters KRC positing a similar relationship between Knowledge, Responsibility and Control. + + @de-DE@ http://en.wikipedia.org/wiki/Scientology#ARC_and_KRC_triangles + + @de-DE@ Scientology beliefs and practices: ARC and KRC triangles + + @de-DE@ In Scientology, social problems are ascribed to breakdowns in ARC – in other words, a lack of agreement on reality, a failure to communicate effectively, or a failure to develop affinity. These can take the form of overts – harmful acts against another, either intentionally or by omission – which are usually followed by withholds – efforts to conceal the wrongdoing, which further increase the level of tension in the relationship. + + @de-DE@ http://en.wikipedia.org/wiki/Scientology#Social_and_antisocial_personalities + + @de-DE@ Scientology beliefs and practices: Social and antisocial personalities + + @de-DE@ While Scientology believes that many social problems are the unintentional results of people's imperfections, it states that there are also truly malevolent individuals. Hubbard believed that approximately 80 percent of all people are what he called social personalities – people who welcome and contribute to the welfare of others. The remaining 20 percent of the population, Hubbard thought, were suppressive persons. According to Hubbard, only about 2.5 percent of this 20 percent are hopelessly antisocial personalities; these make up the small proportion of truly dangerous individuals in humanity: "the Adolf Hitlers and the Genghis Khans, the unrepentant murderers and the drug lords." Scientologists believe that any contact with suppressive or antisocial individuals has an adverse effect on one's spiritual condition, necessitating disconnection. + + @de-DE@ http://en.wikipedia.org/wiki/Scientology#Social_and_antisocial_personalities + + @de-DE@ Scientology beliefs and practices: Social and antisocial personalities + + @de-DE@ In Scientology, defectors who turn into critics of the movement are declared suppressive persons, and the Church of Scientology has a reputation for moving aggressively against such detractors. A Scientologist who is actively in communication with a suppressive person and as a result shows signs of antisocial behaviour is referred to as a Potential Trouble Source. + + @de-DE@ http://en.wikipedia.org/wiki/Scientology#Auditing + + @de-DE@ Scientology beliefs and practices: Auditing + + @de-DE@ Scientology asserts that people have hidden abilities which have not yet been fully realized. It is believed that increased spiritual awareness and physical benefits are accomplished through counseling sessions referred to as auditing. Through auditing, it is said that people can solve their problems and free themselves of engrams. This restores them to their natural condition as thetans and enables them to be at cause in their daily lives, responding rationally and creatively to life events rather than reacting to them under the direction of stored engrams. Accordingly, those who study Scientology materials and receive auditing sessions advance from a status of Preclear to Clear and Operating Thetan. Scientology's utopian aim is to "clear the planet", a world in which everyone has cleared themselves of their engrams. + + @de-DE@ http://en.wikipedia.org/wiki/Scientology#Auditing + + @de-DE@ Scientology beliefs and practices: Auditing + + @de-DE@ Auditing is a one-on-one session with a Scientology counselor or auditor. It bears a superficial similarity to confession or pastoral counseling, but the auditor does not dispense forgiveness or advice the way a pastor or priest might do. Instead, the auditor's task is to help the person discover and understand engrams, and their limiting effects, for themselves. Most auditing requires an E-meter, a device that measures minute changes in electrical resistance through the body when a person holds electrodes (metal "cans"), and a small current is passed through them. Scientology asserts that watching for changes in the E-meter's display helps locate engrams. Once an area of concern has been identified, the auditor asks the individual specific questions about it, in order to help them eliminate the engram, and uses the E-meter to confirm that the engram's "charge" has been dissipated and the engram has in fact been cleared. As the individual progresses, the focus of auditing moves from simple engrams to engrams of increasing complexity. At the more advanced OT auditing levels, Scientologists perform solo auditing sessions, acting as their own auditors. + + @de-DE@ http://en.wikipedia.org/wiki/Scientology#The_Bridge_to_Total_Freedom + + @de-DE@ Scientology beliefs and practices: The Bridge to Total Freedom + + @de-DE@ Spiritual development within Scientology is accomplished by studying Scientology materials. Scientology materials (called Technology or Tech in Scientology jargon) are structured in sequential levels (or gradients), so that easier steps are taken first and greater complexities are handled at the appropriate time. This process is sometimes referred to as moving along the Bridge to Total Freedom, or simply the Bridge. It has two sides: training and processing. Training means education in the principles and practices of auditing. Processing is personal development through participation in auditing sessions. + + @de-DE@ http://en.wikipedia.org/wiki/Scientology#The_Bridge_to_Total_Freedom + + @de-DE@ Scientology beliefs and practices: The Bridge to Total Freedom + + @de-DE@ The Church of Scientology believes in the principle of reciprocity, involving give-and-take in every human transaction. Accordingly, members are required to make donations for study courses and auditing as they move up the Bridge, the amounts increasing as higher levels are reached. Participation in higher-level courses on the Bridge may cost several thousand dollars, and Scientologists usually move up the Bridge at a rate governed by their income. + + @de-DE@ http://en.wikipedia.org/wiki/Scientology#Space_opera_and_confidential_materials + + @de-DE@ Scientology beliefs and practices: Space opera and confidential materials + + @de-DE@ The Church of Scientology holds that at the higher levels of initiation (OT levels) mystical teachings are imparted that may be harmful to unprepared readers. These teachings are kept secret from members who have not reached these levels. The Church states that the secrecy is warranted to keep its materials' use in context, and to protect its members from being exposed to materials they are not yet prepared for. + + @de-DE@ http://en.wikipedia.org/wiki/Scientology#Space_opera_and_confidential_materials + + @de-DE@ Scientology beliefs and practices: Space opera and confidential materials + + @de-DE@ These are the OT levels, the levels above Clear, whose contents are guarded within Scientology. The OT level teachings include accounts of various cosmic catastrophes that befell the thetans. Hubbard described these early events collectively as space opera. + + @de-DE@ http://en.wikipedia.org/wiki/Scientology#Space_opera_and_confidential_materials + + @de-DE@ Scientology beliefs and practices: Space opera and confidential materials + + @de-DE@ In the OT levels, Hubbard explains how to reverse the effects of past-life trauma patterns that supposedly extend millions of years into the past. Among these advanced teachings is the story of Xenu (sometimes Xemu), introduced as an alien ruler of the "Galactic Confederacy." According to this story, 75 million years ago Xenu brought billions of people to Earth in spacecraft resembling Douglas DC-8 airliners, stacked them around volcanoes and detonated hydrogen bombs in the volcanoes. The thetans then clustered together, stuck to the bodies of the living, and continue to do this today. Scientologists at advanced levels place considerable emphasis on isolating body thetans and neutralizing their ill effects. + + @de-DE@ http://en.wikipedia.org/wiki/Scientology#Space_opera_and_confidential_materials + + @de-DE@ Scientology beliefs and practices: Space opera and confidential materials + + @de-DE@ The material contained in the OT levels has been characterized as bad science fiction by critics, while others claim it bears structural similarities to gnostic thought and ancient Hindu myths of creation and cosmic struggle. J. Gordon Melton suggests that these elements of the OT levels may never have been intended as descriptions of historical events, and that, like other religious mythology, they may have their truth in the realities of the body and mind which they symbolize. He adds that on whatever level Scientologists might have received this mythology, they seem to have found it useful in their spiritual quest. + + @de-DE@ http://en.wikipedia.org/wiki/Scientology#Space_opera_and_confidential_materials + + @de-DE@ Scientology beliefs and practices: Space opera and confidential materials + + @de-DE@ The high-ranking OT levels are made available to Scientologists only by invitation, after a review of the candidate's character and contribution to the aims of Scientology. Individuals who have read these materials may not disclose what they contain without jeopardizing their standing in the Church. Excerpts and descriptions of OT materials were published online by a former member in 1995 and then circulated in mainstream media. This occurred after the teachings were submitted as evidence in court cases involving Scientology, thus becoming a matter of public record. There are eight publicly-known OT levels, OT I to VIII. The highest level, OT VIII, is only disclosed at sea, on the Scientology cruise ship Freewinds. It was released in the late 1980s. It has been rumored that additional OT levels, said to be based on material written by Hubbard long ago, will be released at some appropriate point in the future. + + @de-DE@ http://en.wikipedia.org/wiki/Scientology#Space_opera_and_confidential_materials + + @de-DE@ Scientology beliefs and practices: Space opera and confidential materials + + @de-DE@ There is a large Church of Spiritual Technology symbol carved into the ground at Scientology's Trementina Base that is visible from the air. Washington Post reporter Richard Leiby wrote, "Former Scientologists familiar with Hubbard’s teachings on reincarnation say the symbol marks a 'return point' so loyal staff members know where they can find the founder’s works when they travel here in the future from other places in the universe." + + @de-DE@ http://en.wikipedia.org/wiki/Scientology#Ceremonies + + @de-DE@ Scientology beliefs and practices: Ceremonies + + @de-DE@ In Scientology, ceremonies for events such as weddings, child naming, and funerals are observed. Friday services are held to commemorate the completion of a person's religious services during the prior week. Ordained Scientology ministers may perform such rites. However, these services and the clergy who perform them play only a minor role in Scientologists' religious lives. + + @de-DE@ http://en.wikipedia.org/wiki/Scientology#Influences + + @de-DE@ Scientology beliefs and practices: Influences + + @de-DE@ In Dianetics, Hubbard gives credit to Francis Bacon and Herbert Spencer. Hubbard recalled meeting Cmdr. Joseph Cheesman Thompson, a U.S. Navy officer who studied with Sigmund Freud, when he was 12 years old, and when Hubbard wrote to the American Psychological Association in 1949, he stated that he was conducting research based on the "early work of Freud". Scientology's view of the mind has some similarities to the Freudian one. + + @de-DE@ http://en.wikipedia.org/wiki/Scientology#Influences + + @de-DE@ Scientology beliefs and practices: Influences + + @de-DE@ In the 1940s, Hubbard was in contact with Jack Parsons, a rocket scientist and member of the Ordo Templi Orientis then led by Aleister Crowley, and there have been suggestions that this connection influenced some of the ideas and symbols of Scientology. Religious scholars like Gerald Willms and J. Gordon Melton have pointed out that the teachings of Crowley's "satanism" bear little if any resemblance to Scientology doctrine. + + @de-DE@ http://en.wikipedia.org/wiki/Scientology#Influences + + @de-DE@ Scientology beliefs and practices: Influences + + @de-DE@ As noted, there are elements of Eastern religions evident in Scientology, in particular the concepts of karma, as present in Hinduism and in Jainism, and dharma. In addition to the links to Hindu texts, Hubbard tried to connect Scientology with Taoism and Buddhism. Scientology has been said to share features with Gnosticism as well. + + + diff --git a/resources/data/strings_en-US.xml b/resources/data/strings_en-US.xml new file mode 100644 index 0000000..febdfad --- /dev/null +++ b/resources/data/strings_en-US.xml @@ -0,0 +1,1419 @@ + + + + + + + + + + Micropolis: Choose a City + + Welcome to Micropolis!<br/><br/>Choose a city by + selecting a scenario from the 'Scenarios' tab, or generating a new random city from the + 'Generator' tab, or loading a city in the library from the 'Library' + tab.<br/><br/>Then press the 'Play with This City' button below, to start + playing Micropolis! + + Please log in or + create an account in order to save your city. + + /wiki/index.php/About?lang=en-US + + /wiki/index.php/Help?lang=en-US + + Jan + + Feb + + Mar + + Apr + + May + + Jun + + Jul + + Aug + + Sep + + Oct + + Nov + + Dec + + + + + Taxes Collected: + + Cash Flow: + + Previous Funds: + + Current Funds: + + Tax Rate: + + Road Request: + + Fire Request: + + Police Request: + + + + + To change your password, first enter your old password, + then enter your new password twice. + + Change Password + + + + + Connecting to Micropolis Online server. + + Connection to Micropolis Online + server failed. + + Status: + + Reconnect + + + + + Are you really sure you want to + start a new city? + + No, keep playing with this city. + + Yes, choose another city. + + Ultra Slow + + Super Slow + + Very Slow + + Slow + + Medium + + Fast + + Very Fast + + Super Fast + + Ultra Fast + + Astronomically Fast + + Resume + + Pause + + Simulator + + Paused. + + Running! + + Speed + + Save City + + New City + + Help + + About + + Disasters + + Auto Budget + + Auto Bulldoze + + Auto Goto + + Sound + + Animation + + Journal + + Notices + + + + + Date: + + Funds: + + + + + R + + C + + I + + + + + Tools + + Zone + + Build + + More + + Tab + + Evaluation + + History + + Budget + + Overlays + + Control + + Funds + + Tax Rate + + Police Funds + + Road Funds + + Fire Funds + + + + + Crime + + Pollution + + Housing + + Taxes + + Traffic + + Unemployment + + Fire + + Village + + Town + + City + + Capital + + Metropolis + + Megalopolis + + Easy + + Hard + + Approve: + + Disapprove: + + Population: + + Migration: + + City Value: + + Category: + + Game Level: + + Current Score: + + Annual Change: + + Popularity: + + Problems: + + + + + Generate Random Map + + Generated Map + + Generated a new random map. + + + + + Residential + + Show the residential population history. + + Commercial + + Show the commercial population history. + + Industrial + + Show the industrial population history. + + Money + + Show the city funds history. + + Show the crime rate history. + + Show the pollution rate history. + + 10 Years + + 120 Years + + + + + Shared Cities + + My Cities + + Log in to see your cities. + + You haven't saved any cities yet. + + Are you really sure you want to + delete your city? + + No, don't delete it. + + Yes, delete my city. + + Forward + + Backward + + by + + Created Date + + Modified Date + + Created + + Modified + + + + You are logged in as + + Please log in or create a new account, so you can save your cities + and participate in the Micropolis Online community. + + + + You have successfully logged in, and you can + configure your account. + + Please log in or create a new account. + + New and Registered Users, please enter your user name + and password, and press the appropriate button. + + User Name: + + Old Password: + + Password: + + Log In to Existing Account + + New Users: Please repeat your password, and enter your full name and email + address. Then press the 'Create New Account' button. + + Repeat Password: + + Full Name: + + EMail: + + Create New Account + + Please enter your full name and email address below. + + New Password: + + Log Out + + Cancel + + Log In + + + + + Micropolis + + The city simulation has begun! + + Learn More + + + + + Pan Map + + + + + Pie Menu + + + + + + + + Disconnected + (error). + + Disconnected. + + Connection failed. + + Connection rejected. + + Connected. + + Message failed. + + To + + + + + + Score + + + + + Scenario + + + + + Play With This Map + + Scenarios + + Generator + + Library + + User + + Configure Your City + + Title + + Description + + Share My City + + Delete My City + + + + + Cost + + + + + Gives people a place to live. Generates citizens and + traffic. + + Gives people a place to shop. Generates jobs and + traffic. + + Gives people a place to work. Generates jobs and + traffic. + + Fire Station + + Puts out fires nearby. + + Query + + Describes zones. + + Police Station + + Reduces crime nearby. + + Wire + + Connects zones with power. + + Bulldozer + + Destroys zones and features. + + Railroad + + Draws a railroad on land or a tunnel under water. + + Road + + Draws a road on land or a bridge over water. + + Center + + Scrolls location to center of screen. + + PacBot + + Follows roads towards heavy traffic, and eats cars, + reducing traffic. + + Stadium + + Helps residential zones. + + Park + + Makes the city a nicer place to live. + + Seaport + + Helps industrial zones. + + Coal Power + + Generates power, but pollutes. + + Airport + + Helps commercial zones. + + Nuclear Power + + Generates power, but might melt down. + + + + + Monster + + Fire + + Flood + + Meltdown + + Tornado + + Earthquake + + + + + POLLUTION ALERT! + + Pollution in your city has exceeded the maximum allowable + amounts established by the Micropolis Pollution Agency. You are running the risk of grave + ecological consequences.<br/>Either clean up your act or open a gas mask concession at + city hall. + + + + CRIME ALERT! + + Crime in your city is out of hand. Angry mobs are looting and + vandalizing the central city. The president will send in the national guard soon if you + cannot control the problem. + + + + TRAFFIC WARNING! + + Traffic in this city is horrible. The city gridlock is + expanding. The commuters are getting militant.<br/>Either build more roads and rails + or get a bulletproof limo. + + + + FIRE REPORTED! + + A fire has been reported! + + + + MONSTER ATTACK! + + A large reptilian creature has been spotted in the water. It + seems to be attracted to areas of high pollution. There is a trail of destruction wherever + it goes.<br/>All you can do is wait till he leaves, then rebuild from the rubble. + + + + TORNADO ALERT! + + A tornado has been reported! There's nothing you can do to + stop it, so you'd better prepare to clean up after the disaster! + + + + EARTHQUAKE! + + A major earthquake has occurred! Put out the fires as quickly + as possible, before they spread, then reconnect the power grid and rebuild the city. + + + + PLANE CRASH! + + A plane has crashed! + + + + SHIPWRECK! + + A ship has wrecked! + + + + TRAIN CRASH! + + A train has crashed! + + + + HELICOPTER CRASH! + + A helicopter has crashed! + + + + FIREBOMBING REPORTED! + + Firebombs are falling!! + + + + EXPLOSION REPORTED! + + There has been an explosion!! + + + + TOWN + + Congratulations, your village has grown to town status. You + now have 2,000 citizens. + + + + CITY + + Your town has grown into a full sized city, with a current + population of 10,000. Keep up the good work! + + + + CAPITAL + + Your city has become a capital. The current population here + is 50,000. Your political future looks bright. + + + + METROPOLIS + + Your capital city has now achieved the status of metropolis. + The current population is 100,000. With your management skills, you should seriously + consider running for governor. + + + + MEGALOPOLIS + + Congratulation, you have reached the highest category of + urban development, the megalopolis. + + + + HEAVY TRAFFIC! + + Sky Watch One reporting heavy traffic! + + + + FLOODING REPORTED! + + Flooding has been been reported along the water's edge! + + + + NUCLEAR MELTDOWN! + + A nuclear meltdown has occured at your power plant. You are + advised to avoid the area until the radioactive isotopes decay.<br/>Many generations + will confront this problem before it goes away, so don't hold your breath. + + + + RIOTS! + + The citizens are rioting in the streets! + + + + Start a New City + + Build your very own city from the ground up, starting with + this map of uninhabited land. + + + + Restore a Saved City + + The city was restored. + + + + YOU'RE A WINNER! + + Your mayorial skill and city planning expertise have earned + you the KEY TO THE CITY. Local residents will erect monuments to your glory and name their + first-born children after you. Why not run for governor? + + + + IMPEACHMENT NOTICE! + + The entire population of this city has finally had enough of + your inept planning and incompetant management. An angry mob - led by your mother - has been + spotted in the vicinity of city hall.<br/>You should seriously consider taking an + extended vacation - NOW. (Or read the manual and try again.) + + + + About Micropolis + + Micropolis Copyright (C) 2007 by Electronic + Arts.<br/>Based on the original SimCity concept, design and code by Will Wright and + Fred Haslam.<br/>User Interface Designed and created by Don Hopkins.<br/>Ported + to Linux, Optimized and Adapted for OLPC by Don Hopkins.<br/>Licensed under the GNU + General Public License, version 3, with additional conditions. + + + + DULLSVILLE, USA 1900 + + Things haven't changed much around here in the last hundred + years or so and the residents are beginning to get bored. They think Dullsville could be the + next great city with the right leader.<br/>It is your job to attract new growth and + development, turning Dullsville into a Metropolis within 30 years. + + + + SAN FRANCISCO, CA. 1906 + + Damage from the earthquake was minor compared to that of the + ensuing fires, which took days to control. 1500 people died.<br/>Controlling the fires + should be your initial concern. Then clear the rubble and start rebuilding. You have 5 + years. + + + + HAMBURG, GERMANY 1944 + + Allied fire-bombing of German cities in WWII caused + tremendous damage and loss of life. People living in the inner cities were at greatest + risk.<br/>You must control the firestorms during the bombing and then rebuild the city + after the war. You have 5 years. + + + + BERN, SWITZERLAND 1965 + + The roads here are becoming more congested every day, and the + residents are upset. They demand that you do something about it.<br/>Some have + suggested a mass transit system as the answer, but this would require major rezoning in the + downtown area. You have 10 years. + + + + TOKYO, JAPAN 1957 + + A large reptilian creature has been spotted heading for Tokyo + bay. It seems to be attracted to the heavy levels of industrial pollution + there.<br/>Try to control the fires, then rebuild the industrial center. You have 5 + years. + + + + DETROIT, MI. 1972 + + By 1970, competition from overseas and other economic factors + pushed the once "automobile capital of the world" into recession. Plummeting land + values and unemployment then increased crime in the inner-city to chronic + levels.<br/>You have 10 years to reduce crime and rebuild the industrial base of the + city. + + + + BOSTON, MA. 2010 + + A major meltdown is about to occur at one of the new downtown + nuclear reactors. The area in the vicinity of the reactor will be severly contaminated by + radiation, forcing you to restructure the city around it.<br/>You have 5 years to get + the situation under control. + + + + RIO DE JANEIRO, BRAZIL 2047 + + In the mid-21st century, the greenhouse effect raised global + temperatures 6 degrees F. Polar icecaps melted and raised sea levels worldwide. Coastal + areas were devastated by flood and erosion.<br/>You have 10 years to turn this swamp + back into a city again. + + + + + + All Zones + + Residential Zones + + Commercial Zones + + Industrial Zones + + Power Connectivity + + Transportation Network + + Population Density + + Rate of Growth + + Traffic Density + + Pollution Density + + Crime Rate + + Land Value + + Fire Station Coverage + + Police Station Coverage + + + + + Dullsville + + Boredom + + San Francsico + + Earthquake + + Hamburg + + Bombing + + Bern + + Traffic + + Tokyo + + Monster Attack + + Detroit + + Crime + + Boston + + Nuclear Meltdown + + Rio de Janeiro + + Coastal Flooding + + + + + You are logged in. Welcome back to Micropolis Online! + + Incorrect user name or password. + + You are already logged out, and you may log in or + create an account. + + You are logged out. Come back soon! + + Please enter a user name. + + The user name contains invalid + characters. Please use only letters, numbers, underscores or dashes. + + Please enter a password. + + A user of that name already exists. + + Please repeat the same password + in the next field. + + An account with that email + address already exists. + + A new account has been created for you, and you are + logged in. Welcome to Micropolis Online! + + Incorrect old password. + + The new passwords do not match. + + You must enter your new password twice. + + Your password has been changed. + + + + + Autonomous + + Reset + + Manual + + Delete + + Xenu + + + + + Christian Church + + This is a Christian church. + + Pacmania Church + + This is a Pacmania church. + + http://en.wikipedia.org/wiki/PacMan + + The Church of Pacmania + + Pacmania is a religion dedicated to the PacBot. + + http://en.wikipedia.org/wiki/PacMan + + The Church of Pacmania + + Pacmania is polytheistic: each Pacmania church can + spawn up to four PacBots. + + http://en.wikipedia.org/wiki/PacMan + + The Church of Pacmania + + The PacBot follows roads around, eating traffic. + + http://en.wikipedia.org/wiki/PacMan + + The Church of Pacmania + + The PacBot is attracted to heavy traffic, which it + loves to consume. + + http://en.wikipedia.org/wiki/PacMan + + The Church of Pacmania + + Pacmania churches generate lots of traffic, to attract + the PacBot. + + Church of Scientology + + This is a Church of Scientology. + + http://en.wikipedia.org/wiki/Scientology + + The Church of Scientology + + Scientology is a body of beliefs and related + practices created by L. Ron Hubbard (1911–1986), starting in 1952, as a successor to his + earlier self-help system, Dianetics. Hubbard characterized Scientology as a religion, and in + 1953 incorporated the Church of Scientology in New Jersey. + + http://en.wikipedia.org/wiki/Scientology + + The Church of Scientology + + Scientology teaches that people are immortal + spiritual beings who have forgotten their true nature. Its method of spiritual + rehabilitation is a type of counseling known as auditing, in which practitioners aim to + consciously re-experience painful or traumatic events in their past, in order to free + themselves of their limiting effects. Study materials and auditing courses are made + available to members in return for specified donations. Scientology is legally recognized as + a tax-exempt religion in the United States and some other countries, and the Church of + Scientology emphasizes this as proof that it is a bona fide religion. Other countries such + as Germany and France continue to deny Scientology religious status. + + http://en.wikipedia.org/wiki/Scientology + + The Church of Scientology + + A large number of organizations overseeing the + application of Scientology have been established, the most notable of these being the Church + of Scientology. Scientology sponsors a variety of social service programs. These include a + set of moral guidelines expressed in a brochure called The Way to Happiness, the Narconon + anti-drug program, the Criminon prison rehabilitation program, the Study Tech education + methodology, a volunteer organization, and a business management method. + + http://en.wikipedia.org/wiki/Scientology + + The Church of Scientology + + Scientology has been surrounded by controversies + since its inception. It has often been described as a cult that financially defrauds and + abuses its members, charging exorbitant fees for its spiritual services. The Church of + Scientology has consistently used litigation against such critics, and its aggressiveness in + pursuing its foes has been condemned as harassment. Further controversy has focused on + Scientology's belief that souls ("thetans") reincarnate and have lived on other + planets before living on Earth. Former members say that some of Hubbard's writings on this + remote extraterrestrial past, included in confidential Upper Levels, are not revealed to + practitioners until they have paid thousands of dollars to the Church of Scientology. + Another controversial belief held by Scientologists is that the practice of psychiatry is + destructive and abusive and must be abolished. + + + http://en.wikipedia.org/wiki/Scientology#Beliefs_and_practices + + Scientology beliefs and practices + + Scientology has been surrounded by controversies + since its inception. It has often been described as a cult that financially defrauds and + abuses its members, charging exorbitant fees for its spiritual services. The Church of + Scientology has consistently used litigation against such critics, and its aggressiveness in + pursuing its foes has been condemned as harassment. Further controversy has focused on + Scientology's belief that souls ("thetans") reincarnate and have lived on other + planets before living on Earth. Former members say that some of Hubbard's writings on this + remote extraterrestrial past, included in confidential Upper Levels, are not revealed to + practitioners until they have paid thousands of dollars to the Church of Scientology. + Another controversial belief held by Scientologists is that the practice of psychiatry is + destructive and abusive and must be abolished. + + + http://en.wikipedia.org/wiki/Scientology#Body_and_spirit + + Scientology beliefs and practices: Body and spirit + + Scientology has an associated mythology that its + adherents hold to reflect religious truth. In Scientology, this mythology revolves around + the thetan, believed to be the individualized expression of the cosmic source, or life + force, named after the Greek letter theta (θ). The thetan is thought to be the true identity + of a person – an intrinsically good, omniscient, non-material core capable of unlimited + creativity. + + + http://en.wikipedia.org/wiki/Scientology#Body_and_spirit + + Scientology beliefs and practices: Body and spirit + + In the primordial past, according to Scientologist + teachings, thetans brought the material universe into being largely for their own pleasure. + The universe is thought to have no independent reality, but to derive its apparent reality + from the fact that most thetans agree it exists. Scientologists believe that thetans fell + from grace when they began to identify with their creation, rather than their original state + of spiritual purity. Eventually, they lost their memory of their true nature, along with the + associated spiritual and creative powers. As a result, thetans came to think of themselves + as nothing but embodied beings. + + + http://en.wikipedia.org/wiki/Scientology#Body_and_spirit + + Scientology beliefs and practices: Body and spirit + + Thetans are believed to be reborn time and time + again in new bodies through a process called "assumption" which is analogous to + reincarnation. Like Hinduism, Scientology posits a causal relationship between the + experiences of earlier incarnations and one's present life, and with each rebirth, the + effects of the MEST universe (MEST here stands for matter, energy, space, and time) on the + thetan are believed to become stronger. + + + http://en.wikipedia.org/wiki/Scientology#Emotions_and_the_mind + + Scientology beliefs and practices: Emotions and + the mind + + Scientology presents two major divisions of the + mind. The reactive mind is thought to absorb all pain and emotional trauma, while the + analytical mind is a rational mechanism which is responsible for consciousness. The reactive + mind stores mental images which are not readily available to the analytical (conscious) + mind; these are referred to as engrams. Engrams are believed to be painful and debilitating; + as they accumulate, people move further away from their true identity. To avoid this fate is + the Scientologist's basic goal. Dianetic training is the tool through which the + Scientologist progresses towards the Clear state, winning gradual freedom from the reactive + mind's engrams, and acquiring certainty of his or her reality as a thetan. + + + http://en.wikipedia.org/wiki/Scientology#Emotions_and_the_mind + + Scientology beliefs and practices: Emotions and + the mind + + Scientology uses an emotional classification system + called the tone scale. The tone scale is a tool used in counseling; Scientologists maintain + that knowing a person's place on the scale makes it easier to predict their actions and to + assist them in bettering their condition. + + + http://en.wikipedia.org/wiki/Scientology#Survival_and_ethics + + Scientology beliefs and practices: Survival and + ethics + + Scientology emphasizes the importance of survival, + which it subdivides into eight classifications that are referred to as dynamics. An + individual's desire to survive is considered to be the first dynamic, while the second + dynamic relates to procreation and family. The remaining dynamics encompass wider fields of + action, involving groups, mankind, all life, the physical universe, the spirit, and the + Supreme Being. The optimum solution to any problem is held to be the one that brings the + greatest benefit to the greatest number of dynamics. + + + http://en.wikipedia.org/wiki/Scientology#Survival_and_ethics + + Scientology beliefs and practices: Survival and + ethics + + Scientology teaches that spiritual progress + requires and enables the attainment of high ethical standards. In Scientology, rationality + is stressed over morality. Actions are considered ethical if they promote survival across + all eight dynamics, thus benefiting the greatest number of people possible while harming the + fewest. + + + http://en.wikipedia.org/wiki/Scientology#ARC_and_KRC_triangles + + Scientology beliefs and practices: ARC and KRC + triangles + + The ARC and KRC triangles are concept maps which + show a relationship between three concepts to form another concept. These two triangles are + present in the Scientology logo. The lower triangle, the ARC triangle, is a summary + representation of the knowledge the Scientologist strives for. It encompasses Affinity + (affection, love or liking), Reality (consensual reality) and Communication (the exchange of + ideas). Scientologists believe that improving one of the three aspects of the triangle + "increases the level" of the other two, but Communication is held to be the most + important. The upper triangle is the KRC triangle, the letters KRC positing a similar + relationship between Knowledge, Responsibility and Control. + + + http://en.wikipedia.org/wiki/Scientology#ARC_and_KRC_triangles + + Scientology beliefs and practices: ARC and KRC + triangles + + In Scientology, social problems are ascribed to + breakdowns in ARC – in other words, a lack of agreement on reality, a failure to communicate + effectively, or a failure to develop affinity. These can take the form of overts – harmful + acts against another, either intentionally or by omission – which are usually followed by + withholds – efforts to conceal the wrongdoing, which further increase the level of tension + in the relationship. + + + http://en.wikipedia.org/wiki/Scientology#Social_and_antisocial_personalities + + Scientology beliefs and practices: Social and + antisocial personalities + + While Scientology believes that many social + problems are the unintentional results of people's imperfections, it states that there are + also truly malevolent individuals. Hubbard believed that approximately 80 percent of all + people are what he called social personalities – people who welcome and contribute to the + welfare of others. The remaining 20 percent of the population, Hubbard thought, were + suppressive persons. According to Hubbard, only about 2.5 percent of this 20 percent are + hopelessly antisocial personalities; these make up the small proportion of truly dangerous + individuals in humanity: "the Adolf Hitlers and the Genghis Khans, the unrepentant + murderers and the drug lords." Scientologists believe that any contact with suppressive + or antisocial individuals has an adverse effect on one's spiritual condition, necessitating + disconnection. + + + http://en.wikipedia.org/wiki/Scientology#Social_and_antisocial_personalities + + Scientology beliefs and practices: Social and + antisocial personalities + + In Scientology, defectors who turn into critics of + the movement are declared suppressive persons, and the Church of Scientology has a + reputation for moving aggressively against such detractors. A Scientologist who is actively + in communication with a suppressive person and as a result shows signs of antisocial + behaviour is referred to as a Potential Trouble Source. + + http://en.wikipedia.org/wiki/Scientology#Auditing + + Scientology beliefs and practices: Auditing + + Scientology asserts that people have hidden + abilities which have not yet been fully realized. It is believed that increased spiritual + awareness and physical benefits are accomplished through counseling sessions referred to as + auditing. Through auditing, it is said that people can solve their problems and free + themselves of engrams. This restores them to their natural condition as thetans and enables + them to be at cause in their daily lives, responding rationally and creatively to life + events rather than reacting to them under the direction of stored engrams. Accordingly, + those who study Scientology materials and receive auditing sessions advance from a status of + Preclear to Clear and Operating Thetan. Scientology's utopian aim is to "clear the + planet", a world in which everyone has cleared themselves of their engrams. + + http://en.wikipedia.org/wiki/Scientology#Auditing + + Scientology beliefs and practices: Auditing + + Auditing is a one-on-one session with a + Scientology counselor or auditor. It bears a superficial similarity to confession or + pastoral counseling, but the auditor does not dispense forgiveness or advice the way a + pastor or priest might do. Instead, the auditor's task is to help the person discover and + understand engrams, and their limiting effects, for themselves. Most auditing requires an + E-meter, a device that measures minute changes in electrical resistance through the body + when a person holds electrodes (metal "cans"), and a small current is passed + through them. Scientology asserts that watching for changes in the E-meter's display helps + locate engrams. Once an area of concern has been identified, the auditor asks the individual + specific questions about it, in order to help them eliminate the engram, and uses the + E-meter to confirm that the engram's "charge" has been dissipated and the engram + has in fact been cleared. As the individual progresses, the focus of auditing moves from + simple engrams to engrams of increasing complexity. At the more advanced OT auditing levels, + Scientologists perform solo auditing sessions, acting as their own auditors. + + + http://en.wikipedia.org/wiki/Scientology#The_Bridge_to_Total_Freedom + + Scientology beliefs and practices: The Bridge to + Total Freedom + + Spiritual development within Scientology is + accomplished by studying Scientology materials. Scientology materials (called Technology or + Tech in Scientology jargon) are structured in sequential levels (or gradients), so that + easier steps are taken first and greater complexities are handled at the appropriate time. + This process is sometimes referred to as moving along the Bridge to Total Freedom, or simply + the Bridge. It has two sides: training and processing. Training means education in the + principles and practices of auditing. Processing is personal development through + participation in auditing sessions. + + + http://en.wikipedia.org/wiki/Scientology#The_Bridge_to_Total_Freedom + + Scientology beliefs and practices: The Bridge to + Total Freedom + + The Church of Scientology believes in the + principle of reciprocity, involving give-and-take in every human transaction. Accordingly, + members are required to make donations for study courses and auditing as they move up the + Bridge, the amounts increasing as higher levels are reached. Participation in higher-level + courses on the Bridge may cost several thousand dollars, and Scientologists usually move up + the Bridge at a rate governed by their income. + + + http://en.wikipedia.org/wiki/Scientology#Space_opera_and_confidential_materials + + Scientology beliefs and practices: Space opera + and confidential materials + + The Church of Scientology holds that at the higher + levels of initiation (OT levels) mystical teachings are imparted that may be harmful to + unprepared readers. These teachings are kept secret from members who have not reached these + levels. The Church states that the secrecy is warranted to keep its materials' use in + context, and to protect its members from being exposed to materials they are not yet + prepared for. + + + http://en.wikipedia.org/wiki/Scientology#Space_opera_and_confidential_materials + + Scientology beliefs and practices: Space opera + and confidential materials + + These are the OT levels, the levels above Clear, + whose contents are guarded within Scientology. The OT level teachings include accounts of + various cosmic catastrophes that befell the thetans. Hubbard described these early events + collectively as space opera. + + + http://en.wikipedia.org/wiki/Scientology#Space_opera_and_confidential_materials + + Scientology beliefs and practices: Space opera + and confidential materials + + In the OT levels, Hubbard explains how to reverse + the effects of past-life trauma patterns that supposedly extend millions of years into the + past. Among these advanced teachings is the story of Xenu (sometimes Xemu), introduced as an + alien ruler of the "Galactic Confederacy." According to this story, 75 million + years ago Xenu brought billions of people to Earth in spacecraft resembling Douglas DC-8 + airliners, stacked them around volcanoes and detonated hydrogen bombs in the volcanoes. The + thetans then clustered together, stuck to the bodies of the living, and continue to do this + today. Scientologists at advanced levels place considerable emphasis on isolating body + thetans and neutralizing their ill effects. + + + http://en.wikipedia.org/wiki/Scientology#Space_opera_and_confidential_materials + + Scientology beliefs and practices: Space opera + and confidential materials + + The material contained in the OT levels has been + characterized as bad science fiction by critics, while others claim it bears structural + similarities to gnostic thought and ancient Hindu myths of creation and cosmic struggle. J. + Gordon Melton suggests that these elements of the OT levels may never have been intended as + descriptions of historical events, and that, like other religious mythology, they may have + their truth in the realities of the body and mind which they symbolize. He adds that on + whatever level Scientologists might have received this mythology, they seem to have found it + useful in their spiritual quest. + + + http://en.wikipedia.org/wiki/Scientology#Space_opera_and_confidential_materials + + Scientology beliefs and practices: Space opera + and confidential materials + + The high-ranking OT levels are made available to + Scientologists only by invitation, after a review of the candidate's character and + contribution to the aims of Scientology. Individuals who have read these materials may not + disclose what they contain without jeopardizing their standing in the Church. Excerpts and + descriptions of OT materials were published online by a former member in 1995 and then + circulated in mainstream media. This occurred after the teachings were submitted as evidence + in court cases involving Scientology, thus becoming a matter of public record. There are + eight publicly-known OT levels, OT I to VIII. The highest level, OT VIII, is only disclosed + at sea, on the Scientology cruise ship Freewinds. It was released in the late 1980s. It has + been rumored that additional OT levels, said to be based on material written by Hubbard long + ago, will be released at some appropriate point in the future. + + + http://en.wikipedia.org/wiki/Scientology#Space_opera_and_confidential_materials + + Scientology beliefs and practices: Space opera + and confidential materials + + There is a large Church of Spiritual Technology + symbol carved into the ground at Scientology's Trementina Base that is visible from the air. + Washington Post reporter Richard Leiby wrote, "Former Scientologists familiar with + Hubbard’s teachings on reincarnation say the symbol marks a 'return point' so loyal staff + members know where they can find the founder’s works when they travel here in the future + from other places in the universe." + + http://en.wikipedia.org/wiki/Scientology#Ceremonies + + Scientology beliefs and practices: Ceremonies + + In Scientology, ceremonies for events such as + weddings, child naming, and funerals are observed. Friday services are held to commemorate + the completion of a person's religious services during the prior week. Ordained Scientology + ministers may perform such rites. However, these services and the clergy who perform them + play only a minor role in Scientologists' religious lives. + + http://en.wikipedia.org/wiki/Scientology#Influences + + Scientology beliefs and practices: Influences + + In Dianetics, Hubbard gives credit to Francis + Bacon and Herbert Spencer. Hubbard recalled meeting Cmdr. Joseph Cheesman Thompson, a U.S. + Navy officer who studied with Sigmund Freud, when he was 12 years old, and when Hubbard + wrote to the American Psychological Association in 1949, he stated that he was conducting + research based on the "early work of Freud". Scientology's view of the mind has + some similarities to the Freudian one. + + http://en.wikipedia.org/wiki/Scientology#Influences + + Scientology beliefs and practices: Influences + + In the 1940s, Hubbard was in contact with Jack + Parsons, a rocket scientist and member of the Ordo Templi Orientis then led by Aleister + Crowley, and there have been suggestions that this connection influenced some of the ideas + and symbols of Scientology. Religious scholars like Gerald Willms and J. Gordon Melton have + pointed out that the teachings of Crowley's "satanism" bear little if any + resemblance to Scientology doctrine. + + http://en.wikipedia.org/wiki/Scientology#Influences + + Scientology beliefs and practices: Influences + + As noted, there are elements of Eastern religions + evident in Scientology, in particular the concepts of karma, as present in Hinduism and in + Jainism, and dharma. In addition to the links to Hindu texts, Hubbard tried to connect + Scientology with Taoism and Buddhism. Scientology has been said to share features with + Gnosticism as well. + + + \ No newline at end of file diff --git a/resources/data/strings_fr-FR.xml b/resources/data/strings_fr-FR.xml new file mode 100644 index 0000000..4305b04 --- /dev/null +++ b/resources/data/strings_fr-FR.xml @@ -0,0 +1,1103 @@ + + + + + + + + + + @fr-FR@ Micropolis: Choose a City + + @fr-FR@ Welcome to Micropolis!<br/><br/>Choose a city by selecting a scenario from the 'Scenarios' tab, or generating a new random city from the 'Generator' tab, or loading a city in the library from the 'Library' tab.<br/><br/>Then press the 'Play with This City' button below, to start playing Micropolis! + + @fr-FR@ Please log in or create an account in order to save your city. + + @fr-FR@ /wiki/index.php/About?lang=en-US + + @fr-FR@ /wiki/index.php/Help?lang=en-US + + @fr-FR@ Jan + + @fr-FR@ Feb + + @fr-FR@ Mar + + @fr-FR@ Apr + + @fr-FR@ May + + @fr-FR@ Jun + + @fr-FR@ Jul + + @fr-FR@ Aug + + @fr-FR@ Sep + + @fr-FR@ Oct + + @fr-FR@ Nov + + @fr-FR@ Dec + + + + + @fr-FR@ Taxes Collected: + + @fr-FR@ Cash Flow: + + @fr-FR@ Previous Funds: + + @fr-FR@ Current Funds: + + @fr-FR@ Tax Rate: + + @fr-FR@ Road Request: + + @fr-FR@ Fire Request: + + @fr-FR@ Police Request: + + + + + @fr-FR@ To change your password, first enter your old password, then enter your new password twice. + + @fr-FR@ Change Password + + + + + @fr-FR@ Connecting to Micropolis Online server. + + @fr-FR@ Connection to Micropolis Online server failed. + + @fr-FR@ Status: + + @fr-FR@ Reconnect + + + + + @fr-FR@ Are you really sure you want to start a new city? + + @fr-FR@ No, keep playing with this city. + + @fr-FR@ Yes, choose another city. + + @fr-FR@ Ultra Slow + + @fr-FR@ Super Slow + + @fr-FR@ Very Slow + + @fr-FR@ Slow + + @fr-FR@ Medium + + @fr-FR@ Fast + + @fr-FR@ Very Fast + + @fr-FR@ Super Fast + + @fr-FR@ Ultra Fast + + @fr-FR@ Astronomically Fast + + @fr-FR@ Resume + + @fr-FR@ Pause + + @fr-FR@ Simulator + + @fr-FR@ Paused. + + @fr-FR@ Running! + + @fr-FR@ Speed + + @fr-FR@ Save City + + @fr-FR@ New City + + @fr-FR@ Help + + @fr-FR@ About + + @fr-FR@ Disasters + + @fr-FR@ Auto Budget + + @fr-FR@ Auto Bulldoze + + @fr-FR@ Auto Goto + + @fr-FR@ Sound + + @fr-FR@ Animation + + @fr-FR@ Journal + + @fr-FR@ Notices + + + + + @fr-FR@ Date: + + @fr-FR@ Funds: + + + + + @fr-FR@ R + + @fr-FR@ C + + @fr-FR@ I + + + + + @fr-FR@ Tools + + @fr-FR@ Zone + + @fr-FR@ Build + + @fr-FR@ More + + @fr-FR@ Tab + + @fr-FR@ Evaluation + + @fr-FR@ History + + @fr-FR@ Budget + + @fr-FR@ Overlays + + @fr-FR@ Control + + @fr-FR@ Funds + + @fr-FR@ Tax Rate + + @fr-FR@ Police Funds + + @fr-FR@ Road Funds + + @fr-FR@ Fire Funds + + + + + @fr-FR@ Crime + + @fr-FR@ Pollution + + @fr-FR@ Housing + + @fr-FR@ Taxes + + @fr-FR@ Traffic + + @fr-FR@ Unemployment + + @fr-FR@ Fire + + @fr-FR@ Village + + @fr-FR@ Town + + @fr-FR@ City + + @fr-FR@ Capital + + @fr-FR@ Metropolis + + @fr-FR@ Megalopolis + + @fr-FR@ Easy + + @fr-FR@ Hard + + @fr-FR@ Approve: + + @fr-FR@ Disapprove: + + @fr-FR@ Population: + + @fr-FR@ Migration: + + @fr-FR@ City Value: + + @fr-FR@ Category: + + @fr-FR@ Game Level: + + @fr-FR@ Current Score: + + @fr-FR@ Annual Change: + + @fr-FR@ Popularity: + + @fr-FR@ Problems: + + + + + @fr-FR@ Generate Random Map + + @fr-FR@ Generated Map + + @fr-FR@ Generated a new random map. + + + + + @fr-FR@ Residential + + @fr-FR@ Show the residential population history. + + @fr-FR@ Commercial + + @fr-FR@ Show the commercial population history. + + @fr-FR@ Industrial + + @fr-FR@ Show the industrial population history. + + @fr-FR@ Money + + @fr-FR@ Show the city funds history. + + @fr-FR@ Show the crime rate history. + + @fr-FR@ Show the pollution rate history. + + @fr-FR@ 10 Years + + @fr-FR@ 120 Years + + + + + @fr-FR@ Shared Cities + + @fr-FR@ My Cities + + @fr-FR@ Log in to see your cities. + + @fr-FR@ You haven't saved any cities yet. + + @fr-FR@ Are you really sure you want to delete your city? + + @fr-FR@ No, don't delete it. + + @fr-FR@ Yes, delete my city. + + @fr-FR@ Forward + + @fr-FR@ Backward + + @fr-FR@ by + + @fr-FR@ Created Date + + @fr-FR@ Modified Date + + @fr-FR@ Created + + @fr-FR@ Modified + + + + @fr-FR@ You are logged in as + + @fr-FR@ Please log in or create a new account, so you can save your cities and participate in the Micropolis Online community. + + + + @fr-FR@ You have successfully logged in, and you can configure your account. + + @fr-FR@ Please log in or create a new account. + + @fr-FR@ New and Registered Users, please enter your user name and password, and press the appropriate button. + + @fr-FR@ User Name: + + @fr-FR@ Old Password: + + @fr-FR@ Password: + + @fr-FR@ Log In to Existing Account + + @fr-FR@ New Users: Please repeat your password, and enter your full name and email address. Then press the 'Create New Account' button. + + @fr-FR@ Repeat Password: + + @fr-FR@ Full Name: + + @fr-FR@ EMail: + + @fr-FR@ Create New Account + + @fr-FR@ Please enter your full name and email address below. + + @fr-FR@ New Password: + + @fr-FR@ Log Out + + @fr-FR@ Cancel + + @fr-FR@ Log In + + + + + @fr-FR@ Micropolis + + @fr-FR@ The city simulation has begun! + + @fr-FR@ Learn More + + + + + @fr-FR@ Pan Map + + + + + @fr-FR@ Pie Menu + + + + + + + + @fr-FR@ Disconnected (error). + + @fr-FR@ Disconnected. + + @fr-FR@ Connection failed. + + @fr-FR@ Connection rejected. + + @fr-FR@ Connected. + + @fr-FR@ Message failed. + + @fr-FR@ To + + + + + + @fr-FR@ Score + + + + + @fr-FR@ Scenario + + + + + @fr-FR@ Play With This Map + + @fr-FR@ Scenarios + + @fr-FR@ Generator + + @fr-FR@ Library + + @fr-FR@ User + + @fr-FR@ Configure Your City + + @fr-FR@ Title + + @fr-FR@ Description + + @fr-FR@ Share My City + + @fr-FR@ Delete My City + + + + + @fr-FR@ Cost + + + + + @fr-FR@ Gives people a place to live. Generates citizens and traffic. + + @fr-FR@ Gives people a place to shop. Generates jobs and traffic. + + @fr-FR@ Gives people a place to work. Generates jobs and traffic. + + @fr-FR@ Fire Station + + @fr-FR@ Puts out fires nearby. + + @fr-FR@ Query + + @fr-FR@ Describes zones. + + @fr-FR@ Police Station + + @fr-FR@ Reduces crime nearby. + + @fr-FR@ Wire + + @fr-FR@ Connects zones with power. + + @fr-FR@ Bulldozer + + @fr-FR@ Destroys zones and features. + + @fr-FR@ Railroad + + @fr-FR@ Draws a railroad on land or a tunnel under water. + + @fr-FR@ Road + + @fr-FR@ Draws a road on land or a bridge over water. + + @fr-FR@ Center + + @fr-FR@ Scrolls location to center of screen. + + @fr-FR@ PacBot + + @fr-FR@ Follows roads towards heavy traffic, and eats cars, reducing traffic. + + @fr-FR@ Stadium + + @fr-FR@ Helps residential zones. + + @fr-FR@ Park + + @fr-FR@ Makes the city a nicer place to live. + + @fr-FR@ Seaport + + @fr-FR@ Helps industrial zones. + + @fr-FR@ Coal Power + + @fr-FR@ Generates power, but pollutes. + + @fr-FR@ Airport + + @fr-FR@ Helps commercial zones. + + @fr-FR@ Nuclear Power + + @fr-FR@ Generates power, but might melt down. + + + + + @fr-FR@ Monster + + @fr-FR@ Fire + + @fr-FR@ Flood + + @fr-FR@ Meltdown + + @fr-FR@ Tornado + + @fr-FR@ Earthquake + + + + + @fr-FR@ POLLUTION ALERT! + + @fr-FR@ Pollution in your city has exceeded the maximum allowable amounts established by the Micropolis Pollution Agency. You are running the risk of grave ecological consequences.<br/>Either clean up your act or open a gas mask concession at city hall. + + @fr-FR@ + + @fr-FR@ CRIME ALERT! + + @fr-FR@ Crime in your city is out of hand. Angry mobs are looting and vandalizing the central city. The president will send in the national guard soon if you cannot control the problem. + + @fr-FR@ + + @fr-FR@ TRAFFIC WARNING! + + @fr-FR@ Traffic in this city is horrible. The city gridlock is expanding. The commuters are getting militant.<br/>Either build more roads and rails or get a bulletproof limo. + + @fr-FR@ + + @fr-FR@ FIRE REPORTED! + + @fr-FR@ A fire has been reported! + + @fr-FR@ + + @fr-FR@ MONSTER ATTACK! + + @fr-FR@ A large reptilian creature has been spotted in the water. It seems to be attracted to areas of high pollution. There is a trail of destruction wherever it goes.<br/>All you can do is wait till he leaves, then rebuild from the rubble. + + @fr-FR@ + + @fr-FR@ TORNADO ALERT! + + @fr-FR@ A tornado has been reported! There's nothing you can do to stop it, so you'd better prepare to clean up after the disaster! + + @fr-FR@ + + @fr-FR@ EARTHQUAKE! + + @fr-FR@ A major earthquake has occurred! Put out the fires as quickly as possible, before they spread, then reconnect the power grid and rebuild the city. + + @fr-FR@ + + @fr-FR@ PLANE CRASH! + + @fr-FR@ A plane has crashed! + + @fr-FR@ + + @fr-FR@ SHIPWRECK! + + @fr-FR@ A ship has wrecked! + + @fr-FR@ + + @fr-FR@ TRAIN CRASH! + + @fr-FR@ A train has crashed! + + @fr-FR@ + + @fr-FR@ HELICOPTER CRASH! + + @fr-FR@ A helicopter has crashed! + + @fr-FR@ + + @fr-FR@ FIREBOMBING REPORTED! + + @fr-FR@ Firebombs are falling!! + + @fr-FR@ + + @fr-FR@ EXPLOSION REPORTED! + + @fr-FR@ There has been an explosion!! + + @fr-FR@ + + @fr-FR@ TOWN + + @fr-FR@ Congratulations, your village has grown to town status. You now have 2,000 citizens. + + @fr-FR@ + + @fr-FR@ CITY + + @fr-FR@ Your town has grown into a full sized city, with a current population of 10,000. Keep up the good work! + + @fr-FR@ + + @fr-FR@ CAPITAL + + @fr-FR@ Your city has become a capital. The current population here is 50,000. Your political future looks bright. + + @fr-FR@ + + @fr-FR@ METROPOLIS + + @fr-FR@ Your capital city has now achieved the status of metropolis. The current population is 100,000. With your management skills, you should seriously consider running for governor. + + @fr-FR@ + + @fr-FR@ MEGALOPOLIS + + @fr-FR@ Congratulation, you have reached the highest category of urban development, the megalopolis. + + @fr-FR@ + + @fr-FR@ HEAVY TRAFFIC! + + @fr-FR@ Sky Watch One reporting heavy traffic! + + @fr-FR@ + + @fr-FR@ FLOODING REPORTED! + + @fr-FR@ Flooding has been been reported along the water's edge! + + @fr-FR@ + + @fr-FR@ NUCLEAR MELTDOWN! + + @fr-FR@ A nuclear meltdown has occured at your power plant. You are advised to avoid the area until the radioactive isotopes decay.<br/>Many generations will confront this problem before it goes away, so don't hold your breath. + + @fr-FR@ + + @fr-FR@ RIOTS! + + @fr-FR@ The citizens are rioting in the streets! + + @fr-FR@ + + @fr-FR@ Start a New City + + @fr-FR@ Build your very own city from the ground up, starting with this map of uninhabited land. + + @fr-FR@ + + @fr-FR@ Restore a Saved City + + @fr-FR@ The city was restored. + + @fr-FR@ + + @fr-FR@ YOU'RE A WINNER! + + @fr-FR@ Your mayorial skill and city planning expertise have earned you the KEY TO THE CITY. Local residents will erect monuments to your glory and name their first-born children after you. Why not run for governor? + + @fr-FR@ + + @fr-FR@ IMPEACHMENT NOTICE! + + @fr-FR@ The entire population of this city has finally had enough of your inept planning and incompetant management. An angry mob - led by your mother - has been spotted in the vicinity of city hall.<br/>You should seriously consider taking an extended vacation - NOW. (Or read the manual and try again.) + + @fr-FR@ + + @fr-FR@ About Micropolis + + @fr-FR@ Micropolis Copyright (C) 2007 by Electronic Arts.<br/>Based on the original SimCity concept, design and code by Will Wright and Fred Haslam.<br/>User Interface Designed and created by Don Hopkins.<br/>Ported to Linux, Optimized and Adapted for OLPC by Don Hopkins.<br/>Licensed under the GNU General Public License, version 3, with additional conditions. + + @fr-FR@ + + @fr-FR@ DULLSVILLE, USA 1900 + + @fr-FR@ Things haven't changed much around here in the last hundred years or so and the residents are beginning to get bored. They think Dullsville could be the next great city with the right leader.<br/>It is your job to attract new growth and development, turning Dullsville into a Metropolis within 30 years. + + @fr-FR@ + + @fr-FR@ SAN FRANCISCO, CA. 1906 + + @fr-FR@ Damage from the earthquake was minor compared to that of the ensuing fires, which took days to control. 1500 people died.<br/>Controlling the fires should be your initial concern. Then clear the rubble and start rebuilding. You have 5 years. + + @fr-FR@ + + @fr-FR@ HAMBURG, GERMANY 1944 + + @fr-FR@ Allied fire-bombing of German cities in WWII caused tremendous damage and loss of life. People living in the inner cities were at greatest risk.<br/>You must control the firestorms during the bombing and then rebuild the city after the war. You have 5 years. + + @fr-FR@ + + @fr-FR@ BERN, SWITZERLAND 1965 + + @fr-FR@ The roads here are becoming more congested every day, and the residents are upset. They demand that you do something about it.<br/>Some have suggested a mass transit system as the answer, but this would require major rezoning in the downtown area. You have 10 years. + + @fr-FR@ + + @fr-FR@ TOKYO, JAPAN 1957 + + @fr-FR@ A large reptilian creature has been spotted heading for Tokyo bay. It seems to be attracted to the heavy levels of industrial pollution there.<br/>Try to control the fires, then rebuild the industrial center. You have 5 years. + + @fr-FR@ + + @fr-FR@ DETROIT, MI. 1972 + + @fr-FR@ By 1970, competition from overseas and other economic factors pushed the once "automobile capital of the world" into recession. Plummeting land values and unemployment then increased crime in the inner-city to chronic levels.<br/>You have 10 years to reduce crime and rebuild the industrial base of the city. + + @fr-FR@ + + @fr-FR@ BOSTON, MA. 2010 + + @fr-FR@ A major meltdown is about to occur at one of the new downtown nuclear reactors. The area in the vicinity of the reactor will be severly contaminated by radiation, forcing you to restructure the city around it.<br/>You have 5 years to get the situation under control. + + @fr-FR@ + + @fr-FR@ RIO DE JANEIRO, BRAZIL 2047 + + @fr-FR@ In the mid-21st century, the greenhouse effect raised global temperatures 6 degrees F. Polar icecaps melted and raised sea levels worldwide. Coastal areas were devastated by flood and erosion.<br/>You have 10 years to turn this swamp back into a city again. + + @fr-FR@ + + + + @fr-FR@ All Zones + + @fr-FR@ Residential Zones + + @fr-FR@ Commercial Zones + + @fr-FR@ Industrial Zones + + @fr-FR@ Power Connectivity + + @fr-FR@ Transportation Network + + @fr-FR@ Population Density + + @fr-FR@ Rate of Growth + + @fr-FR@ Traffic Density + + @fr-FR@ Pollution Density + + @fr-FR@ Crime Rate + + @fr-FR@ Land Value + + @fr-FR@ Fire Station Coverage + + @fr-FR@ Police Station Coverage + + + + + @fr-FR@ Dullsville + + @fr-FR@ Boredom + + @fr-FR@ San Francsico + + @fr-FR@ Earthquake + + @fr-FR@ Hamburg + + @fr-FR@ Bombing + + @fr-FR@ Bern + + @fr-FR@ Traffic + + @fr-FR@ Tokyo + + @fr-FR@ Monster Attack + + @fr-FR@ Detroit + + @fr-FR@ Crime + + @fr-FR@ Boston + + @fr-FR@ Nuclear Meltdown + + @fr-FR@ Rio de Janeiro + + @fr-FR@ Coastal Flooding + + + + + @fr-FR@ You are logged in. Welcome back to Micropolis Online! + + @fr-FR@ Incorrect user name or password. + + @fr-FR@ You are already logged out, and you may log in or create an account. + + @fr-FR@ You are logged out. Come back soon! + + @fr-FR@ Please enter a user name. + + @fr-FR@ The user name contains invalid characters. Please use only letters, numbers, underscores or dashes. + + @fr-FR@ Please enter a password. + + @fr-FR@ A user of that name already exists. + + @fr-FR@ Please repeat the same password in the next field. + + @fr-FR@ An account with that email address already exists. + + @fr-FR@ A new account has been created for you, and you are logged in. Welcome to Micropolis Online! + + @fr-FR@ Incorrect old password. + + @fr-FR@ The new passwords do not match. + + @fr-FR@ You must enter your new password twice. + + @fr-FR@ Your password has been changed. + + + + + @fr-FR@ Autonomous + + @fr-FR@ Reset + + @fr-FR@ Manual + + @fr-FR@ Delete + + @fr-FR@ Xenu + + + + + @fr-FR@ Christian Church + + @fr-FR@ This is a Christian church. + + @fr-FR@ Pacmania Church + + @fr-FR@ This is a Pacmania church. + + @fr-FR@ http://en.wikipedia.org/wiki/PacMan + + @fr-FR@ The Church of Pacmania + + @fr-FR@ Pacmania is a religion dedicated to the PacBot. + + @fr-FR@ http://en.wikipedia.org/wiki/PacMan + + @fr-FR@ The Church of Pacmania + + @fr-FR@ Pacmania is polytheistic: each Pacmania church can spawn up to four PacBots. + + @fr-FR@ http://en.wikipedia.org/wiki/PacMan + + @fr-FR@ The Church of Pacmania + + @fr-FR@ The PacBot follows roads around, eating traffic. + + @fr-FR@ http://en.wikipedia.org/wiki/PacMan + + @fr-FR@ The Church of Pacmania + + @fr-FR@ The PacBot is attracted to heavy traffic, which it loves to consume. + + @fr-FR@ http://en.wikipedia.org/wiki/PacMan + + @fr-FR@ The Church of Pacmania + + @fr-FR@ Pacmania churches generate lots of traffic, to attract the PacBot. + + @fr-FR@ Church of Scientology + + @fr-FR@ This is a Church of Scientology. + + @fr-FR@ http://en.wikipedia.org/wiki/Scientology + + @fr-FR@ The Church of Scientology + + @fr-FR@ Scientology is a body of beliefs and related practices created by L. Ron Hubbard (1911–1986), starting in 1952, as a successor to his earlier self-help system, Dianetics. Hubbard characterized Scientology as a religion, and in 1953 incorporated the Church of Scientology in New Jersey. + + @fr-FR@ http://en.wikipedia.org/wiki/Scientology + + @fr-FR@ The Church of Scientology + + @fr-FR@ Scientology teaches that people are immortal spiritual beings who have forgotten their true nature. Its method of spiritual rehabilitation is a type of counseling known as auditing, in which practitioners aim to consciously re-experience painful or traumatic events in their past, in order to free themselves of their limiting effects. Study materials and auditing courses are made available to members in return for specified donations. Scientology is legally recognized as a tax-exempt religion in the United States and some other countries, and the Church of Scientology emphasizes this as proof that it is a bona fide religion. Other countries such as Germany and France continue to deny Scientology religious status. + + @fr-FR@ http://en.wikipedia.org/wiki/Scientology + + @fr-FR@ The Church of Scientology + + @fr-FR@ A large number of organizations overseeing the application of Scientology have been established, the most notable of these being the Church of Scientology. Scientology sponsors a variety of social service programs. These include a set of moral guidelines expressed in a brochure called The Way to Happiness, the Narconon anti-drug program, the Criminon prison rehabilitation program, the Study Tech education methodology, a volunteer organization, and a business management method. + + @fr-FR@ http://en.wikipedia.org/wiki/Scientology + + @fr-FR@ The Church of Scientology + + @fr-FR@ Scientology has been surrounded by controversies since its inception. It has often been described as a cult that financially defrauds and abuses its members, charging exorbitant fees for its spiritual services. The Church of Scientology has consistently used litigation against such critics, and its aggressiveness in pursuing its foes has been condemned as harassment. Further controversy has focused on Scientology's belief that souls ("thetans") reincarnate and have lived on other planets before living on Earth. Former members say that some of Hubbard's writings on this remote extraterrestrial past, included in confidential Upper Levels, are not revealed to practitioners until they have paid thousands of dollars to the Church of Scientology. Another controversial belief held by Scientologists is that the practice of psychiatry is destructive and abusive and must be abolished. + + @fr-FR@ http://en.wikipedia.org/wiki/Scientology#Beliefs_and_practices + + @fr-FR@ Scientology beliefs and practices + + @fr-FR@ Scientology has been surrounded by controversies since its inception. It has often been described as a cult that financially defrauds and abuses its members, charging exorbitant fees for its spiritual services. The Church of Scientology has consistently used litigation against such critics, and its aggressiveness in pursuing its foes has been condemned as harassment. Further controversy has focused on Scientology's belief that souls ("thetans") reincarnate and have lived on other planets before living on Earth. Former members say that some of Hubbard's writings on this remote extraterrestrial past, included in confidential Upper Levels, are not revealed to practitioners until they have paid thousands of dollars to the Church of Scientology. Another controversial belief held by Scientologists is that the practice of psychiatry is destructive and abusive and must be abolished. + + @fr-FR@ http://en.wikipedia.org/wiki/Scientology#Body_and_spirit + + @fr-FR@ Scientology beliefs and practices: Body and spirit + + @fr-FR@ Scientology has an associated mythology that its adherents hold to reflect religious truth. In Scientology, this mythology revolves around the thetan, believed to be the individualized expression of the cosmic source, or life force, named after the Greek letter theta (θ). The thetan is thought to be the true identity of a person – an intrinsically good, omniscient, non-material core capable of unlimited creativity. + + @fr-FR@ http://en.wikipedia.org/wiki/Scientology#Body_and_spirit + + @fr-FR@ Scientology beliefs and practices: Body and spirit + + @fr-FR@ In the primordial past, according to Scientologist teachings, thetans brought the material universe into being largely for their own pleasure. The universe is thought to have no independent reality, but to derive its apparent reality from the fact that most thetans agree it exists. Scientologists believe that thetans fell from grace when they began to identify with their creation, rather than their original state of spiritual purity. Eventually, they lost their memory of their true nature, along with the associated spiritual and creative powers. As a result, thetans came to think of themselves as nothing but embodied beings. + + @fr-FR@ http://en.wikipedia.org/wiki/Scientology#Body_and_spirit + + @fr-FR@ Scientology beliefs and practices: Body and spirit + + @fr-FR@ Thetans are believed to be reborn time and time again in new bodies through a process called "assumption" which is analogous to reincarnation. Like Hinduism, Scientology posits a causal relationship between the experiences of earlier incarnations and one's present life, and with each rebirth, the effects of the MEST universe (MEST here stands for matter, energy, space, and time) on the thetan are believed to become stronger. + + @fr-FR@ http://en.wikipedia.org/wiki/Scientology#Emotions_and_the_mind + + @fr-FR@ Scientology beliefs and practices: Emotions and the mind + + @fr-FR@ Scientology presents two major divisions of the mind. The reactive mind is thought to absorb all pain and emotional trauma, while the analytical mind is a rational mechanism which is responsible for consciousness. The reactive mind stores mental images which are not readily available to the analytical (conscious) mind; these are referred to as engrams. Engrams are believed to be painful and debilitating; as they accumulate, people move further away from their true identity. To avoid this fate is the Scientologist's basic goal. Dianetic training is the tool through which the Scientologist progresses towards the Clear state, winning gradual freedom from the reactive mind's engrams, and acquiring certainty of his or her reality as a thetan. + + @fr-FR@ http://en.wikipedia.org/wiki/Scientology#Emotions_and_the_mind + + @fr-FR@ Scientology beliefs and practices: Emotions and the mind + + @fr-FR@ Scientology uses an emotional classification system called the tone scale. The tone scale is a tool used in counseling; Scientologists maintain that knowing a person's place on the scale makes it easier to predict their actions and to assist them in bettering their condition. + + @fr-FR@ http://en.wikipedia.org/wiki/Scientology#Survival_and_ethics + + @fr-FR@ Scientology beliefs and practices: Survival and ethics + + @fr-FR@ Scientology emphasizes the importance of survival, which it subdivides into eight classifications that are referred to as dynamics. An individual's desire to survive is considered to be the first dynamic, while the second dynamic relates to procreation and family. The remaining dynamics encompass wider fields of action, involving groups, mankind, all life, the physical universe, the spirit, and the Supreme Being. The optimum solution to any problem is held to be the one that brings the greatest benefit to the greatest number of dynamics. + + @fr-FR@ http://en.wikipedia.org/wiki/Scientology#Survival_and_ethics + + @fr-FR@ Scientology beliefs and practices: Survival and ethics + + @fr-FR@ Scientology teaches that spiritual progress requires and enables the attainment of high ethical standards. In Scientology, rationality is stressed over morality. Actions are considered ethical if they promote survival across all eight dynamics, thus benefiting the greatest number of people possible while harming the fewest. + + @fr-FR@ http://en.wikipedia.org/wiki/Scientology#ARC_and_KRC_triangles + + @fr-FR@ Scientology beliefs and practices: ARC and KRC triangles + + @fr-FR@ The ARC and KRC triangles are concept maps which show a relationship between three concepts to form another concept. These two triangles are present in the Scientology logo. The lower triangle, the ARC triangle, is a summary representation of the knowledge the Scientologist strives for. It encompasses Affinity (affection, love or liking), Reality (consensual reality) and Communication (the exchange of ideas). Scientologists believe that improving one of the three aspects of the triangle "increases the level" of the other two, but Communication is held to be the most important. The upper triangle is the KRC triangle, the letters KRC positing a similar relationship between Knowledge, Responsibility and Control. + + @fr-FR@ http://en.wikipedia.org/wiki/Scientology#ARC_and_KRC_triangles + + @fr-FR@ Scientology beliefs and practices: ARC and KRC triangles + + @fr-FR@ In Scientology, social problems are ascribed to breakdowns in ARC – in other words, a lack of agreement on reality, a failure to communicate effectively, or a failure to develop affinity. These can take the form of overts – harmful acts against another, either intentionally or by omission – which are usually followed by withholds – efforts to conceal the wrongdoing, which further increase the level of tension in the relationship. + + @fr-FR@ http://en.wikipedia.org/wiki/Scientology#Social_and_antisocial_personalities + + @fr-FR@ Scientology beliefs and practices: Social and antisocial personalities + + @fr-FR@ While Scientology believes that many social problems are the unintentional results of people's imperfections, it states that there are also truly malevolent individuals. Hubbard believed that approximately 80 percent of all people are what he called social personalities – people who welcome and contribute to the welfare of others. The remaining 20 percent of the population, Hubbard thought, were suppressive persons. According to Hubbard, only about 2.5 percent of this 20 percent are hopelessly antisocial personalities; these make up the small proportion of truly dangerous individuals in humanity: "the Adolf Hitlers and the Genghis Khans, the unrepentant murderers and the drug lords." Scientologists believe that any contact with suppressive or antisocial individuals has an adverse effect on one's spiritual condition, necessitating disconnection. + + @fr-FR@ http://en.wikipedia.org/wiki/Scientology#Social_and_antisocial_personalities + + @fr-FR@ Scientology beliefs and practices: Social and antisocial personalities + + @fr-FR@ In Scientology, defectors who turn into critics of the movement are declared suppressive persons, and the Church of Scientology has a reputation for moving aggressively against such detractors. A Scientologist who is actively in communication with a suppressive person and as a result shows signs of antisocial behaviour is referred to as a Potential Trouble Source. + + @fr-FR@ http://en.wikipedia.org/wiki/Scientology#Auditing + + @fr-FR@ Scientology beliefs and practices: Auditing + + @fr-FR@ Scientology asserts that people have hidden abilities which have not yet been fully realized. It is believed that increased spiritual awareness and physical benefits are accomplished through counseling sessions referred to as auditing. Through auditing, it is said that people can solve their problems and free themselves of engrams. This restores them to their natural condition as thetans and enables them to be at cause in their daily lives, responding rationally and creatively to life events rather than reacting to them under the direction of stored engrams. Accordingly, those who study Scientology materials and receive auditing sessions advance from a status of Preclear to Clear and Operating Thetan. Scientology's utopian aim is to "clear the planet", a world in which everyone has cleared themselves of their engrams. + + @fr-FR@ http://en.wikipedia.org/wiki/Scientology#Auditing + + @fr-FR@ Scientology beliefs and practices: Auditing + + @fr-FR@ Auditing is a one-on-one session with a Scientology counselor or auditor. It bears a superficial similarity to confession or pastoral counseling, but the auditor does not dispense forgiveness or advice the way a pastor or priest might do. Instead, the auditor's task is to help the person discover and understand engrams, and their limiting effects, for themselves. Most auditing requires an E-meter, a device that measures minute changes in electrical resistance through the body when a person holds electrodes (metal "cans"), and a small current is passed through them. Scientology asserts that watching for changes in the E-meter's display helps locate engrams. Once an area of concern has been identified, the auditor asks the individual specific questions about it, in order to help them eliminate the engram, and uses the E-meter to confirm that the engram's "charge" has been dissipated and the engram has in fact been cleared. As the individual progresses, the focus of auditing moves from simple engrams to engrams of increasing complexity. At the more advanced OT auditing levels, Scientologists perform solo auditing sessions, acting as their own auditors. + + @fr-FR@ http://en.wikipedia.org/wiki/Scientology#The_Bridge_to_Total_Freedom + + @fr-FR@ Scientology beliefs and practices: The Bridge to Total Freedom + + @fr-FR@ Spiritual development within Scientology is accomplished by studying Scientology materials. Scientology materials (called Technology or Tech in Scientology jargon) are structured in sequential levels (or gradients), so that easier steps are taken first and greater complexities are handled at the appropriate time. This process is sometimes referred to as moving along the Bridge to Total Freedom, or simply the Bridge. It has two sides: training and processing. Training means education in the principles and practices of auditing. Processing is personal development through participation in auditing sessions. + + @fr-FR@ http://en.wikipedia.org/wiki/Scientology#The_Bridge_to_Total_Freedom + + @fr-FR@ Scientology beliefs and practices: The Bridge to Total Freedom + + @fr-FR@ The Church of Scientology believes in the principle of reciprocity, involving give-and-take in every human transaction. Accordingly, members are required to make donations for study courses and auditing as they move up the Bridge, the amounts increasing as higher levels are reached. Participation in higher-level courses on the Bridge may cost several thousand dollars, and Scientologists usually move up the Bridge at a rate governed by their income. + + @fr-FR@ http://en.wikipedia.org/wiki/Scientology#Space_opera_and_confidential_materials + + @fr-FR@ Scientology beliefs and practices: Space opera and confidential materials + + @fr-FR@ The Church of Scientology holds that at the higher levels of initiation (OT levels) mystical teachings are imparted that may be harmful to unprepared readers. These teachings are kept secret from members who have not reached these levels. The Church states that the secrecy is warranted to keep its materials' use in context, and to protect its members from being exposed to materials they are not yet prepared for. + + @fr-FR@ http://en.wikipedia.org/wiki/Scientology#Space_opera_and_confidential_materials + + @fr-FR@ Scientology beliefs and practices: Space opera and confidential materials + + @fr-FR@ These are the OT levels, the levels above Clear, whose contents are guarded within Scientology. The OT level teachings include accounts of various cosmic catastrophes that befell the thetans. Hubbard described these early events collectively as space opera. + + @fr-FR@ http://en.wikipedia.org/wiki/Scientology#Space_opera_and_confidential_materials + + @fr-FR@ Scientology beliefs and practices: Space opera and confidential materials + + @fr-FR@ In the OT levels, Hubbard explains how to reverse the effects of past-life trauma patterns that supposedly extend millions of years into the past. Among these advanced teachings is the story of Xenu (sometimes Xemu), introduced as an alien ruler of the "Galactic Confederacy." According to this story, 75 million years ago Xenu brought billions of people to Earth in spacecraft resembling Douglas DC-8 airliners, stacked them around volcanoes and detonated hydrogen bombs in the volcanoes. The thetans then clustered together, stuck to the bodies of the living, and continue to do this today. Scientologists at advanced levels place considerable emphasis on isolating body thetans and neutralizing their ill effects. + + @fr-FR@ http://en.wikipedia.org/wiki/Scientology#Space_opera_and_confidential_materials + + @fr-FR@ Scientology beliefs and practices: Space opera and confidential materials + + @fr-FR@ The material contained in the OT levels has been characterized as bad science fiction by critics, while others claim it bears structural similarities to gnostic thought and ancient Hindu myths of creation and cosmic struggle. J. Gordon Melton suggests that these elements of the OT levels may never have been intended as descriptions of historical events, and that, like other religious mythology, they may have their truth in the realities of the body and mind which they symbolize. He adds that on whatever level Scientologists might have received this mythology, they seem to have found it useful in their spiritual quest. + + @fr-FR@ http://en.wikipedia.org/wiki/Scientology#Space_opera_and_confidential_materials + + @fr-FR@ Scientology beliefs and practices: Space opera and confidential materials + + @fr-FR@ The high-ranking OT levels are made available to Scientologists only by invitation, after a review of the candidate's character and contribution to the aims of Scientology. Individuals who have read these materials may not disclose what they contain without jeopardizing their standing in the Church. Excerpts and descriptions of OT materials were published online by a former member in 1995 and then circulated in mainstream media. This occurred after the teachings were submitted as evidence in court cases involving Scientology, thus becoming a matter of public record. There are eight publicly-known OT levels, OT I to VIII. The highest level, OT VIII, is only disclosed at sea, on the Scientology cruise ship Freewinds. It was released in the late 1980s. It has been rumored that additional OT levels, said to be based on material written by Hubbard long ago, will be released at some appropriate point in the future. + + @fr-FR@ http://en.wikipedia.org/wiki/Scientology#Space_opera_and_confidential_materials + + @fr-FR@ Scientology beliefs and practices: Space opera and confidential materials + + @fr-FR@ There is a large Church of Spiritual Technology symbol carved into the ground at Scientology's Trementina Base that is visible from the air. Washington Post reporter Richard Leiby wrote, "Former Scientologists familiar with Hubbard’s teachings on reincarnation say the symbol marks a 'return point' so loyal staff members know where they can find the founder’s works when they travel here in the future from other places in the universe." + + @fr-FR@ http://en.wikipedia.org/wiki/Scientology#Ceremonies + + @fr-FR@ Scientology beliefs and practices: Ceremonies + + @fr-FR@ In Scientology, ceremonies for events such as weddings, child naming, and funerals are observed. Friday services are held to commemorate the completion of a person's religious services during the prior week. Ordained Scientology ministers may perform such rites. However, these services and the clergy who perform them play only a minor role in Scientologists' religious lives. + + @fr-FR@ http://en.wikipedia.org/wiki/Scientology#Influences + + @fr-FR@ Scientology beliefs and practices: Influences + + @fr-FR@ In Dianetics, Hubbard gives credit to Francis Bacon and Herbert Spencer. Hubbard recalled meeting Cmdr. Joseph Cheesman Thompson, a U.S. Navy officer who studied with Sigmund Freud, when he was 12 years old, and when Hubbard wrote to the American Psychological Association in 1949, he stated that he was conducting research based on the "early work of Freud". Scientology's view of the mind has some similarities to the Freudian one. + + @fr-FR@ http://en.wikipedia.org/wiki/Scientology#Influences + + @fr-FR@ Scientology beliefs and practices: Influences + + @fr-FR@ In the 1940s, Hubbard was in contact with Jack Parsons, a rocket scientist and member of the Ordo Templi Orientis then led by Aleister Crowley, and there have been suggestions that this connection influenced some of the ideas and symbols of Scientology. Religious scholars like Gerald Willms and J. Gordon Melton have pointed out that the teachings of Crowley's "satanism" bear little if any resemblance to Scientology doctrine. + + @fr-FR@ http://en.wikipedia.org/wiki/Scientology#Influences + + @fr-FR@ Scientology beliefs and practices: Influences + + @fr-FR@ As noted, there are elements of Eastern religions evident in Scientology, in particular the concepts of karma, as present in Hinduism and in Jainism, and dharma. In addition to the links to Hindu texts, Hubbard tried to connect Scientology with Taoism and Buddhism. Scientology has been said to share features with Gnosticism as well. + + + diff --git a/resources/data/strings_kr-KR.xml b/resources/data/strings_kr-KR.xml new file mode 100644 index 0000000..ba0b1d4 --- /dev/null +++ b/resources/data/strings_kr-KR.xml @@ -0,0 +1,1103 @@ + + + + + + + + + + Micropolis: 도시 선택 + + Micropolis에 오신 것을 환영합니다!<br/><br/>'시나리오'탭, 또는 '생성기'탭, 또는 '도서관'탭에서 라이브러리에있는 도시에서 새 무작위 로딩시 생성 시나리오를 선택하여 도시를 선택하십시오.<br/><br/>그리고 난 후, 다음이시 '버튼과 함께 연주를 시작 Micropolis 재생 기자! + + 제발 로그인하거나 계정을 저장하기 위해서는 당신의 도시를 만듭니다. + + /wiki/index.php/About?lang=kr-KR + + /wiki/index.php/Help?lang=kr-KR + + 1월 + + 2월 + + 3월 + + 4월 + + 5월 + + 6월 + + 7월 + + 8월 + + 9월 + + 10월 + + 11월 + + 12월 + + + + + 부가세 수집된: + + 현금 흐름표: + + 이전 자금: + + 현재 펀드 + + 세금 속도 + + 도로 요청: + + 화재 요청: + + 경찰 요청: + + + + + 먼저, 다음을 두 번 귀하의 새 비밀 번호를 입력하여 암호를 변경하려면 기존 비밀 번호를 입력합니다. + + 비밀 번호 변경 + + + + + Micropolis 온라인 서버에 연결합니다. + + Micropolis 온라인 서버에 연결하지 못했습니다. + + 상태: + + 재연결 + + + + + 정말 당신은 새로운 도시를 시작하고 싶은거야? + + 아니,이 도시와 함께 계속 연주. + + 네, 다른 도시를 선택하십시오. + + 울트라 슬로우 + + 슈퍼 슬로우 + + 아주 천천히 + + 느리다 + + 중간 + + 빠른 + + 매우 빠른 + + 슈퍼 패스트 + + 울트라 패스트 + + 가장 빠른 + + 이력서 + + 일시 중지 + + 시뮬레이터 + + 일시중지됨. + + 러닝! + + 속도 + + 할인시 + + 뉴 시티 + + 도움 + + 정보 + + 재해 + + 자동 예산 + + 자동 고르다 + + 자동 고토 + + 사운드 + + 에니메이션 + + 저널 + + 고지 + + + + + 날짜: + + 자금: + + + + + R + + C + + I + + + + + 도구 + + 지대 + + 빌드 + + 기타 + + + + 평가 + + 역사 + + 예산 + + 오버레이 + + 제어 + + 펀드 + + 세율 + + 경찰은 자금 + + 도로 펀드 + + 화재 펀드 + + + + + 범죄 + + 오염 + + 주택 + + 부가세 + + 교통 + + 실업 + + + + 빌리지 + + 마을 + + 도시 + + 자본금 + + 메트로 폴리스 + + 초거대 + + 쉬운 + + 단단한 + + 승인: + + 비승인: + + 인구: + + 마이 그 레이션: + + 시 값: + + 카테고리: + + 게임 수준: + + 현재 점수: + + 연간 전일 대비: + + 인기도: + + 문제: + + + + + 랜덤 맵 생성 + + 생성된지도 + + 새로운 랜덤 맵 생성. + + + + + 가정용 + + 쇼 주거 인구는 역사. + + 상업 + + 쇼 상업 인구의 역사. + + 산업 + + 역사를 보여주는 산업 인구. + + + + 펀드 역사를 보여주는 도시. + + 역사를 보여주는 범죄 발생률. + + 역사를 보여주는 환경 오염을 평가했다. + + 10 년 + + 120 년 + + + + + 공유 도시 + + 나의 도시 + + 에 로그인하여 도시를 볼 수있습니다. + + 아직 어떤 도시를 저장하지 않으 셨습니다. + + 정말 당신이 당신의 도시를 삭제하고 싶은거야? + + 아니, 그것을 삭제하지 마십시오. + + 그래, 내 도시를 삭제합니다. + + 앞으로 + + 이전 + + 에 의해 + + 작성일 + + 수정된 날짜 + + 만든날짜 + + 수정된 + + + + 당신에 기록하는 + + 제발 로그인하거나 새 계정을 만들려면, 그래서 당신이 도시를 저장할 수 있으며, Micropolis 온라인 커뮤니티에 참여하고있습니다. + + + + 당신이 성공적으로 기록하고있어, 귀하의 계정을 구성할 수있습니다. + + 제발 로그인하거나 새 계정을 만드십시오. + + 신규 및 등록된 사용자, 제발, 여러분의 사용자 이름과 암호를 입력하고 해당 버튼을 누르세요. + + 사용자 이름: + + 이전 비밀 번호: + + 비밀 번호: + + 에서 기존 계정으로 로그인 + + 새 사용자 : 제발, 여러분의 비밀 번호를 반복하고 귀하의 전체 이름과 이메일 주소를 입력하십시오. 그렇다면 '새 계정 만들기'버튼을 누릅니다. + + 비밀 번호 재입력: + + 전체 이름: + + 이메일: + + 새 계정 만들기 + + 아래에 귀하의 전체 이름과 이메일 주소를 입력하시기 바랍니다. + + 새 비밀 번호: + + 로그아웃 + + 취소 + + 로그인 + + + + + Micropolis + + 도시 시뮬레이션을 시작했다! + + @kr-KR@ Learn More + + + + + 팬지도 + + + + + 파이 메뉴 + + + + + + + + (오류) 끊김. + + 끊김. + + 연결에 실패했습니다. + + 연결을 거부했습니다. + + 연결되어있습니다. + + 메시지가 실패했습니다. + + 받는 사람 + + + + + + @kr-KR@ Score + + + + + 시나리오: + + + + + 이지도와 함께 플레이 + + 시나리오 + + 생성기 + + 도서관 + + 사용자 + + 구성시 + + 제목 + + 설명 + + 공유 내시 + + 삭제 나의시 + + + + + @kr-KR@ Cost + + + + + @kr-KR@ Gives people a place to live. Generates citizens and traffic. + + @kr-KR@ Gives people a place to shop. Generates jobs and traffic. + + @kr-KR@ Gives people a place to work. Generates jobs and traffic. + + + + @kr-KR@ Puts out fires nearby. + + 검색어 + + @kr-KR@ Describes zones. + + 경찰서 + + @kr-KR@ Reduces crime nearby. + + 철사 + + @kr-KR@ Connects zones with power. + + 불도저 + + @kr-KR@ Destroys zones and features. + + 철도 + + @kr-KR@ Draws a railroad on land or a tunnel under water. + + 도로 + + @kr-KR@ Draws a road on land or a bridge over water. + + 센터 + + @kr-KR@ Scrolls location to center of screen. + + PacBot + + @kr-KR@ Follows roads towards heavy traffic, and eats cars, reducing traffic. + + 경기장 + + @kr-KR@ Helps residential zones. + + 공원 + + @kr-KR@ Makes the city a nicer place to live. + + 항구 + + @kr-KR@ Helps industrial zones. + + 석탄 전력 + + @kr-KR@ Generates power, but pollutes. + + 공항 + + @kr-KR@ Helps commercial zones. + + 핵 전력 + + @kr-KR@ Generates power, but might melt down. + + + + + 몬스터 + + + + 홍수 + + 붕괴 + + 토네이도 + + 지진 + + + + + 오염 비상! + + 오염 귀하의 도시에서 허용되는 최대 금액은 Micropolis 오염에 의해 설립된기구 넘어섰다. 당신이 무덤을 생태 실행 결과의 위험이있습니다. 신청<br/>도 당신의 행동을 청소하거나 시청에서 가스 마스크를 양보를 엽니다. + + @kr-KR@ + + 범죄 비상! + + 귀하의 도시에서 손을 범죄입니다. 성난 군중은 중앙 도시를 약탈하고 파손. 노 대통령은 국가의 경비는 곧이 문제를 통제할 수없는 경우를 보낼 것입니다. + + @kr-KR@ + + 교통 경고! + + 교통이 도시에 끔찍하다. 이 도시는 철망을 확대하고있다. 이 통근 무장 해지고있다. 신청<br/>거나 또는 더 많은 도로와 레일 방탄 리무진을 얻을 빌드합니다. + + @kr-KR@ + + 신고! + + 화재가보고되었습니다! + + @kr-KR@ + + 몬스터 공격! + + 대형 파충류 동물은 물 속에서 발견됐다. 그것은 오염 지역에 관심이 높은 것 같다. 어디로가는가 파괴의 흔적이다. 신청<br/>당신까지 그 나뭇잎 후 재건을 기다려 잔해에서 할 수있습니다. + + @kr-KR@ + + 태풍 비상! + + 토네이도보고되었습니다! 당신이 그것을 막을 수 없어, 그러니 더 재난 뒤처리를 준비할 줄이야! + + @kr-KR@ + + 지진! + + 큰 지진이 발생했습니다! 전에 그들은, 그때까지 전력망이 다시 확산과 도시 재건, 가능 한한 빨리 불을 꺼. + + @kr-KR@ + + 비행기 충돌! + + 비행기가 추락했습니다! + + @kr-KR@ + + 난파선! + + 배는 난파했다! + + @kr-KR@ + + 열차 충돌 사고가! + + 기차가 추락했습니다! + + @kr-KR@ + + 헬리콥터 추락! + + 헬리콥터가 추락했습니다! + + @kr-KR@ + + 화재 폭발했다! + + 화재 폭탄이 떨어지고있다!! + + @kr-KR@ + + 신고 폭발! + + 거기에 폭발되었습니다!! + + @kr-KR@ + + 타운 + + 축하합니다, 귀하의 마을 마을 상태로 성장했다. 이제 2,000 시민있다. + + @kr-KR@ + + + + 귀하의 마을로 풀, 10,000의 현재의 인구 규모와 도시 성장했다. 좋은 일을 계속! + + @kr-KR@ + + 수도 + + 당신의 도시가 될 수도있다. 현재의 인구는 현재 50,000입니다. 당신들의 정치적 미래는 밝아 보인다. + + @kr-KR@ + + 메트로 폴리스 + + 귀하의 수도인 지금 메트로 폴리스의 상태를 달성했다. 현재 인구는 100,000입니다. 귀하의 관리 능력과 함께, 당신은 주지사 선거에 출마 심각하게 고려해야한다. + + @kr-KR@ + + 초거대 + + 축하, 당신은 도시 개발의 가장 높은 카테고리에 도달했습니다, 초거대. + + @kr-KR@ + + 교통 체증! + + 하늘을보고 하나는보고 무거운 트래픽! + + @kr-KR@ + + 홍수로 신고! + + 홍수 물의 가장자리를 따라보고되고있다! + + @kr-KR@ + + 원자력 붕괴! + + 핵 붕괴하여 발전소에서 발생했습니다. 당신은 방사성 동위 원소가 자연 붕괴까지 영역을 방지하는 것이 좋다. 신청<br/>많은 세대가이 문제에 직면하기 전에 사라질 것이므로, 숨들이마셔하지 않습니다. + + @kr-KR@ + + 폭동! + + 시민들은 거리에서 폭동이있다! + + @kr-KR@ + + 시작 새시 + + 지상에서, 무인 토지 너만의이지도로 시작하는 도시를 빌드합니다. + + @kr-KR@ + + 복원 저장된시 + + 도시가 복원되었습니다. + + @kr-KR@ + + 당신이 우승자입니다! + + 귀하의 시장 도시 계획 기술과 전문 지식을 여러분은 도시의 열쇠를 얻었다. 지역 주민 여러분의 영광에 대한 기념비를 세우다되며 첫 - 태어난 아이들의 이름. 왜 안 총재 출마? + + @kr-KR@ + + 탄핵주의 사항! + + 이 도시의 전체 인구는 결국 당신의 무능을 계획하고 무능한 경영의 충분했다. 성난 폭도 - 네 어머니가 이끄는 - 시청 부근에서 발견되었습니다. 신청<br/>당신은 심각하게 고려해야한다 확장된 휴가 -하세요. (또는 사용 설명서를 읽고 다시 시도하십시오.) + + @kr-KR@ + + Micropolis 소개 + + Micropolis Copyright (C) 2007 by Electronic Arts.<br/>Based on the original SimCity concept, design and code by Will Wright and Fred Haslam.<br/>User Interface Designed and created by Don Hopkins.<br/>Ported to Linux, Optimized and Adapted for OLPC by Don Hopkins.<br/>Licensed under the GNU General Public License, version 3, with additional conditions. + + @kr-KR@ + + 지루한 빌리지, 미국 1900년 + + 근처에 일이 훨씬 지난 백년 남짓 및 변경되지 않은 주민들은 지루해하기 시작했다. 그들은 위대한 도시 지루한 빌리지 오른쪽의 지도자와 함께 다음이있을 수 있다고 생각합니다. 신청<br/>새로운 성장과 발전을 유치하여 일자리를, 메트로 폴리스로 30 년 이내 지루한 빌리지 돌고있다. + + @kr-KR@ + + 캘리 포니 아주 샌프란 시스코. 1906년 + + 지진의 피해를 제어하는 일 열린 뒤이어 화재, 미성년자의 비교했다. 천오백명 사망했다. 신청<br/>초기 우려해야 화재 제어. 그럼 시작 잔해와 재건 분명합니다. 당신은 5 년. + + @kr-KR@ + + 함부르크, 독일 1944년 + + 화재 - 차 세계 대전이 연합군의 폭격 독일의 도시의 엄청난 피해와 생명의 손실 발생. 도시에 사는 사람들은 내면의 가장 큰 위험했다. 신청 <br/> 당신은 폭격 중에 다음 화재 폭풍 제어해야 전쟁 후 도시를 재건했다. 당신은 5 년. + + @kr-KR@ + + 스위스, 베른 1965년 + + 이 도로는 여기에 더 많은 혼잡 매일, 그리고 주민들이 화가되고있다. 그들은 당신이 그것에 대해 뭔가를 할 요구한다. 신청<br/>일부는 대답으로 대중 교통 시스템을 제안하고 있지만 이는 도심 지역의 주요 재설계를 요구한다. 당신은 10 년. + + @kr-KR@ + + 도쿄, 일본 1957년 + + 대형 파충류 생물 도쿄 베이를 향하고 목격됐다. 그것은 산업 공해의 무거운 수준을 거기에 끌린 것 같다. 신청<br/>화염을 가다듬어봐 후 재건 산업 센터. 당신은 5 년. + + @kr-KR@ + + 디트로이트 미시건. 1972년 + + 1970 년에는 해외 및 기타 경제적 요인에서 경쟁은 한때는 "세계의 자동차 자본"경기 침체로했다. 토지 가치와 실업 증가 급락 후 범죄의 안쪽 - 도시 만성 수준. 신청<br/>당신이 범죄를 감소시키고, 도시의 산업 기반을 재건 10 년. + + @kr-KR@ + + 보스턴, 석사. 2010년 + + 주요 붕괴에 대한 하나의 새로운 도심 핵 원자로에서 발생하는 것입니다. 원자로의 근방에있는이 지역은 매우 방사선에 의해, 당신은 그것을 주변의 도시 구조 조정을 강제로 오염된됩니다. 신청<br/>당신은 그 상황을 통제하는 5 년. + + @kr-KR@ + + 리우 데 자네이로, 브라질 2047년 + + 중반 - 21 세기에, 온실 효과 6 도까지 F. 화로 빙하가 녹아 해수면이 세계는 지구의 온도를 키우고있다. 해안 지역에 홍수와 침식에 의해 멸망했다. 신청<br/>당신이 다시 도시로 다시 늪 차례로 10 년. + + @kr-KR@ + + + + 모든 영역 + + 주거 영역 + + 상업 영역 + + 산업 영역 + + 전원 연결 + + 교통 네트워크 + + 인구 밀도 + + 성장의 속도 + + 교통 밀도 + + 오염 밀도 + + 범죄율 + + 땅 값 + + 소방서 보도 + + 경찰서 보도 + + + + + 지루한 빌리지 + + 권태 + + 샌프란 시스코 + + 지진 + + 함부르크 + + 폭파 + + 베른 + + 교통 + + 도쿄 + + 몬스터 공격 + + 디트로이트 + + 범죄 + + 보스턴 + + 핵 슬럼프 + + 리우 데 자네이로 + + 해안 홍수 + + + + + 당신이 기록됩니다 들여 Micropolis 온라인에 다시 오신 것을 환영합니다! + + 잘못된 사용자 이름이나 암호를 입력합니다. + + 당신은 이미 로그아웃되는, 그리고 여기에 로그인할 수있습니다하거나 계정을 만들 수있습니다. + + 당신은 밖으로 기록됩니다. 빨리 돌아 오너라! + + 사용자 이름을 입력하시기 바랍니다. + + 사용자 이름에 잘못된 문자가 포함되어있습니다. 제발 오직 문자, 숫자, 밑줄이나 대시를 사용합니다. + + 비밀 번호를 입력하시기 바랍니다. + + 그 이름의 사용자가 이미 존재합니다. + + 제발 다음 필드에 동일한 비밀 번호를 반복합니다. + + 해당 이메일 주소로 계정이 이미 존재합니다. + + 새 계정을, 당신을 위해 생성되었습니다 들여 Micropolis 온라인에 기록에 오신 것을 환영합니다! + + 이전 비밀 번호가 잘못되었습니다. + + 새로운 비밀 번호가 일치하지 않습니다. + + 네가 두번이나 새 비밀 번호를 입력해야합니다. + + 귀하의 비밀 번호가 변경되었습니다. + + + + + @kr-KR@ Autonomous + + @kr-KR@ Reset + + @kr-KR@ Manual + + @kr-KR@ Delete + + @kr-KR@ Xenu + + + + + @kr-KR@ Christian Church + + @kr-KR@ This is a Christian church. + + @kr-KR@ Pacmania Church + + @kr-KR@ This is a Pacmania church. + + @kr-KR@ http://en.wikipedia.org/wiki/PacMan + + @kr-KR@ The Church of Pacmania + + @kr-KR@ Pacmania is a religion dedicated to the PacBot. + + @kr-KR@ http://en.wikipedia.org/wiki/PacMan + + @kr-KR@ The Church of Pacmania + + @kr-KR@ Pacmania is polytheistic: each Pacmania church can spawn up to four PacBots. + + @kr-KR@ http://en.wikipedia.org/wiki/PacMan + + @kr-KR@ The Church of Pacmania + + @kr-KR@ The PacBot follows roads around, eating traffic. + + @kr-KR@ http://en.wikipedia.org/wiki/PacMan + + @kr-KR@ The Church of Pacmania + + @kr-KR@ The PacBot is attracted to heavy traffic, which it loves to consume. + + @kr-KR@ http://en.wikipedia.org/wiki/PacMan + + @kr-KR@ The Church of Pacmania + + @kr-KR@ Pacmania churches generate lots of traffic, to attract the PacBot. + + @kr-KR@ Church of Scientology + + @kr-KR@ This is a Church of Scientology. + + @kr-KR@ http://en.wikipedia.org/wiki/Scientology + + @kr-KR@ The Church of Scientology + + @kr-KR@ Scientology is a body of beliefs and related practices created by L. Ron Hubbard (1911–1986), starting in 1952, as a successor to his earlier self-help system, Dianetics. Hubbard characterized Scientology as a religion, and in 1953 incorporated the Church of Scientology in New Jersey. + + @kr-KR@ http://en.wikipedia.org/wiki/Scientology + + @kr-KR@ The Church of Scientology + + @kr-KR@ Scientology teaches that people are immortal spiritual beings who have forgotten their true nature. Its method of spiritual rehabilitation is a type of counseling known as auditing, in which practitioners aim to consciously re-experience painful or traumatic events in their past, in order to free themselves of their limiting effects. Study materials and auditing courses are made available to members in return for specified donations. Scientology is legally recognized as a tax-exempt religion in the United States and some other countries, and the Church of Scientology emphasizes this as proof that it is a bona fide religion. Other countries such as Germany and France continue to deny Scientology religious status. + + @kr-KR@ http://en.wikipedia.org/wiki/Scientology + + @kr-KR@ The Church of Scientology + + @kr-KR@ A large number of organizations overseeing the application of Scientology have been established, the most notable of these being the Church of Scientology. Scientology sponsors a variety of social service programs. These include a set of moral guidelines expressed in a brochure called The Way to Happiness, the Narconon anti-drug program, the Criminon prison rehabilitation program, the Study Tech education methodology, a volunteer organization, and a business management method. + + @kr-KR@ http://en.wikipedia.org/wiki/Scientology + + @kr-KR@ The Church of Scientology + + @kr-KR@ Scientology has been surrounded by controversies since its inception. It has often been described as a cult that financially defrauds and abuses its members, charging exorbitant fees for its spiritual services. The Church of Scientology has consistently used litigation against such critics, and its aggressiveness in pursuing its foes has been condemned as harassment. Further controversy has focused on Scientology's belief that souls ("thetans") reincarnate and have lived on other planets before living on Earth. Former members say that some of Hubbard's writings on this remote extraterrestrial past, included in confidential Upper Levels, are not revealed to practitioners until they have paid thousands of dollars to the Church of Scientology. Another controversial belief held by Scientologists is that the practice of psychiatry is destructive and abusive and must be abolished. + + @kr-KR@ http://en.wikipedia.org/wiki/Scientology#Beliefs_and_practices + + @kr-KR@ Scientology beliefs and practices + + @kr-KR@ Scientology has been surrounded by controversies since its inception. It has often been described as a cult that financially defrauds and abuses its members, charging exorbitant fees for its spiritual services. The Church of Scientology has consistently used litigation against such critics, and its aggressiveness in pursuing its foes has been condemned as harassment. Further controversy has focused on Scientology's belief that souls ("thetans") reincarnate and have lived on other planets before living on Earth. Former members say that some of Hubbard's writings on this remote extraterrestrial past, included in confidential Upper Levels, are not revealed to practitioners until they have paid thousands of dollars to the Church of Scientology. Another controversial belief held by Scientologists is that the practice of psychiatry is destructive and abusive and must be abolished. + + @kr-KR@ http://en.wikipedia.org/wiki/Scientology#Body_and_spirit + + @kr-KR@ Scientology beliefs and practices: Body and spirit + + @kr-KR@ Scientology has an associated mythology that its adherents hold to reflect religious truth. In Scientology, this mythology revolves around the thetan, believed to be the individualized expression of the cosmic source, or life force, named after the Greek letter theta (θ). The thetan is thought to be the true identity of a person – an intrinsically good, omniscient, non-material core capable of unlimited creativity. + + @kr-KR@ http://en.wikipedia.org/wiki/Scientology#Body_and_spirit + + @kr-KR@ Scientology beliefs and practices: Body and spirit + + @kr-KR@ In the primordial past, according to Scientologist teachings, thetans brought the material universe into being largely for their own pleasure. The universe is thought to have no independent reality, but to derive its apparent reality from the fact that most thetans agree it exists. Scientologists believe that thetans fell from grace when they began to identify with their creation, rather than their original state of spiritual purity. Eventually, they lost their memory of their true nature, along with the associated spiritual and creative powers. As a result, thetans came to think of themselves as nothing but embodied beings. + + @kr-KR@ http://en.wikipedia.org/wiki/Scientology#Body_and_spirit + + @kr-KR@ Scientology beliefs and practices: Body and spirit + + @kr-KR@ Thetans are believed to be reborn time and time again in new bodies through a process called "assumption" which is analogous to reincarnation. Like Hinduism, Scientology posits a causal relationship between the experiences of earlier incarnations and one's present life, and with each rebirth, the effects of the MEST universe (MEST here stands for matter, energy, space, and time) on the thetan are believed to become stronger. + + @kr-KR@ http://en.wikipedia.org/wiki/Scientology#Emotions_and_the_mind + + @kr-KR@ Scientology beliefs and practices: Emotions and the mind + + @kr-KR@ Scientology presents two major divisions of the mind. The reactive mind is thought to absorb all pain and emotional trauma, while the analytical mind is a rational mechanism which is responsible for consciousness. The reactive mind stores mental images which are not readily available to the analytical (conscious) mind; these are referred to as engrams. Engrams are believed to be painful and debilitating; as they accumulate, people move further away from their true identity. To avoid this fate is the Scientologist's basic goal. Dianetic training is the tool through which the Scientologist progresses towards the Clear state, winning gradual freedom from the reactive mind's engrams, and acquiring certainty of his or her reality as a thetan. + + @kr-KR@ http://en.wikipedia.org/wiki/Scientology#Emotions_and_the_mind + + @kr-KR@ Scientology beliefs and practices: Emotions and the mind + + @kr-KR@ Scientology uses an emotional classification system called the tone scale. The tone scale is a tool used in counseling; Scientologists maintain that knowing a person's place on the scale makes it easier to predict their actions and to assist them in bettering their condition. + + @kr-KR@ http://en.wikipedia.org/wiki/Scientology#Survival_and_ethics + + @kr-KR@ Scientology beliefs and practices: Survival and ethics + + @kr-KR@ Scientology emphasizes the importance of survival, which it subdivides into eight classifications that are referred to as dynamics. An individual's desire to survive is considered to be the first dynamic, while the second dynamic relates to procreation and family. The remaining dynamics encompass wider fields of action, involving groups, mankind, all life, the physical universe, the spirit, and the Supreme Being. The optimum solution to any problem is held to be the one that brings the greatest benefit to the greatest number of dynamics. + + @kr-KR@ http://en.wikipedia.org/wiki/Scientology#Survival_and_ethics + + @kr-KR@ Scientology beliefs and practices: Survival and ethics + + @kr-KR@ Scientology teaches that spiritual progress requires and enables the attainment of high ethical standards. In Scientology, rationality is stressed over morality. Actions are considered ethical if they promote survival across all eight dynamics, thus benefiting the greatest number of people possible while harming the fewest. + + @kr-KR@ http://en.wikipedia.org/wiki/Scientology#ARC_and_KRC_triangles + + @kr-KR@ Scientology beliefs and practices: ARC and KRC triangles + + @kr-KR@ The ARC and KRC triangles are concept maps which show a relationship between three concepts to form another concept. These two triangles are present in the Scientology logo. The lower triangle, the ARC triangle, is a summary representation of the knowledge the Scientologist strives for. It encompasses Affinity (affection, love or liking), Reality (consensual reality) and Communication (the exchange of ideas). Scientologists believe that improving one of the three aspects of the triangle "increases the level" of the other two, but Communication is held to be the most important. The upper triangle is the KRC triangle, the letters KRC positing a similar relationship between Knowledge, Responsibility and Control. + + @kr-KR@ http://en.wikipedia.org/wiki/Scientology#ARC_and_KRC_triangles + + @kr-KR@ Scientology beliefs and practices: ARC and KRC triangles + + @kr-KR@ In Scientology, social problems are ascribed to breakdowns in ARC – in other words, a lack of agreement on reality, a failure to communicate effectively, or a failure to develop affinity. These can take the form of overts – harmful acts against another, either intentionally or by omission – which are usually followed by withholds – efforts to conceal the wrongdoing, which further increase the level of tension in the relationship. + + @kr-KR@ http://en.wikipedia.org/wiki/Scientology#Social_and_antisocial_personalities + + @kr-KR@ Scientology beliefs and practices: Social and antisocial personalities + + @kr-KR@ While Scientology believes that many social problems are the unintentional results of people's imperfections, it states that there are also truly malevolent individuals. Hubbard believed that approximately 80 percent of all people are what he called social personalities – people who welcome and contribute to the welfare of others. The remaining 20 percent of the population, Hubbard thought, were suppressive persons. According to Hubbard, only about 2.5 percent of this 20 percent are hopelessly antisocial personalities; these make up the small proportion of truly dangerous individuals in humanity: "the Adolf Hitlers and the Genghis Khans, the unrepentant murderers and the drug lords." Scientologists believe that any contact with suppressive or antisocial individuals has an adverse effect on one's spiritual condition, necessitating disconnection. + + @kr-KR@ http://en.wikipedia.org/wiki/Scientology#Social_and_antisocial_personalities + + @kr-KR@ Scientology beliefs and practices: Social and antisocial personalities + + @kr-KR@ In Scientology, defectors who turn into critics of the movement are declared suppressive persons, and the Church of Scientology has a reputation for moving aggressively against such detractors. A Scientologist who is actively in communication with a suppressive person and as a result shows signs of antisocial behaviour is referred to as a Potential Trouble Source. + + @kr-KR@ http://en.wikipedia.org/wiki/Scientology#Auditing + + @kr-KR@ Scientology beliefs and practices: Auditing + + @kr-KR@ Scientology asserts that people have hidden abilities which have not yet been fully realized. It is believed that increased spiritual awareness and physical benefits are accomplished through counseling sessions referred to as auditing. Through auditing, it is said that people can solve their problems and free themselves of engrams. This restores them to their natural condition as thetans and enables them to be at cause in their daily lives, responding rationally and creatively to life events rather than reacting to them under the direction of stored engrams. Accordingly, those who study Scientology materials and receive auditing sessions advance from a status of Preclear to Clear and Operating Thetan. Scientology's utopian aim is to "clear the planet", a world in which everyone has cleared themselves of their engrams. + + @kr-KR@ http://en.wikipedia.org/wiki/Scientology#Auditing + + @kr-KR@ Scientology beliefs and practices: Auditing + + @kr-KR@ Auditing is a one-on-one session with a Scientology counselor or auditor. It bears a superficial similarity to confession or pastoral counseling, but the auditor does not dispense forgiveness or advice the way a pastor or priest might do. Instead, the auditor's task is to help the person discover and understand engrams, and their limiting effects, for themselves. Most auditing requires an E-meter, a device that measures minute changes in electrical resistance through the body when a person holds electrodes (metal "cans"), and a small current is passed through them. Scientology asserts that watching for changes in the E-meter's display helps locate engrams. Once an area of concern has been identified, the auditor asks the individual specific questions about it, in order to help them eliminate the engram, and uses the E-meter to confirm that the engram's "charge" has been dissipated and the engram has in fact been cleared. As the individual progresses, the focus of auditing moves from simple engrams to engrams of increasing complexity. At the more advanced OT auditing levels, Scientologists perform solo auditing sessions, acting as their own auditors. + + @kr-KR@ http://en.wikipedia.org/wiki/Scientology#The_Bridge_to_Total_Freedom + + @kr-KR@ Scientology beliefs and practices: The Bridge to Total Freedom + + @kr-KR@ Spiritual development within Scientology is accomplished by studying Scientology materials. Scientology materials (called Technology or Tech in Scientology jargon) are structured in sequential levels (or gradients), so that easier steps are taken first and greater complexities are handled at the appropriate time. This process is sometimes referred to as moving along the Bridge to Total Freedom, or simply the Bridge. It has two sides: training and processing. Training means education in the principles and practices of auditing. Processing is personal development through participation in auditing sessions. + + @kr-KR@ http://en.wikipedia.org/wiki/Scientology#The_Bridge_to_Total_Freedom + + @kr-KR@ Scientology beliefs and practices: The Bridge to Total Freedom + + @kr-KR@ The Church of Scientology believes in the principle of reciprocity, involving give-and-take in every human transaction. Accordingly, members are required to make donations for study courses and auditing as they move up the Bridge, the amounts increasing as higher levels are reached. Participation in higher-level courses on the Bridge may cost several thousand dollars, and Scientologists usually move up the Bridge at a rate governed by their income. + + @kr-KR@ http://en.wikipedia.org/wiki/Scientology#Space_opera_and_confidential_materials + + @kr-KR@ Scientology beliefs and practices: Space opera and confidential materials + + @kr-KR@ The Church of Scientology holds that at the higher levels of initiation (OT levels) mystical teachings are imparted that may be harmful to unprepared readers. These teachings are kept secret from members who have not reached these levels. The Church states that the secrecy is warranted to keep its materials' use in context, and to protect its members from being exposed to materials they are not yet prepared for. + + @kr-KR@ http://en.wikipedia.org/wiki/Scientology#Space_opera_and_confidential_materials + + @kr-KR@ Scientology beliefs and practices: Space opera and confidential materials + + @kr-KR@ These are the OT levels, the levels above Clear, whose contents are guarded within Scientology. The OT level teachings include accounts of various cosmic catastrophes that befell the thetans. Hubbard described these early events collectively as space opera. + + @kr-KR@ http://en.wikipedia.org/wiki/Scientology#Space_opera_and_confidential_materials + + @kr-KR@ Scientology beliefs and practices: Space opera and confidential materials + + @kr-KR@ In the OT levels, Hubbard explains how to reverse the effects of past-life trauma patterns that supposedly extend millions of years into the past. Among these advanced teachings is the story of Xenu (sometimes Xemu), introduced as an alien ruler of the "Galactic Confederacy." According to this story, 75 million years ago Xenu brought billions of people to Earth in spacecraft resembling Douglas DC-8 airliners, stacked them around volcanoes and detonated hydrogen bombs in the volcanoes. The thetans then clustered together, stuck to the bodies of the living, and continue to do this today. Scientologists at advanced levels place considerable emphasis on isolating body thetans and neutralizing their ill effects. + + @kr-KR@ http://en.wikipedia.org/wiki/Scientology#Space_opera_and_confidential_materials + + @kr-KR@ Scientology beliefs and practices: Space opera and confidential materials + + @kr-KR@ The material contained in the OT levels has been characterized as bad science fiction by critics, while others claim it bears structural similarities to gnostic thought and ancient Hindu myths of creation and cosmic struggle. J. Gordon Melton suggests that these elements of the OT levels may never have been intended as descriptions of historical events, and that, like other religious mythology, they may have their truth in the realities of the body and mind which they symbolize. He adds that on whatever level Scientologists might have received this mythology, they seem to have found it useful in their spiritual quest. + + @kr-KR@ http://en.wikipedia.org/wiki/Scientology#Space_opera_and_confidential_materials + + @kr-KR@ Scientology beliefs and practices: Space opera and confidential materials + + @kr-KR@ The high-ranking OT levels are made available to Scientologists only by invitation, after a review of the candidate's character and contribution to the aims of Scientology. Individuals who have read these materials may not disclose what they contain without jeopardizing their standing in the Church. Excerpts and descriptions of OT materials were published online by a former member in 1995 and then circulated in mainstream media. This occurred after the teachings were submitted as evidence in court cases involving Scientology, thus becoming a matter of public record. There are eight publicly-known OT levels, OT I to VIII. The highest level, OT VIII, is only disclosed at sea, on the Scientology cruise ship Freewinds. It was released in the late 1980s. It has been rumored that additional OT levels, said to be based on material written by Hubbard long ago, will be released at some appropriate point in the future. + + @kr-KR@ http://en.wikipedia.org/wiki/Scientology#Space_opera_and_confidential_materials + + @kr-KR@ Scientology beliefs and practices: Space opera and confidential materials + + @kr-KR@ There is a large Church of Spiritual Technology symbol carved into the ground at Scientology's Trementina Base that is visible from the air. Washington Post reporter Richard Leiby wrote, "Former Scientologists familiar with Hubbard’s teachings on reincarnation say the symbol marks a 'return point' so loyal staff members know where they can find the founder’s works when they travel here in the future from other places in the universe." + + @kr-KR@ http://en.wikipedia.org/wiki/Scientology#Ceremonies + + @kr-KR@ Scientology beliefs and practices: Ceremonies + + @kr-KR@ In Scientology, ceremonies for events such as weddings, child naming, and funerals are observed. Friday services are held to commemorate the completion of a person's religious services during the prior week. Ordained Scientology ministers may perform such rites. However, these services and the clergy who perform them play only a minor role in Scientologists' religious lives. + + @kr-KR@ http://en.wikipedia.org/wiki/Scientology#Influences + + @kr-KR@ Scientology beliefs and practices: Influences + + @kr-KR@ In Dianetics, Hubbard gives credit to Francis Bacon and Herbert Spencer. Hubbard recalled meeting Cmdr. Joseph Cheesman Thompson, a U.S. Navy officer who studied with Sigmund Freud, when he was 12 years old, and when Hubbard wrote to the American Psychological Association in 1949, he stated that he was conducting research based on the "early work of Freud". Scientology's view of the mind has some similarities to the Freudian one. + + @kr-KR@ http://en.wikipedia.org/wiki/Scientology#Influences + + @kr-KR@ Scientology beliefs and practices: Influences + + @kr-KR@ In the 1940s, Hubbard was in contact with Jack Parsons, a rocket scientist and member of the Ordo Templi Orientis then led by Aleister Crowley, and there have been suggestions that this connection influenced some of the ideas and symbols of Scientology. Religious scholars like Gerald Willms and J. Gordon Melton have pointed out that the teachings of Crowley's "satanism" bear little if any resemblance to Scientology doctrine. + + @kr-KR@ http://en.wikipedia.org/wiki/Scientology#Influences + + @kr-KR@ Scientology beliefs and practices: Influences + + @kr-KR@ As noted, there are elements of Eastern religions evident in Scientology, in particular the concepts of karma, as present in Hinduism and in Jainism, and dharma. In addition to the links to Hindu texts, Hubbard tried to connect Scientology with Taoism and Buddhism. Scientology has been said to share features with Gnosticism as well. + + + diff --git a/resources/data/strings_nl-NL.xml b/resources/data/strings_nl-NL.xml new file mode 100644 index 0000000..ffbfa21 --- /dev/null +++ b/resources/data/strings_nl-NL.xml @@ -0,0 +1,1103 @@ + + + + + + + + + + Micropolis: kies een stad + + Welkom bij Micropolis!<br/><br/>Kies een stad door een scenario uit de tab Scenario's te selecteren, door een nieuwe, willekeurige stad met de tab Generator te selecteren, of door een stad in de bibliotheek uit de tab Bibliotheek te laden.<br/><br/>Druk vervolgens op de knop Speel met deze stad om Micropolis te starten. + + Log in of maak een account om de stad op te slaan. + + /wiki/index.php/About?lang=nl-NL + + /wiki/index.php/Help?lang=nl-NL + + jan. + + feb. + + maart + + apr. + + mei + + juni + + juli + + aug. + + sept. + + oct. + + nov. + + dec. + + + + + Geïnde belastingen: + + Kasstroom: + + Vorige fondsen: + + Huidige fondsen: + + Belastingtarief: + + Wegaanvraag: + + Brandweeraanvraag: + + Politie-aanvraag: + + + + + Om uw wachtwoord te wijzigen, voert u eerst uw oude wachtwoord in en vervolgens uw nieuwe wachtwoord twee keer in. + + Wachtwoord wijzigen + + + + + Verbinden met Micropolis Online-server. + + Verbinding met Micropolis Online-server mislukt. + + Status: + + Opnieuw verbinding maken + + + + + Weet u zeker dat u een nieuwe stad wilt maken? + + Nee, doorgaan met deze stad. + + Ja, een andere stad kiezen. + + Ultralangzaam + + Bijzonder langzaam + + Zeer Langzaam + + Langzaam + + Gemiddeld + + Snel + + Zeer snel + + Bijzonder snel + + Ultrasnel + + Astronomisch snel + + Hervatten + + Pauze + + Simulator + + Onderbroken. + + Actief + + Snelheid + + Stad opslaan + + Nieuwe stad + + Help + + Over + + Rampen + + Auto Begroting + + Auto Bulldozer + + Auto Goto + + Geluid + + Animatie + + Logboek + + Mededelingen + + + + + Datum: + + Middelen: + + + + + R + + C + + I + + + + + Gereedschap + + Zone + + Bouwen + + Meer + + Tab + + Evaluatie + + Geschiedenis + + Begroting + + Bedekkingen + + Controle + + Fondsen + + Belastingtarief + + Fondsen Politiebureau + + Fondsen Wegen + + Fondsen Brandweer + + + + + Criminaliteit + + Verontreiniging + + Wonen + + Belastingen + + Verkeer + + Werkloosheid + + Brand + + Dorp + + Stadje + + Stad + + Hoofdstad + + Metropolis + + Megalopolis + + Gemakkelijk + + Moeilijk + + Goedkeuring: + + Afkeuring: + + Bevolking: + + Migratie: + + Waarde stad: + + Categorie: + + Spelniveau: + + Huidige score: + + Jaarlijkse verandering: + + Populariteit: + + Problemen: + + + + + Willekeurige kaart genereren + + Gegenereerde kaart + + Nieuwe, willekeurige kaart gegenereerd. + + + + + Residentieel + + Toon de geschiedenis van de woonwijkbevolking. + + Commercieel + + Toon de geschiedenis van het zakendistrict. + + Industrieel + + Toon de geschiedenis van het industriegebied. + + Geld + + Toon de geschiedenis van de stadsfondsen. + + Toon de criminaliteitscijfers. + + Toon de vervuilingsgraadcijfers + + 10 jaar + + 120 jaar + + + + + Gedeelde steden + + Mijn steden + + Log in om uw steden te bekijken. + + Alle steden zijn nog niet opgeslagen. + + Weet u zeker dat u de stad wilt verwijderen? + + Nee, niet verwijderen. + + Ja, stad verwijderen. + + Vooruit + + Terug + + door + + Datum gemaakt + + Datum aangepast + + Gemaakt + + Aangepast + + + + U bent ingelogd als + + Log in of maak een nieuwe account, zodat u steden kunt opslaan en aan de Micropolis Online-gemeenschap kunt deelnemen. + + + + U bent aangemeld en kunt uw account nu configureren. + + Log in of maak een nieuwe account. + + Nieuwe en geregistreerde gebruikers, geef uw gebruikersnaam en wachtwoord op, en druk op de juiste knop. + + Gebruikersnaam: + + Oud wachtwoord: + + Wachtwoord: + + Inloggen op bestaande account + + Nieuwe gebruikers: Herhaal uw wachtwoord, en geef uw volledige naam en e-mailadres op. Druk vervolgens op de knop Nieuwe account aanmaken. + + Herhaal wachtwoord: + + Volledige naam: + + E-mail: + + Nieuwe account aanmaken + + Vul uw volledige naam en e-mailadres hieronder in. + + Nieuw wachtwoord: + + Uitloggen + + Annuleren + + Inloggen + + + + + Micropolis + + De stadsimulatie is gestart! + + @nl-NL@ Learn More + + + + + Panoramakaart + + + + + Taartmenu + + + + + + + + Losgekoppeld (fout). + + Losgekoppeld. + + Verbinding mislukt. + + Verbinding afgewezen. + + Aangesloten. + + Bericht mislukt. + + Naar + + + + + + Score + + + + + Scenario + + + + + Speel met deze stad + + Scenario's + + Generator + + Bibliotheek + + Gebruiker + + Configureer uw stad + + Titel + + Beschrijving + + Mijn stad delen + + Mijn stad verwijderen + + + + + @nl-NL@ Cost + + + + + Geeft mensen een plek om te wonen. Genereert de burgers en het verkeer. + + Geeft mensen een plaats om te winkelen. Genereert werkgelegenheid en verkeer. + + Geeft mensen een plek om te werken. Genereert werkgelegenheid en verkeer. + + Brandweerkazerne + + Komt branden buurt. + + Vraag + + Beschreven gebieden. + + Politiebureau + + Vermindert criminaliteit buurt. + + Kabel + + Verbindt gebieden met elektriciteit. + + Bulldozer + + Vernietigt zones en functies. + + Spoorweg + + Vestigt een spoorlijn op het land of een tunnel onder water. + + Weg + + Vestigt een weg op het land of van een brug over het water. + + Centreren + + Bladert locatie te midden van het scherm. + + PacBot + + Volgt de weg richting zwaar verkeer, en eet auto's, het terugdringen van het verkeer. + + Stadion + + Helpt residentiële zones. + + Park + + Maakt de stad een mooiere plek om te wonen. + + Zeehaven + + Helpt industriële zones. + + Steenkoolcentrales + + Genereert elektriciteit, maar vervuilt. + + Luchthaven + + Helpt commerciële zones. + + Kernenergie + + Elektriciteit opwekt, maar kunnen versmelten. + + + + + Monster + + Brand + + Overstroming + + Meltdown + + Wervelstorm + + Aardbeving + + + + + VERONTREINIGINGSALARM! + + Verontreiniging in uw stad heeft de maximaal toegestane hoeveelheden die zijn vastgesteld door het Micropolis Verontreinigingsagentschap overschreden. Dit kan ernstige ecologische gevolgen hebben.<br/>Stel orde op zaken of begin met de verkoop van gasmaskers op het stadhuis. + + @nl-NL@ + + CRIMINALITEITSALARM! + + Misdaad in uw stad is uit de hand gelopen. Woedende menigten plunderen en richten vernielingen aan in de binnenstad. De minister-president stuurt de ME als u het probleem niet onder controle krijgt. + + @nl-NL@ + + VERKEERSWAARSCHUWING! + + Verkeer in deze stad is verschrikkelijk. De stad dreigt vast te lopen en de forenzen worden militant.<br/>Bouw meer wegen of spoorwegen of schaf een kogelvrije limo aan. + + @nl-NL@ + + BRAND GEMELD! + + Er is een brand gemeld! + + @nl-NL@ + + MONSTERAANVAL! + + Een groot reptielachtig moster is in de wateren gespot. Het lijkt te worden aangetrokken tot gebieden met hoge verontreiniging en laat overal een spoor van vernieling achter.<br/>U kunt alleen zijn vertrek afwachten en de stad opnieuw vanaf het puin opbouwen. + + @nl-NL@ + + WERVELSTORMALARM! + + Wervelstorm gemeld! Er is helaas niets aan te doen, dus bereidt u zich maar vast voor op de rampsanering! + + @nl-NL@ + + AARDBEVING! + + De stad is getroffen door een heftige aarbeving. Blus de brandhaarden zo snel mogelijk voordat ze zich verspreiden. Sluit vervolgens het electriciteitsnetwerk weer aan om de stad weer op te bouwen. + + @nl-NL@ + + VLIEGTUIGCRASH! + + Er is een vliegtuig neergestort! + + @nl-NL@ + + SCHIPBREUK! + + Een schip heeft schipbreuk geleden! + + @nl-NL@ + + TREINONGELUK! + + Er is een trein verongelukt! + + @nl-NL@ + + HELIKOPTERONGELUK! + + Er is een helikopter neergestort! + + @nl-NL@ + + BRANDBOMMEN GEMELD! + + Brandbommen vallen! + + @nl-NL@ + + EXPLOSIE GEMELD! + + Er heeft zich een explosie voorgedaan! + + @nl-NL@ + + STADJE + + Gefeliciteerd, uw dorp is uitgegroeid tot een stad. De stad kent nu 2.000 inwoners. + + @nl-NL@ + + STAD + + Uw stad is uitgegroeid tot een grote stad met een inwonertal van 10.000. Ga zo door!. + + @nl-NL@ + + HOOFDSTAD + + Uw stad is de hoofdstad geworden. Het huidige aantal inwoners is 50.000. Uw politieke toekomst ziet er rooskleurig uit. + + @nl-NL@ + + METROPOLIS + + Uw hoofdstad is nu een metropool met 100.000 inwoners. Met uw leidinggevende vaardigheden moet u een gooi naar het gouverneurschap serieus overwegen. + + @nl-NL@ + + MEGALOPOLIS + + Gefeliciteerd, u hebt de hoogste categorie in stedelijke ontwikkeling bereikt, de megalopolis. + + @nl-NL@ + + ZWAAR VERKEER! + + Sky Watch One meldt verkeersopstoppingen! + + @nl-NL@ + + Overstromingen gemeld! + + Langs de waterkant zijn overstromingen gemeld! + + @nl-NL@ + + MELTDOWN! + + Op uw centrale heeft zich een meltdown voorgedaan. U wordt geadviseerd het gebied te vermeiden totdat de radioactieve isotopen vervallen zijn.<br/>Veel generaties zullen met dit probleem te maken krijgen voordat het is opgelost, dus zet je maar schrap. + + @nl-NL@ + + RELLEN! + + De inwoners schoppen rellen in de stad! + + @nl-NL@ + + Start een nieuwe Stad + + Bouw een eigen stad vanaf het begin op, beginnend met deze kaart van onbewoonde grond. + + @nl-NL@ + + Herstellen van een opgeslagen stad + + De stad is hersteld. + + @nl-NL@ + + Je bent een winnaar! + + U hebt de SLEUTEL VAN DE STAD aan uw vaardigheden als burgemeester en stadsplanner te danken! Burgers zullen als eerbetoon een monument bouwen en hun eerstgeborenen vernoemen naar u. Waarom stelt u zich niet kandidaat voor het gouverneurschap? + + @nl-NL@ + + Impeachmentmededeling! + + De gehele bevolking van deze stad heeft eindelijk genoeg van je onbekwame planning en incompetente management. Een boze menigte - geleid door je moeder - is gespot in de buurt van het stadhuis.<br/>U moet serieus overwegen om NU langere tijd op vakantie te gaan. (Of lees de handleiding en probeer het opnieuw.) + + @nl-NL@ + + Over Micropolis + + Micropolis Copyright (C) 2007 door Electronic Arts.<br/>Gebaseerd op het originele SimCity concept, ontwerp en code door Will Wright en Fred Haslam.<br/>Gebruikersinterface ontworpen en gemaakt door Don Hopkins.<br/>Geport naar Linux, geoptimaliseerd en aangepast voor OLPC door Don Hopkins.<br/>Licentie onder de GNU General Public License, versie 3, met aanvullende voorwaarden. + + @nl-NL@ + + DULLSVILLE, USA 1900 + + Dingen zijn hier de afgelopen eeuw niet veel veranderd en de bewoners beginnen zich te vervelen. Ze denken dat Dullsville zou kunnen uitgroeien tot de volgende grote stad met de juiste leider.<br/>Het is uw taak om nieuwe groei en ontwikkeling mogelijk te maken, waardoor Dullsville binnen dertig jaar in een metropool kan veranderen. + + @nl-NL@ + + SAN FRANCISCO, CA. 1906 + + De schade door de aardbeving viel mee vergeleken met die van de daaropvolgende branden, waarvoor dagen nodig waren om die onder controle te krijgen. 1500 mensen zijn overleden.<br/>Beheersing van de brand moet uw eerste zorg zijn. Ruim vervolgens het puin en begin met de wederopbouw. U heeft 5 jaar. + + @nl-NL@ + + HAMBURG, DUITSLAND 1944 + + De bombardementen van de geallieerden van de Duitste steden in de Tweede Wereldoorlog hebben veel burgerslachtoffers geeist en veel schade veroorzaakt. Mensen in de binnensteden liepen het meeste risico.<br/>U moet de brandhaarden die tijdens de bombardementen onstaan controleren en de stad na de oorlog opnieuw opbouwen. U heeft 5 jaar. + + @nl-NL@ + + BERN, ZWITZERLAND 1965 + + De wegen lopen hier elke dag steeds meer vol en de bewoners zijn boos. Zij eisen dat u daar iets aan doet.<br/>Sommigen hebben gesuggereerd dat een massatransportsysteem het antwoord is, maar dit zou een ingrijpende herstructurering van de binnenstad met zich meebrengen. U hebt 10 jaar. + + @nl-NL@ + + TOKIO, JAPAN 1957 + + Een groot reptielachtig monster is gespot en onderweg naar Tokio Bay. Het lijkt daartoe te worden aangetrokken door het hoge niveau industriële vervuiling.<br/>Probeer de branden onder controle te krijgen en herstel vervolgens het industriegebied. U heeft 5 jaar. + + @nl-NL@ + + DETROIT, MI. 1972 + + Concurrentie uit het buitenland en andere economische facturen hebben in 1970 de voormalige "auto-hoofdstad van de wereld" in een recessie doen belanden. Grondprijzen zakken dramatisch en door werkloosheid in de binnenstad neemt criminaliteit hand over hand toe.<br/>Je hebt 10 jaar om de criminaliteit terug te dringen en de industrie van de stad te herstructureren en opnieuw op te bouwen. + + @nl-NL@ + + BOSTON, MA. 2010 + + Er zal zich een meltdown voordoen in een van de kerncentrales in de binnenstad. Het gebied rondom de reactor zal ernstig aangetast worden door straling, waardoor de herstructurering van de stad daaromheen moet plaatsvinden.<br/>Je hebt 5 jaar om de situatie onder controle te krijgen. + + @nl-NL@ + + RIO DE JANEIRO, BRAZILIË 2047 + + In het midden van de 21e eeuw is wereldwijd de temperatuur met 6 graden gestegen door het broeikaseffect. Polaire ijskappen gesmolten en gestegen zeespiegel wereldwijd. Kustgebieden werden verwoest door overstromingen en erosie.<br/>U hebt 10 jaar om dit moeras weer in een stad te veranderen. + + @nl-NL@ + + + + Alle zones + + Residentiële zones + + Commerciële Zones + + Industriegebieden + + Stroomaansluiting + + Transportnetwerk + + Bevolkingsdichtheid + + Groeipercentage + + Verkeersdichtheid + + Verontreinigingsdichtheid + + Criminaliteit + + Terreinwaarde + + Dekking brandweerkazerne + + Dekking politiebureau + + + + + Dullsville + + Verveling + + San Francisco + + Aardbeving + + Hamburg + + Bombardementen + + Bern + + Verkeer + + Tokio + + Monsteraanval + + Detroit + + Criminaliteit + + Boston + + Meltdown + + Rio de Janeiro + + Kustoverstroming + + + + + U bent ingelogd. Welkom terug bij Micropolis Online! + + Onjuiste gebruikersnaam of wachtwoord. + + U heeft zich al afgemeld, en u kunt inloggen of een account aanmaken. + + U bent afgemeld. Kom snel terug! + + Geef een gebruikersnaam. + + De gebruikersnaam bevat ongeldige tekens. Gebruik alleen letters, cijfers, onderstrepingstekens of streepjes. + + Geef een wachtwoord. + + Er bestaat al een gebruiker met die naam. + + Herhaal hetzelfde wachtwoord in het volgende veld. + + Er bestaat al een account met dat e-mailadres. + + Een nieuwe account is gemaakt en u bent ingelogd. Welkom op Micropolis Online! + + Onjuist oud wachtwoord. + + De nieuwe wachtwoorden komen niet overeen. + + U moet uw nieuwe wachtwoord twee keer invoeren. + + Uw wachtwoord is gewijzigd. + + + + + Autonome + + Reset + + Handleiding + + Wissen + + Xenu + + + + + Christelijke Kerk + + Dit is een christelijke kerk. + + PacMania Kerk + + Dit is een PacMania kerk. + + http://en.wikipedia.org/wiki/PacMan + + De Kerk van PacMania + + PacMania is een religie gewijd aan de PacBot. + + http://en.wikipedia.org/wiki/PacMan + + De Kerk van PacMania + + PacMania is polytheïstisch: elke PacMania kerk kan paaien tot vier PacBots. + + http://en.wikipedia.org/wiki/PacMan + + De Kerk van PacMania + + De PacBot volgt wegen rond, eten verkeer. + + http://en.wikipedia.org/wiki/PacMan + + De Kerk van PacMania + + De PacBot is aangetrokken voor het zwaar verkeer, die houdt van consumeren. + + http://en.wikipedia.org/wiki/PacMan + + De Kerk van PacMania + + PacMania kerken genereren veel verkeer, aan de PacBot te trekken. + + Scientology Kerk + + Dit is een van de Scientology Kerk. + + http://en.wikipedia.org/wiki/Scientology + + De Scientology Kerk + + Scientology is een orgaan van overtuigingen en aanverwante praktijken gemaakt door L. Ron Hubbard (1911-1986), te beginnen in 1952, als opvolger van zijn eerdere self-help-systeem, Dianetics. Hubbard gekenmerkt Scientology als een religie, en in 1953 opgenomen de Scientology Kerk in New Jersey. + + http://en.wikipedia.org/wiki/Scientology + + De Scientology Kerk + + Scientology leert dat mensen onsterfelijke spirituele wezens die vergeten zijn hun ware aard. Haar methode van geestelijke revalidatie is een soort van therapie bekend als auditing, waarin beoefenaars doel bewust herbeleven pijnlijke of traumatische gebeurtenissen in hun verleden, om zich te bevrijden van hun beperkende effecten. Studiemateriaal en auditing cursussen zijn ter beschikking gesteld aan de leden in ruil voor bepaalde giften. Scientology is wettelijk erkend als een van belasting vrijgestelde religie in de Verenigde Staten en sommige andere landen, en de Kerk van Scientology benadrukt dit als bewijs dat het een bonafide religie. Andere landen, zoals Duitsland en Frankrijk blijven Scientology religieuze status te ontzeggen. + + http://en.wikipedia.org/wiki/Scientology + + De Scientology Kerk + + Een groot aantal organisaties het toezicht op de toepassing van Scientology zijn vastgesteld, de meest opvallende van deze wordt de Kerk van Scientology. Scientology sponsors een verscheidenheid van sociale dienst-programma's. Deze omvatten een set van morele richtlijnen, uitgedrukt in een brochure genaamd de weg naar geluk, het Narconon anti-drug-programma, het Criminon gevangenis revalidatieprogramma, de Studie Tech onderwijs methodologie, een vrijwilligersorganisatie, en een business management methode. + + http://en.wikipedia.org/wiki/Scientology + + De Scientology Kerk + + Scientology is omgeven door controverses sinds haar oprichting. Het is al vaak beschreven als een sekte die financieel fraudeert en misbruiken haar leden, het opladen exorbitante vergoedingen voor haar spirituele diensten. De Scientology Kerk heeft consequent gebruikt rechtszaken tegen dergelijke critici, en de agressiviteit in het nastreven van haar vijanden is veroordeeld als intimidatie. Verdere controverse heeft zich gericht op het geloof van Scientology, dat de zielen ("thetans") reïncarneren en geleefd hebben op andere planeten voordat op aarde leven. Oud-leden zeggen dat sommige van Hubbard's geschriften op deze afstandsbediening buitenaardse verleden, opgenomen in vertrouwelijke Upper Levels, worden niet geopenbaard aan beoefenaars totdat ze betaald hebben duizenden dollars aan de Kerk van Scientology. Een andere controversiële geloof gehouden door Scientologen is dat de praktijk van de psychiatrie is destructief en misbruik en moet worden afgeschaft. + + http://en.wikipedia.org/wiki/Scientology#Beliefs_and_practices + + Scientology overtuigingen en praktijken + + Scientology is omgeven door controverses sinds haar oprichting. Het is al vaak beschreven als een sekte die financieel fraudeert en misbruiken haar leden, het opladen exorbitante vergoedingen voor haar spirituele diensten. De Scientology Kerk heeft consequent gebruikt rechtszaken tegen dergelijke critici, en de agressiviteit in het nastreven van haar vijanden is veroordeeld als intimidatie. Verdere controverse heeft zich gericht op het geloof van Scientology, dat de zielen ("thetans") reïncarneren en geleefd hebben op andere planeten voordat op aarde leven. Oud-leden zeggen dat sommige van Hubbard's geschriften op deze afstandsbediening buitenaardse verleden, opgenomen in vertrouwelijke Upper Levels, worden niet geopenbaard aan beoefenaars totdat ze betaald hebben duizenden dollars aan de Kerk van Scientology. Een andere controversiële geloof gehouden door Scientologen is dat de praktijk van de psychiatrie is destructief en misbruik en moet worden afgeschaft. + + http://en.wikipedia.org/wiki/Scientology#Body_and_spirit + + Scientology overtuigingen en praktijken: Lichaam en geest + + Scientology heeft een bijbehorende mythologie die haar aanhangers vasthouden aan religieuze waarheid weer te geven. In Scientology, deze mythologie draait rond de thetan, vermoedelijk de geïndividualiseerde uitdrukking van de kosmische bron, of levenskracht, vernoemd naar de Griekse letter theta (θ) worden. De thetan is gedacht om de ware identiteit van een persoon - een intrinsiek goed, alwetend, niet-materiële kern staat onbeperkte creativiteit. + + http://en.wikipedia.org/wiki/Scientology#Body_and_spirit + + Scientology overtuigingen en praktijken: Lichaam en geest + + In de oorspronkelijke verleden, volgens de Scientology leer, thetans bracht de stoffelijke heelal in wordt grotendeels voor hun eigen plezier. Het universum is gedacht dat er geen onafhankelijke werkelijkheid, maar om haar schijnbare realiteit uit het feit dat de meeste thetans eens dat het bestaat ontlenen. Scientologen geloven dat thetans viel uit de gratie toen ze begon te identificeren met hun creatie, in plaats van hun oorspronkelijke toestand van geestelijke zuiverheid. Uiteindelijk verloren ze hun herinnering aan hun ware natuur, samen met de bijbehorende geestelijke en creatieve vermogens. Als gevolg daarvan, thetans kwam tot zichzelf te zien als niets anders dan belichaamde wezens. + + http://en.wikipedia.org/wiki/Scientology#Body_and_spirit + + Scientology overtuigingen en praktijken: Lichaam en geest + + Thetans worden verondersteld om herboren telkens weer in nieuwe organen door middel van een proces genaamd "veronderstelling" dat analoog is aan reïncarnatie te zijn. Zoals het hindoeïsme, Scientology poneert een causaal verband tussen de ervaringen van eerdere incarnaties en je huidige leven, en met elke wedergeboorte, de gevolgen van de MEST universum (MEST hier staat voor materie, energie, ruimte en tijd) op de thetan worden verondersteld om sterker geworden. + + http://en.wikipedia.org/wiki/Scientology#Emotions_and_the_mind + + Scientology overtuigingen en praktijken: emoties en de geest + + Scientology presenteert twee grote divisies van de geest. Het reactieve verstand wordt gedacht dat alle pijn en emotionele trauma's te nemen, terwijl de analytische geest is een rationele mechanisme dat verantwoordelijk is voor het bewustzijn. Het reactieve verstand slaat mentale beelden, die niet onmiddellijk beschikbaar zijn om de analytische (bewuste) geest, deze worden aangeduid als engrammen. Engrammen worden verondersteld om de pijnlijke en slopende, als ze zich ophopen, mensen gaan steeds verder weg van hun ware identiteit. Om te voorkomen dat dit lot is de scientoloog het fundamentele doel. Dianetische training is het instrument van de Scientology vordert naar de staat van Clear, het winnen van een geleidelijke vrijheid van engrammen het reactieve verstand, en het verwerven van zekerheid van zijn of haar werkelijkheid als een thetan. + + http://en.wikipedia.org/wiki/Scientology#Emotions_and_the_mind + + Scientology overtuigingen en praktijken: emoties en de geest + + Scientology maakt gebruik van een emotionele classificatiesysteem: de toonschaal. De toonschaal is een instrument dat wordt gebruikt in de hulpverlening; scientologen beweren dat wetende plaats waar een persoon op de schaal maakt het makkelijker om hun acties te voorspellen en om hen te helpen bij Vermaatschappelijking hun conditie. + + http://en.wikipedia.org/wiki/Scientology#Survival_and_ethics + + Scientology overtuigingen en praktijken: Survival en ethiek + + Scientology benadrukt het belang van overleving, die onderverdeelt in acht classificaties die worden aangeduid als dynamiek. Een individu drang om te overleven wordt beschouwd als de eerste dynamische, terwijl de tweede dynamische betrekking op voortplanting en gezin. De resterende dynamiek omvatten breder terrein van de actie, waarbij groepen, de mensheid, alle leven, het fysieke universum, de geest, en het Opperwezen. De optimale oplossing voor elk probleem is gehouden om degene die het grootste voordeel brengt aan het grootste aantal van de dynamiek worden. + + http://en.wikipedia.org/wiki/Scientology#Survival_and_ethics + + Scientology overtuigingen en praktijken: Survival en ethiek + + Scientology leert dat geestelijke vooruitgang vereist en maakt het bereiken van hoge ethische normen. In Scientology, is de rationaliteit gewezen over moraal. Er worden acties overwogen ethische als ze overleven te bevorderen in alle acht dynamieken, die aldus het grootste aantal mensen mogelijk is, terwijl nadelige gevolgen voor het minste. + + http://en.wikipedia.org/wiki/Scientology#ARC_and_KRC_triangles + + Scientology overtuigingen en praktijken: ARC en KRC driehoeken + + De ARC en KRC driehoeken zijn concept maps die een relatie tussen de drie concepten laten zien aan een ander concept vorm. Deze twee driehoeken zijn aanwezig in de Scientology-logo. De onderste driehoek, de ARC-driehoek, is een samenvatting representatie van de kennis die de Scientology streeft naar. Het omvat Affinity (genegenheid, liefde of sympathie), Reality (consensuele realiteit) en communicatie (de uitwisseling van ideeën). Scientologen geloven dat het verbeteren van een van de drie aspecten van de driehoek van de twee andere "stijgt het niveau", maar de communicatie wordt beschouwd als de belangrijkste. De bovenste driehoek is de KRC driehoek, de letters KRC poneren een soortgelijke relatie tussen kennis, verantwoordelijkheid en controle. + + http://en.wikipedia.org/wiki/Scientology#ARC_and_KRC_triangles + + Scientology overtuigingen en praktijken: ARC en KRC driehoeken + + In Scientology, sociale problemen worden toegeschreven aan storingen in ARC - met andere woorden, een gebrek aan overeenstemming over de werkelijkheid, een storing effectief te communiceren, of een gebrek aan affiniteit te ontwikkelen. Deze kunnen de vorm aannemen van overts - schadelijke handelingen tegen een ander, opzettelijk of door nalatigheid - die meestal worden gevolgd door onthoudt - inspanningen om de misstanden, die verdere toename van het niveau van spanning in de relatie te verbergen. + + http://en.wikipedia.org/wiki/Scientology#Social_and_antisocial_personalities + + Scientology overtuigingen en praktijken: Sociale en antisociale persoonlijkheid + + Hoewel Scientology gelooft dat veel maatschappelijke problemen zijn de onbedoelde resultaten van mensen onvolkomenheden, verklaart zij dat er ook echt boosaardige individuen. Hubbard geloofde dat ongeveer 80 procent van alle mensen zijn wat hij sociale persoonlijkheden genoemd - mensen die welkom en dragen bij tot het welzijn van anderen. De resterende 20 procent van de bevolking, Hubbard dacht, waren onderdrukkende personen. Volgens Hubbard, slechts ongeveer 2,5 procent van deze 20 procent zijn hopeloos antisociale persoonlijkheden; deze make-up het geringe aandeel van echt gevaarlijke individuen in de mensheid: "de Adolf Hitlers en de Genghis Khan, de verstokte moordenaars en de drugsbaronnen." Scientologen geloven dat elk contact met onderdrukkende of asociale individuen een nadelig effect heeft op iemands geestelijke conditie, noodzakelijk loskoppeling. + + http://en.wikipedia.org/wiki/Scientology#Social_and_antisocial_personalities + + Scientology overtuigingen en praktijken: Sociale en antisociale persoonlijkheid + + In Scientology, zijn overlopers die om te zetten in critici van de beweging verklaarde onderdrukkende personen, en de Kerk van Scientology heeft een reputatie voor het verplaatsen van agressief tegen dergelijke tegenstanders. Een scientoloog die is actief in de communicatie met een onderdrukkend persoon en als gevolg tekenen van antisociaal gedrag is bedoeld als een mogelijke problemen Bron. + + http://en.wikipedia.org/wiki/Scientology#Auditing + + Scientology overtuigingen en praktijken: Auditing + + Scientology beweert dat de mensen verborgen talenten die nog niet volledig gerealiseerd zijn. Er wordt aangenomen dat een toename van spiritueel bewustzijn en fysieke voordelen worden bereikt door middel van counseling sessies als auditing genoemd. Door middel van audits, wordt gezegd dat mensen hun problemen op te lossen en vrij te maken van engrammen. Dit herstelt ze hun natuurlijke toestand als thetans en stelt hen in staat om ten oorzaak in hun dagelijks leven, reageren rationeel en creatief gebeurtenissen in het leven in plaats van reageren om ze onder de leiding van de opgeslagen engrammen. Daarom, zij die studie Scientology materialen en ontvang auditing sessies vooraf een status van Preclear om duidelijke en Operating Thetan. utopische doel van Scientology is om "duidelijk de planeet", een wereld waarin iedereen heeft zich ontdaan van hun engrammen. + + http://en.wikipedia.org/wiki/Scientology#Auditing + + Scientology overtuigingen en praktijken: Auditing + + Auditing is een een-op-een sessie met een therapeut of Scientology accountant. Het draagt een oppervlakkige gelijkenis met de biecht of pastorale counseling, maar de accountant niet afzien van vergeving of het advies van de manier waarop een predikant of priester zou kunnen doen. Plaats, de accountant heeft tot taak om te helpen de persoon te ontdekken en te begrijpen engrammen, en hun beperkende effecten, voor zichzelf. De meeste controle vereist een E-meter, een apparaat dat minute wijzigingen maatregelen in elektrische weerstand door het lichaam wanneer een persoon de elektroden in bezit heeft (metaal "blikken"), en een kleine stroom wordt doorgegeven via hen. Scientology beweert dat het kijken voor veranderingen in het display van de E-meter helpt bij het lokaliseren engrammen. Zodra een punt van zorg is vastgesteld, de accountant vraagt de individuele specifieke vragen over het, in om hen te helpen elimineren de engram, en maakt gebruik van de E-meter om te bevestigen dat het engram de "lading" is verdwenen en de engram heeft in feit is gewist. De individuele vordert, de focus van auditing verhuist van eenvoudige engrammen te engrammen van toenemende complexiteit. Bij de meer geavanceerde OT auditing niveaus, Scientologen solo auditing sessies, als hun eigen accountants. + + http://en.wikipedia.org/wiki/Scientology#The_Bridge_to_Total_Freedom + + Scientology overtuigingen en praktijken: De Brug naar Totale Vrijheid + + Spirituele ontwikkeling binnen de Scientology wordt bereikt door het bestuderen van Scientology materialen. Scientology materialen (de zogenaamde Technology of Tech in Scientology jargon) zijn gestructureerd in opeenvolgende niveaus (of verlopen), zodat gemakkelijker stappen worden eerst genomen en een grotere complexiteit worden afgehandeld op het juiste moment. Dit proces wordt soms aangeduid als het verplaatsen langs de Brug naar Totale Vrijheid, of gewoon de brug. Het heeft twee kanten: opleiding en verwerking. Training betekent onderwijs in de beginselen en praktijken van de accountantscontrole. Verwerking is de persoonlijke ontwikkeling door middel van deelname aan auditing sessies. + + http://en.wikipedia.org/wiki/Scientology#The_Bridge_to_Total_Freedom + + Scientology overtuigingen en praktijken: De Brug naar Totale Vrijheid + + De Kerk van Scientology gelooft in het principe van wederkerigheid, waarbij geven en nemen in ieder mens transactie. Bijgevolg dienen de leden om donaties te maken voor de cursussen en auditing als ze omhoog de brug, de bedragen toe naarmate een hoger niveau worden bereikt. Deelname aan het hoger niveau cursussen over de brug kan kosten een paar duizend dollar, en Scientologen meestal omhoog de brug met een snelheid beheerst door hun inkomen. + + http://en.wikipedia.org/wiki/Scientology#Space_opera_and_confidential_materials + + Scientology overtuigingen en praktijken: Space opera en vertrouwelijke materialen + + De Scientology Kerk houdt in dat op de hogere niveaus van inleiding (OT-niveaus) mystieke leringen worden bijgebracht die schadelijk kunnen zijn voor onvoorbereide lezers. Deze leringen zijn bewaard geheim van leden die niet hebben bereikt deze niveaus. De Kerk stelt dat de geheimhouding gerechtvaardigd is om de materialen "te gebruiken in de context te houden, en om haar leden te beschermen tegen blootstelling aan materialen die zij nog niet zijn voorbereid. + + http://en.wikipedia.org/wiki/Scientology#Space_opera_and_confidential_materials + + Scientology overtuigingen en praktijken: Space opera en vertrouwelijke materialen + + Dit zijn de OT-niveaus, de niveaus boven Clear, waarvan de inhoud bewaakt binnen Scientology. De OT-niveau leer in rekeningen van de verschillende kosmische catastrofes die de thetans overkwam. Hubbard beschreven deze vroege gebeurtenissen gezamenlijk space opera. + + http://en.wikipedia.org/wiki/Scientology#Space_opera_and_confidential_materials + + Scientology overtuigingen en praktijken: Space opera en vertrouwelijke materialen + + In de OT-niveaus, Hubbard wordt uitgelegd hoe u de effecten van vorige levens trauma patronen die zogenaamd miljoenen jaren uit te breiden in het verleden te keren. Onder deze geavanceerde leringen is het verhaal van Xenu (soms Xemu), geïntroduceerd als een vreemdeling heerser van de "Galactische Confederatie." Volgens dit verhaal, 75 miljoen jaar geleden Xenu miljarden mensen naar de Aarde gebracht in ruimtevaartuigen lijkt Douglas DC-8 vliegtuigen, gestapeld ze rond vulkanen en ontploft waterstof bommen in de vulkanen. De thetans dan samen geclusterd, vast aan de lichamen van de levenden, en dit blijven doen vandaag. Scientologen op zeer hoog niveau plaats grote nadruk op het isoleren van het lichaam thetans en het neutraliseren van de nadelige gevolgen. + + http://en.wikipedia.org/wiki/Scientology#Space_opera_and_confidential_materials + + Scientology overtuigingen en praktijken: Space opera en vertrouwelijke materialen + + Het materiaal vervat in de OT-niveaus is gekenmerkt als slechte science fiction door de critici, terwijl anderen beweren dat het beren structurele gelijkenis met gnostische denken en oude hindoe-mythen van de schepping en kosmische strijd. J. Gordon Melton suggereert dat deze elementen van de OT-niveaus nooit kan zijn bedoeld als beschrijving van historische gebeurtenissen, en dat, net als andere religieuze mythologie, kunnen zij hun waarheid in de realiteit van het lichaam en geest die ze symboliseren hebben. Hij voegt eraan toe dat er op welk niveau dan ook Scientologen zou hebben ontvangen deze mythologie, lijken ze gevonden te hebben het nuttig in hun spirituele zoektocht. + + http://en.wikipedia.org/wiki/Scientology#Space_opera_and_confidential_materials + + Scientology overtuigingen en praktijken: Space opera en vertrouwelijke materialen + + De hoge OT-niveaus beschikbaar worden gesteld aan Scientologen alleen op uitnodiging, na een herziening van het karakter van de kandidaat en de bijdrage aan de doelstellingen van Scientology. Personen die het hebben gelezen van deze materialen kan niet bekendmaken wat ze bevatten, zonder gevaar voor hun positie in de kerk. Fragmenten en beschrijvingen van OT materialen werden online gepubliceerd door een voormalig lid in 1995 en vervolgens verspreid in de mainstream media. Dit gebeurde nadat de leer waren ingediend als bewijs in rechtszaken met betrekking tot Scientology, waardoor het een kwestie van openbare informatie. Er zijn acht door de overheid bekend OT-niveaus, OT I tot en met VIII. Het hoogste niveau, OT VIII, slechts bekend is op zee, op de Scientology cruiseschip Freewinds. Het werd uitgebracht in de late jaren 1980. Er gaan geruchten dat de extra OT-niveaus, waarvan gezegd wordt gebaseerd op materiaal geschreven door Hubbard lang geleden, zal worden vrijgegeven op een geschikt moment in de toekomst. + + http://en.wikipedia.org/wiki/Scientology#Space_opera_and_confidential_materials + + Scientology overtuigingen en praktijken: Space opera en vertrouwelijke materialen + + Er is een grote kerk van Spiritual Technology symbool gekerfd in de grond van Scientology Trementina Base die zichtbaar is vanuit de lucht. Washington Post journalist Richard Leiby schreef: "Voormalige Scientologen vertrouwd met Hubbard's leringen over reïncarnatie te zeggen het symbool markeert een 'return point' zodat trouwe medewerkers weten waar ze kunnen de oprichter werken te vinden wanneer ze reizen hier in de toekomst uit andere plaatsen in het heelal . " + + http://en.wikipedia.org/wiki/Scientology#Ceremonies + + Scientology overtuigingen en praktijken: Ceremonies + + In Scientology, zijn ceremonies voor evenementen zoals bruiloften, kind benoemen, en begrafenissen waargenomen. Vrijdag diensten worden gehouden voor de voltooiing van iemands religieuze diensten te herdenken tijdens de voorafgaande week. Gewijde Scientology ministers kunnen verrichten riten. Echter, deze diensten en de geestelijkheid die ze verrichten spelen slechts een ondergeschikte rol in Scientologen 'religieuze leven. + + http://en.wikipedia.org/wiki/Scientology#Influences + + Scientology overtuigingen en praktijken: Invloeden + + In Dianetics, Hubbard geeft krediet aan Francis Bacon en Herbert Spencer. Hubbard herinnerd vergadering Cmdr. Joseph Cheesman Thompson, een Amerikaanse marine officier die studeerde bij Sigmund Freud, toen hij 12 jaar oud was, en toen Hubbard schreef aan de American Psychological Association in 1949, verklaarde hij dat hij het onderzoek gebaseerd op de "vroege werk van Freud" dirigeren. Scientology is van mening van de geest heeft een aantal overeenkomsten met de Freudiaanse. + + http://en.wikipedia.org/wiki/Scientology#Influences + + Scientology overtuigingen en praktijken: Invloeden + + In de jaren 1940, Hubbard was in contact met Jack Parsons, een raket wetenschapper en lid van de Ordo Templi Orientis vervolgens geleid door Aleister Crowley, en er zijn suggesties dat deze verbinding een aantal van de ideeën en symbolen van de Scientology beïnvloed. Religieuze geleerden zoals Gerald Willms en J. Gordon Melton hebben erop gewezen dat de leer van Crowley's "satanisme" dragen weinig of geen gelijkenis met Scientology leer. + + http://en.wikipedia.org/wiki/Scientology#Influences + + Scientology overtuigingen en praktijken: Invloeden + + Zoals opgemerkt, zijn er elementen van oosterse religies duidelijk in Scientology, in het bijzonder de begrippen van karma, zoals aanwezig in het hindoeïsme en in het jainisme, en dharma. In aanvulling op de links om Hindoe teksten, Hubbard geprobeerd om Scientology komen met het taoïsme en het boeddhisme. Scientology is gezegd om functies met gnostiek te delen. + + + diff --git a/resources/images/cursor_pan_down.png b/resources/images/cursor_pan_down.png new file mode 100644 index 0000000..ddc3b87 Binary files /dev/null and b/resources/images/cursor_pan_down.png differ diff --git a/resources/images/cursor_pan_up.png b/resources/images/cursor_pan_up.png new file mode 100644 index 0000000..6f58977 Binary files /dev/null and b/resources/images/cursor_pan_up.png differ diff --git a/resources/images/cursor_pie_down.png b/resources/images/cursor_pie_down.png new file mode 100644 index 0000000..0f7874b Binary files /dev/null and b/resources/images/cursor_pie_down.png differ diff --git a/resources/images/cursor_pie_up.png b/resources/images/cursor_pie_up.png new file mode 100644 index 0000000..9e60809 Binary files /dev/null and b/resources/images/cursor_pie_up.png differ diff --git a/resources/images/cursor_template.psd b/resources/images/cursor_template.psd new file mode 100644 index 0000000..ec75f02 Binary files /dev/null and b/resources/images/cursor_template.psd differ diff --git a/resources/images/dataColorMap.png b/resources/images/dataColorMap.png new file mode 100644 index 0000000..d7975eb Binary files /dev/null and b/resources/images/dataColorMap.png differ diff --git a/resources/images/generate_map.png b/resources/images/generate_map.png new file mode 100644 index 0000000..830cf02 Binary files /dev/null and b/resources/images/generate_map.png differ diff --git a/resources/images/icairp.png b/resources/images/icairp.png new file mode 100755 index 0000000..09816a7 Binary files /dev/null and b/resources/images/icairp.png differ diff --git a/resources/images/icairphi.png b/resources/images/icairphi.png new file mode 100755 index 0000000..fc1bd3f Binary files /dev/null and b/resources/images/icairphi.png differ diff --git a/resources/images/icchlk.png b/resources/images/icchlk.png new file mode 100755 index 0000000..54de8e1 Binary files /dev/null and b/resources/images/icchlk.png differ diff --git a/resources/images/icchlkhi.png b/resources/images/icchlkhi.png new file mode 100755 index 0000000..1a0d57f Binary files /dev/null and b/resources/images/icchlkhi.png differ diff --git a/resources/images/iccoal.png b/resources/images/iccoal.png new file mode 100755 index 0000000..d7a5884 Binary files /dev/null and b/resources/images/iccoal.png differ diff --git a/resources/images/iccoalhi.png b/resources/images/iccoalhi.png new file mode 100755 index 0000000..94686a9 Binary files /dev/null and b/resources/images/iccoalhi.png differ diff --git a/resources/images/iccom.png b/resources/images/iccom.png new file mode 100755 index 0000000..00028c3 Binary files /dev/null and b/resources/images/iccom.png differ diff --git a/resources/images/iccomhi.png b/resources/images/iccomhi.png new file mode 100755 index 0000000..ca99bdd Binary files /dev/null and b/resources/images/iccomhi.png differ diff --git a/resources/images/icdozr.png b/resources/images/icdozr.png new file mode 100755 index 0000000..c4d316e Binary files /dev/null and b/resources/images/icdozr.png differ diff --git a/resources/images/icdozrhi.png b/resources/images/icdozrhi.png new file mode 100755 index 0000000..f31e296 Binary files /dev/null and b/resources/images/icdozrhi.png differ diff --git a/resources/images/icersr.png b/resources/images/icersr.png new file mode 100755 index 0000000..c131864 Binary files /dev/null and b/resources/images/icersr.png differ diff --git a/resources/images/icersrhi.png b/resources/images/icersrhi.png new file mode 100755 index 0000000..f7a1e65 Binary files /dev/null and b/resources/images/icersrhi.png differ diff --git a/resources/images/icfire.png b/resources/images/icfire.png new file mode 100755 index 0000000..6dfc707 Binary files /dev/null and b/resources/images/icfire.png differ diff --git a/resources/images/icfirehi.png b/resources/images/icfirehi.png new file mode 100755 index 0000000..0f6daaf Binary files /dev/null and b/resources/images/icfirehi.png differ diff --git a/resources/images/icind.png b/resources/images/icind.png new file mode 100755 index 0000000..13f4c3e Binary files /dev/null and b/resources/images/icind.png differ diff --git a/resources/images/icindhi.png b/resources/images/icindhi.png new file mode 100755 index 0000000..692fcdd Binary files /dev/null and b/resources/images/icindhi.png differ diff --git a/resources/images/icnuc.png b/resources/images/icnuc.png new file mode 100755 index 0000000..ceceafe Binary files /dev/null and b/resources/images/icnuc.png differ diff --git a/resources/images/icnuchi.png b/resources/images/icnuchi.png new file mode 100755 index 0000000..103c0d5 Binary files /dev/null and b/resources/images/icnuchi.png differ diff --git a/resources/images/icon_about.png b/resources/images/icon_about.png new file mode 100644 index 0000000..c65f7fa Binary files /dev/null and b/resources/images/icon_about.png differ diff --git a/resources/images/icon_capital.png b/resources/images/icon_capital.png new file mode 100644 index 0000000..290d3b3 Binary files /dev/null and b/resources/images/icon_capital.png differ diff --git a/resources/images/icon_city.png b/resources/images/icon_city.png new file mode 100644 index 0000000..0d0bc6f Binary files /dev/null and b/resources/images/icon_city.png differ diff --git a/resources/images/icon_crime.png b/resources/images/icon_crime.png new file mode 100644 index 0000000..d258a90 Binary files /dev/null and b/resources/images/icon_crime.png differ diff --git a/resources/images/icon_impeached.png b/resources/images/icon_impeached.png new file mode 100644 index 0000000..d4d049a Binary files /dev/null and b/resources/images/icon_impeached.png differ diff --git a/resources/images/icon_keytothecity.png b/resources/images/icon_keytothecity.png new file mode 100644 index 0000000..49b27c0 Binary files /dev/null and b/resources/images/icon_keytothecity.png differ diff --git a/resources/images/icon_megalopolis.png b/resources/images/icon_megalopolis.png new file mode 100644 index 0000000..c47b40c Binary files /dev/null and b/resources/images/icon_megalopolis.png differ diff --git a/resources/images/icon_metropolis.png b/resources/images/icon_metropolis.png new file mode 100644 index 0000000..8c2f293 Binary files /dev/null and b/resources/images/icon_metropolis.png differ diff --git a/resources/images/icon_pollution.png b/resources/images/icon_pollution.png new file mode 100644 index 0000000..bdf0ea2 Binary files /dev/null and b/resources/images/icon_pollution.png differ diff --git a/resources/images/icon_town.png b/resources/images/icon_town.png new file mode 100644 index 0000000..851f9d2 Binary files /dev/null and b/resources/images/icon_town.png differ diff --git a/resources/images/icon_traffic.png b/resources/images/icon_traffic.png new file mode 100644 index 0000000..e543d0b Binary files /dev/null and b/resources/images/icon_traffic.png differ diff --git a/resources/images/icpark.png b/resources/images/icpark.png new file mode 100755 index 0000000..e49bfa4 Binary files /dev/null and b/resources/images/icpark.png differ diff --git a/resources/images/icparkhi.png b/resources/images/icparkhi.png new file mode 100755 index 0000000..c4210ef Binary files /dev/null and b/resources/images/icparkhi.png differ diff --git a/resources/images/icpol.png b/resources/images/icpol.png new file mode 100755 index 0000000..629feca Binary files /dev/null and b/resources/images/icpol.png differ diff --git a/resources/images/icpolhi.png b/resources/images/icpolhi.png new file mode 100755 index 0000000..0327296 Binary files /dev/null and b/resources/images/icpolhi.png differ diff --git a/resources/images/icqry.png b/resources/images/icqry.png new file mode 100755 index 0000000..fbe3019 Binary files /dev/null and b/resources/images/icqry.png differ diff --git a/resources/images/icqryhi.png b/resources/images/icqryhi.png new file mode 100755 index 0000000..bf7efa7 Binary files /dev/null and b/resources/images/icqryhi.png differ diff --git a/resources/images/icrail.png b/resources/images/icrail.png new file mode 100755 index 0000000..a304ca8 Binary files /dev/null and b/resources/images/icrail.png differ diff --git a/resources/images/icrailhi.png b/resources/images/icrailhi.png new file mode 100755 index 0000000..7a2a757 Binary files /dev/null and b/resources/images/icrailhi.png differ diff --git a/resources/images/icres.png b/resources/images/icres.png new file mode 100755 index 0000000..07e04d7 Binary files /dev/null and b/resources/images/icres.png differ diff --git a/resources/images/icreshi.png b/resources/images/icreshi.png new file mode 100755 index 0000000..ca93778 Binary files /dev/null and b/resources/images/icreshi.png differ diff --git a/resources/images/icroad.png b/resources/images/icroad.png new file mode 100755 index 0000000..c4ae480 Binary files /dev/null and b/resources/images/icroad.png differ diff --git a/resources/images/icroadhi.png b/resources/images/icroadhi.png new file mode 100755 index 0000000..7a41021 Binary files /dev/null and b/resources/images/icroadhi.png differ diff --git a/resources/images/icseap.png b/resources/images/icseap.png new file mode 100755 index 0000000..9b2dcba Binary files /dev/null and b/resources/images/icseap.png differ diff --git a/resources/images/icseaphi.png b/resources/images/icseaphi.png new file mode 100755 index 0000000..4b6d3de Binary files /dev/null and b/resources/images/icseaphi.png differ diff --git a/resources/images/icstad.png b/resources/images/icstad.png new file mode 100755 index 0000000..2663f7d Binary files /dev/null and b/resources/images/icstad.png differ diff --git a/resources/images/icstadhi.png b/resources/images/icstadhi.png new file mode 100755 index 0000000..d5abe41 Binary files /dev/null and b/resources/images/icstadhi.png differ diff --git a/resources/images/icwire.png b/resources/images/icwire.png new file mode 100755 index 0000000..b0f6ff3 Binary files /dev/null and b/resources/images/icwire.png differ diff --git a/resources/images/icwirehi.png b/resources/images/icwirehi.png new file mode 100755 index 0000000..1e20834 Binary files /dev/null and b/resources/images/icwirehi.png differ diff --git a/resources/images/logo_micropolis.png b/resources/images/logo_micropolis.png new file mode 100644 index 0000000..a43a85c Binary files /dev/null and b/resources/images/logo_micropolis.png differ diff --git a/resources/images/powerGridColorMap.png b/resources/images/powerGridColorMap.png new file mode 100644 index 0000000..48b2cfb Binary files /dev/null and b/resources/images/powerGridColorMap.png differ diff --git a/resources/images/rateColorMap.png b/resources/images/rateColorMap.png new file mode 100644 index 0000000..d1db99b Binary files /dev/null and b/resources/images/rateColorMap.png differ diff --git a/resources/images/robot_odyssey.png b/resources/images/robot_odyssey.png new file mode 100644 index 0000000..832e2c3 Binary files /dev/null and b/resources/images/robot_odyssey.png differ diff --git a/resources/images/scenario_1.png b/resources/images/scenario_1.png new file mode 100644 index 0000000..5e0139e Binary files /dev/null and b/resources/images/scenario_1.png differ diff --git a/resources/images/scenario_2.png b/resources/images/scenario_2.png new file mode 100644 index 0000000..693c6b5 Binary files /dev/null and b/resources/images/scenario_2.png differ diff --git a/resources/images/scenario_3.png b/resources/images/scenario_3.png new file mode 100644 index 0000000..799236e Binary files /dev/null and b/resources/images/scenario_3.png differ diff --git a/resources/images/scenario_4.png b/resources/images/scenario_4.png new file mode 100644 index 0000000..f212fa2 Binary files /dev/null and b/resources/images/scenario_4.png differ diff --git a/resources/images/scenario_5.png b/resources/images/scenario_5.png new file mode 100644 index 0000000..08da043 Binary files /dev/null and b/resources/images/scenario_5.png differ diff --git a/resources/images/scenario_6.png b/resources/images/scenario_6.png new file mode 100644 index 0000000..c2dc1a5 Binary files /dev/null and b/resources/images/scenario_6.png differ diff --git a/resources/images/scenario_7.png b/resources/images/scenario_7.png new file mode 100644 index 0000000..3147305 Binary files /dev/null and b/resources/images/scenario_7.png differ diff --git a/resources/images/scenario_8.png b/resources/images/scenario_8.png new file mode 100644 index 0000000..7e55aa4 Binary files /dev/null and b/resources/images/scenario_8.png differ diff --git a/resources/images/sprite_1_0.png b/resources/images/sprite_1_0.png new file mode 100644 index 0000000..1b53d04 Binary files /dev/null and b/resources/images/sprite_1_0.png differ diff --git a/resources/images/sprite_1_1.png b/resources/images/sprite_1_1.png new file mode 100644 index 0000000..c75f23b Binary files /dev/null and b/resources/images/sprite_1_1.png differ diff --git a/resources/images/sprite_1_2.png b/resources/images/sprite_1_2.png new file mode 100644 index 0000000..03984ac Binary files /dev/null and b/resources/images/sprite_1_2.png differ diff --git a/resources/images/sprite_1_3.png b/resources/images/sprite_1_3.png new file mode 100644 index 0000000..c7b1b6d Binary files /dev/null and b/resources/images/sprite_1_3.png differ diff --git a/resources/images/sprite_1_4.png b/resources/images/sprite_1_4.png new file mode 100644 index 0000000..4518e7c Binary files /dev/null and b/resources/images/sprite_1_4.png differ diff --git a/resources/images/sprite_2_0.png b/resources/images/sprite_2_0.png new file mode 100644 index 0000000..87c692f Binary files /dev/null and b/resources/images/sprite_2_0.png differ diff --git a/resources/images/sprite_2_1.png b/resources/images/sprite_2_1.png new file mode 100644 index 0000000..6ca9415 Binary files /dev/null and b/resources/images/sprite_2_1.png differ diff --git a/resources/images/sprite_2_2.png b/resources/images/sprite_2_2.png new file mode 100644 index 0000000..5d759c4 Binary files /dev/null and b/resources/images/sprite_2_2.png differ diff --git a/resources/images/sprite_2_3.png b/resources/images/sprite_2_3.png new file mode 100644 index 0000000..e6e83bb Binary files /dev/null and b/resources/images/sprite_2_3.png differ diff --git a/resources/images/sprite_2_4.png b/resources/images/sprite_2_4.png new file mode 100644 index 0000000..b94e789 Binary files /dev/null and b/resources/images/sprite_2_4.png differ diff --git a/resources/images/sprite_2_5.png b/resources/images/sprite_2_5.png new file mode 100644 index 0000000..390829d Binary files /dev/null and b/resources/images/sprite_2_5.png differ diff --git a/resources/images/sprite_2_6.png b/resources/images/sprite_2_6.png new file mode 100644 index 0000000..895ac56 Binary files /dev/null and b/resources/images/sprite_2_6.png differ diff --git a/resources/images/sprite_2_7.png b/resources/images/sprite_2_7.png new file mode 100644 index 0000000..19c308e Binary files /dev/null and b/resources/images/sprite_2_7.png differ diff --git a/resources/images/sprite_3_0.png b/resources/images/sprite_3_0.png new file mode 100644 index 0000000..bec17c7 Binary files /dev/null and b/resources/images/sprite_3_0.png differ diff --git a/resources/images/sprite_3_1.png b/resources/images/sprite_3_1.png new file mode 100644 index 0000000..e69bb86 Binary files /dev/null and b/resources/images/sprite_3_1.png differ diff --git a/resources/images/sprite_3_10.png b/resources/images/sprite_3_10.png new file mode 100644 index 0000000..e5e5f0a Binary files /dev/null and b/resources/images/sprite_3_10.png differ diff --git a/resources/images/sprite_3_2.png b/resources/images/sprite_3_2.png new file mode 100644 index 0000000..ca3b839 Binary files /dev/null and b/resources/images/sprite_3_2.png differ diff --git a/resources/images/sprite_3_3.png b/resources/images/sprite_3_3.png new file mode 100644 index 0000000..f7e623f Binary files /dev/null and b/resources/images/sprite_3_3.png differ diff --git a/resources/images/sprite_3_4.png b/resources/images/sprite_3_4.png new file mode 100644 index 0000000..c7af0a5 Binary files /dev/null and b/resources/images/sprite_3_4.png differ diff --git a/resources/images/sprite_3_5.png b/resources/images/sprite_3_5.png new file mode 100644 index 0000000..60a70a0 Binary files /dev/null and b/resources/images/sprite_3_5.png differ diff --git a/resources/images/sprite_3_6.png b/resources/images/sprite_3_6.png new file mode 100644 index 0000000..b3b6544 Binary files /dev/null and b/resources/images/sprite_3_6.png differ diff --git a/resources/images/sprite_3_7.png b/resources/images/sprite_3_7.png new file mode 100644 index 0000000..a17b9cd Binary files /dev/null and b/resources/images/sprite_3_7.png differ diff --git a/resources/images/sprite_3_8.png b/resources/images/sprite_3_8.png new file mode 100644 index 0000000..e6f404f Binary files /dev/null and b/resources/images/sprite_3_8.png differ diff --git a/resources/images/sprite_3_9.png b/resources/images/sprite_3_9.png new file mode 100644 index 0000000..9020363 Binary files /dev/null and b/resources/images/sprite_3_9.png differ diff --git a/resources/images/sprite_4_0.png b/resources/images/sprite_4_0.png new file mode 100644 index 0000000..b37643c Binary files /dev/null and b/resources/images/sprite_4_0.png differ diff --git a/resources/images/sprite_4_1.png b/resources/images/sprite_4_1.png new file mode 100644 index 0000000..830fab8 Binary files /dev/null and b/resources/images/sprite_4_1.png differ diff --git a/resources/images/sprite_4_2.png b/resources/images/sprite_4_2.png new file mode 100644 index 0000000..5c7365d Binary files /dev/null and b/resources/images/sprite_4_2.png differ diff --git a/resources/images/sprite_4_3.png b/resources/images/sprite_4_3.png new file mode 100644 index 0000000..29e2baa Binary files /dev/null and b/resources/images/sprite_4_3.png differ diff --git a/resources/images/sprite_4_4.png b/resources/images/sprite_4_4.png new file mode 100644 index 0000000..49fb5da Binary files /dev/null and b/resources/images/sprite_4_4.png differ diff --git a/resources/images/sprite_4_5.png b/resources/images/sprite_4_5.png new file mode 100644 index 0000000..a59849d Binary files /dev/null and b/resources/images/sprite_4_5.png differ diff --git a/resources/images/sprite_4_6.png b/resources/images/sprite_4_6.png new file mode 100644 index 0000000..f3c0f5f Binary files /dev/null and b/resources/images/sprite_4_6.png differ diff --git a/resources/images/sprite_4_7.png b/resources/images/sprite_4_7.png new file mode 100644 index 0000000..ffff015 Binary files /dev/null and b/resources/images/sprite_4_7.png differ diff --git a/resources/images/sprite_5_0.png b/resources/images/sprite_5_0.png new file mode 100644 index 0000000..fc9e206 Binary files /dev/null and b/resources/images/sprite_5_0.png differ diff --git a/resources/images/sprite_5_1.png b/resources/images/sprite_5_1.png new file mode 100644 index 0000000..e9cd5c5 Binary files /dev/null and b/resources/images/sprite_5_1.png differ diff --git a/resources/images/sprite_5_10.png b/resources/images/sprite_5_10.png new file mode 100644 index 0000000..8820300 Binary files /dev/null and b/resources/images/sprite_5_10.png differ diff --git a/resources/images/sprite_5_11.png b/resources/images/sprite_5_11.png new file mode 100644 index 0000000..ad70741 Binary files /dev/null and b/resources/images/sprite_5_11.png differ diff --git a/resources/images/sprite_5_12.png b/resources/images/sprite_5_12.png new file mode 100644 index 0000000..f090e96 Binary files /dev/null and b/resources/images/sprite_5_12.png differ diff --git a/resources/images/sprite_5_13.png b/resources/images/sprite_5_13.png new file mode 100644 index 0000000..bb995b3 Binary files /dev/null and b/resources/images/sprite_5_13.png differ diff --git a/resources/images/sprite_5_14.png b/resources/images/sprite_5_14.png new file mode 100644 index 0000000..c80a227 Binary files /dev/null and b/resources/images/sprite_5_14.png differ diff --git a/resources/images/sprite_5_15.png b/resources/images/sprite_5_15.png new file mode 100644 index 0000000..74eb31f Binary files /dev/null and b/resources/images/sprite_5_15.png differ diff --git a/resources/images/sprite_5_2.png b/resources/images/sprite_5_2.png new file mode 100644 index 0000000..8acd79a Binary files /dev/null and b/resources/images/sprite_5_2.png differ diff --git a/resources/images/sprite_5_3.png b/resources/images/sprite_5_3.png new file mode 100644 index 0000000..44f4260 Binary files /dev/null and b/resources/images/sprite_5_3.png differ diff --git a/resources/images/sprite_5_4.png b/resources/images/sprite_5_4.png new file mode 100644 index 0000000..2a63e5d Binary files /dev/null and b/resources/images/sprite_5_4.png differ diff --git a/resources/images/sprite_5_5.png b/resources/images/sprite_5_5.png new file mode 100644 index 0000000..b24ed11 Binary files /dev/null and b/resources/images/sprite_5_5.png differ diff --git a/resources/images/sprite_5_6.png b/resources/images/sprite_5_6.png new file mode 100644 index 0000000..14ecee6 Binary files /dev/null and b/resources/images/sprite_5_6.png differ diff --git a/resources/images/sprite_5_7.png b/resources/images/sprite_5_7.png new file mode 100644 index 0000000..7acebbf Binary files /dev/null and b/resources/images/sprite_5_7.png differ diff --git a/resources/images/sprite_5_8.png b/resources/images/sprite_5_8.png new file mode 100644 index 0000000..22dedbb Binary files /dev/null and b/resources/images/sprite_5_8.png differ diff --git a/resources/images/sprite_5_9.png b/resources/images/sprite_5_9.png new file mode 100644 index 0000000..7d556a2 Binary files /dev/null and b/resources/images/sprite_5_9.png differ diff --git a/resources/images/sprite_6_0.png b/resources/images/sprite_6_0.png new file mode 100644 index 0000000..d820062 Binary files /dev/null and b/resources/images/sprite_6_0.png differ diff --git a/resources/images/sprite_6_1.png b/resources/images/sprite_6_1.png new file mode 100644 index 0000000..7572cf9 Binary files /dev/null and b/resources/images/sprite_6_1.png differ diff --git a/resources/images/sprite_6_2.png b/resources/images/sprite_6_2.png new file mode 100644 index 0000000..db793f0 Binary files /dev/null and b/resources/images/sprite_6_2.png differ diff --git a/resources/images/sprite_7_0.png b/resources/images/sprite_7_0.png new file mode 100644 index 0000000..7ddf7a7 Binary files /dev/null and b/resources/images/sprite_7_0.png differ diff --git a/resources/images/sprite_7_1.png b/resources/images/sprite_7_1.png new file mode 100644 index 0000000..176e34d Binary files /dev/null and b/resources/images/sprite_7_1.png differ diff --git a/resources/images/sprite_7_2.png b/resources/images/sprite_7_2.png new file mode 100644 index 0000000..2f783a1 Binary files /dev/null and b/resources/images/sprite_7_2.png differ diff --git a/resources/images/sprite_7_3.png b/resources/images/sprite_7_3.png new file mode 100644 index 0000000..bf3de0a Binary files /dev/null and b/resources/images/sprite_7_3.png differ diff --git a/resources/images/sprite_7_4.png b/resources/images/sprite_7_4.png new file mode 100644 index 0000000..f36a8b5 Binary files /dev/null and b/resources/images/sprite_7_4.png differ diff --git a/resources/images/sprite_7_5.png b/resources/images/sprite_7_5.png new file mode 100644 index 0000000..4278612 Binary files /dev/null and b/resources/images/sprite_7_5.png differ diff --git a/resources/images/sprite_8_0.png b/resources/images/sprite_8_0.png new file mode 100644 index 0000000..72995f5 Binary files /dev/null and b/resources/images/sprite_8_0.png differ diff --git a/resources/images/sprite_8_1.png b/resources/images/sprite_8_1.png new file mode 100644 index 0000000..fdde830 Binary files /dev/null and b/resources/images/sprite_8_1.png differ diff --git a/resources/images/sprite_8_2.png b/resources/images/sprite_8_2.png new file mode 100644 index 0000000..0855cfd Binary files /dev/null and b/resources/images/sprite_8_2.png differ diff --git a/resources/images/sprite_8_3.png b/resources/images/sprite_8_3.png new file mode 100644 index 0000000..9537ca5 Binary files /dev/null and b/resources/images/sprite_8_3.png differ diff --git a/resources/images/terrainColorMap.png b/resources/images/terrainColorMap.png new file mode 100644 index 0000000..8a6002e Binary files /dev/null and b/resources/images/terrainColorMap.png differ diff --git a/resources/images/tiles.png b/resources/images/tiles.png new file mode 100644 index 0000000..c7c7be4 Binary files /dev/null and b/resources/images/tiles.png differ diff --git a/resources/images/tiles/makezone.py b/resources/images/tiles/makezone.py new file mode 100644 index 0000000..8d6d232 --- /dev/null +++ b/resources/images/tiles/makezone.py @@ -0,0 +1,244 @@ +# makezone.py +# +# Micropolis, Unix Version. This game was released for the Unix platform +# in or about 1990 and has been modified for inclusion in the One Laptop +# Per Child program. Copyright (C) 1989 - 2007 Electronic Arts Inc. If +# you need assistance with this program, you may contact: +# http://wiki.laptop.org/go/Micropolis or email micropolis@laptop.org. +# +# This program 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. +# +# This program 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 this program. If +# not, see . +# +# ADDITIONAL TERMS per GNU GPL Section 7 +# +# No trademark or publicity rights are granted. This license does NOT +# give you any right, title or interest in the trademark SimCity or any +# other Electronic Arts trademark. You may not distribute any +# modification of this program using the trademark SimCity or claim any +# affliation or association with Electronic Arts Inc. or its employees. +# +# Any propagation or conveyance of this program must include this +# copyright notice and these terms. +# +# If you convey this program (or any modifications of it) and assume +# contractual liability for the program to recipients of it, you agree +# to indemnify Electronic Arts for any liability that those contractual +# assumptions impose on Electronic Arts. +# +# You may not misrepresent the origins of this program; modified +# versions of the program must be marked as such and not identified as +# the original program. +# +# This disclaimer supplements the one included in the General Public +# License. TO THE FULLEST EXTENT PERMISSIBLE UNDER APPLICABLE LAW, THIS +# PROGRAM IS PROVIDED TO YOU "AS IS," WITH ALL FAULTS, WITHOUT WARRANTY +# OF ANY KIND, AND YOUR USE IS AT YOUR SOLE RISK. THE ENTIRE RISK OF +# SATISFACTORY QUALITY AND PERFORMANCE RESIDES WITH YOU. ELECTRONIC ARTS +# DISCLAIMS ANY AND ALL EXPRESS, IMPLIED OR STATUTORY WARRANTIES, +# INCLUDING IMPLIED WARRANTIES OF MERCHANTABILITY, SATISFACTORY QUALITY, +# FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT OF THIRD PARTY +# RIGHTS, AND WARRANTIES (IF ANY) ARISING FROM A COURSE OF DEALING, +# USAGE, OR TRADE PRACTICE. ELECTRONIC ARTS DOES NOT WARRANT AGAINST +# INTERFERENCE WITH YOUR ENJOYMENT OF THE PROGRAM; THAT THE PROGRAM WILL +# MEET YOUR REQUIREMENTS; THAT OPERATION OF THE PROGRAM WILL BE +# UNINTERRUPTED OR ERROR-FREE, OR THAT THE PROGRAM WILL BE COMPATIBLE +# WITH THIRD PARTY SOFTWARE OR THAT ANY ERRORS IN THE PROGRAM WILL BE +# CORRECTED. NO ORAL OR WRITTEN ADVICE PROVIDED BY ELECTRONIC ARTS OR +# ANY AUTHORIZED REPRESENTATIVE SHALL CREATE A WARRANTY. SOME +# JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF OR LIMITATIONS ON IMPLIED +# WARRANTIES OR THE LIMITATIONS ON THE APPLICABLE STATUTORY RIGHTS OF A +# CONSUMER, SO SOME OR ALL OF THE ABOVE EXCLUSIONS AND LIMITATIONS MAY +# NOT APPLY TO YOU. + + +######################################################################## +# Make Zone +# Don Hopkins + + +import os, sys, math +import cairo + + +######################################################################## +# Globals + + +TileSize = 16 +TileCount = 1024 +TilesFileName = 'micropolis_tiles.png' +ZoneFileNameTemplate = 'zone_%s.png' +TileFileNameTemplate = 'micropolis_tile_%04d.png' + + +ZoneTable = { + 'church0': { + 'base': 414, + 'size': 3, + }, + 'church1': { + 'base': 956, + 'size': 3, + }, + 'church2': { + 'base': 965, + 'size': 3, + }, + 'church3': { + 'base': 974, + 'size': 3, + }, + 'church4': { + 'base': 983, + 'size': 3, + }, + 'church5': { + 'base': 992, + 'size': 3, + }, + 'church6': { + 'base': 1001, + 'size': 3, + }, + 'church7': { + 'base': 1010, + 'size': 3, + }, +} + + +######################################################################## +# Utilities + + +def main(): + if len(sys.argv) not in (2, 3, 4,): + print "Usage: makezone.py all -- make all zone s" + print "Usage: makezone.py zoneIDs [zoneImage] [tileDir] -- make zone(s)" + print "zoneIDs: comma separated list of zone IDs" + print "zoneImage: Name of PNG file with image of zone. Optional, defaults to zone_.png" + print "tileDir: Name of output tile directory. Optional, defaults to current directory." + sys.exit(1) + + args = sys.argv + argCount = len(args) + + print "ARGCOUNT", argCount, "ARGS[1]", args[1] + if (argCount == 2) and (args[1] == 'all'): + zoneIDs = sorted(ZoneTable.keys()) + else: + zoneIDs = args[1].split(',') + + if argCount > 3: + tileDir = args[2] + else: + tileDir = os.getcwd() + + if not os.path.exists(tileDir): + print "Tile directory does not exist:", tileDir + + print "ZONEIDS", zoneIDs + for zoneID in zoneIDs: + + if zoneID not in ZoneTable: + print "Undefined zoneID", zoneID, "should be one of:", ZoneTable.keys() + sys.exit(2) + + if argCount > 2: + zoneImageFileName = args[2] + else: + zoneImageFileName = os.path.join( + tileDir, + ZoneFileNameTemplate % (zoneID,)) + + if not os.path.exists(zoneImageFileName): + print "Zone image file does not exist:", zoneImageFileName + exit(3) + + MakeZone(zoneID, zoneImageFileName, tileDir) + + MakeAllTiles(tileDir) + + +def MakeZone(zoneID, zoneImageFileName, tileDir): + print "MakeZone", zoneID, zoneImageFileName, tileDir + + zoneInfo = ZoneTable[zoneID] + base = zoneInfo['base'] + size = zoneInfo['size'] + + zoneImage = cairo.ImageSurface.create_from_png(zoneImageFileName) + + tileImage = cairo.ImageSurface(cairo.FORMAT_ARGB32, TileSize, TileSize) + ctx = cairo.Context(tileImage) + + for row in range(0, size): + for col in range(0, size): + offset = (row * size) + col + tileNumber = base + offset + tileFileName = os.path.join( + tileDir, + TileFileNameTemplate % (tileNumber,)) + + #print row, col, tileFileName + + ctx.set_source_surface( + zoneImage, + -col * TileSize, + -row * TileSize) + ctx.paint() + + tileImage.write_to_png(tileFileName) + print "Wrote tile", tileFileName + + +def MakeAllTiles(tileDir): + + print "Make All Tiles" + + cols = 32 + rows = int(math.ceil(TileCount / float(cols))) + + tileImages = [] + + allTilesImage = cairo.ImageSurface(cairo.FORMAT_ARGB32, TileSize * cols, TileSize * rows) + ctx = cairo.Context(allTilesImage) + + for tileNumber in range(0, TileCount): + col = tileNumber % cols + row = int(tileNumber / cols) + tileFileName = os.path.join( + tileDir, + TileFileNameTemplate % (tileNumber,)) + tileImage = cairo.ImageSurface.create_from_png( + tileFileName) + #print tileNumber, col, row, tileFileName + ctx.set_source_surface( + tileImage, + col * TileSize, + row * TileSize) + ctx.paint() + + + allTilesImage.write_to_png(TilesFileName) + print "Wrote tiles", TilesFileName + + +######################################################################## + + +if __name__ == '__main__': + + main() + + +######################################################################## diff --git a/resources/images/tiles/micropolis_tile_0000.png b/resources/images/tiles/micropolis_tile_0000.png new file mode 100644 index 0000000..111f7ce Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0000.png differ diff --git a/resources/images/tiles/micropolis_tile_0001.png b/resources/images/tiles/micropolis_tile_0001.png new file mode 100644 index 0000000..e13a1e2 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0001.png differ diff --git a/resources/images/tiles/micropolis_tile_0002.png b/resources/images/tiles/micropolis_tile_0002.png new file mode 100644 index 0000000..edea020 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0002.png differ diff --git a/resources/images/tiles/micropolis_tile_0003.png b/resources/images/tiles/micropolis_tile_0003.png new file mode 100644 index 0000000..067fbec Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0003.png differ diff --git a/resources/images/tiles/micropolis_tile_0004.png b/resources/images/tiles/micropolis_tile_0004.png new file mode 100644 index 0000000..edea020 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0004.png differ diff --git a/resources/images/tiles/micropolis_tile_0005.png b/resources/images/tiles/micropolis_tile_0005.png new file mode 100644 index 0000000..6451736 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0005.png differ diff --git a/resources/images/tiles/micropolis_tile_0006.png b/resources/images/tiles/micropolis_tile_0006.png new file mode 100644 index 0000000..5c7c113 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0006.png differ diff --git a/resources/images/tiles/micropolis_tile_0007.png b/resources/images/tiles/micropolis_tile_0007.png new file mode 100644 index 0000000..28d57da Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0007.png differ diff --git a/resources/images/tiles/micropolis_tile_0008.png b/resources/images/tiles/micropolis_tile_0008.png new file mode 100644 index 0000000..8ec5ec5 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0008.png differ diff --git a/resources/images/tiles/micropolis_tile_0009.png b/resources/images/tiles/micropolis_tile_0009.png new file mode 100644 index 0000000..da895ff Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0009.png differ diff --git a/resources/images/tiles/micropolis_tile_0010.png b/resources/images/tiles/micropolis_tile_0010.png new file mode 100644 index 0000000..fc47b1b Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0010.png differ diff --git a/resources/images/tiles/micropolis_tile_0011.png b/resources/images/tiles/micropolis_tile_0011.png new file mode 100644 index 0000000..90bc0b6 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0011.png differ diff --git a/resources/images/tiles/micropolis_tile_0012.png b/resources/images/tiles/micropolis_tile_0012.png new file mode 100644 index 0000000..9321d7f Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0012.png differ diff --git a/resources/images/tiles/micropolis_tile_0013.png b/resources/images/tiles/micropolis_tile_0013.png new file mode 100644 index 0000000..74bab77 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0013.png differ diff --git a/resources/images/tiles/micropolis_tile_0014.png b/resources/images/tiles/micropolis_tile_0014.png new file mode 100644 index 0000000..af9c5d3 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0014.png differ diff --git a/resources/images/tiles/micropolis_tile_0015.png b/resources/images/tiles/micropolis_tile_0015.png new file mode 100644 index 0000000..2a89fbc Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0015.png differ diff --git a/resources/images/tiles/micropolis_tile_0016.png b/resources/images/tiles/micropolis_tile_0016.png new file mode 100644 index 0000000..0546a94 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0016.png differ diff --git a/resources/images/tiles/micropolis_tile_0017.png b/resources/images/tiles/micropolis_tile_0017.png new file mode 100644 index 0000000..0752b06 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0017.png differ diff --git a/resources/images/tiles/micropolis_tile_0018.png b/resources/images/tiles/micropolis_tile_0018.png new file mode 100644 index 0000000..8871a6c Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0018.png differ diff --git a/resources/images/tiles/micropolis_tile_0019.png b/resources/images/tiles/micropolis_tile_0019.png new file mode 100644 index 0000000..8b0c48e Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0019.png differ diff --git a/resources/images/tiles/micropolis_tile_0020.png b/resources/images/tiles/micropolis_tile_0020.png new file mode 100644 index 0000000..c5b904e Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0020.png differ diff --git a/resources/images/tiles/micropolis_tile_0021.png b/resources/images/tiles/micropolis_tile_0021.png new file mode 100644 index 0000000..e01012c Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0021.png differ diff --git a/resources/images/tiles/micropolis_tile_0022.png b/resources/images/tiles/micropolis_tile_0022.png new file mode 100644 index 0000000..377968d Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0022.png differ diff --git a/resources/images/tiles/micropolis_tile_0023.png b/resources/images/tiles/micropolis_tile_0023.png new file mode 100644 index 0000000..6f6af6d Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0023.png differ diff --git a/resources/images/tiles/micropolis_tile_0024.png b/resources/images/tiles/micropolis_tile_0024.png new file mode 100644 index 0000000..d9532be Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0024.png differ diff --git a/resources/images/tiles/micropolis_tile_0025.png b/resources/images/tiles/micropolis_tile_0025.png new file mode 100644 index 0000000..3637c18 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0025.png differ diff --git a/resources/images/tiles/micropolis_tile_0026.png b/resources/images/tiles/micropolis_tile_0026.png new file mode 100644 index 0000000..8c7985c Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0026.png differ diff --git a/resources/images/tiles/micropolis_tile_0027.png b/resources/images/tiles/micropolis_tile_0027.png new file mode 100644 index 0000000..3af531c Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0027.png differ diff --git a/resources/images/tiles/micropolis_tile_0028.png b/resources/images/tiles/micropolis_tile_0028.png new file mode 100644 index 0000000..820d5d0 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0028.png differ diff --git a/resources/images/tiles/micropolis_tile_0029.png b/resources/images/tiles/micropolis_tile_0029.png new file mode 100644 index 0000000..77b95a6 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0029.png differ diff --git a/resources/images/tiles/micropolis_tile_0030.png b/resources/images/tiles/micropolis_tile_0030.png new file mode 100644 index 0000000..fc30d1f Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0030.png differ diff --git a/resources/images/tiles/micropolis_tile_0031.png b/resources/images/tiles/micropolis_tile_0031.png new file mode 100644 index 0000000..ff15871 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0031.png differ diff --git a/resources/images/tiles/micropolis_tile_0032.png b/resources/images/tiles/micropolis_tile_0032.png new file mode 100644 index 0000000..79ed353 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0032.png differ diff --git a/resources/images/tiles/micropolis_tile_0033.png b/resources/images/tiles/micropolis_tile_0033.png new file mode 100644 index 0000000..5c7405f Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0033.png differ diff --git a/resources/images/tiles/micropolis_tile_0034.png b/resources/images/tiles/micropolis_tile_0034.png new file mode 100644 index 0000000..816dac3 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0034.png differ diff --git a/resources/images/tiles/micropolis_tile_0035.png b/resources/images/tiles/micropolis_tile_0035.png new file mode 100644 index 0000000..1beb3e0 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0035.png differ diff --git a/resources/images/tiles/micropolis_tile_0036.png b/resources/images/tiles/micropolis_tile_0036.png new file mode 100644 index 0000000..b97ee08 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0036.png differ diff --git a/resources/images/tiles/micropolis_tile_0037.png b/resources/images/tiles/micropolis_tile_0037.png new file mode 100644 index 0000000..1db34c3 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0037.png differ diff --git a/resources/images/tiles/micropolis_tile_0038.png b/resources/images/tiles/micropolis_tile_0038.png new file mode 100644 index 0000000..5219a59 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0038.png differ diff --git a/resources/images/tiles/micropolis_tile_0039.png b/resources/images/tiles/micropolis_tile_0039.png new file mode 100644 index 0000000..72a8b63 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0039.png differ diff --git a/resources/images/tiles/micropolis_tile_0040.png b/resources/images/tiles/micropolis_tile_0040.png new file mode 100644 index 0000000..dce0deb Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0040.png differ diff --git a/resources/images/tiles/micropolis_tile_0041.png b/resources/images/tiles/micropolis_tile_0041.png new file mode 100644 index 0000000..5703af2 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0041.png differ diff --git a/resources/images/tiles/micropolis_tile_0042.png b/resources/images/tiles/micropolis_tile_0042.png new file mode 100644 index 0000000..6bf8876 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0042.png differ diff --git a/resources/images/tiles/micropolis_tile_0043.png b/resources/images/tiles/micropolis_tile_0043.png new file mode 100644 index 0000000..8fdb852 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0043.png differ diff --git a/resources/images/tiles/micropolis_tile_0044.png b/resources/images/tiles/micropolis_tile_0044.png new file mode 100644 index 0000000..33241ee Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0044.png differ diff --git a/resources/images/tiles/micropolis_tile_0045.png b/resources/images/tiles/micropolis_tile_0045.png new file mode 100644 index 0000000..bb88950 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0045.png differ diff --git a/resources/images/tiles/micropolis_tile_0046.png b/resources/images/tiles/micropolis_tile_0046.png new file mode 100644 index 0000000..c5970f3 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0046.png differ diff --git a/resources/images/tiles/micropolis_tile_0047.png b/resources/images/tiles/micropolis_tile_0047.png new file mode 100644 index 0000000..db7ffdb Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0047.png differ diff --git a/resources/images/tiles/micropolis_tile_0048.png b/resources/images/tiles/micropolis_tile_0048.png new file mode 100644 index 0000000..d9a71db Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0048.png differ diff --git a/resources/images/tiles/micropolis_tile_0049.png b/resources/images/tiles/micropolis_tile_0049.png new file mode 100644 index 0000000..9b39874 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0049.png differ diff --git a/resources/images/tiles/micropolis_tile_0050.png b/resources/images/tiles/micropolis_tile_0050.png new file mode 100644 index 0000000..0765310 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0050.png differ diff --git a/resources/images/tiles/micropolis_tile_0051.png b/resources/images/tiles/micropolis_tile_0051.png new file mode 100644 index 0000000..69795bb Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0051.png differ diff --git a/resources/images/tiles/micropolis_tile_0052.png b/resources/images/tiles/micropolis_tile_0052.png new file mode 100644 index 0000000..5642c81 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0052.png differ diff --git a/resources/images/tiles/micropolis_tile_0053.png b/resources/images/tiles/micropolis_tile_0053.png new file mode 100644 index 0000000..c88a538 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0053.png differ diff --git a/resources/images/tiles/micropolis_tile_0054.png b/resources/images/tiles/micropolis_tile_0054.png new file mode 100644 index 0000000..aec6b37 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0054.png differ diff --git a/resources/images/tiles/micropolis_tile_0055.png b/resources/images/tiles/micropolis_tile_0055.png new file mode 100644 index 0000000..ecbe80b Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0055.png differ diff --git a/resources/images/tiles/micropolis_tile_0056.png b/resources/images/tiles/micropolis_tile_0056.png new file mode 100644 index 0000000..df03b3a Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0056.png differ diff --git a/resources/images/tiles/micropolis_tile_0057.png b/resources/images/tiles/micropolis_tile_0057.png new file mode 100644 index 0000000..e5a9978 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0057.png differ diff --git a/resources/images/tiles/micropolis_tile_0058.png b/resources/images/tiles/micropolis_tile_0058.png new file mode 100644 index 0000000..6798593 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0058.png differ diff --git a/resources/images/tiles/micropolis_tile_0059.png b/resources/images/tiles/micropolis_tile_0059.png new file mode 100644 index 0000000..30208de Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0059.png differ diff --git a/resources/images/tiles/micropolis_tile_0060.png b/resources/images/tiles/micropolis_tile_0060.png new file mode 100644 index 0000000..144f9fa Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0060.png differ diff --git a/resources/images/tiles/micropolis_tile_0061.png b/resources/images/tiles/micropolis_tile_0061.png new file mode 100644 index 0000000..2dd5595 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0061.png differ diff --git a/resources/images/tiles/micropolis_tile_0062.png b/resources/images/tiles/micropolis_tile_0062.png new file mode 100644 index 0000000..cb61794 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0062.png differ diff --git a/resources/images/tiles/micropolis_tile_0063.png b/resources/images/tiles/micropolis_tile_0063.png new file mode 100644 index 0000000..15440ef Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0063.png differ diff --git a/resources/images/tiles/micropolis_tile_0064.png b/resources/images/tiles/micropolis_tile_0064.png new file mode 100644 index 0000000..b5a5caf Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0064.png differ diff --git a/resources/images/tiles/micropolis_tile_0065.png b/resources/images/tiles/micropolis_tile_0065.png new file mode 100644 index 0000000..cd3bb51 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0065.png differ diff --git a/resources/images/tiles/micropolis_tile_0066.png b/resources/images/tiles/micropolis_tile_0066.png new file mode 100644 index 0000000..e5e99e8 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0066.png differ diff --git a/resources/images/tiles/micropolis_tile_0067.png b/resources/images/tiles/micropolis_tile_0067.png new file mode 100644 index 0000000..e0e21ab Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0067.png differ diff --git a/resources/images/tiles/micropolis_tile_0068.png b/resources/images/tiles/micropolis_tile_0068.png new file mode 100644 index 0000000..f069134 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0068.png differ diff --git a/resources/images/tiles/micropolis_tile_0069.png b/resources/images/tiles/micropolis_tile_0069.png new file mode 100644 index 0000000..fd1aae4 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0069.png differ diff --git a/resources/images/tiles/micropolis_tile_0070.png b/resources/images/tiles/micropolis_tile_0070.png new file mode 100644 index 0000000..13c258a Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0070.png differ diff --git a/resources/images/tiles/micropolis_tile_0071.png b/resources/images/tiles/micropolis_tile_0071.png new file mode 100644 index 0000000..265a33e Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0071.png differ diff --git a/resources/images/tiles/micropolis_tile_0072.png b/resources/images/tiles/micropolis_tile_0072.png new file mode 100644 index 0000000..ce71b37 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0072.png differ diff --git a/resources/images/tiles/micropolis_tile_0073.png b/resources/images/tiles/micropolis_tile_0073.png new file mode 100644 index 0000000..196921b Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0073.png differ diff --git a/resources/images/tiles/micropolis_tile_0074.png b/resources/images/tiles/micropolis_tile_0074.png new file mode 100644 index 0000000..0c96c8a Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0074.png differ diff --git a/resources/images/tiles/micropolis_tile_0075.png b/resources/images/tiles/micropolis_tile_0075.png new file mode 100644 index 0000000..860f934 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0075.png differ diff --git a/resources/images/tiles/micropolis_tile_0076.png b/resources/images/tiles/micropolis_tile_0076.png new file mode 100644 index 0000000..40b7d06 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0076.png differ diff --git a/resources/images/tiles/micropolis_tile_0077.png b/resources/images/tiles/micropolis_tile_0077.png new file mode 100644 index 0000000..1e4f9b3 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0077.png differ diff --git a/resources/images/tiles/micropolis_tile_0078.png b/resources/images/tiles/micropolis_tile_0078.png new file mode 100644 index 0000000..153f20f Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0078.png differ diff --git a/resources/images/tiles/micropolis_tile_0079.png b/resources/images/tiles/micropolis_tile_0079.png new file mode 100644 index 0000000..edea020 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0079.png differ diff --git a/resources/images/tiles/micropolis_tile_0080.png b/resources/images/tiles/micropolis_tile_0080.png new file mode 100644 index 0000000..22ecc1f Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0080.png differ diff --git a/resources/images/tiles/micropolis_tile_0081.png b/resources/images/tiles/micropolis_tile_0081.png new file mode 100644 index 0000000..367cfe7 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0081.png differ diff --git a/resources/images/tiles/micropolis_tile_0082.png b/resources/images/tiles/micropolis_tile_0082.png new file mode 100644 index 0000000..9069765 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0082.png differ diff --git a/resources/images/tiles/micropolis_tile_0083.png b/resources/images/tiles/micropolis_tile_0083.png new file mode 100644 index 0000000..22fdddd Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0083.png differ diff --git a/resources/images/tiles/micropolis_tile_0084.png b/resources/images/tiles/micropolis_tile_0084.png new file mode 100644 index 0000000..d86c2c2 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0084.png differ diff --git a/resources/images/tiles/micropolis_tile_0085.png b/resources/images/tiles/micropolis_tile_0085.png new file mode 100644 index 0000000..0b2018f Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0085.png differ diff --git a/resources/images/tiles/micropolis_tile_0086.png b/resources/images/tiles/micropolis_tile_0086.png new file mode 100644 index 0000000..0685925 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0086.png differ diff --git a/resources/images/tiles/micropolis_tile_0087.png b/resources/images/tiles/micropolis_tile_0087.png new file mode 100644 index 0000000..bdfe5bf Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0087.png differ diff --git a/resources/images/tiles/micropolis_tile_0088.png b/resources/images/tiles/micropolis_tile_0088.png new file mode 100644 index 0000000..ee2e98a Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0088.png differ diff --git a/resources/images/tiles/micropolis_tile_0089.png b/resources/images/tiles/micropolis_tile_0089.png new file mode 100644 index 0000000..4321f2b Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0089.png differ diff --git a/resources/images/tiles/micropolis_tile_0090.png b/resources/images/tiles/micropolis_tile_0090.png new file mode 100644 index 0000000..fbed033 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0090.png differ diff --git a/resources/images/tiles/micropolis_tile_0091.png b/resources/images/tiles/micropolis_tile_0091.png new file mode 100644 index 0000000..8032a88 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0091.png differ diff --git a/resources/images/tiles/micropolis_tile_0092.png b/resources/images/tiles/micropolis_tile_0092.png new file mode 100644 index 0000000..3142c60 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0092.png differ diff --git a/resources/images/tiles/micropolis_tile_0093.png b/resources/images/tiles/micropolis_tile_0093.png new file mode 100644 index 0000000..7f2fbc9 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0093.png differ diff --git a/resources/images/tiles/micropolis_tile_0094.png b/resources/images/tiles/micropolis_tile_0094.png new file mode 100644 index 0000000..e25552c Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0094.png differ diff --git a/resources/images/tiles/micropolis_tile_0095.png b/resources/images/tiles/micropolis_tile_0095.png new file mode 100644 index 0000000..edea020 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0095.png differ diff --git a/resources/images/tiles/micropolis_tile_0096.png b/resources/images/tiles/micropolis_tile_0096.png new file mode 100644 index 0000000..53782fe Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0096.png differ diff --git a/resources/images/tiles/micropolis_tile_0097.png b/resources/images/tiles/micropolis_tile_0097.png new file mode 100644 index 0000000..37742b1 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0097.png differ diff --git a/resources/images/tiles/micropolis_tile_0098.png b/resources/images/tiles/micropolis_tile_0098.png new file mode 100644 index 0000000..ca507f0 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0098.png differ diff --git a/resources/images/tiles/micropolis_tile_0099.png b/resources/images/tiles/micropolis_tile_0099.png new file mode 100644 index 0000000..278d1eb Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0099.png differ diff --git a/resources/images/tiles/micropolis_tile_0100.png b/resources/images/tiles/micropolis_tile_0100.png new file mode 100644 index 0000000..99b485b Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0100.png differ diff --git a/resources/images/tiles/micropolis_tile_0101.png b/resources/images/tiles/micropolis_tile_0101.png new file mode 100644 index 0000000..9171d8c Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0101.png differ diff --git a/resources/images/tiles/micropolis_tile_0102.png b/resources/images/tiles/micropolis_tile_0102.png new file mode 100644 index 0000000..3fb1084 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0102.png differ diff --git a/resources/images/tiles/micropolis_tile_0103.png b/resources/images/tiles/micropolis_tile_0103.png new file mode 100644 index 0000000..ac56f75 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0103.png differ diff --git a/resources/images/tiles/micropolis_tile_0104.png b/resources/images/tiles/micropolis_tile_0104.png new file mode 100644 index 0000000..20f54c4 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0104.png differ diff --git a/resources/images/tiles/micropolis_tile_0105.png b/resources/images/tiles/micropolis_tile_0105.png new file mode 100644 index 0000000..339b20c Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0105.png differ diff --git a/resources/images/tiles/micropolis_tile_0106.png b/resources/images/tiles/micropolis_tile_0106.png new file mode 100644 index 0000000..64e0b31 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0106.png differ diff --git a/resources/images/tiles/micropolis_tile_0107.png b/resources/images/tiles/micropolis_tile_0107.png new file mode 100644 index 0000000..e2163a6 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0107.png differ diff --git a/resources/images/tiles/micropolis_tile_0108.png b/resources/images/tiles/micropolis_tile_0108.png new file mode 100644 index 0000000..a5f958a Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0108.png differ diff --git a/resources/images/tiles/micropolis_tile_0109.png b/resources/images/tiles/micropolis_tile_0109.png new file mode 100644 index 0000000..5bf5e76 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0109.png differ diff --git a/resources/images/tiles/micropolis_tile_0110.png b/resources/images/tiles/micropolis_tile_0110.png new file mode 100644 index 0000000..34cec4d Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0110.png differ diff --git a/resources/images/tiles/micropolis_tile_0111.png b/resources/images/tiles/micropolis_tile_0111.png new file mode 100644 index 0000000..edea020 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0111.png differ diff --git a/resources/images/tiles/micropolis_tile_0112.png b/resources/images/tiles/micropolis_tile_0112.png new file mode 100644 index 0000000..265c74c Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0112.png differ diff --git a/resources/images/tiles/micropolis_tile_0113.png b/resources/images/tiles/micropolis_tile_0113.png new file mode 100644 index 0000000..ddc0d1a Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0113.png differ diff --git a/resources/images/tiles/micropolis_tile_0114.png b/resources/images/tiles/micropolis_tile_0114.png new file mode 100644 index 0000000..ba29d11 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0114.png differ diff --git a/resources/images/tiles/micropolis_tile_0115.png b/resources/images/tiles/micropolis_tile_0115.png new file mode 100644 index 0000000..e765fa3 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0115.png differ diff --git a/resources/images/tiles/micropolis_tile_0116.png b/resources/images/tiles/micropolis_tile_0116.png new file mode 100644 index 0000000..38a3065 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0116.png differ diff --git a/resources/images/tiles/micropolis_tile_0117.png b/resources/images/tiles/micropolis_tile_0117.png new file mode 100644 index 0000000..2931f6c Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0117.png differ diff --git a/resources/images/tiles/micropolis_tile_0118.png b/resources/images/tiles/micropolis_tile_0118.png new file mode 100644 index 0000000..3d2619b Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0118.png differ diff --git a/resources/images/tiles/micropolis_tile_0119.png b/resources/images/tiles/micropolis_tile_0119.png new file mode 100644 index 0000000..d2d4498 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0119.png differ diff --git a/resources/images/tiles/micropolis_tile_0120.png b/resources/images/tiles/micropolis_tile_0120.png new file mode 100644 index 0000000..43aeaff Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0120.png differ diff --git a/resources/images/tiles/micropolis_tile_0121.png b/resources/images/tiles/micropolis_tile_0121.png new file mode 100644 index 0000000..c7d38d9 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0121.png differ diff --git a/resources/images/tiles/micropolis_tile_0122.png b/resources/images/tiles/micropolis_tile_0122.png new file mode 100644 index 0000000..b29ba7d Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0122.png differ diff --git a/resources/images/tiles/micropolis_tile_0123.png b/resources/images/tiles/micropolis_tile_0123.png new file mode 100644 index 0000000..61bf9d9 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0123.png differ diff --git a/resources/images/tiles/micropolis_tile_0124.png b/resources/images/tiles/micropolis_tile_0124.png new file mode 100644 index 0000000..a7bd811 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0124.png differ diff --git a/resources/images/tiles/micropolis_tile_0125.png b/resources/images/tiles/micropolis_tile_0125.png new file mode 100644 index 0000000..5744504 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0125.png differ diff --git a/resources/images/tiles/micropolis_tile_0126.png b/resources/images/tiles/micropolis_tile_0126.png new file mode 100644 index 0000000..6938e82 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0126.png differ diff --git a/resources/images/tiles/micropolis_tile_0127.png b/resources/images/tiles/micropolis_tile_0127.png new file mode 100644 index 0000000..edea020 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0127.png differ diff --git a/resources/images/tiles/micropolis_tile_0128.png b/resources/images/tiles/micropolis_tile_0128.png new file mode 100644 index 0000000..692a92e Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0128.png differ diff --git a/resources/images/tiles/micropolis_tile_0129.png b/resources/images/tiles/micropolis_tile_0129.png new file mode 100644 index 0000000..a91dfc1 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0129.png differ diff --git a/resources/images/tiles/micropolis_tile_0130.png b/resources/images/tiles/micropolis_tile_0130.png new file mode 100644 index 0000000..d695a54 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0130.png differ diff --git a/resources/images/tiles/micropolis_tile_0131.png b/resources/images/tiles/micropolis_tile_0131.png new file mode 100644 index 0000000..da3536b Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0131.png differ diff --git a/resources/images/tiles/micropolis_tile_0132.png b/resources/images/tiles/micropolis_tile_0132.png new file mode 100644 index 0000000..83881cc Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0132.png differ diff --git a/resources/images/tiles/micropolis_tile_0133.png b/resources/images/tiles/micropolis_tile_0133.png new file mode 100644 index 0000000..1a7e16c Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0133.png differ diff --git a/resources/images/tiles/micropolis_tile_0134.png b/resources/images/tiles/micropolis_tile_0134.png new file mode 100644 index 0000000..8f85e39 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0134.png differ diff --git a/resources/images/tiles/micropolis_tile_0135.png b/resources/images/tiles/micropolis_tile_0135.png new file mode 100644 index 0000000..28e0b15 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0135.png differ diff --git a/resources/images/tiles/micropolis_tile_0136.png b/resources/images/tiles/micropolis_tile_0136.png new file mode 100644 index 0000000..7d1431a Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0136.png differ diff --git a/resources/images/tiles/micropolis_tile_0137.png b/resources/images/tiles/micropolis_tile_0137.png new file mode 100644 index 0000000..537d3ab Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0137.png differ diff --git a/resources/images/tiles/micropolis_tile_0138.png b/resources/images/tiles/micropolis_tile_0138.png new file mode 100644 index 0000000..27872d7 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0138.png differ diff --git a/resources/images/tiles/micropolis_tile_0139.png b/resources/images/tiles/micropolis_tile_0139.png new file mode 100644 index 0000000..783e5db Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0139.png differ diff --git a/resources/images/tiles/micropolis_tile_0140.png b/resources/images/tiles/micropolis_tile_0140.png new file mode 100644 index 0000000..e1e5b8c Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0140.png differ diff --git a/resources/images/tiles/micropolis_tile_0141.png b/resources/images/tiles/micropolis_tile_0141.png new file mode 100644 index 0000000..a76efa7 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0141.png differ diff --git a/resources/images/tiles/micropolis_tile_0142.png b/resources/images/tiles/micropolis_tile_0142.png new file mode 100644 index 0000000..10aae57 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0142.png differ diff --git a/resources/images/tiles/micropolis_tile_0143.png b/resources/images/tiles/micropolis_tile_0143.png new file mode 100644 index 0000000..edea020 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0143.png differ diff --git a/resources/images/tiles/micropolis_tile_0144.png b/resources/images/tiles/micropolis_tile_0144.png new file mode 100644 index 0000000..fc2c02b Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0144.png differ diff --git a/resources/images/tiles/micropolis_tile_0145.png b/resources/images/tiles/micropolis_tile_0145.png new file mode 100644 index 0000000..3670f5b Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0145.png differ diff --git a/resources/images/tiles/micropolis_tile_0146.png b/resources/images/tiles/micropolis_tile_0146.png new file mode 100644 index 0000000..5308b4d Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0146.png differ diff --git a/resources/images/tiles/micropolis_tile_0147.png b/resources/images/tiles/micropolis_tile_0147.png new file mode 100644 index 0000000..c5c0c57 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0147.png differ diff --git a/resources/images/tiles/micropolis_tile_0148.png b/resources/images/tiles/micropolis_tile_0148.png new file mode 100644 index 0000000..9d0a99c Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0148.png differ diff --git a/resources/images/tiles/micropolis_tile_0149.png b/resources/images/tiles/micropolis_tile_0149.png new file mode 100644 index 0000000..0a9cc7d Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0149.png differ diff --git a/resources/images/tiles/micropolis_tile_0150.png b/resources/images/tiles/micropolis_tile_0150.png new file mode 100644 index 0000000..f000fc4 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0150.png differ diff --git a/resources/images/tiles/micropolis_tile_0151.png b/resources/images/tiles/micropolis_tile_0151.png new file mode 100644 index 0000000..c798cf6 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0151.png differ diff --git a/resources/images/tiles/micropolis_tile_0152.png b/resources/images/tiles/micropolis_tile_0152.png new file mode 100644 index 0000000..6c6b2f3 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0152.png differ diff --git a/resources/images/tiles/micropolis_tile_0153.png b/resources/images/tiles/micropolis_tile_0153.png new file mode 100644 index 0000000..28ab3a1 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0153.png differ diff --git a/resources/images/tiles/micropolis_tile_0154.png b/resources/images/tiles/micropolis_tile_0154.png new file mode 100644 index 0000000..e720f92 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0154.png differ diff --git a/resources/images/tiles/micropolis_tile_0155.png b/resources/images/tiles/micropolis_tile_0155.png new file mode 100644 index 0000000..4f46e8a Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0155.png differ diff --git a/resources/images/tiles/micropolis_tile_0156.png b/resources/images/tiles/micropolis_tile_0156.png new file mode 100644 index 0000000..459f5a1 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0156.png differ diff --git a/resources/images/tiles/micropolis_tile_0157.png b/resources/images/tiles/micropolis_tile_0157.png new file mode 100644 index 0000000..458106a Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0157.png differ diff --git a/resources/images/tiles/micropolis_tile_0158.png b/resources/images/tiles/micropolis_tile_0158.png new file mode 100644 index 0000000..fd54d94 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0158.png differ diff --git a/resources/images/tiles/micropolis_tile_0159.png b/resources/images/tiles/micropolis_tile_0159.png new file mode 100644 index 0000000..edea020 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0159.png differ diff --git a/resources/images/tiles/micropolis_tile_0160.png b/resources/images/tiles/micropolis_tile_0160.png new file mode 100644 index 0000000..d95a126 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0160.png differ diff --git a/resources/images/tiles/micropolis_tile_0161.png b/resources/images/tiles/micropolis_tile_0161.png new file mode 100644 index 0000000..58c2d7a Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0161.png differ diff --git a/resources/images/tiles/micropolis_tile_0162.png b/resources/images/tiles/micropolis_tile_0162.png new file mode 100644 index 0000000..0ebe33c Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0162.png differ diff --git a/resources/images/tiles/micropolis_tile_0163.png b/resources/images/tiles/micropolis_tile_0163.png new file mode 100644 index 0000000..56ff9c2 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0163.png differ diff --git a/resources/images/tiles/micropolis_tile_0164.png b/resources/images/tiles/micropolis_tile_0164.png new file mode 100644 index 0000000..5664759 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0164.png differ diff --git a/resources/images/tiles/micropolis_tile_0165.png b/resources/images/tiles/micropolis_tile_0165.png new file mode 100644 index 0000000..1ae9635 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0165.png differ diff --git a/resources/images/tiles/micropolis_tile_0166.png b/resources/images/tiles/micropolis_tile_0166.png new file mode 100644 index 0000000..e0f390f Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0166.png differ diff --git a/resources/images/tiles/micropolis_tile_0167.png b/resources/images/tiles/micropolis_tile_0167.png new file mode 100644 index 0000000..61094fc Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0167.png differ diff --git a/resources/images/tiles/micropolis_tile_0168.png b/resources/images/tiles/micropolis_tile_0168.png new file mode 100644 index 0000000..41d267c Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0168.png differ diff --git a/resources/images/tiles/micropolis_tile_0169.png b/resources/images/tiles/micropolis_tile_0169.png new file mode 100644 index 0000000..d74bf3d Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0169.png differ diff --git a/resources/images/tiles/micropolis_tile_0170.png b/resources/images/tiles/micropolis_tile_0170.png new file mode 100644 index 0000000..7fe5c0d Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0170.png differ diff --git a/resources/images/tiles/micropolis_tile_0171.png b/resources/images/tiles/micropolis_tile_0171.png new file mode 100644 index 0000000..a2008aa Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0171.png differ diff --git a/resources/images/tiles/micropolis_tile_0172.png b/resources/images/tiles/micropolis_tile_0172.png new file mode 100644 index 0000000..85ef97c Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0172.png differ diff --git a/resources/images/tiles/micropolis_tile_0173.png b/resources/images/tiles/micropolis_tile_0173.png new file mode 100644 index 0000000..a5e38b9 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0173.png differ diff --git a/resources/images/tiles/micropolis_tile_0174.png b/resources/images/tiles/micropolis_tile_0174.png new file mode 100644 index 0000000..0a0d9a2 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0174.png differ diff --git a/resources/images/tiles/micropolis_tile_0175.png b/resources/images/tiles/micropolis_tile_0175.png new file mode 100644 index 0000000..edea020 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0175.png differ diff --git a/resources/images/tiles/micropolis_tile_0176.png b/resources/images/tiles/micropolis_tile_0176.png new file mode 100644 index 0000000..03d414a Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0176.png differ diff --git a/resources/images/tiles/micropolis_tile_0177.png b/resources/images/tiles/micropolis_tile_0177.png new file mode 100644 index 0000000..d0ee1ba Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0177.png differ diff --git a/resources/images/tiles/micropolis_tile_0178.png b/resources/images/tiles/micropolis_tile_0178.png new file mode 100644 index 0000000..75e34ce Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0178.png differ diff --git a/resources/images/tiles/micropolis_tile_0179.png b/resources/images/tiles/micropolis_tile_0179.png new file mode 100644 index 0000000..28f36e6 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0179.png differ diff --git a/resources/images/tiles/micropolis_tile_0180.png b/resources/images/tiles/micropolis_tile_0180.png new file mode 100644 index 0000000..856c82c Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0180.png differ diff --git a/resources/images/tiles/micropolis_tile_0181.png b/resources/images/tiles/micropolis_tile_0181.png new file mode 100644 index 0000000..937cf75 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0181.png differ diff --git a/resources/images/tiles/micropolis_tile_0182.png b/resources/images/tiles/micropolis_tile_0182.png new file mode 100644 index 0000000..b1d5c72 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0182.png differ diff --git a/resources/images/tiles/micropolis_tile_0183.png b/resources/images/tiles/micropolis_tile_0183.png new file mode 100644 index 0000000..4ba148b Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0183.png differ diff --git a/resources/images/tiles/micropolis_tile_0184.png b/resources/images/tiles/micropolis_tile_0184.png new file mode 100644 index 0000000..c6cca9c Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0184.png differ diff --git a/resources/images/tiles/micropolis_tile_0185.png b/resources/images/tiles/micropolis_tile_0185.png new file mode 100644 index 0000000..9fb1549 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0185.png differ diff --git a/resources/images/tiles/micropolis_tile_0186.png b/resources/images/tiles/micropolis_tile_0186.png new file mode 100644 index 0000000..fef45a9 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0186.png differ diff --git a/resources/images/tiles/micropolis_tile_0187.png b/resources/images/tiles/micropolis_tile_0187.png new file mode 100644 index 0000000..a150e48 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0187.png differ diff --git a/resources/images/tiles/micropolis_tile_0188.png b/resources/images/tiles/micropolis_tile_0188.png new file mode 100644 index 0000000..ed38390 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0188.png differ diff --git a/resources/images/tiles/micropolis_tile_0189.png b/resources/images/tiles/micropolis_tile_0189.png new file mode 100644 index 0000000..47f66d1 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0189.png differ diff --git a/resources/images/tiles/micropolis_tile_0190.png b/resources/images/tiles/micropolis_tile_0190.png new file mode 100644 index 0000000..19f1bec Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0190.png differ diff --git a/resources/images/tiles/micropolis_tile_0191.png b/resources/images/tiles/micropolis_tile_0191.png new file mode 100644 index 0000000..edea020 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0191.png differ diff --git a/resources/images/tiles/micropolis_tile_0192.png b/resources/images/tiles/micropolis_tile_0192.png new file mode 100644 index 0000000..1305f9d Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0192.png differ diff --git a/resources/images/tiles/micropolis_tile_0193.png b/resources/images/tiles/micropolis_tile_0193.png new file mode 100644 index 0000000..a1f7538 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0193.png differ diff --git a/resources/images/tiles/micropolis_tile_0194.png b/resources/images/tiles/micropolis_tile_0194.png new file mode 100644 index 0000000..7df8619 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0194.png differ diff --git a/resources/images/tiles/micropolis_tile_0195.png b/resources/images/tiles/micropolis_tile_0195.png new file mode 100644 index 0000000..cfaabef Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0195.png differ diff --git a/resources/images/tiles/micropolis_tile_0196.png b/resources/images/tiles/micropolis_tile_0196.png new file mode 100644 index 0000000..442d609 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0196.png differ diff --git a/resources/images/tiles/micropolis_tile_0197.png b/resources/images/tiles/micropolis_tile_0197.png new file mode 100644 index 0000000..fad6001 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0197.png differ diff --git a/resources/images/tiles/micropolis_tile_0198.png b/resources/images/tiles/micropolis_tile_0198.png new file mode 100644 index 0000000..f28d291 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0198.png differ diff --git a/resources/images/tiles/micropolis_tile_0199.png b/resources/images/tiles/micropolis_tile_0199.png new file mode 100644 index 0000000..c178365 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0199.png differ diff --git a/resources/images/tiles/micropolis_tile_0200.png b/resources/images/tiles/micropolis_tile_0200.png new file mode 100644 index 0000000..5494d15 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0200.png differ diff --git a/resources/images/tiles/micropolis_tile_0201.png b/resources/images/tiles/micropolis_tile_0201.png new file mode 100644 index 0000000..012cf2a Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0201.png differ diff --git a/resources/images/tiles/micropolis_tile_0202.png b/resources/images/tiles/micropolis_tile_0202.png new file mode 100644 index 0000000..cda3c78 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0202.png differ diff --git a/resources/images/tiles/micropolis_tile_0203.png b/resources/images/tiles/micropolis_tile_0203.png new file mode 100644 index 0000000..df53191 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0203.png differ diff --git a/resources/images/tiles/micropolis_tile_0204.png b/resources/images/tiles/micropolis_tile_0204.png new file mode 100644 index 0000000..897092a Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0204.png differ diff --git a/resources/images/tiles/micropolis_tile_0205.png b/resources/images/tiles/micropolis_tile_0205.png new file mode 100644 index 0000000..be92ac2 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0205.png differ diff --git a/resources/images/tiles/micropolis_tile_0206.png b/resources/images/tiles/micropolis_tile_0206.png new file mode 100644 index 0000000..f434c8a Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0206.png differ diff --git a/resources/images/tiles/micropolis_tile_0207.png b/resources/images/tiles/micropolis_tile_0207.png new file mode 100644 index 0000000..edea020 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0207.png differ diff --git a/resources/images/tiles/micropolis_tile_0208.png b/resources/images/tiles/micropolis_tile_0208.png new file mode 100644 index 0000000..4407590 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0208.png differ diff --git a/resources/images/tiles/micropolis_tile_0209.png b/resources/images/tiles/micropolis_tile_0209.png new file mode 100644 index 0000000..055bc6c Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0209.png differ diff --git a/resources/images/tiles/micropolis_tile_0210.png b/resources/images/tiles/micropolis_tile_0210.png new file mode 100644 index 0000000..ecba080 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0210.png differ diff --git a/resources/images/tiles/micropolis_tile_0211.png b/resources/images/tiles/micropolis_tile_0211.png new file mode 100644 index 0000000..9c4d62d Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0211.png differ diff --git a/resources/images/tiles/micropolis_tile_0212.png b/resources/images/tiles/micropolis_tile_0212.png new file mode 100644 index 0000000..1f35f88 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0212.png differ diff --git a/resources/images/tiles/micropolis_tile_0213.png b/resources/images/tiles/micropolis_tile_0213.png new file mode 100644 index 0000000..0bdf3c0 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0213.png differ diff --git a/resources/images/tiles/micropolis_tile_0214.png b/resources/images/tiles/micropolis_tile_0214.png new file mode 100644 index 0000000..052c442 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0214.png differ diff --git a/resources/images/tiles/micropolis_tile_0215.png b/resources/images/tiles/micropolis_tile_0215.png new file mode 100644 index 0000000..bf91f55 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0215.png differ diff --git a/resources/images/tiles/micropolis_tile_0216.png b/resources/images/tiles/micropolis_tile_0216.png new file mode 100644 index 0000000..dc32513 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0216.png differ diff --git a/resources/images/tiles/micropolis_tile_0217.png b/resources/images/tiles/micropolis_tile_0217.png new file mode 100644 index 0000000..0c6ecc2 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0217.png differ diff --git a/resources/images/tiles/micropolis_tile_0218.png b/resources/images/tiles/micropolis_tile_0218.png new file mode 100644 index 0000000..bcf487e Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0218.png differ diff --git a/resources/images/tiles/micropolis_tile_0219.png b/resources/images/tiles/micropolis_tile_0219.png new file mode 100644 index 0000000..df1a58f Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0219.png differ diff --git a/resources/images/tiles/micropolis_tile_0220.png b/resources/images/tiles/micropolis_tile_0220.png new file mode 100644 index 0000000..66816f9 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0220.png differ diff --git a/resources/images/tiles/micropolis_tile_0221.png b/resources/images/tiles/micropolis_tile_0221.png new file mode 100644 index 0000000..3db0045 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0221.png differ diff --git a/resources/images/tiles/micropolis_tile_0222.png b/resources/images/tiles/micropolis_tile_0222.png new file mode 100644 index 0000000..1186164 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0222.png differ diff --git a/resources/images/tiles/micropolis_tile_0223.png b/resources/images/tiles/micropolis_tile_0223.png new file mode 100644 index 0000000..d9d8a25 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0223.png differ diff --git a/resources/images/tiles/micropolis_tile_0224.png b/resources/images/tiles/micropolis_tile_0224.png new file mode 100644 index 0000000..66f56d9 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0224.png differ diff --git a/resources/images/tiles/micropolis_tile_0225.png b/resources/images/tiles/micropolis_tile_0225.png new file mode 100644 index 0000000..cdce7d6 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0225.png differ diff --git a/resources/images/tiles/micropolis_tile_0226.png b/resources/images/tiles/micropolis_tile_0226.png new file mode 100644 index 0000000..f12765e Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0226.png differ diff --git a/resources/images/tiles/micropolis_tile_0227.png b/resources/images/tiles/micropolis_tile_0227.png new file mode 100644 index 0000000..6914cd6 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0227.png differ diff --git a/resources/images/tiles/micropolis_tile_0228.png b/resources/images/tiles/micropolis_tile_0228.png new file mode 100644 index 0000000..a458e40 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0228.png differ diff --git a/resources/images/tiles/micropolis_tile_0229.png b/resources/images/tiles/micropolis_tile_0229.png new file mode 100644 index 0000000..8a0a120 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0229.png differ diff --git a/resources/images/tiles/micropolis_tile_0230.png b/resources/images/tiles/micropolis_tile_0230.png new file mode 100644 index 0000000..95aba51 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0230.png differ diff --git a/resources/images/tiles/micropolis_tile_0231.png b/resources/images/tiles/micropolis_tile_0231.png new file mode 100644 index 0000000..4287fdb Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0231.png differ diff --git a/resources/images/tiles/micropolis_tile_0232.png b/resources/images/tiles/micropolis_tile_0232.png new file mode 100644 index 0000000..ffa4ef5 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0232.png differ diff --git a/resources/images/tiles/micropolis_tile_0233.png b/resources/images/tiles/micropolis_tile_0233.png new file mode 100644 index 0000000..742259f Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0233.png differ diff --git a/resources/images/tiles/micropolis_tile_0234.png b/resources/images/tiles/micropolis_tile_0234.png new file mode 100644 index 0000000..73dc041 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0234.png differ diff --git a/resources/images/tiles/micropolis_tile_0235.png b/resources/images/tiles/micropolis_tile_0235.png new file mode 100644 index 0000000..160bda6 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0235.png differ diff --git a/resources/images/tiles/micropolis_tile_0236.png b/resources/images/tiles/micropolis_tile_0236.png new file mode 100644 index 0000000..8fe2399 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0236.png differ diff --git a/resources/images/tiles/micropolis_tile_0237.png b/resources/images/tiles/micropolis_tile_0237.png new file mode 100644 index 0000000..145d1b0 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0237.png differ diff --git a/resources/images/tiles/micropolis_tile_0238.png b/resources/images/tiles/micropolis_tile_0238.png new file mode 100644 index 0000000..5e9c1e2 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0238.png differ diff --git a/resources/images/tiles/micropolis_tile_0239.png b/resources/images/tiles/micropolis_tile_0239.png new file mode 100644 index 0000000..047683a Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0239.png differ diff --git a/resources/images/tiles/micropolis_tile_0240.png b/resources/images/tiles/micropolis_tile_0240.png new file mode 100644 index 0000000..9b2679c Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0240.png differ diff --git a/resources/images/tiles/micropolis_tile_0241.png b/resources/images/tiles/micropolis_tile_0241.png new file mode 100644 index 0000000..2067104 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0241.png differ diff --git a/resources/images/tiles/micropolis_tile_0242.png b/resources/images/tiles/micropolis_tile_0242.png new file mode 100644 index 0000000..2c227d8 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0242.png differ diff --git a/resources/images/tiles/micropolis_tile_0243.png b/resources/images/tiles/micropolis_tile_0243.png new file mode 100644 index 0000000..cf07c0c Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0243.png differ diff --git a/resources/images/tiles/micropolis_tile_0244.png b/resources/images/tiles/micropolis_tile_0244.png new file mode 100644 index 0000000..2aec50c Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0244.png differ diff --git a/resources/images/tiles/micropolis_tile_0245.png b/resources/images/tiles/micropolis_tile_0245.png new file mode 100644 index 0000000..e597b4b Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0245.png differ diff --git a/resources/images/tiles/micropolis_tile_0246.png b/resources/images/tiles/micropolis_tile_0246.png new file mode 100644 index 0000000..bb75b19 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0246.png differ diff --git a/resources/images/tiles/micropolis_tile_0247.png b/resources/images/tiles/micropolis_tile_0247.png new file mode 100644 index 0000000..e15f50a Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0247.png differ diff --git a/resources/images/tiles/micropolis_tile_0248.png b/resources/images/tiles/micropolis_tile_0248.png new file mode 100644 index 0000000..86b8556 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0248.png differ diff --git a/resources/images/tiles/micropolis_tile_0249.png b/resources/images/tiles/micropolis_tile_0249.png new file mode 100644 index 0000000..70abeea Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0249.png differ diff --git a/resources/images/tiles/micropolis_tile_0250.png b/resources/images/tiles/micropolis_tile_0250.png new file mode 100644 index 0000000..416ba9b Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0250.png differ diff --git a/resources/images/tiles/micropolis_tile_0251.png b/resources/images/tiles/micropolis_tile_0251.png new file mode 100644 index 0000000..cae5e99 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0251.png differ diff --git a/resources/images/tiles/micropolis_tile_0252.png b/resources/images/tiles/micropolis_tile_0252.png new file mode 100644 index 0000000..fad2891 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0252.png differ diff --git a/resources/images/tiles/micropolis_tile_0253.png b/resources/images/tiles/micropolis_tile_0253.png new file mode 100644 index 0000000..62d8adc Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0253.png differ diff --git a/resources/images/tiles/micropolis_tile_0254.png b/resources/images/tiles/micropolis_tile_0254.png new file mode 100644 index 0000000..177e948 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0254.png differ diff --git a/resources/images/tiles/micropolis_tile_0255.png b/resources/images/tiles/micropolis_tile_0255.png new file mode 100644 index 0000000..4b11c1e Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0255.png differ diff --git a/resources/images/tiles/micropolis_tile_0256.png b/resources/images/tiles/micropolis_tile_0256.png new file mode 100644 index 0000000..f3d6953 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0256.png differ diff --git a/resources/images/tiles/micropolis_tile_0257.png b/resources/images/tiles/micropolis_tile_0257.png new file mode 100644 index 0000000..c95b9ca Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0257.png differ diff --git a/resources/images/tiles/micropolis_tile_0258.png b/resources/images/tiles/micropolis_tile_0258.png new file mode 100644 index 0000000..5a8d458 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0258.png differ diff --git a/resources/images/tiles/micropolis_tile_0259.png b/resources/images/tiles/micropolis_tile_0259.png new file mode 100644 index 0000000..3094018 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0259.png differ diff --git a/resources/images/tiles/micropolis_tile_0260.png b/resources/images/tiles/micropolis_tile_0260.png new file mode 100644 index 0000000..c26cd2b Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0260.png differ diff --git a/resources/images/tiles/micropolis_tile_0261.png b/resources/images/tiles/micropolis_tile_0261.png new file mode 100644 index 0000000..eed8632 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0261.png differ diff --git a/resources/images/tiles/micropolis_tile_0262.png b/resources/images/tiles/micropolis_tile_0262.png new file mode 100644 index 0000000..084f98b Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0262.png differ diff --git a/resources/images/tiles/micropolis_tile_0263.png b/resources/images/tiles/micropolis_tile_0263.png new file mode 100644 index 0000000..710b074 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0263.png differ diff --git a/resources/images/tiles/micropolis_tile_0264.png b/resources/images/tiles/micropolis_tile_0264.png new file mode 100644 index 0000000..57b7c5b Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0264.png differ diff --git a/resources/images/tiles/micropolis_tile_0265.png b/resources/images/tiles/micropolis_tile_0265.png new file mode 100644 index 0000000..6ccf00d Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0265.png differ diff --git a/resources/images/tiles/micropolis_tile_0266.png b/resources/images/tiles/micropolis_tile_0266.png new file mode 100644 index 0000000..0dbd077 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0266.png differ diff --git a/resources/images/tiles/micropolis_tile_0267.png b/resources/images/tiles/micropolis_tile_0267.png new file mode 100644 index 0000000..8c50aa9 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0267.png differ diff --git a/resources/images/tiles/micropolis_tile_0268.png b/resources/images/tiles/micropolis_tile_0268.png new file mode 100644 index 0000000..ca7d001 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0268.png differ diff --git a/resources/images/tiles/micropolis_tile_0269.png b/resources/images/tiles/micropolis_tile_0269.png new file mode 100644 index 0000000..1e959c5 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0269.png differ diff --git a/resources/images/tiles/micropolis_tile_0270.png b/resources/images/tiles/micropolis_tile_0270.png new file mode 100644 index 0000000..6658a9d Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0270.png differ diff --git a/resources/images/tiles/micropolis_tile_0271.png b/resources/images/tiles/micropolis_tile_0271.png new file mode 100644 index 0000000..50527ff Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0271.png differ diff --git a/resources/images/tiles/micropolis_tile_0272.png b/resources/images/tiles/micropolis_tile_0272.png new file mode 100644 index 0000000..ad3889e Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0272.png differ diff --git a/resources/images/tiles/micropolis_tile_0273.png b/resources/images/tiles/micropolis_tile_0273.png new file mode 100644 index 0000000..ba774a0 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0273.png differ diff --git a/resources/images/tiles/micropolis_tile_0274.png b/resources/images/tiles/micropolis_tile_0274.png new file mode 100644 index 0000000..fa0305e Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0274.png differ diff --git a/resources/images/tiles/micropolis_tile_0275.png b/resources/images/tiles/micropolis_tile_0275.png new file mode 100644 index 0000000..02f9cb8 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0275.png differ diff --git a/resources/images/tiles/micropolis_tile_0276.png b/resources/images/tiles/micropolis_tile_0276.png new file mode 100644 index 0000000..8f17db8 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0276.png differ diff --git a/resources/images/tiles/micropolis_tile_0277.png b/resources/images/tiles/micropolis_tile_0277.png new file mode 100644 index 0000000..3ea6335 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0277.png differ diff --git a/resources/images/tiles/micropolis_tile_0278.png b/resources/images/tiles/micropolis_tile_0278.png new file mode 100644 index 0000000..dc639b5 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0278.png differ diff --git a/resources/images/tiles/micropolis_tile_0279.png b/resources/images/tiles/micropolis_tile_0279.png new file mode 100644 index 0000000..600929c Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0279.png differ diff --git a/resources/images/tiles/micropolis_tile_0280.png b/resources/images/tiles/micropolis_tile_0280.png new file mode 100644 index 0000000..f7a205e Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0280.png differ diff --git a/resources/images/tiles/micropolis_tile_0281.png b/resources/images/tiles/micropolis_tile_0281.png new file mode 100644 index 0000000..8c42ac2 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0281.png differ diff --git a/resources/images/tiles/micropolis_tile_0282.png b/resources/images/tiles/micropolis_tile_0282.png new file mode 100644 index 0000000..84a17f8 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0282.png differ diff --git a/resources/images/tiles/micropolis_tile_0283.png b/resources/images/tiles/micropolis_tile_0283.png new file mode 100644 index 0000000..9e364a6 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0283.png differ diff --git a/resources/images/tiles/micropolis_tile_0284.png b/resources/images/tiles/micropolis_tile_0284.png new file mode 100644 index 0000000..d38d11d Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0284.png differ diff --git a/resources/images/tiles/micropolis_tile_0285.png b/resources/images/tiles/micropolis_tile_0285.png new file mode 100644 index 0000000..f57b8bf Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0285.png differ diff --git a/resources/images/tiles/micropolis_tile_0286.png b/resources/images/tiles/micropolis_tile_0286.png new file mode 100644 index 0000000..7085eba Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0286.png differ diff --git a/resources/images/tiles/micropolis_tile_0287.png b/resources/images/tiles/micropolis_tile_0287.png new file mode 100644 index 0000000..93ee341 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0287.png differ diff --git a/resources/images/tiles/micropolis_tile_0288.png b/resources/images/tiles/micropolis_tile_0288.png new file mode 100644 index 0000000..a79f6b5 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0288.png differ diff --git a/resources/images/tiles/micropolis_tile_0289.png b/resources/images/tiles/micropolis_tile_0289.png new file mode 100644 index 0000000..7d4b058 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0289.png differ diff --git a/resources/images/tiles/micropolis_tile_0290.png b/resources/images/tiles/micropolis_tile_0290.png new file mode 100644 index 0000000..c4b2bc9 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0290.png differ diff --git a/resources/images/tiles/micropolis_tile_0291.png b/resources/images/tiles/micropolis_tile_0291.png new file mode 100644 index 0000000..78b02b8 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0291.png differ diff --git a/resources/images/tiles/micropolis_tile_0292.png b/resources/images/tiles/micropolis_tile_0292.png new file mode 100644 index 0000000..c601ab6 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0292.png differ diff --git a/resources/images/tiles/micropolis_tile_0293.png b/resources/images/tiles/micropolis_tile_0293.png new file mode 100644 index 0000000..e772bb3 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0293.png differ diff --git a/resources/images/tiles/micropolis_tile_0294.png b/resources/images/tiles/micropolis_tile_0294.png new file mode 100644 index 0000000..7f263a6 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0294.png differ diff --git a/resources/images/tiles/micropolis_tile_0295.png b/resources/images/tiles/micropolis_tile_0295.png new file mode 100644 index 0000000..6c56bf3 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0295.png differ diff --git a/resources/images/tiles/micropolis_tile_0296.png b/resources/images/tiles/micropolis_tile_0296.png new file mode 100644 index 0000000..56f3993 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0296.png differ diff --git a/resources/images/tiles/micropolis_tile_0297.png b/resources/images/tiles/micropolis_tile_0297.png new file mode 100644 index 0000000..8d77e14 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0297.png differ diff --git a/resources/images/tiles/micropolis_tile_0298.png b/resources/images/tiles/micropolis_tile_0298.png new file mode 100644 index 0000000..a8504b7 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0298.png differ diff --git a/resources/images/tiles/micropolis_tile_0299.png b/resources/images/tiles/micropolis_tile_0299.png new file mode 100644 index 0000000..0b63340 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0299.png differ diff --git a/resources/images/tiles/micropolis_tile_0300.png b/resources/images/tiles/micropolis_tile_0300.png new file mode 100644 index 0000000..83a9592 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0300.png differ diff --git a/resources/images/tiles/micropolis_tile_0301.png b/resources/images/tiles/micropolis_tile_0301.png new file mode 100644 index 0000000..72a13c0 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0301.png differ diff --git a/resources/images/tiles/micropolis_tile_0302.png b/resources/images/tiles/micropolis_tile_0302.png new file mode 100644 index 0000000..8a140ce Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0302.png differ diff --git a/resources/images/tiles/micropolis_tile_0303.png b/resources/images/tiles/micropolis_tile_0303.png new file mode 100644 index 0000000..76b2296 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0303.png differ diff --git a/resources/images/tiles/micropolis_tile_0304.png b/resources/images/tiles/micropolis_tile_0304.png new file mode 100644 index 0000000..a39cd9b Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0304.png differ diff --git a/resources/images/tiles/micropolis_tile_0305.png b/resources/images/tiles/micropolis_tile_0305.png new file mode 100644 index 0000000..41907b3 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0305.png differ diff --git a/resources/images/tiles/micropolis_tile_0306.png b/resources/images/tiles/micropolis_tile_0306.png new file mode 100644 index 0000000..0c8a591 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0306.png differ diff --git a/resources/images/tiles/micropolis_tile_0307.png b/resources/images/tiles/micropolis_tile_0307.png new file mode 100644 index 0000000..3543f3c Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0307.png differ diff --git a/resources/images/tiles/micropolis_tile_0308.png b/resources/images/tiles/micropolis_tile_0308.png new file mode 100644 index 0000000..bfe6570 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0308.png differ diff --git a/resources/images/tiles/micropolis_tile_0309.png b/resources/images/tiles/micropolis_tile_0309.png new file mode 100644 index 0000000..6dc9f75 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0309.png differ diff --git a/resources/images/tiles/micropolis_tile_0310.png b/resources/images/tiles/micropolis_tile_0310.png new file mode 100644 index 0000000..9d90060 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0310.png differ diff --git a/resources/images/tiles/micropolis_tile_0311.png b/resources/images/tiles/micropolis_tile_0311.png new file mode 100644 index 0000000..88bf7bd Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0311.png differ diff --git a/resources/images/tiles/micropolis_tile_0312.png b/resources/images/tiles/micropolis_tile_0312.png new file mode 100644 index 0000000..ce98b7d Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0312.png differ diff --git a/resources/images/tiles/micropolis_tile_0313.png b/resources/images/tiles/micropolis_tile_0313.png new file mode 100644 index 0000000..132fd17 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0313.png differ diff --git a/resources/images/tiles/micropolis_tile_0314.png b/resources/images/tiles/micropolis_tile_0314.png new file mode 100644 index 0000000..260486d Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0314.png differ diff --git a/resources/images/tiles/micropolis_tile_0315.png b/resources/images/tiles/micropolis_tile_0315.png new file mode 100644 index 0000000..2dfef8e Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0315.png differ diff --git a/resources/images/tiles/micropolis_tile_0316.png b/resources/images/tiles/micropolis_tile_0316.png new file mode 100644 index 0000000..a1c89ff Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0316.png differ diff --git a/resources/images/tiles/micropolis_tile_0317.png b/resources/images/tiles/micropolis_tile_0317.png new file mode 100644 index 0000000..466a6f7 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0317.png differ diff --git a/resources/images/tiles/micropolis_tile_0318.png b/resources/images/tiles/micropolis_tile_0318.png new file mode 100644 index 0000000..5abf476 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0318.png differ diff --git a/resources/images/tiles/micropolis_tile_0319.png b/resources/images/tiles/micropolis_tile_0319.png new file mode 100644 index 0000000..64dd1ae Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0319.png differ diff --git a/resources/images/tiles/micropolis_tile_0320.png b/resources/images/tiles/micropolis_tile_0320.png new file mode 100644 index 0000000..d5afd17 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0320.png differ diff --git a/resources/images/tiles/micropolis_tile_0321.png b/resources/images/tiles/micropolis_tile_0321.png new file mode 100644 index 0000000..1c9aefb Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0321.png differ diff --git a/resources/images/tiles/micropolis_tile_0322.png b/resources/images/tiles/micropolis_tile_0322.png new file mode 100644 index 0000000..eef471e Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0322.png differ diff --git a/resources/images/tiles/micropolis_tile_0323.png b/resources/images/tiles/micropolis_tile_0323.png new file mode 100644 index 0000000..1a0fdb3 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0323.png differ diff --git a/resources/images/tiles/micropolis_tile_0324.png b/resources/images/tiles/micropolis_tile_0324.png new file mode 100644 index 0000000..fe4dc06 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0324.png differ diff --git a/resources/images/tiles/micropolis_tile_0325.png b/resources/images/tiles/micropolis_tile_0325.png new file mode 100644 index 0000000..dda6342 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0325.png differ diff --git a/resources/images/tiles/micropolis_tile_0326.png b/resources/images/tiles/micropolis_tile_0326.png new file mode 100644 index 0000000..b66cc7d Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0326.png differ diff --git a/resources/images/tiles/micropolis_tile_0327.png b/resources/images/tiles/micropolis_tile_0327.png new file mode 100644 index 0000000..0d3281d Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0327.png differ diff --git a/resources/images/tiles/micropolis_tile_0328.png b/resources/images/tiles/micropolis_tile_0328.png new file mode 100644 index 0000000..b3fab48 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0328.png differ diff --git a/resources/images/tiles/micropolis_tile_0329.png b/resources/images/tiles/micropolis_tile_0329.png new file mode 100644 index 0000000..4c3825e Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0329.png differ diff --git a/resources/images/tiles/micropolis_tile_0330.png b/resources/images/tiles/micropolis_tile_0330.png new file mode 100644 index 0000000..3d4b482 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0330.png differ diff --git a/resources/images/tiles/micropolis_tile_0331.png b/resources/images/tiles/micropolis_tile_0331.png new file mode 100644 index 0000000..cc0bccd Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0331.png differ diff --git a/resources/images/tiles/micropolis_tile_0332.png b/resources/images/tiles/micropolis_tile_0332.png new file mode 100644 index 0000000..7f54938 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0332.png differ diff --git a/resources/images/tiles/micropolis_tile_0333.png b/resources/images/tiles/micropolis_tile_0333.png new file mode 100644 index 0000000..ca0593f Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0333.png differ diff --git a/resources/images/tiles/micropolis_tile_0334.png b/resources/images/tiles/micropolis_tile_0334.png new file mode 100644 index 0000000..cbb0d91 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0334.png differ diff --git a/resources/images/tiles/micropolis_tile_0335.png b/resources/images/tiles/micropolis_tile_0335.png new file mode 100644 index 0000000..bae4c0e Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0335.png differ diff --git a/resources/images/tiles/micropolis_tile_0336.png b/resources/images/tiles/micropolis_tile_0336.png new file mode 100644 index 0000000..b25f798 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0336.png differ diff --git a/resources/images/tiles/micropolis_tile_0337.png b/resources/images/tiles/micropolis_tile_0337.png new file mode 100644 index 0000000..1c24f49 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0337.png differ diff --git a/resources/images/tiles/micropolis_tile_0338.png b/resources/images/tiles/micropolis_tile_0338.png new file mode 100644 index 0000000..6b44579 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0338.png differ diff --git a/resources/images/tiles/micropolis_tile_0339.png b/resources/images/tiles/micropolis_tile_0339.png new file mode 100644 index 0000000..1603660 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0339.png differ diff --git a/resources/images/tiles/micropolis_tile_0340.png b/resources/images/tiles/micropolis_tile_0340.png new file mode 100644 index 0000000..cbecf57 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0340.png differ diff --git a/resources/images/tiles/micropolis_tile_0341.png b/resources/images/tiles/micropolis_tile_0341.png new file mode 100644 index 0000000..57854f6 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0341.png differ diff --git a/resources/images/tiles/micropolis_tile_0342.png b/resources/images/tiles/micropolis_tile_0342.png new file mode 100644 index 0000000..7df858c Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0342.png differ diff --git a/resources/images/tiles/micropolis_tile_0343.png b/resources/images/tiles/micropolis_tile_0343.png new file mode 100644 index 0000000..c3f9bf5 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0343.png differ diff --git a/resources/images/tiles/micropolis_tile_0344.png b/resources/images/tiles/micropolis_tile_0344.png new file mode 100644 index 0000000..4ee489d Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0344.png differ diff --git a/resources/images/tiles/micropolis_tile_0345.png b/resources/images/tiles/micropolis_tile_0345.png new file mode 100644 index 0000000..1eccd4d Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0345.png differ diff --git a/resources/images/tiles/micropolis_tile_0346.png b/resources/images/tiles/micropolis_tile_0346.png new file mode 100644 index 0000000..ed43a8c Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0346.png differ diff --git a/resources/images/tiles/micropolis_tile_0347.png b/resources/images/tiles/micropolis_tile_0347.png new file mode 100644 index 0000000..9889513 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0347.png differ diff --git a/resources/images/tiles/micropolis_tile_0348.png b/resources/images/tiles/micropolis_tile_0348.png new file mode 100644 index 0000000..fc4b23c Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0348.png differ diff --git a/resources/images/tiles/micropolis_tile_0349.png b/resources/images/tiles/micropolis_tile_0349.png new file mode 100644 index 0000000..cd80a3b Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0349.png differ diff --git a/resources/images/tiles/micropolis_tile_0350.png b/resources/images/tiles/micropolis_tile_0350.png new file mode 100644 index 0000000..0bf6189 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0350.png differ diff --git a/resources/images/tiles/micropolis_tile_0351.png b/resources/images/tiles/micropolis_tile_0351.png new file mode 100644 index 0000000..3586f05 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0351.png differ diff --git a/resources/images/tiles/micropolis_tile_0352.png b/resources/images/tiles/micropolis_tile_0352.png new file mode 100644 index 0000000..c1335ae Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0352.png differ diff --git a/resources/images/tiles/micropolis_tile_0353.png b/resources/images/tiles/micropolis_tile_0353.png new file mode 100644 index 0000000..1703a68 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0353.png differ diff --git a/resources/images/tiles/micropolis_tile_0354.png b/resources/images/tiles/micropolis_tile_0354.png new file mode 100644 index 0000000..3e3508d Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0354.png differ diff --git a/resources/images/tiles/micropolis_tile_0355.png b/resources/images/tiles/micropolis_tile_0355.png new file mode 100644 index 0000000..d197924 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0355.png differ diff --git a/resources/images/tiles/micropolis_tile_0356.png b/resources/images/tiles/micropolis_tile_0356.png new file mode 100644 index 0000000..7b84d07 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0356.png differ diff --git a/resources/images/tiles/micropolis_tile_0357.png b/resources/images/tiles/micropolis_tile_0357.png new file mode 100644 index 0000000..46dde76 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0357.png differ diff --git a/resources/images/tiles/micropolis_tile_0358.png b/resources/images/tiles/micropolis_tile_0358.png new file mode 100644 index 0000000..0ac1869 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0358.png differ diff --git a/resources/images/tiles/micropolis_tile_0359.png b/resources/images/tiles/micropolis_tile_0359.png new file mode 100644 index 0000000..0317868 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0359.png differ diff --git a/resources/images/tiles/micropolis_tile_0360.png b/resources/images/tiles/micropolis_tile_0360.png new file mode 100644 index 0000000..453059f Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0360.png differ diff --git a/resources/images/tiles/micropolis_tile_0361.png b/resources/images/tiles/micropolis_tile_0361.png new file mode 100644 index 0000000..451d5dc Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0361.png differ diff --git a/resources/images/tiles/micropolis_tile_0362.png b/resources/images/tiles/micropolis_tile_0362.png new file mode 100644 index 0000000..33b6bd0 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0362.png differ diff --git a/resources/images/tiles/micropolis_tile_0363.png b/resources/images/tiles/micropolis_tile_0363.png new file mode 100644 index 0000000..7c49cb0 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0363.png differ diff --git a/resources/images/tiles/micropolis_tile_0364.png b/resources/images/tiles/micropolis_tile_0364.png new file mode 100644 index 0000000..430309b Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0364.png differ diff --git a/resources/images/tiles/micropolis_tile_0365.png b/resources/images/tiles/micropolis_tile_0365.png new file mode 100644 index 0000000..9500291 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0365.png differ diff --git a/resources/images/tiles/micropolis_tile_0366.png b/resources/images/tiles/micropolis_tile_0366.png new file mode 100644 index 0000000..a16de88 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0366.png differ diff --git a/resources/images/tiles/micropolis_tile_0367.png b/resources/images/tiles/micropolis_tile_0367.png new file mode 100644 index 0000000..52ebf31 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0367.png differ diff --git a/resources/images/tiles/micropolis_tile_0368.png b/resources/images/tiles/micropolis_tile_0368.png new file mode 100644 index 0000000..004a6a2 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0368.png differ diff --git a/resources/images/tiles/micropolis_tile_0369.png b/resources/images/tiles/micropolis_tile_0369.png new file mode 100644 index 0000000..09cf3ae Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0369.png differ diff --git a/resources/images/tiles/micropolis_tile_0370.png b/resources/images/tiles/micropolis_tile_0370.png new file mode 100644 index 0000000..fc19e24 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0370.png differ diff --git a/resources/images/tiles/micropolis_tile_0371.png b/resources/images/tiles/micropolis_tile_0371.png new file mode 100644 index 0000000..b28279b Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0371.png differ diff --git a/resources/images/tiles/micropolis_tile_0372.png b/resources/images/tiles/micropolis_tile_0372.png new file mode 100644 index 0000000..de5adee Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0372.png differ diff --git a/resources/images/tiles/micropolis_tile_0373.png b/resources/images/tiles/micropolis_tile_0373.png new file mode 100644 index 0000000..5ae5ea8 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0373.png differ diff --git a/resources/images/tiles/micropolis_tile_0374.png b/resources/images/tiles/micropolis_tile_0374.png new file mode 100644 index 0000000..7a779c5 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0374.png differ diff --git a/resources/images/tiles/micropolis_tile_0375.png b/resources/images/tiles/micropolis_tile_0375.png new file mode 100644 index 0000000..1379012 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0375.png differ diff --git a/resources/images/tiles/micropolis_tile_0376.png b/resources/images/tiles/micropolis_tile_0376.png new file mode 100644 index 0000000..742a774 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0376.png differ diff --git a/resources/images/tiles/micropolis_tile_0377.png b/resources/images/tiles/micropolis_tile_0377.png new file mode 100644 index 0000000..0fd8348 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0377.png differ diff --git a/resources/images/tiles/micropolis_tile_0378.png b/resources/images/tiles/micropolis_tile_0378.png new file mode 100644 index 0000000..4762468 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0378.png differ diff --git a/resources/images/tiles/micropolis_tile_0379.png b/resources/images/tiles/micropolis_tile_0379.png new file mode 100644 index 0000000..d264644 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0379.png differ diff --git a/resources/images/tiles/micropolis_tile_0380.png b/resources/images/tiles/micropolis_tile_0380.png new file mode 100644 index 0000000..eab32d2 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0380.png differ diff --git a/resources/images/tiles/micropolis_tile_0381.png b/resources/images/tiles/micropolis_tile_0381.png new file mode 100644 index 0000000..3fb6f3f Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0381.png differ diff --git a/resources/images/tiles/micropolis_tile_0382.png b/resources/images/tiles/micropolis_tile_0382.png new file mode 100644 index 0000000..52c97b1 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0382.png differ diff --git a/resources/images/tiles/micropolis_tile_0383.png b/resources/images/tiles/micropolis_tile_0383.png new file mode 100644 index 0000000..2b2c734 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0383.png differ diff --git a/resources/images/tiles/micropolis_tile_0384.png b/resources/images/tiles/micropolis_tile_0384.png new file mode 100644 index 0000000..751cf72 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0384.png differ diff --git a/resources/images/tiles/micropolis_tile_0385.png b/resources/images/tiles/micropolis_tile_0385.png new file mode 100644 index 0000000..8b9bb2c Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0385.png differ diff --git a/resources/images/tiles/micropolis_tile_0386.png b/resources/images/tiles/micropolis_tile_0386.png new file mode 100644 index 0000000..5e21baa Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0386.png differ diff --git a/resources/images/tiles/micropolis_tile_0387.png b/resources/images/tiles/micropolis_tile_0387.png new file mode 100644 index 0000000..b94ea2f Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0387.png differ diff --git a/resources/images/tiles/micropolis_tile_0388.png b/resources/images/tiles/micropolis_tile_0388.png new file mode 100644 index 0000000..6e461ca Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0388.png differ diff --git a/resources/images/tiles/micropolis_tile_0389.png b/resources/images/tiles/micropolis_tile_0389.png new file mode 100644 index 0000000..0e50dd2 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0389.png differ diff --git a/resources/images/tiles/micropolis_tile_0390.png b/resources/images/tiles/micropolis_tile_0390.png new file mode 100644 index 0000000..23a507d Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0390.png differ diff --git a/resources/images/tiles/micropolis_tile_0391.png b/resources/images/tiles/micropolis_tile_0391.png new file mode 100644 index 0000000..a0bf9f0 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0391.png differ diff --git a/resources/images/tiles/micropolis_tile_0392.png b/resources/images/tiles/micropolis_tile_0392.png new file mode 100644 index 0000000..7fc44cd Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0392.png differ diff --git a/resources/images/tiles/micropolis_tile_0393.png b/resources/images/tiles/micropolis_tile_0393.png new file mode 100644 index 0000000..908ada9 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0393.png differ diff --git a/resources/images/tiles/micropolis_tile_0394.png b/resources/images/tiles/micropolis_tile_0394.png new file mode 100644 index 0000000..41f71c4 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0394.png differ diff --git a/resources/images/tiles/micropolis_tile_0395.png b/resources/images/tiles/micropolis_tile_0395.png new file mode 100644 index 0000000..080318d Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0395.png differ diff --git a/resources/images/tiles/micropolis_tile_0396.png b/resources/images/tiles/micropolis_tile_0396.png new file mode 100644 index 0000000..e219970 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0396.png differ diff --git a/resources/images/tiles/micropolis_tile_0397.png b/resources/images/tiles/micropolis_tile_0397.png new file mode 100644 index 0000000..38e3dc5 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0397.png differ diff --git a/resources/images/tiles/micropolis_tile_0398.png b/resources/images/tiles/micropolis_tile_0398.png new file mode 100644 index 0000000..ef89867 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0398.png differ diff --git a/resources/images/tiles/micropolis_tile_0399.png b/resources/images/tiles/micropolis_tile_0399.png new file mode 100644 index 0000000..c418543 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0399.png differ diff --git a/resources/images/tiles/micropolis_tile_0400.png b/resources/images/tiles/micropolis_tile_0400.png new file mode 100644 index 0000000..8ec46fa Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0400.png differ diff --git a/resources/images/tiles/micropolis_tile_0401.png b/resources/images/tiles/micropolis_tile_0401.png new file mode 100644 index 0000000..97c22fb Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0401.png differ diff --git a/resources/images/tiles/micropolis_tile_0402.png b/resources/images/tiles/micropolis_tile_0402.png new file mode 100644 index 0000000..fff2ec3 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0402.png differ diff --git a/resources/images/tiles/micropolis_tile_0403.png b/resources/images/tiles/micropolis_tile_0403.png new file mode 100644 index 0000000..ba71f66 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0403.png differ diff --git a/resources/images/tiles/micropolis_tile_0404.png b/resources/images/tiles/micropolis_tile_0404.png new file mode 100644 index 0000000..65a611b Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0404.png differ diff --git a/resources/images/tiles/micropolis_tile_0405.png b/resources/images/tiles/micropolis_tile_0405.png new file mode 100644 index 0000000..1864dd0 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0405.png differ diff --git a/resources/images/tiles/micropolis_tile_0406.png b/resources/images/tiles/micropolis_tile_0406.png new file mode 100644 index 0000000..48b863f Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0406.png differ diff --git a/resources/images/tiles/micropolis_tile_0407.png b/resources/images/tiles/micropolis_tile_0407.png new file mode 100644 index 0000000..e317714 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0407.png differ diff --git a/resources/images/tiles/micropolis_tile_0408.png b/resources/images/tiles/micropolis_tile_0408.png new file mode 100644 index 0000000..a914c1e Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0408.png differ diff --git a/resources/images/tiles/micropolis_tile_0409.png b/resources/images/tiles/micropolis_tile_0409.png new file mode 100644 index 0000000..50bfd61 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0409.png differ diff --git a/resources/images/tiles/micropolis_tile_0410.png b/resources/images/tiles/micropolis_tile_0410.png new file mode 100644 index 0000000..a7e4932 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0410.png differ diff --git a/resources/images/tiles/micropolis_tile_0411.png b/resources/images/tiles/micropolis_tile_0411.png new file mode 100644 index 0000000..5fdb978 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0411.png differ diff --git a/resources/images/tiles/micropolis_tile_0412.png b/resources/images/tiles/micropolis_tile_0412.png new file mode 100644 index 0000000..03ff576 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0412.png differ diff --git a/resources/images/tiles/micropolis_tile_0413.png b/resources/images/tiles/micropolis_tile_0413.png new file mode 100644 index 0000000..b25a72d Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0413.png differ diff --git a/resources/images/tiles/micropolis_tile_0414.png b/resources/images/tiles/micropolis_tile_0414.png new file mode 100644 index 0000000..fb31dad Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0414.png differ diff --git a/resources/images/tiles/micropolis_tile_0415.png b/resources/images/tiles/micropolis_tile_0415.png new file mode 100644 index 0000000..a4e8466 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0415.png differ diff --git a/resources/images/tiles/micropolis_tile_0416.png b/resources/images/tiles/micropolis_tile_0416.png new file mode 100644 index 0000000..4581a0a Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0416.png differ diff --git a/resources/images/tiles/micropolis_tile_0417.png b/resources/images/tiles/micropolis_tile_0417.png new file mode 100644 index 0000000..a0841a6 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0417.png differ diff --git a/resources/images/tiles/micropolis_tile_0418.png b/resources/images/tiles/micropolis_tile_0418.png new file mode 100644 index 0000000..d31f52b Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0418.png differ diff --git a/resources/images/tiles/micropolis_tile_0419.png b/resources/images/tiles/micropolis_tile_0419.png new file mode 100644 index 0000000..32b7b2b Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0419.png differ diff --git a/resources/images/tiles/micropolis_tile_0420.png b/resources/images/tiles/micropolis_tile_0420.png new file mode 100644 index 0000000..1a1766e Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0420.png differ diff --git a/resources/images/tiles/micropolis_tile_0421.png b/resources/images/tiles/micropolis_tile_0421.png new file mode 100644 index 0000000..e1acd68 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0421.png differ diff --git a/resources/images/tiles/micropolis_tile_0422.png b/resources/images/tiles/micropolis_tile_0422.png new file mode 100644 index 0000000..4a4e6ba Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0422.png differ diff --git a/resources/images/tiles/micropolis_tile_0423.png b/resources/images/tiles/micropolis_tile_0423.png new file mode 100644 index 0000000..e5888dc Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0423.png differ diff --git a/resources/images/tiles/micropolis_tile_0424.png b/resources/images/tiles/micropolis_tile_0424.png new file mode 100644 index 0000000..d75c5cd Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0424.png differ diff --git a/resources/images/tiles/micropolis_tile_0425.png b/resources/images/tiles/micropolis_tile_0425.png new file mode 100644 index 0000000..f9142c3 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0425.png differ diff --git a/resources/images/tiles/micropolis_tile_0426.png b/resources/images/tiles/micropolis_tile_0426.png new file mode 100644 index 0000000..f2d6f61 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0426.png differ diff --git a/resources/images/tiles/micropolis_tile_0427.png b/resources/images/tiles/micropolis_tile_0427.png new file mode 100644 index 0000000..ec9c768 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0427.png differ diff --git a/resources/images/tiles/micropolis_tile_0428.png b/resources/images/tiles/micropolis_tile_0428.png new file mode 100644 index 0000000..8c04f2c Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0428.png differ diff --git a/resources/images/tiles/micropolis_tile_0429.png b/resources/images/tiles/micropolis_tile_0429.png new file mode 100644 index 0000000..f813942 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0429.png differ diff --git a/resources/images/tiles/micropolis_tile_0430.png b/resources/images/tiles/micropolis_tile_0430.png new file mode 100644 index 0000000..39769c4 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0430.png differ diff --git a/resources/images/tiles/micropolis_tile_0431.png b/resources/images/tiles/micropolis_tile_0431.png new file mode 100644 index 0000000..e8f5422 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0431.png differ diff --git a/resources/images/tiles/micropolis_tile_0432.png b/resources/images/tiles/micropolis_tile_0432.png new file mode 100644 index 0000000..986a9c3 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0432.png differ diff --git a/resources/images/tiles/micropolis_tile_0433.png b/resources/images/tiles/micropolis_tile_0433.png new file mode 100644 index 0000000..534a2ce Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0433.png differ diff --git a/resources/images/tiles/micropolis_tile_0434.png b/resources/images/tiles/micropolis_tile_0434.png new file mode 100644 index 0000000..a78ba0d Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0434.png differ diff --git a/resources/images/tiles/micropolis_tile_0435.png b/resources/images/tiles/micropolis_tile_0435.png new file mode 100644 index 0000000..7949da0 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0435.png differ diff --git a/resources/images/tiles/micropolis_tile_0436.png b/resources/images/tiles/micropolis_tile_0436.png new file mode 100644 index 0000000..3102196 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0436.png differ diff --git a/resources/images/tiles/micropolis_tile_0437.png b/resources/images/tiles/micropolis_tile_0437.png new file mode 100644 index 0000000..7ebf2ae Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0437.png differ diff --git a/resources/images/tiles/micropolis_tile_0438.png b/resources/images/tiles/micropolis_tile_0438.png new file mode 100644 index 0000000..16f427a Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0438.png differ diff --git a/resources/images/tiles/micropolis_tile_0439.png b/resources/images/tiles/micropolis_tile_0439.png new file mode 100644 index 0000000..1c54abf Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0439.png differ diff --git a/resources/images/tiles/micropolis_tile_0440.png b/resources/images/tiles/micropolis_tile_0440.png new file mode 100644 index 0000000..7fb4e9a Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0440.png differ diff --git a/resources/images/tiles/micropolis_tile_0441.png b/resources/images/tiles/micropolis_tile_0441.png new file mode 100644 index 0000000..fdc7d1e Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0441.png differ diff --git a/resources/images/tiles/micropolis_tile_0442.png b/resources/images/tiles/micropolis_tile_0442.png new file mode 100644 index 0000000..b253105 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0442.png differ diff --git a/resources/images/tiles/micropolis_tile_0443.png b/resources/images/tiles/micropolis_tile_0443.png new file mode 100644 index 0000000..5b73a45 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0443.png differ diff --git a/resources/images/tiles/micropolis_tile_0444.png b/resources/images/tiles/micropolis_tile_0444.png new file mode 100644 index 0000000..09c51f1 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0444.png differ diff --git a/resources/images/tiles/micropolis_tile_0445.png b/resources/images/tiles/micropolis_tile_0445.png new file mode 100644 index 0000000..edb5f23 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0445.png differ diff --git a/resources/images/tiles/micropolis_tile_0446.png b/resources/images/tiles/micropolis_tile_0446.png new file mode 100644 index 0000000..cc818a2 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0446.png differ diff --git a/resources/images/tiles/micropolis_tile_0447.png b/resources/images/tiles/micropolis_tile_0447.png new file mode 100644 index 0000000..b59f6d3 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0447.png differ diff --git a/resources/images/tiles/micropolis_tile_0448.png b/resources/images/tiles/micropolis_tile_0448.png new file mode 100644 index 0000000..ddaaf40 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0448.png differ diff --git a/resources/images/tiles/micropolis_tile_0449.png b/resources/images/tiles/micropolis_tile_0449.png new file mode 100644 index 0000000..68237d6 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0449.png differ diff --git a/resources/images/tiles/micropolis_tile_0450.png b/resources/images/tiles/micropolis_tile_0450.png new file mode 100644 index 0000000..76e1ea0 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0450.png differ diff --git a/resources/images/tiles/micropolis_tile_0451.png b/resources/images/tiles/micropolis_tile_0451.png new file mode 100644 index 0000000..1d41699 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0451.png differ diff --git a/resources/images/tiles/micropolis_tile_0452.png b/resources/images/tiles/micropolis_tile_0452.png new file mode 100644 index 0000000..61711de Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0452.png differ diff --git a/resources/images/tiles/micropolis_tile_0453.png b/resources/images/tiles/micropolis_tile_0453.png new file mode 100644 index 0000000..f9ea74c Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0453.png differ diff --git a/resources/images/tiles/micropolis_tile_0454.png b/resources/images/tiles/micropolis_tile_0454.png new file mode 100644 index 0000000..f29f3fc Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0454.png differ diff --git a/resources/images/tiles/micropolis_tile_0455.png b/resources/images/tiles/micropolis_tile_0455.png new file mode 100644 index 0000000..13e62fb Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0455.png differ diff --git a/resources/images/tiles/micropolis_tile_0456.png b/resources/images/tiles/micropolis_tile_0456.png new file mode 100644 index 0000000..1c8c6b8 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0456.png differ diff --git a/resources/images/tiles/micropolis_tile_0457.png b/resources/images/tiles/micropolis_tile_0457.png new file mode 100644 index 0000000..e41a36b Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0457.png differ diff --git a/resources/images/tiles/micropolis_tile_0458.png b/resources/images/tiles/micropolis_tile_0458.png new file mode 100644 index 0000000..5ba8713 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0458.png differ diff --git a/resources/images/tiles/micropolis_tile_0459.png b/resources/images/tiles/micropolis_tile_0459.png new file mode 100644 index 0000000..b6f9296 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0459.png differ diff --git a/resources/images/tiles/micropolis_tile_0460.png b/resources/images/tiles/micropolis_tile_0460.png new file mode 100644 index 0000000..cab3874 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0460.png differ diff --git a/resources/images/tiles/micropolis_tile_0461.png b/resources/images/tiles/micropolis_tile_0461.png new file mode 100644 index 0000000..55d884c Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0461.png differ diff --git a/resources/images/tiles/micropolis_tile_0462.png b/resources/images/tiles/micropolis_tile_0462.png new file mode 100644 index 0000000..8dd8de2 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0462.png differ diff --git a/resources/images/tiles/micropolis_tile_0463.png b/resources/images/tiles/micropolis_tile_0463.png new file mode 100644 index 0000000..ddb21ef Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0463.png differ diff --git a/resources/images/tiles/micropolis_tile_0464.png b/resources/images/tiles/micropolis_tile_0464.png new file mode 100644 index 0000000..ab98a7c Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0464.png differ diff --git a/resources/images/tiles/micropolis_tile_0465.png b/resources/images/tiles/micropolis_tile_0465.png new file mode 100644 index 0000000..a4bd768 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0465.png differ diff --git a/resources/images/tiles/micropolis_tile_0466.png b/resources/images/tiles/micropolis_tile_0466.png new file mode 100644 index 0000000..ae172ce Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0466.png differ diff --git a/resources/images/tiles/micropolis_tile_0467.png b/resources/images/tiles/micropolis_tile_0467.png new file mode 100644 index 0000000..c5d3556 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0467.png differ diff --git a/resources/images/tiles/micropolis_tile_0468.png b/resources/images/tiles/micropolis_tile_0468.png new file mode 100644 index 0000000..adc62f6 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0468.png differ diff --git a/resources/images/tiles/micropolis_tile_0469.png b/resources/images/tiles/micropolis_tile_0469.png new file mode 100644 index 0000000..73a19c3 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0469.png differ diff --git a/resources/images/tiles/micropolis_tile_0470.png b/resources/images/tiles/micropolis_tile_0470.png new file mode 100644 index 0000000..89cf424 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0470.png differ diff --git a/resources/images/tiles/micropolis_tile_0471.png b/resources/images/tiles/micropolis_tile_0471.png new file mode 100644 index 0000000..0b8d380 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0471.png differ diff --git a/resources/images/tiles/micropolis_tile_0472.png b/resources/images/tiles/micropolis_tile_0472.png new file mode 100644 index 0000000..e960505 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0472.png differ diff --git a/resources/images/tiles/micropolis_tile_0473.png b/resources/images/tiles/micropolis_tile_0473.png new file mode 100644 index 0000000..9154506 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0473.png differ diff --git a/resources/images/tiles/micropolis_tile_0474.png b/resources/images/tiles/micropolis_tile_0474.png new file mode 100644 index 0000000..083680f Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0474.png differ diff --git a/resources/images/tiles/micropolis_tile_0475.png b/resources/images/tiles/micropolis_tile_0475.png new file mode 100644 index 0000000..f1487e3 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0475.png differ diff --git a/resources/images/tiles/micropolis_tile_0476.png b/resources/images/tiles/micropolis_tile_0476.png new file mode 100644 index 0000000..fbc7876 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0476.png differ diff --git a/resources/images/tiles/micropolis_tile_0477.png b/resources/images/tiles/micropolis_tile_0477.png new file mode 100644 index 0000000..57cd7c0 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0477.png differ diff --git a/resources/images/tiles/micropolis_tile_0478.png b/resources/images/tiles/micropolis_tile_0478.png new file mode 100644 index 0000000..044bd1f Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0478.png differ diff --git a/resources/images/tiles/micropolis_tile_0479.png b/resources/images/tiles/micropolis_tile_0479.png new file mode 100644 index 0000000..339b2b4 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0479.png differ diff --git a/resources/images/tiles/micropolis_tile_0480.png b/resources/images/tiles/micropolis_tile_0480.png new file mode 100644 index 0000000..a0eb77c Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0480.png differ diff --git a/resources/images/tiles/micropolis_tile_0481.png b/resources/images/tiles/micropolis_tile_0481.png new file mode 100644 index 0000000..d334585 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0481.png differ diff --git a/resources/images/tiles/micropolis_tile_0482.png b/resources/images/tiles/micropolis_tile_0482.png new file mode 100644 index 0000000..0384cef Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0482.png differ diff --git a/resources/images/tiles/micropolis_tile_0483.png b/resources/images/tiles/micropolis_tile_0483.png new file mode 100644 index 0000000..89e0fd3 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0483.png differ diff --git a/resources/images/tiles/micropolis_tile_0484.png b/resources/images/tiles/micropolis_tile_0484.png new file mode 100644 index 0000000..a12d60b Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0484.png differ diff --git a/resources/images/tiles/micropolis_tile_0485.png b/resources/images/tiles/micropolis_tile_0485.png new file mode 100644 index 0000000..a8ebe40 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0485.png differ diff --git a/resources/images/tiles/micropolis_tile_0486.png b/resources/images/tiles/micropolis_tile_0486.png new file mode 100644 index 0000000..d3bbc9a Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0486.png differ diff --git a/resources/images/tiles/micropolis_tile_0487.png b/resources/images/tiles/micropolis_tile_0487.png new file mode 100644 index 0000000..14bc22c Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0487.png differ diff --git a/resources/images/tiles/micropolis_tile_0488.png b/resources/images/tiles/micropolis_tile_0488.png new file mode 100644 index 0000000..1144c29 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0488.png differ diff --git a/resources/images/tiles/micropolis_tile_0489.png b/resources/images/tiles/micropolis_tile_0489.png new file mode 100644 index 0000000..bfe47c9 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0489.png differ diff --git a/resources/images/tiles/micropolis_tile_0490.png b/resources/images/tiles/micropolis_tile_0490.png new file mode 100644 index 0000000..46c3129 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0490.png differ diff --git a/resources/images/tiles/micropolis_tile_0491.png b/resources/images/tiles/micropolis_tile_0491.png new file mode 100644 index 0000000..df9bd2c Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0491.png differ diff --git a/resources/images/tiles/micropolis_tile_0492.png b/resources/images/tiles/micropolis_tile_0492.png new file mode 100644 index 0000000..b0e65b8 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0492.png differ diff --git a/resources/images/tiles/micropolis_tile_0493.png b/resources/images/tiles/micropolis_tile_0493.png new file mode 100644 index 0000000..4ced7ac Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0493.png differ diff --git a/resources/images/tiles/micropolis_tile_0494.png b/resources/images/tiles/micropolis_tile_0494.png new file mode 100644 index 0000000..e24f9bb Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0494.png differ diff --git a/resources/images/tiles/micropolis_tile_0495.png b/resources/images/tiles/micropolis_tile_0495.png new file mode 100644 index 0000000..f0b7ae8 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0495.png differ diff --git a/resources/images/tiles/micropolis_tile_0496.png b/resources/images/tiles/micropolis_tile_0496.png new file mode 100644 index 0000000..d3d84ed Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0496.png differ diff --git a/resources/images/tiles/micropolis_tile_0497.png b/resources/images/tiles/micropolis_tile_0497.png new file mode 100644 index 0000000..b3b8234 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0497.png differ diff --git a/resources/images/tiles/micropolis_tile_0498.png b/resources/images/tiles/micropolis_tile_0498.png new file mode 100644 index 0000000..969913b Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0498.png differ diff --git a/resources/images/tiles/micropolis_tile_0499.png b/resources/images/tiles/micropolis_tile_0499.png new file mode 100644 index 0000000..f510c73 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0499.png differ diff --git a/resources/images/tiles/micropolis_tile_0500.png b/resources/images/tiles/micropolis_tile_0500.png new file mode 100644 index 0000000..0320943 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0500.png differ diff --git a/resources/images/tiles/micropolis_tile_0501.png b/resources/images/tiles/micropolis_tile_0501.png new file mode 100644 index 0000000..698f935 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0501.png differ diff --git a/resources/images/tiles/micropolis_tile_0502.png b/resources/images/tiles/micropolis_tile_0502.png new file mode 100644 index 0000000..1acf2ca Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0502.png differ diff --git a/resources/images/tiles/micropolis_tile_0503.png b/resources/images/tiles/micropolis_tile_0503.png new file mode 100644 index 0000000..897240d Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0503.png differ diff --git a/resources/images/tiles/micropolis_tile_0504.png b/resources/images/tiles/micropolis_tile_0504.png new file mode 100644 index 0000000..bd392a9 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0504.png differ diff --git a/resources/images/tiles/micropolis_tile_0505.png b/resources/images/tiles/micropolis_tile_0505.png new file mode 100644 index 0000000..42c9a87 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0505.png differ diff --git a/resources/images/tiles/micropolis_tile_0506.png b/resources/images/tiles/micropolis_tile_0506.png new file mode 100644 index 0000000..2339988 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0506.png differ diff --git a/resources/images/tiles/micropolis_tile_0507.png b/resources/images/tiles/micropolis_tile_0507.png new file mode 100644 index 0000000..efbe140 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0507.png differ diff --git a/resources/images/tiles/micropolis_tile_0508.png b/resources/images/tiles/micropolis_tile_0508.png new file mode 100644 index 0000000..c7934f1 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0508.png differ diff --git a/resources/images/tiles/micropolis_tile_0509.png b/resources/images/tiles/micropolis_tile_0509.png new file mode 100644 index 0000000..4f17d08 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0509.png differ diff --git a/resources/images/tiles/micropolis_tile_0510.png b/resources/images/tiles/micropolis_tile_0510.png new file mode 100644 index 0000000..cd3ab39 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0510.png differ diff --git a/resources/images/tiles/micropolis_tile_0511.png b/resources/images/tiles/micropolis_tile_0511.png new file mode 100644 index 0000000..b3867e9 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0511.png differ diff --git a/resources/images/tiles/micropolis_tile_0512.png b/resources/images/tiles/micropolis_tile_0512.png new file mode 100644 index 0000000..271bef3 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0512.png differ diff --git a/resources/images/tiles/micropolis_tile_0513.png b/resources/images/tiles/micropolis_tile_0513.png new file mode 100644 index 0000000..0856b69 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0513.png differ diff --git a/resources/images/tiles/micropolis_tile_0514.png b/resources/images/tiles/micropolis_tile_0514.png new file mode 100644 index 0000000..183fd34 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0514.png differ diff --git a/resources/images/tiles/micropolis_tile_0515.png b/resources/images/tiles/micropolis_tile_0515.png new file mode 100644 index 0000000..3e03ad8 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0515.png differ diff --git a/resources/images/tiles/micropolis_tile_0516.png b/resources/images/tiles/micropolis_tile_0516.png new file mode 100644 index 0000000..51f164c Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0516.png differ diff --git a/resources/images/tiles/micropolis_tile_0517.png b/resources/images/tiles/micropolis_tile_0517.png new file mode 100644 index 0000000..3a9bfb5 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0517.png differ diff --git a/resources/images/tiles/micropolis_tile_0518.png b/resources/images/tiles/micropolis_tile_0518.png new file mode 100644 index 0000000..73648e9 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0518.png differ diff --git a/resources/images/tiles/micropolis_tile_0519.png b/resources/images/tiles/micropolis_tile_0519.png new file mode 100644 index 0000000..de225b7 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0519.png differ diff --git a/resources/images/tiles/micropolis_tile_0520.png b/resources/images/tiles/micropolis_tile_0520.png new file mode 100644 index 0000000..684694a Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0520.png differ diff --git a/resources/images/tiles/micropolis_tile_0521.png b/resources/images/tiles/micropolis_tile_0521.png new file mode 100644 index 0000000..f6915e7 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0521.png differ diff --git a/resources/images/tiles/micropolis_tile_0522.png b/resources/images/tiles/micropolis_tile_0522.png new file mode 100644 index 0000000..084d4f3 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0522.png differ diff --git a/resources/images/tiles/micropolis_tile_0523.png b/resources/images/tiles/micropolis_tile_0523.png new file mode 100644 index 0000000..0c13ad7 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0523.png differ diff --git a/resources/images/tiles/micropolis_tile_0524.png b/resources/images/tiles/micropolis_tile_0524.png new file mode 100644 index 0000000..5fe878e Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0524.png differ diff --git a/resources/images/tiles/micropolis_tile_0525.png b/resources/images/tiles/micropolis_tile_0525.png new file mode 100644 index 0000000..6604b7b Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0525.png differ diff --git a/resources/images/tiles/micropolis_tile_0526.png b/resources/images/tiles/micropolis_tile_0526.png new file mode 100644 index 0000000..07888b6 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0526.png differ diff --git a/resources/images/tiles/micropolis_tile_0527.png b/resources/images/tiles/micropolis_tile_0527.png new file mode 100644 index 0000000..f62b980 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0527.png differ diff --git a/resources/images/tiles/micropolis_tile_0528.png b/resources/images/tiles/micropolis_tile_0528.png new file mode 100644 index 0000000..3247e45 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0528.png differ diff --git a/resources/images/tiles/micropolis_tile_0529.png b/resources/images/tiles/micropolis_tile_0529.png new file mode 100644 index 0000000..e015b78 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0529.png differ diff --git a/resources/images/tiles/micropolis_tile_0530.png b/resources/images/tiles/micropolis_tile_0530.png new file mode 100644 index 0000000..94147e1 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0530.png differ diff --git a/resources/images/tiles/micropolis_tile_0531.png b/resources/images/tiles/micropolis_tile_0531.png new file mode 100644 index 0000000..e9df8db Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0531.png differ diff --git a/resources/images/tiles/micropolis_tile_0532.png b/resources/images/tiles/micropolis_tile_0532.png new file mode 100644 index 0000000..752742a Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0532.png differ diff --git a/resources/images/tiles/micropolis_tile_0533.png b/resources/images/tiles/micropolis_tile_0533.png new file mode 100644 index 0000000..7536aa2 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0533.png differ diff --git a/resources/images/tiles/micropolis_tile_0534.png b/resources/images/tiles/micropolis_tile_0534.png new file mode 100644 index 0000000..49bccdb Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0534.png differ diff --git a/resources/images/tiles/micropolis_tile_0535.png b/resources/images/tiles/micropolis_tile_0535.png new file mode 100644 index 0000000..ae68fe0 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0535.png differ diff --git a/resources/images/tiles/micropolis_tile_0536.png b/resources/images/tiles/micropolis_tile_0536.png new file mode 100644 index 0000000..2ea4841 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0536.png differ diff --git a/resources/images/tiles/micropolis_tile_0537.png b/resources/images/tiles/micropolis_tile_0537.png new file mode 100644 index 0000000..cd20a9f Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0537.png differ diff --git a/resources/images/tiles/micropolis_tile_0538.png b/resources/images/tiles/micropolis_tile_0538.png new file mode 100644 index 0000000..29e0da8 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0538.png differ diff --git a/resources/images/tiles/micropolis_tile_0539.png b/resources/images/tiles/micropolis_tile_0539.png new file mode 100644 index 0000000..2032dfd Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0539.png differ diff --git a/resources/images/tiles/micropolis_tile_0540.png b/resources/images/tiles/micropolis_tile_0540.png new file mode 100644 index 0000000..d23ce23 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0540.png differ diff --git a/resources/images/tiles/micropolis_tile_0541.png b/resources/images/tiles/micropolis_tile_0541.png new file mode 100644 index 0000000..6321d98 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0541.png differ diff --git a/resources/images/tiles/micropolis_tile_0542.png b/resources/images/tiles/micropolis_tile_0542.png new file mode 100644 index 0000000..584381c Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0542.png differ diff --git a/resources/images/tiles/micropolis_tile_0543.png b/resources/images/tiles/micropolis_tile_0543.png new file mode 100644 index 0000000..5603d5c Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0543.png differ diff --git a/resources/images/tiles/micropolis_tile_0544.png b/resources/images/tiles/micropolis_tile_0544.png new file mode 100644 index 0000000..f705e52 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0544.png differ diff --git a/resources/images/tiles/micropolis_tile_0545.png b/resources/images/tiles/micropolis_tile_0545.png new file mode 100644 index 0000000..b01c619 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0545.png differ diff --git a/resources/images/tiles/micropolis_tile_0546.png b/resources/images/tiles/micropolis_tile_0546.png new file mode 100644 index 0000000..4ce4e95 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0546.png differ diff --git a/resources/images/tiles/micropolis_tile_0547.png b/resources/images/tiles/micropolis_tile_0547.png new file mode 100644 index 0000000..e3bb19d Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0547.png differ diff --git a/resources/images/tiles/micropolis_tile_0548.png b/resources/images/tiles/micropolis_tile_0548.png new file mode 100644 index 0000000..ce158a8 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0548.png differ diff --git a/resources/images/tiles/micropolis_tile_0549.png b/resources/images/tiles/micropolis_tile_0549.png new file mode 100644 index 0000000..cd71791 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0549.png differ diff --git a/resources/images/tiles/micropolis_tile_0550.png b/resources/images/tiles/micropolis_tile_0550.png new file mode 100644 index 0000000..545fcfb Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0550.png differ diff --git a/resources/images/tiles/micropolis_tile_0551.png b/resources/images/tiles/micropolis_tile_0551.png new file mode 100644 index 0000000..0f0f056 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0551.png differ diff --git a/resources/images/tiles/micropolis_tile_0552.png b/resources/images/tiles/micropolis_tile_0552.png new file mode 100644 index 0000000..687edfb Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0552.png differ diff --git a/resources/images/tiles/micropolis_tile_0553.png b/resources/images/tiles/micropolis_tile_0553.png new file mode 100644 index 0000000..3a968e7 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0553.png differ diff --git a/resources/images/tiles/micropolis_tile_0554.png b/resources/images/tiles/micropolis_tile_0554.png new file mode 100644 index 0000000..f87061b Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0554.png differ diff --git a/resources/images/tiles/micropolis_tile_0555.png b/resources/images/tiles/micropolis_tile_0555.png new file mode 100644 index 0000000..8088cc7 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0555.png differ diff --git a/resources/images/tiles/micropolis_tile_0556.png b/resources/images/tiles/micropolis_tile_0556.png new file mode 100644 index 0000000..fd99b90 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0556.png differ diff --git a/resources/images/tiles/micropolis_tile_0557.png b/resources/images/tiles/micropolis_tile_0557.png new file mode 100644 index 0000000..23a6cdb Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0557.png differ diff --git a/resources/images/tiles/micropolis_tile_0558.png b/resources/images/tiles/micropolis_tile_0558.png new file mode 100644 index 0000000..eae1cee Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0558.png differ diff --git a/resources/images/tiles/micropolis_tile_0559.png b/resources/images/tiles/micropolis_tile_0559.png new file mode 100644 index 0000000..fbdc564 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0559.png differ diff --git a/resources/images/tiles/micropolis_tile_0560.png b/resources/images/tiles/micropolis_tile_0560.png new file mode 100644 index 0000000..674a701 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0560.png differ diff --git a/resources/images/tiles/micropolis_tile_0561.png b/resources/images/tiles/micropolis_tile_0561.png new file mode 100644 index 0000000..4b57c92 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0561.png differ diff --git a/resources/images/tiles/micropolis_tile_0562.png b/resources/images/tiles/micropolis_tile_0562.png new file mode 100644 index 0000000..d8f3bb6 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0562.png differ diff --git a/resources/images/tiles/micropolis_tile_0563.png b/resources/images/tiles/micropolis_tile_0563.png new file mode 100644 index 0000000..7d0f66c Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0563.png differ diff --git a/resources/images/tiles/micropolis_tile_0564.png b/resources/images/tiles/micropolis_tile_0564.png new file mode 100644 index 0000000..6872b0b Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0564.png differ diff --git a/resources/images/tiles/micropolis_tile_0565.png b/resources/images/tiles/micropolis_tile_0565.png new file mode 100644 index 0000000..7e63c1d Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0565.png differ diff --git a/resources/images/tiles/micropolis_tile_0566.png b/resources/images/tiles/micropolis_tile_0566.png new file mode 100644 index 0000000..f752be2 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0566.png differ diff --git a/resources/images/tiles/micropolis_tile_0567.png b/resources/images/tiles/micropolis_tile_0567.png new file mode 100644 index 0000000..6e02e46 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0567.png differ diff --git a/resources/images/tiles/micropolis_tile_0568.png b/resources/images/tiles/micropolis_tile_0568.png new file mode 100644 index 0000000..95f5d36 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0568.png differ diff --git a/resources/images/tiles/micropolis_tile_0569.png b/resources/images/tiles/micropolis_tile_0569.png new file mode 100644 index 0000000..5996d78 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0569.png differ diff --git a/resources/images/tiles/micropolis_tile_0570.png b/resources/images/tiles/micropolis_tile_0570.png new file mode 100644 index 0000000..1d3987f Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0570.png differ diff --git a/resources/images/tiles/micropolis_tile_0571.png b/resources/images/tiles/micropolis_tile_0571.png new file mode 100644 index 0000000..68d96c4 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0571.png differ diff --git a/resources/images/tiles/micropolis_tile_0572.png b/resources/images/tiles/micropolis_tile_0572.png new file mode 100644 index 0000000..5c87b94 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0572.png differ diff --git a/resources/images/tiles/micropolis_tile_0573.png b/resources/images/tiles/micropolis_tile_0573.png new file mode 100644 index 0000000..8be73de Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0573.png differ diff --git a/resources/images/tiles/micropolis_tile_0574.png b/resources/images/tiles/micropolis_tile_0574.png new file mode 100644 index 0000000..c8c0842 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0574.png differ diff --git a/resources/images/tiles/micropolis_tile_0575.png b/resources/images/tiles/micropolis_tile_0575.png new file mode 100644 index 0000000..daff212 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0575.png differ diff --git a/resources/images/tiles/micropolis_tile_0576.png b/resources/images/tiles/micropolis_tile_0576.png new file mode 100644 index 0000000..c2d471b Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0576.png differ diff --git a/resources/images/tiles/micropolis_tile_0577.png b/resources/images/tiles/micropolis_tile_0577.png new file mode 100644 index 0000000..2d7738e Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0577.png differ diff --git a/resources/images/tiles/micropolis_tile_0578.png b/resources/images/tiles/micropolis_tile_0578.png new file mode 100644 index 0000000..7258714 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0578.png differ diff --git a/resources/images/tiles/micropolis_tile_0579.png b/resources/images/tiles/micropolis_tile_0579.png new file mode 100644 index 0000000..83dcf9f Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0579.png differ diff --git a/resources/images/tiles/micropolis_tile_0580.png b/resources/images/tiles/micropolis_tile_0580.png new file mode 100644 index 0000000..730f7ef Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0580.png differ diff --git a/resources/images/tiles/micropolis_tile_0581.png b/resources/images/tiles/micropolis_tile_0581.png new file mode 100644 index 0000000..fd87507 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0581.png differ diff --git a/resources/images/tiles/micropolis_tile_0582.png b/resources/images/tiles/micropolis_tile_0582.png new file mode 100644 index 0000000..9435ed2 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0582.png differ diff --git a/resources/images/tiles/micropolis_tile_0583.png b/resources/images/tiles/micropolis_tile_0583.png new file mode 100644 index 0000000..7d408fc Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0583.png differ diff --git a/resources/images/tiles/micropolis_tile_0584.png b/resources/images/tiles/micropolis_tile_0584.png new file mode 100644 index 0000000..6f17e0a Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0584.png differ diff --git a/resources/images/tiles/micropolis_tile_0585.png b/resources/images/tiles/micropolis_tile_0585.png new file mode 100644 index 0000000..03698e8 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0585.png differ diff --git a/resources/images/tiles/micropolis_tile_0586.png b/resources/images/tiles/micropolis_tile_0586.png new file mode 100644 index 0000000..e31c9ef Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0586.png differ diff --git a/resources/images/tiles/micropolis_tile_0587.png b/resources/images/tiles/micropolis_tile_0587.png new file mode 100644 index 0000000..19e14b7 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0587.png differ diff --git a/resources/images/tiles/micropolis_tile_0588.png b/resources/images/tiles/micropolis_tile_0588.png new file mode 100644 index 0000000..c953edb Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0588.png differ diff --git a/resources/images/tiles/micropolis_tile_0589.png b/resources/images/tiles/micropolis_tile_0589.png new file mode 100644 index 0000000..60d8105 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0589.png differ diff --git a/resources/images/tiles/micropolis_tile_0590.png b/resources/images/tiles/micropolis_tile_0590.png new file mode 100644 index 0000000..c9b9401 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0590.png differ diff --git a/resources/images/tiles/micropolis_tile_0591.png b/resources/images/tiles/micropolis_tile_0591.png new file mode 100644 index 0000000..4a7b127 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0591.png differ diff --git a/resources/images/tiles/micropolis_tile_0592.png b/resources/images/tiles/micropolis_tile_0592.png new file mode 100644 index 0000000..a44a100 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0592.png differ diff --git a/resources/images/tiles/micropolis_tile_0593.png b/resources/images/tiles/micropolis_tile_0593.png new file mode 100644 index 0000000..e7aff26 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0593.png differ diff --git a/resources/images/tiles/micropolis_tile_0594.png b/resources/images/tiles/micropolis_tile_0594.png new file mode 100644 index 0000000..d5f920a Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0594.png differ diff --git a/resources/images/tiles/micropolis_tile_0595.png b/resources/images/tiles/micropolis_tile_0595.png new file mode 100644 index 0000000..f95c8a2 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0595.png differ diff --git a/resources/images/tiles/micropolis_tile_0596.png b/resources/images/tiles/micropolis_tile_0596.png new file mode 100644 index 0000000..6fe963f Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0596.png differ diff --git a/resources/images/tiles/micropolis_tile_0597.png b/resources/images/tiles/micropolis_tile_0597.png new file mode 100644 index 0000000..59e4383 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0597.png differ diff --git a/resources/images/tiles/micropolis_tile_0598.png b/resources/images/tiles/micropolis_tile_0598.png new file mode 100644 index 0000000..610b448 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0598.png differ diff --git a/resources/images/tiles/micropolis_tile_0599.png b/resources/images/tiles/micropolis_tile_0599.png new file mode 100644 index 0000000..4de92da Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0599.png differ diff --git a/resources/images/tiles/micropolis_tile_0600.png b/resources/images/tiles/micropolis_tile_0600.png new file mode 100644 index 0000000..e6ea06f Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0600.png differ diff --git a/resources/images/tiles/micropolis_tile_0601.png b/resources/images/tiles/micropolis_tile_0601.png new file mode 100644 index 0000000..e936daf Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0601.png differ diff --git a/resources/images/tiles/micropolis_tile_0602.png b/resources/images/tiles/micropolis_tile_0602.png new file mode 100644 index 0000000..280fcd8 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0602.png differ diff --git a/resources/images/tiles/micropolis_tile_0603.png b/resources/images/tiles/micropolis_tile_0603.png new file mode 100644 index 0000000..422e495 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0603.png differ diff --git a/resources/images/tiles/micropolis_tile_0604.png b/resources/images/tiles/micropolis_tile_0604.png new file mode 100644 index 0000000..ca5104d Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0604.png differ diff --git a/resources/images/tiles/micropolis_tile_0605.png b/resources/images/tiles/micropolis_tile_0605.png new file mode 100644 index 0000000..89ef7c4 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0605.png differ diff --git a/resources/images/tiles/micropolis_tile_0606.png b/resources/images/tiles/micropolis_tile_0606.png new file mode 100644 index 0000000..3c233a2 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0606.png differ diff --git a/resources/images/tiles/micropolis_tile_0607.png b/resources/images/tiles/micropolis_tile_0607.png new file mode 100644 index 0000000..ccaac84 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0607.png differ diff --git a/resources/images/tiles/micropolis_tile_0608.png b/resources/images/tiles/micropolis_tile_0608.png new file mode 100644 index 0000000..caf6164 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0608.png differ diff --git a/resources/images/tiles/micropolis_tile_0609.png b/resources/images/tiles/micropolis_tile_0609.png new file mode 100644 index 0000000..6d9ef84 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0609.png differ diff --git a/resources/images/tiles/micropolis_tile_0610.png b/resources/images/tiles/micropolis_tile_0610.png new file mode 100644 index 0000000..1d779c5 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0610.png differ diff --git a/resources/images/tiles/micropolis_tile_0611.png b/resources/images/tiles/micropolis_tile_0611.png new file mode 100644 index 0000000..dad6acf Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0611.png differ diff --git a/resources/images/tiles/micropolis_tile_0612.png b/resources/images/tiles/micropolis_tile_0612.png new file mode 100644 index 0000000..3a69b0b Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0612.png differ diff --git a/resources/images/tiles/micropolis_tile_0613.png b/resources/images/tiles/micropolis_tile_0613.png new file mode 100644 index 0000000..1c4d255 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0613.png differ diff --git a/resources/images/tiles/micropolis_tile_0614.png b/resources/images/tiles/micropolis_tile_0614.png new file mode 100644 index 0000000..d0b7be3 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0614.png differ diff --git a/resources/images/tiles/micropolis_tile_0615.png b/resources/images/tiles/micropolis_tile_0615.png new file mode 100644 index 0000000..3d12c8b Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0615.png differ diff --git a/resources/images/tiles/micropolis_tile_0616.png b/resources/images/tiles/micropolis_tile_0616.png new file mode 100644 index 0000000..c9d1357 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0616.png differ diff --git a/resources/images/tiles/micropolis_tile_0617.png b/resources/images/tiles/micropolis_tile_0617.png new file mode 100644 index 0000000..4477c61 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0617.png differ diff --git a/resources/images/tiles/micropolis_tile_0618.png b/resources/images/tiles/micropolis_tile_0618.png new file mode 100644 index 0000000..ffd94ba Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0618.png differ diff --git a/resources/images/tiles/micropolis_tile_0619.png b/resources/images/tiles/micropolis_tile_0619.png new file mode 100644 index 0000000..1abe837 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0619.png differ diff --git a/resources/images/tiles/micropolis_tile_0620.png b/resources/images/tiles/micropolis_tile_0620.png new file mode 100644 index 0000000..1fdeeb5 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0620.png differ diff --git a/resources/images/tiles/micropolis_tile_0621.png b/resources/images/tiles/micropolis_tile_0621.png new file mode 100644 index 0000000..f128eee Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0621.png differ diff --git a/resources/images/tiles/micropolis_tile_0622.png b/resources/images/tiles/micropolis_tile_0622.png new file mode 100644 index 0000000..39ffdb4 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0622.png differ diff --git a/resources/images/tiles/micropolis_tile_0623.png b/resources/images/tiles/micropolis_tile_0623.png new file mode 100644 index 0000000..81820f1 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0623.png differ diff --git a/resources/images/tiles/micropolis_tile_0624.png b/resources/images/tiles/micropolis_tile_0624.png new file mode 100644 index 0000000..e4d06b9 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0624.png differ diff --git a/resources/images/tiles/micropolis_tile_0625.png b/resources/images/tiles/micropolis_tile_0625.png new file mode 100644 index 0000000..cedb7c5 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0625.png differ diff --git a/resources/images/tiles/micropolis_tile_0626.png b/resources/images/tiles/micropolis_tile_0626.png new file mode 100644 index 0000000..51f1765 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0626.png differ diff --git a/resources/images/tiles/micropolis_tile_0627.png b/resources/images/tiles/micropolis_tile_0627.png new file mode 100644 index 0000000..22d6fdb Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0627.png differ diff --git a/resources/images/tiles/micropolis_tile_0628.png b/resources/images/tiles/micropolis_tile_0628.png new file mode 100644 index 0000000..b35c5e5 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0628.png differ diff --git a/resources/images/tiles/micropolis_tile_0629.png b/resources/images/tiles/micropolis_tile_0629.png new file mode 100644 index 0000000..de2e37b Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0629.png differ diff --git a/resources/images/tiles/micropolis_tile_0630.png b/resources/images/tiles/micropolis_tile_0630.png new file mode 100644 index 0000000..0bf776e Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0630.png differ diff --git a/resources/images/tiles/micropolis_tile_0631.png b/resources/images/tiles/micropolis_tile_0631.png new file mode 100644 index 0000000..d1c7742 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0631.png differ diff --git a/resources/images/tiles/micropolis_tile_0632.png b/resources/images/tiles/micropolis_tile_0632.png new file mode 100644 index 0000000..bf643a8 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0632.png differ diff --git a/resources/images/tiles/micropolis_tile_0633.png b/resources/images/tiles/micropolis_tile_0633.png new file mode 100644 index 0000000..f78f47f Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0633.png differ diff --git a/resources/images/tiles/micropolis_tile_0634.png b/resources/images/tiles/micropolis_tile_0634.png new file mode 100644 index 0000000..6b2c2b9 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0634.png differ diff --git a/resources/images/tiles/micropolis_tile_0635.png b/resources/images/tiles/micropolis_tile_0635.png new file mode 100644 index 0000000..2a69061 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0635.png differ diff --git a/resources/images/tiles/micropolis_tile_0636.png b/resources/images/tiles/micropolis_tile_0636.png new file mode 100644 index 0000000..50e01c0 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0636.png differ diff --git a/resources/images/tiles/micropolis_tile_0637.png b/resources/images/tiles/micropolis_tile_0637.png new file mode 100644 index 0000000..2b3c528 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0637.png differ diff --git a/resources/images/tiles/micropolis_tile_0638.png b/resources/images/tiles/micropolis_tile_0638.png new file mode 100644 index 0000000..cad8600 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0638.png differ diff --git a/resources/images/tiles/micropolis_tile_0639.png b/resources/images/tiles/micropolis_tile_0639.png new file mode 100644 index 0000000..19a2d20 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0639.png differ diff --git a/resources/images/tiles/micropolis_tile_0640.png b/resources/images/tiles/micropolis_tile_0640.png new file mode 100644 index 0000000..f57868c Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0640.png differ diff --git a/resources/images/tiles/micropolis_tile_0641.png b/resources/images/tiles/micropolis_tile_0641.png new file mode 100644 index 0000000..ae49578 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0641.png differ diff --git a/resources/images/tiles/micropolis_tile_0642.png b/resources/images/tiles/micropolis_tile_0642.png new file mode 100644 index 0000000..2a51dae Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0642.png differ diff --git a/resources/images/tiles/micropolis_tile_0643.png b/resources/images/tiles/micropolis_tile_0643.png new file mode 100644 index 0000000..92ec4ed Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0643.png differ diff --git a/resources/images/tiles/micropolis_tile_0644.png b/resources/images/tiles/micropolis_tile_0644.png new file mode 100644 index 0000000..44f926e Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0644.png differ diff --git a/resources/images/tiles/micropolis_tile_0645.png b/resources/images/tiles/micropolis_tile_0645.png new file mode 100644 index 0000000..56d7dab Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0645.png differ diff --git a/resources/images/tiles/micropolis_tile_0646.png b/resources/images/tiles/micropolis_tile_0646.png new file mode 100644 index 0000000..2166dd3 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0646.png differ diff --git a/resources/images/tiles/micropolis_tile_0647.png b/resources/images/tiles/micropolis_tile_0647.png new file mode 100644 index 0000000..ede4d75 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0647.png differ diff --git a/resources/images/tiles/micropolis_tile_0648.png b/resources/images/tiles/micropolis_tile_0648.png new file mode 100644 index 0000000..8af3885 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0648.png differ diff --git a/resources/images/tiles/micropolis_tile_0649.png b/resources/images/tiles/micropolis_tile_0649.png new file mode 100644 index 0000000..0fd1bba Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0649.png differ diff --git a/resources/images/tiles/micropolis_tile_0650.png b/resources/images/tiles/micropolis_tile_0650.png new file mode 100644 index 0000000..effb190 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0650.png differ diff --git a/resources/images/tiles/micropolis_tile_0651.png b/resources/images/tiles/micropolis_tile_0651.png new file mode 100644 index 0000000..f2cb535 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0651.png differ diff --git a/resources/images/tiles/micropolis_tile_0652.png b/resources/images/tiles/micropolis_tile_0652.png new file mode 100644 index 0000000..8204399 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0652.png differ diff --git a/resources/images/tiles/micropolis_tile_0653.png b/resources/images/tiles/micropolis_tile_0653.png new file mode 100644 index 0000000..89aafe0 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0653.png differ diff --git a/resources/images/tiles/micropolis_tile_0654.png b/resources/images/tiles/micropolis_tile_0654.png new file mode 100644 index 0000000..28e723b Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0654.png differ diff --git a/resources/images/tiles/micropolis_tile_0655.png b/resources/images/tiles/micropolis_tile_0655.png new file mode 100644 index 0000000..1e54c95 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0655.png differ diff --git a/resources/images/tiles/micropolis_tile_0656.png b/resources/images/tiles/micropolis_tile_0656.png new file mode 100644 index 0000000..3c3e499 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0656.png differ diff --git a/resources/images/tiles/micropolis_tile_0657.png b/resources/images/tiles/micropolis_tile_0657.png new file mode 100644 index 0000000..da16bdf Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0657.png differ diff --git a/resources/images/tiles/micropolis_tile_0658.png b/resources/images/tiles/micropolis_tile_0658.png new file mode 100644 index 0000000..bd20b40 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0658.png differ diff --git a/resources/images/tiles/micropolis_tile_0659.png b/resources/images/tiles/micropolis_tile_0659.png new file mode 100644 index 0000000..d3cd484 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0659.png differ diff --git a/resources/images/tiles/micropolis_tile_0660.png b/resources/images/tiles/micropolis_tile_0660.png new file mode 100644 index 0000000..ae51607 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0660.png differ diff --git a/resources/images/tiles/micropolis_tile_0661.png b/resources/images/tiles/micropolis_tile_0661.png new file mode 100644 index 0000000..3c43918 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0661.png differ diff --git a/resources/images/tiles/micropolis_tile_0662.png b/resources/images/tiles/micropolis_tile_0662.png new file mode 100644 index 0000000..7016243 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0662.png differ diff --git a/resources/images/tiles/micropolis_tile_0663.png b/resources/images/tiles/micropolis_tile_0663.png new file mode 100644 index 0000000..6874812 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0663.png differ diff --git a/resources/images/tiles/micropolis_tile_0664.png b/resources/images/tiles/micropolis_tile_0664.png new file mode 100644 index 0000000..2155140 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0664.png differ diff --git a/resources/images/tiles/micropolis_tile_0665.png b/resources/images/tiles/micropolis_tile_0665.png new file mode 100644 index 0000000..f18d60e Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0665.png differ diff --git a/resources/images/tiles/micropolis_tile_0666.png b/resources/images/tiles/micropolis_tile_0666.png new file mode 100644 index 0000000..f2b01ad Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0666.png differ diff --git a/resources/images/tiles/micropolis_tile_0667.png b/resources/images/tiles/micropolis_tile_0667.png new file mode 100644 index 0000000..5512b5e Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0667.png differ diff --git a/resources/images/tiles/micropolis_tile_0668.png b/resources/images/tiles/micropolis_tile_0668.png new file mode 100644 index 0000000..2ca8388 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0668.png differ diff --git a/resources/images/tiles/micropolis_tile_0669.png b/resources/images/tiles/micropolis_tile_0669.png new file mode 100644 index 0000000..b061d0a Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0669.png differ diff --git a/resources/images/tiles/micropolis_tile_0670.png b/resources/images/tiles/micropolis_tile_0670.png new file mode 100644 index 0000000..7ca2998 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0670.png differ diff --git a/resources/images/tiles/micropolis_tile_0671.png b/resources/images/tiles/micropolis_tile_0671.png new file mode 100644 index 0000000..b947563 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0671.png differ diff --git a/resources/images/tiles/micropolis_tile_0672.png b/resources/images/tiles/micropolis_tile_0672.png new file mode 100644 index 0000000..32cc609 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0672.png differ diff --git a/resources/images/tiles/micropolis_tile_0673.png b/resources/images/tiles/micropolis_tile_0673.png new file mode 100644 index 0000000..1179d93 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0673.png differ diff --git a/resources/images/tiles/micropolis_tile_0674.png b/resources/images/tiles/micropolis_tile_0674.png new file mode 100644 index 0000000..7266f48 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0674.png differ diff --git a/resources/images/tiles/micropolis_tile_0675.png b/resources/images/tiles/micropolis_tile_0675.png new file mode 100644 index 0000000..467bb35 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0675.png differ diff --git a/resources/images/tiles/micropolis_tile_0676.png b/resources/images/tiles/micropolis_tile_0676.png new file mode 100644 index 0000000..714784c Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0676.png differ diff --git a/resources/images/tiles/micropolis_tile_0677.png b/resources/images/tiles/micropolis_tile_0677.png new file mode 100644 index 0000000..39fb25a Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0677.png differ diff --git a/resources/images/tiles/micropolis_tile_0678.png b/resources/images/tiles/micropolis_tile_0678.png new file mode 100644 index 0000000..2605ba8 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0678.png differ diff --git a/resources/images/tiles/micropolis_tile_0679.png b/resources/images/tiles/micropolis_tile_0679.png new file mode 100644 index 0000000..e119450 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0679.png differ diff --git a/resources/images/tiles/micropolis_tile_0680.png b/resources/images/tiles/micropolis_tile_0680.png new file mode 100644 index 0000000..7a577e7 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0680.png differ diff --git a/resources/images/tiles/micropolis_tile_0681.png b/resources/images/tiles/micropolis_tile_0681.png new file mode 100644 index 0000000..2d28b95 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0681.png differ diff --git a/resources/images/tiles/micropolis_tile_0682.png b/resources/images/tiles/micropolis_tile_0682.png new file mode 100644 index 0000000..c7f2d54 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0682.png differ diff --git a/resources/images/tiles/micropolis_tile_0683.png b/resources/images/tiles/micropolis_tile_0683.png new file mode 100644 index 0000000..b69752c Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0683.png differ diff --git a/resources/images/tiles/micropolis_tile_0684.png b/resources/images/tiles/micropolis_tile_0684.png new file mode 100644 index 0000000..eef3f5c Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0684.png differ diff --git a/resources/images/tiles/micropolis_tile_0685.png b/resources/images/tiles/micropolis_tile_0685.png new file mode 100644 index 0000000..ccae6e5 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0685.png differ diff --git a/resources/images/tiles/micropolis_tile_0686.png b/resources/images/tiles/micropolis_tile_0686.png new file mode 100644 index 0000000..a2038c9 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0686.png differ diff --git a/resources/images/tiles/micropolis_tile_0687.png b/resources/images/tiles/micropolis_tile_0687.png new file mode 100644 index 0000000..50ca603 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0687.png differ diff --git a/resources/images/tiles/micropolis_tile_0688.png b/resources/images/tiles/micropolis_tile_0688.png new file mode 100644 index 0000000..88f40aa Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0688.png differ diff --git a/resources/images/tiles/micropolis_tile_0689.png b/resources/images/tiles/micropolis_tile_0689.png new file mode 100644 index 0000000..db61bb8 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0689.png differ diff --git a/resources/images/tiles/micropolis_tile_0690.png b/resources/images/tiles/micropolis_tile_0690.png new file mode 100644 index 0000000..96672bd Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0690.png differ diff --git a/resources/images/tiles/micropolis_tile_0691.png b/resources/images/tiles/micropolis_tile_0691.png new file mode 100644 index 0000000..6e5e794 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0691.png differ diff --git a/resources/images/tiles/micropolis_tile_0692.png b/resources/images/tiles/micropolis_tile_0692.png new file mode 100644 index 0000000..9b063df Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0692.png differ diff --git a/resources/images/tiles/micropolis_tile_0693.png b/resources/images/tiles/micropolis_tile_0693.png new file mode 100644 index 0000000..04078c1 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0693.png differ diff --git a/resources/images/tiles/micropolis_tile_0694.png b/resources/images/tiles/micropolis_tile_0694.png new file mode 100644 index 0000000..ded7e4e Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0694.png differ diff --git a/resources/images/tiles/micropolis_tile_0695.png b/resources/images/tiles/micropolis_tile_0695.png new file mode 100644 index 0000000..2a74f5a Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0695.png differ diff --git a/resources/images/tiles/micropolis_tile_0696.png b/resources/images/tiles/micropolis_tile_0696.png new file mode 100644 index 0000000..8d20e20 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0696.png differ diff --git a/resources/images/tiles/micropolis_tile_0697.png b/resources/images/tiles/micropolis_tile_0697.png new file mode 100644 index 0000000..b4950b3 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0697.png differ diff --git a/resources/images/tiles/micropolis_tile_0698.png b/resources/images/tiles/micropolis_tile_0698.png new file mode 100644 index 0000000..6307b01 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0698.png differ diff --git a/resources/images/tiles/micropolis_tile_0699.png b/resources/images/tiles/micropolis_tile_0699.png new file mode 100644 index 0000000..1d2312b Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0699.png differ diff --git a/resources/images/tiles/micropolis_tile_0700.png b/resources/images/tiles/micropolis_tile_0700.png new file mode 100644 index 0000000..159d19e Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0700.png differ diff --git a/resources/images/tiles/micropolis_tile_0701.png b/resources/images/tiles/micropolis_tile_0701.png new file mode 100644 index 0000000..ff6865f Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0701.png differ diff --git a/resources/images/tiles/micropolis_tile_0702.png b/resources/images/tiles/micropolis_tile_0702.png new file mode 100644 index 0000000..10deb9f Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0702.png differ diff --git a/resources/images/tiles/micropolis_tile_0703.png b/resources/images/tiles/micropolis_tile_0703.png new file mode 100644 index 0000000..bc0d38e Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0703.png differ diff --git a/resources/images/tiles/micropolis_tile_0704.png b/resources/images/tiles/micropolis_tile_0704.png new file mode 100644 index 0000000..d416fbf Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0704.png differ diff --git a/resources/images/tiles/micropolis_tile_0705.png b/resources/images/tiles/micropolis_tile_0705.png new file mode 100644 index 0000000..b25a428 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0705.png differ diff --git a/resources/images/tiles/micropolis_tile_0706.png b/resources/images/tiles/micropolis_tile_0706.png new file mode 100644 index 0000000..7cf682f Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0706.png differ diff --git a/resources/images/tiles/micropolis_tile_0707.png b/resources/images/tiles/micropolis_tile_0707.png new file mode 100644 index 0000000..43078fc Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0707.png differ diff --git a/resources/images/tiles/micropolis_tile_0708.png b/resources/images/tiles/micropolis_tile_0708.png new file mode 100644 index 0000000..d32d193 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0708.png differ diff --git a/resources/images/tiles/micropolis_tile_0709.png b/resources/images/tiles/micropolis_tile_0709.png new file mode 100644 index 0000000..fde0437 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0709.png differ diff --git a/resources/images/tiles/micropolis_tile_0710.png b/resources/images/tiles/micropolis_tile_0710.png new file mode 100644 index 0000000..9fe3096 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0710.png differ diff --git a/resources/images/tiles/micropolis_tile_0711.png b/resources/images/tiles/micropolis_tile_0711.png new file mode 100644 index 0000000..aa55ed5 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0711.png differ diff --git a/resources/images/tiles/micropolis_tile_0712.png b/resources/images/tiles/micropolis_tile_0712.png new file mode 100644 index 0000000..7374efe Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0712.png differ diff --git a/resources/images/tiles/micropolis_tile_0713.png b/resources/images/tiles/micropolis_tile_0713.png new file mode 100644 index 0000000..590c3ef Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0713.png differ diff --git a/resources/images/tiles/micropolis_tile_0714.png b/resources/images/tiles/micropolis_tile_0714.png new file mode 100644 index 0000000..22dca24 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0714.png differ diff --git a/resources/images/tiles/micropolis_tile_0715.png b/resources/images/tiles/micropolis_tile_0715.png new file mode 100644 index 0000000..d5c78cf Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0715.png differ diff --git a/resources/images/tiles/micropolis_tile_0716.png b/resources/images/tiles/micropolis_tile_0716.png new file mode 100644 index 0000000..78b7340 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0716.png differ diff --git a/resources/images/tiles/micropolis_tile_0717.png b/resources/images/tiles/micropolis_tile_0717.png new file mode 100644 index 0000000..4c48b7e Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0717.png differ diff --git a/resources/images/tiles/micropolis_tile_0718.png b/resources/images/tiles/micropolis_tile_0718.png new file mode 100644 index 0000000..1e04f6c Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0718.png differ diff --git a/resources/images/tiles/micropolis_tile_0719.png b/resources/images/tiles/micropolis_tile_0719.png new file mode 100644 index 0000000..b2c2d6e Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0719.png differ diff --git a/resources/images/tiles/micropolis_tile_0720.png b/resources/images/tiles/micropolis_tile_0720.png new file mode 100644 index 0000000..3e54f18 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0720.png differ diff --git a/resources/images/tiles/micropolis_tile_0721.png b/resources/images/tiles/micropolis_tile_0721.png new file mode 100644 index 0000000..251f861 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0721.png differ diff --git a/resources/images/tiles/micropolis_tile_0722.png b/resources/images/tiles/micropolis_tile_0722.png new file mode 100644 index 0000000..9cf56fa Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0722.png differ diff --git a/resources/images/tiles/micropolis_tile_0723.png b/resources/images/tiles/micropolis_tile_0723.png new file mode 100644 index 0000000..3cdb262 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0723.png differ diff --git a/resources/images/tiles/micropolis_tile_0724.png b/resources/images/tiles/micropolis_tile_0724.png new file mode 100644 index 0000000..fdb787a Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0724.png differ diff --git a/resources/images/tiles/micropolis_tile_0725.png b/resources/images/tiles/micropolis_tile_0725.png new file mode 100644 index 0000000..911de78 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0725.png differ diff --git a/resources/images/tiles/micropolis_tile_0726.png b/resources/images/tiles/micropolis_tile_0726.png new file mode 100644 index 0000000..e1b8076 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0726.png differ diff --git a/resources/images/tiles/micropolis_tile_0727.png b/resources/images/tiles/micropolis_tile_0727.png new file mode 100644 index 0000000..cbe8fdb Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0727.png differ diff --git a/resources/images/tiles/micropolis_tile_0728.png b/resources/images/tiles/micropolis_tile_0728.png new file mode 100644 index 0000000..01f2982 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0728.png differ diff --git a/resources/images/tiles/micropolis_tile_0729.png b/resources/images/tiles/micropolis_tile_0729.png new file mode 100644 index 0000000..2156e29 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0729.png differ diff --git a/resources/images/tiles/micropolis_tile_0730.png b/resources/images/tiles/micropolis_tile_0730.png new file mode 100644 index 0000000..77f0fac Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0730.png differ diff --git a/resources/images/tiles/micropolis_tile_0731.png b/resources/images/tiles/micropolis_tile_0731.png new file mode 100644 index 0000000..8ee1e82 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0731.png differ diff --git a/resources/images/tiles/micropolis_tile_0732.png b/resources/images/tiles/micropolis_tile_0732.png new file mode 100644 index 0000000..6d56a24 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0732.png differ diff --git a/resources/images/tiles/micropolis_tile_0733.png b/resources/images/tiles/micropolis_tile_0733.png new file mode 100644 index 0000000..ac71bd0 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0733.png differ diff --git a/resources/images/tiles/micropolis_tile_0734.png b/resources/images/tiles/micropolis_tile_0734.png new file mode 100644 index 0000000..78dc5f4 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0734.png differ diff --git a/resources/images/tiles/micropolis_tile_0735.png b/resources/images/tiles/micropolis_tile_0735.png new file mode 100644 index 0000000..835b16a Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0735.png differ diff --git a/resources/images/tiles/micropolis_tile_0736.png b/resources/images/tiles/micropolis_tile_0736.png new file mode 100644 index 0000000..3e1a98e Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0736.png differ diff --git a/resources/images/tiles/micropolis_tile_0737.png b/resources/images/tiles/micropolis_tile_0737.png new file mode 100644 index 0000000..06f79c7 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0737.png differ diff --git a/resources/images/tiles/micropolis_tile_0738.png b/resources/images/tiles/micropolis_tile_0738.png new file mode 100644 index 0000000..3fdbb0f Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0738.png differ diff --git a/resources/images/tiles/micropolis_tile_0739.png b/resources/images/tiles/micropolis_tile_0739.png new file mode 100644 index 0000000..f58d105 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0739.png differ diff --git a/resources/images/tiles/micropolis_tile_0740.png b/resources/images/tiles/micropolis_tile_0740.png new file mode 100644 index 0000000..0e9bfeb Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0740.png differ diff --git a/resources/images/tiles/micropolis_tile_0741.png b/resources/images/tiles/micropolis_tile_0741.png new file mode 100644 index 0000000..1f7c165 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0741.png differ diff --git a/resources/images/tiles/micropolis_tile_0742.png b/resources/images/tiles/micropolis_tile_0742.png new file mode 100644 index 0000000..19fa650 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0742.png differ diff --git a/resources/images/tiles/micropolis_tile_0743.png b/resources/images/tiles/micropolis_tile_0743.png new file mode 100644 index 0000000..a00d43f Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0743.png differ diff --git a/resources/images/tiles/micropolis_tile_0744.png b/resources/images/tiles/micropolis_tile_0744.png new file mode 100644 index 0000000..b080d4a Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0744.png differ diff --git a/resources/images/tiles/micropolis_tile_0745.png b/resources/images/tiles/micropolis_tile_0745.png new file mode 100644 index 0000000..ceaf72e Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0745.png differ diff --git a/resources/images/tiles/micropolis_tile_0746.png b/resources/images/tiles/micropolis_tile_0746.png new file mode 100644 index 0000000..08d23b2 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0746.png differ diff --git a/resources/images/tiles/micropolis_tile_0747.png b/resources/images/tiles/micropolis_tile_0747.png new file mode 100644 index 0000000..075f827 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0747.png differ diff --git a/resources/images/tiles/micropolis_tile_0748.png b/resources/images/tiles/micropolis_tile_0748.png new file mode 100644 index 0000000..cce7566 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0748.png differ diff --git a/resources/images/tiles/micropolis_tile_0749.png b/resources/images/tiles/micropolis_tile_0749.png new file mode 100644 index 0000000..d7a5b3d Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0749.png differ diff --git a/resources/images/tiles/micropolis_tile_0750.png b/resources/images/tiles/micropolis_tile_0750.png new file mode 100644 index 0000000..dd93f12 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0750.png differ diff --git a/resources/images/tiles/micropolis_tile_0751.png b/resources/images/tiles/micropolis_tile_0751.png new file mode 100644 index 0000000..6598467 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0751.png differ diff --git a/resources/images/tiles/micropolis_tile_0752.png b/resources/images/tiles/micropolis_tile_0752.png new file mode 100644 index 0000000..30045a1 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0752.png differ diff --git a/resources/images/tiles/micropolis_tile_0753.png b/resources/images/tiles/micropolis_tile_0753.png new file mode 100644 index 0000000..235fd76 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0753.png differ diff --git a/resources/images/tiles/micropolis_tile_0754.png b/resources/images/tiles/micropolis_tile_0754.png new file mode 100644 index 0000000..ee47fe0 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0754.png differ diff --git a/resources/images/tiles/micropolis_tile_0755.png b/resources/images/tiles/micropolis_tile_0755.png new file mode 100644 index 0000000..d5d32a1 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0755.png differ diff --git a/resources/images/tiles/micropolis_tile_0756.png b/resources/images/tiles/micropolis_tile_0756.png new file mode 100644 index 0000000..226d3a9 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0756.png differ diff --git a/resources/images/tiles/micropolis_tile_0757.png b/resources/images/tiles/micropolis_tile_0757.png new file mode 100644 index 0000000..92c1246 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0757.png differ diff --git a/resources/images/tiles/micropolis_tile_0758.png b/resources/images/tiles/micropolis_tile_0758.png new file mode 100644 index 0000000..cf3d16f Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0758.png differ diff --git a/resources/images/tiles/micropolis_tile_0759.png b/resources/images/tiles/micropolis_tile_0759.png new file mode 100644 index 0000000..cb9b7cf Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0759.png differ diff --git a/resources/images/tiles/micropolis_tile_0760.png b/resources/images/tiles/micropolis_tile_0760.png new file mode 100644 index 0000000..7a41b71 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0760.png differ diff --git a/resources/images/tiles/micropolis_tile_0761.png b/resources/images/tiles/micropolis_tile_0761.png new file mode 100644 index 0000000..fea8d44 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0761.png differ diff --git a/resources/images/tiles/micropolis_tile_0762.png b/resources/images/tiles/micropolis_tile_0762.png new file mode 100644 index 0000000..cd26b7b Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0762.png differ diff --git a/resources/images/tiles/micropolis_tile_0763.png b/resources/images/tiles/micropolis_tile_0763.png new file mode 100644 index 0000000..c3fdc56 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0763.png differ diff --git a/resources/images/tiles/micropolis_tile_0764.png b/resources/images/tiles/micropolis_tile_0764.png new file mode 100644 index 0000000..9f78bd4 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0764.png differ diff --git a/resources/images/tiles/micropolis_tile_0765.png b/resources/images/tiles/micropolis_tile_0765.png new file mode 100644 index 0000000..27ebde6 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0765.png differ diff --git a/resources/images/tiles/micropolis_tile_0766.png b/resources/images/tiles/micropolis_tile_0766.png new file mode 100644 index 0000000..53088ed Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0766.png differ diff --git a/resources/images/tiles/micropolis_tile_0767.png b/resources/images/tiles/micropolis_tile_0767.png new file mode 100644 index 0000000..4cda569 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0767.png differ diff --git a/resources/images/tiles/micropolis_tile_0768.png b/resources/images/tiles/micropolis_tile_0768.png new file mode 100644 index 0000000..5c29f02 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0768.png differ diff --git a/resources/images/tiles/micropolis_tile_0769.png b/resources/images/tiles/micropolis_tile_0769.png new file mode 100644 index 0000000..97b1f5e Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0769.png differ diff --git a/resources/images/tiles/micropolis_tile_0770.png b/resources/images/tiles/micropolis_tile_0770.png new file mode 100644 index 0000000..173cc63 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0770.png differ diff --git a/resources/images/tiles/micropolis_tile_0771.png b/resources/images/tiles/micropolis_tile_0771.png new file mode 100644 index 0000000..0d36554 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0771.png differ diff --git a/resources/images/tiles/micropolis_tile_0772.png b/resources/images/tiles/micropolis_tile_0772.png new file mode 100644 index 0000000..69e23e9 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0772.png differ diff --git a/resources/images/tiles/micropolis_tile_0773.png b/resources/images/tiles/micropolis_tile_0773.png new file mode 100644 index 0000000..5a8d881 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0773.png differ diff --git a/resources/images/tiles/micropolis_tile_0774.png b/resources/images/tiles/micropolis_tile_0774.png new file mode 100644 index 0000000..0545743 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0774.png differ diff --git a/resources/images/tiles/micropolis_tile_0775.png b/resources/images/tiles/micropolis_tile_0775.png new file mode 100644 index 0000000..feb3fee Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0775.png differ diff --git a/resources/images/tiles/micropolis_tile_0776.png b/resources/images/tiles/micropolis_tile_0776.png new file mode 100644 index 0000000..eade5bf Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0776.png differ diff --git a/resources/images/tiles/micropolis_tile_0777.png b/resources/images/tiles/micropolis_tile_0777.png new file mode 100644 index 0000000..0469145 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0777.png differ diff --git a/resources/images/tiles/micropolis_tile_0778.png b/resources/images/tiles/micropolis_tile_0778.png new file mode 100644 index 0000000..90009b8 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0778.png differ diff --git a/resources/images/tiles/micropolis_tile_0779.png b/resources/images/tiles/micropolis_tile_0779.png new file mode 100644 index 0000000..8938212 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0779.png differ diff --git a/resources/images/tiles/micropolis_tile_0780.png b/resources/images/tiles/micropolis_tile_0780.png new file mode 100644 index 0000000..856f123 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0780.png differ diff --git a/resources/images/tiles/micropolis_tile_0781.png b/resources/images/tiles/micropolis_tile_0781.png new file mode 100644 index 0000000..ea0766f Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0781.png differ diff --git a/resources/images/tiles/micropolis_tile_0782.png b/resources/images/tiles/micropolis_tile_0782.png new file mode 100644 index 0000000..9fe032a Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0782.png differ diff --git a/resources/images/tiles/micropolis_tile_0783.png b/resources/images/tiles/micropolis_tile_0783.png new file mode 100644 index 0000000..e9ea576 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0783.png differ diff --git a/resources/images/tiles/micropolis_tile_0784.png b/resources/images/tiles/micropolis_tile_0784.png new file mode 100644 index 0000000..0a83286 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0784.png differ diff --git a/resources/images/tiles/micropolis_tile_0785.png b/resources/images/tiles/micropolis_tile_0785.png new file mode 100644 index 0000000..f0a92b9 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0785.png differ diff --git a/resources/images/tiles/micropolis_tile_0786.png b/resources/images/tiles/micropolis_tile_0786.png new file mode 100644 index 0000000..afe3114 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0786.png differ diff --git a/resources/images/tiles/micropolis_tile_0787.png b/resources/images/tiles/micropolis_tile_0787.png new file mode 100644 index 0000000..21dac23 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0787.png differ diff --git a/resources/images/tiles/micropolis_tile_0788.png b/resources/images/tiles/micropolis_tile_0788.png new file mode 100644 index 0000000..15236a1 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0788.png differ diff --git a/resources/images/tiles/micropolis_tile_0789.png b/resources/images/tiles/micropolis_tile_0789.png new file mode 100644 index 0000000..3b4f90c Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0789.png differ diff --git a/resources/images/tiles/micropolis_tile_0790.png b/resources/images/tiles/micropolis_tile_0790.png new file mode 100644 index 0000000..dfb6564 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0790.png differ diff --git a/resources/images/tiles/micropolis_tile_0791.png b/resources/images/tiles/micropolis_tile_0791.png new file mode 100644 index 0000000..bb89a9e Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0791.png differ diff --git a/resources/images/tiles/micropolis_tile_0792.png b/resources/images/tiles/micropolis_tile_0792.png new file mode 100644 index 0000000..2b593f5 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0792.png differ diff --git a/resources/images/tiles/micropolis_tile_0793.png b/resources/images/tiles/micropolis_tile_0793.png new file mode 100644 index 0000000..2e88448 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0793.png differ diff --git a/resources/images/tiles/micropolis_tile_0794.png b/resources/images/tiles/micropolis_tile_0794.png new file mode 100644 index 0000000..b9b0b00 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0794.png differ diff --git a/resources/images/tiles/micropolis_tile_0795.png b/resources/images/tiles/micropolis_tile_0795.png new file mode 100644 index 0000000..cc00944 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0795.png differ diff --git a/resources/images/tiles/micropolis_tile_0796.png b/resources/images/tiles/micropolis_tile_0796.png new file mode 100644 index 0000000..1227cb9 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0796.png differ diff --git a/resources/images/tiles/micropolis_tile_0797.png b/resources/images/tiles/micropolis_tile_0797.png new file mode 100644 index 0000000..62972d7 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0797.png differ diff --git a/resources/images/tiles/micropolis_tile_0798.png b/resources/images/tiles/micropolis_tile_0798.png new file mode 100644 index 0000000..07afacd Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0798.png differ diff --git a/resources/images/tiles/micropolis_tile_0799.png b/resources/images/tiles/micropolis_tile_0799.png new file mode 100644 index 0000000..3aa3eeb Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0799.png differ diff --git a/resources/images/tiles/micropolis_tile_0800.png b/resources/images/tiles/micropolis_tile_0800.png new file mode 100644 index 0000000..1b58a76 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0800.png differ diff --git a/resources/images/tiles/micropolis_tile_0801.png b/resources/images/tiles/micropolis_tile_0801.png new file mode 100644 index 0000000..ac8061b Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0801.png differ diff --git a/resources/images/tiles/micropolis_tile_0802.png b/resources/images/tiles/micropolis_tile_0802.png new file mode 100644 index 0000000..0e17844 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0802.png differ diff --git a/resources/images/tiles/micropolis_tile_0803.png b/resources/images/tiles/micropolis_tile_0803.png new file mode 100644 index 0000000..d449b52 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0803.png differ diff --git a/resources/images/tiles/micropolis_tile_0804.png b/resources/images/tiles/micropolis_tile_0804.png new file mode 100644 index 0000000..a4c28fa Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0804.png differ diff --git a/resources/images/tiles/micropolis_tile_0805.png b/resources/images/tiles/micropolis_tile_0805.png new file mode 100644 index 0000000..ff3e868 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0805.png differ diff --git a/resources/images/tiles/micropolis_tile_0806.png b/resources/images/tiles/micropolis_tile_0806.png new file mode 100644 index 0000000..180be4b Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0806.png differ diff --git a/resources/images/tiles/micropolis_tile_0807.png b/resources/images/tiles/micropolis_tile_0807.png new file mode 100644 index 0000000..236c621 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0807.png differ diff --git a/resources/images/tiles/micropolis_tile_0808.png b/resources/images/tiles/micropolis_tile_0808.png new file mode 100644 index 0000000..7f6046f Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0808.png differ diff --git a/resources/images/tiles/micropolis_tile_0809.png b/resources/images/tiles/micropolis_tile_0809.png new file mode 100644 index 0000000..b48f6bb Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0809.png differ diff --git a/resources/images/tiles/micropolis_tile_0810.png b/resources/images/tiles/micropolis_tile_0810.png new file mode 100644 index 0000000..b1a9c12 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0810.png differ diff --git a/resources/images/tiles/micropolis_tile_0811.png b/resources/images/tiles/micropolis_tile_0811.png new file mode 100644 index 0000000..353ea88 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0811.png differ diff --git a/resources/images/tiles/micropolis_tile_0812.png b/resources/images/tiles/micropolis_tile_0812.png new file mode 100644 index 0000000..4e230a6 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0812.png differ diff --git a/resources/images/tiles/micropolis_tile_0813.png b/resources/images/tiles/micropolis_tile_0813.png new file mode 100644 index 0000000..1e07698 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0813.png differ diff --git a/resources/images/tiles/micropolis_tile_0814.png b/resources/images/tiles/micropolis_tile_0814.png new file mode 100644 index 0000000..0a567da Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0814.png differ diff --git a/resources/images/tiles/micropolis_tile_0815.png b/resources/images/tiles/micropolis_tile_0815.png new file mode 100644 index 0000000..5c05bdf Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0815.png differ diff --git a/resources/images/tiles/micropolis_tile_0816.png b/resources/images/tiles/micropolis_tile_0816.png new file mode 100644 index 0000000..44ade0d Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0816.png differ diff --git a/resources/images/tiles/micropolis_tile_0817.png b/resources/images/tiles/micropolis_tile_0817.png new file mode 100644 index 0000000..f7f0710 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0817.png differ diff --git a/resources/images/tiles/micropolis_tile_0818.png b/resources/images/tiles/micropolis_tile_0818.png new file mode 100644 index 0000000..69953cc Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0818.png differ diff --git a/resources/images/tiles/micropolis_tile_0819.png b/resources/images/tiles/micropolis_tile_0819.png new file mode 100644 index 0000000..52163e8 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0819.png differ diff --git a/resources/images/tiles/micropolis_tile_0820.png b/resources/images/tiles/micropolis_tile_0820.png new file mode 100644 index 0000000..15aa587 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0820.png differ diff --git a/resources/images/tiles/micropolis_tile_0821.png b/resources/images/tiles/micropolis_tile_0821.png new file mode 100644 index 0000000..fe49c3c Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0821.png differ diff --git a/resources/images/tiles/micropolis_tile_0822.png b/resources/images/tiles/micropolis_tile_0822.png new file mode 100644 index 0000000..d61ed1d Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0822.png differ diff --git a/resources/images/tiles/micropolis_tile_0823.png b/resources/images/tiles/micropolis_tile_0823.png new file mode 100644 index 0000000..fe01516 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0823.png differ diff --git a/resources/images/tiles/micropolis_tile_0824.png b/resources/images/tiles/micropolis_tile_0824.png new file mode 100644 index 0000000..21870c8 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0824.png differ diff --git a/resources/images/tiles/micropolis_tile_0825.png b/resources/images/tiles/micropolis_tile_0825.png new file mode 100644 index 0000000..bb8a6e5 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0825.png differ diff --git a/resources/images/tiles/micropolis_tile_0826.png b/resources/images/tiles/micropolis_tile_0826.png new file mode 100644 index 0000000..f2fe063 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0826.png differ diff --git a/resources/images/tiles/micropolis_tile_0827.png b/resources/images/tiles/micropolis_tile_0827.png new file mode 100644 index 0000000..1ecf165 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0827.png differ diff --git a/resources/images/tiles/micropolis_tile_0828.png b/resources/images/tiles/micropolis_tile_0828.png new file mode 100644 index 0000000..d65638c Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0828.png differ diff --git a/resources/images/tiles/micropolis_tile_0829.png b/resources/images/tiles/micropolis_tile_0829.png new file mode 100644 index 0000000..0d62e8c Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0829.png differ diff --git a/resources/images/tiles/micropolis_tile_0830.png b/resources/images/tiles/micropolis_tile_0830.png new file mode 100644 index 0000000..506e294 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0830.png differ diff --git a/resources/images/tiles/micropolis_tile_0831.png b/resources/images/tiles/micropolis_tile_0831.png new file mode 100644 index 0000000..272304a Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0831.png differ diff --git a/resources/images/tiles/micropolis_tile_0832.png b/resources/images/tiles/micropolis_tile_0832.png new file mode 100644 index 0000000..08609e6 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0832.png differ diff --git a/resources/images/tiles/micropolis_tile_0833.png b/resources/images/tiles/micropolis_tile_0833.png new file mode 100644 index 0000000..0d1dfcb Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0833.png differ diff --git a/resources/images/tiles/micropolis_tile_0834.png b/resources/images/tiles/micropolis_tile_0834.png new file mode 100644 index 0000000..3ba5148 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0834.png differ diff --git a/resources/images/tiles/micropolis_tile_0835.png b/resources/images/tiles/micropolis_tile_0835.png new file mode 100644 index 0000000..2afca73 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0835.png differ diff --git a/resources/images/tiles/micropolis_tile_0836.png b/resources/images/tiles/micropolis_tile_0836.png new file mode 100644 index 0000000..79bb572 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0836.png differ diff --git a/resources/images/tiles/micropolis_tile_0837.png b/resources/images/tiles/micropolis_tile_0837.png new file mode 100644 index 0000000..c320455 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0837.png differ diff --git a/resources/images/tiles/micropolis_tile_0838.png b/resources/images/tiles/micropolis_tile_0838.png new file mode 100644 index 0000000..b33e270 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0838.png differ diff --git a/resources/images/tiles/micropolis_tile_0839.png b/resources/images/tiles/micropolis_tile_0839.png new file mode 100644 index 0000000..9f16457 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0839.png differ diff --git a/resources/images/tiles/micropolis_tile_0840.png b/resources/images/tiles/micropolis_tile_0840.png new file mode 100644 index 0000000..fe77840 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0840.png differ diff --git a/resources/images/tiles/micropolis_tile_0841.png b/resources/images/tiles/micropolis_tile_0841.png new file mode 100644 index 0000000..53a8c40 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0841.png differ diff --git a/resources/images/tiles/micropolis_tile_0842.png b/resources/images/tiles/micropolis_tile_0842.png new file mode 100644 index 0000000..6f6d190 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0842.png differ diff --git a/resources/images/tiles/micropolis_tile_0843.png b/resources/images/tiles/micropolis_tile_0843.png new file mode 100644 index 0000000..54eaf59 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0843.png differ diff --git a/resources/images/tiles/micropolis_tile_0844.png b/resources/images/tiles/micropolis_tile_0844.png new file mode 100644 index 0000000..a1e5060 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0844.png differ diff --git a/resources/images/tiles/micropolis_tile_0845.png b/resources/images/tiles/micropolis_tile_0845.png new file mode 100644 index 0000000..be7fffc Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0845.png differ diff --git a/resources/images/tiles/micropolis_tile_0846.png b/resources/images/tiles/micropolis_tile_0846.png new file mode 100644 index 0000000..eb9da91 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0846.png differ diff --git a/resources/images/tiles/micropolis_tile_0847.png b/resources/images/tiles/micropolis_tile_0847.png new file mode 100644 index 0000000..ae41fbb Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0847.png differ diff --git a/resources/images/tiles/micropolis_tile_0848.png b/resources/images/tiles/micropolis_tile_0848.png new file mode 100644 index 0000000..70b13c7 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0848.png differ diff --git a/resources/images/tiles/micropolis_tile_0849.png b/resources/images/tiles/micropolis_tile_0849.png new file mode 100644 index 0000000..ff63dcc Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0849.png differ diff --git a/resources/images/tiles/micropolis_tile_0850.png b/resources/images/tiles/micropolis_tile_0850.png new file mode 100644 index 0000000..614f6c0 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0850.png differ diff --git a/resources/images/tiles/micropolis_tile_0851.png b/resources/images/tiles/micropolis_tile_0851.png new file mode 100644 index 0000000..a69af61 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0851.png differ diff --git a/resources/images/tiles/micropolis_tile_0852.png b/resources/images/tiles/micropolis_tile_0852.png new file mode 100644 index 0000000..c73e804 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0852.png differ diff --git a/resources/images/tiles/micropolis_tile_0853.png b/resources/images/tiles/micropolis_tile_0853.png new file mode 100644 index 0000000..b4ab0b1 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0853.png differ diff --git a/resources/images/tiles/micropolis_tile_0854.png b/resources/images/tiles/micropolis_tile_0854.png new file mode 100644 index 0000000..c50cad4 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0854.png differ diff --git a/resources/images/tiles/micropolis_tile_0855.png b/resources/images/tiles/micropolis_tile_0855.png new file mode 100644 index 0000000..019982e Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0855.png differ diff --git a/resources/images/tiles/micropolis_tile_0856.png b/resources/images/tiles/micropolis_tile_0856.png new file mode 100644 index 0000000..1b2251d Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0856.png differ diff --git a/resources/images/tiles/micropolis_tile_0857.png b/resources/images/tiles/micropolis_tile_0857.png new file mode 100644 index 0000000..7c389a8 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0857.png differ diff --git a/resources/images/tiles/micropolis_tile_0858.png b/resources/images/tiles/micropolis_tile_0858.png new file mode 100644 index 0000000..a1f18b6 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0858.png differ diff --git a/resources/images/tiles/micropolis_tile_0859.png b/resources/images/tiles/micropolis_tile_0859.png new file mode 100644 index 0000000..d9ff495 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0859.png differ diff --git a/resources/images/tiles/micropolis_tile_0860.png b/resources/images/tiles/micropolis_tile_0860.png new file mode 100644 index 0000000..81b9068 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0860.png differ diff --git a/resources/images/tiles/micropolis_tile_0861.png b/resources/images/tiles/micropolis_tile_0861.png new file mode 100644 index 0000000..000ef04 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0861.png differ diff --git a/resources/images/tiles/micropolis_tile_0862.png b/resources/images/tiles/micropolis_tile_0862.png new file mode 100644 index 0000000..a1b5db1 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0862.png differ diff --git a/resources/images/tiles/micropolis_tile_0863.png b/resources/images/tiles/micropolis_tile_0863.png new file mode 100644 index 0000000..168cb65 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0863.png differ diff --git a/resources/images/tiles/micropolis_tile_0864.png b/resources/images/tiles/micropolis_tile_0864.png new file mode 100644 index 0000000..4c0a947 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0864.png differ diff --git a/resources/images/tiles/micropolis_tile_0865.png b/resources/images/tiles/micropolis_tile_0865.png new file mode 100644 index 0000000..af376da Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0865.png differ diff --git a/resources/images/tiles/micropolis_tile_0866.png b/resources/images/tiles/micropolis_tile_0866.png new file mode 100644 index 0000000..e2ba6af Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0866.png differ diff --git a/resources/images/tiles/micropolis_tile_0867.png b/resources/images/tiles/micropolis_tile_0867.png new file mode 100644 index 0000000..bb88950 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0867.png differ diff --git a/resources/images/tiles/micropolis_tile_0868.png b/resources/images/tiles/micropolis_tile_0868.png new file mode 100644 index 0000000..8efe3f6 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0868.png differ diff --git a/resources/images/tiles/micropolis_tile_0869.png b/resources/images/tiles/micropolis_tile_0869.png new file mode 100644 index 0000000..2ed88f2 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0869.png differ diff --git a/resources/images/tiles/micropolis_tile_0870.png b/resources/images/tiles/micropolis_tile_0870.png new file mode 100644 index 0000000..bcf074d Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0870.png differ diff --git a/resources/images/tiles/micropolis_tile_0871.png b/resources/images/tiles/micropolis_tile_0871.png new file mode 100644 index 0000000..d8634e6 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0871.png differ diff --git a/resources/images/tiles/micropolis_tile_0872.png b/resources/images/tiles/micropolis_tile_0872.png new file mode 100644 index 0000000..1be33a0 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0872.png differ diff --git a/resources/images/tiles/micropolis_tile_0873.png b/resources/images/tiles/micropolis_tile_0873.png new file mode 100644 index 0000000..fb4c833 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0873.png differ diff --git a/resources/images/tiles/micropolis_tile_0874.png b/resources/images/tiles/micropolis_tile_0874.png new file mode 100644 index 0000000..b6aa84e Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0874.png differ diff --git a/resources/images/tiles/micropolis_tile_0875.png b/resources/images/tiles/micropolis_tile_0875.png new file mode 100644 index 0000000..f847fcf Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0875.png differ diff --git a/resources/images/tiles/micropolis_tile_0876.png b/resources/images/tiles/micropolis_tile_0876.png new file mode 100644 index 0000000..75411d5 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0876.png differ diff --git a/resources/images/tiles/micropolis_tile_0877.png b/resources/images/tiles/micropolis_tile_0877.png new file mode 100644 index 0000000..9c4c67f Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0877.png differ diff --git a/resources/images/tiles/micropolis_tile_0878.png b/resources/images/tiles/micropolis_tile_0878.png new file mode 100644 index 0000000..b706eb3 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0878.png differ diff --git a/resources/images/tiles/micropolis_tile_0879.png b/resources/images/tiles/micropolis_tile_0879.png new file mode 100644 index 0000000..63e198c Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0879.png differ diff --git a/resources/images/tiles/micropolis_tile_0880.png b/resources/images/tiles/micropolis_tile_0880.png new file mode 100644 index 0000000..b6aa84e Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0880.png differ diff --git a/resources/images/tiles/micropolis_tile_0881.png b/resources/images/tiles/micropolis_tile_0881.png new file mode 100644 index 0000000..fb4c833 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0881.png differ diff --git a/resources/images/tiles/micropolis_tile_0882.png b/resources/images/tiles/micropolis_tile_0882.png new file mode 100644 index 0000000..1be33a0 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0882.png differ diff --git a/resources/images/tiles/micropolis_tile_0883.png b/resources/images/tiles/micropolis_tile_0883.png new file mode 100644 index 0000000..52b66ef Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0883.png differ diff --git a/resources/images/tiles/micropolis_tile_0884.png b/resources/images/tiles/micropolis_tile_0884.png new file mode 100644 index 0000000..803a037 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0884.png differ diff --git a/resources/images/tiles/micropolis_tile_0885.png b/resources/images/tiles/micropolis_tile_0885.png new file mode 100644 index 0000000..d2ae9e3 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0885.png differ diff --git a/resources/images/tiles/micropolis_tile_0886.png b/resources/images/tiles/micropolis_tile_0886.png new file mode 100644 index 0000000..ebfe009 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0886.png differ diff --git a/resources/images/tiles/micropolis_tile_0887.png b/resources/images/tiles/micropolis_tile_0887.png new file mode 100644 index 0000000..13f6fdf Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0887.png differ diff --git a/resources/images/tiles/micropolis_tile_0888.png b/resources/images/tiles/micropolis_tile_0888.png new file mode 100644 index 0000000..996f4c6 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0888.png differ diff --git a/resources/images/tiles/micropolis_tile_0889.png b/resources/images/tiles/micropolis_tile_0889.png new file mode 100644 index 0000000..5a4ba29 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0889.png differ diff --git a/resources/images/tiles/micropolis_tile_0890.png b/resources/images/tiles/micropolis_tile_0890.png new file mode 100644 index 0000000..7788aa9 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0890.png differ diff --git a/resources/images/tiles/micropolis_tile_0891.png b/resources/images/tiles/micropolis_tile_0891.png new file mode 100644 index 0000000..1b3149f Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0891.png differ diff --git a/resources/images/tiles/micropolis_tile_0892.png b/resources/images/tiles/micropolis_tile_0892.png new file mode 100644 index 0000000..ee0f8aa Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0892.png differ diff --git a/resources/images/tiles/micropolis_tile_0893.png b/resources/images/tiles/micropolis_tile_0893.png new file mode 100644 index 0000000..d4160b2 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0893.png differ diff --git a/resources/images/tiles/micropolis_tile_0894.png b/resources/images/tiles/micropolis_tile_0894.png new file mode 100644 index 0000000..a29cf3d Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0894.png differ diff --git a/resources/images/tiles/micropolis_tile_0895.png b/resources/images/tiles/micropolis_tile_0895.png new file mode 100644 index 0000000..70da8e8 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0895.png differ diff --git a/resources/images/tiles/micropolis_tile_0896.png b/resources/images/tiles/micropolis_tile_0896.png new file mode 100644 index 0000000..3478b71 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0896.png differ diff --git a/resources/images/tiles/micropolis_tile_0897.png b/resources/images/tiles/micropolis_tile_0897.png new file mode 100644 index 0000000..0960275 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0897.png differ diff --git a/resources/images/tiles/micropolis_tile_0898.png b/resources/images/tiles/micropolis_tile_0898.png new file mode 100644 index 0000000..2a3ebed Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0898.png differ diff --git a/resources/images/tiles/micropolis_tile_0899.png b/resources/images/tiles/micropolis_tile_0899.png new file mode 100644 index 0000000..246b39f Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0899.png differ diff --git a/resources/images/tiles/micropolis_tile_0900.png b/resources/images/tiles/micropolis_tile_0900.png new file mode 100644 index 0000000..513ed1c Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0900.png differ diff --git a/resources/images/tiles/micropolis_tile_0901.png b/resources/images/tiles/micropolis_tile_0901.png new file mode 100644 index 0000000..d11cc6c Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0901.png differ diff --git a/resources/images/tiles/micropolis_tile_0902.png b/resources/images/tiles/micropolis_tile_0902.png new file mode 100644 index 0000000..f230245 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0902.png differ diff --git a/resources/images/tiles/micropolis_tile_0903.png b/resources/images/tiles/micropolis_tile_0903.png new file mode 100644 index 0000000..8d66fb8 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0903.png differ diff --git a/resources/images/tiles/micropolis_tile_0904.png b/resources/images/tiles/micropolis_tile_0904.png new file mode 100644 index 0000000..5f84fc5 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0904.png differ diff --git a/resources/images/tiles/micropolis_tile_0905.png b/resources/images/tiles/micropolis_tile_0905.png new file mode 100644 index 0000000..41db002 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0905.png differ diff --git a/resources/images/tiles/micropolis_tile_0906.png b/resources/images/tiles/micropolis_tile_0906.png new file mode 100644 index 0000000..8e39db7 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0906.png differ diff --git a/resources/images/tiles/micropolis_tile_0907.png b/resources/images/tiles/micropolis_tile_0907.png new file mode 100644 index 0000000..657adf0 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0907.png differ diff --git a/resources/images/tiles/micropolis_tile_0908.png b/resources/images/tiles/micropolis_tile_0908.png new file mode 100644 index 0000000..54b07cd Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0908.png differ diff --git a/resources/images/tiles/micropolis_tile_0909.png b/resources/images/tiles/micropolis_tile_0909.png new file mode 100644 index 0000000..23837df Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0909.png differ diff --git a/resources/images/tiles/micropolis_tile_0910.png b/resources/images/tiles/micropolis_tile_0910.png new file mode 100644 index 0000000..a9153b4 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0910.png differ diff --git a/resources/images/tiles/micropolis_tile_0911.png b/resources/images/tiles/micropolis_tile_0911.png new file mode 100644 index 0000000..b58e08e Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0911.png differ diff --git a/resources/images/tiles/micropolis_tile_0912.png b/resources/images/tiles/micropolis_tile_0912.png new file mode 100644 index 0000000..543d9ab Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0912.png differ diff --git a/resources/images/tiles/micropolis_tile_0913.png b/resources/images/tiles/micropolis_tile_0913.png new file mode 100644 index 0000000..cdb0a45 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0913.png differ diff --git a/resources/images/tiles/micropolis_tile_0914.png b/resources/images/tiles/micropolis_tile_0914.png new file mode 100644 index 0000000..e3ee87d Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0914.png differ diff --git a/resources/images/tiles/micropolis_tile_0915.png b/resources/images/tiles/micropolis_tile_0915.png new file mode 100644 index 0000000..050b4c2 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0915.png differ diff --git a/resources/images/tiles/micropolis_tile_0916.png b/resources/images/tiles/micropolis_tile_0916.png new file mode 100644 index 0000000..cada85d Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0916.png differ diff --git a/resources/images/tiles/micropolis_tile_0917.png b/resources/images/tiles/micropolis_tile_0917.png new file mode 100644 index 0000000..a32516d Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0917.png differ diff --git a/resources/images/tiles/micropolis_tile_0918.png b/resources/images/tiles/micropolis_tile_0918.png new file mode 100644 index 0000000..b5771ee Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0918.png differ diff --git a/resources/images/tiles/micropolis_tile_0919.png b/resources/images/tiles/micropolis_tile_0919.png new file mode 100644 index 0000000..cd8ca68 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0919.png differ diff --git a/resources/images/tiles/micropolis_tile_0920.png b/resources/images/tiles/micropolis_tile_0920.png new file mode 100644 index 0000000..ac0dcbb Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0920.png differ diff --git a/resources/images/tiles/micropolis_tile_0921.png b/resources/images/tiles/micropolis_tile_0921.png new file mode 100644 index 0000000..4143eb1 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0921.png differ diff --git a/resources/images/tiles/micropolis_tile_0922.png b/resources/images/tiles/micropolis_tile_0922.png new file mode 100644 index 0000000..a20a030 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0922.png differ diff --git a/resources/images/tiles/micropolis_tile_0923.png b/resources/images/tiles/micropolis_tile_0923.png new file mode 100644 index 0000000..f5c178a Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0923.png differ diff --git a/resources/images/tiles/micropolis_tile_0924.png b/resources/images/tiles/micropolis_tile_0924.png new file mode 100644 index 0000000..c03d9ff Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0924.png differ diff --git a/resources/images/tiles/micropolis_tile_0925.png b/resources/images/tiles/micropolis_tile_0925.png new file mode 100644 index 0000000..74a7b5d Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0925.png differ diff --git a/resources/images/tiles/micropolis_tile_0926.png b/resources/images/tiles/micropolis_tile_0926.png new file mode 100644 index 0000000..a82f586 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0926.png differ diff --git a/resources/images/tiles/micropolis_tile_0927.png b/resources/images/tiles/micropolis_tile_0927.png new file mode 100644 index 0000000..8c01371 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0927.png differ diff --git a/resources/images/tiles/micropolis_tile_0928.png b/resources/images/tiles/micropolis_tile_0928.png new file mode 100644 index 0000000..e1cac62 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0928.png differ diff --git a/resources/images/tiles/micropolis_tile_0929.png b/resources/images/tiles/micropolis_tile_0929.png new file mode 100644 index 0000000..2d32876 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0929.png differ diff --git a/resources/images/tiles/micropolis_tile_0930.png b/resources/images/tiles/micropolis_tile_0930.png new file mode 100644 index 0000000..769964b Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0930.png differ diff --git a/resources/images/tiles/micropolis_tile_0931.png b/resources/images/tiles/micropolis_tile_0931.png new file mode 100644 index 0000000..80a791c Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0931.png differ diff --git a/resources/images/tiles/micropolis_tile_0932.png b/resources/images/tiles/micropolis_tile_0932.png new file mode 100644 index 0000000..916faf8 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0932.png differ diff --git a/resources/images/tiles/micropolis_tile_0933.png b/resources/images/tiles/micropolis_tile_0933.png new file mode 100644 index 0000000..c6e4d13 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0933.png differ diff --git a/resources/images/tiles/micropolis_tile_0934.png b/resources/images/tiles/micropolis_tile_0934.png new file mode 100644 index 0000000..ac8061b Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0934.png differ diff --git a/resources/images/tiles/micropolis_tile_0935.png b/resources/images/tiles/micropolis_tile_0935.png new file mode 100644 index 0000000..fc61f39 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0935.png differ diff --git a/resources/images/tiles/micropolis_tile_0936.png b/resources/images/tiles/micropolis_tile_0936.png new file mode 100644 index 0000000..f12a53f Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0936.png differ diff --git a/resources/images/tiles/micropolis_tile_0937.png b/resources/images/tiles/micropolis_tile_0937.png new file mode 100644 index 0000000..2c327dc Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0937.png differ diff --git a/resources/images/tiles/micropolis_tile_0938.png b/resources/images/tiles/micropolis_tile_0938.png new file mode 100644 index 0000000..f926e10 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0938.png differ diff --git a/resources/images/tiles/micropolis_tile_0939.png b/resources/images/tiles/micropolis_tile_0939.png new file mode 100644 index 0000000..4cbe9d1 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0939.png differ diff --git a/resources/images/tiles/micropolis_tile_0940.png b/resources/images/tiles/micropolis_tile_0940.png new file mode 100644 index 0000000..cc89ebb Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0940.png differ diff --git a/resources/images/tiles/micropolis_tile_0941.png b/resources/images/tiles/micropolis_tile_0941.png new file mode 100644 index 0000000..90fd891 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0941.png differ diff --git a/resources/images/tiles/micropolis_tile_0942.png b/resources/images/tiles/micropolis_tile_0942.png new file mode 100644 index 0000000..43f56c9 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0942.png differ diff --git a/resources/images/tiles/micropolis_tile_0943.png b/resources/images/tiles/micropolis_tile_0943.png new file mode 100644 index 0000000..8e2d8a7 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0943.png differ diff --git a/resources/images/tiles/micropolis_tile_0944.png b/resources/images/tiles/micropolis_tile_0944.png new file mode 100644 index 0000000..28a7813 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0944.png differ diff --git a/resources/images/tiles/micropolis_tile_0945.png b/resources/images/tiles/micropolis_tile_0945.png new file mode 100644 index 0000000..ff3e868 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0945.png differ diff --git a/resources/images/tiles/micropolis_tile_0946.png b/resources/images/tiles/micropolis_tile_0946.png new file mode 100644 index 0000000..ff3e868 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0946.png differ diff --git a/resources/images/tiles/micropolis_tile_0947.png b/resources/images/tiles/micropolis_tile_0947.png new file mode 100644 index 0000000..f9d6173 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0947.png differ diff --git a/resources/images/tiles/micropolis_tile_0948.png b/resources/images/tiles/micropolis_tile_0948.png new file mode 100644 index 0000000..4f55a1c Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0948.png differ diff --git a/resources/images/tiles/micropolis_tile_0949.png b/resources/images/tiles/micropolis_tile_0949.png new file mode 100644 index 0000000..e657b7c Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0949.png differ diff --git a/resources/images/tiles/micropolis_tile_0950.png b/resources/images/tiles/micropolis_tile_0950.png new file mode 100644 index 0000000..1b67581 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0950.png differ diff --git a/resources/images/tiles/micropolis_tile_0951.png b/resources/images/tiles/micropolis_tile_0951.png new file mode 100644 index 0000000..051c938 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0951.png differ diff --git a/resources/images/tiles/micropolis_tile_0952.png b/resources/images/tiles/micropolis_tile_0952.png new file mode 100644 index 0000000..51c98fa Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0952.png differ diff --git a/resources/images/tiles/micropolis_tile_0953.png b/resources/images/tiles/micropolis_tile_0953.png new file mode 100644 index 0000000..1d7f349 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0953.png differ diff --git a/resources/images/tiles/micropolis_tile_0954.png b/resources/images/tiles/micropolis_tile_0954.png new file mode 100644 index 0000000..fb7f69e Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0954.png differ diff --git a/resources/images/tiles/micropolis_tile_0955.png b/resources/images/tiles/micropolis_tile_0955.png new file mode 100644 index 0000000..cbce128 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0955.png differ diff --git a/resources/images/tiles/micropolis_tile_0956.png b/resources/images/tiles/micropolis_tile_0956.png new file mode 100644 index 0000000..8f02489 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0956.png differ diff --git a/resources/images/tiles/micropolis_tile_0957.png b/resources/images/tiles/micropolis_tile_0957.png new file mode 100644 index 0000000..4f79021 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0957.png differ diff --git a/resources/images/tiles/micropolis_tile_0958.png b/resources/images/tiles/micropolis_tile_0958.png new file mode 100644 index 0000000..23e9c96 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0958.png differ diff --git a/resources/images/tiles/micropolis_tile_0959.png b/resources/images/tiles/micropolis_tile_0959.png new file mode 100644 index 0000000..d6345c9 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0959.png differ diff --git a/resources/images/tiles/micropolis_tile_0960.png b/resources/images/tiles/micropolis_tile_0960.png new file mode 100644 index 0000000..e46bede Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0960.png differ diff --git a/resources/images/tiles/micropolis_tile_0961.png b/resources/images/tiles/micropolis_tile_0961.png new file mode 100644 index 0000000..fedd1b4 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0961.png differ diff --git a/resources/images/tiles/micropolis_tile_0962.png b/resources/images/tiles/micropolis_tile_0962.png new file mode 100644 index 0000000..3ef81ca Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0962.png differ diff --git a/resources/images/tiles/micropolis_tile_0963.png b/resources/images/tiles/micropolis_tile_0963.png new file mode 100644 index 0000000..7610648 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0963.png differ diff --git a/resources/images/tiles/micropolis_tile_0964.png b/resources/images/tiles/micropolis_tile_0964.png new file mode 100644 index 0000000..7768002 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0964.png differ diff --git a/resources/images/tiles/micropolis_tile_0965.png b/resources/images/tiles/micropolis_tile_0965.png new file mode 100644 index 0000000..0361185 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0965.png differ diff --git a/resources/images/tiles/micropolis_tile_0966.png b/resources/images/tiles/micropolis_tile_0966.png new file mode 100644 index 0000000..ef960aa Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0966.png differ diff --git a/resources/images/tiles/micropolis_tile_0967.png b/resources/images/tiles/micropolis_tile_0967.png new file mode 100644 index 0000000..923cb63 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0967.png differ diff --git a/resources/images/tiles/micropolis_tile_0968.png b/resources/images/tiles/micropolis_tile_0968.png new file mode 100644 index 0000000..366eb7c Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0968.png differ diff --git a/resources/images/tiles/micropolis_tile_0969.png b/resources/images/tiles/micropolis_tile_0969.png new file mode 100644 index 0000000..eb0080c Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0969.png differ diff --git a/resources/images/tiles/micropolis_tile_0970.png b/resources/images/tiles/micropolis_tile_0970.png new file mode 100644 index 0000000..e9ed4c6 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0970.png differ diff --git a/resources/images/tiles/micropolis_tile_0971.png b/resources/images/tiles/micropolis_tile_0971.png new file mode 100644 index 0000000..1020e41 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0971.png differ diff --git a/resources/images/tiles/micropolis_tile_0972.png b/resources/images/tiles/micropolis_tile_0972.png new file mode 100644 index 0000000..dc69cd8 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0972.png differ diff --git a/resources/images/tiles/micropolis_tile_0973.png b/resources/images/tiles/micropolis_tile_0973.png new file mode 100644 index 0000000..f437547 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0973.png differ diff --git a/resources/images/tiles/micropolis_tile_0974.png b/resources/images/tiles/micropolis_tile_0974.png new file mode 100644 index 0000000..06a33cb Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0974.png differ diff --git a/resources/images/tiles/micropolis_tile_0975.png b/resources/images/tiles/micropolis_tile_0975.png new file mode 100644 index 0000000..d4dce6c Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0975.png differ diff --git a/resources/images/tiles/micropolis_tile_0976.png b/resources/images/tiles/micropolis_tile_0976.png new file mode 100644 index 0000000..4a24b02 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0976.png differ diff --git a/resources/images/tiles/micropolis_tile_0977.png b/resources/images/tiles/micropolis_tile_0977.png new file mode 100644 index 0000000..a0841a6 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0977.png differ diff --git a/resources/images/tiles/micropolis_tile_0978.png b/resources/images/tiles/micropolis_tile_0978.png new file mode 100644 index 0000000..cb15d14 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0978.png differ diff --git a/resources/images/tiles/micropolis_tile_0979.png b/resources/images/tiles/micropolis_tile_0979.png new file mode 100644 index 0000000..c753082 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0979.png differ diff --git a/resources/images/tiles/micropolis_tile_0980.png b/resources/images/tiles/micropolis_tile_0980.png new file mode 100644 index 0000000..1a1766e Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0980.png differ diff --git a/resources/images/tiles/micropolis_tile_0981.png b/resources/images/tiles/micropolis_tile_0981.png new file mode 100644 index 0000000..ed81c7c Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0981.png differ diff --git a/resources/images/tiles/micropolis_tile_0982.png b/resources/images/tiles/micropolis_tile_0982.png new file mode 100644 index 0000000..95c3851 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0982.png differ diff --git a/resources/images/tiles/micropolis_tile_0983.png b/resources/images/tiles/micropolis_tile_0983.png new file mode 100644 index 0000000..06a33cb Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0983.png differ diff --git a/resources/images/tiles/micropolis_tile_0984.png b/resources/images/tiles/micropolis_tile_0984.png new file mode 100644 index 0000000..6c82ee5 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0984.png differ diff --git a/resources/images/tiles/micropolis_tile_0985.png b/resources/images/tiles/micropolis_tile_0985.png new file mode 100644 index 0000000..ed2a63f Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0985.png differ diff --git a/resources/images/tiles/micropolis_tile_0986.png b/resources/images/tiles/micropolis_tile_0986.png new file mode 100644 index 0000000..a0841a6 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0986.png differ diff --git a/resources/images/tiles/micropolis_tile_0987.png b/resources/images/tiles/micropolis_tile_0987.png new file mode 100644 index 0000000..f6252b0 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0987.png differ diff --git a/resources/images/tiles/micropolis_tile_0988.png b/resources/images/tiles/micropolis_tile_0988.png new file mode 100644 index 0000000..2649148 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0988.png differ diff --git a/resources/images/tiles/micropolis_tile_0989.png b/resources/images/tiles/micropolis_tile_0989.png new file mode 100644 index 0000000..1a1766e Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0989.png differ diff --git a/resources/images/tiles/micropolis_tile_0990.png b/resources/images/tiles/micropolis_tile_0990.png new file mode 100644 index 0000000..37abbcd Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0990.png differ diff --git a/resources/images/tiles/micropolis_tile_0991.png b/resources/images/tiles/micropolis_tile_0991.png new file mode 100644 index 0000000..45ba171 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0991.png differ diff --git a/resources/images/tiles/micropolis_tile_0992.png b/resources/images/tiles/micropolis_tile_0992.png new file mode 100644 index 0000000..06a33cb Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0992.png differ diff --git a/resources/images/tiles/micropolis_tile_0993.png b/resources/images/tiles/micropolis_tile_0993.png new file mode 100644 index 0000000..65a2ef7 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0993.png differ diff --git a/resources/images/tiles/micropolis_tile_0994.png b/resources/images/tiles/micropolis_tile_0994.png new file mode 100644 index 0000000..356f186 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0994.png differ diff --git a/resources/images/tiles/micropolis_tile_0995.png b/resources/images/tiles/micropolis_tile_0995.png new file mode 100644 index 0000000..a0841a6 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0995.png differ diff --git a/resources/images/tiles/micropolis_tile_0996.png b/resources/images/tiles/micropolis_tile_0996.png new file mode 100644 index 0000000..fc1881c Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0996.png differ diff --git a/resources/images/tiles/micropolis_tile_0997.png b/resources/images/tiles/micropolis_tile_0997.png new file mode 100644 index 0000000..cd4b69c Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0997.png differ diff --git a/resources/images/tiles/micropolis_tile_0998.png b/resources/images/tiles/micropolis_tile_0998.png new file mode 100644 index 0000000..1a1766e Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0998.png differ diff --git a/resources/images/tiles/micropolis_tile_0999.png b/resources/images/tiles/micropolis_tile_0999.png new file mode 100644 index 0000000..2262f12 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_0999.png differ diff --git a/resources/images/tiles/micropolis_tile_1000.png b/resources/images/tiles/micropolis_tile_1000.png new file mode 100644 index 0000000..95c3851 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_1000.png differ diff --git a/resources/images/tiles/micropolis_tile_1001.png b/resources/images/tiles/micropolis_tile_1001.png new file mode 100644 index 0000000..06a33cb Binary files /dev/null and b/resources/images/tiles/micropolis_tile_1001.png differ diff --git a/resources/images/tiles/micropolis_tile_1002.png b/resources/images/tiles/micropolis_tile_1002.png new file mode 100644 index 0000000..8f4f290 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_1002.png differ diff --git a/resources/images/tiles/micropolis_tile_1003.png b/resources/images/tiles/micropolis_tile_1003.png new file mode 100644 index 0000000..de14cd9 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_1003.png differ diff --git a/resources/images/tiles/micropolis_tile_1004.png b/resources/images/tiles/micropolis_tile_1004.png new file mode 100644 index 0000000..a0841a6 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_1004.png differ diff --git a/resources/images/tiles/micropolis_tile_1005.png b/resources/images/tiles/micropolis_tile_1005.png new file mode 100644 index 0000000..a9f678f Binary files /dev/null and b/resources/images/tiles/micropolis_tile_1005.png differ diff --git a/resources/images/tiles/micropolis_tile_1006.png b/resources/images/tiles/micropolis_tile_1006.png new file mode 100644 index 0000000..fdbe350 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_1006.png differ diff --git a/resources/images/tiles/micropolis_tile_1007.png b/resources/images/tiles/micropolis_tile_1007.png new file mode 100644 index 0000000..1a1766e Binary files /dev/null and b/resources/images/tiles/micropolis_tile_1007.png differ diff --git a/resources/images/tiles/micropolis_tile_1008.png b/resources/images/tiles/micropolis_tile_1008.png new file mode 100644 index 0000000..72b47e7 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_1008.png differ diff --git a/resources/images/tiles/micropolis_tile_1009.png b/resources/images/tiles/micropolis_tile_1009.png new file mode 100644 index 0000000..3d70e0e Binary files /dev/null and b/resources/images/tiles/micropolis_tile_1009.png differ diff --git a/resources/images/tiles/micropolis_tile_1010.png b/resources/images/tiles/micropolis_tile_1010.png new file mode 100644 index 0000000..06a33cb Binary files /dev/null and b/resources/images/tiles/micropolis_tile_1010.png differ diff --git a/resources/images/tiles/micropolis_tile_1011.png b/resources/images/tiles/micropolis_tile_1011.png new file mode 100644 index 0000000..a9e34b8 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_1011.png differ diff --git a/resources/images/tiles/micropolis_tile_1012.png b/resources/images/tiles/micropolis_tile_1012.png new file mode 100644 index 0000000..b8d5207 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_1012.png differ diff --git a/resources/images/tiles/micropolis_tile_1013.png b/resources/images/tiles/micropolis_tile_1013.png new file mode 100644 index 0000000..a0841a6 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_1013.png differ diff --git a/resources/images/tiles/micropolis_tile_1014.png b/resources/images/tiles/micropolis_tile_1014.png new file mode 100644 index 0000000..5f88132 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_1014.png differ diff --git a/resources/images/tiles/micropolis_tile_1015.png b/resources/images/tiles/micropolis_tile_1015.png new file mode 100644 index 0000000..5bda563 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_1015.png differ diff --git a/resources/images/tiles/micropolis_tile_1016.png b/resources/images/tiles/micropolis_tile_1016.png new file mode 100644 index 0000000..1a1766e Binary files /dev/null and b/resources/images/tiles/micropolis_tile_1016.png differ diff --git a/resources/images/tiles/micropolis_tile_1017.png b/resources/images/tiles/micropolis_tile_1017.png new file mode 100644 index 0000000..a7491a7 Binary files /dev/null and b/resources/images/tiles/micropolis_tile_1017.png differ diff --git a/resources/images/tiles/micropolis_tile_1018.png b/resources/images/tiles/micropolis_tile_1018.png new file mode 100644 index 0000000..4a4e6ba Binary files /dev/null and b/resources/images/tiles/micropolis_tile_1018.png differ diff --git a/resources/images/tiles/micropolis_tile_1019.png b/resources/images/tiles/micropolis_tile_1019.png new file mode 100644 index 0000000..8eaef8e Binary files /dev/null and b/resources/images/tiles/micropolis_tile_1019.png differ diff --git a/resources/images/tiles/micropolis_tile_1020.png b/resources/images/tiles/micropolis_tile_1020.png new file mode 100644 index 0000000..8eaef8e Binary files /dev/null and b/resources/images/tiles/micropolis_tile_1020.png differ diff --git a/resources/images/tiles/micropolis_tile_1021.png b/resources/images/tiles/micropolis_tile_1021.png new file mode 100644 index 0000000..8eaef8e Binary files /dev/null and b/resources/images/tiles/micropolis_tile_1021.png differ diff --git a/resources/images/tiles/micropolis_tile_1022.png b/resources/images/tiles/micropolis_tile_1022.png new file mode 100644 index 0000000..8eaef8e Binary files /dev/null and b/resources/images/tiles/micropolis_tile_1022.png differ diff --git a/resources/images/tiles/micropolis_tile_1023.png b/resources/images/tiles/micropolis_tile_1023.png new file mode 100644 index 0000000..8eaef8e Binary files /dev/null and b/resources/images/tiles/micropolis_tile_1023.png differ diff --git a/resources/images/tiles/micropolis_tiles.png b/resources/images/tiles/micropolis_tiles.png new file mode 100644 index 0000000..9935b11 Binary files /dev/null and b/resources/images/tiles/micropolis_tiles.png differ diff --git a/resources/images/tiles/zone_church.psd b/resources/images/tiles/zone_church.psd new file mode 100644 index 0000000..83af699 Binary files /dev/null and b/resources/images/tiles/zone_church.psd differ diff --git a/resources/images/tiles/zone_church0.png b/resources/images/tiles/zone_church0.png new file mode 100644 index 0000000..e927296 Binary files /dev/null and b/resources/images/tiles/zone_church0.png differ diff --git a/resources/images/tiles/zone_church1.png b/resources/images/tiles/zone_church1.png new file mode 100644 index 0000000..5b08d92 Binary files /dev/null and b/resources/images/tiles/zone_church1.png differ diff --git a/resources/images/tiles/zone_church2.png b/resources/images/tiles/zone_church2.png new file mode 100644 index 0000000..d68fa14 Binary files /dev/null and b/resources/images/tiles/zone_church2.png differ diff --git a/resources/images/tiles/zone_church3.png b/resources/images/tiles/zone_church3.png new file mode 100644 index 0000000..5005fbc Binary files /dev/null and b/resources/images/tiles/zone_church3.png differ diff --git a/resources/images/tiles/zone_church4.png b/resources/images/tiles/zone_church4.png new file mode 100644 index 0000000..dd61dc8 Binary files /dev/null and b/resources/images/tiles/zone_church4.png differ diff --git a/resources/images/tiles/zone_church5.png b/resources/images/tiles/zone_church5.png new file mode 100644 index 0000000..70c9821 Binary files /dev/null and b/resources/images/tiles/zone_church5.png differ diff --git a/resources/images/tiles/zone_church6.png b/resources/images/tiles/zone_church6.png new file mode 100644 index 0000000..3b73c14 Binary files /dev/null and b/resources/images/tiles/zone_church6.png differ diff --git a/resources/images/tiles/zone_church7.png b/resources/images/tiles/zone_church7.png new file mode 100644 index 0000000..f824eca Binary files /dev/null and b/resources/images/tiles/zone_church7.png differ diff --git a/resources/images/tiles/zone_church_pacbot.psd b/resources/images/tiles/zone_church_pacbot.psd new file mode 100644 index 0000000..97880ee Binary files /dev/null and b/resources/images/tiles/zone_church_pacbot.psd differ diff --git a/resources/images/tiles_pixels.png b/resources/images/tiles_pixels.png new file mode 100644 index 0000000..3308b02 Binary files /dev/null and b/resources/images/tiles_pixels.png differ diff --git a/resources/images/tool_airport.png b/resources/images/tool_airport.png new file mode 100644 index 0000000..d8fda36 Binary files /dev/null and b/resources/images/tool_airport.png differ diff --git a/resources/images/tool_airporthi.png b/resources/images/tool_airporthi.png new file mode 100644 index 0000000..ad42218 Binary files /dev/null and b/resources/images/tool_airporthi.png differ diff --git a/resources/images/tool_bulldozer.png b/resources/images/tool_bulldozer.png new file mode 100644 index 0000000..9b1e447 Binary files /dev/null and b/resources/images/tool_bulldozer.png differ diff --git a/resources/images/tool_bulldozerhi.png b/resources/images/tool_bulldozerhi.png new file mode 100644 index 0000000..7c67135 Binary files /dev/null and b/resources/images/tool_bulldozerhi.png differ diff --git a/resources/images/tool_center.png b/resources/images/tool_center.png new file mode 100644 index 0000000..00addc4 Binary files /dev/null and b/resources/images/tool_center.png differ diff --git a/resources/images/tool_centerhi.png b/resources/images/tool_centerhi.png new file mode 100644 index 0000000..69f6736 Binary files /dev/null and b/resources/images/tool_centerhi.png differ diff --git a/resources/images/tool_chalk.png b/resources/images/tool_chalk.png new file mode 100644 index 0000000..b1cbfc2 Binary files /dev/null and b/resources/images/tool_chalk.png differ diff --git a/resources/images/tool_chalkhi.png b/resources/images/tool_chalkhi.png new file mode 100644 index 0000000..d6a288a Binary files /dev/null and b/resources/images/tool_chalkhi.png differ diff --git a/resources/images/tool_coalpower.png b/resources/images/tool_coalpower.png new file mode 100644 index 0000000..eb88a94 Binary files /dev/null and b/resources/images/tool_coalpower.png differ diff --git a/resources/images/tool_coalpowerhi.png b/resources/images/tool_coalpowerhi.png new file mode 100644 index 0000000..5eda8be Binary files /dev/null and b/resources/images/tool_coalpowerhi.png differ diff --git a/resources/images/tool_commercial.png b/resources/images/tool_commercial.png new file mode 100644 index 0000000..8aa6611 Binary files /dev/null and b/resources/images/tool_commercial.png differ diff --git a/resources/images/tool_commercialhi.png b/resources/images/tool_commercialhi.png new file mode 100644 index 0000000..7664b5b Binary files /dev/null and b/resources/images/tool_commercialhi.png differ diff --git a/resources/images/tool_eraser.png b/resources/images/tool_eraser.png new file mode 100644 index 0000000..6f348a9 Binary files /dev/null and b/resources/images/tool_eraser.png differ diff --git a/resources/images/tool_eraserhi.png b/resources/images/tool_eraserhi.png new file mode 100644 index 0000000..ba3b436 Binary files /dev/null and b/resources/images/tool_eraserhi.png differ diff --git a/resources/images/tool_firestation.png b/resources/images/tool_firestation.png new file mode 100644 index 0000000..a540242 Binary files /dev/null and b/resources/images/tool_firestation.png differ diff --git a/resources/images/tool_firestationhi.png b/resources/images/tool_firestationhi.png new file mode 100644 index 0000000..be81c8d Binary files /dev/null and b/resources/images/tool_firestationhi.png differ diff --git a/resources/images/tool_industrial.png b/resources/images/tool_industrial.png new file mode 100644 index 0000000..a9fb908 Binary files /dev/null and b/resources/images/tool_industrial.png differ diff --git a/resources/images/tool_industrialhi.png b/resources/images/tool_industrialhi.png new file mode 100644 index 0000000..e8a9eaf Binary files /dev/null and b/resources/images/tool_industrialhi.png differ diff --git a/resources/images/tool_nuclearpower.png b/resources/images/tool_nuclearpower.png new file mode 100644 index 0000000..53816d2 Binary files /dev/null and b/resources/images/tool_nuclearpower.png differ diff --git a/resources/images/tool_nuclearpowerhi.png b/resources/images/tool_nuclearpowerhi.png new file mode 100644 index 0000000..5eab439 Binary files /dev/null and b/resources/images/tool_nuclearpowerhi.png differ diff --git a/resources/images/tool_pacbot.png b/resources/images/tool_pacbot.png new file mode 100644 index 0000000..9467d42 Binary files /dev/null and b/resources/images/tool_pacbot.png differ diff --git a/resources/images/tool_pacbothi.png b/resources/images/tool_pacbothi.png new file mode 100644 index 0000000..5d13082 Binary files /dev/null and b/resources/images/tool_pacbothi.png differ diff --git a/resources/images/tool_park.png b/resources/images/tool_park.png new file mode 100644 index 0000000..de0cc4d Binary files /dev/null and b/resources/images/tool_park.png differ diff --git a/resources/images/tool_parkhi.png b/resources/images/tool_parkhi.png new file mode 100644 index 0000000..057bcc9 Binary files /dev/null and b/resources/images/tool_parkhi.png differ diff --git a/resources/images/tool_policestation.png b/resources/images/tool_policestation.png new file mode 100644 index 0000000..a50496f Binary files /dev/null and b/resources/images/tool_policestation.png differ diff --git a/resources/images/tool_policestationhi.png b/resources/images/tool_policestationhi.png new file mode 100644 index 0000000..d206f4a Binary files /dev/null and b/resources/images/tool_policestationhi.png differ diff --git a/resources/images/tool_query.png b/resources/images/tool_query.png new file mode 100644 index 0000000..e8469a6 Binary files /dev/null and b/resources/images/tool_query.png differ diff --git a/resources/images/tool_queryhi.png b/resources/images/tool_queryhi.png new file mode 100644 index 0000000..b481635 Binary files /dev/null and b/resources/images/tool_queryhi.png differ diff --git a/resources/images/tool_railroad.png b/resources/images/tool_railroad.png new file mode 100644 index 0000000..09bc61f Binary files /dev/null and b/resources/images/tool_railroad.png differ diff --git a/resources/images/tool_railroadhi.png b/resources/images/tool_railroadhi.png new file mode 100644 index 0000000..d4575a5 Binary files /dev/null and b/resources/images/tool_railroadhi.png differ diff --git a/resources/images/tool_residential.png b/resources/images/tool_residential.png new file mode 100644 index 0000000..c3830e7 Binary files /dev/null and b/resources/images/tool_residential.png differ diff --git a/resources/images/tool_residentialhi.png b/resources/images/tool_residentialhi.png new file mode 100644 index 0000000..e31cd16 Binary files /dev/null and b/resources/images/tool_residentialhi.png differ diff --git a/resources/images/tool_road.png b/resources/images/tool_road.png new file mode 100644 index 0000000..ef1029a Binary files /dev/null and b/resources/images/tool_road.png differ diff --git a/resources/images/tool_roadhi.png b/resources/images/tool_roadhi.png new file mode 100644 index 0000000..6bd669d Binary files /dev/null and b/resources/images/tool_roadhi.png differ diff --git a/resources/images/tool_seaport.png b/resources/images/tool_seaport.png new file mode 100644 index 0000000..a536152 Binary files /dev/null and b/resources/images/tool_seaport.png differ diff --git a/resources/images/tool_seaporthi.png b/resources/images/tool_seaporthi.png new file mode 100644 index 0000000..00f5691 Binary files /dev/null and b/resources/images/tool_seaporthi.png differ diff --git a/resources/images/tool_stadium.png b/resources/images/tool_stadium.png new file mode 100644 index 0000000..8401d20 Binary files /dev/null and b/resources/images/tool_stadium.png differ diff --git a/resources/images/tool_stadiumhi.png b/resources/images/tool_stadiumhi.png new file mode 100644 index 0000000..254a06a Binary files /dev/null and b/resources/images/tool_stadiumhi.png differ diff --git a/resources/images/tool_wire.png b/resources/images/tool_wire.png new file mode 100644 index 0000000..7bf026c Binary files /dev/null and b/resources/images/tool_wire.png differ diff --git a/resources/images/tool_wirehi.png b/resources/images/tool_wirehi.png new file mode 100644 index 0000000..d3aa6de Binary files /dev/null and b/resources/images/tool_wirehi.png differ diff --git a/resources/sounds/HeavyTraffic.mp3 b/resources/sounds/HeavyTraffic.mp3 new file mode 100644 index 0000000..9ffead5 Binary files /dev/null and b/resources/sounds/HeavyTraffic.mp3 differ diff --git a/resources/sounds/Monster.mp3 b/resources/sounds/Monster.mp3 new file mode 100644 index 0000000..97ab96c Binary files /dev/null and b/resources/sounds/Monster.mp3 differ diff --git a/resources/sounds/Siren.mp3 b/resources/sounds/Siren.mp3 new file mode 100644 index 0000000..6cd71d9 Binary files /dev/null and b/resources/sounds/Siren.mp3 differ diff --git a/resources/sounds/Sorry.mp3 b/resources/sounds/Sorry.mp3 new file mode 100644 index 0000000..26fce11 Binary files /dev/null and b/resources/sounds/Sorry.mp3 differ diff --git a/resources/sounds/UhUh.mp3 b/resources/sounds/UhUh.mp3 new file mode 100644 index 0000000..de5c416 Binary files /dev/null and b/resources/sounds/UhUh.mp3 differ diff --git a/resources/sounds/a.mp3 b/resources/sounds/a.mp3 new file mode 100644 index 0000000..eb5e06c Binary files /dev/null and b/resources/sounds/a.mp3 differ diff --git a/resources/sounds/aaah.mp3 b/resources/sounds/aaah.mp3 new file mode 100644 index 0000000..0be5ed1 Binary files /dev/null and b/resources/sounds/aaah.mp3 differ diff --git a/resources/sounds/airport.mp3 b/resources/sounds/airport.mp3 new file mode 100644 index 0000000..0f5ec96 Binary files /dev/null and b/resources/sounds/airport.mp3 differ diff --git a/resources/sounds/beep.mp3 b/resources/sounds/beep.mp3 new file mode 100644 index 0000000..6a667f0 Binary files /dev/null and b/resources/sounds/beep.mp3 differ diff --git a/resources/sounds/boing.mp3 b/resources/sounds/boing.mp3 new file mode 100644 index 0000000..13120c7 Binary files /dev/null and b/resources/sounds/boing.mp3 differ diff --git a/resources/sounds/bop.mp3 b/resources/sounds/bop.mp3 new file mode 100644 index 0000000..95fa6d8 Binary files /dev/null and b/resources/sounds/bop.mp3 differ diff --git a/resources/sounds/build.mp3 b/resources/sounds/build.mp3 new file mode 100644 index 0000000..9e21c41 Binary files /dev/null and b/resources/sounds/build.mp3 differ diff --git a/resources/sounds/bulldozer.mp3 b/resources/sounds/bulldozer.mp3 new file mode 100644 index 0000000..cd3f4d9 Binary files /dev/null and b/resources/sounds/bulldozer.mp3 differ diff --git a/resources/sounds/chalk.mp3 b/resources/sounds/chalk.mp3 new file mode 100644 index 0000000..1fe88e7 Binary files /dev/null and b/resources/sounds/chalk.mp3 differ diff --git a/resources/sounds/coal.mp3 b/resources/sounds/coal.mp3 new file mode 100644 index 0000000..2174cb7 Binary files /dev/null and b/resources/sounds/coal.mp3 differ diff --git a/resources/sounds/computer.mp3 b/resources/sounds/computer.mp3 new file mode 100644 index 0000000..8f2a079 Binary files /dev/null and b/resources/sounds/computer.mp3 differ diff --git a/resources/sounds/cuckoo.mp3 b/resources/sounds/cuckoo.mp3 new file mode 100644 index 0000000..5d94972 Binary files /dev/null and b/resources/sounds/cuckoo.mp3 differ diff --git a/resources/sounds/e.mp3 b/resources/sounds/e.mp3 new file mode 100644 index 0000000..bc084e4 Binary files /dev/null and b/resources/sounds/e.mp3 differ diff --git a/resources/sounds/eraser.mp3 b/resources/sounds/eraser.mp3 new file mode 100644 index 0000000..6de2ee7 Binary files /dev/null and b/resources/sounds/eraser.mp3 differ diff --git a/resources/sounds/explosion-hi.mp3 b/resources/sounds/explosion-hi.mp3 new file mode 100644 index 0000000..739ce49 Binary files /dev/null and b/resources/sounds/explosion-hi.mp3 differ diff --git a/resources/sounds/explosion-high.mp3 b/resources/sounds/explosion-high.mp3 new file mode 100644 index 0000000..4241768 Binary files /dev/null and b/resources/sounds/explosion-high.mp3 differ diff --git a/resources/sounds/explosion-low.mp3 b/resources/sounds/explosion-low.mp3 new file mode 100644 index 0000000..7afbb45 Binary files /dev/null and b/resources/sounds/explosion-low.mp3 differ diff --git a/resources/sounds/fire.mp3 b/resources/sounds/fire.mp3 new file mode 100644 index 0000000..413cf88 Binary files /dev/null and b/resources/sounds/fire.mp3 differ diff --git a/resources/sounds/honkhonk-hi.mp3 b/resources/sounds/honkhonk-hi.mp3 new file mode 100644 index 0000000..d9a1a97 Binary files /dev/null and b/resources/sounds/honkhonk-hi.mp3 differ diff --git a/resources/sounds/honkhonk-high.mp3 b/resources/sounds/honkhonk-high.mp3 new file mode 100644 index 0000000..eb075c8 Binary files /dev/null and b/resources/sounds/honkhonk-high.mp3 differ diff --git a/resources/sounds/honkhonk-med.mp3 b/resources/sounds/honkhonk-med.mp3 new file mode 100644 index 0000000..9252780 Binary files /dev/null and b/resources/sounds/honkhonk-med.mp3 differ diff --git a/resources/sounds/ignition.mp3 b/resources/sounds/ignition.mp3 new file mode 100644 index 0000000..d451a86 Binary files /dev/null and b/resources/sounds/ignition.mp3 differ diff --git a/resources/sounds/ind.mp3 b/resources/sounds/ind.mp3 new file mode 100644 index 0000000..dec97b5 Binary files /dev/null and b/resources/sounds/ind.mp3 differ diff --git a/resources/sounds/o.mp3 b/resources/sounds/o.mp3 new file mode 100644 index 0000000..428a632 Binary files /dev/null and b/resources/sounds/o.mp3 differ diff --git a/resources/sounds/oop.mp3 b/resources/sounds/oop.mp3 new file mode 100644 index 0000000..9865850 Binary files /dev/null and b/resources/sounds/oop.mp3 differ diff --git a/resources/sounds/park.mp3 b/resources/sounds/park.mp3 new file mode 100644 index 0000000..e237e77 Binary files /dev/null and b/resources/sounds/park.mp3 differ diff --git a/resources/sounds/police.mp3 b/resources/sounds/police.mp3 new file mode 100644 index 0000000..7677788 Binary files /dev/null and b/resources/sounds/police.mp3 differ diff --git a/resources/sounds/quack.mp3 b/resources/sounds/quack.mp3 new file mode 100644 index 0000000..0ea8197 Binary files /dev/null and b/resources/sounds/quack.mp3 differ diff --git a/resources/sounds/quackquack.mp3 b/resources/sounds/quackquack.mp3 new file mode 100644 index 0000000..6eb2a65 Binary files /dev/null and b/resources/sounds/quackquack.mp3 differ diff --git a/resources/sounds/query.mp3 b/resources/sounds/query.mp3 new file mode 100644 index 0000000..0d4c947 Binary files /dev/null and b/resources/sounds/query.mp3 differ diff --git a/resources/sounds/rail.mp3 b/resources/sounds/rail.mp3 new file mode 100644 index 0000000..b09e4de Binary files /dev/null and b/resources/sounds/rail.mp3 differ diff --git a/resources/sounds/res.mp3 b/resources/sounds/res.mp3 new file mode 100644 index 0000000..a8b5dff Binary files /dev/null and b/resources/sounds/res.mp3 differ diff --git a/resources/sounds/road.mp3 b/resources/sounds/road.mp3 new file mode 100644 index 0000000..2275d2d Binary files /dev/null and b/resources/sounds/road.mp3 differ diff --git a/resources/sounds/rumble.mp3 b/resources/sounds/rumble.mp3 new file mode 100644 index 0000000..e393b8a Binary files /dev/null and b/resources/sounds/rumble.mp3 differ diff --git a/resources/sounds/seaport.mp3 b/resources/sounds/seaport.mp3 new file mode 100644 index 0000000..c3e4183 Binary files /dev/null and b/resources/sounds/seaport.mp3 differ diff --git a/resources/sounds/skid.mp3 b/resources/sounds/skid.mp3 new file mode 100644 index 0000000..9fe926a Binary files /dev/null and b/resources/sounds/skid.mp3 differ diff --git a/resources/sounds/stadium.mp3 b/resources/sounds/stadium.mp3 new file mode 100644 index 0000000..dcb10b9 Binary files /dev/null and b/resources/sounds/stadium.mp3 differ diff --git a/resources/sounds/whip.mp3 b/resources/sounds/whip.mp3 new file mode 100644 index 0000000..5fd6561 Binary files /dev/null and b/resources/sounds/whip.mp3 differ diff --git a/resources/sounds/wire.mp3 b/resources/sounds/wire.mp3 new file mode 100644 index 0000000..f1e3afa Binary files /dev/null and b/resources/sounds/wire.mp3 differ diff --git a/resources/sounds/woosh.mp3 b/resources/sounds/woosh.mp3 new file mode 100644 index 0000000..813692b Binary files /dev/null and b/resources/sounds/woosh.mp3 differ diff --git a/resources/sounds/zone.mp3 b/resources/sounds/zone.mp3 new file mode 100644 index 0000000..de13f8b Binary files /dev/null and b/resources/sounds/zone.mp3 differ diff --git a/resources/tilesets/ancientasia/asia.bmp b/resources/tilesets/ancientasia/asia.bmp new file mode 100644 index 0000000..4ff2cb3 Binary files /dev/null and b/resources/tilesets/ancientasia/asia.bmp differ diff --git a/resources/tilesets/ancientasia/bmp00001.bmp b/resources/tilesets/ancientasia/bmp00001.bmp new file mode 100644 index 0000000..a0cc2f3 Binary files /dev/null and b/resources/tilesets/ancientasia/bmp00001.bmp differ diff --git a/resources/tilesets/ancientasia/chopper.bmp b/resources/tilesets/ancientasia/chopper.bmp new file mode 100644 index 0000000..031e408 Binary files /dev/null and b/resources/tilesets/ancientasia/chopper.bmp differ diff --git a/resources/tilesets/ancientasia/cmdbar.bmp b/resources/tilesets/ancientasia/cmdbar.bmp new file mode 100644 index 0000000..8a3319e Binary files /dev/null and b/resources/tilesets/ancientasia/cmdbar.bmp differ diff --git a/resources/tilesets/ancientasia/edittool.bmp b/resources/tilesets/ancientasia/edittool.bmp new file mode 100644 index 0000000..1debfe4 Binary files /dev/null and b/resources/tilesets/ancientasia/edittool.bmp differ diff --git a/resources/tilesets/ancientasia/explode.bmp b/resources/tilesets/ancientasia/explode.bmp new file mode 100644 index 0000000..7040692 Binary files /dev/null and b/resources/tilesets/ancientasia/explode.bmp differ diff --git a/resources/tilesets/ancientasia/graphtoo.bmp b/resources/tilesets/ancientasia/graphtoo.bmp new file mode 100644 index 0000000..7458738 Binary files /dev/null and b/resources/tilesets/ancientasia/graphtoo.bmp differ diff --git a/resources/tilesets/ancientasia/icon1.ico b/resources/tilesets/ancientasia/icon1.ico new file mode 100644 index 0000000..026a855 Binary files /dev/null and b/resources/tilesets/ancientasia/icon1.ico differ diff --git a/resources/tilesets/ancientasia/idr_grap.ico b/resources/tilesets/ancientasia/idr_grap.ico new file mode 100644 index 0000000..6842d96 Binary files /dev/null and b/resources/tilesets/ancientasia/idr_grap.ico differ diff --git a/resources/tilesets/ancientasia/idr_mapf.ico b/resources/tilesets/ancientasia/idr_mapf.ico new file mode 100644 index 0000000..e226b61 Binary files /dev/null and b/resources/tilesets/ancientasia/idr_mapf.ico differ diff --git a/resources/tilesets/ancientasia/mapchopp.bmp b/resources/tilesets/ancientasia/mapchopp.bmp new file mode 100644 index 0000000..0da51a2 Binary files /dev/null and b/resources/tilesets/ancientasia/mapchopp.bmp differ diff --git a/resources/tilesets/ancientasia/mapmonst.bmp b/resources/tilesets/ancientasia/mapmonst.bmp new file mode 100644 index 0000000..3995209 Binary files /dev/null and b/resources/tilesets/ancientasia/mapmonst.bmp differ diff --git a/resources/tilesets/ancientasia/mapplane.bmp b/resources/tilesets/ancientasia/mapplane.bmp new file mode 100644 index 0000000..44357e8 Binary files /dev/null and b/resources/tilesets/ancientasia/mapplane.bmp differ diff --git a/resources/tilesets/ancientasia/maptools.bmp b/resources/tilesets/ancientasia/maptools.bmp new file mode 100644 index 0000000..882e042 Binary files /dev/null and b/resources/tilesets/ancientasia/maptools.bmp differ diff --git a/resources/tilesets/ancientasia/maptorna.bmp b/resources/tilesets/ancientasia/maptorna.bmp new file mode 100644 index 0000000..317378b Binary files /dev/null and b/resources/tilesets/ancientasia/maptorna.bmp differ diff --git a/resources/tilesets/ancientasia/maptrain.bmp b/resources/tilesets/ancientasia/maptrain.bmp new file mode 100644 index 0000000..2c530b1 Binary files /dev/null and b/resources/tilesets/ancientasia/maptrain.bmp differ diff --git a/resources/tilesets/ancientasia/monster.bmp b/resources/tilesets/ancientasia/monster.bmp new file mode 100644 index 0000000..f19741e Binary files /dev/null and b/resources/tilesets/ancientasia/monster.bmp differ diff --git a/resources/tilesets/ancientasia/mptesdoc.ico b/resources/tilesets/ancientasia/mptesdoc.ico new file mode 100644 index 0000000..386a06e Binary files /dev/null and b/resources/tilesets/ancientasia/mptesdoc.ico differ diff --git a/resources/tilesets/ancientasia/mptest.ico b/resources/tilesets/ancientasia/mptest.ico new file mode 100644 index 0000000..7d564f8 Binary files /dev/null and b/resources/tilesets/ancientasia/mptest.ico differ diff --git a/resources/tilesets/ancientasia/plane.bmp b/resources/tilesets/ancientasia/plane.bmp new file mode 100644 index 0000000..184e307 Binary files /dev/null and b/resources/tilesets/ancientasia/plane.bmp differ diff --git a/resources/tilesets/ancientasia/scen0u.bmp b/resources/tilesets/ancientasia/scen0u.bmp new file mode 100644 index 0000000..de46f99 Binary files /dev/null and b/resources/tilesets/ancientasia/scen0u.bmp differ diff --git a/resources/tilesets/ancientasia/scen1u.bmp b/resources/tilesets/ancientasia/scen1u.bmp new file mode 100644 index 0000000..85e8b59 Binary files /dev/null and b/resources/tilesets/ancientasia/scen1u.bmp differ diff --git a/resources/tilesets/ancientasia/scen2u.bmp b/resources/tilesets/ancientasia/scen2u.bmp new file mode 100644 index 0000000..c75f7e3 Binary files /dev/null and b/resources/tilesets/ancientasia/scen2u.bmp differ diff --git a/resources/tilesets/ancientasia/scen3u.bmp b/resources/tilesets/ancientasia/scen3u.bmp new file mode 100644 index 0000000..ca0e92f Binary files /dev/null and b/resources/tilesets/ancientasia/scen3u.bmp differ diff --git a/resources/tilesets/ancientasia/scen4u.bmp b/resources/tilesets/ancientasia/scen4u.bmp new file mode 100644 index 0000000..762b2f2 Binary files /dev/null and b/resources/tilesets/ancientasia/scen4u.bmp differ diff --git a/resources/tilesets/ancientasia/scen5u.bmp b/resources/tilesets/ancientasia/scen5u.bmp new file mode 100644 index 0000000..023c7bd Binary files /dev/null and b/resources/tilesets/ancientasia/scen5u.bmp differ diff --git a/resources/tilesets/ancientasia/scen6u.bmp b/resources/tilesets/ancientasia/scen6u.bmp new file mode 100644 index 0000000..a5dd285 Binary files /dev/null and b/resources/tilesets/ancientasia/scen6u.bmp differ diff --git a/resources/tilesets/ancientasia/scen7u.bmp b/resources/tilesets/ancientasia/scen7u.bmp new file mode 100644 index 0000000..fdd4caa Binary files /dev/null and b/resources/tilesets/ancientasia/scen7u.bmp differ diff --git a/resources/tilesets/ancientasia/scusasia.rc2 b/resources/tilesets/ancientasia/scusasia.rc2 new file mode 100644 index 0000000..300a478 --- /dev/null +++ b/resources/tilesets/ancientasia/scusasia.rc2 @@ -0,0 +1,13 @@ +// +// SCUSASIA.RC2 - resources Microsoft Visual C++ does not edit directly +// + +#ifdef APSTUDIO_INVOKED + #error this file is not editable by Microsoft Visual C++ +#endif //APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// Add manually edited resources here... + +///////////////////////////////////////////////////////////////////////////// diff --git a/resources/tilesets/ancientasia/ship.bmp b/resources/tilesets/ancientasia/ship.bmp new file mode 100644 index 0000000..4d464e0 Binary files /dev/null and b/resources/tilesets/ancientasia/ship.bmp differ diff --git a/resources/tilesets/ancientasia/smltitle.bmp b/resources/tilesets/ancientasia/smltitle.bmp new file mode 100644 index 0000000..77fbdd3 Binary files /dev/null and b/resources/tilesets/ancientasia/smltitle.bmp differ diff --git a/resources/tilesets/ancientasia/tiles.bmp b/resources/tilesets/ancientasia/tiles.bmp new file mode 100644 index 0000000..07f8cd7 Binary files /dev/null and b/resources/tilesets/ancientasia/tiles.bmp differ diff --git a/resources/tilesets/ancientasia/toolbar.bmp b/resources/tilesets/ancientasia/toolbar.bmp new file mode 100644 index 0000000..8518641 Binary files /dev/null and b/resources/tilesets/ancientasia/toolbar.bmp differ diff --git a/resources/tilesets/ancientasia/tornado.bmp b/resources/tilesets/ancientasia/tornado.bmp new file mode 100644 index 0000000..8a7bae9 Binary files /dev/null and b/resources/tilesets/ancientasia/tornado.bmp differ diff --git a/resources/tilesets/ancientasia/train.bmp b/resources/tilesets/ancientasia/train.bmp new file mode 100644 index 0000000..bb62964 Binary files /dev/null and b/resources/tilesets/ancientasia/train.bmp differ diff --git a/resources/tilesets/classic/bmp00001.bmp b/resources/tilesets/classic/bmp00001.bmp new file mode 100644 index 0000000..a0cc2f3 Binary files /dev/null and b/resources/tilesets/classic/bmp00001.bmp differ diff --git a/resources/tilesets/classic/chopper.bmp b/resources/tilesets/classic/chopper.bmp new file mode 100644 index 0000000..13114fd Binary files /dev/null and b/resources/tilesets/classic/chopper.bmp differ diff --git a/resources/tilesets/classic/cmdbar.bmp b/resources/tilesets/classic/cmdbar.bmp new file mode 100644 index 0000000..8a3319e Binary files /dev/null and b/resources/tilesets/classic/cmdbar.bmp differ diff --git a/resources/tilesets/classic/edittool.bmp b/resources/tilesets/classic/edittool.bmp new file mode 100644 index 0000000..a4df716 Binary files /dev/null and b/resources/tilesets/classic/edittool.bmp differ diff --git a/resources/tilesets/classic/explode.bmp b/resources/tilesets/classic/explode.bmp new file mode 100644 index 0000000..7040692 Binary files /dev/null and b/resources/tilesets/classic/explode.bmp differ diff --git a/resources/tilesets/classic/graphtoo.bmp b/resources/tilesets/classic/graphtoo.bmp new file mode 100644 index 0000000..7458738 Binary files /dev/null and b/resources/tilesets/classic/graphtoo.bmp differ diff --git a/resources/tilesets/classic/icon1.ico b/resources/tilesets/classic/icon1.ico new file mode 100644 index 0000000..026a855 Binary files /dev/null and b/resources/tilesets/classic/icon1.ico differ diff --git a/resources/tilesets/classic/idr_grap.ico b/resources/tilesets/classic/idr_grap.ico new file mode 100644 index 0000000..6842d96 Binary files /dev/null and b/resources/tilesets/classic/idr_grap.ico differ diff --git a/resources/tilesets/classic/idr_mapf.ico b/resources/tilesets/classic/idr_mapf.ico new file mode 100644 index 0000000..e226b61 Binary files /dev/null and b/resources/tilesets/classic/idr_mapf.ico differ diff --git a/resources/tilesets/classic/mapchopp.bmp b/resources/tilesets/classic/mapchopp.bmp new file mode 100644 index 0000000..0da51a2 Binary files /dev/null and b/resources/tilesets/classic/mapchopp.bmp differ diff --git a/resources/tilesets/classic/mapmonst.bmp b/resources/tilesets/classic/mapmonst.bmp new file mode 100644 index 0000000..3995209 Binary files /dev/null and b/resources/tilesets/classic/mapmonst.bmp differ diff --git a/resources/tilesets/classic/mapplane.bmp b/resources/tilesets/classic/mapplane.bmp new file mode 100644 index 0000000..44357e8 Binary files /dev/null and b/resources/tilesets/classic/mapplane.bmp differ diff --git a/resources/tilesets/classic/maptools.bmp b/resources/tilesets/classic/maptools.bmp new file mode 100644 index 0000000..882e042 Binary files /dev/null and b/resources/tilesets/classic/maptools.bmp differ diff --git a/resources/tilesets/classic/maptorna.bmp b/resources/tilesets/classic/maptorna.bmp new file mode 100644 index 0000000..317378b Binary files /dev/null and b/resources/tilesets/classic/maptorna.bmp differ diff --git a/resources/tilesets/classic/maptrain.bmp b/resources/tilesets/classic/maptrain.bmp new file mode 100644 index 0000000..2c530b1 Binary files /dev/null and b/resources/tilesets/classic/maptrain.bmp differ diff --git a/resources/tilesets/classic/monster.bmp b/resources/tilesets/classic/monster.bmp new file mode 100644 index 0000000..f19741e Binary files /dev/null and b/resources/tilesets/classic/monster.bmp differ diff --git a/resources/tilesets/classic/mptesdoc.ico b/resources/tilesets/classic/mptesdoc.ico new file mode 100644 index 0000000..386a06e Binary files /dev/null and b/resources/tilesets/classic/mptesdoc.ico differ diff --git a/resources/tilesets/classic/mptest.ico b/resources/tilesets/classic/mptest.ico new file mode 100644 index 0000000..7d564f8 Binary files /dev/null and b/resources/tilesets/classic/mptest.ico differ diff --git a/resources/tilesets/classic/plane.bmp b/resources/tilesets/classic/plane.bmp new file mode 100644 index 0000000..3573c8a Binary files /dev/null and b/resources/tilesets/classic/plane.bmp differ diff --git a/resources/tilesets/classic/scen0u.bmp b/resources/tilesets/classic/scen0u.bmp new file mode 100644 index 0000000..de46f99 Binary files /dev/null and b/resources/tilesets/classic/scen0u.bmp differ diff --git a/resources/tilesets/classic/scen1u.bmp b/resources/tilesets/classic/scen1u.bmp new file mode 100644 index 0000000..85e8b59 Binary files /dev/null and b/resources/tilesets/classic/scen1u.bmp differ diff --git a/resources/tilesets/classic/scen2u.bmp b/resources/tilesets/classic/scen2u.bmp new file mode 100644 index 0000000..c75f7e3 Binary files /dev/null and b/resources/tilesets/classic/scen2u.bmp differ diff --git a/resources/tilesets/classic/scen3u.bmp b/resources/tilesets/classic/scen3u.bmp new file mode 100644 index 0000000..ca0e92f Binary files /dev/null and b/resources/tilesets/classic/scen3u.bmp differ diff --git a/resources/tilesets/classic/scen4u.bmp b/resources/tilesets/classic/scen4u.bmp new file mode 100644 index 0000000..762b2f2 Binary files /dev/null and b/resources/tilesets/classic/scen4u.bmp differ diff --git a/resources/tilesets/classic/scen5u.bmp b/resources/tilesets/classic/scen5u.bmp new file mode 100644 index 0000000..023c7bd Binary files /dev/null and b/resources/tilesets/classic/scen5u.bmp differ diff --git a/resources/tilesets/classic/scen6u.bmp b/resources/tilesets/classic/scen6u.bmp new file mode 100644 index 0000000..a5dd285 Binary files /dev/null and b/resources/tilesets/classic/scen6u.bmp differ diff --git a/resources/tilesets/classic/scen7u.bmp b/resources/tilesets/classic/scen7u.bmp new file mode 100644 index 0000000..fdd4caa Binary files /dev/null and b/resources/tilesets/classic/scen7u.bmp differ diff --git a/resources/tilesets/classic/scusclas.rc2 b/resources/tilesets/classic/scusclas.rc2 new file mode 100644 index 0000000..6f8fec0 --- /dev/null +++ b/resources/tilesets/classic/scusclas.rc2 @@ -0,0 +1,13 @@ +// +// SCUSCLAS.RC2 - resources Microsoft Visual C++ does not edit directly +// + +#ifdef APSTUDIO_INVOKED + #error this file is not editable by Microsoft Visual C++ +#endif //APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// Add manually edited resources here... + +///////////////////////////////////////////////////////////////////////////// diff --git a/resources/tilesets/classic/ship.bmp b/resources/tilesets/classic/ship.bmp new file mode 100644 index 0000000..766d753 Binary files /dev/null and b/resources/tilesets/classic/ship.bmp differ diff --git a/resources/tilesets/classic/smltitle.bmp b/resources/tilesets/classic/smltitle.bmp new file mode 100644 index 0000000..77fbdd3 Binary files /dev/null and b/resources/tilesets/classic/smltitle.bmp differ diff --git a/resources/tilesets/classic/splash.bmp b/resources/tilesets/classic/splash.bmp new file mode 100644 index 0000000..928e860 Binary files /dev/null and b/resources/tilesets/classic/splash.bmp differ diff --git a/resources/tilesets/classic/tiles.bmp b/resources/tilesets/classic/tiles.bmp new file mode 100644 index 0000000..07f8cd7 Binary files /dev/null and b/resources/tilesets/classic/tiles.bmp differ diff --git a/resources/tilesets/classic/toolbar.bmp b/resources/tilesets/classic/toolbar.bmp new file mode 100644 index 0000000..8518641 Binary files /dev/null and b/resources/tilesets/classic/toolbar.bmp differ diff --git a/resources/tilesets/classic/tornado.bmp b/resources/tilesets/classic/tornado.bmp new file mode 100644 index 0000000..8a7bae9 Binary files /dev/null and b/resources/tilesets/classic/tornado.bmp differ diff --git a/resources/tilesets/classic/train.bmp b/resources/tilesets/classic/train.bmp new file mode 100644 index 0000000..95c8f6a Binary files /dev/null and b/resources/tilesets/classic/train.bmp differ diff --git a/resources/tilesets/classic95/bmp00001.bmp b/resources/tilesets/classic95/bmp00001.bmp new file mode 100644 index 0000000..a0cc2f3 Binary files /dev/null and b/resources/tilesets/classic95/bmp00001.bmp differ diff --git a/resources/tilesets/classic95/chopper.bmp b/resources/tilesets/classic95/chopper.bmp new file mode 100644 index 0000000..13114fd Binary files /dev/null and b/resources/tilesets/classic95/chopper.bmp differ diff --git a/resources/tilesets/classic95/cmdbar.bmp b/resources/tilesets/classic95/cmdbar.bmp new file mode 100644 index 0000000..8a3319e Binary files /dev/null and b/resources/tilesets/classic95/cmdbar.bmp differ diff --git a/resources/tilesets/classic95/edittool.bmp b/resources/tilesets/classic95/edittool.bmp new file mode 100644 index 0000000..3782e6f Binary files /dev/null and b/resources/tilesets/classic95/edittool.bmp differ diff --git a/resources/tilesets/classic95/explode.bmp b/resources/tilesets/classic95/explode.bmp new file mode 100644 index 0000000..7040692 Binary files /dev/null and b/resources/tilesets/classic95/explode.bmp differ diff --git a/resources/tilesets/classic95/graphtoo.bmp b/resources/tilesets/classic95/graphtoo.bmp new file mode 100644 index 0000000..7458738 Binary files /dev/null and b/resources/tilesets/classic95/graphtoo.bmp differ diff --git a/resources/tilesets/classic95/icon1.ico b/resources/tilesets/classic95/icon1.ico new file mode 100644 index 0000000..026a855 Binary files /dev/null and b/resources/tilesets/classic95/icon1.ico differ diff --git a/resources/tilesets/classic95/idr_grap.ico b/resources/tilesets/classic95/idr_grap.ico new file mode 100644 index 0000000..6842d96 Binary files /dev/null and b/resources/tilesets/classic95/idr_grap.ico differ diff --git a/resources/tilesets/classic95/idr_mapf.ico b/resources/tilesets/classic95/idr_mapf.ico new file mode 100644 index 0000000..e226b61 Binary files /dev/null and b/resources/tilesets/classic95/idr_mapf.ico differ diff --git a/resources/tilesets/classic95/mapchopp.bmp b/resources/tilesets/classic95/mapchopp.bmp new file mode 100644 index 0000000..0da51a2 Binary files /dev/null and b/resources/tilesets/classic95/mapchopp.bmp differ diff --git a/resources/tilesets/classic95/mapmonst.bmp b/resources/tilesets/classic95/mapmonst.bmp new file mode 100644 index 0000000..3995209 Binary files /dev/null and b/resources/tilesets/classic95/mapmonst.bmp differ diff --git a/resources/tilesets/classic95/mapplane.bmp b/resources/tilesets/classic95/mapplane.bmp new file mode 100644 index 0000000..44357e8 Binary files /dev/null and b/resources/tilesets/classic95/mapplane.bmp differ diff --git a/resources/tilesets/classic95/maptools.bmp b/resources/tilesets/classic95/maptools.bmp new file mode 100644 index 0000000..882e042 Binary files /dev/null and b/resources/tilesets/classic95/maptools.bmp differ diff --git a/resources/tilesets/classic95/maptorna.bmp b/resources/tilesets/classic95/maptorna.bmp new file mode 100644 index 0000000..317378b Binary files /dev/null and b/resources/tilesets/classic95/maptorna.bmp differ diff --git a/resources/tilesets/classic95/maptrain.bmp b/resources/tilesets/classic95/maptrain.bmp new file mode 100644 index 0000000..2c530b1 Binary files /dev/null and b/resources/tilesets/classic95/maptrain.bmp differ diff --git a/resources/tilesets/classic95/monster.bmp b/resources/tilesets/classic95/monster.bmp new file mode 100644 index 0000000..f19741e Binary files /dev/null and b/resources/tilesets/classic95/monster.bmp differ diff --git a/resources/tilesets/classic95/mptesdoc.ico b/resources/tilesets/classic95/mptesdoc.ico new file mode 100644 index 0000000..386a06e Binary files /dev/null and b/resources/tilesets/classic95/mptesdoc.ico differ diff --git a/resources/tilesets/classic95/mptest.ico b/resources/tilesets/classic95/mptest.ico new file mode 100644 index 0000000..7d564f8 Binary files /dev/null and b/resources/tilesets/classic95/mptest.ico differ diff --git a/resources/tilesets/classic95/plane.bmp b/resources/tilesets/classic95/plane.bmp new file mode 100644 index 0000000..3573c8a Binary files /dev/null and b/resources/tilesets/classic95/plane.bmp differ diff --git a/resources/tilesets/classic95/scen0u.bmp b/resources/tilesets/classic95/scen0u.bmp new file mode 100644 index 0000000..de46f99 Binary files /dev/null and b/resources/tilesets/classic95/scen0u.bmp differ diff --git a/resources/tilesets/classic95/scen1u.bmp b/resources/tilesets/classic95/scen1u.bmp new file mode 100644 index 0000000..85e8b59 Binary files /dev/null and b/resources/tilesets/classic95/scen1u.bmp differ diff --git a/resources/tilesets/classic95/scen2u.bmp b/resources/tilesets/classic95/scen2u.bmp new file mode 100644 index 0000000..c75f7e3 Binary files /dev/null and b/resources/tilesets/classic95/scen2u.bmp differ diff --git a/resources/tilesets/classic95/scen3u.bmp b/resources/tilesets/classic95/scen3u.bmp new file mode 100644 index 0000000..ca0e92f Binary files /dev/null and b/resources/tilesets/classic95/scen3u.bmp differ diff --git a/resources/tilesets/classic95/scen4u.bmp b/resources/tilesets/classic95/scen4u.bmp new file mode 100644 index 0000000..762b2f2 Binary files /dev/null and b/resources/tilesets/classic95/scen4u.bmp differ diff --git a/resources/tilesets/classic95/scen5u.bmp b/resources/tilesets/classic95/scen5u.bmp new file mode 100644 index 0000000..023c7bd Binary files /dev/null and b/resources/tilesets/classic95/scen5u.bmp differ diff --git a/resources/tilesets/classic95/scen6u.bmp b/resources/tilesets/classic95/scen6u.bmp new file mode 100644 index 0000000..a5dd285 Binary files /dev/null and b/resources/tilesets/classic95/scen6u.bmp differ diff --git a/resources/tilesets/classic95/scen7u.bmp b/resources/tilesets/classic95/scen7u.bmp new file mode 100644 index 0000000..fdd4caa Binary files /dev/null and b/resources/tilesets/classic95/scen7u.bmp differ diff --git a/resources/tilesets/classic95/scuscl95.rc2 b/resources/tilesets/classic95/scuscl95.rc2 new file mode 100644 index 0000000..4242bfa --- /dev/null +++ b/resources/tilesets/classic95/scuscl95.rc2 @@ -0,0 +1,13 @@ +// +// SCUSCL95.RC2 - resources Microsoft Visual C++ does not edit directly +// + +#ifdef APSTUDIO_INVOKED + #error this file is not editable by Microsoft Visual C++ +#endif //APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// Add manually edited resources here... + +///////////////////////////////////////////////////////////////////////////// diff --git a/resources/tilesets/classic95/ship.bmp b/resources/tilesets/classic95/ship.bmp new file mode 100644 index 0000000..766d753 Binary files /dev/null and b/resources/tilesets/classic95/ship.bmp differ diff --git a/resources/tilesets/classic95/smltitle.bmp b/resources/tilesets/classic95/smltitle.bmp new file mode 100644 index 0000000..77fbdd3 Binary files /dev/null and b/resources/tilesets/classic95/smltitle.bmp differ diff --git a/resources/tilesets/classic95/splash.bmp b/resources/tilesets/classic95/splash.bmp new file mode 100644 index 0000000..928e860 Binary files /dev/null and b/resources/tilesets/classic95/splash.bmp differ diff --git a/resources/tilesets/classic95/tiles.bmp b/resources/tilesets/classic95/tiles.bmp new file mode 100644 index 0000000..9a87c81 Binary files /dev/null and b/resources/tilesets/classic95/tiles.bmp differ diff --git a/resources/tilesets/classic95/toolbar.bmp b/resources/tilesets/classic95/toolbar.bmp new file mode 100644 index 0000000..8518641 Binary files /dev/null and b/resources/tilesets/classic95/toolbar.bmp differ diff --git a/resources/tilesets/classic95/tornado.bmp b/resources/tilesets/classic95/tornado.bmp new file mode 100644 index 0000000..8a7bae9 Binary files /dev/null and b/resources/tilesets/classic95/tornado.bmp differ diff --git a/resources/tilesets/classic95/train.bmp b/resources/tilesets/classic95/train.bmp new file mode 100644 index 0000000..95c8f6a Binary files /dev/null and b/resources/tilesets/classic95/train.bmp differ diff --git a/resources/tilesets/futureeurope/bmp00001.bmp b/resources/tilesets/futureeurope/bmp00001.bmp new file mode 100644 index 0000000..a0cc2f3 Binary files /dev/null and b/resources/tilesets/futureeurope/bmp00001.bmp differ diff --git a/resources/tilesets/futureeurope/chopper.bmp b/resources/tilesets/futureeurope/chopper.bmp new file mode 100644 index 0000000..5bd1f08 Binary files /dev/null and b/resources/tilesets/futureeurope/chopper.bmp differ diff --git a/resources/tilesets/futureeurope/cmdbar.bmp b/resources/tilesets/futureeurope/cmdbar.bmp new file mode 100644 index 0000000..8a3319e Binary files /dev/null and b/resources/tilesets/futureeurope/cmdbar.bmp differ diff --git a/resources/tilesets/futureeurope/edittool.bmp b/resources/tilesets/futureeurope/edittool.bmp new file mode 100644 index 0000000..f427ecf Binary files /dev/null and b/resources/tilesets/futureeurope/edittool.bmp differ diff --git a/resources/tilesets/futureeurope/explode.bmp b/resources/tilesets/futureeurope/explode.bmp new file mode 100644 index 0000000..7040692 Binary files /dev/null and b/resources/tilesets/futureeurope/explode.bmp differ diff --git a/resources/tilesets/futureeurope/graphtoo.bmp b/resources/tilesets/futureeurope/graphtoo.bmp new file mode 100644 index 0000000..7458738 Binary files /dev/null and b/resources/tilesets/futureeurope/graphtoo.bmp differ diff --git a/resources/tilesets/futureeurope/icon1.ico b/resources/tilesets/futureeurope/icon1.ico new file mode 100644 index 0000000..026a855 Binary files /dev/null and b/resources/tilesets/futureeurope/icon1.ico differ diff --git a/resources/tilesets/futureeurope/idr_grap.ico b/resources/tilesets/futureeurope/idr_grap.ico new file mode 100644 index 0000000..6842d96 Binary files /dev/null and b/resources/tilesets/futureeurope/idr_grap.ico differ diff --git a/resources/tilesets/futureeurope/idr_mapf.ico b/resources/tilesets/futureeurope/idr_mapf.ico new file mode 100644 index 0000000..e226b61 Binary files /dev/null and b/resources/tilesets/futureeurope/idr_mapf.ico differ diff --git a/resources/tilesets/futureeurope/mapchopp.bmp b/resources/tilesets/futureeurope/mapchopp.bmp new file mode 100644 index 0000000..0da51a2 Binary files /dev/null and b/resources/tilesets/futureeurope/mapchopp.bmp differ diff --git a/resources/tilesets/futureeurope/mapmonst.bmp b/resources/tilesets/futureeurope/mapmonst.bmp new file mode 100644 index 0000000..3995209 Binary files /dev/null and b/resources/tilesets/futureeurope/mapmonst.bmp differ diff --git a/resources/tilesets/futureeurope/mapplane.bmp b/resources/tilesets/futureeurope/mapplane.bmp new file mode 100644 index 0000000..44357e8 Binary files /dev/null and b/resources/tilesets/futureeurope/mapplane.bmp differ diff --git a/resources/tilesets/futureeurope/maptools.bmp b/resources/tilesets/futureeurope/maptools.bmp new file mode 100644 index 0000000..882e042 Binary files /dev/null and b/resources/tilesets/futureeurope/maptools.bmp differ diff --git a/resources/tilesets/futureeurope/maptorna.bmp b/resources/tilesets/futureeurope/maptorna.bmp new file mode 100644 index 0000000..317378b Binary files /dev/null and b/resources/tilesets/futureeurope/maptorna.bmp differ diff --git a/resources/tilesets/futureeurope/maptrain.bmp b/resources/tilesets/futureeurope/maptrain.bmp new file mode 100644 index 0000000..2c530b1 Binary files /dev/null and b/resources/tilesets/futureeurope/maptrain.bmp differ diff --git a/resources/tilesets/futureeurope/monster.bmp b/resources/tilesets/futureeurope/monster.bmp new file mode 100644 index 0000000..87f0da5 Binary files /dev/null and b/resources/tilesets/futureeurope/monster.bmp differ diff --git a/resources/tilesets/futureeurope/mptesdoc.ico b/resources/tilesets/futureeurope/mptesdoc.ico new file mode 100644 index 0000000..386a06e Binary files /dev/null and b/resources/tilesets/futureeurope/mptesdoc.ico differ diff --git a/resources/tilesets/futureeurope/mptest.ico b/resources/tilesets/futureeurope/mptest.ico new file mode 100644 index 0000000..7d564f8 Binary files /dev/null and b/resources/tilesets/futureeurope/mptest.ico differ diff --git a/resources/tilesets/futureeurope/plane.bmp b/resources/tilesets/futureeurope/plane.bmp new file mode 100644 index 0000000..9746818 Binary files /dev/null and b/resources/tilesets/futureeurope/plane.bmp differ diff --git a/resources/tilesets/futureeurope/scen0u.bmp b/resources/tilesets/futureeurope/scen0u.bmp new file mode 100644 index 0000000..de46f99 Binary files /dev/null and b/resources/tilesets/futureeurope/scen0u.bmp differ diff --git a/resources/tilesets/futureeurope/scen1u.bmp b/resources/tilesets/futureeurope/scen1u.bmp new file mode 100644 index 0000000..85e8b59 Binary files /dev/null and b/resources/tilesets/futureeurope/scen1u.bmp differ diff --git a/resources/tilesets/futureeurope/scen2u.bmp b/resources/tilesets/futureeurope/scen2u.bmp new file mode 100644 index 0000000..c75f7e3 Binary files /dev/null and b/resources/tilesets/futureeurope/scen2u.bmp differ diff --git a/resources/tilesets/futureeurope/scen3u.bmp b/resources/tilesets/futureeurope/scen3u.bmp new file mode 100644 index 0000000..ca0e92f Binary files /dev/null and b/resources/tilesets/futureeurope/scen3u.bmp differ diff --git a/resources/tilesets/futureeurope/scen4u.bmp b/resources/tilesets/futureeurope/scen4u.bmp new file mode 100644 index 0000000..762b2f2 Binary files /dev/null and b/resources/tilesets/futureeurope/scen4u.bmp differ diff --git a/resources/tilesets/futureeurope/scen5u.bmp b/resources/tilesets/futureeurope/scen5u.bmp new file mode 100644 index 0000000..023c7bd Binary files /dev/null and b/resources/tilesets/futureeurope/scen5u.bmp differ diff --git a/resources/tilesets/futureeurope/scen6u.bmp b/resources/tilesets/futureeurope/scen6u.bmp new file mode 100644 index 0000000..a5dd285 Binary files /dev/null and b/resources/tilesets/futureeurope/scen6u.bmp differ diff --git a/resources/tilesets/futureeurope/scen7u.bmp b/resources/tilesets/futureeurope/scen7u.bmp new file mode 100644 index 0000000..fdd4caa Binary files /dev/null and b/resources/tilesets/futureeurope/scen7u.bmp differ diff --git a/resources/tilesets/futureeurope/scusfeur.rc2 b/resources/tilesets/futureeurope/scusfeur.rc2 new file mode 100644 index 0000000..503433c --- /dev/null +++ b/resources/tilesets/futureeurope/scusfeur.rc2 @@ -0,0 +1,13 @@ +// +// SCUSFEUR.RC2 - resources Microsoft Visual C++ does not edit directly +// + +#ifdef APSTUDIO_INVOKED + #error this file is not editable by Microsoft Visual C++ +#endif //APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// Add manually edited resources here... + +///////////////////////////////////////////////////////////////////////////// diff --git a/resources/tilesets/futureeurope/ship.bmp b/resources/tilesets/futureeurope/ship.bmp new file mode 100644 index 0000000..f1cf485 Binary files /dev/null and b/resources/tilesets/futureeurope/ship.bmp differ diff --git a/resources/tilesets/futureeurope/smltitle.bmp b/resources/tilesets/futureeurope/smltitle.bmp new file mode 100644 index 0000000..77fbdd3 Binary files /dev/null and b/resources/tilesets/futureeurope/smltitle.bmp differ diff --git a/resources/tilesets/futureeurope/tiles.bmp b/resources/tilesets/futureeurope/tiles.bmp new file mode 100644 index 0000000..e5a877f Binary files /dev/null and b/resources/tilesets/futureeurope/tiles.bmp differ diff --git a/resources/tilesets/futureeurope/toolbar.bmp b/resources/tilesets/futureeurope/toolbar.bmp new file mode 100644 index 0000000..8518641 Binary files /dev/null and b/resources/tilesets/futureeurope/toolbar.bmp differ diff --git a/resources/tilesets/futureeurope/tornado.bmp b/resources/tilesets/futureeurope/tornado.bmp new file mode 100644 index 0000000..8a7bae9 Binary files /dev/null and b/resources/tilesets/futureeurope/tornado.bmp differ diff --git a/resources/tilesets/futureeurope/train.bmp b/resources/tilesets/futureeurope/train.bmp new file mode 100644 index 0000000..b06ad81 Binary files /dev/null and b/resources/tilesets/futureeurope/train.bmp differ diff --git a/resources/tilesets/futureusa/bmp00001.bmp b/resources/tilesets/futureusa/bmp00001.bmp new file mode 100644 index 0000000..a0cc2f3 Binary files /dev/null and b/resources/tilesets/futureusa/bmp00001.bmp differ diff --git a/resources/tilesets/futureusa/chopper.bmp b/resources/tilesets/futureusa/chopper.bmp new file mode 100644 index 0000000..fea58c9 Binary files /dev/null and b/resources/tilesets/futureusa/chopper.bmp differ diff --git a/resources/tilesets/futureusa/cmdbar.bmp b/resources/tilesets/futureusa/cmdbar.bmp new file mode 100644 index 0000000..8a3319e Binary files /dev/null and b/resources/tilesets/futureusa/cmdbar.bmp differ diff --git a/resources/tilesets/futureusa/edittool.bmp b/resources/tilesets/futureusa/edittool.bmp new file mode 100644 index 0000000..b13ae27 Binary files /dev/null and b/resources/tilesets/futureusa/edittool.bmp differ diff --git a/resources/tilesets/futureusa/explode.bmp b/resources/tilesets/futureusa/explode.bmp new file mode 100644 index 0000000..7040692 Binary files /dev/null and b/resources/tilesets/futureusa/explode.bmp differ diff --git a/resources/tilesets/futureusa/graphtoo.bmp b/resources/tilesets/futureusa/graphtoo.bmp new file mode 100644 index 0000000..7458738 Binary files /dev/null and b/resources/tilesets/futureusa/graphtoo.bmp differ diff --git a/resources/tilesets/futureusa/icon1.ico b/resources/tilesets/futureusa/icon1.ico new file mode 100644 index 0000000..026a855 Binary files /dev/null and b/resources/tilesets/futureusa/icon1.ico differ diff --git a/resources/tilesets/futureusa/idr_grap.ico b/resources/tilesets/futureusa/idr_grap.ico new file mode 100644 index 0000000..6842d96 Binary files /dev/null and b/resources/tilesets/futureusa/idr_grap.ico differ diff --git a/resources/tilesets/futureusa/idr_mapf.ico b/resources/tilesets/futureusa/idr_mapf.ico new file mode 100644 index 0000000..e226b61 Binary files /dev/null and b/resources/tilesets/futureusa/idr_mapf.ico differ diff --git a/resources/tilesets/futureusa/mapchopp.bmp b/resources/tilesets/futureusa/mapchopp.bmp new file mode 100644 index 0000000..0da51a2 Binary files /dev/null and b/resources/tilesets/futureusa/mapchopp.bmp differ diff --git a/resources/tilesets/futureusa/mapmonst.bmp b/resources/tilesets/futureusa/mapmonst.bmp new file mode 100644 index 0000000..3995209 Binary files /dev/null and b/resources/tilesets/futureusa/mapmonst.bmp differ diff --git a/resources/tilesets/futureusa/mapplane.bmp b/resources/tilesets/futureusa/mapplane.bmp new file mode 100644 index 0000000..44357e8 Binary files /dev/null and b/resources/tilesets/futureusa/mapplane.bmp differ diff --git a/resources/tilesets/futureusa/maptools.bmp b/resources/tilesets/futureusa/maptools.bmp new file mode 100644 index 0000000..882e042 Binary files /dev/null and b/resources/tilesets/futureusa/maptools.bmp differ diff --git a/resources/tilesets/futureusa/maptorna.bmp b/resources/tilesets/futureusa/maptorna.bmp new file mode 100644 index 0000000..317378b Binary files /dev/null and b/resources/tilesets/futureusa/maptorna.bmp differ diff --git a/resources/tilesets/futureusa/maptrain.bmp b/resources/tilesets/futureusa/maptrain.bmp new file mode 100644 index 0000000..2c530b1 Binary files /dev/null and b/resources/tilesets/futureusa/maptrain.bmp differ diff --git a/resources/tilesets/futureusa/monster.bmp b/resources/tilesets/futureusa/monster.bmp new file mode 100644 index 0000000..12aabf0 Binary files /dev/null and b/resources/tilesets/futureusa/monster.bmp differ diff --git a/resources/tilesets/futureusa/mptesdoc.ico b/resources/tilesets/futureusa/mptesdoc.ico new file mode 100644 index 0000000..386a06e Binary files /dev/null and b/resources/tilesets/futureusa/mptesdoc.ico differ diff --git a/resources/tilesets/futureusa/mptest.ico b/resources/tilesets/futureusa/mptest.ico new file mode 100644 index 0000000..7d564f8 Binary files /dev/null and b/resources/tilesets/futureusa/mptest.ico differ diff --git a/resources/tilesets/futureusa/plane.bmp b/resources/tilesets/futureusa/plane.bmp new file mode 100644 index 0000000..94089c9 Binary files /dev/null and b/resources/tilesets/futureusa/plane.bmp differ diff --git a/resources/tilesets/futureusa/scen0u.bmp b/resources/tilesets/futureusa/scen0u.bmp new file mode 100644 index 0000000..de46f99 Binary files /dev/null and b/resources/tilesets/futureusa/scen0u.bmp differ diff --git a/resources/tilesets/futureusa/scen1u.bmp b/resources/tilesets/futureusa/scen1u.bmp new file mode 100644 index 0000000..85e8b59 Binary files /dev/null and b/resources/tilesets/futureusa/scen1u.bmp differ diff --git a/resources/tilesets/futureusa/scen2u.bmp b/resources/tilesets/futureusa/scen2u.bmp new file mode 100644 index 0000000..c75f7e3 Binary files /dev/null and b/resources/tilesets/futureusa/scen2u.bmp differ diff --git a/resources/tilesets/futureusa/scen3u.bmp b/resources/tilesets/futureusa/scen3u.bmp new file mode 100644 index 0000000..ca0e92f Binary files /dev/null and b/resources/tilesets/futureusa/scen3u.bmp differ diff --git a/resources/tilesets/futureusa/scen4u.bmp b/resources/tilesets/futureusa/scen4u.bmp new file mode 100644 index 0000000..762b2f2 Binary files /dev/null and b/resources/tilesets/futureusa/scen4u.bmp differ diff --git a/resources/tilesets/futureusa/scen5u.bmp b/resources/tilesets/futureusa/scen5u.bmp new file mode 100644 index 0000000..023c7bd Binary files /dev/null and b/resources/tilesets/futureusa/scen5u.bmp differ diff --git a/resources/tilesets/futureusa/scen6u.bmp b/resources/tilesets/futureusa/scen6u.bmp new file mode 100644 index 0000000..a5dd285 Binary files /dev/null and b/resources/tilesets/futureusa/scen6u.bmp differ diff --git a/resources/tilesets/futureusa/scen7u.bmp b/resources/tilesets/futureusa/scen7u.bmp new file mode 100644 index 0000000..fdd4caa Binary files /dev/null and b/resources/tilesets/futureusa/scen7u.bmp differ diff --git a/resources/tilesets/futureusa/scusfusa.rc2 b/resources/tilesets/futureusa/scusfusa.rc2 new file mode 100644 index 0000000..f5d89fd --- /dev/null +++ b/resources/tilesets/futureusa/scusfusa.rc2 @@ -0,0 +1,13 @@ +// +// SCUSFUSA.RC2 - resources Microsoft Visual C++ does not edit directly +// + +#ifdef APSTUDIO_INVOKED + #error this file is not editable by Microsoft Visual C++ +#endif //APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// Add manually edited resources here... + +///////////////////////////////////////////////////////////////////////////// diff --git a/resources/tilesets/futureusa/ship.bmp b/resources/tilesets/futureusa/ship.bmp new file mode 100644 index 0000000..f058915 Binary files /dev/null and b/resources/tilesets/futureusa/ship.bmp differ diff --git a/resources/tilesets/futureusa/smltitle.bmp b/resources/tilesets/futureusa/smltitle.bmp new file mode 100644 index 0000000..77fbdd3 Binary files /dev/null and b/resources/tilesets/futureusa/smltitle.bmp differ diff --git a/resources/tilesets/futureusa/tiles.bmp b/resources/tilesets/futureusa/tiles.bmp new file mode 100644 index 0000000..0c6a9cf Binary files /dev/null and b/resources/tilesets/futureusa/tiles.bmp differ diff --git a/resources/tilesets/futureusa/toolbar.bmp b/resources/tilesets/futureusa/toolbar.bmp new file mode 100644 index 0000000..8518641 Binary files /dev/null and b/resources/tilesets/futureusa/toolbar.bmp differ diff --git a/resources/tilesets/futureusa/tornado.bmp b/resources/tilesets/futureusa/tornado.bmp new file mode 100644 index 0000000..8a7bae9 Binary files /dev/null and b/resources/tilesets/futureusa/tornado.bmp differ diff --git a/resources/tilesets/futureusa/train.bmp b/resources/tilesets/futureusa/train.bmp new file mode 100644 index 0000000..ffe2d9b Binary files /dev/null and b/resources/tilesets/futureusa/train.bmp differ diff --git a/resources/tilesets/medievaltimes/bmp00001.bmp b/resources/tilesets/medievaltimes/bmp00001.bmp new file mode 100644 index 0000000..a0cc2f3 Binary files /dev/null and b/resources/tilesets/medievaltimes/bmp00001.bmp differ diff --git a/resources/tilesets/medievaltimes/chopper.bmp b/resources/tilesets/medievaltimes/chopper.bmp new file mode 100644 index 0000000..3020504 Binary files /dev/null and b/resources/tilesets/medievaltimes/chopper.bmp differ diff --git a/resources/tilesets/medievaltimes/cmdbar.bmp b/resources/tilesets/medievaltimes/cmdbar.bmp new file mode 100644 index 0000000..8a3319e Binary files /dev/null and b/resources/tilesets/medievaltimes/cmdbar.bmp differ diff --git a/resources/tilesets/medievaltimes/edittool.bmp b/resources/tilesets/medievaltimes/edittool.bmp new file mode 100644 index 0000000..97b0bf4 Binary files /dev/null and b/resources/tilesets/medievaltimes/edittool.bmp differ diff --git a/resources/tilesets/medievaltimes/explode.bmp b/resources/tilesets/medievaltimes/explode.bmp new file mode 100644 index 0000000..7040692 Binary files /dev/null and b/resources/tilesets/medievaltimes/explode.bmp differ diff --git a/resources/tilesets/medievaltimes/graphtoo.bmp b/resources/tilesets/medievaltimes/graphtoo.bmp new file mode 100644 index 0000000..7458738 Binary files /dev/null and b/resources/tilesets/medievaltimes/graphtoo.bmp differ diff --git a/resources/tilesets/medievaltimes/icon1.ico b/resources/tilesets/medievaltimes/icon1.ico new file mode 100644 index 0000000..026a855 Binary files /dev/null and b/resources/tilesets/medievaltimes/icon1.ico differ diff --git a/resources/tilesets/medievaltimes/idr_grap.ico b/resources/tilesets/medievaltimes/idr_grap.ico new file mode 100644 index 0000000..6842d96 Binary files /dev/null and b/resources/tilesets/medievaltimes/idr_grap.ico differ diff --git a/resources/tilesets/medievaltimes/idr_mapf.ico b/resources/tilesets/medievaltimes/idr_mapf.ico new file mode 100644 index 0000000..e226b61 Binary files /dev/null and b/resources/tilesets/medievaltimes/idr_mapf.ico differ diff --git a/resources/tilesets/medievaltimes/mapchopp.bmp b/resources/tilesets/medievaltimes/mapchopp.bmp new file mode 100644 index 0000000..0da51a2 Binary files /dev/null and b/resources/tilesets/medievaltimes/mapchopp.bmp differ diff --git a/resources/tilesets/medievaltimes/mapmonst.bmp b/resources/tilesets/medievaltimes/mapmonst.bmp new file mode 100644 index 0000000..3995209 Binary files /dev/null and b/resources/tilesets/medievaltimes/mapmonst.bmp differ diff --git a/resources/tilesets/medievaltimes/mapplane.bmp b/resources/tilesets/medievaltimes/mapplane.bmp new file mode 100644 index 0000000..44357e8 Binary files /dev/null and b/resources/tilesets/medievaltimes/mapplane.bmp differ diff --git a/resources/tilesets/medievaltimes/maptools.bmp b/resources/tilesets/medievaltimes/maptools.bmp new file mode 100644 index 0000000..882e042 Binary files /dev/null and b/resources/tilesets/medievaltimes/maptools.bmp differ diff --git a/resources/tilesets/medievaltimes/maptorna.bmp b/resources/tilesets/medievaltimes/maptorna.bmp new file mode 100644 index 0000000..317378b Binary files /dev/null and b/resources/tilesets/medievaltimes/maptorna.bmp differ diff --git a/resources/tilesets/medievaltimes/maptrain.bmp b/resources/tilesets/medievaltimes/maptrain.bmp new file mode 100644 index 0000000..2c530b1 Binary files /dev/null and b/resources/tilesets/medievaltimes/maptrain.bmp differ diff --git a/resources/tilesets/medievaltimes/monster.bmp b/resources/tilesets/medievaltimes/monster.bmp new file mode 100644 index 0000000..a667161 Binary files /dev/null and b/resources/tilesets/medievaltimes/monster.bmp differ diff --git a/resources/tilesets/medievaltimes/mptesdoc.ico b/resources/tilesets/medievaltimes/mptesdoc.ico new file mode 100644 index 0000000..386a06e Binary files /dev/null and b/resources/tilesets/medievaltimes/mptesdoc.ico differ diff --git a/resources/tilesets/medievaltimes/mptest.ico b/resources/tilesets/medievaltimes/mptest.ico new file mode 100644 index 0000000..7d564f8 Binary files /dev/null and b/resources/tilesets/medievaltimes/mptest.ico differ diff --git a/resources/tilesets/medievaltimes/plane.bmp b/resources/tilesets/medievaltimes/plane.bmp new file mode 100644 index 0000000..83ee330 Binary files /dev/null and b/resources/tilesets/medievaltimes/plane.bmp differ diff --git a/resources/tilesets/medievaltimes/scen0u.bmp b/resources/tilesets/medievaltimes/scen0u.bmp new file mode 100644 index 0000000..de46f99 Binary files /dev/null and b/resources/tilesets/medievaltimes/scen0u.bmp differ diff --git a/resources/tilesets/medievaltimes/scen1u.bmp b/resources/tilesets/medievaltimes/scen1u.bmp new file mode 100644 index 0000000..85e8b59 Binary files /dev/null and b/resources/tilesets/medievaltimes/scen1u.bmp differ diff --git a/resources/tilesets/medievaltimes/scen2u.bmp b/resources/tilesets/medievaltimes/scen2u.bmp new file mode 100644 index 0000000..c75f7e3 Binary files /dev/null and b/resources/tilesets/medievaltimes/scen2u.bmp differ diff --git a/resources/tilesets/medievaltimes/scen3u.bmp b/resources/tilesets/medievaltimes/scen3u.bmp new file mode 100644 index 0000000..ca0e92f Binary files /dev/null and b/resources/tilesets/medievaltimes/scen3u.bmp differ diff --git a/resources/tilesets/medievaltimes/scen4u.bmp b/resources/tilesets/medievaltimes/scen4u.bmp new file mode 100644 index 0000000..762b2f2 Binary files /dev/null and b/resources/tilesets/medievaltimes/scen4u.bmp differ diff --git a/resources/tilesets/medievaltimes/scen5u.bmp b/resources/tilesets/medievaltimes/scen5u.bmp new file mode 100644 index 0000000..023c7bd Binary files /dev/null and b/resources/tilesets/medievaltimes/scen5u.bmp differ diff --git a/resources/tilesets/medievaltimes/scen6u.bmp b/resources/tilesets/medievaltimes/scen6u.bmp new file mode 100644 index 0000000..a5dd285 Binary files /dev/null and b/resources/tilesets/medievaltimes/scen6u.bmp differ diff --git a/resources/tilesets/medievaltimes/scen7u.bmp b/resources/tilesets/medievaltimes/scen7u.bmp new file mode 100644 index 0000000..fdd4caa Binary files /dev/null and b/resources/tilesets/medievaltimes/scen7u.bmp differ diff --git a/resources/tilesets/medievaltimes/scusmedi.rc2 b/resources/tilesets/medievaltimes/scusmedi.rc2 new file mode 100644 index 0000000..248cb57 --- /dev/null +++ b/resources/tilesets/medievaltimes/scusmedi.rc2 @@ -0,0 +1,13 @@ +// +// SCUSMEDI.RC2 - resources Microsoft Visual C++ does not edit directly +// + +#ifdef APSTUDIO_INVOKED + #error this file is not editable by Microsoft Visual C++ +#endif //APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// Add manually edited resources here... + +///////////////////////////////////////////////////////////////////////////// diff --git a/resources/tilesets/medievaltimes/ship.bmp b/resources/tilesets/medievaltimes/ship.bmp new file mode 100644 index 0000000..5fe9dab Binary files /dev/null and b/resources/tilesets/medievaltimes/ship.bmp differ diff --git a/resources/tilesets/medievaltimes/smltitle.bmp b/resources/tilesets/medievaltimes/smltitle.bmp new file mode 100644 index 0000000..77fbdd3 Binary files /dev/null and b/resources/tilesets/medievaltimes/smltitle.bmp differ diff --git a/resources/tilesets/medievaltimes/tiles.bmp b/resources/tilesets/medievaltimes/tiles.bmp new file mode 100644 index 0000000..306ce53 Binary files /dev/null and b/resources/tilesets/medievaltimes/tiles.bmp differ diff --git a/resources/tilesets/medievaltimes/toolbar.bmp b/resources/tilesets/medievaltimes/toolbar.bmp new file mode 100644 index 0000000..8518641 Binary files /dev/null and b/resources/tilesets/medievaltimes/toolbar.bmp differ diff --git a/resources/tilesets/medievaltimes/tornado.bmp b/resources/tilesets/medievaltimes/tornado.bmp new file mode 100644 index 0000000..8a7bae9 Binary files /dev/null and b/resources/tilesets/medievaltimes/tornado.bmp differ diff --git a/resources/tilesets/medievaltimes/train.bmp b/resources/tilesets/medievaltimes/train.bmp new file mode 100644 index 0000000..ad42d0a Binary files /dev/null and b/resources/tilesets/medievaltimes/train.bmp differ diff --git a/resources/tilesets/mooncolony/bmp00001.bmp b/resources/tilesets/mooncolony/bmp00001.bmp new file mode 100644 index 0000000..a0cc2f3 Binary files /dev/null and b/resources/tilesets/mooncolony/bmp00001.bmp differ diff --git a/resources/tilesets/mooncolony/chopper.bmp b/resources/tilesets/mooncolony/chopper.bmp new file mode 100644 index 0000000..eab22bc Binary files /dev/null and b/resources/tilesets/mooncolony/chopper.bmp differ diff --git a/resources/tilesets/mooncolony/cmdbar.bmp b/resources/tilesets/mooncolony/cmdbar.bmp new file mode 100644 index 0000000..8a3319e Binary files /dev/null and b/resources/tilesets/mooncolony/cmdbar.bmp differ diff --git a/resources/tilesets/mooncolony/edittool.bmp b/resources/tilesets/mooncolony/edittool.bmp new file mode 100644 index 0000000..c8552e4 Binary files /dev/null and b/resources/tilesets/mooncolony/edittool.bmp differ diff --git a/resources/tilesets/mooncolony/explode.bmp b/resources/tilesets/mooncolony/explode.bmp new file mode 100644 index 0000000..7040692 Binary files /dev/null and b/resources/tilesets/mooncolony/explode.bmp differ diff --git a/resources/tilesets/mooncolony/graphtoo.bmp b/resources/tilesets/mooncolony/graphtoo.bmp new file mode 100644 index 0000000..7458738 Binary files /dev/null and b/resources/tilesets/mooncolony/graphtoo.bmp differ diff --git a/resources/tilesets/mooncolony/icon1.ico b/resources/tilesets/mooncolony/icon1.ico new file mode 100644 index 0000000..026a855 Binary files /dev/null and b/resources/tilesets/mooncolony/icon1.ico differ diff --git a/resources/tilesets/mooncolony/idr_grap.ico b/resources/tilesets/mooncolony/idr_grap.ico new file mode 100644 index 0000000..6842d96 Binary files /dev/null and b/resources/tilesets/mooncolony/idr_grap.ico differ diff --git a/resources/tilesets/mooncolony/idr_mapf.ico b/resources/tilesets/mooncolony/idr_mapf.ico new file mode 100644 index 0000000..e226b61 Binary files /dev/null and b/resources/tilesets/mooncolony/idr_mapf.ico differ diff --git a/resources/tilesets/mooncolony/mapchopp.bmp b/resources/tilesets/mooncolony/mapchopp.bmp new file mode 100644 index 0000000..0da51a2 Binary files /dev/null and b/resources/tilesets/mooncolony/mapchopp.bmp differ diff --git a/resources/tilesets/mooncolony/mapmonst.bmp b/resources/tilesets/mooncolony/mapmonst.bmp new file mode 100644 index 0000000..3995209 Binary files /dev/null and b/resources/tilesets/mooncolony/mapmonst.bmp differ diff --git a/resources/tilesets/mooncolony/mapplane.bmp b/resources/tilesets/mooncolony/mapplane.bmp new file mode 100644 index 0000000..44357e8 Binary files /dev/null and b/resources/tilesets/mooncolony/mapplane.bmp differ diff --git a/resources/tilesets/mooncolony/maptools.bmp b/resources/tilesets/mooncolony/maptools.bmp new file mode 100644 index 0000000..882e042 Binary files /dev/null and b/resources/tilesets/mooncolony/maptools.bmp differ diff --git a/resources/tilesets/mooncolony/maptorna.bmp b/resources/tilesets/mooncolony/maptorna.bmp new file mode 100644 index 0000000..317378b Binary files /dev/null and b/resources/tilesets/mooncolony/maptorna.bmp differ diff --git a/resources/tilesets/mooncolony/maptrain.bmp b/resources/tilesets/mooncolony/maptrain.bmp new file mode 100644 index 0000000..2c530b1 Binary files /dev/null and b/resources/tilesets/mooncolony/maptrain.bmp differ diff --git a/resources/tilesets/mooncolony/monster.bmp b/resources/tilesets/mooncolony/monster.bmp new file mode 100644 index 0000000..65bafd7 Binary files /dev/null and b/resources/tilesets/mooncolony/monster.bmp differ diff --git a/resources/tilesets/mooncolony/mptesdoc.ico b/resources/tilesets/mooncolony/mptesdoc.ico new file mode 100644 index 0000000..386a06e Binary files /dev/null and b/resources/tilesets/mooncolony/mptesdoc.ico differ diff --git a/resources/tilesets/mooncolony/mptest.ico b/resources/tilesets/mooncolony/mptest.ico new file mode 100644 index 0000000..7d564f8 Binary files /dev/null and b/resources/tilesets/mooncolony/mptest.ico differ diff --git a/resources/tilesets/mooncolony/plane.bmp b/resources/tilesets/mooncolony/plane.bmp new file mode 100644 index 0000000..49257c7 Binary files /dev/null and b/resources/tilesets/mooncolony/plane.bmp differ diff --git a/resources/tilesets/mooncolony/scen0u.bmp b/resources/tilesets/mooncolony/scen0u.bmp new file mode 100644 index 0000000..de46f99 Binary files /dev/null and b/resources/tilesets/mooncolony/scen0u.bmp differ diff --git a/resources/tilesets/mooncolony/scen1u.bmp b/resources/tilesets/mooncolony/scen1u.bmp new file mode 100644 index 0000000..85e8b59 Binary files /dev/null and b/resources/tilesets/mooncolony/scen1u.bmp differ diff --git a/resources/tilesets/mooncolony/scen2u.bmp b/resources/tilesets/mooncolony/scen2u.bmp new file mode 100644 index 0000000..c75f7e3 Binary files /dev/null and b/resources/tilesets/mooncolony/scen2u.bmp differ diff --git a/resources/tilesets/mooncolony/scen3u.bmp b/resources/tilesets/mooncolony/scen3u.bmp new file mode 100644 index 0000000..ca0e92f Binary files /dev/null and b/resources/tilesets/mooncolony/scen3u.bmp differ diff --git a/resources/tilesets/mooncolony/scen4u.bmp b/resources/tilesets/mooncolony/scen4u.bmp new file mode 100644 index 0000000..762b2f2 Binary files /dev/null and b/resources/tilesets/mooncolony/scen4u.bmp differ diff --git a/resources/tilesets/mooncolony/scen5u.bmp b/resources/tilesets/mooncolony/scen5u.bmp new file mode 100644 index 0000000..023c7bd Binary files /dev/null and b/resources/tilesets/mooncolony/scen5u.bmp differ diff --git a/resources/tilesets/mooncolony/scen6u.bmp b/resources/tilesets/mooncolony/scen6u.bmp new file mode 100644 index 0000000..a5dd285 Binary files /dev/null and b/resources/tilesets/mooncolony/scen6u.bmp differ diff --git a/resources/tilesets/mooncolony/scen7u.bmp b/resources/tilesets/mooncolony/scen7u.bmp new file mode 100644 index 0000000..fdd4caa Binary files /dev/null and b/resources/tilesets/mooncolony/scen7u.bmp differ diff --git a/resources/tilesets/mooncolony/scusmoon.rc2 b/resources/tilesets/mooncolony/scusmoon.rc2 new file mode 100644 index 0000000..1da6c84 --- /dev/null +++ b/resources/tilesets/mooncolony/scusmoon.rc2 @@ -0,0 +1,13 @@ +// +// SCUSMOON.RC2 - resources Microsoft Visual C++ does not edit directly +// + +#ifdef APSTUDIO_INVOKED + #error this file is not editable by Microsoft Visual C++ +#endif //APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// Add manually edited resources here... + +///////////////////////////////////////////////////////////////////////////// diff --git a/resources/tilesets/mooncolony/ship.bmp b/resources/tilesets/mooncolony/ship.bmp new file mode 100644 index 0000000..5be063d Binary files /dev/null and b/resources/tilesets/mooncolony/ship.bmp differ diff --git a/resources/tilesets/mooncolony/smltitle.bmp b/resources/tilesets/mooncolony/smltitle.bmp new file mode 100644 index 0000000..77fbdd3 Binary files /dev/null and b/resources/tilesets/mooncolony/smltitle.bmp differ diff --git a/resources/tilesets/mooncolony/tiles.bmp b/resources/tilesets/mooncolony/tiles.bmp new file mode 100644 index 0000000..e6a7a40 Binary files /dev/null and b/resources/tilesets/mooncolony/tiles.bmp differ diff --git a/resources/tilesets/mooncolony/toolbar.bmp b/resources/tilesets/mooncolony/toolbar.bmp new file mode 100644 index 0000000..8518641 Binary files /dev/null and b/resources/tilesets/mooncolony/toolbar.bmp differ diff --git a/resources/tilesets/mooncolony/tornado.bmp b/resources/tilesets/mooncolony/tornado.bmp new file mode 100644 index 0000000..f13814b Binary files /dev/null and b/resources/tilesets/mooncolony/tornado.bmp differ diff --git a/resources/tilesets/mooncolony/train.bmp b/resources/tilesets/mooncolony/train.bmp new file mode 100644 index 0000000..a998d6b Binary files /dev/null and b/resources/tilesets/mooncolony/train.bmp differ diff --git a/resources/tilesets/wildwest/bmp00001.bmp b/resources/tilesets/wildwest/bmp00001.bmp new file mode 100644 index 0000000..a0cc2f3 Binary files /dev/null and b/resources/tilesets/wildwest/bmp00001.bmp differ diff --git a/resources/tilesets/wildwest/chopper.bmp b/resources/tilesets/wildwest/chopper.bmp new file mode 100644 index 0000000..9816cc6 Binary files /dev/null and b/resources/tilesets/wildwest/chopper.bmp differ diff --git a/resources/tilesets/wildwest/cmdbar.bmp b/resources/tilesets/wildwest/cmdbar.bmp new file mode 100644 index 0000000..8a3319e Binary files /dev/null and b/resources/tilesets/wildwest/cmdbar.bmp differ diff --git a/resources/tilesets/wildwest/edittool.bmp b/resources/tilesets/wildwest/edittool.bmp new file mode 100644 index 0000000..41ffd51 Binary files /dev/null and b/resources/tilesets/wildwest/edittool.bmp differ diff --git a/resources/tilesets/wildwest/explode.bmp b/resources/tilesets/wildwest/explode.bmp new file mode 100644 index 0000000..7040692 Binary files /dev/null and b/resources/tilesets/wildwest/explode.bmp differ diff --git a/resources/tilesets/wildwest/graphtoo.bmp b/resources/tilesets/wildwest/graphtoo.bmp new file mode 100644 index 0000000..7458738 Binary files /dev/null and b/resources/tilesets/wildwest/graphtoo.bmp differ diff --git a/resources/tilesets/wildwest/icon1.ico b/resources/tilesets/wildwest/icon1.ico new file mode 100644 index 0000000..026a855 Binary files /dev/null and b/resources/tilesets/wildwest/icon1.ico differ diff --git a/resources/tilesets/wildwest/idr_grap.ico b/resources/tilesets/wildwest/idr_grap.ico new file mode 100644 index 0000000..6842d96 Binary files /dev/null and b/resources/tilesets/wildwest/idr_grap.ico differ diff --git a/resources/tilesets/wildwest/idr_mapf.ico b/resources/tilesets/wildwest/idr_mapf.ico new file mode 100644 index 0000000..e226b61 Binary files /dev/null and b/resources/tilesets/wildwest/idr_mapf.ico differ diff --git a/resources/tilesets/wildwest/mapchopp.bmp b/resources/tilesets/wildwest/mapchopp.bmp new file mode 100644 index 0000000..0da51a2 Binary files /dev/null and b/resources/tilesets/wildwest/mapchopp.bmp differ diff --git a/resources/tilesets/wildwest/mapmonst.bmp b/resources/tilesets/wildwest/mapmonst.bmp new file mode 100644 index 0000000..3995209 Binary files /dev/null and b/resources/tilesets/wildwest/mapmonst.bmp differ diff --git a/resources/tilesets/wildwest/mapplane.bmp b/resources/tilesets/wildwest/mapplane.bmp new file mode 100644 index 0000000..44357e8 Binary files /dev/null and b/resources/tilesets/wildwest/mapplane.bmp differ diff --git a/resources/tilesets/wildwest/maptools.bmp b/resources/tilesets/wildwest/maptools.bmp new file mode 100644 index 0000000..882e042 Binary files /dev/null and b/resources/tilesets/wildwest/maptools.bmp differ diff --git a/resources/tilesets/wildwest/maptorna.bmp b/resources/tilesets/wildwest/maptorna.bmp new file mode 100644 index 0000000..317378b Binary files /dev/null and b/resources/tilesets/wildwest/maptorna.bmp differ diff --git a/resources/tilesets/wildwest/maptrain.bmp b/resources/tilesets/wildwest/maptrain.bmp new file mode 100644 index 0000000..2c530b1 Binary files /dev/null and b/resources/tilesets/wildwest/maptrain.bmp differ diff --git a/resources/tilesets/wildwest/monster.bmp b/resources/tilesets/wildwest/monster.bmp new file mode 100644 index 0000000..9e03e76 Binary files /dev/null and b/resources/tilesets/wildwest/monster.bmp differ diff --git a/resources/tilesets/wildwest/mptesdoc.ico b/resources/tilesets/wildwest/mptesdoc.ico new file mode 100644 index 0000000..386a06e Binary files /dev/null and b/resources/tilesets/wildwest/mptesdoc.ico differ diff --git a/resources/tilesets/wildwest/mptest.ico b/resources/tilesets/wildwest/mptest.ico new file mode 100644 index 0000000..7d564f8 Binary files /dev/null and b/resources/tilesets/wildwest/mptest.ico differ diff --git a/resources/tilesets/wildwest/plane.bmp b/resources/tilesets/wildwest/plane.bmp new file mode 100644 index 0000000..301c6a9 Binary files /dev/null and b/resources/tilesets/wildwest/plane.bmp differ diff --git a/resources/tilesets/wildwest/scen0u.bmp b/resources/tilesets/wildwest/scen0u.bmp new file mode 100644 index 0000000..de46f99 Binary files /dev/null and b/resources/tilesets/wildwest/scen0u.bmp differ diff --git a/resources/tilesets/wildwest/scen1u.bmp b/resources/tilesets/wildwest/scen1u.bmp new file mode 100644 index 0000000..85e8b59 Binary files /dev/null and b/resources/tilesets/wildwest/scen1u.bmp differ diff --git a/resources/tilesets/wildwest/scen2u.bmp b/resources/tilesets/wildwest/scen2u.bmp new file mode 100644 index 0000000..c75f7e3 Binary files /dev/null and b/resources/tilesets/wildwest/scen2u.bmp differ diff --git a/resources/tilesets/wildwest/scen3u.bmp b/resources/tilesets/wildwest/scen3u.bmp new file mode 100644 index 0000000..ca0e92f Binary files /dev/null and b/resources/tilesets/wildwest/scen3u.bmp differ diff --git a/resources/tilesets/wildwest/scen4u.bmp b/resources/tilesets/wildwest/scen4u.bmp new file mode 100644 index 0000000..762b2f2 Binary files /dev/null and b/resources/tilesets/wildwest/scen4u.bmp differ diff --git a/resources/tilesets/wildwest/scen5u.bmp b/resources/tilesets/wildwest/scen5u.bmp new file mode 100644 index 0000000..023c7bd Binary files /dev/null and b/resources/tilesets/wildwest/scen5u.bmp differ diff --git a/resources/tilesets/wildwest/scen6u.bmp b/resources/tilesets/wildwest/scen6u.bmp new file mode 100644 index 0000000..a5dd285 Binary files /dev/null and b/resources/tilesets/wildwest/scen6u.bmp differ diff --git a/resources/tilesets/wildwest/scen7u.bmp b/resources/tilesets/wildwest/scen7u.bmp new file mode 100644 index 0000000..fdd4caa Binary files /dev/null and b/resources/tilesets/wildwest/scen7u.bmp differ diff --git a/resources/tilesets/wildwest/scuswest.rc2 b/resources/tilesets/wildwest/scuswest.rc2 new file mode 100644 index 0000000..5355bff --- /dev/null +++ b/resources/tilesets/wildwest/scuswest.rc2 @@ -0,0 +1,13 @@ +// +// SCUSWEST.RC2 - resources Microsoft Visual C++ does not edit directly +// + +#ifdef APSTUDIO_INVOKED + #error this file is not editable by Microsoft Visual C++ +#endif //APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// Add manually edited resources here... + +///////////////////////////////////////////////////////////////////////////// diff --git a/resources/tilesets/wildwest/ship.bmp b/resources/tilesets/wildwest/ship.bmp new file mode 100644 index 0000000..4e270e1 Binary files /dev/null and b/resources/tilesets/wildwest/ship.bmp differ diff --git a/resources/tilesets/wildwest/smltitle.bmp b/resources/tilesets/wildwest/smltitle.bmp new file mode 100644 index 0000000..77fbdd3 Binary files /dev/null and b/resources/tilesets/wildwest/smltitle.bmp differ diff --git a/resources/tilesets/wildwest/tiles.bmp b/resources/tilesets/wildwest/tiles.bmp new file mode 100644 index 0000000..dcd7063 Binary files /dev/null and b/resources/tilesets/wildwest/tiles.bmp differ diff --git a/resources/tilesets/wildwest/toolbar.bmp b/resources/tilesets/wildwest/toolbar.bmp new file mode 100644 index 0000000..8518641 Binary files /dev/null and b/resources/tilesets/wildwest/toolbar.bmp differ diff --git a/resources/tilesets/wildwest/tornado.bmp b/resources/tilesets/wildwest/tornado.bmp new file mode 100644 index 0000000..8a7bae9 Binary files /dev/null and b/resources/tilesets/wildwest/tornado.bmp differ diff --git a/resources/tilesets/wildwest/train.bmp b/resources/tilesets/wildwest/train.bmp new file mode 100644 index 0000000..bc3e5cb Binary files /dev/null and b/resources/tilesets/wildwest/train.bmp differ diff --git a/src/main.zig b/src/main.zig new file mode 100644 index 0000000..f9e9bc6 --- /dev/null +++ b/src/main.zig @@ -0,0 +1,27 @@ +const std = @import("std"); +// const core = @cImport({ +// @cInclude("./micropolis.h"); +// }); + +pub fn main() anyerror!void { + // Prints to stderr (it's a shortcut based on `std.io.getStdErr()`) + std.debug.print("All your {s} are belong to us.\n", .{"codebase"}); + + // stdout is for the actual output of your application, for example if you + // are implementing gzip, then only the compressed bytes should be sent to + // stdout, not any debugging messages. + const stdout_file = std.io.getStdOut().writer(); + var bw = std.io.bufferedWriter(stdout_file); + const stdout = bw.writer(); + + try stdout.print("Run `zig build test` to run the tests.\n", .{}); + + try bw.flush(); // don't forget to flush! +} + +test "simple test" { + var list = std.ArrayList(i32).init(std.testing.allocator); + defer list.deinit(); // try commenting this out and see if zig detects the memory leak! + try list.append(42); + try std.testing.expectEqual(@as(i32, 42), list.pop()); +} diff --git a/src/root.zig b/src/root.zig new file mode 100644 index 0000000..ecfeade --- /dev/null +++ b/src/root.zig @@ -0,0 +1,10 @@ +const std = @import("std"); +const testing = std.testing; + +export fn add(a: i32, b: i32) i32 { + return a + b; +} + +test "basic add functionality" { + try testing.expect(add(3, 7) == 10); +}