Initial commit
1
.gitignore
vendored
Executable file
|
@ -0,0 +1 @@
|
||||||
|
spec.pdf
|
674
LICENSE
Executable file
|
@ -0,0 +1,674 @@
|
||||||
|
GNU GENERAL PUBLIC LICENSE
|
||||||
|
Version 3, 29 June 2007
|
||||||
|
|
||||||
|
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||||
|
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.
|
||||||
|
|
||||||
|
<one line to give the program's name and a brief idea of what it does.>
|
||||||
|
Copyright (C) <year> <name of author>
|
||||||
|
|
||||||
|
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/>.
|
||||||
|
|
||||||
|
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:
|
||||||
|
|
||||||
|
<program> Copyright (C) <year> <name of author>
|
||||||
|
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
|
||||||
|
<http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
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
|
||||||
|
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
2303
doc/config
Executable file
BIN
doc/html/Thumbs.db
Executable file
104
doc/html/annotated.html
Executable file
|
@ -0,0 +1,104 @@
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||||
|
<meta name="generator" content="Doxygen 1.8.6"/>
|
||||||
|
<title>SCC.150 Assembler Emulator: Data Structures</title>
|
||||||
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||||
|
<script type="text/javascript" src="jquery.js"></script>
|
||||||
|
<script type="text/javascript" src="dynsections.js"></script>
|
||||||
|
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||||
|
<script type="text/javascript" src="search/search.js"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(document).ready(function() { searchBox.OnSelectItem(0); });
|
||||||
|
</script>
|
||||||
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||||
|
<div id="titlearea">
|
||||||
|
<table cellspacing="0" cellpadding="0">
|
||||||
|
<tbody>
|
||||||
|
<tr style="height: 56px;">
|
||||||
|
<td style="padding-left: 0.5em;">
|
||||||
|
<div id="projectname">SCC.150 Assembler Emulator
|
||||||
|
</div>
|
||||||
|
<div id="projectbrief">A compiler for a simple assembler language</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<!-- end header part -->
|
||||||
|
<!-- Generated by Doxygen 1.8.6 -->
|
||||||
|
<script type="text/javascript">
|
||||||
|
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||||
|
</script>
|
||||||
|
<div id="navrow1" class="tabs">
|
||||||
|
<ul class="tablist">
|
||||||
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
||||||
|
<li class="current"><a href="annotated.html"><span>Data Structures</span></a></li>
|
||||||
|
<li><a href="files.html"><span>Files</span></a></li>
|
||||||
|
<li>
|
||||||
|
<div id="MSearchBox" class="MSearchBoxInactive">
|
||||||
|
<span class="left">
|
||||||
|
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||||
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||||
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||||
|
alt=""/>
|
||||||
|
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||||
|
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||||
|
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||||
|
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||||
|
</span><span class="right">
|
||||||
|
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div id="navrow2" class="tabs2">
|
||||||
|
<ul class="tablist">
|
||||||
|
<li class="current"><a href="annotated.html"><span>Data Structures</span></a></li>
|
||||||
|
<li><a href="classes.html"><span>Data Structure Index</span></a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div><!-- top -->
|
||||||
|
<!-- window showing the filter options -->
|
||||||
|
<div id="MSearchSelectWindow"
|
||||||
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||||
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||||
|
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||||
|
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Functions</a></div>
|
||||||
|
|
||||||
|
<!-- iframe showing the search results (closed by default) -->
|
||||||
|
<div id="MSearchResultsWindow">
|
||||||
|
<iframe src="javascript:void(0)" frameborder="0"
|
||||||
|
name="MSearchResults" id="MSearchResults">
|
||||||
|
</iframe>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="header">
|
||||||
|
<div class="headertitle">
|
||||||
|
<div class="title">Data Structures</div> </div>
|
||||||
|
</div><!--header-->
|
||||||
|
<div class="contents">
|
||||||
|
<div class="textblock">Here are the data structures with brief descriptions:</div><div class="directory">
|
||||||
|
<table class="directory">
|
||||||
|
<tr id="row_0_" class="even"><td class="entry"><img src="ftv2node.png" alt="o" width="16" height="22" /><img src="ftv2cl.png" alt="C" width="24" height="22" /><a class="el" href="struct__win__landscape__struct.html" target="_self">_win_landscape_struct</a></td><td class="desc"></td></tr>
|
||||||
|
<tr id="row_1_"><td class="entry"><img src="ftv2node.png" alt="o" width="16" height="22" /><img src="ftv2cl.png" alt="C" width="24" height="22" /><a class="el" href="struct__WIN__landscape__struct.html" target="_self">_WIN_landscape_struct</a></td><td class="desc"></td></tr>
|
||||||
|
<tr id="row_2_" class="even"><td class="entry"><img src="ftv2node.png" alt="o" width="16" height="22" /><img src="ftv2cl.png" alt="C" width="24" height="22" /><a class="el" href="struct__WIN__ship__struct.html" target="_self">_WIN_ship_struct</a></td><td class="desc"></td></tr>
|
||||||
|
<tr id="row_3_"><td class="entry"><img src="ftv2node.png" alt="o" width="16" height="22" /><img src="ftv2cl.png" alt="C" width="24" height="22" /><a class="el" href="struct__win__ship__struct.html" target="_self">_win_ship_struct</a></td><td class="desc"></td></tr>
|
||||||
|
<tr id="row_4_" class="even"><td class="entry"><img src="ftv2lastnode.png" alt="\" width="16" height="22" /><img src="ftv2cl.png" alt="C" width="24" height="22" /><a class="el" href="structtimespec__t.html" target="_self">timespec_t</a></td><td class="desc"></td></tr>
|
||||||
|
</table>
|
||||||
|
</div><!-- directory -->
|
||||||
|
</div><!-- contents -->
|
||||||
|
<!-- start footer part -->
|
||||||
|
<hr class="footer"/><address class="footer"><small>
|
||||||
|
Generated on Tue May 19 2015 20:33:41 for SCC.150 Assembler Emulator by  <a href="http://www.doxygen.org/index.html">
|
||||||
|
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
||||||
|
</a> 1.8.6
|
||||||
|
</small></address>
|
||||||
|
</body>
|
||||||
|
</html>
|
BIN
doc/html/bc_s.png
Executable file
After Width: | Height: | Size: 676 B |
BIN
doc/html/bdwn.png
Executable file
After Width: | Height: | Size: 147 B |
106
doc/html/classes.html
Executable file
|
@ -0,0 +1,106 @@
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||||
|
<meta name="generator" content="Doxygen 1.8.6"/>
|
||||||
|
<title>SCC.150 Assembler Emulator: Data Structure Index</title>
|
||||||
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||||
|
<script type="text/javascript" src="jquery.js"></script>
|
||||||
|
<script type="text/javascript" src="dynsections.js"></script>
|
||||||
|
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||||
|
<script type="text/javascript" src="search/search.js"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(document).ready(function() { searchBox.OnSelectItem(0); });
|
||||||
|
</script>
|
||||||
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||||
|
<div id="titlearea">
|
||||||
|
<table cellspacing="0" cellpadding="0">
|
||||||
|
<tbody>
|
||||||
|
<tr style="height: 56px;">
|
||||||
|
<td style="padding-left: 0.5em;">
|
||||||
|
<div id="projectname">SCC.150 Assembler Emulator
|
||||||
|
</div>
|
||||||
|
<div id="projectbrief">A compiler for a simple assembler language</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<!-- end header part -->
|
||||||
|
<!-- Generated by Doxygen 1.8.6 -->
|
||||||
|
<script type="text/javascript">
|
||||||
|
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||||
|
</script>
|
||||||
|
<div id="navrow1" class="tabs">
|
||||||
|
<ul class="tablist">
|
||||||
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
||||||
|
<li class="current"><a href="annotated.html"><span>Data Structures</span></a></li>
|
||||||
|
<li><a href="files.html"><span>Files</span></a></li>
|
||||||
|
<li>
|
||||||
|
<div id="MSearchBox" class="MSearchBoxInactive">
|
||||||
|
<span class="left">
|
||||||
|
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||||
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||||
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||||
|
alt=""/>
|
||||||
|
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||||
|
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||||
|
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||||
|
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||||
|
</span><span class="right">
|
||||||
|
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div id="navrow2" class="tabs2">
|
||||||
|
<ul class="tablist">
|
||||||
|
<li><a href="annotated.html"><span>Data Structures</span></a></li>
|
||||||
|
<li class="current"><a href="classes.html"><span>Data Structure Index</span></a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div><!-- top -->
|
||||||
|
<!-- window showing the filter options -->
|
||||||
|
<div id="MSearchSelectWindow"
|
||||||
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||||
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||||
|
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||||
|
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Functions</a></div>
|
||||||
|
|
||||||
|
<!-- iframe showing the search results (closed by default) -->
|
||||||
|
<div id="MSearchResultsWindow">
|
||||||
|
<iframe src="javascript:void(0)" frameborder="0"
|
||||||
|
name="MSearchResults" id="MSearchResults">
|
||||||
|
</iframe>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="header">
|
||||||
|
<div class="headertitle">
|
||||||
|
<div class="title">Data Structure Index</div> </div>
|
||||||
|
</div><!--header-->
|
||||||
|
<div class="contents">
|
||||||
|
<div class="qindex"><a class="qindex" href="#letter_T">T</a> | <a class="qindex" href="#letter__">_</a></div>
|
||||||
|
<table style="margin: 10px; white-space: nowrap;" align="center" width="95%" border="0" cellspacing="0" cellpadding="0">
|
||||||
|
<tr><td rowspan="2" valign="bottom"><a name="letter__"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">  _  </div></td></tr></table>
|
||||||
|
</td><td valign="top"><a class="el" href="struct__WIN__landscape__struct.html">_WIN_landscape_struct</a>   </td><td valign="top"><a class="el" href="struct__win__ship__struct.html">_win_ship_struct</a>   </td><td></td></tr>
|
||||||
|
<tr><td valign="top"><a class="el" href="struct__WIN__ship__struct.html">_WIN_ship_struct</a>   </td><td rowspan="2" valign="bottom"><a name="letter_t"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">  t  </div></td></tr></table>
|
||||||
|
</td><td></td></tr>
|
||||||
|
<tr><td valign="top"><a class="el" href="struct__win__landscape__struct.html">_win_landscape_struct</a>   </td><td></td><td></td></tr>
|
||||||
|
<tr><td></td><td></td><td valign="top"><a class="el" href="structtimespec__t.html">timespec_t</a>   </td><td></td></tr>
|
||||||
|
<tr><td></td><td></td><td></td><td></td></tr>
|
||||||
|
</table>
|
||||||
|
<div class="qindex"><a class="qindex" href="#letter_T">T</a> | <a class="qindex" href="#letter__">_</a></div>
|
||||||
|
</div><!-- contents -->
|
||||||
|
<!-- start footer part -->
|
||||||
|
<hr class="footer"/><address class="footer"><small>
|
||||||
|
Generated on Tue May 19 2015 20:33:41 for SCC.150 Assembler Emulator by  <a href="http://www.doxygen.org/index.html">
|
||||||
|
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
||||||
|
</a> 1.8.6
|
||||||
|
</small></address>
|
||||||
|
</body>
|
||||||
|
</html>
|
BIN
doc/html/closed.png
Executable file
After Width: | Height: | Size: 132 B |
101
doc/html/dir_b2f33c71d4aa5e7af42a1ca61ff5af1b.html
Executable file
|
@ -0,0 +1,101 @@
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||||
|
<meta name="generator" content="Doxygen 1.8.6"/>
|
||||||
|
<title>SCC.150 Assembler Emulator: /home/rumperuu/Documents/University/University Work/SCC.110 Software Development/Coursework/C/unr-Moon Lander/source Directory Reference</title>
|
||||||
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||||
|
<script type="text/javascript" src="jquery.js"></script>
|
||||||
|
<script type="text/javascript" src="dynsections.js"></script>
|
||||||
|
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||||
|
<script type="text/javascript" src="search/search.js"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(document).ready(function() { searchBox.OnSelectItem(0); });
|
||||||
|
</script>
|
||||||
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||||
|
<div id="titlearea">
|
||||||
|
<table cellspacing="0" cellpadding="0">
|
||||||
|
<tbody>
|
||||||
|
<tr style="height: 56px;">
|
||||||
|
<td style="padding-left: 0.5em;">
|
||||||
|
<div id="projectname">SCC.150 Assembler Emulator
|
||||||
|
</div>
|
||||||
|
<div id="projectbrief">A compiler for a simple assembler language</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<!-- end header part -->
|
||||||
|
<!-- Generated by Doxygen 1.8.6 -->
|
||||||
|
<script type="text/javascript">
|
||||||
|
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||||
|
</script>
|
||||||
|
<div id="navrow1" class="tabs">
|
||||||
|
<ul class="tablist">
|
||||||
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
||||||
|
<li><a href="annotated.html"><span>Data Structures</span></a></li>
|
||||||
|
<li><a href="files.html"><span>Files</span></a></li>
|
||||||
|
<li>
|
||||||
|
<div id="MSearchBox" class="MSearchBoxInactive">
|
||||||
|
<span class="left">
|
||||||
|
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||||
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||||
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||||
|
alt=""/>
|
||||||
|
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||||
|
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||||
|
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||||
|
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||||
|
</span><span class="right">
|
||||||
|
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<!-- window showing the filter options -->
|
||||||
|
<div id="MSearchSelectWindow"
|
||||||
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||||
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||||
|
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||||
|
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Functions</a></div>
|
||||||
|
|
||||||
|
<!-- iframe showing the search results (closed by default) -->
|
||||||
|
<div id="MSearchResultsWindow">
|
||||||
|
<iframe src="javascript:void(0)" frameborder="0"
|
||||||
|
name="MSearchResults" id="MSearchResults">
|
||||||
|
</iframe>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="nav-path" class="navpath">
|
||||||
|
<ul>
|
||||||
|
<li class="navelem"><a class="el" href="dir_b2f33c71d4aa5e7af42a1ca61ff5af1b.html">source</a></li> </ul>
|
||||||
|
</div>
|
||||||
|
</div><!-- top -->
|
||||||
|
<div class="header">
|
||||||
|
<div class="headertitle">
|
||||||
|
<div class="title">source Directory Reference</div> </div>
|
||||||
|
</div><!--header-->
|
||||||
|
<div class="contents">
|
||||||
|
<table class="memberdecls">
|
||||||
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="files"></a>
|
||||||
|
Files</h2></td></tr>
|
||||||
|
<tr class="memitem:moonlander_8c"><td class="memItemLeft" align="right" valign="top">file  </td><td class="memItemRight" valign="bottom"><a class="el" href="moonlander_8c.html">moonlander.c</a></td></tr>
|
||||||
|
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
|
<tr class="memitem:moonlander_8h"><td class="memItemLeft" align="right" valign="top">file  </td><td class="memItemRight" valign="bottom"><a class="el" href="moonlander_8h.html">moonlander.h</a> <a href="moonlander_8h_source.html">[code]</a></td></tr>
|
||||||
|
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
|
</table>
|
||||||
|
</div><!-- contents -->
|
||||||
|
<!-- start footer part -->
|
||||||
|
<hr class="footer"/><address class="footer"><small>
|
||||||
|
Generated on Tue May 19 2015 20:33:41 for SCC.150 Assembler Emulator by  <a href="http://www.doxygen.org/index.html">
|
||||||
|
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
||||||
|
</a> 1.8.6
|
||||||
|
</small></address>
|
||||||
|
</body>
|
||||||
|
</html>
|
1366
doc/html/doxygen.css
Executable file
BIN
doc/html/doxygen.png
Executable file
After Width: | Height: | Size: 3.7 KiB |
97
doc/html/dynsections.js
Executable file
|
@ -0,0 +1,97 @@
|
||||||
|
function toggleVisibility(linkObj)
|
||||||
|
{
|
||||||
|
var base = $(linkObj).attr('id');
|
||||||
|
var summary = $('#'+base+'-summary');
|
||||||
|
var content = $('#'+base+'-content');
|
||||||
|
var trigger = $('#'+base+'-trigger');
|
||||||
|
var src=$(trigger).attr('src');
|
||||||
|
if (content.is(':visible')===true) {
|
||||||
|
content.hide();
|
||||||
|
summary.show();
|
||||||
|
$(linkObj).addClass('closed').removeClass('opened');
|
||||||
|
$(trigger).attr('src',src.substring(0,src.length-8)+'closed.png');
|
||||||
|
} else {
|
||||||
|
content.show();
|
||||||
|
summary.hide();
|
||||||
|
$(linkObj).removeClass('closed').addClass('opened');
|
||||||
|
$(trigger).attr('src',src.substring(0,src.length-10)+'open.png');
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
function updateStripes()
|
||||||
|
{
|
||||||
|
$('table.directory tr').
|
||||||
|
removeClass('even').filter(':visible:even').addClass('even');
|
||||||
|
}
|
||||||
|
function toggleLevel(level)
|
||||||
|
{
|
||||||
|
$('table.directory tr').each(function(){
|
||||||
|
var l = this.id.split('_').length-1;
|
||||||
|
var i = $('#img'+this.id.substring(3));
|
||||||
|
var a = $('#arr'+this.id.substring(3));
|
||||||
|
if (l<level+1) {
|
||||||
|
i.attr('src','ftv2folderopen.png');
|
||||||
|
a.attr('src','ftv2mnode.png');
|
||||||
|
$(this).show();
|
||||||
|
} else if (l==level+1) {
|
||||||
|
i.attr('src','ftv2folderclosed.png');
|
||||||
|
a.attr('src','ftv2pnode.png');
|
||||||
|
$(this).show();
|
||||||
|
} else {
|
||||||
|
$(this).hide();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
updateStripes();
|
||||||
|
}
|
||||||
|
|
||||||
|
function toggleFolder(id)
|
||||||
|
{
|
||||||
|
//The clicked row
|
||||||
|
var currentRow = $('#row_'+id);
|
||||||
|
var currentRowImages = currentRow.find("img");
|
||||||
|
|
||||||
|
//All rows after the clicked row
|
||||||
|
var rows = currentRow.nextAll("tr");
|
||||||
|
|
||||||
|
//Only match elements AFTER this one (can't hide elements before)
|
||||||
|
var childRows = rows.filter(function() {
|
||||||
|
var re = new RegExp('^row_'+id+'\\d+_$', "i"); //only one sub
|
||||||
|
return this.id.match(re);
|
||||||
|
});
|
||||||
|
|
||||||
|
//First row is visible we are HIDING
|
||||||
|
if (childRows.filter(':first').is(':visible')===true) {
|
||||||
|
currentRowImages.filter("[id^=arr]").attr('src', 'ftv2pnode.png');
|
||||||
|
currentRowImages.filter("[id^=img]").attr('src', 'ftv2folderclosed.png');
|
||||||
|
rows.filter("[id^=row_"+id+"]").hide();
|
||||||
|
} else { //We are SHOWING
|
||||||
|
//All sub images
|
||||||
|
var childImages = childRows.find("img");
|
||||||
|
var childImg = childImages.filter("[id^=img]");
|
||||||
|
var childArr = childImages.filter("[id^=arr]");
|
||||||
|
|
||||||
|
currentRow.find("[id^=arr]").attr('src', 'ftv2mnode.png'); //open row
|
||||||
|
currentRow.find("[id^=img]").attr('src', 'ftv2folderopen.png'); //open row
|
||||||
|
childImg.attr('src','ftv2folderclosed.png'); //children closed
|
||||||
|
childArr.attr('src','ftv2pnode.png'); //children closed
|
||||||
|
childRows.show(); //show all children
|
||||||
|
}
|
||||||
|
updateStripes();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function toggleInherit(id)
|
||||||
|
{
|
||||||
|
var rows = $('tr.inherit.'+id);
|
||||||
|
var img = $('tr.inherit_header.'+id+' img');
|
||||||
|
var src = $(img).attr('src');
|
||||||
|
if (rows.filter(':first').is(':visible')===true) {
|
||||||
|
rows.css('display','none');
|
||||||
|
$(img).attr('src',src.substring(0,src.length-8)+'closed.png');
|
||||||
|
} else {
|
||||||
|
rows.css('display','table-row'); // using show() causes jump in firefox
|
||||||
|
$(img).attr('src',src.substring(0,src.length-10)+'open.png');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
102
doc/html/files.html
Executable file
|
@ -0,0 +1,102 @@
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||||
|
<meta name="generator" content="Doxygen 1.8.6"/>
|
||||||
|
<title>SCC.150 Assembler Emulator: File List</title>
|
||||||
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||||
|
<script type="text/javascript" src="jquery.js"></script>
|
||||||
|
<script type="text/javascript" src="dynsections.js"></script>
|
||||||
|
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||||
|
<script type="text/javascript" src="search/search.js"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(document).ready(function() { searchBox.OnSelectItem(0); });
|
||||||
|
</script>
|
||||||
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||||
|
<div id="titlearea">
|
||||||
|
<table cellspacing="0" cellpadding="0">
|
||||||
|
<tbody>
|
||||||
|
<tr style="height: 56px;">
|
||||||
|
<td style="padding-left: 0.5em;">
|
||||||
|
<div id="projectname">SCC.150 Assembler Emulator
|
||||||
|
</div>
|
||||||
|
<div id="projectbrief">A compiler for a simple assembler language</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<!-- end header part -->
|
||||||
|
<!-- Generated by Doxygen 1.8.6 -->
|
||||||
|
<script type="text/javascript">
|
||||||
|
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||||
|
</script>
|
||||||
|
<div id="navrow1" class="tabs">
|
||||||
|
<ul class="tablist">
|
||||||
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
||||||
|
<li><a href="annotated.html"><span>Data Structures</span></a></li>
|
||||||
|
<li class="current"><a href="files.html"><span>Files</span></a></li>
|
||||||
|
<li>
|
||||||
|
<div id="MSearchBox" class="MSearchBoxInactive">
|
||||||
|
<span class="left">
|
||||||
|
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||||
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||||
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||||
|
alt=""/>
|
||||||
|
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||||
|
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||||
|
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||||
|
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||||
|
</span><span class="right">
|
||||||
|
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div id="navrow2" class="tabs2">
|
||||||
|
<ul class="tablist">
|
||||||
|
<li class="current"><a href="files.html"><span>File List</span></a></li>
|
||||||
|
<li><a href="globals.html"><span>Globals</span></a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div><!-- top -->
|
||||||
|
<!-- window showing the filter options -->
|
||||||
|
<div id="MSearchSelectWindow"
|
||||||
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||||
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||||
|
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||||
|
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Functions</a></div>
|
||||||
|
|
||||||
|
<!-- iframe showing the search results (closed by default) -->
|
||||||
|
<div id="MSearchResultsWindow">
|
||||||
|
<iframe src="javascript:void(0)" frameborder="0"
|
||||||
|
name="MSearchResults" id="MSearchResults">
|
||||||
|
</iframe>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="header">
|
||||||
|
<div class="headertitle">
|
||||||
|
<div class="title">File List</div> </div>
|
||||||
|
</div><!--header-->
|
||||||
|
<div class="contents">
|
||||||
|
<div class="textblock">Here is a list of all documented files with brief descriptions:</div><div class="directory">
|
||||||
|
<div class="levels">[detail level <span onclick="javascript:toggleLevel(1);">1</span><span onclick="javascript:toggleLevel(2);">2</span>]</div><table class="directory">
|
||||||
|
<tr id="row_0_" class="even"><td class="entry"><img id="arr_0_" src="ftv2mlastnode.png" alt="\" width="16" height="22" onclick="toggleFolder('0_')"/><img id="img_0_" src="ftv2folderopen.png" alt="-" width="24" height="22" onclick="toggleFolder('0_')"/><a class="el" href="dir_b2f33c71d4aa5e7af42a1ca61ff5af1b.html" target="_self">source</a></td><td class="desc"></td></tr>
|
||||||
|
<tr id="row_0_0_"><td class="entry"><img src="ftv2blank.png" alt=" " width="16" height="22" /><img src="ftv2node.png" alt="o" width="16" height="22" /><img src="ftv2doc.png" alt="*" width="24" height="22" /><a class="el" href="moonlander_8c.html" target="_self">moonlander.c</a></td><td class="desc"></td></tr>
|
||||||
|
<tr id="row_0_1_" class="even"><td class="entry"><img src="ftv2blank.png" alt=" " width="16" height="22" /><img src="ftv2lastnode.png" alt="\" width="16" height="22" /><a href="moonlander_8h_source.html"><img src="ftv2doc.png" alt="*" width="24" height="22" /></a><a class="el" href="moonlander_8h.html" target="_self">moonlander.h</a></td><td class="desc"></td></tr>
|
||||||
|
</table>
|
||||||
|
</div><!-- directory -->
|
||||||
|
</div><!-- contents -->
|
||||||
|
<!-- start footer part -->
|
||||||
|
<hr class="footer"/><address class="footer"><small>
|
||||||
|
Generated on Tue May 19 2015 20:33:41 for SCC.150 Assembler Emulator by  <a href="http://www.doxygen.org/index.html">
|
||||||
|
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
||||||
|
</a> 1.8.6
|
||||||
|
</small></address>
|
||||||
|
</body>
|
||||||
|
</html>
|
BIN
doc/html/ftv2blank.png
Executable file
After Width: | Height: | Size: 86 B |
BIN
doc/html/ftv2cl.png
Executable file
After Width: | Height: | Size: 453 B |
BIN
doc/html/ftv2doc.png
Executable file
After Width: | Height: | Size: 746 B |
BIN
doc/html/ftv2folderclosed.png
Executable file
After Width: | Height: | Size: 616 B |
BIN
doc/html/ftv2folderopen.png
Executable file
After Width: | Height: | Size: 597 B |
BIN
doc/html/ftv2lastnode.png
Executable file
After Width: | Height: | Size: 86 B |
BIN
doc/html/ftv2link.png
Executable file
After Width: | Height: | Size: 746 B |
BIN
doc/html/ftv2mlastnode.png
Executable file
After Width: | Height: | Size: 246 B |
BIN
doc/html/ftv2mnode.png
Executable file
After Width: | Height: | Size: 246 B |
BIN
doc/html/ftv2mo.png
Executable file
After Width: | Height: | Size: 403 B |
BIN
doc/html/ftv2node.png
Executable file
After Width: | Height: | Size: 86 B |
BIN
doc/html/ftv2ns.png
Executable file
After Width: | Height: | Size: 388 B |
BIN
doc/html/ftv2plastnode.png
Executable file
After Width: | Height: | Size: 229 B |
BIN
doc/html/ftv2pnode.png
Executable file
After Width: | Height: | Size: 229 B |
BIN
doc/html/ftv2splitbar.png
Executable file
After Width: | Height: | Size: 314 B |
BIN
doc/html/ftv2vertline.png
Executable file
After Width: | Height: | Size: 86 B |
145
doc/html/globals.html
Executable file
|
@ -0,0 +1,145 @@
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||||
|
<meta name="generator" content="Doxygen 1.8.6"/>
|
||||||
|
<title>SCC.150 Assembler Emulator: Globals</title>
|
||||||
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||||
|
<script type="text/javascript" src="jquery.js"></script>
|
||||||
|
<script type="text/javascript" src="dynsections.js"></script>
|
||||||
|
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||||
|
<script type="text/javascript" src="search/search.js"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(document).ready(function() { searchBox.OnSelectItem(0); });
|
||||||
|
</script>
|
||||||
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||||
|
<div id="titlearea">
|
||||||
|
<table cellspacing="0" cellpadding="0">
|
||||||
|
<tbody>
|
||||||
|
<tr style="height: 56px;">
|
||||||
|
<td style="padding-left: 0.5em;">
|
||||||
|
<div id="projectname">SCC.150 Assembler Emulator
|
||||||
|
</div>
|
||||||
|
<div id="projectbrief">A compiler for a simple assembler language</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<!-- end header part -->
|
||||||
|
<!-- Generated by Doxygen 1.8.6 -->
|
||||||
|
<script type="text/javascript">
|
||||||
|
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||||
|
</script>
|
||||||
|
<div id="navrow1" class="tabs">
|
||||||
|
<ul class="tablist">
|
||||||
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
||||||
|
<li><a href="annotated.html"><span>Data Structures</span></a></li>
|
||||||
|
<li class="current"><a href="files.html"><span>Files</span></a></li>
|
||||||
|
<li>
|
||||||
|
<div id="MSearchBox" class="MSearchBoxInactive">
|
||||||
|
<span class="left">
|
||||||
|
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||||
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||||
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||||
|
alt=""/>
|
||||||
|
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||||
|
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||||
|
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||||
|
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||||
|
</span><span class="right">
|
||||||
|
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div id="navrow2" class="tabs2">
|
||||||
|
<ul class="tablist">
|
||||||
|
<li><a href="files.html"><span>File List</span></a></li>
|
||||||
|
<li class="current"><a href="globals.html"><span>Globals</span></a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div id="navrow3" class="tabs2">
|
||||||
|
<ul class="tablist">
|
||||||
|
<li class="current"><a href="globals.html"><span>All</span></a></li>
|
||||||
|
<li><a href="globals_func.html"><span>Functions</span></a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div><!-- top -->
|
||||||
|
<!-- window showing the filter options -->
|
||||||
|
<div id="MSearchSelectWindow"
|
||||||
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||||
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||||
|
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||||
|
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Functions</a></div>
|
||||||
|
|
||||||
|
<!-- iframe showing the search results (closed by default) -->
|
||||||
|
<div id="MSearchResultsWindow">
|
||||||
|
<iframe src="javascript:void(0)" frameborder="0"
|
||||||
|
name="MSearchResults" id="MSearchResults">
|
||||||
|
</iframe>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="contents">
|
||||||
|
<div class="textblock">Here is a list of all documented functions, variables, defines, enums, and typedefs with links to the documentation:</div><ul>
|
||||||
|
<li>applyFriction()
|
||||||
|
: <a class="el" href="moonlander_8c.html#ac6ac9217888e84291c290db745b67ce1">moonlander.c</a>
|
||||||
|
, <a class="el" href="moonlander_8h.html#ac6ac9217888e84291c290db745b67ce1">moonlander.h</a>
|
||||||
|
</li>
|
||||||
|
<li>applyGravity()
|
||||||
|
: <a class="el" href="moonlander_8c.html#a80d87b5874771eee0d24be7daa6cd187">moonlander.c</a>
|
||||||
|
, <a class="el" href="moonlander_8h.html#a80d87b5874771eee0d24be7daa6cd187">moonlander.h</a>
|
||||||
|
</li>
|
||||||
|
<li>applyJet()
|
||||||
|
: <a class="el" href="moonlander_8c.html#a8e5dee243eed13bb193a327212d1460b">moonlander.c</a>
|
||||||
|
, <a class="el" href="moonlander_8h.html#a8e5dee243eed13bb193a327212d1460b">moonlander.h</a>
|
||||||
|
</li>
|
||||||
|
<li>createLandscape()
|
||||||
|
: <a class="el" href="moonlander_8c.html#a2950dcda46229b12b3cd841832ed4a49">moonlander.c</a>
|
||||||
|
</li>
|
||||||
|
<li>createShip()
|
||||||
|
: <a class="el" href="moonlander_8c.html#ab7d9f8adcb580459033133fd49433a15">moonlander.c</a>
|
||||||
|
, <a class="el" href="moonlander_8h.html#ab7d9f8adcb580459033133fd49433a15">moonlander.h</a>
|
||||||
|
</li>
|
||||||
|
<li>displayIntro()
|
||||||
|
: <a class="el" href="moonlander_8c.html#abdd6a4d14501287a577ea668c521ef6b">moonlander.c</a>
|
||||||
|
, <a class="el" href="moonlander_8h.html#abdd6a4d14501287a577ea668c521ef6b">moonlander.h</a>
|
||||||
|
</li>
|
||||||
|
<li>getScore()
|
||||||
|
: <a class="el" href="moonlander_8c.html#a17d060768350e07c2f3d98b7d01cd0b6">moonlander.c</a>
|
||||||
|
, <a class="el" href="moonlander_8h.html#a17d060768350e07c2f3d98b7d01cd0b6">moonlander.h</a>
|
||||||
|
</li>
|
||||||
|
<li>initialiseLandscape()
|
||||||
|
: <a class="el" href="moonlander_8c.html#a0ec45fe851ecdae5b09ff1f5235e2bf4">moonlander.c</a>
|
||||||
|
, <a class="el" href="moonlander_8h.html#a0ec45fe851ecdae5b09ff1f5235e2bf4">moonlander.h</a>
|
||||||
|
</li>
|
||||||
|
<li>initialisencurses()
|
||||||
|
: <a class="el" href="moonlander_8c.html#a62c7d9da80c36528a8de3186d31d7ed8">moonlander.c</a>
|
||||||
|
, <a class="el" href="moonlander_8h.html#a62c7d9da80c36528a8de3186d31d7ed8">moonlander.h</a>
|
||||||
|
</li>
|
||||||
|
<li>initialiseShip()
|
||||||
|
: <a class="el" href="moonlander_8c.html#ae0dc18298c3a72665f84d0904bc9d287">moonlander.c</a>
|
||||||
|
, <a class="el" href="moonlander_8h.html#ae0dc18298c3a72665f84d0904bc9d287">moonlander.h</a>
|
||||||
|
</li>
|
||||||
|
<li>main()
|
||||||
|
: <a class="el" href="moonlander_8c.html#ae66f6b31b5ad750f1fe042a706a4e3d4">moonlander.c</a>
|
||||||
|
</li>
|
||||||
|
<li>moveShip()
|
||||||
|
: <a class="el" href="moonlander_8c.html#a58ccd08e3de9a09607a7e15852f114b7">moonlander.c</a>
|
||||||
|
, <a class="el" href="moonlander_8h.html#a58ccd08e3de9a09607a7e15852f114b7">moonlander.h</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div><!-- contents -->
|
||||||
|
<!-- start footer part -->
|
||||||
|
<hr class="footer"/><address class="footer"><small>
|
||||||
|
Generated on Tue May 19 2015 20:33:41 for SCC.150 Assembler Emulator by  <a href="http://www.doxygen.org/index.html">
|
||||||
|
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
||||||
|
</a> 1.8.6
|
||||||
|
</small></address>
|
||||||
|
</body>
|
||||||
|
</html>
|
145
doc/html/globals_func.html
Executable file
|
@ -0,0 +1,145 @@
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||||
|
<meta name="generator" content="Doxygen 1.8.6"/>
|
||||||
|
<title>SCC.150 Assembler Emulator: Globals</title>
|
||||||
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||||
|
<script type="text/javascript" src="jquery.js"></script>
|
||||||
|
<script type="text/javascript" src="dynsections.js"></script>
|
||||||
|
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||||
|
<script type="text/javascript" src="search/search.js"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(document).ready(function() { searchBox.OnSelectItem(0); });
|
||||||
|
</script>
|
||||||
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||||
|
<div id="titlearea">
|
||||||
|
<table cellspacing="0" cellpadding="0">
|
||||||
|
<tbody>
|
||||||
|
<tr style="height: 56px;">
|
||||||
|
<td style="padding-left: 0.5em;">
|
||||||
|
<div id="projectname">SCC.150 Assembler Emulator
|
||||||
|
</div>
|
||||||
|
<div id="projectbrief">A compiler for a simple assembler language</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<!-- end header part -->
|
||||||
|
<!-- Generated by Doxygen 1.8.6 -->
|
||||||
|
<script type="text/javascript">
|
||||||
|
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||||
|
</script>
|
||||||
|
<div id="navrow1" class="tabs">
|
||||||
|
<ul class="tablist">
|
||||||
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
||||||
|
<li><a href="annotated.html"><span>Data Structures</span></a></li>
|
||||||
|
<li class="current"><a href="files.html"><span>Files</span></a></li>
|
||||||
|
<li>
|
||||||
|
<div id="MSearchBox" class="MSearchBoxInactive">
|
||||||
|
<span class="left">
|
||||||
|
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||||
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||||
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||||
|
alt=""/>
|
||||||
|
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||||
|
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||||
|
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||||
|
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||||
|
</span><span class="right">
|
||||||
|
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div id="navrow2" class="tabs2">
|
||||||
|
<ul class="tablist">
|
||||||
|
<li><a href="files.html"><span>File List</span></a></li>
|
||||||
|
<li class="current"><a href="globals.html"><span>Globals</span></a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div id="navrow3" class="tabs2">
|
||||||
|
<ul class="tablist">
|
||||||
|
<li><a href="globals.html"><span>All</span></a></li>
|
||||||
|
<li class="current"><a href="globals_func.html"><span>Functions</span></a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div><!-- top -->
|
||||||
|
<!-- window showing the filter options -->
|
||||||
|
<div id="MSearchSelectWindow"
|
||||||
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||||
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||||
|
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||||
|
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Functions</a></div>
|
||||||
|
|
||||||
|
<!-- iframe showing the search results (closed by default) -->
|
||||||
|
<div id="MSearchResultsWindow">
|
||||||
|
<iframe src="javascript:void(0)" frameborder="0"
|
||||||
|
name="MSearchResults" id="MSearchResults">
|
||||||
|
</iframe>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="contents">
|
||||||
|
 <ul>
|
||||||
|
<li>applyFriction()
|
||||||
|
: <a class="el" href="moonlander_8c.html#ac6ac9217888e84291c290db745b67ce1">moonlander.c</a>
|
||||||
|
, <a class="el" href="moonlander_8h.html#ac6ac9217888e84291c290db745b67ce1">moonlander.h</a>
|
||||||
|
</li>
|
||||||
|
<li>applyGravity()
|
||||||
|
: <a class="el" href="moonlander_8c.html#a80d87b5874771eee0d24be7daa6cd187">moonlander.c</a>
|
||||||
|
, <a class="el" href="moonlander_8h.html#a80d87b5874771eee0d24be7daa6cd187">moonlander.h</a>
|
||||||
|
</li>
|
||||||
|
<li>applyJet()
|
||||||
|
: <a class="el" href="moonlander_8c.html#a8e5dee243eed13bb193a327212d1460b">moonlander.c</a>
|
||||||
|
, <a class="el" href="moonlander_8h.html#a8e5dee243eed13bb193a327212d1460b">moonlander.h</a>
|
||||||
|
</li>
|
||||||
|
<li>createLandscape()
|
||||||
|
: <a class="el" href="moonlander_8c.html#a2950dcda46229b12b3cd841832ed4a49">moonlander.c</a>
|
||||||
|
</li>
|
||||||
|
<li>createShip()
|
||||||
|
: <a class="el" href="moonlander_8c.html#ab7d9f8adcb580459033133fd49433a15">moonlander.c</a>
|
||||||
|
, <a class="el" href="moonlander_8h.html#ab7d9f8adcb580459033133fd49433a15">moonlander.h</a>
|
||||||
|
</li>
|
||||||
|
<li>displayIntro()
|
||||||
|
: <a class="el" href="moonlander_8c.html#abdd6a4d14501287a577ea668c521ef6b">moonlander.c</a>
|
||||||
|
, <a class="el" href="moonlander_8h.html#abdd6a4d14501287a577ea668c521ef6b">moonlander.h</a>
|
||||||
|
</li>
|
||||||
|
<li>getScore()
|
||||||
|
: <a class="el" href="moonlander_8c.html#a17d060768350e07c2f3d98b7d01cd0b6">moonlander.c</a>
|
||||||
|
, <a class="el" href="moonlander_8h.html#a17d060768350e07c2f3d98b7d01cd0b6">moonlander.h</a>
|
||||||
|
</li>
|
||||||
|
<li>initialiseLandscape()
|
||||||
|
: <a class="el" href="moonlander_8c.html#a0ec45fe851ecdae5b09ff1f5235e2bf4">moonlander.c</a>
|
||||||
|
, <a class="el" href="moonlander_8h.html#a0ec45fe851ecdae5b09ff1f5235e2bf4">moonlander.h</a>
|
||||||
|
</li>
|
||||||
|
<li>initialisencurses()
|
||||||
|
: <a class="el" href="moonlander_8c.html#a62c7d9da80c36528a8de3186d31d7ed8">moonlander.c</a>
|
||||||
|
, <a class="el" href="moonlander_8h.html#a62c7d9da80c36528a8de3186d31d7ed8">moonlander.h</a>
|
||||||
|
</li>
|
||||||
|
<li>initialiseShip()
|
||||||
|
: <a class="el" href="moonlander_8c.html#ae0dc18298c3a72665f84d0904bc9d287">moonlander.c</a>
|
||||||
|
, <a class="el" href="moonlander_8h.html#ae0dc18298c3a72665f84d0904bc9d287">moonlander.h</a>
|
||||||
|
</li>
|
||||||
|
<li>main()
|
||||||
|
: <a class="el" href="moonlander_8c.html#ae66f6b31b5ad750f1fe042a706a4e3d4">moonlander.c</a>
|
||||||
|
</li>
|
||||||
|
<li>moveShip()
|
||||||
|
: <a class="el" href="moonlander_8c.html#a58ccd08e3de9a09607a7e15852f114b7">moonlander.c</a>
|
||||||
|
, <a class="el" href="moonlander_8h.html#a58ccd08e3de9a09607a7e15852f114b7">moonlander.h</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div><!-- contents -->
|
||||||
|
<!-- start footer part -->
|
||||||
|
<hr class="footer"/><address class="footer"><small>
|
||||||
|
Generated on Tue May 19 2015 20:33:41 for SCC.150 Assembler Emulator by  <a href="http://www.doxygen.org/index.html">
|
||||||
|
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
||||||
|
</a> 1.8.6
|
||||||
|
</small></address>
|
||||||
|
</body>
|
||||||
|
</html>
|
89
doc/html/index.html
Executable file
|
@ -0,0 +1,89 @@
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||||
|
<meta name="generator" content="Doxygen 1.8.6"/>
|
||||||
|
<title>SCC.150 Assembler Emulator: Main Page</title>
|
||||||
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||||
|
<script type="text/javascript" src="jquery.js"></script>
|
||||||
|
<script type="text/javascript" src="dynsections.js"></script>
|
||||||
|
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||||
|
<script type="text/javascript" src="search/search.js"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(document).ready(function() { searchBox.OnSelectItem(0); });
|
||||||
|
</script>
|
||||||
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||||
|
<div id="titlearea">
|
||||||
|
<table cellspacing="0" cellpadding="0">
|
||||||
|
<tbody>
|
||||||
|
<tr style="height: 56px;">
|
||||||
|
<td style="padding-left: 0.5em;">
|
||||||
|
<div id="projectname">SCC.150 Assembler Emulator
|
||||||
|
</div>
|
||||||
|
<div id="projectbrief">A compiler for a simple assembler language</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<!-- end header part -->
|
||||||
|
<!-- Generated by Doxygen 1.8.6 -->
|
||||||
|
<script type="text/javascript">
|
||||||
|
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||||
|
</script>
|
||||||
|
<div id="navrow1" class="tabs">
|
||||||
|
<ul class="tablist">
|
||||||
|
<li class="current"><a href="index.html"><span>Main Page</span></a></li>
|
||||||
|
<li><a href="annotated.html"><span>Data Structures</span></a></li>
|
||||||
|
<li><a href="files.html"><span>Files</span></a></li>
|
||||||
|
<li>
|
||||||
|
<div id="MSearchBox" class="MSearchBoxInactive">
|
||||||
|
<span class="left">
|
||||||
|
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||||
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||||
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||||
|
alt=""/>
|
||||||
|
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||||
|
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||||
|
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||||
|
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||||
|
</span><span class="right">
|
||||||
|
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div><!-- top -->
|
||||||
|
<!-- window showing the filter options -->
|
||||||
|
<div id="MSearchSelectWindow"
|
||||||
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||||
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||||
|
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||||
|
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Functions</a></div>
|
||||||
|
|
||||||
|
<!-- iframe showing the search results (closed by default) -->
|
||||||
|
<div id="MSearchResultsWindow">
|
||||||
|
<iframe src="javascript:void(0)" frameborder="0"
|
||||||
|
name="MSearchResults" id="MSearchResults">
|
||||||
|
</iframe>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="header">
|
||||||
|
<div class="headertitle">
|
||||||
|
<div class="title">SCC.150 Assembler Emulator Documentation</div> </div>
|
||||||
|
</div><!--header-->
|
||||||
|
<div class="contents">
|
||||||
|
</div><!-- contents -->
|
||||||
|
<!-- start footer part -->
|
||||||
|
<hr class="footer"/><address class="footer"><small>
|
||||||
|
Generated on Tue May 19 2015 20:33:41 for SCC.150 Assembler Emulator by  <a href="http://www.doxygen.org/index.html">
|
||||||
|
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
||||||
|
</a> 1.8.6
|
||||||
|
</small></address>
|
||||||
|
</body>
|
||||||
|
</html>
|
31
doc/html/jquery.js
vendored
Executable file
490
doc/html/moonlander_8c.html
Executable file
|
@ -0,0 +1,490 @@
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||||
|
<meta name="generator" content="Doxygen 1.8.6"/>
|
||||||
|
<title>SCC.150 Assembler Emulator: /home/rumperuu/Documents/University/University Work/SCC.110 Software Development/Coursework/C/unr-Moon Lander/source/moonlander.c File Reference</title>
|
||||||
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||||
|
<script type="text/javascript" src="jquery.js"></script>
|
||||||
|
<script type="text/javascript" src="dynsections.js"></script>
|
||||||
|
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||||
|
<script type="text/javascript" src="search/search.js"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(document).ready(function() { searchBox.OnSelectItem(0); });
|
||||||
|
</script>
|
||||||
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||||
|
<div id="titlearea">
|
||||||
|
<table cellspacing="0" cellpadding="0">
|
||||||
|
<tbody>
|
||||||
|
<tr style="height: 56px;">
|
||||||
|
<td style="padding-left: 0.5em;">
|
||||||
|
<div id="projectname">SCC.150 Assembler Emulator
|
||||||
|
</div>
|
||||||
|
<div id="projectbrief">A compiler for a simple assembler language</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<!-- end header part -->
|
||||||
|
<!-- Generated by Doxygen 1.8.6 -->
|
||||||
|
<script type="text/javascript">
|
||||||
|
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||||
|
</script>
|
||||||
|
<div id="navrow1" class="tabs">
|
||||||
|
<ul class="tablist">
|
||||||
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
||||||
|
<li><a href="annotated.html"><span>Data Structures</span></a></li>
|
||||||
|
<li class="current"><a href="files.html"><span>Files</span></a></li>
|
||||||
|
<li>
|
||||||
|
<div id="MSearchBox" class="MSearchBoxInactive">
|
||||||
|
<span class="left">
|
||||||
|
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||||
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||||
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||||
|
alt=""/>
|
||||||
|
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||||
|
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||||
|
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||||
|
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||||
|
</span><span class="right">
|
||||||
|
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div id="navrow2" class="tabs2">
|
||||||
|
<ul class="tablist">
|
||||||
|
<li><a href="files.html"><span>File List</span></a></li>
|
||||||
|
<li><a href="globals.html"><span>Globals</span></a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<!-- window showing the filter options -->
|
||||||
|
<div id="MSearchSelectWindow"
|
||||||
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||||
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||||
|
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||||
|
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Functions</a></div>
|
||||||
|
|
||||||
|
<!-- iframe showing the search results (closed by default) -->
|
||||||
|
<div id="MSearchResultsWindow">
|
||||||
|
<iframe src="javascript:void(0)" frameborder="0"
|
||||||
|
name="MSearchResults" id="MSearchResults">
|
||||||
|
</iframe>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="nav-path" class="navpath">
|
||||||
|
<ul>
|
||||||
|
<li class="navelem"><a class="el" href="dir_b2f33c71d4aa5e7af42a1ca61ff5af1b.html">source</a></li> </ul>
|
||||||
|
</div>
|
||||||
|
</div><!-- top -->
|
||||||
|
<div class="header">
|
||||||
|
<div class="summary">
|
||||||
|
<a href="#func-members">Functions</a> </div>
|
||||||
|
<div class="headertitle">
|
||||||
|
<div class="title">moonlander.c File Reference</div> </div>
|
||||||
|
</div><!--header-->
|
||||||
|
<div class="contents">
|
||||||
|
<div class="textblock"><code>#include "<a class="el" href="moonlander_8h_source.html">moonlander.h</a>"</code><br/>
|
||||||
|
</div><table class="memberdecls">
|
||||||
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
|
||||||
|
Functions</h2></td></tr>
|
||||||
|
<tr class="memitem:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="moonlander_8c.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a> ()</td></tr>
|
||||||
|
<tr class="separator:ae66f6b31b5ad750f1fe042a706a4e3d4"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
|
<tr class="memitem:a62c7d9da80c36528a8de3186d31d7ed8"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="moonlander_8c.html#a62c7d9da80c36528a8de3186d31d7ed8">initialisencurses</a> ()</td></tr>
|
||||||
|
<tr class="separator:a62c7d9da80c36528a8de3186d31d7ed8"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
|
<tr class="memitem:ae0dc18298c3a72665f84d0904bc9d287"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="moonlander_8c.html#ae0dc18298c3a72665f84d0904bc9d287">initialiseShip</a> (<a class="el" href="struct__WIN__ship__struct.html">SHIP</a> *ship)</td></tr>
|
||||||
|
<tr class="separator:ae0dc18298c3a72665f84d0904bc9d287"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
|
<tr class="memitem:a0ec45fe851ecdae5b09ff1f5235e2bf4"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="moonlander_8c.html#a0ec45fe851ecdae5b09ff1f5235e2bf4">initialiseLandscape</a> (<a class="el" href="struct__WIN__landscape__struct.html">LANDSCAPE</a> *landscape)</td></tr>
|
||||||
|
<tr class="separator:a0ec45fe851ecdae5b09ff1f5235e2bf4"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
|
<tr class="memitem:ab7d9f8adcb580459033133fd49433a15"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="moonlander_8c.html#ab7d9f8adcb580459033133fd49433a15">createShip</a> (<a class="el" href="struct__WIN__ship__struct.html">SHIP</a> *ship)</td></tr>
|
||||||
|
<tr class="separator:ab7d9f8adcb580459033133fd49433a15"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
|
<tr class="memitem:a2950dcda46229b12b3cd841832ed4a49"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="moonlander_8c.html#a2950dcda46229b12b3cd841832ed4a49">createLandscape</a> (<a class="el" href="struct__WIN__landscape__struct.html">LANDSCAPE</a> *landscape, unsigned int landscapeArray[], unsigned int safeArray[])</td></tr>
|
||||||
|
<tr class="separator:a2950dcda46229b12b3cd841832ed4a49"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
|
<tr class="memitem:a8e5dee243eed13bb193a327212d1460b"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="moonlander_8c.html#a8e5dee243eed13bb193a327212d1460b">applyJet</a> (<a class="el" href="struct__WIN__ship__struct.html">SHIP</a> *ship, unsigned int dir)</td></tr>
|
||||||
|
<tr class="separator:a8e5dee243eed13bb193a327212d1460b"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
|
<tr class="memitem:a80d87b5874771eee0d24be7daa6cd187"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="moonlander_8c.html#a80d87b5874771eee0d24be7daa6cd187">applyGravity</a> (<a class="el" href="struct__WIN__ship__struct.html">SHIP</a> *ship)</td></tr>
|
||||||
|
<tr class="separator:a80d87b5874771eee0d24be7daa6cd187"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
|
<tr class="memitem:ac6ac9217888e84291c290db745b67ce1"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="moonlander_8c.html#ac6ac9217888e84291c290db745b67ce1">applyFriction</a> (<a class="el" href="struct__WIN__ship__struct.html">SHIP</a> *ship)</td></tr>
|
||||||
|
<tr class="separator:ac6ac9217888e84291c290db745b67ce1"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
|
<tr class="memitem:a58ccd08e3de9a09607a7e15852f114b7"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="moonlander_8c.html#a58ccd08e3de9a09607a7e15852f114b7">moveShip</a> (<a class="el" href="struct__WIN__ship__struct.html">SHIP</a> *ship, size_t lASize, unsigned int landscapeArray[], size_t sASize, unsigned int safeArray[])</td></tr>
|
||||||
|
<tr class="separator:a58ccd08e3de9a09607a7e15852f114b7"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
|
<tr class="memitem:abdd6a4d14501287a577ea668c521ef6b"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="moonlander_8c.html#abdd6a4d14501287a577ea668c521ef6b">displayIntro</a> ()</td></tr>
|
||||||
|
<tr class="separator:abdd6a4d14501287a577ea668c521ef6b"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
|
<tr class="memitem:a17d060768350e07c2f3d98b7d01cd0b6"><td class="memItemLeft" align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="moonlander_8c.html#a17d060768350e07c2f3d98b7d01cd0b6">getScore</a> (<a class="el" href="struct__WIN__ship__struct.html">SHIP</a> *ship, unsigned int time)</td></tr>
|
||||||
|
<tr class="separator:a17d060768350e07c2f3d98b7d01cd0b6"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
|
</table>
|
||||||
|
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||||
|
<div class="textblock"><dl class="section author"><dt>Author</dt><dd>Ben Goldsworthy (rumps) <a href="#" onclick="location.href='mai'+'lto:'+'bgo'+'ld'+'swo'+'rt'+'hy9'+'6@'+'gma'+'il'+'.co'+'m'; return false;">bgold<span style="display: none;">.nosp@m.</span>swor<span style="display: none;">.nosp@m.</span>thy96<span style="display: none;">.nosp@m.</span>@gma<span style="display: none;">.nosp@m.</span>il.co<span style="display: none;">.nosp@m.</span>m</a> </dd></dl>
|
||||||
|
<dl class="section version"><dt>Version</dt><dd>1.0</dd></dl>
|
||||||
|
<h1><a class="anchor" id="LICENSE"></a>
|
||||||
|
LICENSE</h1>
|
||||||
|
<p>This file 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.</p>
|
||||||
|
<p>This file 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.</p>
|
||||||
|
<p>You should have received a copy of the GNU General Public License along with this program. If not, see <a href="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</a>.</p>
|
||||||
|
<h1><a class="anchor" id="DESCRIPTION"></a>
|
||||||
|
DESCRIPTION</h1>
|
||||||
|
<p>This program attempts to emulate the 1979 Atari arcade classic 'Lunar Lander' in the *nix Terminal, using the ncurses library <a href="https://www.gnu.org/software/ncurses/ncurses.html">https://www.gnu.org/software/ncurses/ncurses.html</a>. This can seemingly only be because Joe Finney is sadistic.</p>
|
||||||
|
<p>Implemented features so far are:</p>
|
||||||
|
<ul>
|
||||||
|
<li>momentum & gravity</li>
|
||||||
|
<li>random landscape generation</li>
|
||||||
|
<li>crashing & (rarely) landing</li>
|
||||||
|
<li>cheats</li>
|
||||||
|
</ul>
|
||||||
|
<p>Features to implement by TOMORROW are:</p>
|
||||||
|
<ul>
|
||||||
|
<li>more cheats (or 'debug modes' as all the kids are calling them these days)</li>
|
||||||
|
<li>scoring</li>
|
||||||
|
<li>leaderboards</li>
|
||||||
|
<li>random gravity generation </li>
|
||||||
|
</ul>
|
||||||
|
</div><h2 class="groupheader">Function Documentation</h2>
|
||||||
|
<a class="anchor" id="ac6ac9217888e84291c290db745b67ce1"></a>
|
||||||
|
<div class="memitem">
|
||||||
|
<div class="memproto">
|
||||||
|
<table class="memname">
|
||||||
|
<tr>
|
||||||
|
<td class="memname">void applyFriction </td>
|
||||||
|
<td>(</td>
|
||||||
|
<td class="paramtype"><a class="el" href="struct__WIN__ship__struct.html">SHIP</a> * </td>
|
||||||
|
<td class="paramname"><em>ship</em></td><td>)</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div><div class="memdoc">
|
||||||
|
<p>Applies the equally relentless force of friction to the ship.</p>
|
||||||
|
<dl class="params"><dt>Parameters</dt><dd>
|
||||||
|
<table class="params">
|
||||||
|
<tr><td class="paramname">ship</td><td>the ship in question </td></tr>
|
||||||
|
</table>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<a class="anchor" id="a80d87b5874771eee0d24be7daa6cd187"></a>
|
||||||
|
<div class="memitem">
|
||||||
|
<div class="memproto">
|
||||||
|
<table class="memname">
|
||||||
|
<tr>
|
||||||
|
<td class="memname">void applyGravity </td>
|
||||||
|
<td>(</td>
|
||||||
|
<td class="paramtype"><a class="el" href="struct__WIN__ship__struct.html">SHIP</a> * </td>
|
||||||
|
<td class="paramname"><em>ship</em></td><td>)</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div><div class="memdoc">
|
||||||
|
<p>Applies the relentless march of gravity to the ship.</p>
|
||||||
|
<dl class="params"><dt>Parameters</dt><dd>
|
||||||
|
<table class="params">
|
||||||
|
<tr><td class="paramname">ship</td><td>the ship in question </td></tr>
|
||||||
|
</table>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<a class="anchor" id="a8e5dee243eed13bb193a327212d1460b"></a>
|
||||||
|
<div class="memitem">
|
||||||
|
<div class="memproto">
|
||||||
|
<table class="memname">
|
||||||
|
<tr>
|
||||||
|
<td class="memname">void applyJet </td>
|
||||||
|
<td>(</td>
|
||||||
|
<td class="paramtype"><a class="el" href="struct__WIN__ship__struct.html">SHIP</a> * </td>
|
||||||
|
<td class="paramname"><em>ship</em>, </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="paramkey"></td>
|
||||||
|
<td></td>
|
||||||
|
<td class="paramtype">unsigned int </td>
|
||||||
|
<td class="paramname"><em>dir</em> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td></td>
|
||||||
|
<td>)</td>
|
||||||
|
<td></td><td></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div><div class="memdoc">
|
||||||
|
<p>Applies the thrust of the jet to the ship.</p>
|
||||||
|
<p>If the ship is out of fuel, the jets won't fire.</p>
|
||||||
|
<dl class="params"><dt>Parameters</dt><dd>
|
||||||
|
<table class="params">
|
||||||
|
<tr><td class="paramname">ship</td><td>the ship in question </td></tr>
|
||||||
|
<tr><td class="paramname">dir</td><td>the thrust direction </td></tr>
|
||||||
|
</table>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<a class="anchor" id="a2950dcda46229b12b3cd841832ed4a49"></a>
|
||||||
|
<div class="memitem">
|
||||||
|
<div class="memproto">
|
||||||
|
<table class="memname">
|
||||||
|
<tr>
|
||||||
|
<td class="memname">bool createLandscape </td>
|
||||||
|
<td>(</td>
|
||||||
|
<td class="paramtype"><a class="el" href="struct__WIN__landscape__struct.html">LANDSCAPE</a> * </td>
|
||||||
|
<td class="paramname"><em>landscape</em>, </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="paramkey"></td>
|
||||||
|
<td></td>
|
||||||
|
<td class="paramtype">unsigned int </td>
|
||||||
|
<td class="paramname"><em>landscapeArray</em>[], </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="paramkey"></td>
|
||||||
|
<td></td>
|
||||||
|
<td class="paramtype">unsigned int </td>
|
||||||
|
<td class="paramname"><em>safeArray</em>[] </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td></td>
|
||||||
|
<td>)</td>
|
||||||
|
<td></td><td></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div><div class="memdoc">
|
||||||
|
<p>Creates the landscape in the game world.</p>
|
||||||
|
<dl class="params"><dt>Parameters</dt><dd>
|
||||||
|
<table class="params">
|
||||||
|
<tr><td class="paramname">landscape</td><td>the landscape in question </td></tr>
|
||||||
|
<tr><td class="paramname">landscapeArray[]</td><td>the array of all the coordinates of the landscape components </td></tr>
|
||||||
|
<tr><td class="paramname">safeArray[]</td><td>the array of all the coordinates of the landing pad components </td></tr>
|
||||||
|
</table>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
<dl class="section return"><dt>Returns</dt><dd>true if the landscape is valid (has at least one landing pad), false if not </dd></dl>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<a class="anchor" id="ab7d9f8adcb580459033133fd49433a15"></a>
|
||||||
|
<div class="memitem">
|
||||||
|
<div class="memproto">
|
||||||
|
<table class="memname">
|
||||||
|
<tr>
|
||||||
|
<td class="memname">void createShip </td>
|
||||||
|
<td>(</td>
|
||||||
|
<td class="paramtype"><a class="el" href="struct__WIN__ship__struct.html">SHIP</a> * </td>
|
||||||
|
<td class="paramname"><em>ship</em></td><td>)</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div><div class="memdoc">
|
||||||
|
<p>Creates the ship in the game world.</p>
|
||||||
|
<dl class="params"><dt>Parameters</dt><dd>
|
||||||
|
<table class="params">
|
||||||
|
<tr><td class="paramname">ship</td><td>the ship in question </td></tr>
|
||||||
|
</table>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<a class="anchor" id="abdd6a4d14501287a577ea668c521ef6b"></a>
|
||||||
|
<div class="memitem">
|
||||||
|
<div class="memproto">
|
||||||
|
<table class="memname">
|
||||||
|
<tr>
|
||||||
|
<td class="memname">void displayIntro </td>
|
||||||
|
<td>(</td>
|
||||||
|
<td class="paramname"></td><td>)</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div><div class="memdoc">
|
||||||
|
<p>Displays the lovely ASCII lunar lander I nicked. </p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<a class="anchor" id="a17d060768350e07c2f3d98b7d01cd0b6"></a>
|
||||||
|
<div class="memitem">
|
||||||
|
<div class="memproto">
|
||||||
|
<table class="memname">
|
||||||
|
<tr>
|
||||||
|
<td class="memname">double getScore </td>
|
||||||
|
<td>(</td>
|
||||||
|
<td class="paramtype"><a class="el" href="struct__WIN__ship__struct.html">SHIP</a> * </td>
|
||||||
|
<td class="paramname"><em>ship</em>, </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="paramkey"></td>
|
||||||
|
<td></td>
|
||||||
|
<td class="paramtype">unsigned int </td>
|
||||||
|
<td class="paramname"><em>time</em> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td></td>
|
||||||
|
<td>)</td>
|
||||||
|
<td></td><td></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div><div class="memdoc">
|
||||||
|
<p>Works out the player's score upon successful landing.</p>
|
||||||
|
<p>The specification states "score is calculated using some heuristic based on
|
||||||
|
time used and fuel remaining." Heuristic sounds fancy, and so is the method of working out the score.</p>
|
||||||
|
<dl class="params"><dt>Parameters</dt><dd>
|
||||||
|
<table class="params">
|
||||||
|
<tr><td class="paramname">ship</td><td>the ship in question </td></tr>
|
||||||
|
</table>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
<dl class="section return"><dt>Returns</dt><dd>the score </dd></dl>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<a class="anchor" id="a0ec45fe851ecdae5b09ff1f5235e2bf4"></a>
|
||||||
|
<div class="memitem">
|
||||||
|
<div class="memproto">
|
||||||
|
<table class="memname">
|
||||||
|
<tr>
|
||||||
|
<td class="memname">void initialiseLandscape </td>
|
||||||
|
<td>(</td>
|
||||||
|
<td class="paramtype"><a class="el" href="struct__WIN__landscape__struct.html">LANDSCAPE</a> * </td>
|
||||||
|
<td class="paramname"><em>landscape</em></td><td>)</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div><div class="memdoc">
|
||||||
|
<p>Initialises the landscape's parameters.</p>
|
||||||
|
<dl class="params"><dt>Parameters</dt><dd>
|
||||||
|
<table class="params">
|
||||||
|
<tr><td class="paramname">landscape</td><td>the landscape in question </td></tr>
|
||||||
|
</table>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<a class="anchor" id="a62c7d9da80c36528a8de3186d31d7ed8"></a>
|
||||||
|
<div class="memitem">
|
||||||
|
<div class="memproto">
|
||||||
|
<table class="memname">
|
||||||
|
<tr>
|
||||||
|
<td class="memname">void initialisencurses </td>
|
||||||
|
<td>(</td>
|
||||||
|
<td class="paramname"></td><td>)</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div><div class="memdoc">
|
||||||
|
<p>Initialises ncurses.</p>
|
||||||
|
<p>I couldn't decide whether it should be <code><a class="el" href="moonlander_8c.html#a62c7d9da80c36528a8de3186d31d7ed8">initialisencurses()</a></code>, <code>initialiseNCURSES()</code> or <code>initialiseNcurses()</code>. In the end I plumped for <code><a class="el" href="moonlander_8c.html#a62c7d9da80c36528a8de3186d31d7ed8">initialisencurses()</a></code> because, whilst it does break the camelCase rule I've used throughout for variables and functions, ncurses is one of those trendy uncapitalised names. </p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<a class="anchor" id="ae0dc18298c3a72665f84d0904bc9d287"></a>
|
||||||
|
<div class="memitem">
|
||||||
|
<div class="memproto">
|
||||||
|
<table class="memname">
|
||||||
|
<tr>
|
||||||
|
<td class="memname">void initialiseShip </td>
|
||||||
|
<td>(</td>
|
||||||
|
<td class="paramtype"><a class="el" href="struct__WIN__ship__struct.html">SHIP</a> * </td>
|
||||||
|
<td class="paramname"><em>ship</em></td><td>)</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div><div class="memdoc">
|
||||||
|
<p>Initialises the ship's parameters.</p>
|
||||||
|
<dl class="params"><dt>Parameters</dt><dd>
|
||||||
|
<table class="params">
|
||||||
|
<tr><td class="paramname">ship</td><td>the ship in question </td></tr>
|
||||||
|
</table>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<a class="anchor" id="ae66f6b31b5ad750f1fe042a706a4e3d4"></a>
|
||||||
|
<div class="memitem">
|
||||||
|
<div class="memproto">
|
||||||
|
<table class="memname">
|
||||||
|
<tr>
|
||||||
|
<td class="memname">int main </td>
|
||||||
|
<td>(</td>
|
||||||
|
<td class="paramname"></td><td>)</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div><div class="memdoc">
|
||||||
|
<p>The main function of the program.</p>
|
||||||
|
<p>Sets everything up initially, and then contains the game loop.</p>
|
||||||
|
<dl class="section return"><dt>Returns</dt><dd>0 on success </dd></dl>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<a class="anchor" id="a58ccd08e3de9a09607a7e15852f114b7"></a>
|
||||||
|
<div class="memitem">
|
||||||
|
<div class="memproto">
|
||||||
|
<table class="memname">
|
||||||
|
<tr>
|
||||||
|
<td class="memname">void moveShip </td>
|
||||||
|
<td>(</td>
|
||||||
|
<td class="paramtype"><a class="el" href="struct__WIN__ship__struct.html">SHIP</a> * </td>
|
||||||
|
<td class="paramname"><em>ship</em>, </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="paramkey"></td>
|
||||||
|
<td></td>
|
||||||
|
<td class="paramtype">size_t </td>
|
||||||
|
<td class="paramname"><em>lASize</em>, </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="paramkey"></td>
|
||||||
|
<td></td>
|
||||||
|
<td class="paramtype">unsigned int </td>
|
||||||
|
<td class="paramname"><em>landscapeArray</em>[], </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="paramkey"></td>
|
||||||
|
<td></td>
|
||||||
|
<td class="paramtype">size_t </td>
|
||||||
|
<td class="paramname"><em>sASize</em>, </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="paramkey"></td>
|
||||||
|
<td></td>
|
||||||
|
<td class="paramtype">unsigned int </td>
|
||||||
|
<td class="paramname"><em>safeArray</em>[] </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td></td>
|
||||||
|
<td>)</td>
|
||||||
|
<td></td><td></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div><div class="memdoc">
|
||||||
|
<p>Moves the ship within the game world.</p>
|
||||||
|
<dl class="params"><dt>Parameters</dt><dd>
|
||||||
|
<table class="params">
|
||||||
|
<tr><td class="paramname">ship</td><td>the ship in question </td></tr>
|
||||||
|
<tr><td class="paramname">lASize</td><td>the length of useful data in <code>landscapeArray</code> </td></tr>
|
||||||
|
<tr><td class="paramname">landscapeArray</td><td>the array of coordinates for the components of the landscape </td></tr>
|
||||||
|
<tr><td class="paramname">sASize</td><td>the length of useful data in <code>safeArray</code> </td></tr>
|
||||||
|
<tr><td class="paramname">safeArray</td><td>the array of coordinates for the components of the landing pad(s) </td></tr>
|
||||||
|
</table>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div><!-- contents -->
|
||||||
|
<!-- start footer part -->
|
||||||
|
<hr class="footer"/><address class="footer"><small>
|
||||||
|
Generated on Tue May 19 2015 20:33:41 for SCC.150 Assembler Emulator by  <a href="http://www.doxygen.org/index.html">
|
||||||
|
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
||||||
|
</a> 1.8.6
|
||||||
|
</small></address>
|
||||||
|
</body>
|
||||||
|
</html>
|
524
doc/html/moonlander_8h.html
Executable file
|
@ -0,0 +1,524 @@
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||||
|
<meta name="generator" content="Doxygen 1.8.6"/>
|
||||||
|
<title>SCC.150 Assembler Emulator: /home/rumperuu/Documents/University/University Work/SCC.110 Software Development/Coursework/C/unr-Moon Lander/source/moonlander.h File Reference</title>
|
||||||
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||||
|
<script type="text/javascript" src="jquery.js"></script>
|
||||||
|
<script type="text/javascript" src="dynsections.js"></script>
|
||||||
|
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||||
|
<script type="text/javascript" src="search/search.js"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(document).ready(function() { searchBox.OnSelectItem(0); });
|
||||||
|
</script>
|
||||||
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||||
|
<div id="titlearea">
|
||||||
|
<table cellspacing="0" cellpadding="0">
|
||||||
|
<tbody>
|
||||||
|
<tr style="height: 56px;">
|
||||||
|
<td style="padding-left: 0.5em;">
|
||||||
|
<div id="projectname">SCC.150 Assembler Emulator
|
||||||
|
</div>
|
||||||
|
<div id="projectbrief">A compiler for a simple assembler language</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<!-- end header part -->
|
||||||
|
<!-- Generated by Doxygen 1.8.6 -->
|
||||||
|
<script type="text/javascript">
|
||||||
|
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||||
|
</script>
|
||||||
|
<div id="navrow1" class="tabs">
|
||||||
|
<ul class="tablist">
|
||||||
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
||||||
|
<li><a href="annotated.html"><span>Data Structures</span></a></li>
|
||||||
|
<li class="current"><a href="files.html"><span>Files</span></a></li>
|
||||||
|
<li>
|
||||||
|
<div id="MSearchBox" class="MSearchBoxInactive">
|
||||||
|
<span class="left">
|
||||||
|
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||||
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||||
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||||
|
alt=""/>
|
||||||
|
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||||
|
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||||
|
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||||
|
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||||
|
</span><span class="right">
|
||||||
|
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div id="navrow2" class="tabs2">
|
||||||
|
<ul class="tablist">
|
||||||
|
<li><a href="files.html"><span>File List</span></a></li>
|
||||||
|
<li><a href="globals.html"><span>Globals</span></a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<!-- window showing the filter options -->
|
||||||
|
<div id="MSearchSelectWindow"
|
||||||
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||||
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||||
|
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||||
|
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Functions</a></div>
|
||||||
|
|
||||||
|
<!-- iframe showing the search results (closed by default) -->
|
||||||
|
<div id="MSearchResultsWindow">
|
||||||
|
<iframe src="javascript:void(0)" frameborder="0"
|
||||||
|
name="MSearchResults" id="MSearchResults">
|
||||||
|
</iframe>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="nav-path" class="navpath">
|
||||||
|
<ul>
|
||||||
|
<li class="navelem"><a class="el" href="dir_b2f33c71d4aa5e7af42a1ca61ff5af1b.html">source</a></li> </ul>
|
||||||
|
</div>
|
||||||
|
</div><!-- top -->
|
||||||
|
<div class="header">
|
||||||
|
<div class="summary">
|
||||||
|
<a href="#nested-classes">Data Structures</a> |
|
||||||
|
<a href="#define-members">Macros</a> |
|
||||||
|
<a href="#typedef-members">Typedefs</a> |
|
||||||
|
<a href="#func-members">Functions</a> |
|
||||||
|
<a href="#var-members">Variables</a> </div>
|
||||||
|
<div class="headertitle">
|
||||||
|
<div class="title">moonlander.h File Reference</div> </div>
|
||||||
|
</div><!--header-->
|
||||||
|
<div class="contents">
|
||||||
|
<div class="textblock"><code>#include <stdbool.h></code><br/>
|
||||||
|
<code>#include <ncurses.h></code><br/>
|
||||||
|
<code>#include <stdlib.h></code><br/>
|
||||||
|
<code>#include <time.h></code><br/>
|
||||||
|
<code>#include <math.h></code><br/>
|
||||||
|
</div>
|
||||||
|
<p><a href="moonlander_8h_source.html">Go to the source code of this file.</a></p>
|
||||||
|
<table class="memberdecls">
|
||||||
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
|
||||||
|
Data Structures</h2></td></tr>
|
||||||
|
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="struct__win__landscape__struct.html">_win_landscape_struct</a></td></tr>
|
||||||
|
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
|
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="struct__WIN__landscape__struct.html">_WIN_landscape_struct</a></td></tr>
|
||||||
|
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
|
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="struct__win__ship__struct.html">_win_ship_struct</a></td></tr>
|
||||||
|
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
|
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="struct__WIN__ship__struct.html">_WIN_ship_struct</a></td></tr>
|
||||||
|
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
|
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="structtimespec__t.html">timespec_t</a></td></tr>
|
||||||
|
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
|
</table><table class="memberdecls">
|
||||||
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
|
||||||
|
Macros</h2></td></tr>
|
||||||
|
<tr class="memitem:a655c84af1b0034986ff56e12e84f983d"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a655c84af1b0034986ff56e12e84f983d"></a>
|
||||||
|
#define </td><td class="memItemRight" valign="bottom"><b>NONE</b>   0</td></tr>
|
||||||
|
<tr class="separator:a655c84af1b0034986ff56e12e84f983d"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
|
<tr class="memitem:a1965eaca47dbf3f87acdafc2208f04eb"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1965eaca47dbf3f87acdafc2208f04eb"></a>
|
||||||
|
#define </td><td class="memItemRight" valign="bottom"><b>UP</b>   1</td></tr>
|
||||||
|
<tr class="separator:a1965eaca47dbf3f87acdafc2208f04eb"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
|
<tr class="memitem:a80fb826a684cf3f0d306b22aa100ddac"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a80fb826a684cf3f0d306b22aa100ddac"></a>
|
||||||
|
#define </td><td class="memItemRight" valign="bottom"><b>RIGHT</b>   2</td></tr>
|
||||||
|
<tr class="separator:a80fb826a684cf3f0d306b22aa100ddac"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
|
<tr class="memitem:a4193cd1c8c2e6ebd0e056fa2364a663f"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4193cd1c8c2e6ebd0e056fa2364a663f"></a>
|
||||||
|
#define </td><td class="memItemRight" valign="bottom"><b>DOWN</b>   3</td></tr>
|
||||||
|
<tr class="separator:a4193cd1c8c2e6ebd0e056fa2364a663f"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
|
<tr class="memitem:a437ef08681e7210d6678427030446a54"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a437ef08681e7210d6678427030446a54"></a>
|
||||||
|
#define </td><td class="memItemRight" valign="bottom"><b>LEFT</b>   4</td></tr>
|
||||||
|
<tr class="separator:a437ef08681e7210d6678427030446a54"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
|
<tr class="memitem:ad9815b8411c5174a1b9c4fdd41867a7f"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad9815b8411c5174a1b9c4fdd41867a7f"></a>
|
||||||
|
#define </td><td class="memItemRight" valign="bottom"><b>LEFT_INCLINE</b>   0</td></tr>
|
||||||
|
<tr class="separator:ad9815b8411c5174a1b9c4fdd41867a7f"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
|
<tr class="memitem:a41d9ad16be37ee68580da3de0f0f98a0"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a41d9ad16be37ee68580da3de0f0f98a0"></a>
|
||||||
|
#define </td><td class="memItemRight" valign="bottom"><b>STRAIGHT_UP</b>   1</td></tr>
|
||||||
|
<tr class="separator:a41d9ad16be37ee68580da3de0f0f98a0"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
|
<tr class="memitem:a5ec93a5084467645832e2eff4f09f30c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5ec93a5084467645832e2eff4f09f30c"></a>
|
||||||
|
#define </td><td class="memItemRight" valign="bottom"><b>STRAIGHT_DOWN</b>   2</td></tr>
|
||||||
|
<tr class="separator:a5ec93a5084467645832e2eff4f09f30c"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
|
<tr class="memitem:abf4a498a981a70e042c5317f175c0576"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="abf4a498a981a70e042c5317f175c0576"></a>
|
||||||
|
#define </td><td class="memItemRight" valign="bottom"><b>RIGHT_DECLINE</b>   3</td></tr>
|
||||||
|
<tr class="separator:abf4a498a981a70e042c5317f175c0576"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
|
<tr class="memitem:a25dcb98b89858273498cff95bffe5a06"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a25dcb98b89858273498cff95bffe5a06"></a>
|
||||||
|
#define </td><td class="memItemRight" valign="bottom"><b>PLATEAU</b>   4</td></tr>
|
||||||
|
<tr class="separator:a25dcb98b89858273498cff95bffe5a06"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
|
<tr class="memitem:a655c84af1b0034986ff56e12e84f983d"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a655c84af1b0034986ff56e12e84f983d"></a>
|
||||||
|
#define </td><td class="memItemRight" valign="bottom"><b>NONE</b>   0</td></tr>
|
||||||
|
<tr class="separator:a655c84af1b0034986ff56e12e84f983d"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
|
<tr class="memitem:a5a24df9755c49775ec259b3c7021df0e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5a24df9755c49775ec259b3c7021df0e"></a>
|
||||||
|
#define </td><td class="memItemRight" valign="bottom"><b>CRASH</b>   1</td></tr>
|
||||||
|
<tr class="separator:a5a24df9755c49775ec259b3c7021df0e"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
|
<tr class="memitem:a8e46a68b2e887e05d235781f5c40d68e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8e46a68b2e887e05d235781f5c40d68e"></a>
|
||||||
|
#define </td><td class="memItemRight" valign="bottom"><b>LAND</b>   2</td></tr>
|
||||||
|
<tr class="separator:a8e46a68b2e887e05d235781f5c40d68e"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
|
<tr class="memitem:ad24e2b54375e12474e65ebf7175988fb"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad24e2b54375e12474e65ebf7175988fb"></a>
|
||||||
|
#define </td><td class="memItemRight" valign="bottom"><b>QUIT</b>   3</td></tr>
|
||||||
|
<tr class="separator:ad24e2b54375e12474e65ebf7175988fb"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
|
<tr class="memitem:ab70a3304f4cc184121587d7884fbcaff"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab70a3304f4cc184121587d7884fbcaff"></a>
|
||||||
|
#define </td><td class="memItemRight" valign="bottom"><b>STARTING_FUEL</b>   900</td></tr>
|
||||||
|
<tr class="separator:ab70a3304f4cc184121587d7884fbcaff"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
|
<tr class="memitem:a4879857b847ecdee94bde553f0720c38"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4879857b847ecdee94bde553f0720c38"></a>
|
||||||
|
#define </td><td class="memItemRight" valign="bottom"><b>CHANCE_OF_LANDING_PAD</b>   3</td></tr>
|
||||||
|
<tr class="separator:a4879857b847ecdee94bde553f0720c38"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
|
<tr class="memitem:a0a616668bcdd0dd14291ce0b10f46ae5"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0a616668bcdd0dd14291ce0b10f46ae5"></a>
|
||||||
|
#define </td><td class="memItemRight" valign="bottom"><b>TERMINAL_VELOCITY</b>   0.9f</td></tr>
|
||||||
|
<tr class="separator:a0a616668bcdd0dd14291ce0b10f46ae5"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
|
</table><table class="memberdecls">
|
||||||
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
|
||||||
|
Typedefs</h2></td></tr>
|
||||||
|
<tr class="memitem:a551c7583e165a1f1f32caa547aedbdbe"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a551c7583e165a1f1f32caa547aedbdbe"></a>
|
||||||
|
typedef struct <br class="typebreak"/>
|
||||||
|
<a class="el" href="struct__win__landscape__struct.html">_win_landscape_struct</a> </td><td class="memItemRight" valign="bottom"><b>WIN_LANDSCAPE</b></td></tr>
|
||||||
|
<tr class="separator:a551c7583e165a1f1f32caa547aedbdbe"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
|
<tr class="memitem:a656ff69f7ac7628ce840ca31eb3c81e9"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a656ff69f7ac7628ce840ca31eb3c81e9"></a>
|
||||||
|
typedef struct <br class="typebreak"/>
|
||||||
|
<a class="el" href="struct__WIN__landscape__struct.html">_WIN_landscape_struct</a> </td><td class="memItemRight" valign="bottom"><b>LANDSCAPE</b></td></tr>
|
||||||
|
<tr class="separator:a656ff69f7ac7628ce840ca31eb3c81e9"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
|
<tr class="memitem:a0411a851d6e3fd19462afd2cdbad9596"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0411a851d6e3fd19462afd2cdbad9596"></a>
|
||||||
|
typedef struct <a class="el" href="struct__win__ship__struct.html">_win_ship_struct</a> </td><td class="memItemRight" valign="bottom"><b>WIN_SHIP</b></td></tr>
|
||||||
|
<tr class="separator:a0411a851d6e3fd19462afd2cdbad9596"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
|
<tr class="memitem:a42c658ed8f799da440af227d9c78b26c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a42c658ed8f799da440af227d9c78b26c"></a>
|
||||||
|
typedef struct <a class="el" href="struct__WIN__ship__struct.html">_WIN_ship_struct</a> </td><td class="memItemRight" valign="bottom"><b>SHIP</b></td></tr>
|
||||||
|
<tr class="separator:a42c658ed8f799da440af227d9c78b26c"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
|
</table><table class="memberdecls">
|
||||||
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
|
||||||
|
Functions</h2></td></tr>
|
||||||
|
<tr class="memitem:a62c7d9da80c36528a8de3186d31d7ed8"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="moonlander_8h.html#a62c7d9da80c36528a8de3186d31d7ed8">initialisencurses</a> ()</td></tr>
|
||||||
|
<tr class="separator:a62c7d9da80c36528a8de3186d31d7ed8"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
|
<tr class="memitem:ae0dc18298c3a72665f84d0904bc9d287"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="moonlander_8h.html#ae0dc18298c3a72665f84d0904bc9d287">initialiseShip</a> (<a class="el" href="struct__WIN__ship__struct.html">SHIP</a> *ship)</td></tr>
|
||||||
|
<tr class="separator:ae0dc18298c3a72665f84d0904bc9d287"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
|
<tr class="memitem:a0ec45fe851ecdae5b09ff1f5235e2bf4"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="moonlander_8h.html#a0ec45fe851ecdae5b09ff1f5235e2bf4">initialiseLandscape</a> (<a class="el" href="struct__WIN__landscape__struct.html">LANDSCAPE</a> *landscape)</td></tr>
|
||||||
|
<tr class="separator:a0ec45fe851ecdae5b09ff1f5235e2bf4"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
|
<tr class="memitem:ab7d9f8adcb580459033133fd49433a15"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="moonlander_8h.html#ab7d9f8adcb580459033133fd49433a15">createShip</a> (<a class="el" href="struct__WIN__ship__struct.html">SHIP</a> *ship)</td></tr>
|
||||||
|
<tr class="separator:ab7d9f8adcb580459033133fd49433a15"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
|
<tr class="memitem:a1ccdf9063374d9a12fed447e00cc2764"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1ccdf9063374d9a12fed447e00cc2764"></a>
|
||||||
|
bool </td><td class="memItemRight" valign="bottom"><b>createLandscape</b> ()</td></tr>
|
||||||
|
<tr class="separator:a1ccdf9063374d9a12fed447e00cc2764"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
|
<tr class="memitem:a8e5dee243eed13bb193a327212d1460b"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="moonlander_8h.html#a8e5dee243eed13bb193a327212d1460b">applyJet</a> (<a class="el" href="struct__WIN__ship__struct.html">SHIP</a> *ship, unsigned int dir)</td></tr>
|
||||||
|
<tr class="separator:a8e5dee243eed13bb193a327212d1460b"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
|
<tr class="memitem:a80d87b5874771eee0d24be7daa6cd187"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="moonlander_8h.html#a80d87b5874771eee0d24be7daa6cd187">applyGravity</a> (<a class="el" href="struct__WIN__ship__struct.html">SHIP</a> *ship)</td></tr>
|
||||||
|
<tr class="separator:a80d87b5874771eee0d24be7daa6cd187"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
|
<tr class="memitem:ac6ac9217888e84291c290db745b67ce1"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="moonlander_8h.html#ac6ac9217888e84291c290db745b67ce1">applyFriction</a> (<a class="el" href="struct__WIN__ship__struct.html">SHIP</a> *ship)</td></tr>
|
||||||
|
<tr class="separator:ac6ac9217888e84291c290db745b67ce1"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
|
<tr class="memitem:a58ccd08e3de9a09607a7e15852f114b7"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="moonlander_8h.html#a58ccd08e3de9a09607a7e15852f114b7">moveShip</a> (<a class="el" href="struct__WIN__ship__struct.html">SHIP</a> *ship, size_t lASize, unsigned int landscapeArray[], size_t sASize, unsigned int safeArray[])</td></tr>
|
||||||
|
<tr class="separator:a58ccd08e3de9a09607a7e15852f114b7"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
|
<tr class="memitem:abdd6a4d14501287a577ea668c521ef6b"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="moonlander_8h.html#abdd6a4d14501287a577ea668c521ef6b">displayIntro</a> ()</td></tr>
|
||||||
|
<tr class="separator:abdd6a4d14501287a577ea668c521ef6b"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
|
<tr class="memitem:a17d060768350e07c2f3d98b7d01cd0b6"><td class="memItemLeft" align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="moonlander_8h.html#a17d060768350e07c2f3d98b7d01cd0b6">getScore</a> (<a class="el" href="struct__WIN__ship__struct.html">SHIP</a> *ship, unsigned int time)</td></tr>
|
||||||
|
<tr class="separator:a17d060768350e07c2f3d98b7d01cd0b6"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
|
</table><table class="memberdecls">
|
||||||
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a>
|
||||||
|
Variables</h2></td></tr>
|
||||||
|
<tr class="memitem:a54352d3853674ab02c3eb342715348b1"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a54352d3853674ab02c3eb342715348b1"></a>
|
||||||
|
bool </td><td class="memItemRight" valign="bottom"><b>end</b> = false</td></tr>
|
||||||
|
<tr class="separator:a54352d3853674ab02c3eb342715348b1"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
|
<tr class="memitem:a4b92199e91e6c320b67f7280b2d53e2f"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4b92199e91e6c320b67f7280b2d53e2f"></a>
|
||||||
|
unsigned int </td><td class="memItemRight" valign="bottom"><b>endType</b> = NONE</td></tr>
|
||||||
|
<tr class="separator:a4b92199e91e6c320b67f7280b2d53e2f"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
|
<tr class="memitem:a5bec39c3cf6ba6711895de15040528d7"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5bec39c3cf6ba6711895de15040528d7"></a>
|
||||||
|
struct <a class="el" href="structtimespec__t.html">timespec_t</a> </td><td class="memItemRight" valign="bottom"><b>s</b></td></tr>
|
||||||
|
<tr class="separator:a5bec39c3cf6ba6711895de15040528d7"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
|
<tr class="memitem:a1155bdad5f8c8c958474c3144bae6573"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1155bdad5f8c8c958474c3144bae6573"></a>
|
||||||
|
bool </td><td class="memItemRight" valign="bottom"><b>invincible</b> = false</td></tr>
|
||||||
|
<tr class="separator:a1155bdad5f8c8c958474c3144bae6573"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
|
</table>
|
||||||
|
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||||
|
<div class="textblock"><dl class="section author"><dt>Author</dt><dd>Ben Goldsworthy (rumps) <a href="#" onclick="location.href='mai'+'lto:'+'bgo'+'ld'+'swo'+'rt'+'hy9'+'6@'+'gma'+'il'+'.co'+'m'; return false;">bgold<span style="display: none;">.nosp@m.</span>swor<span style="display: none;">.nosp@m.</span>thy96<span style="display: none;">.nosp@m.</span>@gma<span style="display: none;">.nosp@m.</span>il.co<span style="display: none;">.nosp@m.</span>m</a> </dd></dl>
|
||||||
|
<dl class="section version"><dt>Version</dt><dd>1.0</dd></dl>
|
||||||
|
<h1><a class="anchor" id="LICENSE"></a>
|
||||||
|
LICENSE</h1>
|
||||||
|
<p>This file 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.</p>
|
||||||
|
<p>This file 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.</p>
|
||||||
|
<p>You should have received a copy of the GNU General Public License along with this program. If not, see <a href="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</a>.</p>
|
||||||
|
<h1><a class="anchor" id="DESCRIPTION"></a>
|
||||||
|
DESCRIPTION</h1>
|
||||||
|
<p>Header file for <code><a class="el" href="moonlander_8c.html">moonlander.c</a></code>. </p>
|
||||||
|
</div><h2 class="groupheader">Function Documentation</h2>
|
||||||
|
<a class="anchor" id="ac6ac9217888e84291c290db745b67ce1"></a>
|
||||||
|
<div class="memitem">
|
||||||
|
<div class="memproto">
|
||||||
|
<table class="memname">
|
||||||
|
<tr>
|
||||||
|
<td class="memname">void applyFriction </td>
|
||||||
|
<td>(</td>
|
||||||
|
<td class="paramtype"><a class="el" href="struct__WIN__ship__struct.html">SHIP</a> * </td>
|
||||||
|
<td class="paramname"><em>ship</em></td><td>)</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div><div class="memdoc">
|
||||||
|
<p>Applies the equally relentless force of friction to the ship.</p>
|
||||||
|
<dl class="params"><dt>Parameters</dt><dd>
|
||||||
|
<table class="params">
|
||||||
|
<tr><td class="paramname">ship</td><td>the ship in question </td></tr>
|
||||||
|
</table>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<a class="anchor" id="a80d87b5874771eee0d24be7daa6cd187"></a>
|
||||||
|
<div class="memitem">
|
||||||
|
<div class="memproto">
|
||||||
|
<table class="memname">
|
||||||
|
<tr>
|
||||||
|
<td class="memname">void applyGravity </td>
|
||||||
|
<td>(</td>
|
||||||
|
<td class="paramtype"><a class="el" href="struct__WIN__ship__struct.html">SHIP</a> * </td>
|
||||||
|
<td class="paramname"><em>ship</em></td><td>)</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div><div class="memdoc">
|
||||||
|
<p>Applies the relentless march of gravity to the ship.</p>
|
||||||
|
<dl class="params"><dt>Parameters</dt><dd>
|
||||||
|
<table class="params">
|
||||||
|
<tr><td class="paramname">ship</td><td>the ship in question </td></tr>
|
||||||
|
</table>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<a class="anchor" id="a8e5dee243eed13bb193a327212d1460b"></a>
|
||||||
|
<div class="memitem">
|
||||||
|
<div class="memproto">
|
||||||
|
<table class="memname">
|
||||||
|
<tr>
|
||||||
|
<td class="memname">void applyJet </td>
|
||||||
|
<td>(</td>
|
||||||
|
<td class="paramtype"><a class="el" href="struct__WIN__ship__struct.html">SHIP</a> * </td>
|
||||||
|
<td class="paramname"><em>ship</em>, </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="paramkey"></td>
|
||||||
|
<td></td>
|
||||||
|
<td class="paramtype">unsigned int </td>
|
||||||
|
<td class="paramname"><em>dir</em> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td></td>
|
||||||
|
<td>)</td>
|
||||||
|
<td></td><td></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div><div class="memdoc">
|
||||||
|
<p>Applies the thrust of the jet to the ship.</p>
|
||||||
|
<p>If the ship is out of fuel, the jets won't fire.</p>
|
||||||
|
<dl class="params"><dt>Parameters</dt><dd>
|
||||||
|
<table class="params">
|
||||||
|
<tr><td class="paramname">ship</td><td>the ship in question </td></tr>
|
||||||
|
<tr><td class="paramname">dir</td><td>the thrust direction </td></tr>
|
||||||
|
</table>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<a class="anchor" id="ab7d9f8adcb580459033133fd49433a15"></a>
|
||||||
|
<div class="memitem">
|
||||||
|
<div class="memproto">
|
||||||
|
<table class="memname">
|
||||||
|
<tr>
|
||||||
|
<td class="memname">void createShip </td>
|
||||||
|
<td>(</td>
|
||||||
|
<td class="paramtype"><a class="el" href="struct__WIN__ship__struct.html">SHIP</a> * </td>
|
||||||
|
<td class="paramname"><em>ship</em></td><td>)</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div><div class="memdoc">
|
||||||
|
<p>Creates the ship in the game world.</p>
|
||||||
|
<dl class="params"><dt>Parameters</dt><dd>
|
||||||
|
<table class="params">
|
||||||
|
<tr><td class="paramname">ship</td><td>the ship in question </td></tr>
|
||||||
|
</table>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<a class="anchor" id="abdd6a4d14501287a577ea668c521ef6b"></a>
|
||||||
|
<div class="memitem">
|
||||||
|
<div class="memproto">
|
||||||
|
<table class="memname">
|
||||||
|
<tr>
|
||||||
|
<td class="memname">void displayIntro </td>
|
||||||
|
<td>(</td>
|
||||||
|
<td class="paramname"></td><td>)</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div><div class="memdoc">
|
||||||
|
<p>Displays the lovely ASCII lunar lander I nicked. </p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<a class="anchor" id="a17d060768350e07c2f3d98b7d01cd0b6"></a>
|
||||||
|
<div class="memitem">
|
||||||
|
<div class="memproto">
|
||||||
|
<table class="memname">
|
||||||
|
<tr>
|
||||||
|
<td class="memname">double getScore </td>
|
||||||
|
<td>(</td>
|
||||||
|
<td class="paramtype"><a class="el" href="struct__WIN__ship__struct.html">SHIP</a> * </td>
|
||||||
|
<td class="paramname"><em>ship</em>, </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="paramkey"></td>
|
||||||
|
<td></td>
|
||||||
|
<td class="paramtype">unsigned int </td>
|
||||||
|
<td class="paramname"><em>time</em> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td></td>
|
||||||
|
<td>)</td>
|
||||||
|
<td></td><td></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div><div class="memdoc">
|
||||||
|
<p>Works out the player's score upon successful landing.</p>
|
||||||
|
<p>The specification states "score is calculated using some heuristic based on
|
||||||
|
time used and fuel remaining." Heuristic sounds fancy, and so is the method of working out the score.</p>
|
||||||
|
<dl class="params"><dt>Parameters</dt><dd>
|
||||||
|
<table class="params">
|
||||||
|
<tr><td class="paramname">ship</td><td>the ship in question </td></tr>
|
||||||
|
</table>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
<dl class="section return"><dt>Returns</dt><dd>the score </dd></dl>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<a class="anchor" id="a0ec45fe851ecdae5b09ff1f5235e2bf4"></a>
|
||||||
|
<div class="memitem">
|
||||||
|
<div class="memproto">
|
||||||
|
<table class="memname">
|
||||||
|
<tr>
|
||||||
|
<td class="memname">void initialiseLandscape </td>
|
||||||
|
<td>(</td>
|
||||||
|
<td class="paramtype"><a class="el" href="struct__WIN__landscape__struct.html">LANDSCAPE</a> * </td>
|
||||||
|
<td class="paramname"><em>landscape</em></td><td>)</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div><div class="memdoc">
|
||||||
|
<p>Initialises the landscape's parameters.</p>
|
||||||
|
<dl class="params"><dt>Parameters</dt><dd>
|
||||||
|
<table class="params">
|
||||||
|
<tr><td class="paramname">landscape</td><td>the landscape in question </td></tr>
|
||||||
|
</table>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<a class="anchor" id="a62c7d9da80c36528a8de3186d31d7ed8"></a>
|
||||||
|
<div class="memitem">
|
||||||
|
<div class="memproto">
|
||||||
|
<table class="memname">
|
||||||
|
<tr>
|
||||||
|
<td class="memname">void initialisencurses </td>
|
||||||
|
<td>(</td>
|
||||||
|
<td class="paramname"></td><td>)</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div><div class="memdoc">
|
||||||
|
<p>Initialises ncurses.</p>
|
||||||
|
<p>I couldn't decide whether it should be <code><a class="el" href="moonlander_8c.html#a62c7d9da80c36528a8de3186d31d7ed8">initialisencurses()</a></code>, <code>initialiseNCURSES()</code> or <code>initialiseNcurses()</code>. In the end I plumped for <code><a class="el" href="moonlander_8c.html#a62c7d9da80c36528a8de3186d31d7ed8">initialisencurses()</a></code> because, whilst it does break the camelCase rule I've used throughout for variables and functions, ncurses is one of those trendy uncapitalised names. </p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<a class="anchor" id="ae0dc18298c3a72665f84d0904bc9d287"></a>
|
||||||
|
<div class="memitem">
|
||||||
|
<div class="memproto">
|
||||||
|
<table class="memname">
|
||||||
|
<tr>
|
||||||
|
<td class="memname">void initialiseShip </td>
|
||||||
|
<td>(</td>
|
||||||
|
<td class="paramtype"><a class="el" href="struct__WIN__ship__struct.html">SHIP</a> * </td>
|
||||||
|
<td class="paramname"><em>ship</em></td><td>)</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div><div class="memdoc">
|
||||||
|
<p>Initialises the ship's parameters.</p>
|
||||||
|
<dl class="params"><dt>Parameters</dt><dd>
|
||||||
|
<table class="params">
|
||||||
|
<tr><td class="paramname">ship</td><td>the ship in question </td></tr>
|
||||||
|
</table>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<a class="anchor" id="a58ccd08e3de9a09607a7e15852f114b7"></a>
|
||||||
|
<div class="memitem">
|
||||||
|
<div class="memproto">
|
||||||
|
<table class="memname">
|
||||||
|
<tr>
|
||||||
|
<td class="memname">void moveShip </td>
|
||||||
|
<td>(</td>
|
||||||
|
<td class="paramtype"><a class="el" href="struct__WIN__ship__struct.html">SHIP</a> * </td>
|
||||||
|
<td class="paramname"><em>ship</em>, </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="paramkey"></td>
|
||||||
|
<td></td>
|
||||||
|
<td class="paramtype">size_t </td>
|
||||||
|
<td class="paramname"><em>lASize</em>, </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="paramkey"></td>
|
||||||
|
<td></td>
|
||||||
|
<td class="paramtype">unsigned int </td>
|
||||||
|
<td class="paramname"><em>landscapeArray</em>[], </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="paramkey"></td>
|
||||||
|
<td></td>
|
||||||
|
<td class="paramtype">size_t </td>
|
||||||
|
<td class="paramname"><em>sASize</em>, </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="paramkey"></td>
|
||||||
|
<td></td>
|
||||||
|
<td class="paramtype">unsigned int </td>
|
||||||
|
<td class="paramname"><em>safeArray</em>[] </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td></td>
|
||||||
|
<td>)</td>
|
||||||
|
<td></td><td></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div><div class="memdoc">
|
||||||
|
<p>Moves the ship within the game world.</p>
|
||||||
|
<dl class="params"><dt>Parameters</dt><dd>
|
||||||
|
<table class="params">
|
||||||
|
<tr><td class="paramname">ship</td><td>the ship in question </td></tr>
|
||||||
|
<tr><td class="paramname">lASize</td><td>the length of useful data in <code>landscapeArray</code> </td></tr>
|
||||||
|
<tr><td class="paramname">landscapeArray</td><td>the array of coordinates for the components of the landscape </td></tr>
|
||||||
|
<tr><td class="paramname">sASize</td><td>the length of useful data in <code>safeArray</code> </td></tr>
|
||||||
|
<tr><td class="paramname">safeArray</td><td>the array of coordinates for the components of the landing pad(s) </td></tr>
|
||||||
|
</table>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div><!-- contents -->
|
||||||
|
<!-- start footer part -->
|
||||||
|
<hr class="footer"/><address class="footer"><small>
|
||||||
|
Generated on Tue May 19 2015 20:33:41 for SCC.150 Assembler Emulator by  <a href="http://www.doxygen.org/index.html">
|
||||||
|
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
||||||
|
</a> 1.8.6
|
||||||
|
</small></address>
|
||||||
|
</body>
|
||||||
|
</html>
|
225
doc/html/moonlander_8h_source.html
Executable file
|
@ -0,0 +1,225 @@
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||||
|
<meta name="generator" content="Doxygen 1.8.6"/>
|
||||||
|
<title>SCC.150 Assembler Emulator: /home/rumperuu/Documents/University/University Work/SCC.110 Software Development/Coursework/C/unr-Moon Lander/source/moonlander.h Source File</title>
|
||||||
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||||
|
<script type="text/javascript" src="jquery.js"></script>
|
||||||
|
<script type="text/javascript" src="dynsections.js"></script>
|
||||||
|
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||||
|
<script type="text/javascript" src="search/search.js"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(document).ready(function() { searchBox.OnSelectItem(0); });
|
||||||
|
</script>
|
||||||
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||||
|
<div id="titlearea">
|
||||||
|
<table cellspacing="0" cellpadding="0">
|
||||||
|
<tbody>
|
||||||
|
<tr style="height: 56px;">
|
||||||
|
<td style="padding-left: 0.5em;">
|
||||||
|
<div id="projectname">SCC.150 Assembler Emulator
|
||||||
|
</div>
|
||||||
|
<div id="projectbrief">A compiler for a simple assembler language</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<!-- end header part -->
|
||||||
|
<!-- Generated by Doxygen 1.8.6 -->
|
||||||
|
<script type="text/javascript">
|
||||||
|
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||||
|
</script>
|
||||||
|
<div id="navrow1" class="tabs">
|
||||||
|
<ul class="tablist">
|
||||||
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
||||||
|
<li><a href="annotated.html"><span>Data Structures</span></a></li>
|
||||||
|
<li class="current"><a href="files.html"><span>Files</span></a></li>
|
||||||
|
<li>
|
||||||
|
<div id="MSearchBox" class="MSearchBoxInactive">
|
||||||
|
<span class="left">
|
||||||
|
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||||
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||||
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||||
|
alt=""/>
|
||||||
|
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||||
|
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||||
|
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||||
|
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||||
|
</span><span class="right">
|
||||||
|
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div id="navrow2" class="tabs2">
|
||||||
|
<ul class="tablist">
|
||||||
|
<li><a href="files.html"><span>File List</span></a></li>
|
||||||
|
<li><a href="globals.html"><span>Globals</span></a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<!-- window showing the filter options -->
|
||||||
|
<div id="MSearchSelectWindow"
|
||||||
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||||
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||||
|
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||||
|
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Functions</a></div>
|
||||||
|
|
||||||
|
<!-- iframe showing the search results (closed by default) -->
|
||||||
|
<div id="MSearchResultsWindow">
|
||||||
|
<iframe src="javascript:void(0)" frameborder="0"
|
||||||
|
name="MSearchResults" id="MSearchResults">
|
||||||
|
</iframe>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="nav-path" class="navpath">
|
||||||
|
<ul>
|
||||||
|
<li class="navelem"><a class="el" href="dir_b2f33c71d4aa5e7af42a1ca61ff5af1b.html">source</a></li> </ul>
|
||||||
|
</div>
|
||||||
|
</div><!-- top -->
|
||||||
|
<div class="header">
|
||||||
|
<div class="headertitle">
|
||||||
|
<div class="title">moonlander.h</div> </div>
|
||||||
|
</div><!--header-->
|
||||||
|
<div class="contents">
|
||||||
|
<a href="moonlander_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="preprocessor">#ifndef MOONLANDER_H_</span></div>
|
||||||
|
<div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="preprocessor"></span><span class="preprocessor">#define MOONLANDER_H_</span></div>
|
||||||
|
<div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="preprocessor"></span></div>
|
||||||
|
<div class="line"><a name="l00029"></a><span class="lineno"> 29</span> <span class="preprocessor">#include <stdbool.h></span></div>
|
||||||
|
<div class="line"><a name="l00030"></a><span class="lineno"> 30</span> <span class="preprocessor">#include <ncurses.h></span></div>
|
||||||
|
<div class="line"><a name="l00031"></a><span class="lineno"> 31</span> <span class="preprocessor">#include <stdlib.h></span></div>
|
||||||
|
<div class="line"><a name="l00032"></a><span class="lineno"> 32</span> <span class="preprocessor">#include <time.h></span></div>
|
||||||
|
<div class="line"><a name="l00033"></a><span class="lineno"> 33</span> <span class="preprocessor">#include <math.h></span></div>
|
||||||
|
<div class="line"><a name="l00034"></a><span class="lineno"> 34</span> </div>
|
||||||
|
<div class="line"><a name="l00035"></a><span class="lineno"> 35</span> <span class="comment">// I almost think I should start looking into enums, rather than the</span></div>
|
||||||
|
<div class="line"><a name="l00036"></a><span class="lineno"> 36</span> <span class="comment">// world's lengthiest macro lists all the time.</span></div>
|
||||||
|
<div class="line"><a name="l00037"></a><span class="lineno"> 37</span> <span class="comment">// Macros for ship jet directions.</span></div>
|
||||||
|
<div class="line"><a name="l00038"></a><span class="lineno"> 38</span> <span class="preprocessor">#define NONE 0</span></div>
|
||||||
|
<div class="line"><a name="l00039"></a><span class="lineno"> 39</span> <span class="preprocessor"></span><span class="preprocessor">#define UP 1</span></div>
|
||||||
|
<div class="line"><a name="l00040"></a><span class="lineno"> 40</span> <span class="preprocessor"></span><span class="preprocessor">#define RIGHT 2</span></div>
|
||||||
|
<div class="line"><a name="l00041"></a><span class="lineno"> 41</span> <span class="preprocessor"></span><span class="preprocessor">#define DOWN 3</span></div>
|
||||||
|
<div class="line"><a name="l00042"></a><span class="lineno"> 42</span> <span class="preprocessor"></span><span class="preprocessor">#define LEFT 4</span></div>
|
||||||
|
<div class="line"><a name="l00043"></a><span class="lineno"> 43</span> <span class="preprocessor"></span></div>
|
||||||
|
<div class="line"><a name="l00044"></a><span class="lineno"> 44</span> <span class="comment">// Macros for the components of the landscape.</span></div>
|
||||||
|
<div class="line"><a name="l00045"></a><span class="lineno"> 45</span> <span class="preprocessor">#define LEFT_INCLINE 0</span></div>
|
||||||
|
<div class="line"><a name="l00046"></a><span class="lineno"> 46</span> <span class="preprocessor"></span><span class="preprocessor">#define STRAIGHT_UP 1</span></div>
|
||||||
|
<div class="line"><a name="l00047"></a><span class="lineno"> 47</span> <span class="preprocessor"></span><span class="preprocessor">#define STRAIGHT_DOWN 2</span></div>
|
||||||
|
<div class="line"><a name="l00048"></a><span class="lineno"> 48</span> <span class="preprocessor"></span><span class="preprocessor">#define RIGHT_DECLINE 3</span></div>
|
||||||
|
<div class="line"><a name="l00049"></a><span class="lineno"> 49</span> <span class="preprocessor"></span><span class="preprocessor">#define PLATEAU 4</span></div>
|
||||||
|
<div class="line"><a name="l00050"></a><span class="lineno"> 50</span> <span class="preprocessor"></span></div>
|
||||||
|
<div class="line"><a name="l00051"></a><span class="lineno"> 51</span> <span class="comment">// Macros for the type of game end.</span></div>
|
||||||
|
<div class="line"><a name="l00052"></a><span class="lineno"> 52</span> <span class="preprocessor">#define NONE 0</span></div>
|
||||||
|
<div class="line"><a name="l00053"></a><span class="lineno"> 53</span> <span class="preprocessor"></span><span class="preprocessor">#define CRASH 1</span></div>
|
||||||
|
<div class="line"><a name="l00054"></a><span class="lineno"> 54</span> <span class="preprocessor"></span><span class="preprocessor">#define LAND 2</span></div>
|
||||||
|
<div class="line"><a name="l00055"></a><span class="lineno"> 55</span> <span class="preprocessor"></span><span class="preprocessor">#define QUIT 3</span></div>
|
||||||
|
<div class="line"><a name="l00056"></a><span class="lineno"> 56</span> <span class="preprocessor"></span></div>
|
||||||
|
<div class="line"><a name="l00057"></a><span class="lineno"> 57</span> <span class="comment">// Macros for setting difficulty.</span></div>
|
||||||
|
<div class="line"><a name="l00058"></a><span class="lineno"> 58</span> <span class="preprocessor">#define STARTING_FUEL 900</span></div>
|
||||||
|
<div class="line"><a name="l00059"></a><span class="lineno"> 59</span> <span class="preprocessor"></span><span class="preprocessor">#define CHANCE_OF_LANDING_PAD 3</span></div>
|
||||||
|
<div class="line"><a name="l00060"></a><span class="lineno"> 60</span> <span class="preprocessor"></span></div>
|
||||||
|
<div class="line"><a name="l00061"></a><span class="lineno"> 61</span> <span class="comment">// Macros for the ship.</span></div>
|
||||||
|
<div class="line"><a name="l00062"></a><span class="lineno"> 62</span> <span class="preprocessor">#define TERMINAL_VELOCITY 0.9f</span></div>
|
||||||
|
<div class="line"><a name="l00063"></a><span class="lineno"> 63</span> <span class="preprocessor"></span></div>
|
||||||
|
<div class="line"><a name="l00064"></a><span class="lineno"> 64</span> <span class="comment">// Global variables aren't the best, but I feel like I can</span></div>
|
||||||
|
<div class="line"><a name="l00065"></a><span class="lineno"> 65</span> <span class="comment">// get away with a few here; it saves so very much fannying </span></div>
|
||||||
|
<div class="line"><a name="l00066"></a><span class="lineno"> 66</span> <span class="comment">// around with pointers.</span></div>
|
||||||
|
<div class="line"><a name="l00067"></a><span class="lineno"> 67</span> <span class="keywordtype">bool</span> end = <span class="keyword">false</span>;</div>
|
||||||
|
<div class="line"><a name="l00068"></a><span class="lineno"> 68</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> endType = NONE;</div>
|
||||||
|
<div class="line"><a name="l00069"></a><span class="lineno"> 69</span> <span class="keyword">struct </span><a class="code" href="structtimespec__t.html">timespec_t</a> s;</div>
|
||||||
|
<div class="line"><a name="l00070"></a><span class="lineno"> 70</span> <span class="comment">// Dirty cheat(s).</span></div>
|
||||||
|
<div class="line"><a name="l00071"></a><span class="lineno"> 71</span> <span class="keywordtype">bool</span> invincible = <span class="keyword">false</span>;</div>
|
||||||
|
<div class="line"><a name="l00072"></a><span class="lineno"> 72</span> </div>
|
||||||
|
<div class="line"><a name="l00073"></a><span class="lineno"> 73</span> <span class="comment">// The bits and bobs that make up the landscape.</span></div>
|
||||||
|
<div class="line"><a name="l00074"></a><span class="lineno"><a class="line" href="struct__win__landscape__struct.html"> 74</a></span> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="struct__win__landscape__struct.html">_win_landscape_struct</a> {</div>
|
||||||
|
<div class="line"><a name="l00075"></a><span class="lineno"> 75</span>  chtype li, su, sd, rd, pl;</div>
|
||||||
|
<div class="line"><a name="l00076"></a><span class="lineno"> 76</span> }<a class="code" href="struct__win__landscape__struct.html">WIN_LANDSCAPE</a>;</div>
|
||||||
|
<div class="line"><a name="l00077"></a><span class="lineno"> 77</span> </div>
|
||||||
|
<div class="line"><a name="l00078"></a><span class="lineno"> 78</span> <span class="comment">// The landscape 'class'</span></div>
|
||||||
|
<div class="line"><a name="l00079"></a><span class="lineno"><a class="line" href="struct__WIN__landscape__struct.html"> 79</a></span> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="struct__WIN__landscape__struct.html">_WIN_landscape_struct</a> {</div>
|
||||||
|
<div class="line"><a name="l00080"></a><span class="lineno"> 80</span>  <span class="keywordtype">int</span> startx, starty;</div>
|
||||||
|
<div class="line"><a name="l00081"></a><span class="lineno"> 81</span>  <span class="keywordtype">int</span> height, width;</div>
|
||||||
|
<div class="line"><a name="l00082"></a><span class="lineno"> 82</span>  <span class="keywordtype">int</span> landingPoints;</div>
|
||||||
|
<div class="line"><a name="l00083"></a><span class="lineno"> 83</span>  <a class="code" href="struct__win__landscape__struct.html">WIN_LANDSCAPE</a> graphics;</div>
|
||||||
|
<div class="line"><a name="l00084"></a><span class="lineno"> 84</span> }<a class="code" href="struct__WIN__landscape__struct.html">LANDSCAPE</a>;</div>
|
||||||
|
<div class="line"><a name="l00085"></a><span class="lineno"> 85</span> </div>
|
||||||
|
<div class="line"><a name="l00086"></a><span class="lineno"> 86</span> <span class="comment">// Same again, but with the ship.</span></div>
|
||||||
|
<div class="line"><a name="l00087"></a><span class="lineno"><a class="line" href="struct__win__ship__struct.html"> 87</a></span> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="struct__win__ship__struct.html">_win_ship_struct</a> {</div>
|
||||||
|
<div class="line"><a name="l00088"></a><span class="lineno"> 88</span>  chtype bod;</div>
|
||||||
|
<div class="line"><a name="l00089"></a><span class="lineno"> 89</span> }<a class="code" href="struct__win__ship__struct.html">WIN_SHIP</a>;</div>
|
||||||
|
<div class="line"><a name="l00090"></a><span class="lineno"> 90</span> </div>
|
||||||
|
<div class="line"><a name="l00091"></a><span class="lineno"> 91</span> <span class="comment">// And the ship 'class'</span></div>
|
||||||
|
<div class="line"><a name="l00092"></a><span class="lineno"><a class="line" href="struct__WIN__ship__struct.html"> 92</a></span> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="struct__WIN__ship__struct.html">_WIN_ship_struct</a> {</div>
|
||||||
|
<div class="line"><a name="l00093"></a><span class="lineno"> 93</span>  <span class="keywordtype">int</span> startx, starty;</div>
|
||||||
|
<div class="line"><a name="l00094"></a><span class="lineno"> 94</span>  <span class="keywordtype">int</span> lastx, lasty;</div>
|
||||||
|
<div class="line"><a name="l00095"></a><span class="lineno"> 95</span>  <span class="keywordtype">int</span> fuel;</div>
|
||||||
|
<div class="line"><a name="l00096"></a><span class="lineno"> 96</span>  <span class="keywordtype">float</span> xF, yF;</div>
|
||||||
|
<div class="line"><a name="l00097"></a><span class="lineno"> 97</span>  <span class="keywordtype">int</span> x, y;</div>
|
||||||
|
<div class="line"><a name="l00098"></a><span class="lineno"> 98</span>  <span class="keywordtype">int</span> height, width;</div>
|
||||||
|
<div class="line"><a name="l00099"></a><span class="lineno"> 99</span>  <span class="keywordtype">float</span> xMomentum, yMomentum;</div>
|
||||||
|
<div class="line"><a name="l00100"></a><span class="lineno"> 100</span>  <a class="code" href="struct__win__ship__struct.html">WIN_SHIP</a> graphics;</div>
|
||||||
|
<div class="line"><a name="l00101"></a><span class="lineno"> 101</span> }<a class="code" href="struct__WIN__ship__struct.html">SHIP</a>;</div>
|
||||||
|
<div class="line"><a name="l00102"></a><span class="lineno"> 102</span> </div>
|
||||||
|
<div class="line"><a name="l00103"></a><span class="lineno"> 103</span> <span class="comment">// I don't profess to know how `nanosleep()` works, but I nicked this</span></div>
|
||||||
|
<div class="line"><a name="l00104"></a><span class="lineno"> 104</span> <span class="comment">// off of SO and it seems to do the job, even if Geany gives me an</span></div>
|
||||||
|
<div class="line"><a name="l00105"></a><span class="lineno"> 105</span> <span class="comment">// 'implicit declaration' warning.</span></div>
|
||||||
|
<div class="line"><a name="l00106"></a><span class="lineno"><a class="line" href="structtimespec__t.html"> 106</a></span> <span class="keyword">struct </span><a class="code" href="structtimespec__t.html">timespec_t</a> {</div>
|
||||||
|
<div class="line"><a name="l00107"></a><span class="lineno"> 107</span>  time_t tv_sec; <span class="comment">/* seconds */</span></div>
|
||||||
|
<div class="line"><a name="l00108"></a><span class="lineno"> 108</span>  <span class="keywordtype">long</span> tv_nsec; <span class="comment">/* nanoseconds */</span></div>
|
||||||
|
<div class="line"><a name="l00109"></a><span class="lineno"> 109</span> };</div>
|
||||||
|
<div class="line"><a name="l00110"></a><span class="lineno"> 110</span> </div>
|
||||||
|
<div class="line"><a name="l00111"></a><span class="lineno"> 111</span> <span class="comment">// Initialisation functions.</span></div>
|
||||||
|
<div class="line"><a name="l00112"></a><span class="lineno"> 112</span> <span class="keywordtype">void</span> <a class="code" href="moonlander_8h.html#a62c7d9da80c36528a8de3186d31d7ed8">initialisencurses</a>();</div>
|
||||||
|
<div class="line"><a name="l00113"></a><span class="lineno"> 113</span> <span class="keywordtype">void</span> <a class="code" href="moonlander_8h.html#ae0dc18298c3a72665f84d0904bc9d287">initialiseShip</a>(<a class="code" href="struct__WIN__ship__struct.html">SHIP</a>* ship);</div>
|
||||||
|
<div class="line"><a name="l00114"></a><span class="lineno"> 114</span> <span class="keywordtype">void</span> <a class="code" href="moonlander_8h.html#a0ec45fe851ecdae5b09ff1f5235e2bf4">initialiseLandscape</a>(<a class="code" href="struct__WIN__landscape__struct.html">LANDSCAPE</a>* landscape);</div>
|
||||||
|
<div class="line"><a name="l00115"></a><span class="lineno"> 115</span> </div>
|
||||||
|
<div class="line"><a name="l00116"></a><span class="lineno"> 116</span> <span class="comment">// Creation functions.</span></div>
|
||||||
|
<div class="line"><a name="l00117"></a><span class="lineno"> 117</span> <span class="keywordtype">void</span> <a class="code" href="moonlander_8h.html#ab7d9f8adcb580459033133fd49433a15">createShip</a>(<a class="code" href="struct__WIN__ship__struct.html">SHIP</a>* ship);</div>
|
||||||
|
<div class="line"><a name="l00118"></a><span class="lineno"> 118</span> <span class="keywordtype">bool</span> <a class="code" href="moonlander_8c.html#a2950dcda46229b12b3cd841832ed4a49">createLandscape</a>();</div>
|
||||||
|
<div class="line"><a name="l00119"></a><span class="lineno"> 119</span> </div>
|
||||||
|
<div class="line"><a name="l00120"></a><span class="lineno"> 120</span> <span class="comment">// Physics application functions.</span></div>
|
||||||
|
<div class="line"><a name="l00121"></a><span class="lineno"> 121</span> <span class="keywordtype">void</span> <a class="code" href="moonlander_8h.html#a8e5dee243eed13bb193a327212d1460b">applyJet</a>(<a class="code" href="struct__WIN__ship__struct.html">SHIP</a>* ship, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> dir);</div>
|
||||||
|
<div class="line"><a name="l00122"></a><span class="lineno"> 122</span> <span class="keywordtype">void</span> <a class="code" href="moonlander_8h.html#a80d87b5874771eee0d24be7daa6cd187">applyGravity</a>(<a class="code" href="struct__WIN__ship__struct.html">SHIP</a>* ship);</div>
|
||||||
|
<div class="line"><a name="l00123"></a><span class="lineno"> 123</span> <span class="keywordtype">void</span> <a class="code" href="moonlander_8h.html#ac6ac9217888e84291c290db745b67ce1">applyFriction</a>(<a class="code" href="struct__WIN__ship__struct.html">SHIP</a>* ship);</div>
|
||||||
|
<div class="line"><a name="l00124"></a><span class="lineno"> 124</span> </div>
|
||||||
|
<div class="line"><a name="l00125"></a><span class="lineno"> 125</span> <span class="comment">// Ship movement function. Includes collision detection.</span></div>
|
||||||
|
<div class="line"><a name="l00126"></a><span class="lineno"> 126</span> <span class="keywordtype">void</span> <a class="code" href="moonlander_8h.html#a58ccd08e3de9a09607a7e15852f114b7">moveShip</a>(<a class="code" href="struct__WIN__ship__struct.html">SHIP</a>* ship, <span class="keywordtype">size_t</span> lASize, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> landscapeArray[],</div>
|
||||||
|
<div class="line"><a name="l00127"></a><span class="lineno"> 127</span>  <span class="keywordtype">size_t</span> sASize, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> safeArray[]);</div>
|
||||||
|
<div class="line"><a name="l00128"></a><span class="lineno"> 128</span>  </div>
|
||||||
|
<div class="line"><a name="l00129"></a><span class="lineno"> 129</span> <span class="comment">// Introduction display function.</span></div>
|
||||||
|
<div class="line"><a name="l00130"></a><span class="lineno"> 130</span> <span class="keywordtype">void</span> <a class="code" href="moonlander_8h.html#abdd6a4d14501287a577ea668c521ef6b">displayIntro</a>();</div>
|
||||||
|
<div class="line"><a name="l00131"></a><span class="lineno"> 131</span> </div>
|
||||||
|
<div class="line"><a name="l00132"></a><span class="lineno"> 132</span> <span class="comment">// Arcane magic.</span></div>
|
||||||
|
<div class="line"><a name="l00133"></a><span class="lineno"> 133</span> <span class="keywordtype">double</span> <a class="code" href="moonlander_8h.html#a17d060768350e07c2f3d98b7d01cd0b6">getScore</a>(<a class="code" href="struct__WIN__ship__struct.html">SHIP</a>* ship, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> time);</div>
|
||||||
|
<div class="line"><a name="l00134"></a><span class="lineno"> 134</span> </div>
|
||||||
|
<div class="line"><a name="l00135"></a><span class="lineno"> 135</span> <span class="preprocessor">#endif </span><span class="comment">/* MOONLANDER_H_ */</span><span class="preprocessor"></span></div>
|
||||||
|
<div class="ttc" id="moonlander_8h_html_ab7d9f8adcb580459033133fd49433a15"><div class="ttname"><a href="moonlander_8h.html#ab7d9f8adcb580459033133fd49433a15">createShip</a></div><div class="ttdeci">void createShip(SHIP *ship)</div><div class="ttdef"><b>Definition:</b> moonlander.c:295</div></div>
|
||||||
|
<div class="ttc" id="moonlander_8c_html_a2950dcda46229b12b3cd841832ed4a49"><div class="ttname"><a href="moonlander_8c.html#a2950dcda46229b12b3cd841832ed4a49">createLandscape</a></div><div class="ttdeci">bool createLandscape(LANDSCAPE *landscape, unsigned int landscapeArray[], unsigned int safeArray[])</div><div class="ttdef"><b>Definition:</b> moonlander.c:318</div></div>
|
||||||
|
<div class="ttc" id="struct__WIN__ship__struct_html"><div class="ttname"><a href="struct__WIN__ship__struct.html">_WIN_ship_struct</a></div><div class="ttdef"><b>Definition:</b> moonlander.h:92</div></div>
|
||||||
|
<div class="ttc" id="moonlander_8h_html_a8e5dee243eed13bb193a327212d1460b"><div class="ttname"><a href="moonlander_8h.html#a8e5dee243eed13bb193a327212d1460b">applyJet</a></div><div class="ttdeci">void applyJet(SHIP *ship, unsigned int dir)</div><div class="ttdef"><b>Definition:</b> moonlander.c:443</div></div>
|
||||||
|
<div class="ttc" id="moonlander_8h_html_a58ccd08e3de9a09607a7e15852f114b7"><div class="ttname"><a href="moonlander_8h.html#a58ccd08e3de9a09607a7e15852f114b7">moveShip</a></div><div class="ttdeci">void moveShip(SHIP *ship, size_t lASize, unsigned int landscapeArray[], size_t sASize, unsigned int safeArray[])</div><div class="ttdef"><b>Definition:</b> moonlander.c:507</div></div>
|
||||||
|
<div class="ttc" id="moonlander_8h_html_abdd6a4d14501287a577ea668c521ef6b"><div class="ttname"><a href="moonlander_8h.html#abdd6a4d14501287a577ea668c521ef6b">displayIntro</a></div><div class="ttdeci">void displayIntro()</div><div class="ttdef"><b>Definition:</b> moonlander.c:602</div></div>
|
||||||
|
<div class="ttc" id="moonlander_8h_html_a17d060768350e07c2f3d98b7d01cd0b6"><div class="ttname"><a href="moonlander_8h.html#a17d060768350e07c2f3d98b7d01cd0b6">getScore</a></div><div class="ttdeci">double getScore(SHIP *ship, unsigned int time)</div><div class="ttdef"><b>Definition:</b> moonlander.c:642</div></div>
|
||||||
|
<div class="ttc" id="moonlander_8h_html_a0ec45fe851ecdae5b09ff1f5235e2bf4"><div class="ttname"><a href="moonlander_8h.html#a0ec45fe851ecdae5b09ff1f5235e2bf4">initialiseLandscape</a></div><div class="ttdeci">void initialiseLandscape(LANDSCAPE *landscape)</div><div class="ttdef"><b>Definition:</b> moonlander.c:274</div></div>
|
||||||
|
<div class="ttc" id="moonlander_8h_html_ac6ac9217888e84291c290db745b67ce1"><div class="ttname"><a href="moonlander_8h.html#ac6ac9217888e84291c290db745b67ce1">applyFriction</a></div><div class="ttdeci">void applyFriction(SHIP *ship)</div><div class="ttdef"><b>Definition:</b> moonlander.c:482</div></div>
|
||||||
|
<div class="ttc" id="structtimespec__t_html"><div class="ttname"><a href="structtimespec__t.html">timespec_t</a></div><div class="ttdef"><b>Definition:</b> moonlander.h:106</div></div>
|
||||||
|
<div class="ttc" id="moonlander_8h_html_ae0dc18298c3a72665f84d0904bc9d287"><div class="ttname"><a href="moonlander_8h.html#ae0dc18298c3a72665f84d0904bc9d287">initialiseShip</a></div><div class="ttdeci">void initialiseShip(SHIP *ship)</div><div class="ttdef"><b>Definition:</b> moonlander.c:248</div></div>
|
||||||
|
<div class="ttc" id="struct__win__ship__struct_html"><div class="ttname"><a href="struct__win__ship__struct.html">_win_ship_struct</a></div><div class="ttdef"><b>Definition:</b> moonlander.h:87</div></div>
|
||||||
|
<div class="ttc" id="moonlander_8h_html_a80d87b5874771eee0d24be7daa6cd187"><div class="ttname"><a href="moonlander_8h.html#a80d87b5874771eee0d24be7daa6cd187">applyGravity</a></div><div class="ttdeci">void applyGravity(SHIP *ship)</div><div class="ttdef"><b>Definition:</b> moonlander.c:473</div></div>
|
||||||
|
<div class="ttc" id="struct__win__landscape__struct_html"><div class="ttname"><a href="struct__win__landscape__struct.html">_win_landscape_struct</a></div><div class="ttdef"><b>Definition:</b> moonlander.h:74</div></div>
|
||||||
|
<div class="ttc" id="moonlander_8h_html_a62c7d9da80c36528a8de3186d31d7ed8"><div class="ttname"><a href="moonlander_8h.html#a62c7d9da80c36528a8de3186d31d7ed8">initialisencurses</a></div><div class="ttdeci">void initialisencurses()</div><div class="ttdef"><b>Definition:</b> moonlander.c:226</div></div>
|
||||||
|
<div class="ttc" id="struct__WIN__landscape__struct_html"><div class="ttname"><a href="struct__WIN__landscape__struct.html">_WIN_landscape_struct</a></div><div class="ttdef"><b>Definition:</b> moonlander.h:79</div></div>
|
||||||
|
</div><!-- fragment --></div><!-- contents -->
|
||||||
|
<!-- start footer part -->
|
||||||
|
<hr class="footer"/><address class="footer"><small>
|
||||||
|
Generated on Tue May 19 2015 20:33:41 for SCC.150 Assembler Emulator by  <a href="http://www.doxygen.org/index.html">
|
||||||
|
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
||||||
|
</a> 1.8.6
|
||||||
|
</small></address>
|
||||||
|
</body>
|
||||||
|
</html>
|
BIN
doc/html/nav_f.png
Executable file
After Width: | Height: | Size: 153 B |
BIN
doc/html/nav_g.png
Executable file
After Width: | Height: | Size: 95 B |
BIN
doc/html/nav_h.png
Executable file
After Width: | Height: | Size: 98 B |
BIN
doc/html/open.png
Executable file
After Width: | Height: | Size: 123 B |
26
doc/html/search/all_0.html
Executable file
|
@ -0,0 +1,26 @@
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html><head><title></title>
|
||||||
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||||
|
<meta name="generator" content="Doxygen 1.8.6">
|
||||||
|
<link rel="stylesheet" type="text/css" href="search.css"/>
|
||||||
|
<script type="text/javascript" src="all_0.js"></script>
|
||||||
|
<script type="text/javascript" src="search.js"></script>
|
||||||
|
</head>
|
||||||
|
<body class="SRPage">
|
||||||
|
<div id="SRIndex">
|
||||||
|
<div class="SRStatus" id="Loading">Loading...</div>
|
||||||
|
<div id="SRResults"></div>
|
||||||
|
<script type="text/javascript"><!--
|
||||||
|
createResults();
|
||||||
|
--></script>
|
||||||
|
<div class="SRStatus" id="Searching">Searching...</div>
|
||||||
|
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||||
|
<script type="text/javascript"><!--
|
||||||
|
document.getElementById("Loading").style.display="none";
|
||||||
|
document.getElementById("NoMatches").style.display="none";
|
||||||
|
var searchResults = new SearchResults("searchResults");
|
||||||
|
searchResults.Search();
|
||||||
|
--></script>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
5
doc/html/search/all_0.js
Executable file
|
@ -0,0 +1,5 @@
|
||||||
|
var searchData=
|
||||||
|
[
|
||||||
|
['_5fwin_5flandscape_5fstruct',['_win_landscape_struct',['../struct__win__landscape__struct.html',1,'_win_landscape_struct'],['../struct__WIN__landscape__struct.html',1,'_WIN_landscape_struct']]],
|
||||||
|
['_5fwin_5fship_5fstruct',['_WIN_ship_struct',['../struct__WIN__ship__struct.html',1,'_WIN_ship_struct'],['../struct__win__ship__struct.html',1,'_win_ship_struct']]]
|
||||||
|
];
|
26
doc/html/search/all_1.html
Executable file
|
@ -0,0 +1,26 @@
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html><head><title></title>
|
||||||
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||||
|
<meta name="generator" content="Doxygen 1.8.6">
|
||||||
|
<link rel="stylesheet" type="text/css" href="search.css"/>
|
||||||
|
<script type="text/javascript" src="all_1.js"></script>
|
||||||
|
<script type="text/javascript" src="search.js"></script>
|
||||||
|
</head>
|
||||||
|
<body class="SRPage">
|
||||||
|
<div id="SRIndex">
|
||||||
|
<div class="SRStatus" id="Loading">Loading...</div>
|
||||||
|
<div id="SRResults"></div>
|
||||||
|
<script type="text/javascript"><!--
|
||||||
|
createResults();
|
||||||
|
--></script>
|
||||||
|
<div class="SRStatus" id="Searching">Searching...</div>
|
||||||
|
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||||
|
<script type="text/javascript"><!--
|
||||||
|
document.getElementById("Loading").style.display="none";
|
||||||
|
document.getElementById("NoMatches").style.display="none";
|
||||||
|
var searchResults = new SearchResults("searchResults");
|
||||||
|
searchResults.Search();
|
||||||
|
--></script>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
6
doc/html/search/all_1.js
Executable file
|
@ -0,0 +1,6 @@
|
||||||
|
var searchData=
|
||||||
|
[
|
||||||
|
['applyfriction',['applyFriction',['../moonlander_8c.html#ac6ac9217888e84291c290db745b67ce1',1,'applyFriction(SHIP *ship): moonlander.c'],['../moonlander_8h.html#ac6ac9217888e84291c290db745b67ce1',1,'applyFriction(SHIP *ship): moonlander.c']]],
|
||||||
|
['applygravity',['applyGravity',['../moonlander_8c.html#a80d87b5874771eee0d24be7daa6cd187',1,'applyGravity(SHIP *ship): moonlander.c'],['../moonlander_8h.html#a80d87b5874771eee0d24be7daa6cd187',1,'applyGravity(SHIP *ship): moonlander.c']]],
|
||||||
|
['applyjet',['applyJet',['../moonlander_8c.html#a8e5dee243eed13bb193a327212d1460b',1,'applyJet(SHIP *ship, unsigned int dir): moonlander.c'],['../moonlander_8h.html#a8e5dee243eed13bb193a327212d1460b',1,'applyJet(SHIP *ship, unsigned int dir): moonlander.c']]]
|
||||||
|
];
|
26
doc/html/search/all_2.html
Executable file
|
@ -0,0 +1,26 @@
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html><head><title></title>
|
||||||
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||||
|
<meta name="generator" content="Doxygen 1.8.6">
|
||||||
|
<link rel="stylesheet" type="text/css" href="search.css"/>
|
||||||
|
<script type="text/javascript" src="all_2.js"></script>
|
||||||
|
<script type="text/javascript" src="search.js"></script>
|
||||||
|
</head>
|
||||||
|
<body class="SRPage">
|
||||||
|
<div id="SRIndex">
|
||||||
|
<div class="SRStatus" id="Loading">Loading...</div>
|
||||||
|
<div id="SRResults"></div>
|
||||||
|
<script type="text/javascript"><!--
|
||||||
|
createResults();
|
||||||
|
--></script>
|
||||||
|
<div class="SRStatus" id="Searching">Searching...</div>
|
||||||
|
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||||
|
<script type="text/javascript"><!--
|
||||||
|
document.getElementById("Loading").style.display="none";
|
||||||
|
document.getElementById("NoMatches").style.display="none";
|
||||||
|
var searchResults = new SearchResults("searchResults");
|
||||||
|
searchResults.Search();
|
||||||
|
--></script>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
5
doc/html/search/all_2.js
Executable file
|
@ -0,0 +1,5 @@
|
||||||
|
var searchData=
|
||||||
|
[
|
||||||
|
['createlandscape',['createLandscape',['../moonlander_8c.html#a2950dcda46229b12b3cd841832ed4a49',1,'moonlander.c']]],
|
||||||
|
['createship',['createShip',['../moonlander_8c.html#ab7d9f8adcb580459033133fd49433a15',1,'createShip(SHIP *ship): moonlander.c'],['../moonlander_8h.html#ab7d9f8adcb580459033133fd49433a15',1,'createShip(SHIP *ship): moonlander.c']]]
|
||||||
|
];
|
26
doc/html/search/all_3.html
Executable file
|
@ -0,0 +1,26 @@
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html><head><title></title>
|
||||||
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||||
|
<meta name="generator" content="Doxygen 1.8.6">
|
||||||
|
<link rel="stylesheet" type="text/css" href="search.css"/>
|
||||||
|
<script type="text/javascript" src="all_3.js"></script>
|
||||||
|
<script type="text/javascript" src="search.js"></script>
|
||||||
|
</head>
|
||||||
|
<body class="SRPage">
|
||||||
|
<div id="SRIndex">
|
||||||
|
<div class="SRStatus" id="Loading">Loading...</div>
|
||||||
|
<div id="SRResults"></div>
|
||||||
|
<script type="text/javascript"><!--
|
||||||
|
createResults();
|
||||||
|
--></script>
|
||||||
|
<div class="SRStatus" id="Searching">Searching...</div>
|
||||||
|
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||||
|
<script type="text/javascript"><!--
|
||||||
|
document.getElementById("Loading").style.display="none";
|
||||||
|
document.getElementById("NoMatches").style.display="none";
|
||||||
|
var searchResults = new SearchResults("searchResults");
|
||||||
|
searchResults.Search();
|
||||||
|
--></script>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
4
doc/html/search/all_3.js
Executable file
|
@ -0,0 +1,4 @@
|
||||||
|
var searchData=
|
||||||
|
[
|
||||||
|
['displayintro',['displayIntro',['../moonlander_8c.html#abdd6a4d14501287a577ea668c521ef6b',1,'displayIntro(): moonlander.c'],['../moonlander_8h.html#abdd6a4d14501287a577ea668c521ef6b',1,'displayIntro(): moonlander.c']]]
|
||||||
|
];
|
26
doc/html/search/all_4.html
Executable file
|
@ -0,0 +1,26 @@
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html><head><title></title>
|
||||||
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||||
|
<meta name="generator" content="Doxygen 1.8.6">
|
||||||
|
<link rel="stylesheet" type="text/css" href="search.css"/>
|
||||||
|
<script type="text/javascript" src="all_4.js"></script>
|
||||||
|
<script type="text/javascript" src="search.js"></script>
|
||||||
|
</head>
|
||||||
|
<body class="SRPage">
|
||||||
|
<div id="SRIndex">
|
||||||
|
<div class="SRStatus" id="Loading">Loading...</div>
|
||||||
|
<div id="SRResults"></div>
|
||||||
|
<script type="text/javascript"><!--
|
||||||
|
createResults();
|
||||||
|
--></script>
|
||||||
|
<div class="SRStatus" id="Searching">Searching...</div>
|
||||||
|
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||||
|
<script type="text/javascript"><!--
|
||||||
|
document.getElementById("Loading").style.display="none";
|
||||||
|
document.getElementById("NoMatches").style.display="none";
|
||||||
|
var searchResults = new SearchResults("searchResults");
|
||||||
|
searchResults.Search();
|
||||||
|
--></script>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
4
doc/html/search/all_4.js
Executable file
|
@ -0,0 +1,4 @@
|
||||||
|
var searchData=
|
||||||
|
[
|
||||||
|
['getscore',['getScore',['../moonlander_8c.html#a17d060768350e07c2f3d98b7d01cd0b6',1,'getScore(SHIP *ship, unsigned int time): moonlander.c'],['../moonlander_8h.html#a17d060768350e07c2f3d98b7d01cd0b6',1,'getScore(SHIP *ship, unsigned int time): moonlander.c']]]
|
||||||
|
];
|
26
doc/html/search/all_5.html
Executable file
|
@ -0,0 +1,26 @@
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html><head><title></title>
|
||||||
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||||
|
<meta name="generator" content="Doxygen 1.8.6">
|
||||||
|
<link rel="stylesheet" type="text/css" href="search.css"/>
|
||||||
|
<script type="text/javascript" src="all_5.js"></script>
|
||||||
|
<script type="text/javascript" src="search.js"></script>
|
||||||
|
</head>
|
||||||
|
<body class="SRPage">
|
||||||
|
<div id="SRIndex">
|
||||||
|
<div class="SRStatus" id="Loading">Loading...</div>
|
||||||
|
<div id="SRResults"></div>
|
||||||
|
<script type="text/javascript"><!--
|
||||||
|
createResults();
|
||||||
|
--></script>
|
||||||
|
<div class="SRStatus" id="Searching">Searching...</div>
|
||||||
|
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||||
|
<script type="text/javascript"><!--
|
||||||
|
document.getElementById("Loading").style.display="none";
|
||||||
|
document.getElementById("NoMatches").style.display="none";
|
||||||
|
var searchResults = new SearchResults("searchResults");
|
||||||
|
searchResults.Search();
|
||||||
|
--></script>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
6
doc/html/search/all_5.js
Executable file
|
@ -0,0 +1,6 @@
|
||||||
|
var searchData=
|
||||||
|
[
|
||||||
|
['initialiselandscape',['initialiseLandscape',['../moonlander_8c.html#a0ec45fe851ecdae5b09ff1f5235e2bf4',1,'initialiseLandscape(LANDSCAPE *landscape): moonlander.c'],['../moonlander_8h.html#a0ec45fe851ecdae5b09ff1f5235e2bf4',1,'initialiseLandscape(LANDSCAPE *landscape): moonlander.c']]],
|
||||||
|
['initialisencurses',['initialisencurses',['../moonlander_8c.html#a62c7d9da80c36528a8de3186d31d7ed8',1,'initialisencurses(): moonlander.c'],['../moonlander_8h.html#a62c7d9da80c36528a8de3186d31d7ed8',1,'initialisencurses(): moonlander.c']]],
|
||||||
|
['initialiseship',['initialiseShip',['../moonlander_8c.html#ae0dc18298c3a72665f84d0904bc9d287',1,'initialiseShip(SHIP *ship): moonlander.c'],['../moonlander_8h.html#ae0dc18298c3a72665f84d0904bc9d287',1,'initialiseShip(SHIP *ship): moonlander.c']]]
|
||||||
|
];
|
26
doc/html/search/all_6.html
Executable file
|
@ -0,0 +1,26 @@
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html><head><title></title>
|
||||||
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||||
|
<meta name="generator" content="Doxygen 1.8.6">
|
||||||
|
<link rel="stylesheet" type="text/css" href="search.css"/>
|
||||||
|
<script type="text/javascript" src="all_6.js"></script>
|
||||||
|
<script type="text/javascript" src="search.js"></script>
|
||||||
|
</head>
|
||||||
|
<body class="SRPage">
|
||||||
|
<div id="SRIndex">
|
||||||
|
<div class="SRStatus" id="Loading">Loading...</div>
|
||||||
|
<div id="SRResults"></div>
|
||||||
|
<script type="text/javascript"><!--
|
||||||
|
createResults();
|
||||||
|
--></script>
|
||||||
|
<div class="SRStatus" id="Searching">Searching...</div>
|
||||||
|
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||||
|
<script type="text/javascript"><!--
|
||||||
|
document.getElementById("Loading").style.display="none";
|
||||||
|
document.getElementById("NoMatches").style.display="none";
|
||||||
|
var searchResults = new SearchResults("searchResults");
|
||||||
|
searchResults.Search();
|
||||||
|
--></script>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
7
doc/html/search/all_6.js
Executable file
|
@ -0,0 +1,7 @@
|
||||||
|
var searchData=
|
||||||
|
[
|
||||||
|
['main',['main',['../moonlander_8c.html#ae66f6b31b5ad750f1fe042a706a4e3d4',1,'moonlander.c']]],
|
||||||
|
['moonlander_2ec',['moonlander.c',['../moonlander_8c.html',1,'']]],
|
||||||
|
['moonlander_2eh',['moonlander.h',['../moonlander_8h.html',1,'']]],
|
||||||
|
['moveship',['moveShip',['../moonlander_8c.html#a58ccd08e3de9a09607a7e15852f114b7',1,'moveShip(SHIP *ship, size_t lASize, unsigned int landscapeArray[], size_t sASize, unsigned int safeArray[]): moonlander.c'],['../moonlander_8h.html#a58ccd08e3de9a09607a7e15852f114b7',1,'moveShip(SHIP *ship, size_t lASize, unsigned int landscapeArray[], size_t sASize, unsigned int safeArray[]): moonlander.c']]]
|
||||||
|
];
|
26
doc/html/search/all_7.html
Executable file
|
@ -0,0 +1,26 @@
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html><head><title></title>
|
||||||
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||||
|
<meta name="generator" content="Doxygen 1.8.6">
|
||||||
|
<link rel="stylesheet" type="text/css" href="search.css"/>
|
||||||
|
<script type="text/javascript" src="all_7.js"></script>
|
||||||
|
<script type="text/javascript" src="search.js"></script>
|
||||||
|
</head>
|
||||||
|
<body class="SRPage">
|
||||||
|
<div id="SRIndex">
|
||||||
|
<div class="SRStatus" id="Loading">Loading...</div>
|
||||||
|
<div id="SRResults"></div>
|
||||||
|
<script type="text/javascript"><!--
|
||||||
|
createResults();
|
||||||
|
--></script>
|
||||||
|
<div class="SRStatus" id="Searching">Searching...</div>
|
||||||
|
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||||
|
<script type="text/javascript"><!--
|
||||||
|
document.getElementById("Loading").style.display="none";
|
||||||
|
document.getElementById("NoMatches").style.display="none";
|
||||||
|
var searchResults = new SearchResults("searchResults");
|
||||||
|
searchResults.Search();
|
||||||
|
--></script>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
4
doc/html/search/all_7.js
Executable file
|
@ -0,0 +1,4 @@
|
||||||
|
var searchData=
|
||||||
|
[
|
||||||
|
['timespec_5ft',['timespec_t',['../structtimespec__t.html',1,'']]]
|
||||||
|
];
|
26
doc/html/search/classes_0.html
Executable file
|
@ -0,0 +1,26 @@
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html><head><title></title>
|
||||||
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||||
|
<meta name="generator" content="Doxygen 1.8.6">
|
||||||
|
<link rel="stylesheet" type="text/css" href="search.css"/>
|
||||||
|
<script type="text/javascript" src="classes_0.js"></script>
|
||||||
|
<script type="text/javascript" src="search.js"></script>
|
||||||
|
</head>
|
||||||
|
<body class="SRPage">
|
||||||
|
<div id="SRIndex">
|
||||||
|
<div class="SRStatus" id="Loading">Loading...</div>
|
||||||
|
<div id="SRResults"></div>
|
||||||
|
<script type="text/javascript"><!--
|
||||||
|
createResults();
|
||||||
|
--></script>
|
||||||
|
<div class="SRStatus" id="Searching">Searching...</div>
|
||||||
|
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||||
|
<script type="text/javascript"><!--
|
||||||
|
document.getElementById("Loading").style.display="none";
|
||||||
|
document.getElementById("NoMatches").style.display="none";
|
||||||
|
var searchResults = new SearchResults("searchResults");
|
||||||
|
searchResults.Search();
|
||||||
|
--></script>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
5
doc/html/search/classes_0.js
Executable file
|
@ -0,0 +1,5 @@
|
||||||
|
var searchData=
|
||||||
|
[
|
||||||
|
['_5fwin_5flandscape_5fstruct',['_win_landscape_struct',['../struct__win__landscape__struct.html',1,'_win_landscape_struct'],['../struct__WIN__landscape__struct.html',1,'_WIN_landscape_struct']]],
|
||||||
|
['_5fwin_5fship_5fstruct',['_WIN_ship_struct',['../struct__WIN__ship__struct.html',1,'_WIN_ship_struct'],['../struct__win__ship__struct.html',1,'_win_ship_struct']]]
|
||||||
|
];
|
26
doc/html/search/classes_1.html
Executable file
|
@ -0,0 +1,26 @@
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html><head><title></title>
|
||||||
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||||
|
<meta name="generator" content="Doxygen 1.8.6">
|
||||||
|
<link rel="stylesheet" type="text/css" href="search.css"/>
|
||||||
|
<script type="text/javascript" src="classes_1.js"></script>
|
||||||
|
<script type="text/javascript" src="search.js"></script>
|
||||||
|
</head>
|
||||||
|
<body class="SRPage">
|
||||||
|
<div id="SRIndex">
|
||||||
|
<div class="SRStatus" id="Loading">Loading...</div>
|
||||||
|
<div id="SRResults"></div>
|
||||||
|
<script type="text/javascript"><!--
|
||||||
|
createResults();
|
||||||
|
--></script>
|
||||||
|
<div class="SRStatus" id="Searching">Searching...</div>
|
||||||
|
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||||
|
<script type="text/javascript"><!--
|
||||||
|
document.getElementById("Loading").style.display="none";
|
||||||
|
document.getElementById("NoMatches").style.display="none";
|
||||||
|
var searchResults = new SearchResults("searchResults");
|
||||||
|
searchResults.Search();
|
||||||
|
--></script>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
4
doc/html/search/classes_1.js
Executable file
|
@ -0,0 +1,4 @@
|
||||||
|
var searchData=
|
||||||
|
[
|
||||||
|
['timespec_5ft',['timespec_t',['../structtimespec__t.html',1,'']]]
|
||||||
|
];
|
BIN
doc/html/search/close.png
Executable file
After Width: | Height: | Size: 273 B |
26
doc/html/search/files_0.html
Executable file
|
@ -0,0 +1,26 @@
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html><head><title></title>
|
||||||
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||||
|
<meta name="generator" content="Doxygen 1.8.6">
|
||||||
|
<link rel="stylesheet" type="text/css" href="search.css"/>
|
||||||
|
<script type="text/javascript" src="files_0.js"></script>
|
||||||
|
<script type="text/javascript" src="search.js"></script>
|
||||||
|
</head>
|
||||||
|
<body class="SRPage">
|
||||||
|
<div id="SRIndex">
|
||||||
|
<div class="SRStatus" id="Loading">Loading...</div>
|
||||||
|
<div id="SRResults"></div>
|
||||||
|
<script type="text/javascript"><!--
|
||||||
|
createResults();
|
||||||
|
--></script>
|
||||||
|
<div class="SRStatus" id="Searching">Searching...</div>
|
||||||
|
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||||
|
<script type="text/javascript"><!--
|
||||||
|
document.getElementById("Loading").style.display="none";
|
||||||
|
document.getElementById("NoMatches").style.display="none";
|
||||||
|
var searchResults = new SearchResults("searchResults");
|
||||||
|
searchResults.Search();
|
||||||
|
--></script>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
5
doc/html/search/files_0.js
Executable file
|
@ -0,0 +1,5 @@
|
||||||
|
var searchData=
|
||||||
|
[
|
||||||
|
['moonlander_2ec',['moonlander.c',['../moonlander_8c.html',1,'']]],
|
||||||
|
['moonlander_2eh',['moonlander.h',['../moonlander_8h.html',1,'']]]
|
||||||
|
];
|
26
doc/html/search/functions_0.html
Executable file
|
@ -0,0 +1,26 @@
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html><head><title></title>
|
||||||
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||||
|
<meta name="generator" content="Doxygen 1.8.6">
|
||||||
|
<link rel="stylesheet" type="text/css" href="search.css"/>
|
||||||
|
<script type="text/javascript" src="functions_0.js"></script>
|
||||||
|
<script type="text/javascript" src="search.js"></script>
|
||||||
|
</head>
|
||||||
|
<body class="SRPage">
|
||||||
|
<div id="SRIndex">
|
||||||
|
<div class="SRStatus" id="Loading">Loading...</div>
|
||||||
|
<div id="SRResults"></div>
|
||||||
|
<script type="text/javascript"><!--
|
||||||
|
createResults();
|
||||||
|
--></script>
|
||||||
|
<div class="SRStatus" id="Searching">Searching...</div>
|
||||||
|
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||||
|
<script type="text/javascript"><!--
|
||||||
|
document.getElementById("Loading").style.display="none";
|
||||||
|
document.getElementById("NoMatches").style.display="none";
|
||||||
|
var searchResults = new SearchResults("searchResults");
|
||||||
|
searchResults.Search();
|
||||||
|
--></script>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
6
doc/html/search/functions_0.js
Executable file
|
@ -0,0 +1,6 @@
|
||||||
|
var searchData=
|
||||||
|
[
|
||||||
|
['applyfriction',['applyFriction',['../moonlander_8c.html#ac6ac9217888e84291c290db745b67ce1',1,'applyFriction(SHIP *ship): moonlander.c'],['../moonlander_8h.html#ac6ac9217888e84291c290db745b67ce1',1,'applyFriction(SHIP *ship): moonlander.c']]],
|
||||||
|
['applygravity',['applyGravity',['../moonlander_8c.html#a80d87b5874771eee0d24be7daa6cd187',1,'applyGravity(SHIP *ship): moonlander.c'],['../moonlander_8h.html#a80d87b5874771eee0d24be7daa6cd187',1,'applyGravity(SHIP *ship): moonlander.c']]],
|
||||||
|
['applyjet',['applyJet',['../moonlander_8c.html#a8e5dee243eed13bb193a327212d1460b',1,'applyJet(SHIP *ship, unsigned int dir): moonlander.c'],['../moonlander_8h.html#a8e5dee243eed13bb193a327212d1460b',1,'applyJet(SHIP *ship, unsigned int dir): moonlander.c']]]
|
||||||
|
];
|
26
doc/html/search/functions_1.html
Executable file
|
@ -0,0 +1,26 @@
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html><head><title></title>
|
||||||
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||||
|
<meta name="generator" content="Doxygen 1.8.6">
|
||||||
|
<link rel="stylesheet" type="text/css" href="search.css"/>
|
||||||
|
<script type="text/javascript" src="functions_1.js"></script>
|
||||||
|
<script type="text/javascript" src="search.js"></script>
|
||||||
|
</head>
|
||||||
|
<body class="SRPage">
|
||||||
|
<div id="SRIndex">
|
||||||
|
<div class="SRStatus" id="Loading">Loading...</div>
|
||||||
|
<div id="SRResults"></div>
|
||||||
|
<script type="text/javascript"><!--
|
||||||
|
createResults();
|
||||||
|
--></script>
|
||||||
|
<div class="SRStatus" id="Searching">Searching...</div>
|
||||||
|
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||||
|
<script type="text/javascript"><!--
|
||||||
|
document.getElementById("Loading").style.display="none";
|
||||||
|
document.getElementById("NoMatches").style.display="none";
|
||||||
|
var searchResults = new SearchResults("searchResults");
|
||||||
|
searchResults.Search();
|
||||||
|
--></script>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
5
doc/html/search/functions_1.js
Executable file
|
@ -0,0 +1,5 @@
|
||||||
|
var searchData=
|
||||||
|
[
|
||||||
|
['createlandscape',['createLandscape',['../moonlander_8c.html#a2950dcda46229b12b3cd841832ed4a49',1,'moonlander.c']]],
|
||||||
|
['createship',['createShip',['../moonlander_8c.html#ab7d9f8adcb580459033133fd49433a15',1,'createShip(SHIP *ship): moonlander.c'],['../moonlander_8h.html#ab7d9f8adcb580459033133fd49433a15',1,'createShip(SHIP *ship): moonlander.c']]]
|
||||||
|
];
|
26
doc/html/search/functions_2.html
Executable file
|
@ -0,0 +1,26 @@
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html><head><title></title>
|
||||||
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||||
|
<meta name="generator" content="Doxygen 1.8.6">
|
||||||
|
<link rel="stylesheet" type="text/css" href="search.css"/>
|
||||||
|
<script type="text/javascript" src="functions_2.js"></script>
|
||||||
|
<script type="text/javascript" src="search.js"></script>
|
||||||
|
</head>
|
||||||
|
<body class="SRPage">
|
||||||
|
<div id="SRIndex">
|
||||||
|
<div class="SRStatus" id="Loading">Loading...</div>
|
||||||
|
<div id="SRResults"></div>
|
||||||
|
<script type="text/javascript"><!--
|
||||||
|
createResults();
|
||||||
|
--></script>
|
||||||
|
<div class="SRStatus" id="Searching">Searching...</div>
|
||||||
|
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||||
|
<script type="text/javascript"><!--
|
||||||
|
document.getElementById("Loading").style.display="none";
|
||||||
|
document.getElementById("NoMatches").style.display="none";
|
||||||
|
var searchResults = new SearchResults("searchResults");
|
||||||
|
searchResults.Search();
|
||||||
|
--></script>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
4
doc/html/search/functions_2.js
Executable file
|
@ -0,0 +1,4 @@
|
||||||
|
var searchData=
|
||||||
|
[
|
||||||
|
['displayintro',['displayIntro',['../moonlander_8c.html#abdd6a4d14501287a577ea668c521ef6b',1,'displayIntro(): moonlander.c'],['../moonlander_8h.html#abdd6a4d14501287a577ea668c521ef6b',1,'displayIntro(): moonlander.c']]]
|
||||||
|
];
|
26
doc/html/search/functions_3.html
Executable file
|
@ -0,0 +1,26 @@
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html><head><title></title>
|
||||||
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||||
|
<meta name="generator" content="Doxygen 1.8.6">
|
||||||
|
<link rel="stylesheet" type="text/css" href="search.css"/>
|
||||||
|
<script type="text/javascript" src="functions_3.js"></script>
|
||||||
|
<script type="text/javascript" src="search.js"></script>
|
||||||
|
</head>
|
||||||
|
<body class="SRPage">
|
||||||
|
<div id="SRIndex">
|
||||||
|
<div class="SRStatus" id="Loading">Loading...</div>
|
||||||
|
<div id="SRResults"></div>
|
||||||
|
<script type="text/javascript"><!--
|
||||||
|
createResults();
|
||||||
|
--></script>
|
||||||
|
<div class="SRStatus" id="Searching">Searching...</div>
|
||||||
|
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||||
|
<script type="text/javascript"><!--
|
||||||
|
document.getElementById("Loading").style.display="none";
|
||||||
|
document.getElementById("NoMatches").style.display="none";
|
||||||
|
var searchResults = new SearchResults("searchResults");
|
||||||
|
searchResults.Search();
|
||||||
|
--></script>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
4
doc/html/search/functions_3.js
Executable file
|
@ -0,0 +1,4 @@
|
||||||
|
var searchData=
|
||||||
|
[
|
||||||
|
['getscore',['getScore',['../moonlander_8c.html#a17d060768350e07c2f3d98b7d01cd0b6',1,'getScore(SHIP *ship, unsigned int time): moonlander.c'],['../moonlander_8h.html#a17d060768350e07c2f3d98b7d01cd0b6',1,'getScore(SHIP *ship, unsigned int time): moonlander.c']]]
|
||||||
|
];
|
26
doc/html/search/functions_4.html
Executable file
|
@ -0,0 +1,26 @@
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html><head><title></title>
|
||||||
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||||
|
<meta name="generator" content="Doxygen 1.8.6">
|
||||||
|
<link rel="stylesheet" type="text/css" href="search.css"/>
|
||||||
|
<script type="text/javascript" src="functions_4.js"></script>
|
||||||
|
<script type="text/javascript" src="search.js"></script>
|
||||||
|
</head>
|
||||||
|
<body class="SRPage">
|
||||||
|
<div id="SRIndex">
|
||||||
|
<div class="SRStatus" id="Loading">Loading...</div>
|
||||||
|
<div id="SRResults"></div>
|
||||||
|
<script type="text/javascript"><!--
|
||||||
|
createResults();
|
||||||
|
--></script>
|
||||||
|
<div class="SRStatus" id="Searching">Searching...</div>
|
||||||
|
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||||
|
<script type="text/javascript"><!--
|
||||||
|
document.getElementById("Loading").style.display="none";
|
||||||
|
document.getElementById("NoMatches").style.display="none";
|
||||||
|
var searchResults = new SearchResults("searchResults");
|
||||||
|
searchResults.Search();
|
||||||
|
--></script>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
6
doc/html/search/functions_4.js
Executable file
|
@ -0,0 +1,6 @@
|
||||||
|
var searchData=
|
||||||
|
[
|
||||||
|
['initialiselandscape',['initialiseLandscape',['../moonlander_8c.html#a0ec45fe851ecdae5b09ff1f5235e2bf4',1,'initialiseLandscape(LANDSCAPE *landscape): moonlander.c'],['../moonlander_8h.html#a0ec45fe851ecdae5b09ff1f5235e2bf4',1,'initialiseLandscape(LANDSCAPE *landscape): moonlander.c']]],
|
||||||
|
['initialisencurses',['initialisencurses',['../moonlander_8c.html#a62c7d9da80c36528a8de3186d31d7ed8',1,'initialisencurses(): moonlander.c'],['../moonlander_8h.html#a62c7d9da80c36528a8de3186d31d7ed8',1,'initialisencurses(): moonlander.c']]],
|
||||||
|
['initialiseship',['initialiseShip',['../moonlander_8c.html#ae0dc18298c3a72665f84d0904bc9d287',1,'initialiseShip(SHIP *ship): moonlander.c'],['../moonlander_8h.html#ae0dc18298c3a72665f84d0904bc9d287',1,'initialiseShip(SHIP *ship): moonlander.c']]]
|
||||||
|
];
|
26
doc/html/search/functions_5.html
Executable file
|
@ -0,0 +1,26 @@
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html><head><title></title>
|
||||||
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||||
|
<meta name="generator" content="Doxygen 1.8.6">
|
||||||
|
<link rel="stylesheet" type="text/css" href="search.css"/>
|
||||||
|
<script type="text/javascript" src="functions_5.js"></script>
|
||||||
|
<script type="text/javascript" src="search.js"></script>
|
||||||
|
</head>
|
||||||
|
<body class="SRPage">
|
||||||
|
<div id="SRIndex">
|
||||||
|
<div class="SRStatus" id="Loading">Loading...</div>
|
||||||
|
<div id="SRResults"></div>
|
||||||
|
<script type="text/javascript"><!--
|
||||||
|
createResults();
|
||||||
|
--></script>
|
||||||
|
<div class="SRStatus" id="Searching">Searching...</div>
|
||||||
|
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||||
|
<script type="text/javascript"><!--
|
||||||
|
document.getElementById("Loading").style.display="none";
|
||||||
|
document.getElementById("NoMatches").style.display="none";
|
||||||
|
var searchResults = new SearchResults("searchResults");
|
||||||
|
searchResults.Search();
|
||||||
|
--></script>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
5
doc/html/search/functions_5.js
Executable file
|
@ -0,0 +1,5 @@
|
||||||
|
var searchData=
|
||||||
|
[
|
||||||
|
['main',['main',['../moonlander_8c.html#ae66f6b31b5ad750f1fe042a706a4e3d4',1,'moonlander.c']]],
|
||||||
|
['moveship',['moveShip',['../moonlander_8c.html#a58ccd08e3de9a09607a7e15852f114b7',1,'moveShip(SHIP *ship, size_t lASize, unsigned int landscapeArray[], size_t sASize, unsigned int safeArray[]): moonlander.c'],['../moonlander_8h.html#a58ccd08e3de9a09607a7e15852f114b7',1,'moveShip(SHIP *ship, size_t lASize, unsigned int landscapeArray[], size_t sASize, unsigned int safeArray[]): moonlander.c']]]
|
||||||
|
];
|
BIN
doc/html/search/mag_sel.png
Executable file
After Width: | Height: | Size: 563 B |
12
doc/html/search/nomatches.html
Executable file
|
@ -0,0 +1,12 @@
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html><head><title></title>
|
||||||
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||||
|
<link rel="stylesheet" type="text/css" href="search.css"/>
|
||||||
|
<script type="text/javascript" src="search.js"></script>
|
||||||
|
</head>
|
||||||
|
<body class="SRPage">
|
||||||
|
<div id="SRIndex">
|
||||||
|
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
271
doc/html/search/search.css
Executable file
|
@ -0,0 +1,271 @@
|
||||||
|
/*---------------- Search Box */
|
||||||
|
|
||||||
|
#FSearchBox {
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
#MSearchBox {
|
||||||
|
white-space : nowrap;
|
||||||
|
position: absolute;
|
||||||
|
float: none;
|
||||||
|
display: inline;
|
||||||
|
margin-top: 8px;
|
||||||
|
right: 0px;
|
||||||
|
width: 170px;
|
||||||
|
z-index: 102;
|
||||||
|
background-color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
#MSearchBox .left
|
||||||
|
{
|
||||||
|
display:block;
|
||||||
|
position:absolute;
|
||||||
|
left:10px;
|
||||||
|
width:20px;
|
||||||
|
height:19px;
|
||||||
|
background:url('search_l.png') no-repeat;
|
||||||
|
background-position:right;
|
||||||
|
}
|
||||||
|
|
||||||
|
#MSearchSelect {
|
||||||
|
display:block;
|
||||||
|
position:absolute;
|
||||||
|
width:20px;
|
||||||
|
height:19px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.left #MSearchSelect {
|
||||||
|
left:4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.right #MSearchSelect {
|
||||||
|
right:5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#MSearchField {
|
||||||
|
display:block;
|
||||||
|
position:absolute;
|
||||||
|
height:19px;
|
||||||
|
background:url('search_m.png') repeat-x;
|
||||||
|
border:none;
|
||||||
|
width:111px;
|
||||||
|
margin-left:20px;
|
||||||
|
padding-left:4px;
|
||||||
|
color: #909090;
|
||||||
|
outline: none;
|
||||||
|
font: 9pt Arial, Verdana, sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
#FSearchBox #MSearchField {
|
||||||
|
margin-left:15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#MSearchBox .right {
|
||||||
|
display:block;
|
||||||
|
position:absolute;
|
||||||
|
right:10px;
|
||||||
|
top:0px;
|
||||||
|
width:20px;
|
||||||
|
height:19px;
|
||||||
|
background:url('search_r.png') no-repeat;
|
||||||
|
background-position:left;
|
||||||
|
}
|
||||||
|
|
||||||
|
#MSearchClose {
|
||||||
|
display: none;
|
||||||
|
position: absolute;
|
||||||
|
top: 4px;
|
||||||
|
background : none;
|
||||||
|
border: none;
|
||||||
|
margin: 0px 4px 0px 0px;
|
||||||
|
padding: 0px 0px;
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.left #MSearchClose {
|
||||||
|
left: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.right #MSearchClose {
|
||||||
|
right: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.MSearchBoxActive #MSearchField {
|
||||||
|
color: #000000;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*---------------- Search filter selection */
|
||||||
|
|
||||||
|
#MSearchSelectWindow {
|
||||||
|
display: none;
|
||||||
|
position: absolute;
|
||||||
|
left: 0; top: 0;
|
||||||
|
border: 1px solid #90A5CE;
|
||||||
|
background-color: #F9FAFC;
|
||||||
|
z-index: 1;
|
||||||
|
padding-top: 4px;
|
||||||
|
padding-bottom: 4px;
|
||||||
|
-moz-border-radius: 4px;
|
||||||
|
-webkit-border-top-left-radius: 4px;
|
||||||
|
-webkit-border-top-right-radius: 4px;
|
||||||
|
-webkit-border-bottom-left-radius: 4px;
|
||||||
|
-webkit-border-bottom-right-radius: 4px;
|
||||||
|
-webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
|
||||||
|
}
|
||||||
|
|
||||||
|
.SelectItem {
|
||||||
|
font: 8pt Arial, Verdana, sans-serif;
|
||||||
|
padding-left: 2px;
|
||||||
|
padding-right: 12px;
|
||||||
|
border: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
span.SelectionMark {
|
||||||
|
margin-right: 4px;
|
||||||
|
font-family: monospace;
|
||||||
|
outline-style: none;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
a.SelectItem {
|
||||||
|
display: block;
|
||||||
|
outline-style: none;
|
||||||
|
color: #000000;
|
||||||
|
text-decoration: none;
|
||||||
|
padding-left: 6px;
|
||||||
|
padding-right: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
a.SelectItem:focus,
|
||||||
|
a.SelectItem:active {
|
||||||
|
color: #000000;
|
||||||
|
outline-style: none;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
a.SelectItem:hover {
|
||||||
|
color: #FFFFFF;
|
||||||
|
background-color: #3D578C;
|
||||||
|
outline-style: none;
|
||||||
|
text-decoration: none;
|
||||||
|
cursor: pointer;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*---------------- Search results window */
|
||||||
|
|
||||||
|
iframe#MSearchResults {
|
||||||
|
width: 60ex;
|
||||||
|
height: 15em;
|
||||||
|
}
|
||||||
|
|
||||||
|
#MSearchResultsWindow {
|
||||||
|
display: none;
|
||||||
|
position: absolute;
|
||||||
|
left: 0; top: 0;
|
||||||
|
border: 1px solid #000;
|
||||||
|
background-color: #EEF1F7;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ----------------------------------- */
|
||||||
|
|
||||||
|
|
||||||
|
#SRIndex {
|
||||||
|
clear:both;
|
||||||
|
padding-bottom: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.SREntry {
|
||||||
|
font-size: 10pt;
|
||||||
|
padding-left: 1ex;
|
||||||
|
}
|
||||||
|
|
||||||
|
.SRPage .SREntry {
|
||||||
|
font-size: 8pt;
|
||||||
|
padding: 1px 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
body.SRPage {
|
||||||
|
margin: 5px 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.SRChildren {
|
||||||
|
padding-left: 3ex; padding-bottom: .5em
|
||||||
|
}
|
||||||
|
|
||||||
|
.SRPage .SRChildren {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.SRSymbol {
|
||||||
|
font-weight: bold;
|
||||||
|
color: #425E97;
|
||||||
|
font-family: Arial, Verdana, sans-serif;
|
||||||
|
text-decoration: none;
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
a.SRScope {
|
||||||
|
display: block;
|
||||||
|
color: #425E97;
|
||||||
|
font-family: Arial, Verdana, sans-serif;
|
||||||
|
text-decoration: none;
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
a.SRSymbol:focus, a.SRSymbol:active,
|
||||||
|
a.SRScope:focus, a.SRScope:active {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
|
||||||
|
span.SRScope {
|
||||||
|
padding-left: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.SRPage .SRStatus {
|
||||||
|
padding: 2px 5px;
|
||||||
|
font-size: 8pt;
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
.SRResult {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
DIV.searchresults {
|
||||||
|
margin-left: 10px;
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*---------------- External search page results */
|
||||||
|
|
||||||
|
.searchresult {
|
||||||
|
background-color: #F0F3F8;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pages b {
|
||||||
|
color: white;
|
||||||
|
padding: 5px 5px 3px 5px;
|
||||||
|
background-image: url("../tab_a.png");
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
text-shadow: 0 1px 1px #000000;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pages {
|
||||||
|
line-height: 17px;
|
||||||
|
margin-left: 4px;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hl {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
#searchresults {
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.searchpages {
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
|
799
doc/html/search/search.js
Executable file
|
@ -0,0 +1,799 @@
|
||||||
|
// Search script generated by doxygen
|
||||||
|
// Copyright (C) 2009 by Dimitri van Heesch.
|
||||||
|
|
||||||
|
// The code in this file is loosly based on main.js, part of Natural Docs,
|
||||||
|
// which is Copyright (C) 2003-2008 Greg Valure
|
||||||
|
// Natural Docs is licensed under the GPL.
|
||||||
|
|
||||||
|
var indexSectionsWithContent =
|
||||||
|
{
|
||||||
|
0: "_acdgimt",
|
||||||
|
1: "_t",
|
||||||
|
2: "m",
|
||||||
|
3: "acdgim"
|
||||||
|
};
|
||||||
|
|
||||||
|
var indexSectionNames =
|
||||||
|
{
|
||||||
|
0: "all",
|
||||||
|
1: "classes",
|
||||||
|
2: "files",
|
||||||
|
3: "functions"
|
||||||
|
};
|
||||||
|
|
||||||
|
function convertToId(search)
|
||||||
|
{
|
||||||
|
var result = '';
|
||||||
|
for (i=0;i<search.length;i++)
|
||||||
|
{
|
||||||
|
var c = search.charAt(i);
|
||||||
|
var cn = c.charCodeAt(0);
|
||||||
|
if (c.match(/[a-z0-9\u0080-\uFFFF]/))
|
||||||
|
{
|
||||||
|
result+=c;
|
||||||
|
}
|
||||||
|
else if (cn<16)
|
||||||
|
{
|
||||||
|
result+="_0"+cn.toString(16);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
result+="_"+cn.toString(16);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
function getXPos(item)
|
||||||
|
{
|
||||||
|
var x = 0;
|
||||||
|
if (item.offsetWidth)
|
||||||
|
{
|
||||||
|
while (item && item!=document.body)
|
||||||
|
{
|
||||||
|
x += item.offsetLeft;
|
||||||
|
item = item.offsetParent;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return x;
|
||||||
|
}
|
||||||
|
|
||||||
|
function getYPos(item)
|
||||||
|
{
|
||||||
|
var y = 0;
|
||||||
|
if (item.offsetWidth)
|
||||||
|
{
|
||||||
|
while (item && item!=document.body)
|
||||||
|
{
|
||||||
|
y += item.offsetTop;
|
||||||
|
item = item.offsetParent;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return y;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* A class handling everything associated with the search panel.
|
||||||
|
|
||||||
|
Parameters:
|
||||||
|
name - The name of the global variable that will be
|
||||||
|
storing this instance. Is needed to be able to set timeouts.
|
||||||
|
resultPath - path to use for external files
|
||||||
|
*/
|
||||||
|
function SearchBox(name, resultsPath, inFrame, label)
|
||||||
|
{
|
||||||
|
if (!name || !resultsPath) { alert("Missing parameters to SearchBox."); }
|
||||||
|
|
||||||
|
// ---------- Instance variables
|
||||||
|
this.name = name;
|
||||||
|
this.resultsPath = resultsPath;
|
||||||
|
this.keyTimeout = 0;
|
||||||
|
this.keyTimeoutLength = 500;
|
||||||
|
this.closeSelectionTimeout = 300;
|
||||||
|
this.lastSearchValue = "";
|
||||||
|
this.lastResultsPage = "";
|
||||||
|
this.hideTimeout = 0;
|
||||||
|
this.searchIndex = 0;
|
||||||
|
this.searchActive = false;
|
||||||
|
this.insideFrame = inFrame;
|
||||||
|
this.searchLabel = label;
|
||||||
|
|
||||||
|
// ----------- DOM Elements
|
||||||
|
|
||||||
|
this.DOMSearchField = function()
|
||||||
|
{ return document.getElementById("MSearchField"); }
|
||||||
|
|
||||||
|
this.DOMSearchSelect = function()
|
||||||
|
{ return document.getElementById("MSearchSelect"); }
|
||||||
|
|
||||||
|
this.DOMSearchSelectWindow = function()
|
||||||
|
{ return document.getElementById("MSearchSelectWindow"); }
|
||||||
|
|
||||||
|
this.DOMPopupSearchResults = function()
|
||||||
|
{ return document.getElementById("MSearchResults"); }
|
||||||
|
|
||||||
|
this.DOMPopupSearchResultsWindow = function()
|
||||||
|
{ return document.getElementById("MSearchResultsWindow"); }
|
||||||
|
|
||||||
|
this.DOMSearchClose = function()
|
||||||
|
{ return document.getElementById("MSearchClose"); }
|
||||||
|
|
||||||
|
this.DOMSearchBox = function()
|
||||||
|
{ return document.getElementById("MSearchBox"); }
|
||||||
|
|
||||||
|
// ------------ Event Handlers
|
||||||
|
|
||||||
|
// Called when focus is added or removed from the search field.
|
||||||
|
this.OnSearchFieldFocus = function(isActive)
|
||||||
|
{
|
||||||
|
this.Activate(isActive);
|
||||||
|
}
|
||||||
|
|
||||||
|
this.OnSearchSelectShow = function()
|
||||||
|
{
|
||||||
|
var searchSelectWindow = this.DOMSearchSelectWindow();
|
||||||
|
var searchField = this.DOMSearchSelect();
|
||||||
|
|
||||||
|
if (this.insideFrame)
|
||||||
|
{
|
||||||
|
var left = getXPos(searchField);
|
||||||
|
var top = getYPos(searchField);
|
||||||
|
left += searchField.offsetWidth + 6;
|
||||||
|
top += searchField.offsetHeight;
|
||||||
|
|
||||||
|
// show search selection popup
|
||||||
|
searchSelectWindow.style.display='block';
|
||||||
|
left -= searchSelectWindow.offsetWidth;
|
||||||
|
searchSelectWindow.style.left = left + 'px';
|
||||||
|
searchSelectWindow.style.top = top + 'px';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var left = getXPos(searchField);
|
||||||
|
var top = getYPos(searchField);
|
||||||
|
top += searchField.offsetHeight;
|
||||||
|
|
||||||
|
// show search selection popup
|
||||||
|
searchSelectWindow.style.display='block';
|
||||||
|
searchSelectWindow.style.left = left + 'px';
|
||||||
|
searchSelectWindow.style.top = top + 'px';
|
||||||
|
}
|
||||||
|
|
||||||
|
// stop selection hide timer
|
||||||
|
if (this.hideTimeout)
|
||||||
|
{
|
||||||
|
clearTimeout(this.hideTimeout);
|
||||||
|
this.hideTimeout=0;
|
||||||
|
}
|
||||||
|
return false; // to avoid "image drag" default event
|
||||||
|
}
|
||||||
|
|
||||||
|
this.OnSearchSelectHide = function()
|
||||||
|
{
|
||||||
|
this.hideTimeout = setTimeout(this.name +".CloseSelectionWindow()",
|
||||||
|
this.closeSelectionTimeout);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Called when the content of the search field is changed.
|
||||||
|
this.OnSearchFieldChange = function(evt)
|
||||||
|
{
|
||||||
|
if (this.keyTimeout) // kill running timer
|
||||||
|
{
|
||||||
|
clearTimeout(this.keyTimeout);
|
||||||
|
this.keyTimeout = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
var e = (evt) ? evt : window.event; // for IE
|
||||||
|
if (e.keyCode==40 || e.keyCode==13)
|
||||||
|
{
|
||||||
|
if (e.shiftKey==1)
|
||||||
|
{
|
||||||
|
this.OnSearchSelectShow();
|
||||||
|
var win=this.DOMSearchSelectWindow();
|
||||||
|
for (i=0;i<win.childNodes.length;i++)
|
||||||
|
{
|
||||||
|
var child = win.childNodes[i]; // get span within a
|
||||||
|
if (child.className=='SelectItem')
|
||||||
|
{
|
||||||
|
child.focus();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else if (window.frames.MSearchResults.searchResults)
|
||||||
|
{
|
||||||
|
var elem = window.frames.MSearchResults.searchResults.NavNext(0);
|
||||||
|
if (elem) elem.focus();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (e.keyCode==27) // Escape out of the search field
|
||||||
|
{
|
||||||
|
this.DOMSearchField().blur();
|
||||||
|
this.DOMPopupSearchResultsWindow().style.display = 'none';
|
||||||
|
this.DOMSearchClose().style.display = 'none';
|
||||||
|
this.lastSearchValue = '';
|
||||||
|
this.Activate(false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// strip whitespaces
|
||||||
|
var searchValue = this.DOMSearchField().value.replace(/ +/g, "");
|
||||||
|
|
||||||
|
if (searchValue != this.lastSearchValue) // search value has changed
|
||||||
|
{
|
||||||
|
if (searchValue != "") // non-empty search
|
||||||
|
{
|
||||||
|
// set timer for search update
|
||||||
|
this.keyTimeout = setTimeout(this.name + '.Search()',
|
||||||
|
this.keyTimeoutLength);
|
||||||
|
}
|
||||||
|
else // empty search field
|
||||||
|
{
|
||||||
|
this.DOMPopupSearchResultsWindow().style.display = 'none';
|
||||||
|
this.DOMSearchClose().style.display = 'none';
|
||||||
|
this.lastSearchValue = '';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
this.SelectItemCount = function(id)
|
||||||
|
{
|
||||||
|
var count=0;
|
||||||
|
var win=this.DOMSearchSelectWindow();
|
||||||
|
for (i=0;i<win.childNodes.length;i++)
|
||||||
|
{
|
||||||
|
var child = win.childNodes[i]; // get span within a
|
||||||
|
if (child.className=='SelectItem')
|
||||||
|
{
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return count;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.SelectItemSet = function(id)
|
||||||
|
{
|
||||||
|
var i,j=0;
|
||||||
|
var win=this.DOMSearchSelectWindow();
|
||||||
|
for (i=0;i<win.childNodes.length;i++)
|
||||||
|
{
|
||||||
|
var child = win.childNodes[i]; // get span within a
|
||||||
|
if (child.className=='SelectItem')
|
||||||
|
{
|
||||||
|
var node = child.firstChild;
|
||||||
|
if (j==id)
|
||||||
|
{
|
||||||
|
node.innerHTML='•';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
node.innerHTML=' ';
|
||||||
|
}
|
||||||
|
j++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Called when an search filter selection is made.
|
||||||
|
// set item with index id as the active item
|
||||||
|
this.OnSelectItem = function(id)
|
||||||
|
{
|
||||||
|
this.searchIndex = id;
|
||||||
|
this.SelectItemSet(id);
|
||||||
|
var searchValue = this.DOMSearchField().value.replace(/ +/g, "");
|
||||||
|
if (searchValue!="" && this.searchActive) // something was found -> do a search
|
||||||
|
{
|
||||||
|
this.Search();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
this.OnSearchSelectKey = function(evt)
|
||||||
|
{
|
||||||
|
var e = (evt) ? evt : window.event; // for IE
|
||||||
|
if (e.keyCode==40 && this.searchIndex<this.SelectItemCount()) // Down
|
||||||
|
{
|
||||||
|
this.searchIndex++;
|
||||||
|
this.OnSelectItem(this.searchIndex);
|
||||||
|
}
|
||||||
|
else if (e.keyCode==38 && this.searchIndex>0) // Up
|
||||||
|
{
|
||||||
|
this.searchIndex--;
|
||||||
|
this.OnSelectItem(this.searchIndex);
|
||||||
|
}
|
||||||
|
else if (e.keyCode==13 || e.keyCode==27)
|
||||||
|
{
|
||||||
|
this.OnSelectItem(this.searchIndex);
|
||||||
|
this.CloseSelectionWindow();
|
||||||
|
this.DOMSearchField().focus();
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// --------- Actions
|
||||||
|
|
||||||
|
// Closes the results window.
|
||||||
|
this.CloseResultsWindow = function()
|
||||||
|
{
|
||||||
|
this.DOMPopupSearchResultsWindow().style.display = 'none';
|
||||||
|
this.DOMSearchClose().style.display = 'none';
|
||||||
|
this.Activate(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CloseSelectionWindow = function()
|
||||||
|
{
|
||||||
|
this.DOMSearchSelectWindow().style.display = 'none';
|
||||||
|
}
|
||||||
|
|
||||||
|
// Performs a search.
|
||||||
|
this.Search = function()
|
||||||
|
{
|
||||||
|
this.keyTimeout = 0;
|
||||||
|
|
||||||
|
// strip leading whitespace
|
||||||
|
var searchValue = this.DOMSearchField().value.replace(/^ +/, "");
|
||||||
|
|
||||||
|
var code = searchValue.toLowerCase().charCodeAt(0);
|
||||||
|
var idxChar = searchValue.substr(0, 1).toLowerCase();
|
||||||
|
if ( 0xD800 <= code && code <= 0xDBFF && searchValue > 1) // surrogate pair
|
||||||
|
{
|
||||||
|
idxChar = searchValue.substr(0, 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
var resultsPage;
|
||||||
|
var resultsPageWithSearch;
|
||||||
|
var hasResultsPage;
|
||||||
|
|
||||||
|
var idx = indexSectionsWithContent[this.searchIndex].indexOf(idxChar);
|
||||||
|
if (idx!=-1)
|
||||||
|
{
|
||||||
|
var hexCode=idx.toString(16);
|
||||||
|
resultsPage = this.resultsPath + '/' + indexSectionNames[this.searchIndex] + '_' + hexCode + '.html';
|
||||||
|
resultsPageWithSearch = resultsPage+'?'+escape(searchValue);
|
||||||
|
hasResultsPage = true;
|
||||||
|
}
|
||||||
|
else // nothing available for this search term
|
||||||
|
{
|
||||||
|
resultsPage = this.resultsPath + '/nomatches.html';
|
||||||
|
resultsPageWithSearch = resultsPage;
|
||||||
|
hasResultsPage = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
window.frames.MSearchResults.location = resultsPageWithSearch;
|
||||||
|
var domPopupSearchResultsWindow = this.DOMPopupSearchResultsWindow();
|
||||||
|
|
||||||
|
if (domPopupSearchResultsWindow.style.display!='block')
|
||||||
|
{
|
||||||
|
var domSearchBox = this.DOMSearchBox();
|
||||||
|
this.DOMSearchClose().style.display = 'inline';
|
||||||
|
if (this.insideFrame)
|
||||||
|
{
|
||||||
|
var domPopupSearchResults = this.DOMPopupSearchResults();
|
||||||
|
domPopupSearchResultsWindow.style.position = 'relative';
|
||||||
|
domPopupSearchResultsWindow.style.display = 'block';
|
||||||
|
var width = document.body.clientWidth - 8; // the -8 is for IE :-(
|
||||||
|
domPopupSearchResultsWindow.style.width = width + 'px';
|
||||||
|
domPopupSearchResults.style.width = width + 'px';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var domPopupSearchResults = this.DOMPopupSearchResults();
|
||||||
|
var left = getXPos(domSearchBox) + 150; // domSearchBox.offsetWidth;
|
||||||
|
var top = getYPos(domSearchBox) + 20; // domSearchBox.offsetHeight + 1;
|
||||||
|
domPopupSearchResultsWindow.style.display = 'block';
|
||||||
|
left -= domPopupSearchResults.offsetWidth;
|
||||||
|
domPopupSearchResultsWindow.style.top = top + 'px';
|
||||||
|
domPopupSearchResultsWindow.style.left = left + 'px';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
this.lastSearchValue = searchValue;
|
||||||
|
this.lastResultsPage = resultsPage;
|
||||||
|
}
|
||||||
|
|
||||||
|
// -------- Activation Functions
|
||||||
|
|
||||||
|
// Activates or deactivates the search panel, resetting things to
|
||||||
|
// their default values if necessary.
|
||||||
|
this.Activate = function(isActive)
|
||||||
|
{
|
||||||
|
if (isActive || // open it
|
||||||
|
this.DOMPopupSearchResultsWindow().style.display == 'block'
|
||||||
|
)
|
||||||
|
{
|
||||||
|
this.DOMSearchBox().className = 'MSearchBoxActive';
|
||||||
|
|
||||||
|
var searchField = this.DOMSearchField();
|
||||||
|
|
||||||
|
if (searchField.value == this.searchLabel) // clear "Search" term upon entry
|
||||||
|
{
|
||||||
|
searchField.value = '';
|
||||||
|
this.searchActive = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (!isActive) // directly remove the panel
|
||||||
|
{
|
||||||
|
this.DOMSearchBox().className = 'MSearchBoxInactive';
|
||||||
|
this.DOMSearchField().value = this.searchLabel;
|
||||||
|
this.searchActive = false;
|
||||||
|
this.lastSearchValue = ''
|
||||||
|
this.lastResultsPage = '';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// -----------------------------------------------------------------------
|
||||||
|
|
||||||
|
// The class that handles everything on the search results page.
|
||||||
|
function SearchResults(name)
|
||||||
|
{
|
||||||
|
// The number of matches from the last run of <Search()>.
|
||||||
|
this.lastMatchCount = 0;
|
||||||
|
this.lastKey = 0;
|
||||||
|
this.repeatOn = false;
|
||||||
|
|
||||||
|
// Toggles the visibility of the passed element ID.
|
||||||
|
this.FindChildElement = function(id)
|
||||||
|
{
|
||||||
|
var parentElement = document.getElementById(id);
|
||||||
|
var element = parentElement.firstChild;
|
||||||
|
|
||||||
|
while (element && element!=parentElement)
|
||||||
|
{
|
||||||
|
if (element.nodeName == 'DIV' && element.className == 'SRChildren')
|
||||||
|
{
|
||||||
|
return element;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (element.nodeName == 'DIV' && element.hasChildNodes())
|
||||||
|
{
|
||||||
|
element = element.firstChild;
|
||||||
|
}
|
||||||
|
else if (element.nextSibling)
|
||||||
|
{
|
||||||
|
element = element.nextSibling;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
do
|
||||||
|
{
|
||||||
|
element = element.parentNode;
|
||||||
|
}
|
||||||
|
while (element && element!=parentElement && !element.nextSibling);
|
||||||
|
|
||||||
|
if (element && element!=parentElement)
|
||||||
|
{
|
||||||
|
element = element.nextSibling;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
this.Toggle = function(id)
|
||||||
|
{
|
||||||
|
var element = this.FindChildElement(id);
|
||||||
|
if (element)
|
||||||
|
{
|
||||||
|
if (element.style.display == 'block')
|
||||||
|
{
|
||||||
|
element.style.display = 'none';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
element.style.display = 'block';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Searches for the passed string. If there is no parameter,
|
||||||
|
// it takes it from the URL query.
|
||||||
|
//
|
||||||
|
// Always returns true, since other documents may try to call it
|
||||||
|
// and that may or may not be possible.
|
||||||
|
this.Search = function(search)
|
||||||
|
{
|
||||||
|
if (!search) // get search word from URL
|
||||||
|
{
|
||||||
|
search = window.location.search;
|
||||||
|
search = search.substring(1); // Remove the leading '?'
|
||||||
|
search = unescape(search);
|
||||||
|
}
|
||||||
|
|
||||||
|
search = search.replace(/^ +/, ""); // strip leading spaces
|
||||||
|
search = search.replace(/ +$/, ""); // strip trailing spaces
|
||||||
|
search = search.toLowerCase();
|
||||||
|
search = convertToId(search);
|
||||||
|
|
||||||
|
var resultRows = document.getElementsByTagName("div");
|
||||||
|
var matches = 0;
|
||||||
|
|
||||||
|
var i = 0;
|
||||||
|
while (i < resultRows.length)
|
||||||
|
{
|
||||||
|
var row = resultRows.item(i);
|
||||||
|
if (row.className == "SRResult")
|
||||||
|
{
|
||||||
|
var rowMatchName = row.id.toLowerCase();
|
||||||
|
rowMatchName = rowMatchName.replace(/^sr\d*_/, ''); // strip 'sr123_'
|
||||||
|
|
||||||
|
if (search.length<=rowMatchName.length &&
|
||||||
|
rowMatchName.substr(0, search.length)==search)
|
||||||
|
{
|
||||||
|
row.style.display = 'block';
|
||||||
|
matches++;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
row.style.display = 'none';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
document.getElementById("Searching").style.display='none';
|
||||||
|
if (matches == 0) // no results
|
||||||
|
{
|
||||||
|
document.getElementById("NoMatches").style.display='block';
|
||||||
|
}
|
||||||
|
else // at least one result
|
||||||
|
{
|
||||||
|
document.getElementById("NoMatches").style.display='none';
|
||||||
|
}
|
||||||
|
this.lastMatchCount = matches;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// return the first item with index index or higher that is visible
|
||||||
|
this.NavNext = function(index)
|
||||||
|
{
|
||||||
|
var focusItem;
|
||||||
|
while (1)
|
||||||
|
{
|
||||||
|
var focusName = 'Item'+index;
|
||||||
|
focusItem = document.getElementById(focusName);
|
||||||
|
if (focusItem && focusItem.parentNode.parentNode.style.display=='block')
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
else if (!focusItem) // last element
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
focusItem=null;
|
||||||
|
index++;
|
||||||
|
}
|
||||||
|
return focusItem;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.NavPrev = function(index)
|
||||||
|
{
|
||||||
|
var focusItem;
|
||||||
|
while (1)
|
||||||
|
{
|
||||||
|
var focusName = 'Item'+index;
|
||||||
|
focusItem = document.getElementById(focusName);
|
||||||
|
if (focusItem && focusItem.parentNode.parentNode.style.display=='block')
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
else if (!focusItem) // last element
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
focusItem=null;
|
||||||
|
index--;
|
||||||
|
}
|
||||||
|
return focusItem;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.ProcessKeys = function(e)
|
||||||
|
{
|
||||||
|
if (e.type == "keydown")
|
||||||
|
{
|
||||||
|
this.repeatOn = false;
|
||||||
|
this.lastKey = e.keyCode;
|
||||||
|
}
|
||||||
|
else if (e.type == "keypress")
|
||||||
|
{
|
||||||
|
if (!this.repeatOn)
|
||||||
|
{
|
||||||
|
if (this.lastKey) this.repeatOn = true;
|
||||||
|
return false; // ignore first keypress after keydown
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (e.type == "keyup")
|
||||||
|
{
|
||||||
|
this.lastKey = 0;
|
||||||
|
this.repeatOn = false;
|
||||||
|
}
|
||||||
|
return this.lastKey!=0;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.Nav = function(evt,itemIndex)
|
||||||
|
{
|
||||||
|
var e = (evt) ? evt : window.event; // for IE
|
||||||
|
if (e.keyCode==13) return true;
|
||||||
|
if (!this.ProcessKeys(e)) return false;
|
||||||
|
|
||||||
|
if (this.lastKey==38) // Up
|
||||||
|
{
|
||||||
|
var newIndex = itemIndex-1;
|
||||||
|
var focusItem = this.NavPrev(newIndex);
|
||||||
|
if (focusItem)
|
||||||
|
{
|
||||||
|
var child = this.FindChildElement(focusItem.parentNode.parentNode.id);
|
||||||
|
if (child && child.style.display == 'block') // children visible
|
||||||
|
{
|
||||||
|
var n=0;
|
||||||
|
var tmpElem;
|
||||||
|
while (1) // search for last child
|
||||||
|
{
|
||||||
|
tmpElem = document.getElementById('Item'+newIndex+'_c'+n);
|
||||||
|
if (tmpElem)
|
||||||
|
{
|
||||||
|
focusItem = tmpElem;
|
||||||
|
}
|
||||||
|
else // found it!
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
n++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (focusItem)
|
||||||
|
{
|
||||||
|
focusItem.focus();
|
||||||
|
}
|
||||||
|
else // return focus to search field
|
||||||
|
{
|
||||||
|
parent.document.getElementById("MSearchField").focus();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (this.lastKey==40) // Down
|
||||||
|
{
|
||||||
|
var newIndex = itemIndex+1;
|
||||||
|
var focusItem;
|
||||||
|
var item = document.getElementById('Item'+itemIndex);
|
||||||
|
var elem = this.FindChildElement(item.parentNode.parentNode.id);
|
||||||
|
if (elem && elem.style.display == 'block') // children visible
|
||||||
|
{
|
||||||
|
focusItem = document.getElementById('Item'+itemIndex+'_c0');
|
||||||
|
}
|
||||||
|
if (!focusItem) focusItem = this.NavNext(newIndex);
|
||||||
|
if (focusItem) focusItem.focus();
|
||||||
|
}
|
||||||
|
else if (this.lastKey==39) // Right
|
||||||
|
{
|
||||||
|
var item = document.getElementById('Item'+itemIndex);
|
||||||
|
var elem = this.FindChildElement(item.parentNode.parentNode.id);
|
||||||
|
if (elem) elem.style.display = 'block';
|
||||||
|
}
|
||||||
|
else if (this.lastKey==37) // Left
|
||||||
|
{
|
||||||
|
var item = document.getElementById('Item'+itemIndex);
|
||||||
|
var elem = this.FindChildElement(item.parentNode.parentNode.id);
|
||||||
|
if (elem) elem.style.display = 'none';
|
||||||
|
}
|
||||||
|
else if (this.lastKey==27) // Escape
|
||||||
|
{
|
||||||
|
parent.searchBox.CloseResultsWindow();
|
||||||
|
parent.document.getElementById("MSearchField").focus();
|
||||||
|
}
|
||||||
|
else if (this.lastKey==13) // Enter
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.NavChild = function(evt,itemIndex,childIndex)
|
||||||
|
{
|
||||||
|
var e = (evt) ? evt : window.event; // for IE
|
||||||
|
if (e.keyCode==13) return true;
|
||||||
|
if (!this.ProcessKeys(e)) return false;
|
||||||
|
|
||||||
|
if (this.lastKey==38) // Up
|
||||||
|
{
|
||||||
|
if (childIndex>0)
|
||||||
|
{
|
||||||
|
var newIndex = childIndex-1;
|
||||||
|
document.getElementById('Item'+itemIndex+'_c'+newIndex).focus();
|
||||||
|
}
|
||||||
|
else // already at first child, jump to parent
|
||||||
|
{
|
||||||
|
document.getElementById('Item'+itemIndex).focus();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (this.lastKey==40) // Down
|
||||||
|
{
|
||||||
|
var newIndex = childIndex+1;
|
||||||
|
var elem = document.getElementById('Item'+itemIndex+'_c'+newIndex);
|
||||||
|
if (!elem) // last child, jump to parent next parent
|
||||||
|
{
|
||||||
|
elem = this.NavNext(itemIndex+1);
|
||||||
|
}
|
||||||
|
if (elem)
|
||||||
|
{
|
||||||
|
elem.focus();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (this.lastKey==27) // Escape
|
||||||
|
{
|
||||||
|
parent.searchBox.CloseResultsWindow();
|
||||||
|
parent.document.getElementById("MSearchField").focus();
|
||||||
|
}
|
||||||
|
else if (this.lastKey==13) // Enter
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function setKeyActions(elem,action)
|
||||||
|
{
|
||||||
|
elem.setAttribute('onkeydown',action);
|
||||||
|
elem.setAttribute('onkeypress',action);
|
||||||
|
elem.setAttribute('onkeyup',action);
|
||||||
|
}
|
||||||
|
|
||||||
|
function setClassAttr(elem,attr)
|
||||||
|
{
|
||||||
|
elem.setAttribute('class',attr);
|
||||||
|
elem.setAttribute('className',attr);
|
||||||
|
}
|
||||||
|
|
||||||
|
function createResults()
|
||||||
|
{
|
||||||
|
var results = document.getElementById("SRResults");
|
||||||
|
for (var e=0; e<searchData.length; e++)
|
||||||
|
{
|
||||||
|
var id = searchData[e][0];
|
||||||
|
var srResult = document.createElement('div');
|
||||||
|
srResult.setAttribute('id','SR_'+id);
|
||||||
|
setClassAttr(srResult,'SRResult');
|
||||||
|
var srEntry = document.createElement('div');
|
||||||
|
setClassAttr(srEntry,'SREntry');
|
||||||
|
var srLink = document.createElement('a');
|
||||||
|
srLink.setAttribute('id','Item'+e);
|
||||||
|
setKeyActions(srLink,'return searchResults.Nav(event,'+e+')');
|
||||||
|
setClassAttr(srLink,'SRSymbol');
|
||||||
|
srLink.innerHTML = searchData[e][1][0];
|
||||||
|
srEntry.appendChild(srLink);
|
||||||
|
if (searchData[e][1].length==2) // single result
|
||||||
|
{
|
||||||
|
srLink.setAttribute('href',searchData[e][1][1][0]);
|
||||||
|
if (searchData[e][1][1][1])
|
||||||
|
{
|
||||||
|
srLink.setAttribute('target','_parent');
|
||||||
|
}
|
||||||
|
var srScope = document.createElement('span');
|
||||||
|
setClassAttr(srScope,'SRScope');
|
||||||
|
srScope.innerHTML = searchData[e][1][1][2];
|
||||||
|
srEntry.appendChild(srScope);
|
||||||
|
}
|
||||||
|
else // multiple results
|
||||||
|
{
|
||||||
|
srLink.setAttribute('href','javascript:searchResults.Toggle("SR_'+id+'")');
|
||||||
|
var srChildren = document.createElement('div');
|
||||||
|
setClassAttr(srChildren,'SRChildren');
|
||||||
|
for (var c=0; c<searchData[e][1].length-1; c++)
|
||||||
|
{
|
||||||
|
var srChild = document.createElement('a');
|
||||||
|
srChild.setAttribute('id','Item'+e+'_c'+c);
|
||||||
|
setKeyActions(srChild,'return searchResults.NavChild(event,'+e+','+c+')');
|
||||||
|
setClassAttr(srChild,'SRScope');
|
||||||
|
srChild.setAttribute('href',searchData[e][1][c+1][0]);
|
||||||
|
if (searchData[e][1][c+1][1])
|
||||||
|
{
|
||||||
|
srChild.setAttribute('target','_parent');
|
||||||
|
}
|
||||||
|
srChild.innerHTML = searchData[e][1][c+1][2];
|
||||||
|
srChildren.appendChild(srChild);
|
||||||
|
}
|
||||||
|
srEntry.appendChild(srChildren);
|
||||||
|
}
|
||||||
|
srResult.appendChild(srEntry);
|
||||||
|
results.appendChild(srResult);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
BIN
doc/html/search/search_l.png
Executable file
After Width: | Height: | Size: 604 B |
BIN
doc/html/search/search_m.png
Executable file
After Width: | Height: | Size: 158 B |
BIN
doc/html/search/search_r.png
Executable file
After Width: | Height: | Size: 612 B |
122
doc/html/struct__WIN__landscape__struct.html
Executable file
|
@ -0,0 +1,122 @@
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||||
|
<meta name="generator" content="Doxygen 1.8.6"/>
|
||||||
|
<title>SCC.150 Assembler Emulator: _WIN_landscape_struct Struct Reference</title>
|
||||||
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||||
|
<script type="text/javascript" src="jquery.js"></script>
|
||||||
|
<script type="text/javascript" src="dynsections.js"></script>
|
||||||
|
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||||
|
<script type="text/javascript" src="search/search.js"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(document).ready(function() { searchBox.OnSelectItem(0); });
|
||||||
|
</script>
|
||||||
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||||
|
<div id="titlearea">
|
||||||
|
<table cellspacing="0" cellpadding="0">
|
||||||
|
<tbody>
|
||||||
|
<tr style="height: 56px;">
|
||||||
|
<td style="padding-left: 0.5em;">
|
||||||
|
<div id="projectname">SCC.150 Assembler Emulator
|
||||||
|
</div>
|
||||||
|
<div id="projectbrief">A compiler for a simple assembler language</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<!-- end header part -->
|
||||||
|
<!-- Generated by Doxygen 1.8.6 -->
|
||||||
|
<script type="text/javascript">
|
||||||
|
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||||
|
</script>
|
||||||
|
<div id="navrow1" class="tabs">
|
||||||
|
<ul class="tablist">
|
||||||
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
||||||
|
<li class="current"><a href="annotated.html"><span>Data Structures</span></a></li>
|
||||||
|
<li><a href="files.html"><span>Files</span></a></li>
|
||||||
|
<li>
|
||||||
|
<div id="MSearchBox" class="MSearchBoxInactive">
|
||||||
|
<span class="left">
|
||||||
|
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||||
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||||
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||||
|
alt=""/>
|
||||||
|
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||||
|
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||||
|
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||||
|
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||||
|
</span><span class="right">
|
||||||
|
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div id="navrow2" class="tabs2">
|
||||||
|
<ul class="tablist">
|
||||||
|
<li><a href="annotated.html"><span>Data Structures</span></a></li>
|
||||||
|
<li><a href="classes.html"><span>Data Structure Index</span></a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<!-- window showing the filter options -->
|
||||||
|
<div id="MSearchSelectWindow"
|
||||||
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||||
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||||
|
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||||
|
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Functions</a></div>
|
||||||
|
|
||||||
|
<!-- iframe showing the search results (closed by default) -->
|
||||||
|
<div id="MSearchResultsWindow">
|
||||||
|
<iframe src="javascript:void(0)" frameborder="0"
|
||||||
|
name="MSearchResults" id="MSearchResults">
|
||||||
|
</iframe>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div><!-- top -->
|
||||||
|
<div class="header">
|
||||||
|
<div class="summary">
|
||||||
|
<a href="#pub-attribs">Data Fields</a> </div>
|
||||||
|
<div class="headertitle">
|
||||||
|
<div class="title">_WIN_landscape_struct Struct Reference</div> </div>
|
||||||
|
</div><!--header-->
|
||||||
|
<div class="contents">
|
||||||
|
<table class="memberdecls">
|
||||||
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
|
||||||
|
Data Fields</h2></td></tr>
|
||||||
|
<tr class="memitem:af3eeedf617f90a3f83649dd1397d30a3"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af3eeedf617f90a3f83649dd1397d30a3"></a>
|
||||||
|
int </td><td class="memItemRight" valign="bottom"><b>startx</b></td></tr>
|
||||||
|
<tr class="separator:af3eeedf617f90a3f83649dd1397d30a3"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
|
<tr class="memitem:a0a7020049cb22267cbd39cf7bc037c4d"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0a7020049cb22267cbd39cf7bc037c4d"></a>
|
||||||
|
int </td><td class="memItemRight" valign="bottom"><b>starty</b></td></tr>
|
||||||
|
<tr class="separator:a0a7020049cb22267cbd39cf7bc037c4d"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
|
<tr class="memitem:a9ae1e59b4230ff5ccf6cda9e657dd6a7"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9ae1e59b4230ff5ccf6cda9e657dd6a7"></a>
|
||||||
|
int </td><td class="memItemRight" valign="bottom"><b>height</b></td></tr>
|
||||||
|
<tr class="separator:a9ae1e59b4230ff5ccf6cda9e657dd6a7"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
|
<tr class="memitem:a9c93bde7198d3a018bce3e8bf6a0eefb"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9c93bde7198d3a018bce3e8bf6a0eefb"></a>
|
||||||
|
int </td><td class="memItemRight" valign="bottom"><b>width</b></td></tr>
|
||||||
|
<tr class="separator:a9c93bde7198d3a018bce3e8bf6a0eefb"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
|
<tr class="memitem:a31cf7f05225785468f1a1e241d7c4f0a"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a31cf7f05225785468f1a1e241d7c4f0a"></a>
|
||||||
|
int </td><td class="memItemRight" valign="bottom"><b>landingPoints</b></td></tr>
|
||||||
|
<tr class="separator:a31cf7f05225785468f1a1e241d7c4f0a"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
|
<tr class="memitem:a048608e37b05bf4619cf163ea8705320"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a048608e37b05bf4619cf163ea8705320"></a>
|
||||||
|
<a class="el" href="struct__win__landscape__struct.html">WIN_LANDSCAPE</a> </td><td class="memItemRight" valign="bottom"><b>graphics</b></td></tr>
|
||||||
|
<tr class="separator:a048608e37b05bf4619cf163ea8705320"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
|
</table>
|
||||||
|
<hr/>The documentation for this struct was generated from the following file:<ul>
|
||||||
|
<li>/home/rumperuu/Documents/University/University Work/SCC.110 Software Development/Coursework/C/unr-Moon Lander/source/<a class="el" href="moonlander_8h_source.html">moonlander.h</a></li>
|
||||||
|
</ul>
|
||||||
|
</div><!-- contents -->
|
||||||
|
<!-- start footer part -->
|
||||||
|
<hr class="footer"/><address class="footer"><small>
|
||||||
|
Generated on Tue May 19 2015 20:33:41 for SCC.150 Assembler Emulator by  <a href="http://www.doxygen.org/index.html">
|
||||||
|
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
||||||
|
</a> 1.8.6
|
||||||
|
</small></address>
|
||||||
|
</body>
|
||||||
|
</html>
|
146
doc/html/struct__WIN__ship__struct.html
Executable file
|
@ -0,0 +1,146 @@
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||||
|
<meta name="generator" content="Doxygen 1.8.6"/>
|
||||||
|
<title>SCC.150 Assembler Emulator: _WIN_ship_struct Struct Reference</title>
|
||||||
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||||
|
<script type="text/javascript" src="jquery.js"></script>
|
||||||
|
<script type="text/javascript" src="dynsections.js"></script>
|
||||||
|
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||||
|
<script type="text/javascript" src="search/search.js"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(document).ready(function() { searchBox.OnSelectItem(0); });
|
||||||
|
</script>
|
||||||
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||||
|
<div id="titlearea">
|
||||||
|
<table cellspacing="0" cellpadding="0">
|
||||||
|
<tbody>
|
||||||
|
<tr style="height: 56px;">
|
||||||
|
<td style="padding-left: 0.5em;">
|
||||||
|
<div id="projectname">SCC.150 Assembler Emulator
|
||||||
|
</div>
|
||||||
|
<div id="projectbrief">A compiler for a simple assembler language</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<!-- end header part -->
|
||||||
|
<!-- Generated by Doxygen 1.8.6 -->
|
||||||
|
<script type="text/javascript">
|
||||||
|
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||||
|
</script>
|
||||||
|
<div id="navrow1" class="tabs">
|
||||||
|
<ul class="tablist">
|
||||||
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
||||||
|
<li class="current"><a href="annotated.html"><span>Data Structures</span></a></li>
|
||||||
|
<li><a href="files.html"><span>Files</span></a></li>
|
||||||
|
<li>
|
||||||
|
<div id="MSearchBox" class="MSearchBoxInactive">
|
||||||
|
<span class="left">
|
||||||
|
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||||
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||||
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||||
|
alt=""/>
|
||||||
|
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||||
|
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||||
|
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||||
|
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||||
|
</span><span class="right">
|
||||||
|
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div id="navrow2" class="tabs2">
|
||||||
|
<ul class="tablist">
|
||||||
|
<li><a href="annotated.html"><span>Data Structures</span></a></li>
|
||||||
|
<li><a href="classes.html"><span>Data Structure Index</span></a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<!-- window showing the filter options -->
|
||||||
|
<div id="MSearchSelectWindow"
|
||||||
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||||
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||||
|
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||||
|
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Functions</a></div>
|
||||||
|
|
||||||
|
<!-- iframe showing the search results (closed by default) -->
|
||||||
|
<div id="MSearchResultsWindow">
|
||||||
|
<iframe src="javascript:void(0)" frameborder="0"
|
||||||
|
name="MSearchResults" id="MSearchResults">
|
||||||
|
</iframe>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div><!-- top -->
|
||||||
|
<div class="header">
|
||||||
|
<div class="summary">
|
||||||
|
<a href="#pub-attribs">Data Fields</a> </div>
|
||||||
|
<div class="headertitle">
|
||||||
|
<div class="title">_WIN_ship_struct Struct Reference</div> </div>
|
||||||
|
</div><!--header-->
|
||||||
|
<div class="contents">
|
||||||
|
<table class="memberdecls">
|
||||||
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
|
||||||
|
Data Fields</h2></td></tr>
|
||||||
|
<tr class="memitem:af05427e77e6017d5ff4a27c3b6186233"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af05427e77e6017d5ff4a27c3b6186233"></a>
|
||||||
|
int </td><td class="memItemRight" valign="bottom"><b>startx</b></td></tr>
|
||||||
|
<tr class="separator:af05427e77e6017d5ff4a27c3b6186233"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
|
<tr class="memitem:aff59263f150621e1c17c66ae8f64d281"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aff59263f150621e1c17c66ae8f64d281"></a>
|
||||||
|
int </td><td class="memItemRight" valign="bottom"><b>starty</b></td></tr>
|
||||||
|
<tr class="separator:aff59263f150621e1c17c66ae8f64d281"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
|
<tr class="memitem:a5c25a5a7e08e5e8d9a06a3c2bb1b43d1"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5c25a5a7e08e5e8d9a06a3c2bb1b43d1"></a>
|
||||||
|
int </td><td class="memItemRight" valign="bottom"><b>lastx</b></td></tr>
|
||||||
|
<tr class="separator:a5c25a5a7e08e5e8d9a06a3c2bb1b43d1"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
|
<tr class="memitem:aaa3821fe683eb3de5231cab337b14467"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aaa3821fe683eb3de5231cab337b14467"></a>
|
||||||
|
int </td><td class="memItemRight" valign="bottom"><b>lasty</b></td></tr>
|
||||||
|
<tr class="separator:aaa3821fe683eb3de5231cab337b14467"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
|
<tr class="memitem:a91dac205b78f4b0a2495ce7be512d70e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a91dac205b78f4b0a2495ce7be512d70e"></a>
|
||||||
|
int </td><td class="memItemRight" valign="bottom"><b>fuel</b></td></tr>
|
||||||
|
<tr class="separator:a91dac205b78f4b0a2495ce7be512d70e"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
|
<tr class="memitem:a8b25f9918b16e82ee69a8d2bfb7cea13"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8b25f9918b16e82ee69a8d2bfb7cea13"></a>
|
||||||
|
float </td><td class="memItemRight" valign="bottom"><b>xF</b></td></tr>
|
||||||
|
<tr class="separator:a8b25f9918b16e82ee69a8d2bfb7cea13"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
|
<tr class="memitem:abb58cee8a7c57ff61e64d260a6931cb6"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="abb58cee8a7c57ff61e64d260a6931cb6"></a>
|
||||||
|
float </td><td class="memItemRight" valign="bottom"><b>yF</b></td></tr>
|
||||||
|
<tr class="separator:abb58cee8a7c57ff61e64d260a6931cb6"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
|
<tr class="memitem:afd5fbc0cc5398a81d10b55aaeeb7352c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afd5fbc0cc5398a81d10b55aaeeb7352c"></a>
|
||||||
|
int </td><td class="memItemRight" valign="bottom"><b>x</b></td></tr>
|
||||||
|
<tr class="separator:afd5fbc0cc5398a81d10b55aaeeb7352c"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
|
<tr class="memitem:aca9c7f415e6873745cc86e969c40f749"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aca9c7f415e6873745cc86e969c40f749"></a>
|
||||||
|
int </td><td class="memItemRight" valign="bottom"><b>y</b></td></tr>
|
||||||
|
<tr class="separator:aca9c7f415e6873745cc86e969c40f749"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
|
<tr class="memitem:afc3c965b10b1445279bafb5dea282e33"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afc3c965b10b1445279bafb5dea282e33"></a>
|
||||||
|
int </td><td class="memItemRight" valign="bottom"><b>height</b></td></tr>
|
||||||
|
<tr class="separator:afc3c965b10b1445279bafb5dea282e33"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
|
<tr class="memitem:a1671777021445b0d0a73b86e71da1f98"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1671777021445b0d0a73b86e71da1f98"></a>
|
||||||
|
int </td><td class="memItemRight" valign="bottom"><b>width</b></td></tr>
|
||||||
|
<tr class="separator:a1671777021445b0d0a73b86e71da1f98"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
|
<tr class="memitem:a5e42aa6480c3889ab8598d6967ddf77f"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5e42aa6480c3889ab8598d6967ddf77f"></a>
|
||||||
|
float </td><td class="memItemRight" valign="bottom"><b>xMomentum</b></td></tr>
|
||||||
|
<tr class="separator:a5e42aa6480c3889ab8598d6967ddf77f"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
|
<tr class="memitem:a21331b2ff8e96ac4f060408481ac1aad"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a21331b2ff8e96ac4f060408481ac1aad"></a>
|
||||||
|
float </td><td class="memItemRight" valign="bottom"><b>yMomentum</b></td></tr>
|
||||||
|
<tr class="separator:a21331b2ff8e96ac4f060408481ac1aad"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
|
<tr class="memitem:aeab1944ebc5761306e12a228a2e0a561"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aeab1944ebc5761306e12a228a2e0a561"></a>
|
||||||
|
<a class="el" href="struct__win__ship__struct.html">WIN_SHIP</a> </td><td class="memItemRight" valign="bottom"><b>graphics</b></td></tr>
|
||||||
|
<tr class="separator:aeab1944ebc5761306e12a228a2e0a561"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
|
</table>
|
||||||
|
<hr/>The documentation for this struct was generated from the following file:<ul>
|
||||||
|
<li>/home/rumperuu/Documents/University/University Work/SCC.110 Software Development/Coursework/C/unr-Moon Lander/source/<a class="el" href="moonlander_8h_source.html">moonlander.h</a></li>
|
||||||
|
</ul>
|
||||||
|
</div><!-- contents -->
|
||||||
|
<!-- start footer part -->
|
||||||
|
<hr class="footer"/><address class="footer"><small>
|
||||||
|
Generated on Tue May 19 2015 20:33:41 for SCC.150 Assembler Emulator by  <a href="http://www.doxygen.org/index.html">
|
||||||
|
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
||||||
|
</a> 1.8.6
|
||||||
|
</small></address>
|
||||||
|
</body>
|
||||||
|
</html>
|
110
doc/html/structtimespec__t.html
Executable file
|
@ -0,0 +1,110 @@
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||||
|
<meta name="generator" content="Doxygen 1.8.6"/>
|
||||||
|
<title>SCC.150 Assembler Emulator: timespec_t Struct Reference</title>
|
||||||
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||||
|
<script type="text/javascript" src="jquery.js"></script>
|
||||||
|
<script type="text/javascript" src="dynsections.js"></script>
|
||||||
|
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||||
|
<script type="text/javascript" src="search/search.js"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(document).ready(function() { searchBox.OnSelectItem(0); });
|
||||||
|
</script>
|
||||||
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||||
|
<div id="titlearea">
|
||||||
|
<table cellspacing="0" cellpadding="0">
|
||||||
|
<tbody>
|
||||||
|
<tr style="height: 56px;">
|
||||||
|
<td style="padding-left: 0.5em;">
|
||||||
|
<div id="projectname">SCC.150 Assembler Emulator
|
||||||
|
</div>
|
||||||
|
<div id="projectbrief">A compiler for a simple assembler language</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<!-- end header part -->
|
||||||
|
<!-- Generated by Doxygen 1.8.6 -->
|
||||||
|
<script type="text/javascript">
|
||||||
|
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||||
|
</script>
|
||||||
|
<div id="navrow1" class="tabs">
|
||||||
|
<ul class="tablist">
|
||||||
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
||||||
|
<li class="current"><a href="annotated.html"><span>Data Structures</span></a></li>
|
||||||
|
<li><a href="files.html"><span>Files</span></a></li>
|
||||||
|
<li>
|
||||||
|
<div id="MSearchBox" class="MSearchBoxInactive">
|
||||||
|
<span class="left">
|
||||||
|
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||||
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||||
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||||
|
alt=""/>
|
||||||
|
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||||
|
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||||
|
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||||
|
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||||
|
</span><span class="right">
|
||||||
|
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div id="navrow2" class="tabs2">
|
||||||
|
<ul class="tablist">
|
||||||
|
<li><a href="annotated.html"><span>Data Structures</span></a></li>
|
||||||
|
<li><a href="classes.html"><span>Data Structure Index</span></a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<!-- window showing the filter options -->
|
||||||
|
<div id="MSearchSelectWindow"
|
||||||
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||||
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||||
|
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||||
|
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Functions</a></div>
|
||||||
|
|
||||||
|
<!-- iframe showing the search results (closed by default) -->
|
||||||
|
<div id="MSearchResultsWindow">
|
||||||
|
<iframe src="javascript:void(0)" frameborder="0"
|
||||||
|
name="MSearchResults" id="MSearchResults">
|
||||||
|
</iframe>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div><!-- top -->
|
||||||
|
<div class="header">
|
||||||
|
<div class="summary">
|
||||||
|
<a href="#pub-attribs">Data Fields</a> </div>
|
||||||
|
<div class="headertitle">
|
||||||
|
<div class="title">timespec_t Struct Reference</div> </div>
|
||||||
|
</div><!--header-->
|
||||||
|
<div class="contents">
|
||||||
|
<table class="memberdecls">
|
||||||
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
|
||||||
|
Data Fields</h2></td></tr>
|
||||||
|
<tr class="memitem:a406e4641db634ae21f5b44b8dc7af142"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a406e4641db634ae21f5b44b8dc7af142"></a>
|
||||||
|
time_t </td><td class="memItemRight" valign="bottom"><b>tv_sec</b></td></tr>
|
||||||
|
<tr class="separator:a406e4641db634ae21f5b44b8dc7af142"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
|
<tr class="memitem:aa60d21bac16e74074d2abfb120a2b9e2"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa60d21bac16e74074d2abfb120a2b9e2"></a>
|
||||||
|
long </td><td class="memItemRight" valign="bottom"><b>tv_nsec</b></td></tr>
|
||||||
|
<tr class="separator:aa60d21bac16e74074d2abfb120a2b9e2"><td class="memSeparator" colspan="2"> </td></tr>
|
||||||
|
</table>
|
||||||
|
<hr/>The documentation for this struct was generated from the following file:<ul>
|
||||||
|
<li>/home/rumperuu/Documents/University/University Work/SCC.110 Software Development/Coursework/C/unr-Moon Lander/source/<a class="el" href="moonlander_8h_source.html">moonlander.h</a></li>
|
||||||
|
</ul>
|
||||||
|
</div><!-- contents -->
|
||||||
|
<!-- start footer part -->
|
||||||
|
<hr class="footer"/><address class="footer"><small>
|
||||||
|
Generated on Tue May 19 2015 20:33:41 for SCC.150 Assembler Emulator by  <a href="http://www.doxygen.org/index.html">
|
||||||
|
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
||||||
|
</a> 1.8.6
|
||||||
|
</small></address>
|
||||||
|
</body>
|
||||||
|
</html>
|
BIN
doc/html/sync_off.png
Executable file
After Width: | Height: | Size: 853 B |
BIN
doc/html/sync_on.png
Executable file
After Width: | Height: | Size: 845 B |
BIN
doc/html/tab_a.png
Executable file
After Width: | Height: | Size: 142 B |
BIN
doc/html/tab_b.png
Executable file
After Width: | Height: | Size: 169 B |
BIN
doc/html/tab_h.png
Executable file
After Width: | Height: | Size: 177 B |
BIN
doc/html/tab_s.png
Executable file
After Width: | Height: | Size: 184 B |
60
doc/html/tabs.css
Executable file
|
@ -0,0 +1,60 @@
|
||||||
|
.tabs, .tabs2, .tabs3 {
|
||||||
|
background-image: url('tab_b.png');
|
||||||
|
width: 100%;
|
||||||
|
z-index: 101;
|
||||||
|
font-size: 13px;
|
||||||
|
font-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tabs2 {
|
||||||
|
font-size: 10px;
|
||||||
|
}
|
||||||
|
.tabs3 {
|
||||||
|
font-size: 9px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tablist {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
display: table;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tablist li {
|
||||||
|
float: left;
|
||||||
|
display: table-cell;
|
||||||
|
background-image: url('tab_b.png');
|
||||||
|
line-height: 36px;
|
||||||
|
list-style: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tablist a {
|
||||||
|
display: block;
|
||||||
|
padding: 0 20px;
|
||||||
|
font-weight: bold;
|
||||||
|
background-image:url('tab_s.png');
|
||||||
|
background-repeat:no-repeat;
|
||||||
|
background-position:right;
|
||||||
|
color: #283A5D;
|
||||||
|
text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9);
|
||||||
|
text-decoration: none;
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tabs3 .tablist a {
|
||||||
|
padding: 0 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tablist a:hover {
|
||||||
|
background-image: url('tab_h.png');
|
||||||
|
background-repeat:repeat-x;
|
||||||
|
color: #fff;
|
||||||
|
text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0);
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tablist li.current a {
|
||||||
|
background-image: url('tab_a.png');
|
||||||
|
background-repeat:repeat-x;
|
||||||
|
color: #fff;
|
||||||
|
text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0);
|
||||||
|
}
|
654
src/moonlander.c
Executable file
|
@ -0,0 +1,654 @@
|
||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* @author Ben Goldsworthy (rumps) <me+moonlander@bengoldworthy.net>
|
||||||
|
* @version 1.0
|
||||||
|
*
|
||||||
|
* @section LICENSE
|
||||||
|
*
|
||||||
|
* This file 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 file 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/>.
|
||||||
|
*
|
||||||
|
* @section DESCRIPTION
|
||||||
|
*
|
||||||
|
* This program attempts to emulate the 1979 Atari arcade classic 'Lunar Lander'
|
||||||
|
* in the *nix Terminal, using the ncurses library
|
||||||
|
* (<https://www.gnu.org/software/ncurses/ncurses.html>). This can only
|
||||||
|
* be because Joe Finney is a sadistic madman.
|
||||||
|
*
|
||||||
|
* Implemented features so far are:
|
||||||
|
*
|
||||||
|
* - momentum & gravity
|
||||||
|
* - random landscape generation
|
||||||
|
* - crashing & (rarely) landing
|
||||||
|
* - cheats
|
||||||
|
* - scoring
|
||||||
|
*
|
||||||
|
* Features to implement by TOMORROW are:
|
||||||
|
*
|
||||||
|
* - more cheats (or 'debug modes' as all the kids are calling them these days)
|
||||||
|
* - leaderboards
|
||||||
|
* - random gravity generation
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "moonlander.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The main function of the program.
|
||||||
|
*
|
||||||
|
* Sets everything up initially, and then contains the game loop.
|
||||||
|
*
|
||||||
|
* @return 0 on success
|
||||||
|
*/
|
||||||
|
int main() {
|
||||||
|
// Declarations of variables used throughout `main()`
|
||||||
|
// With all this talk of `SHIP`s and `LANDSCAPE`s, it all
|
||||||
|
// feels a bit object oriented around here.
|
||||||
|
SHIP ship;
|
||||||
|
LANDSCAPE landscape;
|
||||||
|
// Values used for tracking the score.
|
||||||
|
unsigned int time;
|
||||||
|
// Used for animating the game.
|
||||||
|
s.tv_sec = 0;
|
||||||
|
s.tv_nsec = 180000000L;
|
||||||
|
// Used for recording user input.
|
||||||
|
unsigned int ch;
|
||||||
|
// Used for moving the ship.
|
||||||
|
unsigned int jetDir;
|
||||||
|
// Used for dealing with the landscape arrays.
|
||||||
|
size_t lASize, sASize;
|
||||||
|
// Tracks the score.
|
||||||
|
double score;
|
||||||
|
|
||||||
|
// This is where the magic happens.
|
||||||
|
initialisencurses();
|
||||||
|
|
||||||
|
// I know, I know; 'Go To Statement Considered Harmful' and
|
||||||
|
// all that. I feel like even Dijkstra would let me off for this
|
||||||
|
// one though.
|
||||||
|
restart:
|
||||||
|
// (Re-)Initialises the relevant variables; the user isn't always coming
|
||||||
|
// to this point fresh.
|
||||||
|
end = false;
|
||||||
|
endType = NONE;
|
||||||
|
time = 0;
|
||||||
|
invincible = false;
|
||||||
|
ch = ' ';
|
||||||
|
jetDir = NONE;
|
||||||
|
score = 0.0f;
|
||||||
|
|
||||||
|
// `lASize` is initialised to 1 rather than 0 because the first coordinates
|
||||||
|
// in `landscapeArray` will be the leftmost ones; that is, they will have a
|
||||||
|
// x-coord of 0 and the size of the array will return as 0.
|
||||||
|
lASize = 1;
|
||||||
|
sASize = 0;
|
||||||
|
|
||||||
|
// Displays the lovely nicked ASCII lunar lander splash screen.
|
||||||
|
displayIntro();
|
||||||
|
|
||||||
|
// Loops whilst on the intro screen until the button to start the
|
||||||
|
// game is pressed. Meanwhile, the keys for the available cheats
|
||||||
|
// can be used to toggle their effects.
|
||||||
|
while ((ch = getch()) != 'a'){
|
||||||
|
if (ch == 'i') {
|
||||||
|
invincible = (invincible) ? false : true;
|
||||||
|
mvaddch(LINES-1, COLS-1, (invincible) ? 'T' : 'F');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Wipes the slate clean.
|
||||||
|
clear();
|
||||||
|
|
||||||
|
// ncurses has the weirdest system of dealing with colours.
|
||||||
|
init_pair(1, COLOR_CYAN, COLOR_BLACK);
|
||||||
|
init_pair(2, COLOR_RED, COLOR_BLACK);
|
||||||
|
init_pair(3, COLOR_GREEN, COLOR_BLACK);
|
||||||
|
|
||||||
|
// Initialises the parameters for the ship and landscape; did
|
||||||
|
// someone say object constructors?
|
||||||
|
initialiseShip(&ship);
|
||||||
|
initialiseLandscape(&landscape);
|
||||||
|
|
||||||
|
// Seriously, who designed this thing?
|
||||||
|
attron(COLOR_PAIR(1));
|
||||||
|
mvprintw(0, 1, "Press F1 to exit");
|
||||||
|
attroff(COLOR_PAIR(1));
|
||||||
|
|
||||||
|
// There's almost certainly a more space-efficient way of doing this,
|
||||||
|
// but making `landscapeArray` the size of the entire terminal is certainly
|
||||||
|
// reliable. `safeArray` can safely be double the number of columns because
|
||||||
|
// the landscape can never loop back on itself (I hope).
|
||||||
|
unsigned int landscapeArray[COLS * LINES];
|
||||||
|
unsigned int safeArray[COLS * 2];
|
||||||
|
// Initialises the arrays to 0s; this is used to figure out how where
|
||||||
|
// the coordinates end and useless data begins later on.
|
||||||
|
// In MATLAB, these two lines and the lines before could be done as
|
||||||
|
// `landscapeArray = zeros(2, COLS)`; who thought I'd ever miss MATLAB.
|
||||||
|
for (size_t i = 0; i < COLS * LINES; i++) landscapeArray[i] = 0;
|
||||||
|
for (size_t i = 0; i < COLS * LINES; i++) safeArray[i] = 0;
|
||||||
|
// Used to ensure a game is never unwinnable (I'm nicer than 80s/90s
|
||||||
|
// Sierra)
|
||||||
|
bool validLandscape;
|
||||||
|
// Fairly certain this is absolute arse, but it works. The game generates
|
||||||
|
// random landscapes until one is made with at least one landing pad.
|
||||||
|
do {
|
||||||
|
validLandscape = createLandscape(&landscape, &landscapeArray, &safeArray);
|
||||||
|
} while (!validLandscape);
|
||||||
|
// Finds the ends of the two arrays. Again, this hurts a bit to look at,
|
||||||
|
// but I'm lazy. So sue me.
|
||||||
|
do { lASize++; } while (landscapeArray[lASize] != 0); --lASize;
|
||||||
|
do { sASize++; } while (safeArray[sASize] != 0); --sASize;
|
||||||
|
|
||||||
|
// Does what it says on the tin, really.
|
||||||
|
createShip(&ship);
|
||||||
|
|
||||||
|
// Sticks all of this onto the screen.
|
||||||
|
refresh();
|
||||||
|
|
||||||
|
// Despite what I said before, this is where the magic really happens.
|
||||||
|
// The fabled game loop.
|
||||||
|
do {
|
||||||
|
// If a direction key is entered, the jet direction is set to that key's
|
||||||
|
// direction. If F1 is entered, the QUIT endstate is triggered. If no
|
||||||
|
// key is entered, the jets are turned off.
|
||||||
|
if ((ch = getch()) != ERR) {
|
||||||
|
switch(ch) {
|
||||||
|
case KEY_UP: jetDir = UP; break;
|
||||||
|
case KEY_RIGHT: jetDir = RIGHT; break;
|
||||||
|
case KEY_DOWN: jetDir = DOWN; break;
|
||||||
|
case KEY_LEFT: jetDir = LEFT; break;
|
||||||
|
case KEY_F(1): end = true; endType = QUIT; break;
|
||||||
|
}
|
||||||
|
} else jetDir = NONE;
|
||||||
|
// If the jets should be on, turns them on.
|
||||||
|
if (jetDir != NONE) {
|
||||||
|
applyJet(&ship, jetDir);
|
||||||
|
}
|
||||||
|
// Like death and taxes, there's no getting away from gravity
|
||||||
|
// and friction.
|
||||||
|
applyGravity(&ship);
|
||||||
|
applyFriction(&ship);
|
||||||
|
// Figures out where the ship ought to be now.
|
||||||
|
moveShip(&ship, lASize, landscapeArray, sASize, safeArray);
|
||||||
|
// Updates the clock, ticking up mercilessly all the while.
|
||||||
|
mvprintw(3, 1, "Time: %d", time++);
|
||||||
|
// Slows the program down to human-comprehendable speed.
|
||||||
|
nanosleep(&s, NULL);
|
||||||
|
} while (!end);
|
||||||
|
|
||||||
|
// If a game end is triggers, tests what flavour of end it is.
|
||||||
|
switch(endType) {
|
||||||
|
case CRASH:
|
||||||
|
attron(COLOR_PAIR(2));
|
||||||
|
mvprintw(6, COLS/3, "AW MAAAAN");
|
||||||
|
attroff(COLOR_PAIR(2));
|
||||||
|
mvprintw(7, COLS/3, "Press r to restart");
|
||||||
|
|
||||||
|
while ((ch = getch()) != 'r'){}
|
||||||
|
// I'm so sorry Edsger.
|
||||||
|
goto restart;
|
||||||
|
case LAND:
|
||||||
|
score = getScore(&ship, time);
|
||||||
|
attron(COLOR_PAIR(3));
|
||||||
|
mvprintw(6, COLS/3, "YOU LANDED");
|
||||||
|
attroff(COLOR_PAIR(3));
|
||||||
|
mvprintw(7, COLS/3, "Your score: %f", score);
|
||||||
|
mvprintw(8, COLS/3, "Press r to restart");
|
||||||
|
|
||||||
|
while ((ch = getch()) != 'r'){}
|
||||||
|
goto restart;
|
||||||
|
case QUIT:
|
||||||
|
// Ends curses mode, else the terminal would play up afterwards.
|
||||||
|
endwin();
|
||||||
|
// Then calls it a night.
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Initialises ncurses.
|
||||||
|
*
|
||||||
|
* I couldn't decide whether it should be `initialisencurses()`,
|
||||||
|
* `initialiseNCURSES()` or `initialiseNcurses()`. In the end I plumped for
|
||||||
|
* `initialisencurses()` because, whilst it does break the camelCase rule I've
|
||||||
|
* used throughout for variables and functions, ncurses is one of those trendy
|
||||||
|
* uncapitalised names.
|
||||||
|
*/
|
||||||
|
void initialisencurses() {
|
||||||
|
// Starts ncurses mode.
|
||||||
|
initscr();
|
||||||
|
// Starts the colour functionality.
|
||||||
|
start_color();
|
||||||
|
// Disables line buffering.
|
||||||
|
cbreak();
|
||||||
|
// Keeps the program from hanging around waiting for character entry.
|
||||||
|
nodelay(stdscr, TRUE);
|
||||||
|
// Enables the keyboard.
|
||||||
|
keypad(stdscr, TRUE);
|
||||||
|
// Disables echoing user input.
|
||||||
|
noecho();
|
||||||
|
// Hides the cursor.
|
||||||
|
curs_set(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Initialises the ship's parameters.
|
||||||
|
*
|
||||||
|
* @param ship the ship in question
|
||||||
|
*/
|
||||||
|
void initialiseShip(SHIP* ship) {
|
||||||
|
// The ship displays thusly: *
|
||||||
|
ship->height = 1;
|
||||||
|
ship->width = 1;
|
||||||
|
ship->graphics.bod = '*';
|
||||||
|
|
||||||
|
// The ship starts at the centre top of the terminal.
|
||||||
|
ship->starty = 2;
|
||||||
|
ship->startx = (COLS - ship->width)/2;
|
||||||
|
ship->xF = ship->startx;
|
||||||
|
ship->yF = ship->starty;
|
||||||
|
ship->lastx = ship->startx;
|
||||||
|
ship->lasty = ship->starty;
|
||||||
|
|
||||||
|
// The ship starts fueled, and with a little bit of upward momentum
|
||||||
|
// to keep the player from getting caught too unawares and careening
|
||||||
|
// straight into a cliff (still happens).
|
||||||
|
ship->fuel = STARTING_FUEL;
|
||||||
|
ship->yMomentum = -0.5f;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Initialises the landscape's parameters.
|
||||||
|
*
|
||||||
|
* @param landscape the landscape in question
|
||||||
|
*/
|
||||||
|
void initialiseLandscape(LANDSCAPE* landscape) {
|
||||||
|
// The landscape spans the width of the console window and starts halfway
|
||||||
|
// down it.
|
||||||
|
landscape->height = LINES - 7;
|
||||||
|
landscape->width = COLS;
|
||||||
|
landscape->starty = LINES / 2;
|
||||||
|
landscape->startx = 0;
|
||||||
|
|
||||||
|
// Landscape graphics
|
||||||
|
landscape->graphics.li = '/';
|
||||||
|
landscape->graphics.su = '|';
|
||||||
|
landscape->graphics.sd = '|';
|
||||||
|
landscape->graphics.rd = '\\';
|
||||||
|
landscape->graphics.pl = '_';
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates the ship in the game world.
|
||||||
|
*
|
||||||
|
* @param ship the ship in question
|
||||||
|
*/
|
||||||
|
void createShip(SHIP* ship) {
|
||||||
|
int x, y;
|
||||||
|
|
||||||
|
x = ship->startx;
|
||||||
|
y = ship->starty;
|
||||||
|
|
||||||
|
mvaddch(y, x, ship->graphics.bod | A_BOLD);
|
||||||
|
|
||||||
|
ship->xMomentum = 0;
|
||||||
|
ship->yMomentum = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates the landscape in the game world.
|
||||||
|
*
|
||||||
|
* @param landscape the landscape in question
|
||||||
|
* @param landscapeArray[] the array of all the coordinates of the landscape
|
||||||
|
* components
|
||||||
|
* @param safeArray[] the array of all the coordinates of the landing pad
|
||||||
|
* components
|
||||||
|
* @return true if the landscape is valid (has at least one landing pad), false
|
||||||
|
* if not
|
||||||
|
*/
|
||||||
|
bool createLandscape(LANDSCAPE* landscape, unsigned int landscapeArray[],
|
||||||
|
unsigned int safeArray[]) {
|
||||||
|
int x = landscape->startx;
|
||||||
|
int y = landscape->starty;
|
||||||
|
int dir;
|
||||||
|
bool landingPad = false;
|
||||||
|
|
||||||
|
int w = landscape->width;
|
||||||
|
int h = landscape->height;
|
||||||
|
|
||||||
|
// Wipes the previous landscape attempts, if there were any.
|
||||||
|
for(int j = y; j <= y + h; ++j)
|
||||||
|
for(int i = x; i <= x + w; ++i)
|
||||||
|
mvaddch(j, i, ' ');
|
||||||
|
|
||||||
|
// Seeds C's psuedorandom number generator.
|
||||||
|
srand(time(NULL));
|
||||||
|
|
||||||
|
// Starts the landscape off with a fruity left incline.
|
||||||
|
landscapeArray[0] = x; landscapeArray[1] = y;
|
||||||
|
mvaddch(y--, x++, landscape->graphics.li);
|
||||||
|
int lastPiece = LEFT_INCLINE;
|
||||||
|
// Indexes for adding coordinates to the two arrays.
|
||||||
|
size_t lA = 2; size_t sA = 0;
|
||||||
|
|
||||||
|
for (; x <= landscape->width; x++) {
|
||||||
|
// Gives a value between 0-4, or the four valid landscape
|
||||||
|
// component identifiers.
|
||||||
|
dir = (rand() % 5);
|
||||||
|
|
||||||
|
// Places the appropriate piece at the correct point, altering the
|
||||||
|
// y-index if necessary; if placing a piece would result in the
|
||||||
|
// landscape going beyond the top and bottom boundaries set for it,
|
||||||
|
// `x` is rewound and a new piece selected.
|
||||||
|
switch(dir) {
|
||||||
|
case LEFT_INCLINE:
|
||||||
|
if (y - 1 > 10) {
|
||||||
|
switch(lastPiece) {
|
||||||
|
case STRAIGHT_DOWN:
|
||||||
|
x++; y--; break;
|
||||||
|
case RIGHT_DECLINE:
|
||||||
|
y--; break;
|
||||||
|
}
|
||||||
|
landscapeArray[lA++] = x; landscapeArray[lA++] = y;
|
||||||
|
mvaddch(y--, x, landscape->graphics.li);
|
||||||
|
} else --x;
|
||||||
|
break;
|
||||||
|
case STRAIGHT_UP:
|
||||||
|
if ((y - 1 > 10) && (lastPiece != STRAIGHT_DOWN)) {
|
||||||
|
switch(lastPiece) {
|
||||||
|
case RIGHT_DECLINE:
|
||||||
|
y--; break;
|
||||||
|
}
|
||||||
|
landscapeArray[lA++] = x; landscapeArray[lA++] = y;
|
||||||
|
mvaddch(y--, x--, landscape->graphics.su);
|
||||||
|
} else --x;
|
||||||
|
break;
|
||||||
|
case STRAIGHT_DOWN:
|
||||||
|
if ((y + 1 < (LINES - 2)) && (lastPiece != STRAIGHT_UP)) {
|
||||||
|
switch(lastPiece) {
|
||||||
|
case LEFT_INCLINE:
|
||||||
|
y++; break;
|
||||||
|
case RIGHT_DECLINE:
|
||||||
|
x--; break;
|
||||||
|
case PLATEAU:
|
||||||
|
y++; break;
|
||||||
|
}
|
||||||
|
landscapeArray[lA++] = x; landscapeArray[lA++] = y;
|
||||||
|
mvaddch(y++, x--, landscape->graphics.sd);
|
||||||
|
} else --x;
|
||||||
|
break;
|
||||||
|
case RIGHT_DECLINE:
|
||||||
|
if (y + 1 < (LINES - 2)) {
|
||||||
|
switch(lastPiece) {
|
||||||
|
case LEFT_INCLINE:
|
||||||
|
y++; break;
|
||||||
|
case STRAIGHT_UP:
|
||||||
|
x++; break;
|
||||||
|
case STRAIGHT_DOWN:
|
||||||
|
x++; break;
|
||||||
|
case PLATEAU:
|
||||||
|
y++; break;
|
||||||
|
}
|
||||||
|
landscapeArray[lA++] = x; landscapeArray[lA++] = y;
|
||||||
|
mvaddch(y++, x, landscape->graphics.rd);
|
||||||
|
} else --x;
|
||||||
|
break;
|
||||||
|
case PLATEAU:
|
||||||
|
switch(lastPiece) {
|
||||||
|
case STRAIGHT_DOWN:
|
||||||
|
x++; y--;
|
||||||
|
break;
|
||||||
|
case RIGHT_DECLINE:
|
||||||
|
y--; break;
|
||||||
|
}
|
||||||
|
|
||||||
|
// For every plateau, there is a chance it will form a landing pad.
|
||||||
|
if ((rand() % CHANCE_OF_LANDING_PAD) == 0) {
|
||||||
|
attron(COLOR_PAIR(1));
|
||||||
|
for (int i = 0; i <= 3; i++) {
|
||||||
|
safeArray[sA++] = x; safeArray[sA++] = y;
|
||||||
|
landscapeArray[lA++] = x; landscapeArray[lA++] = y;
|
||||||
|
mvaddch(y, x++, landscape->graphics.pl | A_BOLD);
|
||||||
|
}
|
||||||
|
x--;
|
||||||
|
attroff(COLOR_PAIR(1));
|
||||||
|
landingPad = true;
|
||||||
|
} else mvaddch(y, x, landscape->graphics.pl);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
lastPiece = dir;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Returns whether the generated landscape has a landing pad or not.
|
||||||
|
return landingPad;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Applies the thrust of the jet to the ship.
|
||||||
|
*
|
||||||
|
* If the ship is out of fuel, the jets won't fire.
|
||||||
|
*
|
||||||
|
* @param ship the ship in question
|
||||||
|
* @param dir the thrust direction
|
||||||
|
*/
|
||||||
|
void applyJet(SHIP* ship, unsigned int dir) {
|
||||||
|
if (ship->fuel > 0) {
|
||||||
|
ship->fuel--;
|
||||||
|
|
||||||
|
// Shows the player their remaining fuel balance.
|
||||||
|
if (ship->fuel == 0)
|
||||||
|
attron(COLOR_PAIR(2));
|
||||||
|
mvprintw(2,1,"Fuel: %d", ship->fuel);
|
||||||
|
if (ship->fuel == 0)
|
||||||
|
attroff(COLOR_PAIR(2));
|
||||||
|
|
||||||
|
// Adds a bit of momentum in the chosen direction.
|
||||||
|
switch(dir) {
|
||||||
|
case UP:
|
||||||
|
if(ship->yMomentum >= -1) ship->yMomentum -= 0.2f; break;
|
||||||
|
case RIGHT:
|
||||||
|
if(ship->xMomentum <= 1) ship->xMomentum += 0.2f; break;
|
||||||
|
case DOWN:
|
||||||
|
if(ship->yMomentum <= 1) ship->yMomentum += 0.2f; break;
|
||||||
|
case LEFT:
|
||||||
|
if(ship->xMomentum >= -1) ship->xMomentum -= 0.2f; break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Applies the relentless march of gravity to the ship.
|
||||||
|
*
|
||||||
|
* @param ship the ship in question
|
||||||
|
*/
|
||||||
|
void applyGravity(SHIP* ship) {
|
||||||
|
if (ship->yMomentum <= TERMINAL_VELOCITY) ship->yMomentum += 0.05f;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Applies the equally relentless force of friction to the ship.
|
||||||
|
*
|
||||||
|
* @param ship the ship in question
|
||||||
|
*/
|
||||||
|
void applyFriction(SHIP* ship) {
|
||||||
|
// Takes off a bit of the up/down speed.
|
||||||
|
if (ship->yMomentum > 0.0f)
|
||||||
|
ship->yMomentum -= 0.025f;
|
||||||
|
else
|
||||||
|
ship->yMomentum += 0.025f;
|
||||||
|
|
||||||
|
// Then does the same for the left/right speed.
|
||||||
|
if (ship->xMomentum > 0.0f)
|
||||||
|
ship->xMomentum -= 0.025f;
|
||||||
|
else
|
||||||
|
ship->xMomentum += 0.025f;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Moves the ship within the game world.
|
||||||
|
*
|
||||||
|
* @param ship the ship in question
|
||||||
|
* @param lASize the length of useful data in `landscapeArray`
|
||||||
|
* @param landscapeArray the array of coordinates for the components of the
|
||||||
|
* landscape
|
||||||
|
* @param sASize the length of useful data in `safeArray`
|
||||||
|
* @param safeArray the array of coordinates for the components of the
|
||||||
|
* landing pad(s)
|
||||||
|
*/
|
||||||
|
void moveShip(SHIP* ship, size_t lASize, unsigned int landscapeArray[],
|
||||||
|
size_t sASize, unsigned int safeArray[]) {
|
||||||
|
// Adds the ships momentum to its current location.
|
||||||
|
ship->xF += ship->xMomentum;
|
||||||
|
ship->yF += ship->yMomentum;
|
||||||
|
|
||||||
|
// Displays the momentum for the player.
|
||||||
|
mvprintw(1,1,"Momentum: %f,%f", ship->xMomentum, ship->yMomentum);
|
||||||
|
|
||||||
|
// Rounds the floating point coordinates to the nearest integer coords
|
||||||
|
signed int x = round(ship->xF);
|
||||||
|
signed int y = round(ship->yF);
|
||||||
|
// Gets the coordinates the ship used to be at.
|
||||||
|
signed int prevX = ship->lastx;
|
||||||
|
signed int prevY = ship->lasty;
|
||||||
|
|
||||||
|
// Deletes the ship from its old coordinates.
|
||||||
|
mvaddch(prevY, prevX, ' ');
|
||||||
|
|
||||||
|
mvprintw(11, 1, "%d, %d", safeArray[0], safeArray[1]);
|
||||||
|
mvprintw(12, 1, "%d, %d", safeArray[8], safeArray[9]);
|
||||||
|
mvprintw(13, 1, "%d, %d", safeArray[16], safeArray[17]);
|
||||||
|
mvprintw(15, 1, "%d, %d", x, y);
|
||||||
|
|
||||||
|
// Runs though the `landscapeArray` to see the the ship's new location
|
||||||
|
// means a collision with any landscape features.
|
||||||
|
for (size_t i = 0; i <= lASize; i++) {
|
||||||
|
if ((landscapeArray[i] == x) && (landscapeArray[++i] == y)) {
|
||||||
|
// If there is a collision, runs through the `safeArray` too see if
|
||||||
|
// the feature is a landing pad.
|
||||||
|
for (int j = 0; j <= sASize; j++) {
|
||||||
|
if ((safeArray[j] == x) && (safeArray[++j] == y)) {
|
||||||
|
// If it is a landing pad, and the user has invincibility turned
|
||||||
|
// on, lands the ship.
|
||||||
|
if (invincible) {
|
||||||
|
end = true;
|
||||||
|
endType = LAND;
|
||||||
|
} else {
|
||||||
|
// Else, if the player comes in sufficiently slowly, lands the
|
||||||
|
// ship.
|
||||||
|
if (ship->yMomentum <= 0.8f) {
|
||||||
|
end = true;
|
||||||
|
endType = LAND;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Otherwise, the player crashes and burns.
|
||||||
|
if (!end) {
|
||||||
|
end = true;
|
||||||
|
endType = CRASH;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Colours the ship in red if it's crashed.
|
||||||
|
if (endType == CRASH)
|
||||||
|
attron(COLOR_PAIR(2));
|
||||||
|
else if (endType == LAND)
|
||||||
|
attron(COLOR_PAIR(3));
|
||||||
|
// Draws the ship at its new coordinates.
|
||||||
|
mvaddch(y, x, ship->graphics.bod | A_BOLD);
|
||||||
|
if (endType == CRASH)
|
||||||
|
attroff(COLOR_PAIR(2));
|
||||||
|
else if (endType == LAND)
|
||||||
|
attroff(COLOR_PAIR(3));
|
||||||
|
|
||||||
|
// If the ship has exceeded the top of the screen, adds a small arrow
|
||||||
|
// to show the column the ship is in.
|
||||||
|
if (y < 0) {
|
||||||
|
for (int i = 0; i <= COLS; i++)
|
||||||
|
mvaddch(0, i, ' ');
|
||||||
|
mvaddch(0, x, '^' | A_BOLD);
|
||||||
|
attron(COLOR_PAIR(1));
|
||||||
|
mvprintw(0, 1, "Press F1 to exit");
|
||||||
|
attroff(COLOR_PAIR(1));
|
||||||
|
} else {
|
||||||
|
for (int i = 0; i <= COLS; i++)
|
||||||
|
mvaddch(0, i, ' ');
|
||||||
|
attron(COLOR_PAIR(1));
|
||||||
|
mvprintw(0, 1, "Press F1 to exit");
|
||||||
|
attroff(COLOR_PAIR(1));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Stores the new coordinates for comparison next time the function is run.
|
||||||
|
ship->lastx = x;
|
||||||
|
ship->lasty = y;
|
||||||
|
|
||||||
|
// Pushes the new ship to the terminal.
|
||||||
|
refresh();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Displays the lovely ASCII lunar lander I nicked.
|
||||||
|
*/
|
||||||
|
void displayIntro() {
|
||||||
|
clear();
|
||||||
|
// I assumed I would be able to fit all this in one line-broken `printw()`
|
||||||
|
// statement, but it didn't seem to want to play ball.
|
||||||
|
printw(" _ _ ____________.--. _____ ___ ___ ___\n");
|
||||||
|
printw(" |\\|_|//_.-\"\" .' \\ /| | | || || || |\n");
|
||||||
|
printw(" |.-\"\"\"-.| / \\_/ | | | | | || | || | || | |\n");
|
||||||
|
printw(" \\ || /| __\\_____________ | |_|_|_||___||___||_|_|\n");
|
||||||
|
printw(" _\\_||_/_| .-\"\" \"\"-. __ by rumps\n");
|
||||||
|
printw(" .' '. \\// \".\\/\n");
|
||||||
|
printw(" || '. >()_ |()< press 'a' to start\n");
|
||||||
|
printw(" ||__.-' |/\\ \\ |/\\\n");
|
||||||
|
printw(" | / \"| \\__________________/.\"\"\n");
|
||||||
|
printw(" / // | / \\ \"-.__________/ /\\\n");
|
||||||
|
printw(" ___|__/_|__|/___\\___\".______//__/__\\\n");
|
||||||
|
printw(" /|\\ [____________] \\__/ |\n");
|
||||||
|
printw(" //\\ \\ | |=====| | /\\\\ |\\\\\n");
|
||||||
|
printw(" // |\\ \\ | |=====| | | \\\\ | \\\\ ____...____..\n");
|
||||||
|
printw(" .//__| \\ \\ | |=====| | | |\\\\ |--\\\\---\"\"\"\" . \n");
|
||||||
|
printw("_____....-//___| \\_\\ | |=====| | |_|_\\\\ |___\\\\ . \n");
|
||||||
|
printw(" . .//-.__|_______|__|_____|_|_____[__\\\\_____|__.-\\\\ . . ...\n");
|
||||||
|
printw(" // // / \\ `-_\\\\/ \\\\ .....:::\n");
|
||||||
|
printw(" -... // . / / /____________\\ \\\\ . \\ \\ . \n");
|
||||||
|
printw(" // .. .-/_/-. . \\\\ .-\\_\\-. \n");
|
||||||
|
printw(" / / '-----' . \\ \\ '._____.' .\n");
|
||||||
|
printw(" .-/_/-. . .-\\_\\-. .\n");
|
||||||
|
printw(" '._____.' . '._____.' .....\n");
|
||||||
|
printw(" JRO ...... . .. (ASCII nicked from https://www.ascii.co.uk)\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Works out the player's score upon successful landing.
|
||||||
|
*
|
||||||
|
* The specification states "score is calculated using some heuristic based on
|
||||||
|
* time used and fuel remaining." Heuristic sounds fancy, and so is the method
|
||||||
|
* of working out the score.
|
||||||
|
*
|
||||||
|
* @param ship the ship in question
|
||||||
|
* @return the score
|
||||||
|
*/
|
||||||
|
double getScore(SHIP* ship, unsigned int time) {
|
||||||
|
unsigned int fuel = ship->fuel;
|
||||||
|
|
||||||
|
switch(rand() % 3) {
|
||||||
|
case 0:
|
||||||
|
return (double)(cos(fuel) * (time / 2));
|
||||||
|
case 1:
|
||||||
|
return (double)(sin(time * 2) - (time / 3) + fuel);
|
||||||
|
case 2:
|
||||||
|
return (double)(tan(tan(fuel + time)) + 2);
|
||||||
|
}
|
||||||
|
return rand() % 1000;
|
||||||
|
}
|
135
src/moonlander.h
Executable file
|
@ -0,0 +1,135 @@
|
||||||
|
#ifndef MOONLANDER_H_
|
||||||
|
#define MOONLANDER_H_
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* @author Ben Goldsworthy (rumps) <me+moonlander@bengoldworthy.net>
|
||||||
|
* @version 1.0
|
||||||
|
*
|
||||||
|
* @section LICENSE
|
||||||
|
*
|
||||||
|
* This file 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 file 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/>.
|
||||||
|
*
|
||||||
|
* @section DESCRIPTION
|
||||||
|
*
|
||||||
|
* Header file for `moonlander.c`.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdbool.h>
|
||||||
|
#include <ncurses.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <time.h>
|
||||||
|
#include <math.h>
|
||||||
|
|
||||||
|
// I almost think I should start looking into enums, rather than the
|
||||||
|
// world's lengthiest macro lists all the time.
|
||||||
|
// Macros for ship jet directions.
|
||||||
|
#define NONE 0
|
||||||
|
#define UP 1
|
||||||
|
#define RIGHT 2
|
||||||
|
#define DOWN 3
|
||||||
|
#define LEFT 4
|
||||||
|
|
||||||
|
// Macros for the components of the landscape.
|
||||||
|
#define LEFT_INCLINE 0
|
||||||
|
#define STRAIGHT_UP 1
|
||||||
|
#define STRAIGHT_DOWN 2
|
||||||
|
#define RIGHT_DECLINE 3
|
||||||
|
#define PLATEAU 4
|
||||||
|
|
||||||
|
// Macros for the type of game end.
|
||||||
|
#define NONE 0
|
||||||
|
#define CRASH 1
|
||||||
|
#define LAND 2
|
||||||
|
#define QUIT 3
|
||||||
|
|
||||||
|
// Macros for setting difficulty.
|
||||||
|
#define STARTING_FUEL 900
|
||||||
|
#define CHANCE_OF_LANDING_PAD 3
|
||||||
|
|
||||||
|
// Macros for the ship.
|
||||||
|
#define TERMINAL_VELOCITY 0.9f
|
||||||
|
|
||||||
|
// Global variables aren't the best, but I feel like I can
|
||||||
|
// get away with a few here; it saves so very much fannying
|
||||||
|
// around with pointers.
|
||||||
|
bool end = false;
|
||||||
|
unsigned int endType = NONE;
|
||||||
|
struct timespec_t s;
|
||||||
|
// Dirty cheat(s).
|
||||||
|
bool invincible = false;
|
||||||
|
|
||||||
|
// The bits and bobs that make up the landscape.
|
||||||
|
typedef struct _win_landscape_struct {
|
||||||
|
chtype li, su, sd, rd, pl;
|
||||||
|
}WIN_LANDSCAPE;
|
||||||
|
|
||||||
|
// The landscape 'class'
|
||||||
|
typedef struct _WIN_landscape_struct {
|
||||||
|
int startx, starty;
|
||||||
|
int height, width;
|
||||||
|
int landingPoints;
|
||||||
|
WIN_LANDSCAPE graphics;
|
||||||
|
}LANDSCAPE;
|
||||||
|
|
||||||
|
// Same again, but with the ship.
|
||||||
|
typedef struct _win_ship_struct {
|
||||||
|
chtype bod;
|
||||||
|
}WIN_SHIP;
|
||||||
|
|
||||||
|
// And the ship 'class'
|
||||||
|
typedef struct _WIN_ship_struct {
|
||||||
|
int startx, starty;
|
||||||
|
int lastx, lasty;
|
||||||
|
int fuel;
|
||||||
|
float xF, yF;
|
||||||
|
int x, y;
|
||||||
|
int height, width;
|
||||||
|
float xMomentum, yMomentum;
|
||||||
|
WIN_SHIP graphics;
|
||||||
|
}SHIP;
|
||||||
|
|
||||||
|
// I don't profess to know how `nanosleep()` works, but I nicked this
|
||||||
|
// off of SO and it seems to do the job, even if Geany gives me an
|
||||||
|
// 'implicit declaration' warning.
|
||||||
|
struct timespec_t {
|
||||||
|
time_t tv_sec; /* seconds */
|
||||||
|
long tv_nsec; /* nanoseconds */
|
||||||
|
};
|
||||||
|
|
||||||
|
// Initialisation functions.
|
||||||
|
void initialisencurses();
|
||||||
|
void initialiseShip(SHIP* ship);
|
||||||
|
void initialiseLandscape(LANDSCAPE* landscape);
|
||||||
|
|
||||||
|
// Creation functions.
|
||||||
|
void createShip(SHIP* ship);
|
||||||
|
bool createLandscape();
|
||||||
|
|
||||||
|
// Physics application functions.
|
||||||
|
void applyJet(SHIP* ship, unsigned int dir);
|
||||||
|
void applyGravity(SHIP* ship);
|
||||||
|
void applyFriction(SHIP* ship);
|
||||||
|
|
||||||
|
// Ship movement function. Includes collision detection.
|
||||||
|
void moveShip(SHIP* ship, size_t lASize, unsigned int landscapeArray[],
|
||||||
|
size_t sASize, unsigned int safeArray[]);
|
||||||
|
|
||||||
|
// Introduction display function.
|
||||||
|
void displayIntro();
|
||||||
|
|
||||||
|
// Arcane magic.
|
||||||
|
double getScore(SHIP* ship, unsigned int time);
|
||||||
|
|
||||||
|
#endif /* MOONLANDER_H_ */
|