Add Bone Quest anatomy quiz for CoCo
No files matched your search
@@ -0,0 +1,4 @@
|
||||
# Preserve the exact downloaded SVG bytes pinned by the source receipt.
|
||||
assets/skeleton-source.svg -text
|
||||
*.png binary
|
||||
*.DSK binary
|
||||
@@ -0,0 +1,19 @@
|
||||
build/
|
||||
obj/
|
||||
test-output/
|
||||
.release/
|
||||
__pycache__/
|
||||
*.pyc
|
||||
*.o
|
||||
*.bin
|
||||
*.d
|
||||
*.s
|
||||
*.lst
|
||||
*.map
|
||||
*.link
|
||||
*.dsk
|
||||
*.DSK
|
||||
!/BONEQ.DSK
|
||||
.DS_Store
|
||||
*.vccgrant
|
||||
*connection*.json
|
||||
@@ -0,0 +1,25 @@
|
||||
# Working on Bone Quest
|
||||
|
||||
Bone Quest is a separate CoCo 3 quiz based on Capital Quest. Read README.md and
|
||||
docs/IMPLEMENTATION.md. Current user instructions take precedence over historical
|
||||
briefs or reference documents. Keep Capital Quest and the VCC Plus/website repos
|
||||
unchanged while working here.
|
||||
|
||||
Target a 512 KB CoCo 3 using VCC Plus's documented CMOC/GIME APIs and page swapping.
|
||||
Use the existing relative Makefile/vccplus-project.json workflow. Ordinary builds
|
||||
must use the installed app's bundled tools, without asset-generation dependencies.
|
||||
Keep the original skeleton SVG, attribution, authored data, generated drawing C,
|
||||
necessary conversion scripts and component notices. Distinguish major bones and
|
||||
bone groups from a claim to quiz all206 individual bones.
|
||||
|
||||
Preserve users' media and documents. Test isolated disposable machines/disks,
|
||||
not the normal emulator. Pointer/keyboard desktop automation needs an idle-desktop
|
||||
grant; headless guest-key playtests do not control the desktop. Keep raw logs,
|
||||
private inputs and connection grants out of Git.
|
||||
|
||||
Use bounded independent agents when useful, with explicit file ownership and one
|
||||
integration owner. Avoid simultaneous builds into one output directory. Check
|
||||
source identity after asynchronous work. Run meaningful logic/geometry and actual
|
||||
guest play checks; report skips/limitations honestly and retain selected real
|
||||
screenshots. Keep work reviewable until a commit/push is authorized. Creating a
|
||||
repository does not authorize a public game release or a visibility change.
|
||||
@@ -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>.
|
||||
@@ -0,0 +1,47 @@
|
||||
# Built by VCC Plus using its bundled CMOC/6809 tools. No emulator source needed.
|
||||
CMOC ?= cmoc
|
||||
PERL ?= perl
|
||||
WRITECOCOFILE ?= writecocofile
|
||||
INSTALL_LOADER ?= install-coco-boot-loader
|
||||
VCC_CONFIGURATION ?= Release
|
||||
ifeq ($(VCC_CONFIGURATION),Debug)
|
||||
OPTIM = -O2 -fno-omit-frame-pointer
|
||||
else
|
||||
OPTIM = -O2
|
||||
endif
|
||||
ifeq ($(VCC_CONFIGURATION),Test)
|
||||
CPPFLAGS += -DTEST_SEED=2709
|
||||
endif
|
||||
CPPFLAGS += -I.
|
||||
CFLAGS = --coco --intermediate --stack-space=2048 $(OPTIM)
|
||||
SOURCES = main.c src/quiz.c src/ui.c src/bones.c src/map_data.c
|
||||
OBJECTS = $(SOURCES:%.c=obj/%.o)
|
||||
.PHONY: all build disk clean assets test
|
||||
all: disk
|
||||
build: build/BONEQ.bin
|
||||
disk: build/BONEQ.dsk
|
||||
build/BONEQ.bin: $(OBJECTS)
|
||||
@mkdir -p build
|
||||
"$(CMOC)" --coco --intermediate --org=2000 --limit=7800 -o $@ $(OBJECTS) -lgime -linput -lbcontrol -lhirestxt
|
||||
# Explicit project headers avoid CMOC .d paths to expired VCC build snapshots.
|
||||
obj/%.o: %.c quiz.h ui.h map_data.h Makefile
|
||||
@mkdir -p $(dir $@)
|
||||
"$(CMOC)" $(CPPFLAGS) $(CFLAGS) --intdir=$(dir $@) -c -o $@ $<
|
||||
obj/boot.bin: tools/boot.c Makefile
|
||||
@mkdir -p obj
|
||||
"$(CMOC)" --dos -O0 --limit=2800 -o $@ $<
|
||||
build/BONEQ.dsk: build/BONEQ.bin obj/boot.bin
|
||||
$(PERL) -e 'print chr(255) x (35*18*256)' > $@
|
||||
"$(INSTALL_LOADER)" $@ obj/boot.bin
|
||||
"$(WRITECOCOFILE)" $@ build/BONEQ.bin
|
||||
assets:
|
||||
python3 tools/prepare_questions.py
|
||||
python3 tools/prepare_assets.py
|
||||
test:
|
||||
@set -e; quiz_test_dir=$$(mktemp -d "$${TMPDIR:-/tmp}/bone-quest-host.XXXXXX"); \
|
||||
trap 'rm -rf "$$quiz_test_dir"' EXIT HUP INT TERM; \
|
||||
cc -std=c99 -Wall -Wextra -Werror -DHOST_TEST -I. tests/test_quiz.c src/quiz.c src/bones.c -o "$$quiz_test_dir/test_quiz"; \
|
||||
"$$quiz_test_dir/test_quiz"
|
||||
python3 tests/check_assets.py
|
||||
clean:
|
||||
rm -rf obj build
|
||||
@@ -0,0 +1,76 @@
|
||||
# Bone Quest for CoCo
|
||||
|
||||
An anatomy quiz for a 512 KB Color Computer 3, built from Capital Quest's working
|
||||
quiz foundation. Identify 25 major bones and bone groups on a human skeleton,
|
||||
choose among four names or type the answer, then review missed questions.
|
||||
|
||||
Download the ready-to-test [BONEQ.DSK](BONEQ.DSK). Both complete quiz modes have
|
||||
been checked in VCC Plus on emulated MC6809 and HD6309 processors.
|
||||
|
||||

|
||||
|
||||
## Machine and loading
|
||||
|
||||
Use a CoCo 3 with 512 KB RAM, BASIC, an FD-502 Disk BASIC controller and a keyboard.
|
||||
RGB is the intended color presentation. Insert a copy of BONEQ.DSK in FD0,
|
||||
preserve existing guest work, choose Cold Restart, then type DOS at the OK prompt.
|
||||
The direct loading command is `LOADM"BONEQ.BIN":EXEC`. The game does not save scores
|
||||
or write to its disk. Use disposable copies while developing.
|
||||
|
||||
## Controls and rules
|
||||
|
||||
- Title: 1 multiple choice, 2 typed answers, C credits, Q quit to BASIC.
|
||||
- Multiple choice: 1–4 selects an answer. The correct slot is chosen randomly from
|
||||
the three that were not correct last time; the first question can use any slot.
|
||||
Feedback advances automatically after its sound and reading pause.
|
||||
- Typed answers: Enter submits, Backspace edits, Esc/CoCo Break reveals, Space advances
|
||||
after feedback. Case and extra spaces are ignored. Common names such as
|
||||
collarbone, shoulder blade, thighbone, kneecap, shinbone and tailbone are accepted.
|
||||
A close spelling offers R to retry or V to reveal; a corrected answer earns
|
||||
one point, with corrections counted separately. The entry limit is 33 characters.
|
||||
- Progress: teal unanswered, purple correct, red missed, yellow current. The full
|
||||
skeleton keeps context while a detail panel enlarges the selected area.
|
||||
- Results: R review, N next review page, B back, P play again, Q quit. Each topic is
|
||||
asked once. One correct answer earns one point; percentage is correct/25×100.
|
||||
|
||||
The quiz covers 25 named major bones/groups shown by the supplied anterior-view
|
||||
illustration, not every individual bone in an adult skeleton. Paired left/right
|
||||
counterparts share a question. Finger and toe phalanges are separate topics;
|
||||
bare "phalanges" is deliberately not a complete answer. See docs/ANATOMY.md.
|
||||
|
||||
## Build
|
||||
|
||||
Open the folder containing Makefile and vccplus-project.json in VCC Plus's
|
||||
Develop → C Development workspace. Select Release and Build, then use Show Build
|
||||
Products to locate build/BONEQ.dsk. Normal builds use the installed app's bundled
|
||||
CMOC/LWTools/Make/Perl and need no Xcode, Homebrew or asset-generation tools.
|
||||
|
||||
Equivalent command-line build:
|
||||
|
||||
```sh
|
||||
export PATH="/Applications/VCC Plus.app/Contents/Resources/Toolchain/bin:$PATH"
|
||||
make VCC_CONFIGURATION=Release disk
|
||||
```
|
||||
|
||||
Debug uses optimized code with frame pointers; Test uses deterministic seed 2709.
|
||||
Clean between configurations in one working folder. Generated anatomy/drawing C
|
||||
is retained for normal builds. Optional asset regeneration needs Python 3, Pillow
|
||||
and rsvg-convert; optional host logic tests need a host C compiler.
|
||||
After editing data/bones.json or the skeleton artwork, run make assets to refresh
|
||||
the retained C tables. make test detects stale question data and invalid geometry.
|
||||
|
||||
## Credits and source
|
||||
|
||||
Based on Capital Quest by Brian Holman, revision
|
||||
[afa6f3c](https://vccplus-git.brianholman.com/VCCPlusApps/CoCoCapitalQuiz/commit/afa6f3c2a05cbd71c1f22ec3506f4f63421b2bc6),
|
||||
GPL-3.0-or-later. Bone Quest is a separate project; Capital Quest is unchanged.
|
||||
|
||||
Skeleton artwork: Mariana Ruiz Villarreal (LadyofHats), author's public-domain
|
||||
release via Wikimedia Commons. The original SVG and source receipt are retained.
|
||||
Adaptations remove labels, reduce resolution, recolor and encode per-topic masks
|
||||
and selected detail views. See assets/CREDITS.md and docs/ANATOMY.md.
|
||||
|
||||
The game remains GPL-3.0-or-later; preserve the full LICENSE and component notices.
|
||||
Pierre Sarrazin's font and boot helper keep their public-domain headers. The
|
||||
bundled libraries retain their individual terms, including the original BControl
|
||||
notice. No ROM image or private connection is included here.
|
||||
@@ -0,0 +1,156 @@
|
||||
bcontrol 0.1.6
|
||||
|
||||
Public domain (upstream dedication)
|
||||
|
||||
|
||||
--- Joystick.h ---
|
||||
/* Joystick.h - Autonomous joystick functions for the CoCo.
|
||||
By Pierre Sarrazin <http://sarrazip.com/>
|
||||
This file is in the public domain.
|
||||
*/
|
||||
|
||||
--- Joystick_private.h ---
|
||||
/* Joystick_private.h
|
||||
By Pierre Sarrazin <http://sarrazip.com/>
|
||||
This file is in the public domain.
|
||||
*/
|
||||
|
||||
--- Keyboard.c ---
|
||||
/* keyin.c - Autonomous keyboard functions for the CoCo.
|
||||
By Pierre Sarrazin <http://sarrazip.com/>
|
||||
This file is in the public domain, except the parts that come from Color Basic.
|
||||
*/
|
||||
|
||||
--- Keyboard.h ---
|
||||
/* Keyboard.h - Autonomous keyboard functions for the CoCo.
|
||||
By Pierre Sarrazin <http://sarrazip.com/>
|
||||
This file is in the public domain.
|
||||
*/
|
||||
|
||||
--- README.md ---
|
||||
BControl
|
||||
========
|
||||
|
||||
By Pierre Sarrazin <http://sarrazip.com/>.
|
||||
|
||||
This library is in the public domain, except the parts of Keyboard.c
|
||||
that come from Color Basic.
|
||||
|
||||
This library offers functions similar to Color Basic's INKEY$,
|
||||
JOYSTK and BUTTON. It does not assume the presence of the Color
|
||||
Basic interpreter.
|
||||
|
||||
|
||||
# Usage
|
||||
|
||||
To use the Keyboard object, instante an instance, then call
|
||||
`Keyboard_init()` on it. Then call `Keyboard_poll()` the same way
|
||||
one would call INKEY$ in a Basic program. Call `Keyboard_shutdown()`
|
||||
when finished with the Keyboard object.
|
||||
|
||||
To read the joystick axis values and button states on a CoCo or
|
||||
Dragon, call `Joystick_getAxisValues()` and `Joystick_getButtonStates()`.
|
||||
No initialization step is needed.
|
||||
|
||||
However, to help the portability to OS-9 of a program that uses
|
||||
the joystick, `Joystick_getAxisValuesAndButtonState()` should be used
|
||||
instead of the other functions of Joystick.h.
|
||||
|
||||
See Keyboard.h and Joystick.h for details.
|
||||
|
||||
|
||||
# Dragon support
|
||||
|
||||
To compile for the Dragon, pass TARGET=dragon to make.
|
||||
|
||||
|
||||
# OS-9 support
|
||||
|
||||
To compile for OS-9, pass TARGET=OS9 to make.
|
||||
|
||||
|
||||
# Version history
|
||||
|
||||
0.1.0 2018-11-25 First public release.
|
||||
0.1.1 2019-06-03 Partial support for OS-9 added:
|
||||
setScreenBuffer() not supported.
|
||||
Removed the (non portable) startInCapsLock parameter
|
||||
from `Keyboard_init()`.
|
||||
0.1.2 2019-09-21 Added missing OS9RawTerminal.h.
|
||||
0.1.3 2020-06-27 Added `Joystick_selectAnalogMuxInputs()` and
|
||||
`Joystick_compareAxis()`, which allow custom, faster
|
||||
axis polling (but is not usable under OS-9).
|
||||
0.1.4 2022-11-12 Fixed the Dragon executable extension in the makefile.
|
||||
Added `Joystick_getAxisValuesAndButtonState()`, which
|
||||
targets a single joystick and also works under OS-9.
|
||||
Include "Joystick.h" to use it.
|
||||
0.1.5 2024-08-29 Joystick comparator read routine slightly optimized
|
||||
with inline asm. (Not applicable to OS-9 version.)
|
||||
Centralized some function prototypes.
|
||||
Removed UTF-8 characters from Keyboard.c.
|
||||
0.1.6 2026-09-06 Added Joystick_getButtonStates2().
|
||||
Optimized Joystick_selectAnalogMuxInputs().
|
||||
Optimized Joystick_compareAxis().
|
||||
|
||||
--- bcontrol.c ---
|
||||
/* bcontrol.c - Test and demo program.
|
||||
By Pierre Sarrazin <http://sarrazip.com/>
|
||||
This file is in the public domain.
|
||||
*/
|
||||
|
||||
--- compareAxis.c ---
|
||||
/* compareAxis.c - Autonomous joystick functions for the CoCo.
|
||||
By Pierre Sarrazin <http://sarrazip.com/>
|
||||
This file is in the public domain.
|
||||
*/
|
||||
|
||||
--- disableSound.c ---
|
||||
/* disableSound.c
|
||||
By Pierre Sarrazin <http://sarrazip.com/>
|
||||
This file is in the public domain.
|
||||
*/
|
||||
|
||||
--- enableSound.c ---
|
||||
/* enableSound.c
|
||||
By Pierre Sarrazin <http://sarrazip.com/>
|
||||
This file is in the public domain.
|
||||
*/
|
||||
|
||||
--- getAxisValues.c ---
|
||||
/* getAxisValues.c
|
||||
By Pierre Sarrazin <http://sarrazip.com/>
|
||||
This file is in the public domain.
|
||||
|
||||
The current implementation is based on Color Basic's.
|
||||
Improvements are welcome.
|
||||
*/
|
||||
|
||||
--- getAxisValuesAndButtonState.c ---
|
||||
/* getAxisValuesAndButtonState.c - Autonomous joystick functions for the CoCo.
|
||||
By Pierre Sarrazin <http://sarrazip.com/>
|
||||
This file is in the public domain.
|
||||
*/
|
||||
|
||||
--- getButtonStates.c ---
|
||||
/* getButtonStates.c
|
||||
By Pierre Sarrazin <http://sarrazip.com/>
|
||||
This file is in the public domain.
|
||||
*/
|
||||
|
||||
--- getButtonStates2.c ---
|
||||
/* getButtonStates2.c
|
||||
By Pierre Sarrazin <http://sarrazip.com/>
|
||||
This file is in the public domain.
|
||||
*/
|
||||
|
||||
--- readComparatorMultipleTries.c ---
|
||||
/* readComparatorMultipleTries.c - Autonomous joystick functions for the CoCo.
|
||||
By Pierre Sarrazin <http://sarrazip.com/>
|
||||
This file is in the public domain.
|
||||
*/
|
||||
|
||||
--- selectAnalogMuxInputs.c ---
|
||||
/* selectAnalogMuxInputs.c
|
||||
By Pierre Sarrazin <http://sarrazip.com/>
|
||||
This file is in the public domain.
|
||||
*/
|
||||
@@ -0,0 +1,30 @@
|
||||
# Bone Quest artwork and component credits
|
||||
|
||||
## Human skeleton
|
||||
|
||||
Original: **Human skeleton front en.svg**, by **Mariana Ruiz Villarreal
|
||||
(LadyofHats)**, released into the public domain by its author.
|
||||
|
||||
- Description/terms: https://commons.wikimedia.org/wiki/File: Human_skeleton_front_en.svg
|
||||
- Original SVG: https://upload.wikimedia.org/wikipedia/commons/c/ca/Human_skeleton_front_en.svg
|
||||
- Retained source: skeleton-source.svg; exact download hash: source-receipt.json.
|
||||
|
||||
The author grants use for any purpose where a public-domain dedication is not
|
||||
legally possible. Original metadata remains in the retained SVG. Adaptations for
|
||||
Bone Quest remove the printed labels and leader lines, reduce resolution,
|
||||
recolor the drawing and encode selected bone/group masks and detail views.
|
||||
This is an educational front-view diagram; grouped and paired bones are not
|
||||
individually counted questions. No endorsement by the artist is implied.
|
||||
|
||||
## Game foundation and runtime
|
||||
|
||||
Bone Quest uses the GPL-3.0-or-later Capital Quest foundation by Brian Holman,
|
||||
revision afa6f3c2a05cbd71c1f22ec3506f4f63421b2bc6:
|
||||
https://vccplus-git.brianholman.com/VCCPlusApps/CoCoCapitalQuiz
|
||||
The state/capital dataset and Fla-shop map artwork are not included in Bone Quest.
|
||||
|
||||
Pierre Sarrazin's font5x8 is public domain, from HiresTxt. The disk loader adapts
|
||||
his public-domain autostart.c 0.1.2 to load BONEQ.BIN; its original header remains.
|
||||
CMOC, LWTools, GIME and keyboard libraries retain their original authorship and
|
||||
file-specific terms. Preserve BCONTROL-NOTICE.txt, HIRESTXT-NOTICE.txt and
|
||||
VCC-Guest-SDK-NOTICE.txt; the game's GPL does not replace those component notices.
|
||||
@@ -0,0 +1,562 @@
|
||||
hirestxt 0.5.1
|
||||
|
||||
Public domain (upstream dedication)
|
||||
|
||||
|
||||
--- README.md ---
|
||||
hirestxt
|
||||
========
|
||||
|
||||
By Pierre Sarrazin <http://sarrazip.com/>
|
||||
|
||||
This library is in the public domain.
|
||||
|
||||
It implements a software 51x24 or 42x24 black-on-green PMODE 4 text
|
||||
screen (256x192x2), or a 64x24 16-color text screen in the CoCo 3's
|
||||
320x200x16 graphics mode. It redirects printf() to that screen.
|
||||
|
||||
Useful to get true lowercase, including Latin-1 accented characters,
|
||||
on all CoCos, on the Dragon, and on NitrOS-9.
|
||||
|
||||
Optionally supports several VT52 terminal sequences.
|
||||
|
||||
A sample program is included. See the *Demo* section in this file.
|
||||
|
||||
This library is intended to be compiled by CMOC.
|
||||
|
||||
See the [CMOC home page](http://sarrazip.com/dev/cmoc.html).
|
||||
|
||||
|
||||
## Setup
|
||||
|
||||
The instructions apply when targetting the Color Basic environment.
|
||||
|
||||
Do the following to initialize the 51x24 text screen at $0E00 on a CoCo
|
||||
or Dragon.
|
||||
|
||||
Put this directive somewhere at the beginning of the C file in question:
|
||||
|
||||
#include "hirestxt.h"
|
||||
|
||||
Then set up PMODE 4 green/black graphics, like this:
|
||||
|
||||
width(32); /* PMODE graphics will only appear from 32x16 (does nothing on CoCo 1&2) */
|
||||
pmode(4, (byte *) 0x0E00);
|
||||
pcls(255);
|
||||
screen(1, 0); /* green/black */
|
||||
|
||||
Then define a `HiResTextScreenInit` object:
|
||||
|
||||
struct HiResTextScreenInit init =
|
||||
{
|
||||
51, /* characters per row */
|
||||
writeCharAt_51cols, /* must be consistent with previous field */
|
||||
0x0E00,
|
||||
TRUE /* redirects printf() to the 51x24 text screen */
|
||||
(word *) 0x112, /* pointer to a 60 Hz async counter (Color Basic's TIMER) */
|
||||
0, /* default cursor blinking rate */
|
||||
NULL, /* use inkey(), i.e., Color Basic's INKEY$ */
|
||||
NULL, /* no sound on '\a' */
|
||||
};
|
||||
|
||||
Then call `initHiResTextScreen()` with the address of this object:
|
||||
|
||||
initHiResTextScreen(&init);
|
||||
|
||||
To use the 42x24 mode, replace 51 and `writeCharAt_51cols` with 42 and
|
||||
`writeCharAt_42cols`.
|
||||
|
||||
Optionally, to get the screen address from Basic instead of assuming
|
||||
$0E00, use this expression in the `HiResTextScreenInit` struct initializer:
|
||||
|
||||
(byte *) * (byte *) 0x00BC << 8
|
||||
|
||||
Then, see hirestxt.h for the available functions.
|
||||
|
||||
To compile with this library, pass `-I <dir>` to cmoc, where `<dir>` is
|
||||
the directory where hirestxt.h is.
|
||||
|
||||
To link with this library, specify `-L <dir> -lhirestxt` to the cmoc
|
||||
invocation that does the linking. This specifies where the libhirestxt.a
|
||||
file can be found.
|
||||
|
||||
|
||||
## Demo
|
||||
|
||||
The demo is compiled as `hirestxt.bin` for the CoCo and Dragon Basic
|
||||
environments, and `hirestxt` for OS-9.
|
||||
|
||||
Under OS-9, the demo must be executed from a 32x16 terminal.
|
||||
|
||||
|
||||
## Dragon support
|
||||
|
||||
To compile for the Dragon, pass `TARGET=dragon` to make.
|
||||
|
||||
|
||||
## OS-9 support
|
||||
|
||||
To compile for OS-9, pass `TARGET=os9` to make.
|
||||
|
||||
This generates a demo in an OS-9 executable named `hirestxt`. Use the
|
||||
[ToolShed](https://sourceforge.net/projects/toolshed/) `os9` command
|
||||
to transfer this executable to an OS-9 virtual hard-disk (for example)
|
||||
and to give it the execution attributes:
|
||||
|
||||
os9 copy -r hirestxt the-disk.vhd,/CMDS/
|
||||
os9 attr -epe the-disk.vhd,/CMDS/hirestxt
|
||||
|
||||
Under OS-9, the demo must be executed from a 32x16 terminal.
|
||||
|
||||
This has been tested with [NitrOS-9](http://www.nitros9.org/battle.html)
|
||||
EOU 1.0.1 and [CMOC](http://sarrazip.com/dev/cmoc.html) 0.1.89.
|
||||
The /nil driver must be present.
|
||||
|
||||
|
||||
## VT52 Support
|
||||
|
||||
A subset of [VT52](https://en.wikipedia.org/wiki/VT52) terminal sequences
|
||||
are supported by the code in function processConsoleOutChar() of
|
||||
processConsoleOutChar.c.
|
||||
|
||||
If this support is not needed, the code for it can be omitted by compiling
|
||||
the library with HIRESTEXT_NO_VT52.
|
||||
|
||||
|
||||
## License
|
||||
|
||||
This library is in the public domain.
|
||||
|
||||
|
||||
## Version history
|
||||
|
||||
0.1.0 - 2016-05-01 - First public release.
|
||||
0.1.1 - 2016-09-12 - Adapted to CMOC 0.1.31 re: inline asm.
|
||||
0.1.2 - 2016-12-26 - HIRESTEXT_NO_VT52 to avoid VT52 code.
|
||||
0.2.0 - 2017-12-01 - Adapted to modular compilation under CMOC 0.1.43.
|
||||
0.2.1 - 2018-04-03 - Adapted to modular compilation under CMOC 0.1.51.
|
||||
0.3.0 - 2018-09-20 - Added 42x24 text screen and 5x8 font.
|
||||
Adapted to CMOC 0.1.53.
|
||||
0.3.1 - 2018-11-25 - Fixed linking error re: putBitmaskInScreenWord() in 42x24 mode.
|
||||
Now compilable for the Dragon (make TARGET=dragon).
|
||||
0.4.0 - 2023-08-19 - initHiResTextScreen() and closeHiResTextScreen() do not change the
|
||||
screen mode themselves anymore -- see the next section.
|
||||
The HiResTextScreenInit struct must now receive a pointer
|
||||
to a timer word.
|
||||
It may also receive a pointer to an inkey-like function.
|
||||
Replaced textScreenPageNum in struct HiResTextScreenInit with
|
||||
the textScreenBuffer field, which removes a dependency on the SAM chip --
|
||||
see the next section.
|
||||
Stopped exporting the global textScreenBuffer variable.
|
||||
Removed the setTextScreenAddress() function.
|
||||
Fixed typo in the name of the internal oldCHROUT global variable.
|
||||
Merged all library code into a single .a file.
|
||||
Most functions are now in their own file, to optimize the final executable size.
|
||||
Most global variables are now fields of a single global struct instance.
|
||||
Now usable under OS-9 (assumes that the /nil driver is installed).
|
||||
Slightly optimized character writing routine.
|
||||
0.4.1 - 2023-09-02 - Added setInverseVideoMode() and setBoldMode() which allow writing
|
||||
characters in inverted colors and/or in bold.
|
||||
Added support for VT52 sequences <ESC> p and <ESC> q to turn inverse
|
||||
video on of off, and <ESC> E to home the cursor and clear the screen.
|
||||
0.4.2 - 2024-11-28 - Added showOS9PMode4Screen(), quitOS9Graphics(), OS9Timer_init(),
|
||||
OS9Timer_shutdown() and OS9Timer_getTimerAddress() under OS-9.
|
||||
Fixed a bug in the demo where the column of letters was displayed
|
||||
too slowly.
|
||||
0.5.0 - 2025-03-14 - Added support for writing to a 64x24 text screen on a CoCo 3 320x192x16
|
||||
graphics screen. See initHiResTextScreen2(), setForegroundColor() et al.
|
||||
hirestxt-demo.c gives an example.
|
||||
The screen is now cleared from top to bottom instead of bottom up.
|
||||
The demo now plays an audible bell character.
|
||||
0.5.1 - 2025-09-27 - Removed UTF-8 non-breaking space character from hirestxt-demo.c and
|
||||
hirestxt.h, to resolve a compilation issue with GCC 14.2.0.
|
||||
|
||||
|
||||
## Using version 0.5.x
|
||||
|
||||
Version 0.5.0 introduced support for a 64x24 text mode in the CoCo 3 320x192x16 graphics mode.
|
||||
This text mode is slower than using the CoCo 3's hardware 40- or 80-column text screens, but it
|
||||
allows:
|
||||
|
||||
* using the same hirestxt-based code to display text on a CoCo 1, 2 or 3, on a Dragon, or
|
||||
on NitrOS-9;
|
||||
* mixing text and graphics on the same screen, using a narrower font than the byte-aligned
|
||||
font used by Basic's HPRINT command.
|
||||
|
||||
The hirestxt-demo.c program shows examples of how to use both the CoCo 3 64x24 mode and the
|
||||
original 51x24 and 42x24 modes on a 256x192x2 (PMODE 4) screen.
|
||||
|
||||
|
||||
## Adapting to version 0.4.x
|
||||
|
||||
The instructions apply when targetting the Color Basic environment.
|
||||
|
||||
- Where the `HiResTextScreenInit` is initialized, add these values:
|
||||
|
||||
- A value for the `timer` field, which must be the address of a 16-bit word that
|
||||
gets incremented 60 times per second.
|
||||
|
||||
- A zero for the `cursorAnimationLowTimerByteMask` field.
|
||||
|
||||
- A NULL value for the `inkeyFuncPtr` field, to have the library use `inkey()`,
|
||||
as before, to poll the keyboard.
|
||||
|
||||
- A NULL value for the `bellFuncPtr` field, to have a call to Color Basic's
|
||||
SOUND 1,1, as before, when character 7 is sent to the screen.
|
||||
|
||||
- Execute this code before calling `initHiResTextScreen()`:
|
||||
|
||||
initCoCoSupport();
|
||||
width(32);
|
||||
pmode(4, A);
|
||||
pcls(255);
|
||||
screen(1, 0);
|
||||
|
||||
Replace `A` with the address put in the `textScreenBuffer` field of struct
|
||||
`HiResTextScreenInit`.
|
||||
|
||||
To use the current address where ECB would draw PMODE 4 graphics, use this
|
||||
expression: `(byte *) * (byte *) 0x00BC << 8`
|
||||
|
||||
(This takes $BC, sees it as a byte pointer, gets that byte, sees it as a
|
||||
16-bit address, then shifts this address 8 bits left, to form the actual
|
||||
address of the screen buffer.)
|
||||
|
||||
Under other platforms, execute platform-specific code to set up a 256x192
|
||||
green/black 2-color graphics mode, then put its buffer address in
|
||||
`textScreenBuffer`.
|
||||
|
||||
- Execute this code after calling `closeHiResTextScreen()`:
|
||||
|
||||
pmode(0, 0);
|
||||
cls(255);
|
||||
screen(0, 0);
|
||||
|
||||
- If the program was using the `textScreenBuffer` global variable, it
|
||||
should now stop using it and use the address that it puts in the
|
||||
`textScreenBuffer` field of `HiResTextScreenInit` instead.
|
||||
|
||||
- Similarly, the `hiResWidth` global variable has been replaced with
|
||||
the `numColumns` field of `HiResTextScreenInit`.
|
||||
|
||||
- The `textPosX` and `textPosY` global variables have been removed from
|
||||
the public interface. Functions `getCursorColumn()` and `getCursorRow()`
|
||||
have been added. The cursor can be moved with `moveCursor()`.
|
||||
|
||||
|
||||
--- animateCursor.c ---
|
||||
/* animateCursor.c
|
||||
|
||||
By Pierre Sarrazin <http://sarrazip.com/>
|
||||
This file is in the public domain.
|
||||
*/
|
||||
|
||||
--- clear.c ---
|
||||
/* clear.c
|
||||
|
||||
By Pierre Sarrazin <http://sarrazip.com/>
|
||||
This file is in the public domain.
|
||||
*/
|
||||
|
||||
--- clearRowsToEOS.c ---
|
||||
/* clearRowsToEOS.c
|
||||
|
||||
By Pierre Sarrazin <http://sarrazip.com/>
|
||||
This file is in the public domain.
|
||||
*/
|
||||
|
||||
--- closeHiResTextScreen.c ---
|
||||
/* closeHiResTextScreen.c
|
||||
|
||||
By Pierre Sarrazin <http://sarrazip.com/>
|
||||
This file is in the public domain.
|
||||
*/
|
||||
|
||||
--- clrscr.c ---
|
||||
/* clrscr.c
|
||||
|
||||
By Pierre Sarrazin <http://sarrazip.com/>
|
||||
This file is in the public domain.
|
||||
*/
|
||||
|
||||
--- clrtobot.c ---
|
||||
/* clrtobot.c
|
||||
|
||||
By Pierre Sarrazin <http://sarrazip.com/>
|
||||
This file is in the public domain.
|
||||
*/
|
||||
|
||||
--- clrtoeol.c ---
|
||||
/* clrtoeol.c
|
||||
|
||||
By Pierre Sarrazin <http://sarrazip.com/>
|
||||
This file is in the public domain.
|
||||
*/
|
||||
|
||||
--- fillNybbles.c ---
|
||||
/* initHiResTextScreen2.c
|
||||
|
||||
By Pierre Sarrazin <http://sarrazip.com/>
|
||||
This file is in the public domain.
|
||||
*/
|
||||
|
||||
--- font4x8.c ---
|
||||
/* font4x8.c - ISO-8859-1 font for a 51x24 software text screen.
|
||||
|
||||
By Pierre Sarrazin <http://sarrazip.com/>
|
||||
This file is in the public domain.
|
||||
*/
|
||||
|
||||
--- font4x8.h ---
|
||||
/* font4x8.h - ISO-8859-1 font for a 51x24 software text screen.
|
||||
|
||||
By Pierre Sarrazin <http://sarrazip.com/>
|
||||
This file is in the public domain.
|
||||
*/
|
||||
|
||||
--- font5x8.c ---
|
||||
/* font5x8.c - ISO-8859-1 font for a 42x24 software text screen.
|
||||
|
||||
By Pierre Sarrazin <http://sarrazip.com/>
|
||||
This file is in the public domain.
|
||||
*/
|
||||
|
||||
--- font5x8.h ---
|
||||
/* font5x8.h - ISO-8859-1 font for a 42x24 software text screen.
|
||||
|
||||
By Pierre Sarrazin <http://sarrazip.com/>
|
||||
This file is in the public domain.
|
||||
*/
|
||||
|
||||
--- getCursorColumn.c ---
|
||||
/* getCursorColumn.c
|
||||
|
||||
By Pierre Sarrazin <http://sarrazip.com/>
|
||||
This file is in the public domain.
|
||||
*/
|
||||
|
||||
--- getCursorRow.c ---
|
||||
/* getCursorRow.c
|
||||
|
||||
By Pierre Sarrazin <http://sarrazip.com/>
|
||||
This file is in the public domain.
|
||||
*/
|
||||
|
||||
--- hirestxt-demo.c ---
|
||||
/* hirestxt-demo.c - Example program that uses hirestxt.h.
|
||||
|
||||
By Pierre Sarrazin <http://sarrazip.com/>
|
||||
This file is in the public domain.
|
||||
|
||||
This demo uses VT52 sequences.
|
||||
The library must NOT have been compiled with HIRESTEXT_NO_VT52.
|
||||
*/
|
||||
|
||||
--- hirestxt.h ---
|
||||
/* hirestxt.h - 51x24 black-on-green PMODE 4 text screen.
|
||||
|
||||
By Pierre Sarrazin <http://sarrazip.com/>
|
||||
This file is in the public domain.
|
||||
|
||||
Quick Guide:
|
||||
- Call initHiResTextScreen() first.
|
||||
- End with a call to closeHiResTextScreen().
|
||||
- #define HIRESTEXT_NO_VT52 to avoid compiling the VT52 code.
|
||||
*/
|
||||
|
||||
--- hirestxt_private.h ---
|
||||
/* hirestxt_private.h - 51x24 black-on-green PMODE 4 text screen.
|
||||
|
||||
By Pierre Sarrazin <http://sarrazip.com/>
|
||||
This file is in the public domain.
|
||||
|
||||
*/
|
||||
|
||||
--- init.c ---
|
||||
/* init.c
|
||||
|
||||
By Pierre Sarrazin <http://sarrazip.com/>
|
||||
This file is in the public domain.
|
||||
*/
|
||||
|
||||
--- initHiResTextScreen.c ---
|
||||
/* initHiResTextScreen.c
|
||||
|
||||
By Pierre Sarrazin <http://sarrazip.com/>
|
||||
This file is in the public domain.
|
||||
*/
|
||||
|
||||
--- initHiResTextScreen2.c ---
|
||||
/* initHiResTextScreen2.c
|
||||
|
||||
By Pierre Sarrazin <http://sarrazip.com/>
|
||||
This file is in the public domain.
|
||||
*/
|
||||
|
||||
--- initVT52.c ---
|
||||
/* initVT52.c
|
||||
|
||||
By Pierre Sarrazin <http://sarrazip.com/>
|
||||
This file is in the public domain.
|
||||
*/
|
||||
|
||||
--- invertPixelsAtCursor.c ---
|
||||
/* invertPixelsAtCursor.c
|
||||
|
||||
By Pierre Sarrazin <http://sarrazip.com/>
|
||||
This file is in the public domain.
|
||||
*/
|
||||
|
||||
--- moveCursor.c ---
|
||||
/* moveCursor.c
|
||||
|
||||
By Pierre Sarrazin <http://sarrazip.com/>
|
||||
This file is in the public domain.
|
||||
*/
|
||||
|
||||
--- os9timer.c ---
|
||||
/* os9timer.c
|
||||
|
||||
By Pierre Sarrazin <http://sarrazip.com/>
|
||||
This file is in the public domain.
|
||||
*/
|
||||
|
||||
--- processConsoleOutChar.c ---
|
||||
/* processConsoleOutChar.c
|
||||
|
||||
By Pierre Sarrazin <http://sarrazip.com/>
|
||||
This file is in the public domain.
|
||||
*/
|
||||
|
||||
--- putBitmaskInScreenWord.c ---
|
||||
/* putBitmaskInScreenWord.c
|
||||
|
||||
By Pierre Sarrazin <http://sarrazip.com/>
|
||||
This file is in the public domain.
|
||||
*/
|
||||
|
||||
--- quitOS9Graphics.c ---
|
||||
/* quitOS9Graphics.c
|
||||
|
||||
By Pierre Sarrazin <http://sarrazip.com/>
|
||||
This file is in the public domain.
|
||||
*/
|
||||
|
||||
--- removeCursor.c ---
|
||||
/* removeCursor.c
|
||||
|
||||
By Pierre Sarrazin <http://sarrazip.com/>
|
||||
This file is in the public domain.
|
||||
*/
|
||||
|
||||
--- scrollTextScreenUp.c ---
|
||||
/* scrollTextScreenUp.c
|
||||
|
||||
By Pierre Sarrazin <http://sarrazip.com/>
|
||||
This file is in the public domain.
|
||||
*/
|
||||
|
||||
--- setBackgroundColor.c ---
|
||||
/* setBackgroundColor.c
|
||||
|
||||
By Pierre Sarrazin <http://sarrazip.com/>
|
||||
This file is in the public domain.
|
||||
*/
|
||||
|
||||
--- setBoldMode.c ---
|
||||
/* setBoldMode.c
|
||||
|
||||
By Pierre Sarrazin <http://sarrazip.com/>
|
||||
This file is in the public domain.
|
||||
*/
|
||||
|
||||
--- setForegroundBoldColor.c ---
|
||||
/* setForegroundBoldColor.c
|
||||
|
||||
By Pierre Sarrazin <http://sarrazip.com/>
|
||||
This file is in the public domain.
|
||||
*/
|
||||
|
||||
--- setForegroundColor.c ---
|
||||
/* setForegroundColor.c
|
||||
|
||||
By Pierre Sarrazin <http://sarrazip.com/>
|
||||
This file is in the public domain.
|
||||
*/
|
||||
|
||||
--- setInverseVideoMode.c ---
|
||||
/* setInverseVideoMode.c
|
||||
|
||||
By Pierre Sarrazin <http://sarrazip.com/>
|
||||
This file is in the public domain.
|
||||
*/
|
||||
|
||||
--- showOS9PMode4Screen.c ---
|
||||
/* showOS9PMode4Screen.c
|
||||
|
||||
By Pierre Sarrazin <http://sarrazip.com/>
|
||||
This file is in the public domain.
|
||||
*/
|
||||
|
||||
--- waitKeyBlinkingCursor.c ---
|
||||
/* waitKeyBlinkingCursor.c
|
||||
|
||||
By Pierre Sarrazin <http://sarrazip.com/>
|
||||
This file is in the public domain.
|
||||
*/
|
||||
|
||||
--- writeCenteredLine.c ---
|
||||
/* writeCenteredLine.c
|
||||
|
||||
By Pierre Sarrazin <http://sarrazip.com/>
|
||||
This file is in the public domain.
|
||||
*/
|
||||
|
||||
--- writeChar.c ---
|
||||
/* writeChar.c
|
||||
|
||||
By Pierre Sarrazin <http://sarrazip.com/>
|
||||
This file is in the public domain.
|
||||
*/
|
||||
|
||||
--- writeCharAt.c ---
|
||||
/* writeCharAt.c
|
||||
|
||||
By Pierre Sarrazin <http://sarrazip.com/>
|
||||
This file is in the public domain.
|
||||
*/
|
||||
|
||||
--- writeCharAt_320x16.c ---
|
||||
/* writeCharAt_320x16.c
|
||||
|
||||
By Pierre Sarrazin <http://sarrazip.com/>
|
||||
This file is in the public domain.
|
||||
*/
|
||||
|
||||
--- writeCharAt_42cols.c ---
|
||||
/* writeCharAt_42cols.c
|
||||
|
||||
By Pierre Sarrazin <http://sarrazip.com/>
|
||||
This file is in the public domain.
|
||||
*/
|
||||
|
||||
--- writeCharAt_51cols.c ---
|
||||
/* writeCharAt_51cols.c
|
||||
|
||||
By Pierre Sarrazin <http://sarrazip.com/>
|
||||
This file is in the public domain.
|
||||
*/
|
||||
|
||||
--- writeDecWord.c ---
|
||||
/* writeDecWord.c
|
||||
|
||||
By Pierre Sarrazin <http://sarrazip.com/>
|
||||
This file is in the public domain.
|
||||
*/
|
||||
|
||||
--- writeString.c ---
|
||||
/* writeString.c
|
||||
|
||||
By Pierre Sarrazin <http://sarrazip.com/>
|
||||
This file is in the public domain.
|
||||
*/
|
||||
@@ -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>.
|
||||
|
After Width: | Height: | Size: 790 B |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 600 B |
|
After Width: | Height: | Size: 713 B |
|
After Width: | Height: | Size: 563 B |
|
After Width: | Height: | Size: 698 B |
|
After Width: | Height: | Size: 485 B |
|
After Width: | Height: | Size: 637 B |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 546 B |
|
After Width: | Height: | Size: 716 B |
|
After Width: | Height: | Size: 842 KiB |
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"source_url": "https://upload.wikimedia.org/wikipedia/commons/c/ca/Human_skeleton_front_en.svg",
|
||||
"description_page": "https://commons.wikimedia.org/wiki/File:Human_skeleton_front_en.svg",
|
||||
"author": "Mariana Ruiz Villarreal (LadyofHats)",
|
||||
"license": "Public domain dedication by author",
|
||||
"retrieved": "2026-11-11",
|
||||
"byte_size": 862210,
|
||||
"sha256": "501752c94533439a31521a929a10ad1dd1b781f588d44fc87144c426a38b8773",
|
||||
"foundation_repository": "https://vccplus-git.brianholman.com/VCCPlusApps/CoCoCapitalQuiz",
|
||||
"foundation_revision": "afa6f3c2a05cbd71c1f22ec3506f4f63421b2bc6"
|
||||
}
|
||||
@@ -0,0 +1,221 @@
|
||||
[
|
||||
{
|
||||
"code": "CRANIUM",
|
||||
"name": "Cranium",
|
||||
"hint": "Head above the lower jaw",
|
||||
"aliases": [
|
||||
"skull"
|
||||
]
|
||||
},
|
||||
{
|
||||
"code": "MANDIBLE",
|
||||
"name": "Mandible",
|
||||
"hint": "Lower jaw",
|
||||
"aliases": [
|
||||
"lower jaw",
|
||||
"jawbone"
|
||||
]
|
||||
},
|
||||
{
|
||||
"code": "CLAVICLE",
|
||||
"name": "Clavicle",
|
||||
"hint": "Front of the shoulder",
|
||||
"aliases": [
|
||||
"collarbone",
|
||||
"collar bone"
|
||||
]
|
||||
},
|
||||
{
|
||||
"code": "SCAPULA",
|
||||
"name": "Scapula",
|
||||
"hint": "Back of the shoulder",
|
||||
"aliases": [
|
||||
"shoulder blade",
|
||||
"shoulderblade"
|
||||
]
|
||||
},
|
||||
{
|
||||
"code": "STERNUM",
|
||||
"name": "Sternum",
|
||||
"hint": "Center of the chest",
|
||||
"aliases": [
|
||||
"breastbone",
|
||||
"breast bone"
|
||||
]
|
||||
},
|
||||
{
|
||||
"code": "RIBS",
|
||||
"name": "Ribs",
|
||||
"hint": "Curving around the chest",
|
||||
"aliases": [
|
||||
"rib",
|
||||
"rib bones"
|
||||
]
|
||||
},
|
||||
{
|
||||
"code": "CERVICAL",
|
||||
"name": "Cervical vertebrae",
|
||||
"hint": "Neck section of the spine",
|
||||
"aliases": [
|
||||
"neck vertebrae",
|
||||
"cervical vertebra"
|
||||
]
|
||||
},
|
||||
{
|
||||
"code": "THORACIC",
|
||||
"name": "Thoracic vertebrae",
|
||||
"hint": "Upper and middle back",
|
||||
"aliases": [
|
||||
"thoracic vertebra"
|
||||
]
|
||||
},
|
||||
{
|
||||
"code": "LUMBAR",
|
||||
"name": "Lumbar vertebrae",
|
||||
"hint": "Lower back",
|
||||
"aliases": [
|
||||
"lumbar vertebra",
|
||||
"lower back vertebrae"
|
||||
]
|
||||
},
|
||||
{
|
||||
"code": "SACRUM",
|
||||
"name": "Sacrum",
|
||||
"hint": "Base of spine above tailbone",
|
||||
"aliases": [
|
||||
"sacral bone"
|
||||
]
|
||||
},
|
||||
{
|
||||
"code": "COCCYX",
|
||||
"name": "Coccyx",
|
||||
"hint": "Small tip below the sacrum",
|
||||
"aliases": [
|
||||
"tailbone",
|
||||
"tail bone"
|
||||
]
|
||||
},
|
||||
{
|
||||
"code": "PELVIS",
|
||||
"name": "Pelvic girdle",
|
||||
"hint": "Hip region, on either side",
|
||||
"aliases": [
|
||||
"hip bones",
|
||||
"hip girdle",
|
||||
"coxal bones"
|
||||
]
|
||||
},
|
||||
{
|
||||
"code": "HUMERUS",
|
||||
"name": "Humerus",
|
||||
"hint": "Upper arm",
|
||||
"aliases": [
|
||||
"upper arm bone"
|
||||
]
|
||||
},
|
||||
{
|
||||
"code": "RADIUS",
|
||||
"name": "Radius",
|
||||
"hint": "Forearm, thumb side",
|
||||
"aliases": [
|
||||
"radius bone"
|
||||
]
|
||||
},
|
||||
{
|
||||
"code": "ULNA",
|
||||
"name": "Ulna",
|
||||
"hint": "Forearm, little-finger side",
|
||||
"aliases": [
|
||||
"ulna bone"
|
||||
]
|
||||
},
|
||||
{
|
||||
"code": "CARPALS",
|
||||
"name": "Carpals",
|
||||
"hint": "Wrist",
|
||||
"aliases": [
|
||||
"wrist bones",
|
||||
"carpal bones"
|
||||
]
|
||||
},
|
||||
{
|
||||
"code": "METACARPALS",
|
||||
"name": "Metacarpals",
|
||||
"hint": "Palm between wrist and fingers",
|
||||
"aliases": [
|
||||
"palm bones",
|
||||
"metacarpal bones"
|
||||
]
|
||||
},
|
||||
{
|
||||
"code": "FINGERS",
|
||||
"name": "Finger phalanges",
|
||||
"hint": "Digits of the hand",
|
||||
"aliases": [
|
||||
"finger bones",
|
||||
"hand phalanges"
|
||||
]
|
||||
},
|
||||
{
|
||||
"code": "FEMUR",
|
||||
"name": "Femur",
|
||||
"hint": "Thigh",
|
||||
"aliases": [
|
||||
"thighbone",
|
||||
"thigh bone"
|
||||
]
|
||||
},
|
||||
{
|
||||
"code": "PATELLA",
|
||||
"name": "Patella",
|
||||
"hint": "Front of the knee",
|
||||
"aliases": [
|
||||
"kneecap",
|
||||
"knee cap"
|
||||
]
|
||||
},
|
||||
{
|
||||
"code": "TIBIA",
|
||||
"name": "Tibia",
|
||||
"hint": "Lower leg, inner side",
|
||||
"aliases": [
|
||||
"shinbone",
|
||||
"shin bone"
|
||||
]
|
||||
},
|
||||
{
|
||||
"code": "FIBULA",
|
||||
"name": "Fibula",
|
||||
"hint": "Lower leg, outer side",
|
||||
"aliases": [
|
||||
"calf bone",
|
||||
"calfbone"
|
||||
]
|
||||
},
|
||||
{
|
||||
"code": "TARSALS",
|
||||
"name": "Tarsals",
|
||||
"hint": "Rear foot and ankle",
|
||||
"aliases": [
|
||||
"ankle bones",
|
||||
"tarsal bones"
|
||||
]
|
||||
},
|
||||
{
|
||||
"code": "METATARSALS",
|
||||
"name": "Metatarsals",
|
||||
"hint": "Mid-foot behind the toes",
|
||||
"aliases": [
|
||||
"metatarsal bones"
|
||||
]
|
||||
},
|
||||
{
|
||||
"code": "TOES",
|
||||
"name": "Toe phalanges",
|
||||
"hint": "Digits of the foot",
|
||||
"aliases": [
|
||||
"toe bones",
|
||||
"foot phalanges"
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,676 @@
|
||||
{
|
||||
"schemaVersion": 1,
|
||||
"source": {
|
||||
"file": "assets/skeleton-source.svg",
|
||||
"sha256": "501752c94533439a31521a929a10ad1dd1b781f588d44fc87144c426a38b8773",
|
||||
"author": "Mariana Ruiz Villarreal (LadyofHats)",
|
||||
"license": "Public domain dedication",
|
||||
"page": "https://commons.wikimedia.org/wiki/File:Human_skeleton_front_en.svg"
|
||||
},
|
||||
"coordinateRender": [
|
||||
436,
|
||||
842
|
||||
],
|
||||
"overviewSourceBounds": [
|
||||
59,
|
||||
20,
|
||||
405,
|
||||
822
|
||||
],
|
||||
"topics": [
|
||||
{
|
||||
"id": 0,
|
||||
"code": "CRANIUM",
|
||||
"sourceElements": [
|
||||
"Cranium",
|
||||
"g1297"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 1,
|
||||
"code": "MANDIBLE",
|
||||
"sourceElements": [
|
||||
"Mandible"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"code": "CLAVICLE",
|
||||
"sourceElements": [
|
||||
"ClavicleLeft",
|
||||
"ClavicleRight"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"code": "SCAPULA",
|
||||
"sourceElements": [
|
||||
"Scapula"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"code": "STERNUM",
|
||||
"sourceElements": [
|
||||
"Sternum",
|
||||
"Manubrium"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
"code": "RIBS",
|
||||
"sourceElements": [
|
||||
"g845",
|
||||
"g1609"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 6,
|
||||
"code": "CERVICAL",
|
||||
"sourceElements": [
|
||||
"CervicalVertebrae"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 7,
|
||||
"code": "THORACIC",
|
||||
"sourceElements": [
|
||||
"ThoracicVertebrae"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 8,
|
||||
"code": "LUMBAR",
|
||||
"sourceElements": [
|
||||
"LumbarVertebrae"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 9,
|
||||
"code": "SACRUM",
|
||||
"sourceElements": [
|
||||
"Sacrum"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 10,
|
||||
"code": "COCCYX",
|
||||
"sourceElements": [
|
||||
"Coccyx"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 11,
|
||||
"code": "PELVIS",
|
||||
"sourceElements": [
|
||||
"PelvicGirdle",
|
||||
"g447"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 12,
|
||||
"code": "HUMERUS",
|
||||
"sourceElements": [
|
||||
"HumerusLeft",
|
||||
"HumerusRight"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 13,
|
||||
"code": "RADIUS",
|
||||
"sourceElements": [
|
||||
"RadiusLeft",
|
||||
"RadiusRight"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 14,
|
||||
"code": "ULNA",
|
||||
"sourceElements": [
|
||||
"UlnaLeft",
|
||||
"UlnaRight"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 15,
|
||||
"code": "CARPALS",
|
||||
"sourceElements": [
|
||||
"CarpalsLeft",
|
||||
"CarpalsRight"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 16,
|
||||
"code": "METACARPALS",
|
||||
"sourceElements": [
|
||||
"MetacarpalsLeft",
|
||||
"MetacarpalsRight"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 17,
|
||||
"code": "FINGERS",
|
||||
"sourceElements": [
|
||||
"PhalangesLeft",
|
||||
"PhalangesRight"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 18,
|
||||
"code": "FEMUR",
|
||||
"sourceElements": [
|
||||
"g3760",
|
||||
"FemurLeft",
|
||||
"path479",
|
||||
"path481",
|
||||
"path513",
|
||||
"path499"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 19,
|
||||
"code": "PATELLA",
|
||||
"sourceElements": [
|
||||
"PatellaLeft",
|
||||
"PatellaRight"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 20,
|
||||
"code": "TIBIA",
|
||||
"sourceElements": [
|
||||
"TibiaLeft",
|
||||
"TibiaRight"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 21,
|
||||
"code": "FIBULA",
|
||||
"sourceElements": [
|
||||
"FibulaLeft",
|
||||
"FibulaRight"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 22,
|
||||
"code": "TARSALS",
|
||||
"sourceElements": [
|
||||
"TarsalsLeft",
|
||||
"TarsalsRight"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 23,
|
||||
"code": "METATARSALS",
|
||||
"sourceElements": [
|
||||
"MetatarsalsLeft",
|
||||
"MetatarsalsRight"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 24,
|
||||
"code": "TOES",
|
||||
"sourceElements": [
|
||||
"PhalangesFootLeft",
|
||||
"PhalangesFootRight"
|
||||
]
|
||||
}
|
||||
],
|
||||
"paintOrder": [
|
||||
15,
|
||||
16,
|
||||
17,
|
||||
22,
|
||||
23,
|
||||
24,
|
||||
21,
|
||||
20,
|
||||
18,
|
||||
11,
|
||||
3,
|
||||
10,
|
||||
9,
|
||||
8,
|
||||
5,
|
||||
7,
|
||||
6,
|
||||
0,
|
||||
1,
|
||||
4,
|
||||
2,
|
||||
12,
|
||||
14,
|
||||
13,
|
||||
19
|
||||
],
|
||||
"facialRecesses": "Original source shading thresholds, eyes and nasal recess only",
|
||||
"pairedSides": "Both sides use one bone-family identity; no left/right questions",
|
||||
"views": [
|
||||
{
|
||||
"id": 0,
|
||||
"name": "overview",
|
||||
"sourceBounds": [
|
||||
59,
|
||||
20,
|
||||
405,
|
||||
822
|
||||
],
|
||||
"width": 64,
|
||||
"height": 149,
|
||||
"spanBytes": 2109,
|
||||
"offsetBytes": 52,
|
||||
"pixels": {
|
||||
"CRANIUM": 134,
|
||||
"MANDIBLE": 53,
|
||||
"CLAVICLE": 50,
|
||||
"SCAPULA": 89,
|
||||
"STERNUM": 57,
|
||||
"RIBS": 455,
|
||||
"CERVICAL": 27,
|
||||
"THORACIC": 35,
|
||||
"LUMBAR": 80,
|
||||
"SACRUM": 42,
|
||||
"COCCYX": 3,
|
||||
"PELVIS": 248,
|
||||
"HUMERUS": 202,
|
||||
"RADIUS": 103,
|
||||
"ULNA": 83,
|
||||
"CARPALS": 25,
|
||||
"METACARPALS": 69,
|
||||
"FINGERS": 98,
|
||||
"FEMUR": 351,
|
||||
"PATELLA": 39,
|
||||
"TIBIA": 281,
|
||||
"FIBULA": 100,
|
||||
"TARSALS": 32,
|
||||
"METATARSALS": 59,
|
||||
"TOES": 55
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 1,
|
||||
"name": "head",
|
||||
"sourceBounds": [
|
||||
163,
|
||||
17,
|
||||
243,
|
||||
154
|
||||
],
|
||||
"width": 38,
|
||||
"height": 65,
|
||||
"spanBytes": 444,
|
||||
"offsetBytes": 52,
|
||||
"pixels": {
|
||||
"CRANIUM": 916,
|
||||
"MANDIBLE": 281,
|
||||
"CLAVICLE": 84,
|
||||
"SCAPULA": 0,
|
||||
"STERNUM": 0,
|
||||
"RIBS": 37,
|
||||
"CERVICAL": 166,
|
||||
"THORACIC": 28,
|
||||
"LUMBAR": 0,
|
||||
"SACRUM": 0,
|
||||
"COCCYX": 0,
|
||||
"PELVIS": 0,
|
||||
"HUMERUS": 0,
|
||||
"RADIUS": 0,
|
||||
"ULNA": 0,
|
||||
"CARPALS": 0,
|
||||
"METACARPALS": 0,
|
||||
"FINGERS": 0,
|
||||
"FEMUR": 0,
|
||||
"PATELLA": 0,
|
||||
"TIBIA": 0,
|
||||
"FIBULA": 0,
|
||||
"TARSALS": 0,
|
||||
"METATARSALS": 0,
|
||||
"TOES": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"name": "hand",
|
||||
"sourceBounds": [
|
||||
313,
|
||||
397,
|
||||
410,
|
||||
500
|
||||
],
|
||||
"width": 61,
|
||||
"height": 65,
|
||||
"spanBytes": 588,
|
||||
"offsetBytes": 52,
|
||||
"pixels": {
|
||||
"CRANIUM": 0,
|
||||
"MANDIBLE": 0,
|
||||
"CLAVICLE": 0,
|
||||
"SCAPULA": 0,
|
||||
"STERNUM": 0,
|
||||
"RIBS": 0,
|
||||
"CERVICAL": 0,
|
||||
"THORACIC": 0,
|
||||
"LUMBAR": 0,
|
||||
"SACRUM": 0,
|
||||
"COCCYX": 0,
|
||||
"PELVIS": 0,
|
||||
"HUMERUS": 0,
|
||||
"RADIUS": 92,
|
||||
"ULNA": 46,
|
||||
"CARPALS": 134,
|
||||
"METACARPALS": 305,
|
||||
"FINGERS": 361,
|
||||
"FEMUR": 0,
|
||||
"PATELLA": 0,
|
||||
"TIBIA": 0,
|
||||
"FIBULA": 0,
|
||||
"TARSALS": 0,
|
||||
"METATARSALS": 0,
|
||||
"TOES": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"name": "foot",
|
||||
"sourceBounds": [
|
||||
199,
|
||||
747,
|
||||
275,
|
||||
825
|
||||
],
|
||||
"width": 63,
|
||||
"height": 65,
|
||||
"spanBytes": 495,
|
||||
"offsetBytes": 52,
|
||||
"pixels": {
|
||||
"CRANIUM": 0,
|
||||
"MANDIBLE": 0,
|
||||
"CLAVICLE": 0,
|
||||
"SCAPULA": 0,
|
||||
"STERNUM": 0,
|
||||
"RIBS": 0,
|
||||
"CERVICAL": 0,
|
||||
"THORACIC": 0,
|
||||
"LUMBAR": 0,
|
||||
"SACRUM": 0,
|
||||
"COCCYX": 0,
|
||||
"PELVIS": 0,
|
||||
"HUMERUS": 0,
|
||||
"RADIUS": 0,
|
||||
"ULNA": 0,
|
||||
"CARPALS": 0,
|
||||
"METACARPALS": 0,
|
||||
"FINGERS": 0,
|
||||
"FEMUR": 0,
|
||||
"PATELLA": 0,
|
||||
"TIBIA": 297,
|
||||
"FIBULA": 81,
|
||||
"TARSALS": 376,
|
||||
"METATARSALS": 571,
|
||||
"TOES": 440
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"name": "spine",
|
||||
"sourceBounds": [
|
||||
169,
|
||||
274,
|
||||
235,
|
||||
400
|
||||
],
|
||||
"width": 34,
|
||||
"height": 65,
|
||||
"spanBytes": 621,
|
||||
"offsetBytes": 52,
|
||||
"pixels": {
|
||||
"CRANIUM": 0,
|
||||
"MANDIBLE": 0,
|
||||
"CLAVICLE": 0,
|
||||
"SCAPULA": 0,
|
||||
"STERNUM": 0,
|
||||
"RIBS": 143,
|
||||
"CERVICAL": 0,
|
||||
"THORACIC": 59,
|
||||
"LUMBAR": 544,
|
||||
"SACRUM": 315,
|
||||
"COCCYX": 28,
|
||||
"PELVIS": 429,
|
||||
"HUMERUS": 0,
|
||||
"RADIUS": 0,
|
||||
"ULNA": 0,
|
||||
"CARPALS": 0,
|
||||
"METACARPALS": 0,
|
||||
"FINGERS": 0,
|
||||
"FEMUR": 0,
|
||||
"PATELLA": 0,
|
||||
"TIBIA": 0,
|
||||
"FIBULA": 0,
|
||||
"TARSALS": 0,
|
||||
"METATARSALS": 0,
|
||||
"TOES": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
"name": "chest",
|
||||
"sourceBounds": [
|
||||
107,
|
||||
132,
|
||||
300,
|
||||
308
|
||||
],
|
||||
"width": 68,
|
||||
"height": 62,
|
||||
"spanBytes": 1245,
|
||||
"offsetBytes": 52,
|
||||
"pixels": {
|
||||
"CRANIUM": 0,
|
||||
"MANDIBLE": 0,
|
||||
"CLAVICLE": 158,
|
||||
"SCAPULA": 326,
|
||||
"STERNUM": 181,
|
||||
"RIBS": 1573,
|
||||
"CERVICAL": 67,
|
||||
"THORACIC": 137,
|
||||
"LUMBAR": 73,
|
||||
"SACRUM": 0,
|
||||
"COCCYX": 0,
|
||||
"PELVIS": 0,
|
||||
"HUMERUS": 269,
|
||||
"RADIUS": 0,
|
||||
"ULNA": 0,
|
||||
"CARPALS": 0,
|
||||
"METACARPALS": 0,
|
||||
"FINGERS": 0,
|
||||
"FEMUR": 0,
|
||||
"PATELLA": 0,
|
||||
"TIBIA": 0,
|
||||
"FIBULA": 0,
|
||||
"TARSALS": 0,
|
||||
"METATARSALS": 0,
|
||||
"TOES": 0
|
||||
}
|
||||
}
|
||||
],
|
||||
"geometryROMBytes": 5975,
|
||||
"detailSelector": [
|
||||
1,
|
||||
1,
|
||||
5,
|
||||
5,
|
||||
5,
|
||||
5,
|
||||
1,
|
||||
5,
|
||||
4,
|
||||
4,
|
||||
4,
|
||||
4,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
2,
|
||||
2,
|
||||
2,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
3,
|
||||
3,
|
||||
3
|
||||
],
|
||||
"overviewBoxes": {
|
||||
"CRANIUM": [
|
||||
20,
|
||||
0,
|
||||
13,
|
||||
17
|
||||
],
|
||||
"MANDIBLE": [
|
||||
20,
|
||||
11,
|
||||
13,
|
||||
9
|
||||
],
|
||||
"CLAVICLE": [
|
||||
12,
|
||||
22,
|
||||
30,
|
||||
4
|
||||
],
|
||||
"SCAPULA": [
|
||||
10,
|
||||
23,
|
||||
34,
|
||||
13
|
||||
],
|
||||
"STERNUM": [
|
||||
24,
|
||||
25,
|
||||
6,
|
||||
17
|
||||
],
|
||||
"RIBS": [
|
||||
14,
|
||||
23,
|
||||
26,
|
||||
30
|
||||
],
|
||||
"CERVICAL": [
|
||||
23,
|
||||
19,
|
||||
8,
|
||||
5
|
||||
],
|
||||
"THORACIC": [
|
||||
24,
|
||||
23,
|
||||
5,
|
||||
27
|
||||
],
|
||||
"LUMBAR": [
|
||||
23,
|
||||
49,
|
||||
8,
|
||||
14
|
||||
],
|
||||
"SACRUM": [
|
||||
21,
|
||||
60,
|
||||
10,
|
||||
8
|
||||
],
|
||||
"COCCYX": [
|
||||
26,
|
||||
67,
|
||||
2,
|
||||
3
|
||||
],
|
||||
"PELVIS": [
|
||||
13,
|
||||
56,
|
||||
27,
|
||||
18
|
||||
],
|
||||
"HUMERUS": [
|
||||
1,
|
||||
27,
|
||||
49,
|
||||
27
|
||||
],
|
||||
"RADIUS": [
|
||||
1,
|
||||
52,
|
||||
55,
|
||||
22
|
||||
],
|
||||
"ULNA": [
|
||||
1,
|
||||
53,
|
||||
51,
|
||||
21
|
||||
],
|
||||
"CARPALS": [
|
||||
1,
|
||||
72,
|
||||
56,
|
||||
4
|
||||
],
|
||||
"METACARPALS": [
|
||||
0,
|
||||
73,
|
||||
60,
|
||||
8
|
||||
],
|
||||
"FINGERS": [
|
||||
0,
|
||||
73,
|
||||
64,
|
||||
16
|
||||
],
|
||||
"FEMUR": [
|
||||
11,
|
||||
67,
|
||||
30,
|
||||
40
|
||||
],
|
||||
"PATELLA": [
|
||||
18,
|
||||
104,
|
||||
16,
|
||||
5
|
||||
],
|
||||
"TIBIA": [
|
||||
17,
|
||||
106,
|
||||
18,
|
||||
33
|
||||
],
|
||||
"FIBULA": [
|
||||
17,
|
||||
109,
|
||||
18,
|
||||
29
|
||||
],
|
||||
"TARSALS": [
|
||||
19,
|
||||
138,
|
||||
14,
|
||||
5
|
||||
],
|
||||
"METATARSALS": [
|
||||
16,
|
||||
140,
|
||||
20,
|
||||
5
|
||||
],
|
||||
"TOES": [
|
||||
13,
|
||||
143,
|
||||
26,
|
||||
6
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
# Bone Quest anatomy bank
|
||||
|
||||
The quiz identifies **25 major bones or bone groups** in the supplied anterior
|
||||
skeleton illustration. It does not ask separately about every individual bone
|
||||
in the adult skeleton. Left and right counterparts share one topic. Vertebrae
|
||||
are grouped by region; the bones of each wrist, palm, hand digits, rear foot,
|
||||
mid-foot and toes are also grouped.
|
||||
|
||||
`data/bones.json` is the canonical ordered bank. `src/bones.c` contains three
|
||||
runtime fields: displayed name, short location hint, and pipe-separated accepted
|
||||
aliases. Stable codes remain in JSON; fixed topic order binds artwork, history
|
||||
and questions. `tools/prepare_questions.py` regenerates the C table. Names are at
|
||||
most 22 characters and hints at most 30 characters.
|
||||
|
||||
## Naming choices
|
||||
|
||||
- **Cranium** follows the illustration's labeled grouping above the separately
|
||||
drawn mandible. **Skull** is accepted as the familiar introductory term. This
|
||||
is not a quiz distinguishing all cranial and facial bones. The skull includes
|
||||
the mandible in complete anatomical descriptions; the game treats the lower
|
||||
jaw as its own highlighted topic.
|
||||
- **Pelvic girdle** means the paired hip bones here. The sacrum and coccyx are
|
||||
separate topics. Bare **pelvis** is deliberately not an accepted alias because
|
||||
the complete bony pelvis includes those additional bones.
|
||||
- **Finger phalanges** includes the thumb. **Toe phalanges** is a separate topic.
|
||||
Bare **phalanges** is not accepted for either because it cannot distinguish
|
||||
the hand from the foot. **Finger bones / hand phalanges** and **toe bones /
|
||||
foot phalanges** are accepted respectively.
|
||||
- **Radius** and **ulna** are distinguished using the anatomical position: the
|
||||
radius lies on the thumb side and the ulna on the little-finger side.
|
||||
**Tibia** and **fibula** use the inner and outer sides of the lower leg.
|
||||
- **Sternum** is the whole breastbone topic, including its manubrium portion;
|
||||
the manubrium is not a second overlapping answer.
|
||||
- Common names such as collarbone, shoulder blade, breastbone, kneecap,
|
||||
thighbone, shinbone and tailbone are accepted. A location hint is not
|
||||
automatically an accepted answer. Names of body regions such as **forearm**
|
||||
or **foot bones** are too broad to identify one highlighted topic.
|
||||
|
||||
Canonical names and aliases are unique after lowercasing and collapsing spaces.
|
||||
Case and extra-space handling belongs to the shared quiz normalization; this
|
||||
bank supplies no ambiguous duplicate alias. The data contains no treatment,
|
||||
injury or diagnostic questions.
|
||||
|
||||
## Primary references checked
|
||||
|
||||
The following OpenStax *Anatomy and Physiology 2e* sections were consulted to
|
||||
verify names, group boundaries and location facts on November 11, 2026:
|
||||
|
||||
- [The skull](https://openstax.org/books/anatomy-and-physiology-2e/pages/7-2-the-skull)
|
||||
- [The vertebral column](https://openstax.org/books/anatomy-and-physiology-2e/pages/7-3-the-vertebral-column)
|
||||
- [The thoracic cage](https://openstax.org/books/anatomy-and-physiology-2e/pages/7-4-the-thoracic-cage)
|
||||
- [The pectoral girdle](https://openstax.org/books/anatomy-and-physiology-2e/pages/8-1-the-pectoral-girdle)
|
||||
- [Bones of the upper limb](https://openstax.org/books/anatomy-and-physiology-2e/pages/8-2-bones-of-the-upper-limb)
|
||||
- [The pelvic girdle and pelvis](https://openstax.org/books/anatomy-and-physiology-2e/pages/8-3-the-pelvic-girdle-and-pelvis)
|
||||
- [Bones of the lower limb](https://openstax.org/books/anatomy-and-physiology-2e/pages/8-4-bones-of-the-lower-limb)
|
||||
|
||||
These are factual verification references. No textbook passages, assessments or
|
||||
artwork are imported into the game. The concise location hints are written for
|
||||
this quiz; they are not quotations from the textbook.
|
||||
|
||||
## Diagram provenance
|
||||
|
||||
The visual reference is [Human skeleton front en.svg](https://commons.wikimedia.org/wiki/File:Human_skeleton_front_en.svg)
|
||||
by **Mariana Ruiz Villarreal (LadyofHats)**. The author released it into the
|
||||
public domain. The original Wikimedia description distinguishes labels for
|
||||
individual bones from labels for groups. Bone Quest uses its selected group
|
||||
names while keeping a single stable topic for paired counterparts. The retained
|
||||
source SVG and source-receipt.json belong to the artwork workflow; generated
|
||||
geometry and any simplifications must preserve this attribution and explain
|
||||
what was adapted.
|
||||
@@ -0,0 +1,18 @@
|
||||
# Bone Quest implementation
|
||||
|
||||
Working checklist:
|
||||
|
||||
- [x] Create private VCCPlusApps/BoneQuest repository and separate main checkout.
|
||||
- [x] Adapt the supplied public-domain SVG into compact per-topic graphics.
|
||||
- [x] Verify25 major bones/bone groups and accepted answer aliases.
|
||||
- [x] Implement anatomy-specific layout, two modes, feedback/review/replay.
|
||||
- [x] Build with stock VCC Plus tools and create BONEQ.DSK.
|
||||
- [x] Run host/geometry and isolated6809/6309 gameplay checks.
|
||||
- [x] Retain representative real screenshots and usable build/play instructions.
|
||||
|
||||
Foundation: Capital Quest, revision afa6f3c2a05cbd71c1f22ec3506f4f63421b2bc6,
|
||||
GPL-3.0-or-later. Its geography assets/manuals are not used by Bone Quest.
|
||||
Skeleton: Mariana Ruiz Villarreal (LadyofHats), Wikimedia Human_skeleton_front_en.svg,
|
||||
author's public-domain dedication; original retained under assets/ with hash receipt.
|
||||
The quiz covers named major bones and groups shown in the diagram, not 206
|
||||
individually selectable bones. Paired left/right examples share one question.
|
||||
@@ -0,0 +1,54 @@
|
||||
[
|
||||
{
|
||||
"file": "docs/images/title.png",
|
||||
"width": 640,
|
||||
"height": 480,
|
||||
"sha256": "c760e20e70c3063f2938acad87c80979ef8f795ff981bfa3eacb6fff5b3db9f3",
|
||||
"emulator": "VCC Plus 3.6.1 (54)",
|
||||
"processor": "MC6809",
|
||||
"ramKB": 512,
|
||||
"video": "RGB",
|
||||
"diskSHA256": "cf9b2da5842551d76b58c3be2064a78163536526826fca13ac7ee58c269e1e66",
|
||||
"capture": "Unmodified guest frame from isolated keyboard-driven playtest",
|
||||
"note": "Scripted validation includes deliberate incorrect answers."
|
||||
},
|
||||
{
|
||||
"file": "docs/images/multiple-choice.png",
|
||||
"width": 640,
|
||||
"height": 480,
|
||||
"sha256": "a0f272e2e0355260e27bfef6b5021e4cb984e054eac9e39a0f910f05af66e3c5",
|
||||
"emulator": "VCC Plus 3.6.1 (54)",
|
||||
"processor": "MC6809",
|
||||
"ramKB": 512,
|
||||
"video": "RGB",
|
||||
"diskSHA256": "cf9b2da5842551d76b58c3be2064a78163536526826fca13ac7ee58c269e1e66",
|
||||
"capture": "Unmodified guest frame from isolated keyboard-driven playtest",
|
||||
"note": "Scripted validation includes deliberate incorrect answers."
|
||||
},
|
||||
{
|
||||
"file": "docs/images/typed-answer.png",
|
||||
"width": 640,
|
||||
"height": 480,
|
||||
"sha256": "f44cd5b9493a2b4704532f444f4666b536db375e4b7a6338683bcade9246444d",
|
||||
"emulator": "VCC Plus 3.6.1 (54)",
|
||||
"processor": "MC6809",
|
||||
"ramKB": 512,
|
||||
"video": "RGB",
|
||||
"diskSHA256": "cf9b2da5842551d76b58c3be2064a78163536526826fca13ac7ee58c269e1e66",
|
||||
"capture": "Unmodified guest frame from isolated keyboard-driven playtest",
|
||||
"note": "Scripted validation includes deliberate incorrect answers."
|
||||
},
|
||||
{
|
||||
"file": "docs/images/results.png",
|
||||
"width": 640,
|
||||
"height": 480,
|
||||
"sha256": "81839f1acdf3511d62c52fc6fdc53df138a5b86048563628b450df6ffe7c6297",
|
||||
"emulator": "VCC Plus 3.6.1 (54)",
|
||||
"processor": "MC6809",
|
||||
"ramKB": 512,
|
||||
"video": "RGB",
|
||||
"diskSHA256": "cf9b2da5842551d76b58c3be2064a78163536526826fca13ac7ee58c269e1e66",
|
||||
"capture": "Unmodified guest frame from isolated keyboard-driven playtest",
|
||||
"note": "Scripted validation includes deliberate incorrect answers."
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,64 @@
|
||||
# Initial Bone Quest verification — November 11, 2026
|
||||
|
||||
## Built and delivered
|
||||
|
||||
The root BONEQ.DSK is a standard 35-track DECB image, 161,280 bytes, SHA-256:
|
||||
|
||||
`cf9b2da5842551d76b58c3be2064a78163536526826fca13ac7ee58c269e1e66`
|
||||
|
||||
Built with installed VCC Plus 3.6.1 (54), bundled CMOC 0.1.100 and LWTools 4.25.
|
||||
Release, Debug and Test disk builds passed. Program/static storage ends at
|
||||
$764E (Release),$7687 (Debug),$7653 (Test), below the $7800 limit and separate
|
||||
2 KB stack reservation. Two graphics pages retain the public GIME512 KB contract.
|
||||
Generated skeleton geometry occupies 5,975 bytes; ordinary builds do not run an
|
||||
SVG renderer or need Python/Pillow/rsvg-convert.
|
||||
|
||||
## Logic and artwork
|
||||
|
||||
make test passed: 50,000 option sets across 2,000 games, all 25 topics once per game,
|
||||
four distinct choices, no consecutive repeated correct slot, all permitted
|
||||
slot transitions, replay reset, canonical names/common aliases, known-wrong
|
||||
name/alias priority, spelling checks, scoring and duplicate-answer guards.
|
||||
All 25 authoring topics/aliases agree exactly with generated C. The original SVG
|
||||
hash matches its receipt. Six geometry views have bounded, disjoint spans;
|
||||
each topic has nonempty overview coverage, with detailed small-bone views.
|
||||
|
||||
## Feedback audio
|
||||
|
||||
Separate bounded correct/incorrect feedback captures contained nonzero 44.1 kHz
|
||||
stereo PCM (peak 16128). Capture began at the actual feedback phase, before the
|
||||
tones; no microphone or host audio device was used. This establishes generated
|
||||
guest signal, not audible listening or comprehensive frequency analysis.
|
||||
|
||||
## Actual gameplay
|
||||
|
||||
The actual Release disk completed a 25-question multiple-choice game AND a
|
||||
25-question typed game on each emulated MC6809 and HD6309, with512 KB RAM,
|
||||
CoCo 3 BASIC, FD-502 Disk BASIC and RGB video. Tests used isolated app-owned
|
||||
machines and disposable disk copies; no personal emulator or desktop input
|
||||
was controlled.
|
||||
|
||||
The driver decoded displayed text against the matching linked font and checked
|
||||
the skeleton's actual pixels against the topic masks and answer history. It
|
||||
verified question numbers, readable choices, current highlighting, purple/red
|
||||
progress, no consecutive correct-slot repeats, held-key protection, deliberate
|
||||
wrong answers, common aliases, case/spacing, spelling retry and Backspace,
|
||||
33-character entry bounds, reveal, scores 20/25 (80%), one correction, paged
|
||||
review, neutral replay title and clean return to BASIC. Both runs preserved the
|
||||
disk hash and reported zero guest writes.
|
||||
|
||||
To repeat these developer checks, provide your own ROM paths explicitly:
|
||||
|
||||
```sh
|
||||
python3 tests/playtest.py --rom /path/to/coco3.rom --disk-rom /path/to/disk11.rom
|
||||
```
|
||||
|
||||
The harness uses the installed app's isolated helper and is qualified against
|
||||
the build identified above; it is not a general alternate MCP server. Private
|
||||
ROMs, raw captures, result JSON and build outputs stay ignored under test-output/.
|
||||
Selected unchanged guest frames are retained in docs/images/ and identified by
|
||||
docs/SCREENSHOTS.json. They are actual game frames, not native-window marketing
|
||||
captures or mockups.
|
||||
|
||||
No physical CoCo, host Intel, macOS 14 or audible listening qualification is
|
||||
claimed. Native editor/source-open UI is not exercised by the headless tests.
|
||||
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 14 KiB |
@@ -0,0 +1,159 @@
|
||||
/* Bone Quest — based on Brian Holman's GPL-3.0-or-later Capital Quest. */
|
||||
#include <cmoc.h>
|
||||
#include <coco.h>
|
||||
#include <vcc/gime.h>
|
||||
#include "quiz.h"
|
||||
#include "ui.h"
|
||||
static char line[54],answer[ANSWER_SIZE];
|
||||
static U8 mode,spelling_attempt;
|
||||
U8 phase,current_bone;
|
||||
static void present(void)
|
||||
{
|
||||
if(!gime_present()){gime_close();setHighSpeed(FALSE);printf("Graphics timer stopped.\n");exit(1);}
|
||||
}
|
||||
static U8 choose(const char *allowed)
|
||||
{
|
||||
U8 c;release_keys();
|
||||
do{c=next_key();if(c>='a' && c<='z')c-='a'-'A';}while(!strchr(allowed,c));
|
||||
return c;
|
||||
}
|
||||
static void credits(void)
|
||||
{
|
||||
phase=5;frame("CREDITS");
|
||||
text(8,21,"A JOURNEY THROUGH THE SKELETON",6);
|
||||
text(8,42,"Skeleton: Mariana Ruiz Villarreal",7);
|
||||
text(8,54,"(LadyofHats), public-domain artwork.",2);
|
||||
text(8,70,"Wikimedia Commons:",7);
|
||||
text(8,82,"Human_skeleton_front_en.svg",2);
|
||||
text(8,99,"Adapted: labels removed, reduced, recolored;",7);
|
||||
text(8,110,"bone masks and enlarged details prepared.",7);
|
||||
text(8,129,"Font / boot: Pierre Sarrazin, public domain.",2);
|
||||
text(8,143,"Based on Capital Quest by Brian Holman.",7);
|
||||
text(8,155,"Game GPL-3.0-or-later. See assets/CREDITS.md",2);
|
||||
text(8,180,"SPACE: back",6);present();choose(" ");
|
||||
}
|
||||
static U8 title(void)
|
||||
{
|
||||
U8 c;
|
||||
do{
|
||||
phase=0;frame("HUMAN ANATOMY");show_skeleton(255,0);
|
||||
text(112,35,"25 BONES + GROUPS",6);
|
||||
text(112,54,"1 MULTIPLE CHOICE",7);
|
||||
text(112,75,"2 TYPE THE NAME",7);
|
||||
text(112,101,"C CREDITS",2);text(112,117,"Q QUIT TO BASIC",2);
|
||||
text(112,143,"Find the yellow bone.",7);
|
||||
text(112,155,"Learn from each answer.",2);
|
||||
text(112,169,"512 KB COCO 3 / RGB",6);
|
||||
text(8,183,"Release keys between presses. Choose 1 or 2.",2);
|
||||
present();c=choose("12CQ");if(c=='C')credits();
|
||||
}while(c=='C');
|
||||
return c;
|
||||
}
|
||||
static void question_screen(void)
|
||||
{
|
||||
phase=1;frame(mode==1?"MULTIPLE CHOICE":"TYPE THE NAME");
|
||||
sprintf(line,"Question %u/%u Score %u",(unsigned)question+1,BONE_COUNT,(unsigned)score);text(8,19,line,7);
|
||||
show_skeleton(current_bone,1);
|
||||
text(112,106,"Name the yellow bone(s).",6);
|
||||
text(112,118,bones[current_bone].hint,2);
|
||||
text(8,183,"Teal:new Purple:right Red:miss Yellow:now",2);
|
||||
}
|
||||
static U8 multiple_choice(void)
|
||||
{
|
||||
U8 i,c;quiz_options(current_bone);question_screen();
|
||||
for(i=0;i<4;++i){sprintf(line,"%u %s",(unsigned)i+1,bones[options[i]].name);text(112,132+i*11,line,7);}
|
||||
present();c=choose("1234")-'1';strcpy(answer,bones[options[c]].name);
|
||||
return options[c]==current_bone;
|
||||
}
|
||||
static void input_screen(U8 too_long)
|
||||
{
|
||||
gime_fill_rect(108,129,212,48,1);text(112,132,answer,7);
|
||||
text(112+strlen(answer)*6,132,"_",6);
|
||||
text(112,146,too_long?"Use Backspace to edit.":"Enter:submit Esc:reveal",2);
|
||||
text(112,159,"Backspace edits the name.",2);
|
||||
text(112,171,"Case / spaces ignored.",2);present();
|
||||
}
|
||||
static void input_edit(U8 old_n,U8 new_n)
|
||||
{
|
||||
U8 p,first=old_n<new_n?old_n:new_n;
|
||||
for(p=0;p<2;++p){gime_fill_rect(112+(unsigned)first*6,132,12,8,1);text(112+(unsigned)first*6,132,answer+first,7);text(112+(unsigned)new_n*6,132,"_",6);present();}
|
||||
}
|
||||
static U8 typed_answer(void)
|
||||
{
|
||||
U8 c,n=0,result,old_n;answer[0]=0;spelling_attempt=0;
|
||||
question_screen();input_screen(0);question_screen();input_screen(0);release_keys();
|
||||
for(;;){
|
||||
c=next_key();release_keys();
|
||||
if(c==3 || c==27){strcpy(answer,"[revealed]");return 0;}
|
||||
if(c==8 || c==127){old_n=n;if(n)answer[--n]=0;input_edit(old_n,n);}
|
||||
else if(c==13 || c==10){
|
||||
result=classify(current_bone,answer);if(result==2)return 1;if(result==0)return 0;
|
||||
question_screen();phase=2;
|
||||
text(112,133,"That looks close.",6);text(112,144,"Check your spelling.",7);
|
||||
text(112,158,"R:retry V:reveal",7);text(112,171,"No point awarded yet.",2);
|
||||
present();c=choose("RV");if(c=='V')return 0;spelling_attempt=1;
|
||||
question_screen();input_screen(0);question_screen();input_screen(0);release_keys();
|
||||
}else if((c>='a' && c<='z')||(c>='A' && c<='Z')||c==' '||c=='.'||c=='-'){
|
||||
/* 33 visible characters fit beside the full-body overview. */
|
||||
if(n<33){old_n=n;answer[n++]=c;answer[n]=0;input_edit(old_n,n);}
|
||||
else{input_screen(1);input_screen(1);}
|
||||
}
|
||||
}
|
||||
}
|
||||
static void answer_sound(U8 right)
|
||||
{
|
||||
setHighSpeed(FALSE);if(right){sound(170,2);sound(210,3);}else{sound(100,3);sound(60,4);}setHighSpeed(TRUE);
|
||||
}
|
||||
static void feedback(U8 right)
|
||||
{
|
||||
question_screen();phase=3;
|
||||
text(112,134,right?"CORRECT!":"NOT THIS TIME.",right?6:5);
|
||||
text(112,147,bones[current_bone].name,7);
|
||||
text(112,162,mode==1?"Next follows automatically.":"SPACE: next question",2);
|
||||
present();answer_sound(right);if(mode==1)delay(90);else choose(" ");
|
||||
}
|
||||
static U8 results(void)
|
||||
{
|
||||
U8 c,i,page,start,missed=BONE_COUNT-score;
|
||||
for(;;){
|
||||
phase=4;frame("YOUR RESULTS");show_skeleton(255,1);
|
||||
text(112,35,"SKELETON COMPLETE",6);
|
||||
sprintf(line,"%u / %u correct %u%%",(unsigned)score,BONE_COUNT,(unsigned)score*100/BONE_COUNT);text(112,55,line,7);
|
||||
sprintf(line,"%u spelling corrections",(unsigned)corrections);text(112,77,line,2);
|
||||
sprintf(line,"%u topics to revisit",(unsigned)missed);text(112,93,line,7);
|
||||
text(112,118,"R REVIEW MISSED BONES",6);text(112,138,"P PLAY AGAIN",7);text(112,158,"Q QUIT TO BASIC",7);
|
||||
text(8,183,"Every topic once. Keep learning!",2);present();c=choose("RPQ");if(c!='R')return c;
|
||||
page=0;start=0;
|
||||
for(;;){
|
||||
phase=6;frame("MISSED BONES");sprintf(line,"Review page %u",(unsigned)page+1);text(8,19,line,6);i=start;c=0;
|
||||
while(i<BONE_COUNT && c<3){
|
||||
if(!correct[order[i]]){
|
||||
text(8,39+c*43,bones[order[i]].name,6);
|
||||
sprintf(line,"You: %s",responses[order[i]][0]?(const char *)responses[order[i]]:"[blank]");text(8,50+c*43,line,7);
|
||||
sprintf(line,"Answer: %s",bones[order[i]].name);text(8,61+c*43,line,2);++c;
|
||||
}++i;
|
||||
}
|
||||
while(i<BONE_COUNT && correct[order[i]])++i;
|
||||
if(!missed)text(8,60,"A perfect skeleton! No missed bones.",7);
|
||||
text(8,180,i<BONE_COUNT?"N NEXT PAGE B BACK TO RESULTS":"B BACK TO RESULTS",6);present();c=choose(i<BONE_COUNT?"NB":"B");if(c=='B')break;start=i;++page;
|
||||
}
|
||||
}
|
||||
}
|
||||
int main(void)
|
||||
{
|
||||
U8 c,right;unsigned seed;
|
||||
if(!gime_open()){printf("Requires 512 KB CoCo 3 in BASIC.\n");return 1;}
|
||||
setHighSpeed(TRUE);
|
||||
gime_set_palette(0,1);gime_set_palette(1,3);gime_set_palette(2,56);gime_set_palette(3,28);
|
||||
gime_set_palette(4,14);gime_set_palette(5,39);gime_set_palette(6,54);gime_set_palette(7,63);
|
||||
for(;;){
|
||||
c=title();if(c=='Q')break;mode=c-'0';seed=entropy^getTimer();
|
||||
#ifdef TEST_SEED
|
||||
seed=TEST_SEED;
|
||||
#endif
|
||||
quiz_start(seed);
|
||||
for(question=0;question<BONE_COUNT;++question){current_bone=order[question];spelling_attempt=0;right=mode==1?multiple_choice():typed_answer();quiz_record(current_bone,answer,right,spelling_attempt);feedback(right);}
|
||||
if(results()=='Q')break;
|
||||
}
|
||||
release_keys();close_input();gime_close();setHighSpeed(FALSE);printf("Thanks for playing Bone Quest!\n");return 0;
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
#ifndef BONE_MAP_DATA_H
|
||||
#define BONE_MAP_DATA_H
|
||||
#define BONE_MAP_WIDTH 64
|
||||
#define BONE_MAP_HEIGHT 149
|
||||
#define BONE_VIEW_COUNT 6
|
||||
/* Spans are (y,x,length) triples. Offsets index bytes, 26 entries per view.
|
||||
bone_boxes is [25][4]: xmin,ymin,width,height in overview pixels.
|
||||
View IDs: 0 overview,1 head/neck,2 hand,3 foot,4 lower spine/pelvis,5 chest.
|
||||
A zero detail-view selector asks the UI to magnify the current overview crop. */
|
||||
extern const unsigned char bone_spans[];
|
||||
extern const unsigned bone_offsets[26];
|
||||
extern const unsigned char bone_boxes[25][4];
|
||||
extern const unsigned char bone_detail_view[25];
|
||||
extern const unsigned char bone_view_widths[6],bone_view_heights[6];
|
||||
extern const unsigned char * const bone_view_spans[BONE_VIEW_COUNT];
|
||||
extern const unsigned * const bone_view_offsets[BONE_VIEW_COUNT];
|
||||
#endif
|
||||
@@ -0,0 +1,18 @@
|
||||
#ifndef QUIZ_H
|
||||
#define QUIZ_H
|
||||
#define BONE_COUNT 25
|
||||
#define ANSWER_SIZE 40
|
||||
typedef unsigned char U8;
|
||||
typedef struct { const char *name; const char *hint; const char *aliases; } Bone;
|
||||
extern const Bone bones[BONE_COUNT];
|
||||
extern U8 order[BONE_COUNT], options[4], question, score, corrections;
|
||||
extern U8 answered[BONE_COUNT], correct[BONE_COUNT], corrected[BONE_COUNT];
|
||||
extern char responses[BONE_COUNT][ANSWER_SIZE];
|
||||
extern unsigned random_state;
|
||||
void quiz_start(unsigned seed);
|
||||
unsigned quiz_random(unsigned bound);
|
||||
void quiz_options(U8 bone);
|
||||
void normalize(const char *in,char *out);
|
||||
U8 classify(U8 bone,const char *answer);
|
||||
void quiz_record(U8 bone,const char *answer,U8 right,U8 spelling);
|
||||
#endif
|
||||
@@ -0,0 +1,29 @@
|
||||
/* Generated from data/bones.json; labels/codes remain in the authoring data. */
|
||||
#include "quiz.h"
|
||||
const Bone bones[BONE_COUNT] = {
|
||||
{"Cranium", "Head above the lower jaw", "skull"},
|
||||
{"Mandible", "Lower jaw", "lower jaw|jawbone"},
|
||||
{"Clavicle", "Front of the shoulder", "collarbone|collar bone"},
|
||||
{"Scapula", "Back of the shoulder", "shoulder blade|shoulderblade"},
|
||||
{"Sternum", "Center of the chest", "breastbone|breast bone"},
|
||||
{"Ribs", "Curving around the chest", "rib|rib bones"},
|
||||
{"Cervical vertebrae", "Neck section of the spine", "neck vertebrae|cervical vertebra"},
|
||||
{"Thoracic vertebrae", "Upper and middle back", "thoracic vertebra"},
|
||||
{"Lumbar vertebrae", "Lower back", "lumbar vertebra|lower back vertebrae"},
|
||||
{"Sacrum", "Base of spine above tailbone", "sacral bone"},
|
||||
{"Coccyx", "Small tip below the sacrum", "tailbone|tail bone"},
|
||||
{"Pelvic girdle", "Hip region, on either side", "hip bones|hip girdle|coxal bones"},
|
||||
{"Humerus", "Upper arm", "upper arm bone"},
|
||||
{"Radius", "Forearm, thumb side", "radius bone"},
|
||||
{"Ulna", "Forearm, little-finger side", "ulna bone"},
|
||||
{"Carpals", "Wrist", "wrist bones|carpal bones"},
|
||||
{"Metacarpals", "Palm between wrist and fingers", "palm bones|metacarpal bones"},
|
||||
{"Finger phalanges", "Digits of the hand", "finger bones|hand phalanges"},
|
||||
{"Femur", "Thigh", "thighbone|thigh bone"},
|
||||
{"Patella", "Front of the knee", "kneecap|knee cap"},
|
||||
{"Tibia", "Lower leg, inner side", "shinbone|shin bone"},
|
||||
{"Fibula", "Lower leg, outer side", "calf bone|calfbone"},
|
||||
{"Tarsals", "Rear foot and ankle", "ankle bones|tarsal bones"},
|
||||
{"Metatarsals", "Mid-foot behind the toes", "metatarsal bones"},
|
||||
{"Toe phalanges", "Digits of the foot", "toe bones|foot phalanges"},
|
||||
};
|
||||
@@ -0,0 +1,298 @@
|
||||
/* Generated by tools/prepare_assets.py from LadyofHats public-domain SVG. */
|
||||
#include "map_data.h"
|
||||
|
||||
const unsigned char bone_spans[] = {
|
||||
0,23,7,1,22,9,2,21,11,3,20,13,4,20,13,5,20,13,6,20,13,7,20,2,
|
||||
7,26,1,7,31,2,8,20,2,8,26,1,8,32,1,9,20,2,9,26,1,9,32,1,
|
||||
10,20,2,10,25,1,10,32,1,11,20,1,11,22,4,11,28,3,11,32,1,12,23,2,
|
||||
12,28,2,13,23,3,13,27,3,14,23,7,15,23,7,16,24,5,11,21,1,11,31,1,
|
||||
12,20,3,12,30,3,13,21,2,13,30,3,14,21,2,14,30,3,15,21,2,15,30,2,
|
||||
16,21,3,16,29,3,17,22,10,18,22,9,19,24,6,22,13,1,23,12,11,23,33,9,
|
||||
24,13,2,24,16,9,24,29,12,25,23,2,25,28,4,23,11,1,24,10,3,24,41,2,
|
||||
25,10,7,25,19,1,25,37,7,26,11,6,26,36,7,27,13,5,27,36,5,28,14,4,
|
||||
28,36,4,29,14,3,29,19,1,29,37,3,30,14,3,30,37,3,31,13,3,31,37,4,
|
||||
32,13,3,32,34,2,32,38,2,33,14,2,33,38,2,34,14,1,34,38,1,35,14,1,
|
||||
35,17,2,35,35,1,25,25,3,26,24,6,27,24,5,28,24,5,29,25,4,30,25,4,
|
||||
31,25,4,32,25,3,33,25,4,34,25,3,35,25,3,36,25,3,37,25,3,38,26,2,
|
||||
39,26,2,40,26,2,41,26,1,23,23,2,23,29,3,25,20,3,25,32,1,26,18,6,
|
||||
26,30,5,27,18,6,27,29,7,28,18,6,28,29,7,29,17,2,29,20,5,29,29,8,
|
||||
30,17,6,30,31,6,31,16,9,31,29,8,32,16,9,32,28,6,32,36,2,33,16,6,
|
||||
33,24,1,33,29,1,33,32,6,34,15,10,34,28,10,35,15,2,35,19,6,35,28,7,
|
||||
35,36,3,36,15,10,36,28,10,37,14,11,37,28,11,38,15,11,38,28,3,38,32,7,
|
||||
39,15,10,39,28,4,39,34,5,40,14,11,40,28,11,41,14,11,41,28,11,42,14,10,
|
||||
42,29,10,43,14,6,43,21,4,43,28,4,43,33,4,43,38,2,44,14,10,44,29,4,
|
||||
44,35,5,45,14,8,45,28,1,45,30,9,46,14,7,46,23,1,46,28,3,46,32,7,
|
||||
47,14,9,47,30,9,48,14,8,48,23,1,48,28,2,48,31,8,49,14,10,49,29,3,
|
||||
49,33,6,50,15,3,50,20,3,50,31,2,50,35,3,51,15,1,51,18,3,51,32,2,
|
||||
51,37,1,52,33,1,19,23,1,20,23,7,21,23,8,22,23,8,23,25,3,23,28,1,
|
||||
24,25,3,39,25,1,40,25,1,41,25,1,41,27,1,42,25,3,43,25,3,44,24,4,
|
||||
45,24,4,46,24,4,47,24,4,48,24,4,49,26,1,49,24,2,49,27,2,50,23,6,
|
||||
51,24,5,52,24,5,53,23,7,54,24,5,55,23,8,56,24,5,57,23,7,58,24,5,
|
||||
59,23,8,60,23,7,61,24,5,62,25,3,60,22,1,60,30,1,61,22,2,61,29,2,
|
||||
62,21,4,62,28,3,63,22,9,64,23,7,65,23,6,66,24,5,67,25,2,67,27,1,
|
||||
68,26,1,69,26,1,56,17,2,56,32,5,57,15,7,57,31,7,58,14,9,58,30,9,
|
||||
59,14,9,59,31,9,60,13,9,60,31,9,61,13,9,61,31,9,62,13,8,62,31,9,
|
||||
63,14,8,63,31,8,64,15,7,64,31,7,65,16,5,65,31,6,66,16,6,66,30,7,
|
||||
67,16,6,67,30,6,68,17,6,68,30,5,69,18,6,69,29,5,70,19,2,70,22,12,
|
||||
71,19,3,71,23,6,71,31,3,72,19,15,73,20,4,73,28,5,27,10,3,27,41,3,
|
||||
28,9,5,28,40,5,29,8,6,29,40,5,30,8,6,30,40,5,31,8,5,31,42,4,
|
||||
32,8,4,32,42,4,33,8,4,33,43,3,34,8,3,34,43,3,35,8,3,35,43,3,
|
||||
36,7,3,36,43,3,37,7,3,37,43,3,38,7,3,38,43,3,39,7,3,39,43,3,
|
||||
40,6,3,40,44,2,41,6,3,41,44,2,42,5,4,42,44,3,43,5,3,43,44,3,
|
||||
44,5,3,44,44,3,45,4,4,45,44,3,46,4,3,46,44,3,47,4,3,47,44,4,
|
||||
48,3,4,48,44,4,49,3,4,49,44,5,50,2,5,50,44,5,51,1,7,51,44,6,
|
||||
52,2,6,52,43,6,53,6,1,53,44,2,52,49,1,53,1,3,53,48,2,54,2,2,
|
||||
54,48,2,55,2,3,55,48,2,56,2,3,56,48,3,57,3,2,57,49,2,58,4,2,
|
||||
58,49,3,59,4,2,59,49,3,60,4,2,60,50,3,61,4,2,61,50,3,62,4,2,
|
||||
62,51,2,63,4,2,63,51,3,64,4,2,64,51,3,65,4,2,65,52,2,66,4,2,
|
||||
66,52,3,67,4,2,67,52,3,68,4,2,68,52,3,69,4,2,69,52,4,70,4,2,
|
||||
70,52,4,71,3,3,71,52,4,72,3,3,72,53,1,73,4,2,53,4,2,53,46,2,
|
||||
54,4,3,54,45,3,55,5,1,55,46,2,56,5,1,56,46,2,57,46,3,58,3,1,
|
||||
58,46,3,59,3,1,59,47,2,60,2,2,60,47,3,61,2,2,61,47,3,62,2,2,
|
||||
62,48,2,63,2,2,63,48,2,64,2,2,64,48,2,65,2,2,65,48,3,66,2,2,
|
||||
66,49,2,67,1,3,67,49,2,68,1,3,68,49,2,69,1,2,69,50,2,70,1,2,
|
||||
70,50,2,71,1,2,71,50,2,72,1,2,72,51,1,73,1,1,72,52,1,72,54,3,
|
||||
73,2,2,73,51,5,74,1,5,74,51,3,74,55,1,75,1,5,73,56,4,74,54,1,
|
||||
74,56,2,75,6,2,75,51,7,76,1,5,76,7,2,76,51,5,76,57,1,77,0,7,
|
||||
77,52,4,77,57,1,78,0,3,78,4,3,78,52,7,79,0,3,79,4,1,79,6,2,
|
||||
79,54,1,80,0,8,73,60,1,74,60,2,75,61,2,76,62,2,77,8,2,78,9,2,
|
||||
79,9,2,79,52,2,79,55,4,80,52,7,81,0,8,81,53,7,82,1,7,82,53,7,
|
||||
83,1,7,83,54,6,84,1,7,84,54,1,84,56,4,85,1,6,85,56,3,86,3,4,
|
||||
86,58,1,87,3,3,88,4,1,67,15,1,67,36,1,68,13,4,68,35,2,68,38,2,
|
||||
69,12,6,69,34,6,70,12,5,70,34,7,71,11,6,71,36,5,72,12,5,72,36,5,
|
||||
73,12,5,73,35,5,74,13,4,74,35,5,75,13,4,75,36,3,76,14,3,76,35,4,
|
||||
77,14,3,77,35,4,78,14,4,78,35,3,79,14,4,79,35,3,80,15,3,80,34,4,
|
||||
81,15,3,81,34,4,82,15,4,82,34,4,83,15,4,83,33,4,84,16,3,84,33,4,
|
||||
85,16,3,85,33,4,86,16,4,86,33,3,87,16,4,87,32,4,88,17,3,88,32,4,
|
||||
89,17,4,89,32,4,90,17,4,90,32,3,91,17,4,91,31,4,92,18,4,92,31,4,
|
||||
93,18,4,93,31,4,94,18,4,94,30,4,95,18,5,95,30,4,96,18,5,96,30,4,
|
||||
97,18,5,97,30,4,98,18,6,98,29,5,99,18,6,99,29,5,100,18,6,100,28,6,
|
||||
101,18,7,101,28,7,102,17,9,102,27,8,103,17,9,103,27,8,104,17,3,104,22,4,
|
||||
104,27,3,104,33,2,105,17,2,105,23,2,105,27,2,105,34,1,106,28,1,104,20,2,
|
||||
104,30,3,105,19,4,105,29,5,106,18,6,106,29,5,107,19,4,107,29,5,108,20,2,
|
||||
108,30,3,106,17,1,106,24,1,106,27,1,106,34,1,107,17,2,107,23,2,107,27,2,
|
||||
107,34,1,108,17,3,108,22,4,108,27,3,108,33,2,109,18,7,109,27,8,110,18,7,
|
||||
110,27,7,111,19,6,111,27,6,112,19,6,112,28,5,113,20,5,113,28,5,114,20,4,
|
||||
114,28,4,115,20,4,115,28,4,116,20,4,116,28,4,117,20,4,117,28,4,118,20,4,
|
||||
118,28,4,119,20,4,119,28,4,120,20,4,120,28,4,121,20,4,121,28,4,122,20,4,
|
||||
122,28,4,123,20,4,123,28,4,124,21,3,124,28,4,125,21,4,125,28,3,126,21,4,
|
||||
126,28,3,127,21,4,127,28,3,128,21,3,128,28,3,129,21,3,129,28,3,130,21,4,
|
||||
130,27,4,131,21,4,131,27,4,132,21,4,132,27,4,133,21,4,133,27,4,134,21,4,
|
||||
134,27,4,135,21,10,136,21,10,137,21,10,138,22,3,138,26,3,109,17,1,110,17,1,
|
||||
110,34,1,111,17,2,111,33,2,112,17,2,112,33,2,113,17,2,113,33,2,114,17,2,
|
||||
114,33,2,115,18,1,115,33,2,116,18,2,116,33,2,117,18,2,117,33,1,118,18,2,
|
||||
118,32,2,119,18,2,119,32,2,120,18,2,120,32,2,121,18,2,121,32,2,122,18,2,
|
||||
122,32,2,123,19,1,123,32,2,124,19,2,124,32,1,125,19,2,125,31,2,126,19,2,
|
||||
126,31,2,127,19,2,127,31,2,128,19,2,128,31,2,129,19,2,129,31,2,130,19,2,
|
||||
130,31,2,131,20,1,131,31,1,132,20,1,132,31,1,133,19,2,133,31,2,134,19,2,
|
||||
134,31,1,135,20,1,135,31,1,136,19,2,136,31,2,137,19,2,137,31,2,138,20,2,
|
||||
138,29,3,139,19,6,139,26,7,140,22,3,140,26,4,141,23,2,141,26,3,142,24,1,
|
||||
142,27,1,140,18,4,140,30,5,141,17,6,141,29,6,142,16,8,142,28,8,143,16,8,
|
||||
143,28,8,144,19,3,144,30,3,143,15,1,143,36,1,144,14,5,144,33,5,145,13,8,
|
||||
145,31,8,146,13,7,146,31,8,147,14,5,147,33,5,148,34,1,148,36,1,
|
||||
};
|
||||
|
||||
const unsigned bone_offsets[] = {
|
||||
0,90,135,159,246,297,534,549,591,636,669,678,786,948,1074,1194,1218,1278,1353,1605,1635,1842,2013,2043,
|
||||
2073,2109,
|
||||
};
|
||||
|
||||
static const unsigned char head_spans[] = {
|
||||
1,16,6,2,12,14,3,10,18,4,8,22,5,7,24,6,6,26,7,5,28,8,5,29,
|
||||
9,4,30,10,3,32,11,3,32,12,2,34,13,2,34,14,2,34,15,2,34,16,2,34,
|
||||
17,2,34,18,2,34,19,2,9,19,13,23,20,2,6,20,17,5,20,30,2,20,33,3,
|
||||
21,2,5,21,17,4,21,31,5,22,2,4,22,17,4,22,32,4,23,3,3,23,17,4,
|
||||
23,32,3,24,3,3,24,17,4,24,32,3,25,3,3,25,17,4,25,32,3,26,3,3,
|
||||
26,17,4,26,32,3,27,3,3,27,16,4,27,32,4,28,2,4,28,15,2,28,22,1,
|
||||
28,31,5,29,2,5,29,14,2,29,22,2,29,30,6,30,2,15,30,21,15,31,3,1,
|
||||
31,7,10,31,21,10,31,34,1,32,8,8,32,21,8,32,34,1,33,8,8,33,22,7,
|
||||
34,9,7,34,22,7,35,9,7,35,19,1,35,21,8,36,9,20,37,10,18,38,11,17,
|
||||
39,10,18,40,10,18,41,10,18,42,11,17,43,12,15,44,15,10,31,4,3,31,31,3,
|
||||
32,3,5,32,29,5,33,3,5,33,29,5,34,3,6,34,29,5,35,4,5,35,29,5,
|
||||
36,4,5,36,29,5,37,4,5,37,29,5,38,4,5,38,29,5,39,5,4,39,29,5,
|
||||
40,5,5,40,29,4,41,5,5,41,29,4,42,6,5,42,28,5,43,6,6,43,27,6,
|
||||
44,6,9,44,25,7,45,6,26,46,6,25,47,7,23,48,9,20,49,10,18,50,12,15,
|
||||
51,14,12,60,0,1,61,0,9,62,0,12,62,31,7,63,0,14,63,26,12,64,0,15,
|
||||
64,24,14,59,9,1,59,28,2,60,8,7,60,24,7,61,9,6,61,24,8,62,13,2,
|
||||
62,24,2,62,29,2,50,11,1,51,11,3,51,26,2,52,11,17,53,11,16,54,11,17,
|
||||
55,11,17,56,10,19,57,9,20,58,9,20,59,10,18,60,15,8,61,15,8,60,23,1,
|
||||
61,23,1,62,15,9,63,15,9,64,15,8,
|
||||
};
|
||||
|
||||
static const unsigned head_offsets[] = {
|
||||
0,234,339,363,363,363,390,429,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,
|
||||
444,444,
|
||||
};
|
||||
|
||||
static const unsigned char hand_spans[] = {
|
||||
0,18,12,1,18,12,2,18,13,3,18,13,4,18,13,5,18,12,6,18,11,7,19,6,
|
||||
0,11,6,1,11,6,2,11,6,3,12,6,4,12,6,5,12,6,6,13,5,7,13,3,
|
||||
8,13,2,7,17,2,7,25,6,8,17,14,9,16,18,10,16,18,11,15,19,12,15,17,
|
||||
13,15,15,14,15,15,15,16,8,16,19,2,9,35,2,10,34,11,11,34,12,12,32,14,
|
||||
13,30,8,13,42,3,14,30,5,14,43,1,15,24,4,15,31,4,16,16,3,16,21,2,
|
||||
16,24,5,16,31,4,17,16,7,17,24,5,17,32,3,18,16,13,18,33,2,19,16,8,
|
||||
19,25,4,19,33,3,20,16,3,20,20,5,20,26,3,20,33,3,21,16,3,21,21,3,
|
||||
21,26,4,21,33,3,22,16,4,22,21,3,22,27,3,22,33,4,23,16,4,23,22,3,
|
||||
23,27,3,23,34,3,24,16,4,24,22,3,24,27,4,24,34,4,25,17,3,25,22,3,
|
||||
25,28,3,25,34,4,26,17,3,26,23,3,26,28,4,26,34,5,27,17,3,27,23,3,
|
||||
27,28,4,27,34,5,28,17,4,28,23,4,28,28,5,28,34,5,29,17,5,29,23,11,
|
||||
29,35,4,30,17,5,30,23,11,30,35,1,31,18,1,31,23,5,31,29,5,32,24,2,
|
||||
32,30,2,12,46,2,13,45,4,14,44,6,15,45,6,16,47,6,17,49,5,18,50,5,
|
||||
19,50,5,20,51,6,21,53,4,22,54,4,23,55,2,30,36,4,31,19,3,31,35,5,
|
||||
32,18,4,32,26,3,32,32,8,33,18,4,33,24,5,33,30,5,33,36,4,34,19,3,
|
||||
34,24,5,34,30,5,34,37,3,35,20,3,35,25,4,35,31,4,35,37,4,36,20,3,
|
||||
36,26,4,36,31,4,36,37,4,37,20,3,37,26,4,37,32,3,37,38,3,38,21,3,
|
||||
38,26,4,38,32,4,38,38,4,39,21,3,39,27,3,39,32,4,39,38,4,40,21,4,
|
||||
40,27,3,40,33,3,40,38,4,41,21,4,41,27,4,41,33,4,41,38,4,42,22,3,
|
||||
42,27,4,42,33,4,42,39,3,43,22,4,43,27,5,43,33,5,43,39,3,44,23,3,
|
||||
44,28,4,44,34,4,44,40,2,45,23,3,45,28,4,45,34,4,45,40,3,46,24,3,
|
||||
46,29,4,46,35,3,46,40,3,47,25,2,47,30,3,47,35,3,47,40,3,48,25,3,
|
||||
48,30,4,48,36,3,48,40,3,49,26,1,49,31,3,49,36,3,49,41,2,50,31,4,
|
||||
50,36,4,50,41,3,51,32,3,51,36,4,51,41,2,52,32,3,52,37,3,53,33,2,
|
||||
53,38,3,54,33,2,54,38,3,55,38,3,
|
||||
};
|
||||
|
||||
static const unsigned hand_offsets[] = {
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,51,84,291,588,588,588,588,588,588,
|
||||
588,588,
|
||||
};
|
||||
|
||||
static const unsigned char foot_spans[] = {
|
||||
0,3,19,1,3,19,2,3,19,3,2,20,4,2,20,5,2,20,6,2,20,7,2,20,
|
||||
8,1,21,9,1,20,10,1,20,11,1,18,12,1,17,13,2,15,14,2,14,15,2,7,
|
||||
16,2,5,17,3,3,0,22,6,1,22,6,2,22,6,3,22,6,4,22,7,5,22,7,
|
||||
6,22,7,7,22,7,8,22,7,9,22,8,10,23,6,11,24,5,12,26,3,9,21,1,
|
||||
10,21,2,11,19,5,12,18,8,13,17,9,14,16,10,15,9,17,16,7,18,17,6,21,
|
||||
18,3,25,19,3,27,20,3,30,21,3,31,22,3,22,22,26,4,22,31,4,23,4,20,
|
||||
23,27,1,23,32,3,24,3,15,24,21,2,24,33,1,25,3,14,26,3,13,27,3,12,
|
||||
28,3,12,29,3,12,30,3,10,31,3,9,32,5,6,33,6,4,34,7,3,35,7,3,
|
||||
36,8,2,22,25,1,22,30,1,23,24,3,23,28,4,23,35,2,24,18,3,24,23,10,
|
||||
24,34,4,25,17,21,26,16,23,27,15,25,28,15,26,29,15,26,30,13,29,31,12,31,
|
||||
32,11,33,33,10,9,33,21,24,34,10,10,34,22,24,35,10,10,35,23,23,36,10,11,
|
||||
36,24,23,37,10,12,37,25,23,38,11,12,38,26,20,39,13,11,39,27,19,40,15,11,
|
||||
40,29,10,40,42,1,41,17,11,41,29,7,42,18,16,43,19,14,44,20,9,45,21,7,
|
||||
46,22,5,47,22,4,48,23,2,49,24,1,38,46,4,39,46,5,40,39,3,40,43,9,
|
||||
41,36,17,42,34,20,43,33,23,44,29,2,44,32,24,45,28,3,45,32,25,46,27,20,
|
||||
46,48,9,47,26,6,47,33,15,47,49,9,48,25,8,48,34,14,48,50,5,48,56,3,
|
||||
49,25,8,49,36,19,49,56,3,50,25,9,50,37,13,50,51,4,50,57,1,51,25,10,
|
||||
51,38,12,51,53,3,52,29,7,52,39,11,52,54,3,53,30,6,53,39,7,53,47,4,
|
||||
53,54,3,54,30,8,54,40,6,54,48,4,54,55,1,55,30,8,55,41,6,55,49,4,
|
||||
56,31,7,56,43,5,56,49,4,57,32,7,57,44,4,57,50,3,58,33,7,58,45,4,
|
||||
59,36,4,59,45,4,60,36,4,60,47,1,61,37,2,
|
||||
};
|
||||
|
||||
static const unsigned foot_offsets[] = {
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,93,195,
|
||||
324,495,
|
||||
};
|
||||
|
||||
static const unsigned char spine_spans[] = {
|
||||
0,0,1,0,3,6,0,27,5,1,2,6,1,10,2,1,22,2,1,28,6,2,0,7,
|
||||
2,9,3,2,22,3,2,29,5,3,0,6,3,8,4,3,22,4,3,30,4,4,0,4,
|
||||
4,7,5,4,22,6,4,31,3,5,0,2,5,6,4,5,24,5,5,33,1,6,4,5,
|
||||
6,26,5,7,2,5,7,27,5,8,0,6,8,28,6,9,0,5,9,30,4,10,0,3,
|
||||
10,31,3,11,0,1,11,33,1,0,12,10,1,12,10,2,12,10,3,12,10,4,12,10,
|
||||
5,12,9,5,21,1,6,12,10,7,12,11,8,12,11,9,9,17,10,8,18,11,10,1,
|
||||
11,12,11,12,12,11,13,12,11,14,12,11,15,9,2,15,12,13,16,8,19,17,8,19,
|
||||
18,10,1,18,12,13,19,12,11,20,12,11,21,8,1,21,11,12,21,25,3,22,7,22,
|
||||
23,6,22,24,7,16,24,26,1,25,12,11,26,12,11,27,12,11,27,25,2,28,7,21,
|
||||
29,7,21,30,8,19,31,12,11,32,12,11,33,8,1,33,12,11,33,25,3,34,7,3,
|
||||
34,12,11,34,24,4,35,6,22,36,7,20,37,8,17,38,10,13,39,11,12,40,11,12,
|
||||
41,12,10,42,13,8,36,27,2,37,5,3,37,25,5,38,5,5,38,23,7,39,4,7,
|
||||
39,23,7,40,4,7,40,23,7,41,4,8,41,22,8,42,3,10,42,21,9,43,3,27,
|
||||
44,3,27,45,4,7,45,12,18,46,4,25,47,8,18,48,9,17,49,9,16,50,9,16,
|
||||
51,9,16,52,9,15,53,10,13,54,12,9,55,14,6,55,13,1,55,20,1,56,13,8,
|
||||
57,14,5,58,15,4,59,15,4,60,16,3,61,16,2,26,32,2,27,0,2,27,31,3,
|
||||
28,0,4,28,30,4,29,0,6,29,29,5,30,0,7,30,28,6,31,0,8,31,28,6,
|
||||
32,0,8,32,28,6,33,0,8,33,28,6,34,0,7,34,28,6,35,0,6,35,28,6,
|
||||
36,0,7,36,29,5,37,0,5,37,30,4,38,0,5,38,30,4,39,0,4,39,30,4,
|
||||
40,0,4,40,30,4,41,0,4,41,30,4,42,0,3,42,30,4,43,0,3,43,30,4,
|
||||
44,0,3,44,30,4,45,0,4,45,30,4,46,0,4,46,29,5,47,0,4,47,29,5,
|
||||
48,0,3,48,30,4,49,0,2,49,30,4,50,0,2,50,30,4,51,0,3,51,30,4,
|
||||
52,0,4,52,30,4,53,0,5,53,29,5,54,0,6,54,28,6,55,0,6,55,27,7,
|
||||
56,0,6,56,26,8,57,0,5,57,26,8,58,0,5,58,27,7,59,0,7,59,27,7,
|
||||
60,0,8,60,26,8,61,0,9,61,25,9,62,0,10,62,24,10,63,0,2,63,3,8,
|
||||
63,23,11,64,0,2,64,4,8,64,14,2,64,17,2,64,21,8,64,31,3,
|
||||
};
|
||||
|
||||
static const unsigned spine_offsets[] = {
|
||||
0,0,0,0,0,0,105,105,123,270,351,375,621,621,621,621,621,621,621,621,621,621,621,621,
|
||||
621,621,
|
||||
};
|
||||
|
||||
static const unsigned char chest_spans[] = {
|
||||
3,7,2,4,6,17,4,51,11,5,6,22,5,45,17,6,7,23,6,40,22,7,24,7,
|
||||
7,37,17,8,27,5,8,37,8,9,28,3,9,37,4,5,4,2,5,62,2,6,3,4,
|
||||
6,62,3,7,2,6,7,60,6,8,2,13,8,59,8,9,2,14,9,20,1,9,54,13,
|
||||
10,3,13,10,53,13,11,9,8,11,52,9,12,8,9,12,21,2,12,46,1,12,51,9,
|
||||
13,9,8,13,51,9,14,9,8,14,51,9,15,10,6,15,52,7,16,10,5,16,19,3,
|
||||
16,53,6,17,9,6,17,19,1,17,48,2,17,53,6,18,9,6,18,53,7,19,8,7,
|
||||
19,53,9,20,7,7,20,54,7,21,8,5,21,19,1,21,55,5,22,9,4,22,18,2,
|
||||
22,48,4,22,55,5,23,9,5,23,50,1,23,55,4,24,10,5,24,54,4,25,10,3,
|
||||
25,55,3,26,10,2,26,18,1,26,56,1,27,16,4,27,48,4,28,16,1,28,51,1,
|
||||
29,11,1,30,11,1,32,15,2,32,50,2,8,32,1,8,35,2,9,31,6,10,29,10,
|
||||
11,29,10,12,29,10,13,29,10,14,29,9,15,30,8,16,31,6,17,30,8,18,30,8,
|
||||
19,31,6,20,31,6,21,31,6,22,31,6,23,31,6,24,31,6,25,31,6,26,31,6,
|
||||
27,31,6,28,31,6,29,31,6,30,32,4,31,32,4,32,32,4,33,33,2,34,32,3,
|
||||
35,32,4,36,33,2,37,33,2,38,33,2,3,41,1,4,25,5,4,38,5,5,28,2,
|
||||
5,37,7,6,30,1,6,37,1,7,22,2,8,22,5,8,45,1,9,21,7,9,41,7,
|
||||
10,18,11,10,39,10,11,17,12,11,39,12,12,17,4,12,23,6,12,39,7,12,47,4,
|
||||
13,17,12,13,39,12,14,17,12,14,42,9,15,16,14,15,38,14,16,15,4,16,22,9,
|
||||
16,37,16,17,15,4,17,20,10,17,38,10,17,50,3,18,15,11,18,43,10,19,15,11,
|
||||
19,28,3,19,37,3,19,45,8,20,14,17,20,37,17,21,13,6,21,20,11,21,37,18,
|
||||
22,13,5,22,20,11,22,37,11,22,52,3,23,14,12,23,30,1,23,37,13,23,51,4,
|
||||
24,15,9,24,27,4,24,37,3,24,45,9,25,13,18,25,37,18,26,12,6,26,19,12,
|
||||
26,37,19,27,11,5,27,20,11,27,37,11,27,52,5,28,11,5,28,17,8,28,27,4,
|
||||
28,37,2,28,43,8,28,52,4,29,12,10,29,25,6,29,37,5,29,45,11,30,12,20,
|
||||
30,36,20,31,11,21,31,37,19,32,11,4,32,17,14,32,36,1,32,38,12,32,53,4,
|
||||
33,11,22,33,35,7,33,44,8,33,53,4,34,12,9,34,25,7,34,35,8,34,46,10,
|
||||
35,11,20,35,36,8,35,49,8,36,10,20,36,37,20,37,10,4,37,16,9,37,26,4,
|
||||
37,37,15,37,54,4,38,10,13,38,25,5,38,37,14,38,54,4,39,11,8,39,22,8,
|
||||
39,37,20,40,10,19,40,38,19,41,10,3,41,14,15,41,39,19,42,10,3,42,14,16,
|
||||
42,37,6,42,45,9,42,55,4,43,10,9,43,23,7,43,37,7,43,47,7,43,55,4,
|
||||
44,10,6,44,21,9,44,37,9,44,50,9,45,10,17,45,39,19,46,9,17,46,41,17,
|
||||
47,9,4,47,14,11,47,28,2,47,37,3,47,42,16,48,9,15,48,26,4,48,37,5,
|
||||
48,44,9,48,54,4,49,10,13,49,25,4,49,39,4,49,44,14,50,11,11,50,24,4,
|
||||
50,40,4,50,45,12,51,10,11,51,22,5,51,28,2,51,37,2,51,41,16,52,10,4,
|
||||
52,16,10,52,27,3,52,37,3,52,42,15,53,10,14,53,26,3,53,38,3,53,43,8,
|
||||
53,54,3,54,10,12,54,24,4,54,39,4,54,47,10,55,11,7,55,22,5,55,41,3,
|
||||
55,49,8,56,13,3,56,20,5,56,42,4,56,51,5,57,12,3,57,19,4,57,44,4,
|
||||
57,52,3,58,12,1,58,18,4,58,45,3,58,53,3,59,18,2,59,46,3,59,55,1,
|
||||
0,28,13,1,27,14,2,27,14,3,27,14,4,31,6,5,31,6,4,30,1,4,37,1,
|
||||
5,30,1,6,31,6,7,31,6,8,33,2,35,31,1,36,30,3,36,35,1,37,30,3,
|
||||
37,35,2,38,30,3,38,35,2,39,30,7,40,30,7,41,30,7,42,30,7,43,30,7,
|
||||
44,30,7,45,30,7,46,30,7,47,30,7,48,30,7,49,30,7,50,30,7,51,30,7,
|
||||
52,30,7,53,30,7,54,30,7,55,30,7,56,28,11,57,28,11,58,30,7,59,30,7,
|
||||
60,28,1,60,30,9,61,27,13,12,4,3,12,62,4,13,2,7,13,60,8,14,0,9,
|
||||
14,60,8,15,0,10,15,59,9,16,0,10,16,59,9,17,0,9,17,59,9,18,0,9,
|
||||
18,60,8,19,0,8,19,62,6,20,0,7,20,63,5,21,0,6,21,63,5,22,0,5,
|
||||
22,64,4,23,0,5,23,64,4,24,0,5,24,64,4,25,0,4,25,65,3,26,0,4,
|
||||
26,65,3,27,0,3,27,65,3,28,0,3,28,65,3,29,0,3,29,65,3,30,0,3,
|
||||
30,65,3,31,0,2,31,65,3,32,0,2,32,66,2,33,0,2,33,66,2,34,0,2,
|
||||
34,66,2,35,0,1,35,66,2,36,0,1,36,66,2,37,0,1,37,66,2,38,66,2,
|
||||
39,66,2,40,67,1,41,67,1,42,67,1,43,67,1,44,67,1,45,67,1,46,67,1,
|
||||
47,67,1,48,67,1,49,67,1,50,67,1,51,67,1,52,67,1,53,67,1,54,67,1,
|
||||
55,67,1,56,67,1,57,67,1,58,66,2,59,66,2,60,66,2,61,67,1,
|
||||
};
|
||||
|
||||
static const unsigned chest_offsets[] = {
|
||||
0,0,0,39,228,324,888,906,990,1017,1017,1017,1017,1245,1245,1245,1245,1245,1245,1245,1245,1245,1245,1245,
|
||||
1245,1245,
|
||||
};
|
||||
|
||||
const unsigned char bone_boxes[25][4] = {{20,0,13,17},{20,11,13,9},{12,22,30,4},{10,23,34,13},{24,25,6,17},{14,23,26,30},{23,19,8,5},{24,23,5,27},{23,49,8,14},{21,60,10,8},{26,67,2,3},{13,56,27,18},{1,27,49,27},{1,52,55,22},{1,53,51,21},{1,72,56,4},{0,73,60,8},{0,73,64,16},{11,67,30,40},{18,104,16,5},{17,106,18,33},{17,109,18,29},{19,138,14,5},{16,140,20,5},{13,143,26,6}};
|
||||
const unsigned char bone_detail_view[] = {
|
||||
1,1,5,5,5,5,1,5,4,4,4,4,0,0,0,2,2,2,0,0,0,0,3,3,
|
||||
3,
|
||||
};
|
||||
|
||||
const unsigned char bone_view_widths[] = {
|
||||
64,38,61,63,34,68,
|
||||
};
|
||||
|
||||
const unsigned char bone_view_heights[] = {
|
||||
149,65,65,65,65,62,
|
||||
};
|
||||
|
||||
const unsigned char * const bone_view_spans[BONE_VIEW_COUNT] = {bone_spans,head_spans,hand_spans,foot_spans,spine_spans,chest_spans};
|
||||
const unsigned * const bone_view_offsets[BONE_VIEW_COUNT] = {bone_offsets,head_offsets,hand_offsets,foot_offsets,spine_offsets,chest_offsets};
|
||||
@@ -0,0 +1,129 @@
|
||||
#include "quiz.h"
|
||||
#ifdef HOST_TEST
|
||||
#include <string.h>
|
||||
#else
|
||||
#include <cmoc.h>
|
||||
#endif
|
||||
U8 order[BONE_COUNT], options[4], question, score, corrections;
|
||||
U8 answered[BONE_COUNT], correct[BONE_COUNT], corrected[BONE_COUNT];
|
||||
char responses[BONE_COUNT][ANSWER_SIZE];
|
||||
unsigned random_state;
|
||||
static U8 distance_rows[3][ANSWER_SIZE];
|
||||
static U8 previous_correct_slot=4;
|
||||
unsigned quiz_random(unsigned bound)
|
||||
{
|
||||
unsigned x, limit;
|
||||
limit = 65535u - (65535u % bound);
|
||||
do {
|
||||
x = random_state;
|
||||
x ^= x << 7; x &= 65535u;
|
||||
x ^= x >> 9;
|
||||
x ^= x << 8; x &= 65535u;
|
||||
random_state = x;
|
||||
--x;
|
||||
} while (x >= limit);
|
||||
return x % bound;
|
||||
}
|
||||
void quiz_start(unsigned seed)
|
||||
{
|
||||
U8 i,j,t;
|
||||
random_state = seed ? seed : 0xACE1;
|
||||
question=score=corrections=0;
|
||||
previous_correct_slot=4;
|
||||
memset(answered,0,sizeof(answered));
|
||||
memset(correct,0,sizeof(correct));
|
||||
memset(corrected,0,sizeof(corrected));
|
||||
memset(responses,0,sizeof(responses));
|
||||
for(i=0;i<BONE_COUNT;++i) order[i]=i;
|
||||
for(i=BONE_COUNT-1;i>0;--i) {
|
||||
j=(U8)quiz_random(i+1);t=order[i];order[i]=order[j];order[j]=t;
|
||||
}
|
||||
}
|
||||
void quiz_options(U8 state)
|
||||
{
|
||||
U8 i,j,c,t,slot;
|
||||
/* First question: all four slots. Later: equally choose the other three. */
|
||||
slot=(U8)quiz_random(previous_correct_slot<4?3:4);
|
||||
if(previous_correct_slot<4 && slot>=previous_correct_slot) ++slot;
|
||||
options[0]=state;
|
||||
for(i=1;i<4;++i) {
|
||||
do {
|
||||
c=(U8)quiz_random(BONE_COUNT);
|
||||
for(j=0;j<i && options[j]!=c;++j) {}
|
||||
} while(j<i);
|
||||
options[i]=c;
|
||||
}
|
||||
/* Shuffle the distractors, then put the correct answer in its chosen slot. */
|
||||
for(i=3;i>1;--i) {
|
||||
j=1+(U8)quiz_random(i);t=options[i];options[i]=options[j];options[j]=t;
|
||||
}
|
||||
t=options[slot];options[slot]=state;options[0]=t;
|
||||
previous_correct_slot=slot;
|
||||
}
|
||||
void normalize(const char *in,char *out)
|
||||
{
|
||||
U8 n=0,space=0,c;
|
||||
while((c=(U8)*in++)!=0 && n<ANSWER_SIZE-1) {
|
||||
if(c==' ' || c=='\t' || c=='\r' || c=='\n') { if(n) space=1; }
|
||||
else {
|
||||
if(space && n<ANSWER_SIZE-1) out[n++]=' ';
|
||||
space=0;
|
||||
if(c>='A' && c<='Z') c += 'a'-'A';
|
||||
if(n<ANSWER_SIZE-1) out[n++]=c;
|
||||
}
|
||||
}
|
||||
out[n]=0;
|
||||
}
|
||||
static U8 distance(const char *a,const char *b)
|
||||
{
|
||||
U8 i,j,n=(U8)strlen(a),m=(U8)strlen(b),v,cost,d;
|
||||
U8 *now,*prev,*older;
|
||||
for(j=0;j<=m;++j) distance_rows[0][j]=j;
|
||||
for(i=1;i<=n;++i) {
|
||||
now=distance_rows[i%3];prev=distance_rows[(i-1)%3];older=distance_rows[(i+1)%3];
|
||||
now[0]=i;
|
||||
for(j=1;j<=m;++j) {
|
||||
cost=a[i-1]==b[j-1]?0:1;
|
||||
v=prev[j]+1;d=now[j-1]+1;if(d<v)v=d;
|
||||
d=prev[j-1]+cost;if(d<v)v=d;
|
||||
if(i>1 && j>1 && a[i-1]==b[j-2] && a[i-2]==b[j-1]) {
|
||||
d=older[j-2]+1;if(d<v)v=d;
|
||||
}
|
||||
now[j]=v;
|
||||
}
|
||||
}
|
||||
return distance_rows[n%3][m];
|
||||
}
|
||||
/* Accepted aliases are explicit; ambiguous bare "phalanges" is not guessed. */
|
||||
static U8 matches(U8 bone,const char *a)
|
||||
{
|
||||
char b[ANSWER_SIZE];const char *p;U8 n;
|
||||
normalize(bones[bone].name,b);if(!strcmp(a,b))return 1;
|
||||
p=bones[bone].aliases;
|
||||
while(*p) {
|
||||
n=0;while(*p && *p!='|'){if(n<ANSWER_SIZE-1)b[n++]=*p;++p;}
|
||||
b[n]=0;if(!strcmp(a,b))return 1;
|
||||
if(*p=='|')++p;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
U8 classify(U8 bone,const char *answer)
|
||||
{
|
||||
char a[ANSWER_SIZE],b[ANSWER_SIZE];U8 i,n,m,d;
|
||||
normalize(answer,a);
|
||||
if(matches(bone,a))return 2;
|
||||
/* A different bone's exact name or alias is wrong, not a spelling retry. */
|
||||
for(i=0;i<BONE_COUNT;++i)if(matches(i,a))return 0;
|
||||
normalize(bones[bone].name,b);n=(U8)strlen(a);m=(U8)strlen(b);
|
||||
if(n<3 || m<4)return 0;
|
||||
d=distance(a,b);return d<=(m>=9?2:1)?1:0;
|
||||
}
|
||||
|
||||
void quiz_record(U8 state,const char *answer,U8 right,U8 spelling)
|
||||
{
|
||||
if(answered[state]) return;
|
||||
answered[state]=1;correct[state]=right;corrected[state]=right && spelling;
|
||||
strncpy(responses[state],answer,ANSWER_SIZE-1);responses[state][ANSWER_SIZE-1]=0;
|
||||
if(right) ++score;
|
||||
if(right && spelling) ++corrections;
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
/* Bone Quest display/input, adapted from Capital Quest. GPL-3.0-or-later. */
|
||||
#include <cmoc.h>
|
||||
#include <coco.h>
|
||||
#include <Keyboard.h>
|
||||
#include <font5x8.h>
|
||||
#include <vcc/gime.h>
|
||||
#include "ui.h"
|
||||
#include "map_data.h"
|
||||
static Keyboard keyboard;
|
||||
static U8 initialized;
|
||||
unsigned entropy=0xB41D;
|
||||
void text(unsigned x,unsigned y,const char *s,U8 color)
|
||||
{
|
||||
U8 c,row,col,bits;unsigned left=x;
|
||||
while((c=(U8)*s++)!=0){
|
||||
if(c=='\n'){y+=9;x=left;continue;}if(c<32||c>126)c='?';
|
||||
for(row=0;row<8;++row){bits=font5x8[(unsigned)(c-32)*8+row];for(col=0;col<5;++col)if(!(bits&(128>>col)))gime_plot(x+col,y+row,color);}
|
||||
x+=6;
|
||||
}
|
||||
}
|
||||
void frame(const char *label)
|
||||
{
|
||||
gime_clear(0);gime_fill_rect(0,0,320,13,1);text(8,3,"BONE QUEST",7);text(176,3,label,7);gime_fill_rect(8,29,304,1,2);
|
||||
}
|
||||
static void draw_view(U8 view,U8 current,U8 progress,unsigned ox,unsigned oy,U8 scale,U8 cx,U8 cy,U8 cw,U8 ch)
|
||||
{
|
||||
const U8 *data=bone_view_spans[view];const unsigned *off=bone_view_offsets[view];
|
||||
U8 b,y,x,n,col;unsigned i,end,left,right;
|
||||
for(b=0;b<BONE_COUNT;++b){
|
||||
col=b==current?6:(!progress||!answered[b]?3:(correct[b]?4:5));end=off[b+1];
|
||||
for(i=off[b];i<end;i+=3){
|
||||
y=data[i];x=data[i+1];n=data[i+2];if(y<cy || y>=cy+ch)continue;
|
||||
left=x>cx?x:cx;right=x+n;if(right>cx+cw)right=cx+cw;if(left>=right)continue;
|
||||
gime_fill_rect(ox+(left-cx)*scale,oy+(unsigned)(y-cy)*scale,(right-left)*scale,scale,col);
|
||||
}
|
||||
}
|
||||
}
|
||||
void show_skeleton(U8 current,U8 progress)
|
||||
{
|
||||
U8 view,x,y,w,h,scale;
|
||||
draw_view(0,current,progress,4+(100-bone_view_widths[0])/2,30,1,0,0,bone_view_widths[0],bone_view_heights[0]);
|
||||
if(current>=BONE_COUNT)return;
|
||||
gime_fill_rect(108,30,212,73,1);view=bone_detail_view[current];
|
||||
if(view){
|
||||
w=bone_view_widths[view];h=bone_view_heights[view];
|
||||
draw_view(view,current,progress,112+(200-w)/2,34+(65-h)/2,1,0,0,w,h);
|
||||
}else{
|
||||
x=bone_boxes[current][0];y=bone_boxes[current][1];w=bone_boxes[current][2];h=bone_boxes[current][3];
|
||||
if(x>2){x-=2;w+=2;}else{x=0;}
|
||||
if(y>2){y-=2;h+=2;}else{y=0;}
|
||||
w+=2;h+=2;if(x+w>bone_view_widths[0])w=bone_view_widths[0]-x;if(y+h>bone_view_heights[0])h=bone_view_heights[0]-y;
|
||||
scale=65/h;if(!scale)scale=1;if(scale>4)scale=4;if(w*scale>200)scale=200/w;
|
||||
draw_view(0,current,progress,112+(200-w*scale)/2,34+(65-h*scale)/2,scale,x,y,w,h);
|
||||
}
|
||||
}
|
||||
static U8 any_key(void)
|
||||
{
|
||||
return isKeyPressed(0,0x3F)||isKeyPressed(KEY_PROBE_ENTER,KEY_BIT_ENTER)||isKeyPressed(KEY_PROBE_BREAK,KEY_BIT_BREAK)||isKeyPressed(KEY_PROBE_CLEAR,KEY_BIT_CLEAR);
|
||||
}
|
||||
void release_keys(void)
|
||||
{
|
||||
unsigned since;if(!initialized){Keyboard_init(&keyboard);initialized=1;}since=getTimer();
|
||||
do{Keyboard_poll(&keyboard);if(any_key())since=getTimer();}while((unsigned)(getTimer()-since)<2);
|
||||
}
|
||||
U8 next_key(void)
|
||||
{
|
||||
U8 c;if(!initialized){Keyboard_init(&keyboard);initialized=1;}
|
||||
do{entropy=(entropy<<1)^(entropy>>15)^getTimer()^0x1021;c=Keyboard_poll(&keyboard);}while(!c);
|
||||
entropy^=(unsigned)c<<8;return c;
|
||||
}
|
||||
void close_input(void)
|
||||
{
|
||||
if(initialized){Keyboard_shutdown(&keyboard);initialized=0;}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
"""Validate exact generated anatomy/data and compact rendering ownership."""
|
||||
import hashlib,json,re,runpy
|
||||
from pathlib import Path
|
||||
ROOT=Path(__file__).resolve().parents[1]
|
||||
module=runpy.run_path(str(ROOT/'tools/prepare_questions.py'));assert module['generated']()==(ROOT/'src/bones.c').read_text()
|
||||
receipt=json.loads((ROOT/'assets/source-receipt.json').read_text());assert hashlib.sha256((ROOT/'assets/skeleton-source.svg').read_bytes()).hexdigest()==receipt['sha256']
|
||||
source=(ROOT/'src/map_data.c').read_text();manifest=json.loads((ROOT/'data/geometry-manifest.json').read_text())
|
||||
# Parse every span/offset pair independently of the conversion dependency stack.
|
||||
arrays={name:[int(v) for v in re.findall(r'\d+',body)] for name,body in re.findall(r'(?:unsigned char|unsigned)\s+(\w+)\s*\[[^]]*\]\s*=\s*\{([^{}]*)\}',source)}
|
||||
view_names=re.search(r'bone_view_spans\[[^]]*\]\s*=\s*\{([^}]+)\}',source)[1]
|
||||
view_names=re.findall(r'[A-Za-z_]\w*',view_names)
|
||||
widths=arrays['bone_view_widths'];heights=arrays['bone_view_heights'];assert len(view_names)==len(widths)==len(heights)==6
|
||||
pairs=[]
|
||||
for name,data in arrays.items():
|
||||
if name.endswith('_spans'):
|
||||
view=view_names.index(name);off=arrays.get(name[:-6]+'_offsets');assert off is not None,(name,'offsets missing');assert len(off)==26 and off[0]==0 and off[-1]==len(data);occupied=set()
|
||||
for bone in range(25):
|
||||
assert off[bone]%3==off[bone+1]%3==0
|
||||
if name=='bone_spans':assert off[bone+1]>off[bone],bone
|
||||
for k in range(off[bone],off[bone+1],3):
|
||||
y,x,n=data[k:k+3];assert n>0 and 0<=y<heights[view] and 0<=x<x+n<=widths[view]
|
||||
for xx in range(x,x+n):assert (xx,y) not in occupied,(name,xx,y);occupied.add((xx,y))
|
||||
pairs.append(name)
|
||||
assert len(pairs)==6,pairs
|
||||
print('PASS authored bank/C identity, source SVG hash, six bounded disjoint views, 25 nonempty overview masks.')
|
||||
@@ -0,0 +1,147 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Developer qualification using the installed app's isolated playtest helper.
|
||||
Requires explicitly supplied private ROMs; does not operate the personal emulator.
|
||||
"""
|
||||
import argparse,ast,base64,hashlib,json,re,struct,subprocess,zlib
|
||||
from pathlib import Path
|
||||
ROOT=Path(__file__).resolve().parents[1]
|
||||
|
||||
def png(path):
|
||||
b=Path(path).read_bytes();p=8;data=b''
|
||||
while p<len(b):
|
||||
n=int.from_bytes(b[p:p+4],'big');kind=b[p+4:p+8];v=b[p+8:p+8+n];p+=n+12
|
||||
if kind==b'IHDR':w,h,depth,ct,*_=struct.unpack('>IIBBBBB',v)
|
||||
if kind==b'IDAT':data+=v
|
||||
assert depth==8 and ct in (2,6)
|
||||
ch=3 if ct==2 else 4;stride=w*ch;raw=zlib.decompress(data);prior=bytearray(stride);rows=[];p=0
|
||||
for _ in range(h):
|
||||
f=raw[p];p+=1;row=bytearray(raw[p:p+stride]);p+=stride
|
||||
for i in range(stride):
|
||||
a=row[i-ch] if i>=ch else 0;b=prior[i];c=prior[i-ch] if i>=ch else 0
|
||||
if f==1:pred=a
|
||||
elif f==2:pred=b
|
||||
elif f==3:pred=(a+b)//2
|
||||
elif f==4:
|
||||
v=a+b-c;pa=abs(v-a);pb=abs(v-b);pc=abs(v-c);pred=a if pa<=pb and pa<=pc else b if pb<=pc else c
|
||||
else:pred=0
|
||||
row[i]=(row[i]+pred)&255
|
||||
rows.append(row);prior=row
|
||||
return w,h,ch,rows
|
||||
|
||||
class Screen:
|
||||
def __init__(self,path,font):self.w,self.h,self.ch,self.rows=png(path);self.font=font
|
||||
def guest(self,x,y):return tuple(self.rows[50+y*2][x*2*self.ch:x*2*self.ch+3])
|
||||
def text(self,x,y,n):
|
||||
bg=self.guest(x+5,y);out=''
|
||||
for j in range(n):
|
||||
bits=[self.guest(x+j*6+c,y+r)!=bg for r in range(8) for c in range(5)]
|
||||
scores=[]
|
||||
for k in range(32,127):
|
||||
expected=[not(self.font[(k-32)*8+r]&(128>>c)) for r in range(8) for c in range(5)]
|
||||
scores.append((sum(a!=b for a,b in zip(bits,expected)),k))
|
||||
d,k=min(scores);out+=chr(k) if d==0 else '?'
|
||||
return out.rstrip()
|
||||
|
||||
def main():
|
||||
p=argparse.ArgumentParser(description=__doc__)
|
||||
p.add_argument('--app',type=Path,default=Path('/Applications/VCC Plus.app'))
|
||||
p.add_argument('--rom',type=Path,required=True);p.add_argument('--disk-rom',type=Path,required=True)
|
||||
p.add_argument('--evidence',type=Path,default=ROOT/'test-output/playtest')
|
||||
p.add_argument('--cpu',choices=['6809','6309','both'],default='both');args=p.parse_args();out=args.evidence.resolve();out.mkdir(parents=True,exist_ok=True)
|
||||
rows=json.loads((ROOT/'data/bones.json').read_text());binary=ROOT/'build/BONEQ.bin';disk=ROOT/'build/BONEQ.dsk';sha=hashlib.sha256(disk.read_bytes()).hexdigest()
|
||||
mp=binary.with_suffix('.map').read_text();symbols={n:int(a,16) for n,a in re.findall(r'Symbol: _(\w+) .*?= ([0-9A-Fa-f]+)',mp)}
|
||||
blob=binary.read_bytes();memory={};i=0
|
||||
while i<len(blob):
|
||||
kind=blob[i];n,a=struct.unpack('>HH',blob[i+1:i+5]);i+=5
|
||||
if kind==255:break
|
||||
memory.update((a+j,b) for j,b in enumerate(blob[i:i+n]));i+=n
|
||||
font=bytes(memory[symbols['font5x8']+i] for i in range(768))
|
||||
src=(ROOT/'src/map_data.c').read_text();arrays={name:[int(v) for v in re.findall(r'\d+',body)] for name,body in re.findall(r'(?:unsigned char|unsigned)\s+(\w+)\s*\[[^]]*\]\s*=\s*\{([^{}]*)\}',src)}
|
||||
spans=arrays['bone_spans'];offsets=arrays['bone_offsets'];colors={3:(85,170,170),4:(85,85,170),5:(255,85,85),6:(255,255,0)}
|
||||
b64=lambda path:base64.b64encode(path.read_bytes()).decode();reports=[]
|
||||
for cpu in (('6809','6309') if args.cpu=='both' else (args.cpu,)):
|
||||
proc=subprocess.Popen([str(args.app/'Contents/Helpers/vcc-playtest')],stdin=subprocess.PIPE,stdout=subprocess.PIPE,text=True)
|
||||
def call(op,**kw):
|
||||
proc.stdin.write(json.dumps(dict(op=op,**kw))+'\n');proc.stdin.flush();r=json.loads(proc.stdout.readline());assert 'error' not in r,r;return r['result']
|
||||
def read(name,n=1):return call('read_memory',address=symbols[name],count=n)['bytes']
|
||||
def step(n=600):return call('input',steps=[dict(mask=0,fields=n)])
|
||||
def press(mask,settle=600,hold=8):return call('input',steps=[dict(mask=mask,fields=hold),dict(mask=0,fields=settle)])
|
||||
def key(bit,settle=600,hold=8):return press(1<<bit,settle,hold)
|
||||
def type_text(s):
|
||||
steps=[]
|
||||
for c in s:
|
||||
bit=31 if c==' ' else 46 if c=='.' else 45 if c=='-' else ord(c.lower())-97+1
|
||||
mask=(1<<bit)|((1<<55) if c.isupper() else 0)
|
||||
steps.extend([dict(mask=mask,fields=8),dict(mask=0,fields=16)])
|
||||
for i in range(0,len(steps),60):call('input',steps=steps[i:i+60])
|
||||
def capture(name):
|
||||
r=call('capture');path=out/(cpu+'-'+name+'.png');path.write_bytes(base64.b64decode(r.pop('png_base64')))
|
||||
(out/(cpu+'-'+name+'.json')).write_text(json.dumps(r,indent=2)+'\n');return Screen(path,font)
|
||||
def check_map(s,current,outcomes):
|
||||
checked=0
|
||||
for bone in range(25):
|
||||
col=6 if bone==current else 4 if outcomes.get(bone) is True else 5 if bone in outcomes else 3
|
||||
for j in range(offsets[bone],offsets[bone+1],3):
|
||||
y,x,n=spans[j:j+3]
|
||||
for xx in range(x,x+n):
|
||||
assert s.guest(22+xx,30+y)==colors[col],(cpu,bone,current,xx,y,s.guest(22+xx,30+y),colors[col]);checked+=1
|
||||
assert checked>1000
|
||||
def sound(name):
|
||||
r=call('audio_capture',fields=120);wav=base64.b64decode(r['audio_wav_base64']);(out/(cpu+'-'+name+'.wav')).write_bytes(wav)
|
||||
assert any(wav[44:]),'No guest audio samples'
|
||||
call('init',system_rom=b64(args.rom),disk_rom=b64(args.disk_rom),disk=b64(disk),cpu=cpu,boot_keys=[1<<b for b in (4,15,19,48)])
|
||||
step();check_map(capture('title'),None,{})
|
||||
key(3);s=capture('credits');assert s.text(8,42,45)=='Skeleton: Mariana Ruiz Villarreal';key(31);key(33)
|
||||
outcomes={};slots=[];visited=[]
|
||||
for q in range(25):
|
||||
assert read('phase')==[1] and read('question')==[q]
|
||||
bone=read('current_bone')[0];s=capture('mc-%02d-%s'%(q+1,rows[bone]['code']));check_map(s,bone,outcomes)
|
||||
assert s.text(8,19,45)==f'Question {q+1}/25 Score {sum(outcomes.values())}'
|
||||
opts=[s.text(112,132+i*11,34)[2:] for i in range(4)];assert len(set(opts))==4 and rows[bone]['name'] in opts,(q,opts)
|
||||
slot=opts.index(rows[bone]['name']);assert not slots or slot!=slots[-1];slots.append(slot);visited.append(bone)
|
||||
right=q%5!=0;selection=slot if right else (slot+1)%4
|
||||
if q==0:
|
||||
# Hold through feedback and the next question; only one answer.
|
||||
press(1<<(33+selection),600,600);assert read('question')==[1];step(16)
|
||||
else:key(33+selection)
|
||||
outcomes[bone]=right
|
||||
if q%5==0:print(cpu,'multiple choice',q+1,flush=True)
|
||||
assert len(set(visited))==25 and read('phase')==[4]
|
||||
s=capture('mc-results');check_map(s,None,outcomes);assert s.text(112,55,34)=='20 / 25 correct 80%'
|
||||
key(18);s=capture('mc-review');assert s.text(8,39,45)==rows[visited[0]]['name'];key(14);capture('mc-review-next');key(2);key(16);check_map(capture('replay-title'),None,{})
|
||||
key(34);press((1<<55)|(1<<32),16);outcomes={};typed=[];corrections=0
|
||||
for q in range(25):
|
||||
assert read('phase')==[1] and read('question')==[q]
|
||||
bone=read('current_bone')[0];name=rows[bone]['name'];s=capture('typed-%02d-%s'%(q+1,rows[bone]['code']));check_map(s,bone,outcomes)
|
||||
right=q not in (2,3,4,5,6)
|
||||
if q==0:
|
||||
typo=name[0]+name[2]+name[1]+name[3:];type_text(typo);key(48);assert read('phase')==[2],(name,typo,read('phase'))
|
||||
capture('spelling-retry');key(18)
|
||||
for _ in typo:key(29,16)
|
||||
type_text(name);corrections=1
|
||||
elif q==1:
|
||||
type_text(rows[bone]['aliases'][0] if rows[bone]['aliases'] else name);capture('typed-alias')
|
||||
elif q==3:
|
||||
key(50)
|
||||
elif q==4:
|
||||
type_text('X'*33);type_text('XXXXXX');step();s=capture('input-limit');assert s.text(112,132,34)=='X'*33+'_'
|
||||
elif q==5:pass
|
||||
elif q in (2,6):
|
||||
other=rows[(bone+1)%25];type_text(other['aliases'][0] if q==6 and other['aliases'] else other['name'])
|
||||
else:
|
||||
text=' '.join(name.split());text=(' '+text.replace(' ',' ')+' ') if q%3==0 else text.lower() if q%3==1 else text.upper();type_text(text)
|
||||
if q!=3:key(48)
|
||||
s=capture('typed-feedback-%02d'%(q+1));assert read('phase')==[3]
|
||||
assert s.text(112,134,30)==('CORRECT!' if right else 'NOT THIS TIME.'),(q,name,s.text(112,134,30))
|
||||
outcomes[bone]=right;typed.append(bone);assert read('score')==[sum(outcomes.values())]
|
||||
key(31)
|
||||
if q%5==0:print(cpu,'typed',q+1,flush=True)
|
||||
assert len(set(typed))==25 and read('phase')==[4]
|
||||
s=capture('typed-results');check_map(s,None,outcomes);assert s.text(112,55,34)=='20 / 25 correct 80%';assert s.text(112,77,34)=='1 spelling corrections'
|
||||
key(18);s=capture('typed-review');assert s.text(8,39,45)==rows[typed[2]]['name'];key(2);key(17)
|
||||
s=capture('exit');r=call('capture');assert 'THANKS FOR PLAYING BONE QUEST!' in r.get('screen_text','')
|
||||
final=call('stop');final.pop('disk_base64',None);proc.wait(timeout=10)
|
||||
assert final['disk_writes']==0 and final['disk_sha256']==sha
|
||||
reports.append(dict(cpu=cpu,ramKB=512,multipleChoice=25,typed=25,score=20,spellingCorrections=1,mapPixelsChecked=True,noRepeatedCorrectSlots=True,heldKey=True,review=True,replay=True,exit=True,diskSHA256=sha,diskWrites=0))
|
||||
(out/'report.json').write_text(json.dumps(reports,indent=2)+'\n');print('PASS',cpu,'complete quizzes, map/colors/choices/input/review/replay/exit',flush=True)
|
||||
if __name__=='__main__':main()
|
||||
@@ -0,0 +1,42 @@
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include "quiz.h"
|
||||
static void aliases(U8 bone,U8 target)
|
||||
{
|
||||
const char *p=bones[bone].aliases;char word[ANSWER_SIZE];unsigned n;
|
||||
while(*p){n=0;while(*p && *p!='|'){assert(n<ANSWER_SIZE-1);word[n++]=*p++;}word[n]=0;assert(classify(target,word)==(bone==target?2:0));if(*p)++p;}
|
||||
}
|
||||
int main(void)
|
||||
{
|
||||
unsigned seed,i,j,k,p,slot,previous,positions[4]={0},transitions[4][4]={{0}};
|
||||
char name[ANSWER_SIZE],normalized[ANSWER_SIZE];U8 first[4];
|
||||
for(seed=1;seed<=2000;++seed){
|
||||
U8 seen[BONE_COUNT]={0};quiz_start(seed);previous=4;
|
||||
for(i=0;i<BONE_COUNT;++i){
|
||||
assert(order[i]<BONE_COUNT && !seen[order[i]]);seen[order[i]]=1;quiz_options(order[i]);p=0;slot=4;
|
||||
for(j=0;j<4;++j){assert(options[j]<BONE_COUNT);if(options[j]==order[i]){++p;slot=j;}for(k=0;k<j;++k)assert(options[k]!=options[j]);}
|
||||
assert(p==1 && slot!=previous);++positions[slot];if(i)++transitions[previous][slot];previous=slot;
|
||||
}
|
||||
}
|
||||
for(i=0;i<4;++i){assert(positions[i]>10000);for(j=0;j<4;++j)assert(i==j?transitions[i][j]==0:transitions[i][j]>3000);}
|
||||
for(seed=1;seed<=32;++seed){quiz_start(seed);quiz_options(order[0]);memcpy(first,options,4);for(i=1;i<BONE_COUNT;++i)quiz_options(order[i]);quiz_start(seed);quiz_options(order[0]);assert(!memcmp(first,options,4));}
|
||||
for(i=0;i<BONE_COUNT;++i){
|
||||
strcpy(name,bones[i].name);assert(classify(i,name)==2);
|
||||
for(j=0;name[j];++j)if(name[j]>='a' && name[j]<='z')name[j]-=32;
|
||||
assert(classify(i,name)==2);aliases(i,i);
|
||||
for(j=0;j<BONE_COUNT;++j)if(j!=i){assert(classify(i,bones[j].name)==0);aliases(j,i);}
|
||||
assert(classify(i,"")==0 && classify(i,"not a bone")==0);
|
||||
}
|
||||
assert(classify(12,"Humeruz")==1);assert(classify(18,"Femru")==1);
|
||||
assert(classify(17,"phalanges")!=2 && classify(24,"phalanges")!=2);
|
||||
assert(classify(2," COLLAR BONE ")==2);
|
||||
normalize(" \t Lumbar VERTEBRAE ",normalized);assert(!strcmp(normalized,"lumbar vertebrae"));
|
||||
quiz_start(2709);
|
||||
for(i=0;i<BONE_COUNT;++i){quiz_record(order[i],i%2?"wrong":bones[order[i]].name,!(i%2),!(i%4));quiz_record(order[i],"duplicate",1,1);}
|
||||
assert(score==13 && corrections==7);
|
||||
for(i=0;i<BONE_COUNT;++i)assert(answered[i]);
|
||||
quiz_start(2710);assert(!score && !corrections);
|
||||
for(i=0;i<BONE_COUNT;++i)assert(!answered[i] && !responses[i][0]);
|
||||
puts("PASS: 50000 unique option sets, no repeated correct slot, all permitted transitions, aliases/wrong-name guards, spelling, score and reset.");return 0;
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
// autostart.c - Program to be run by the Disk Basic DOS command.
|
||||
// By Pierre Sarrazin <http://sarrazip.com/>
|
||||
// This file is in the public domain.
|
||||
//
|
||||
// Reference: Roger Schrag, "A Special Use For The DOS Command",
|
||||
// The Rainbow, November 1984, p.140.
|
||||
//
|
||||
// To compile: cmoc --dos autostart.c
|
||||
// To install on CoCo disk image: install-coco-boot-loader some-image.dsk autostart.bin
|
||||
// To run on CoCo: type DOS and <Enter> to automatically run *.BAS.
|
||||
//
|
||||
// Version history:
|
||||
// 0.1.0 2016-01-16 Use of legacy.h discontinued.
|
||||
// 0.1.1 2018-04-03 Adapted to CMOC 0.1.51 (const).
|
||||
// 0.1.2 2018-08-04 Basic line now forced to be uppercase.
|
||||
|
||||
#include <coco.h>
|
||||
|
||||
#define ENDFLG 0x00 // STOP/END FLAG: POSITIVE=STOP, NEG=END
|
||||
#define CINBFL 0x70 // CONSOLE IN BUFFER FLAG: 00=NOT EMPTY, $FF=EMPTY
|
||||
#define RVEC4 0x016a // RAM hook: CONSOLE IN
|
||||
|
||||
|
||||
byte oldHookInstr;
|
||||
word oldHookAddr;
|
||||
const char *basicLineReader;
|
||||
|
||||
|
||||
void feedKeyboard()
|
||||
{
|
||||
word preservedX;
|
||||
asm("stx", preservedX);
|
||||
|
||||
* (byte *) CINBFL = 0; // console in buffer now not empty
|
||||
|
||||
char nextBasicByte = (char) toupper(*basicLineReader);
|
||||
++basicLineReader;
|
||||
if (nextBasicByte == 0) // if finished returning Basic line
|
||||
{
|
||||
* (byte *) RVEC4 = oldHookInstr;
|
||||
* (word *) (RVEC4 + 1) = oldHookAddr;
|
||||
nextBasicByte = '\r'; // return "Enter" to cause execution of Basic line
|
||||
}
|
||||
|
||||
asm {
|
||||
lda nextBasicByte
|
||||
ldx preservedX
|
||||
tfr u,s // discard stack frame
|
||||
leas 4,s // discard previous stack frame ptr and return addr
|
||||
rts // return to caller of CONSOLE IN
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int main()
|
||||
{
|
||||
* (byte *) ENDFLG = - * (byte *) ENDFLG; // why?
|
||||
|
||||
basicLineReader =
|
||||
#ifndef COMMAND
|
||||
"LOADM\"BONEQ.BIN\":EXEC"
|
||||
#else
|
||||
COMMAND
|
||||
#endif
|
||||
;
|
||||
|
||||
// Install function feedKeyboard() as CONSOLE IN routine.
|
||||
//
|
||||
oldHookInstr = * (byte *) RVEC4;
|
||||
oldHookAddr = * (word *) (RVEC4 + 1);
|
||||
|
||||
* (byte *) RVEC4 = 0x7e; // JMP instruction
|
||||
* (void **) (RVEC4 + 1) = (void *) feedKeyboard;
|
||||
|
||||
* (word *) 0x2600 = 0; // overwrite "OS" marker with two null bytes
|
||||
|
||||
asm("jmp", "$ac7c"); // go interpret a Basic line (which is read from console)
|
||||
|
||||
return 0; // avoids compiler error
|
||||
}
|
||||
@@ -0,0 +1,242 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Prepare Bone Quest's compact masks from the retained public-domain SVG.
|
||||
|
||||
Optional authoring dependencies: Python 3, Pillow and rsvg-convert. Normal game
|
||||
builds use the generated C files and do not run this converter. The SVG remains
|
||||
unchanged; labels/background are omitted and source bone silhouettes are reduced
|
||||
into a 25-owner pixel mask. All coordinates below refer to a 436x842 render of the
|
||||
source's nominal 435.687x841.89 viewBox. No SVG is parsed on the CoCo.
|
||||
"""
|
||||
import argparse
|
||||
import copy
|
||||
import hashlib
|
||||
import io
|
||||
import json
|
||||
from pathlib import Path
|
||||
import shutil
|
||||
import subprocess
|
||||
import xml.etree.ElementTree as ET
|
||||
from PIL import Image, ImageChops
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
TOPICS = [
|
||||
('CRANIUM', ['Cranium', 'g1297']),
|
||||
('MANDIBLE', ['Mandible']),
|
||||
('CLAVICLE', ['ClavicleLeft', 'ClavicleRight']),
|
||||
('SCAPULA', ['Scapula']),
|
||||
('STERNUM', ['Sternum', 'Manubrium']),
|
||||
('RIBS', ['g845', 'g1609']),
|
||||
('CERVICAL', ['CervicalVertebrae']),
|
||||
('THORACIC', ['ThoracicVertebrae']),
|
||||
('LUMBAR', ['LumbarVertebrae']),
|
||||
('SACRUM', ['Sacrum']),
|
||||
('COCCYX', ['Coccyx']),
|
||||
('PELVIS', ['PelvicGirdle', 'g447']),
|
||||
('HUMERUS', ['HumerusLeft', 'HumerusRight']),
|
||||
('RADIUS', ['RadiusLeft', 'RadiusRight']),
|
||||
('ULNA', ['UlnaLeft', 'UlnaRight']),
|
||||
('CARPALS', ['CarpalsLeft', 'CarpalsRight']),
|
||||
('METACARPALS', ['MetacarpalsLeft', 'MetacarpalsRight']),
|
||||
('FINGERS', ['PhalangesLeft', 'PhalangesRight']),
|
||||
('FEMUR', ['g3760', 'FemurLeft', 'path479', 'path481', 'path513', 'path499']),
|
||||
('PATELLA', ['PatellaLeft', 'PatellaRight']),
|
||||
('TIBIA', ['TibiaLeft', 'TibiaRight']),
|
||||
('FIBULA', ['FibulaLeft', 'FibulaRight']),
|
||||
('TARSALS', ['TarsalsLeft', 'TarsalsRight']),
|
||||
('METATARSALS', ['MetatarsalsLeft', 'MetatarsalsRight']),
|
||||
('TOES', ['PhalangesFootLeft', 'PhalangesFootRight']),
|
||||
]
|
||||
# Front-view occlusion: scapulae/spine are behind chest and limbs; sternum,
|
||||
# clavicles and knees remain visible. Both sides share each topic identity.
|
||||
PAINT_ORDER = [15,16,17,22,23,24,21,20,18,11,3,10,9,8,5,7,6,0,1,4,2,12,14,13,19]
|
||||
DETAIL_VIEW = [1,1,5,5,5,5,1,5,4,4,4,4,0,0,0,2,2,2,0,0,0,0,3,3,3]
|
||||
VIEWS = [
|
||||
('overview', None, 64, 149),
|
||||
('head', (163,17,243,154), 38,65),
|
||||
('hand', (313,397,410,500),61,65),
|
||||
('foot', (199,747,275,825),63,65),
|
||||
('spine', (169,274,235,400),34,65),
|
||||
('chest', (107,132,300,308),68,62),
|
||||
]
|
||||
|
||||
|
||||
def selected_svg(source, elements, selected):
|
||||
root = ET.Element(source.tag, {k:v for k,v in source.attrib.items()
|
||||
if k in ('version','width','height','viewBox')})
|
||||
root.append(copy.deepcopy(elements['defs3096']))
|
||||
def prune(element, active=False):
|
||||
active = active or element.get('id') in selected
|
||||
result = ET.Element(element.tag, element.attrib)
|
||||
for child in element:
|
||||
kept = prune(child, active)
|
||||
if kept is not None:
|
||||
result.append(kept)
|
||||
return result if active or len(result) else None
|
||||
skeleton = prune(elements['layer3'])
|
||||
if skeleton is None:
|
||||
raise ValueError('No skeleton source groups selected')
|
||||
root.append(skeleton)
|
||||
return ET.tostring(root)
|
||||
|
||||
|
||||
def runs(pixels, width, height):
|
||||
result, offsets = [], [0]
|
||||
for topic in range(1,26):
|
||||
for y in range(height):
|
||||
x = 0
|
||||
while x < width:
|
||||
if pixels[y*width+x] != topic:
|
||||
x += 1
|
||||
continue
|
||||
start = x
|
||||
while x < width and pixels[y*width+x] == topic:
|
||||
x += 1
|
||||
result.extend((y,start,x-start))
|
||||
offsets.append(len(result))
|
||||
return result, offsets
|
||||
|
||||
|
||||
def c_array(name, values, kind='unsigned char', static=False):
|
||||
lines = ['static ' if static else '']
|
||||
prefix = ('static ' if static else '') + 'const '+kind+' '+name+'[] = {\n'
|
||||
return prefix + ''.join(' '+','.join(map(str,values[n:n+24]))+',\n'
|
||||
for n in range(0,len(values),24)) + '};\n\n'
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(description=__doc__)
|
||||
parser.add_argument('--rsvg-convert', default=shutil.which('rsvg-convert'))
|
||||
args = parser.parse_args()
|
||||
if not args.rsvg_convert:
|
||||
parser.error('Install rsvg-convert for optional asset authoring, or use generated C unchanged.')
|
||||
source_path = ROOT/'assets/skeleton-source.svg'
|
||||
source = ET.parse(source_path).getroot()
|
||||
elements = {e.get('id'):e for e in source.iter() if e.get('id')}
|
||||
images, masks = [], []
|
||||
for code, ids in TOPICS:
|
||||
if any(name not in elements for name in ids):
|
||||
raise ValueError('Missing source bone group: '+code)
|
||||
rendered = subprocess.run([args.rsvg_convert,'-w','436','-h','842'],
|
||||
input=selected_svg(source,elements,set(ids)),capture_output=True,check=True)
|
||||
image = Image.open(io.BytesIO(rendered.stdout)).convert('RGBA')
|
||||
images.append(image)
|
||||
masks.append(image.getchannel('A'))
|
||||
combined = masks[0]
|
||||
for mask in masks[1:]:
|
||||
combined = ImageChops.lighter(combined,mask)
|
||||
overall_bounds = combined.getbbox()
|
||||
if overall_bounds != (59,20,405,822):
|
||||
raise ValueError('Source geometry bounds changed; review bone mapping before regenerating.')
|
||||
# Keep actual shaded facial recesses from the original illustration visible
|
||||
# after flattening its colors. No new anatomical shapes are drawn here.
|
||||
recess = Image.new('L',(436,842),0)
|
||||
original = images[0]
|
||||
for y in range(55,103):
|
||||
for x in range(175,232):
|
||||
r,g,b,a = original.getpixel((x,y))
|
||||
eye = ((177<=x<198 or 207<=x<231) and 58<=y<80)
|
||||
nose = 195<=x<212 and 75<=y<101
|
||||
luminance = (299*r+587*g+114*b)//1000
|
||||
if a>128 and ((eye and luminance<213) or (nose and luminance<130)):
|
||||
recess.putpixel((x,y),255)
|
||||
generated = ROOT/'assets/generated'; generated.mkdir(parents=True,exist_ok=True)
|
||||
view_data, overview_pixels = [], None
|
||||
code = ['/* Generated by tools/prepare_assets.py from LadyofHats public-domain SVG. */\n',
|
||||
'#include "map_data.h"\n\n']
|
||||
manifest = dict(schemaVersion=1,source=dict(file='assets/skeleton-source.svg',
|
||||
sha256=hashlib.sha256(source_path.read_bytes()).hexdigest(),
|
||||
author='Mariana Ruiz Villarreal (LadyofHats)',license='Public domain dedication',
|
||||
page='https://commons.wikimedia.org/wiki/File:Human_skeleton_front_en.svg'),
|
||||
coordinateRender=[436,842],overviewSourceBounds=list(overall_bounds),
|
||||
topics=[dict(id=i,code=topic,sourceElements=ids) for i,(topic,ids) in enumerate(TOPICS)],
|
||||
paintOrder=PAINT_ORDER,facialRecesses='Original source shading thresholds, eyes and nasal recess only',
|
||||
pairedSides='Both sides use one bone-family identity; no left/right questions',views=[])
|
||||
sizes = 0
|
||||
for view_index,(name,box,width,height) in enumerate(VIEWS):
|
||||
box = box or overall_bounds
|
||||
pixels = bytearray(width*height)
|
||||
for topic in PAINT_ORDER:
|
||||
alpha = masks[topic].crop(box).resize((width,height),Image.Resampling.LANCZOS)
|
||||
for pos,value in enumerate(alpha.tobytes()):
|
||||
if value>=64:
|
||||
pixels[pos]=topic+1
|
||||
if name in ('overview','head'):
|
||||
holes = recess.crop(box).resize((width,height),Image.Resampling.LANCZOS)
|
||||
for pos,value in enumerate(holes.tobytes()):
|
||||
if pixels[pos]==1 and value>=64:
|
||||
pixels[pos]=0
|
||||
data,offsets=runs(pixels,width,height)
|
||||
counts=[pixels.count(i+1) for i in range(25)]
|
||||
if view_index==0:
|
||||
overview_pixels=pixels
|
||||
if not all(counts):
|
||||
raise ValueError('A bone family disappeared from overview: '+str(counts))
|
||||
stem='bone'
|
||||
else:
|
||||
stem=name
|
||||
code.append(c_array(stem+'_spans',data,static=view_index!=0))
|
||||
code.append(c_array(stem+'_offsets',offsets,'unsigned',static=view_index!=0))
|
||||
sizes += len(data)+len(offsets)*2
|
||||
view_data.append((stem,width,height))
|
||||
manifest['views'].append(dict(id=view_index,name=name,sourceBounds=list(box),
|
||||
width=width,height=height,spanBytes=len(data),offsetBytes=len(offsets)*2,
|
||||
pixels={TOPICS[i][0]:counts[i] for i in range(25)}))
|
||||
# A developer preview uses the runtime's palette; it is not a native
|
||||
# emulator capture. The selected sample topic is yellow.
|
||||
sample = next(i for i,value in enumerate(DETAIL_VIEW) if value==view_index) if view_index else 0
|
||||
colors=[(0,0,85)] + [(255,255,0) if i==sample else (85,170,170) for i in range(25)]
|
||||
preview=Image.new('RGB',(width,height));preview.putdata([colors[value] for value in pixels])
|
||||
preview.save(generated/(name+'-preview.png'))
|
||||
debug=Image.new('RGB',(width,height));palette=[(0,0,85)]+[((i*73+80)%220+35,(i*41)%220+35,(i*109)%220+35) for i in range(25)];debug.putdata([palette[value] for value in pixels]);debug.save(generated/(name+'-regions.png'))
|
||||
# Independently decode all authored runs to prove disjoint bounds and
|
||||
# exact reconstruction of every generated view.
|
||||
decoded=bytearray(width*height)
|
||||
for topic in range(25):
|
||||
for p in range(offsets[topic],offsets[topic+1],3):
|
||||
y,x,length=data[p:p+3]
|
||||
assert 0<=y<height and 0<=x<x+length<=width
|
||||
for xx in range(x,x+length):
|
||||
pos=y*width+xx;assert decoded[pos]==0;decoded[pos]=topic+1
|
||||
assert decoded==pixels
|
||||
boxes=[]
|
||||
for topic in range(1,26):
|
||||
points=[(i%64,i//64) for i,value in enumerate(overview_pixels) if value==topic]
|
||||
xmin=min(x for x,y in points);ymin=min(y for x,y in points)
|
||||
boxes.extend((xmin,ymin,max(x for x,y in points)-xmin+1,max(y for x,y in points)-ymin+1))
|
||||
code.append('const unsigned char bone_boxes[25][4] = {'+','.join('{'+','.join(map(str,boxes[i:i+4]))+'}' for i in range(0,100,4))+'};\n')
|
||||
code.append(c_array('bone_detail_view',DETAIL_VIEW))
|
||||
code.append(c_array('bone_view_widths',[v[1] for v in view_data]))
|
||||
code.append(c_array('bone_view_heights',[v[2] for v in view_data]))
|
||||
code.append('const unsigned char * const bone_view_spans[BONE_VIEW_COUNT] = {'+','.join(v[0]+'_spans' for v in view_data)+'};\n')
|
||||
code.append('const unsigned * const bone_view_offsets[BONE_VIEW_COUNT] = {'+','.join(v[0]+'_offsets' for v in view_data)+'};\n')
|
||||
sizes+=len(boxes)+len(DETAIL_VIEW)+len(view_data)*2+len(view_data)*4
|
||||
if sizes>6000:
|
||||
raise ValueError('Geometry exceeds 6000-byte ROM budget: '+str(sizes))
|
||||
(ROOT/'src/map_data.c').write_text(''.join(code))
|
||||
(ROOT/'map_data.h').write_text('''#ifndef BONE_MAP_DATA_H
|
||||
#define BONE_MAP_DATA_H
|
||||
#define BONE_MAP_WIDTH 64
|
||||
#define BONE_MAP_HEIGHT 149
|
||||
#define BONE_VIEW_COUNT 6
|
||||
/* Spans are (y,x,length) triples. Offsets index bytes, 26 entries per view.
|
||||
bone_boxes is [25][4]: xmin,ymin,width,height in overview pixels.
|
||||
View IDs: 0 overview,1 head/neck,2 hand,3 foot,4 lower spine/pelvis,5 chest.
|
||||
A zero detail-view selector asks the UI to magnify the current overview crop. */
|
||||
extern const unsigned char bone_spans[];
|
||||
extern const unsigned bone_offsets[26];
|
||||
extern const unsigned char bone_boxes[25][4];
|
||||
extern const unsigned char bone_detail_view[25];
|
||||
extern const unsigned char bone_view_widths[6],bone_view_heights[6];
|
||||
extern const unsigned char * const bone_view_spans[BONE_VIEW_COUNT];
|
||||
extern const unsigned * const bone_view_offsets[BONE_VIEW_COUNT];
|
||||
#endif
|
||||
''')
|
||||
manifest['geometryROMBytes']=sizes
|
||||
manifest['detailSelector']=DETAIL_VIEW
|
||||
manifest['overviewBoxes']={TOPICS[i][0]:boxes[4*i:4*i+4] for i in range(25)}
|
||||
(ROOT/'data/geometry-manifest.json').write_text(json.dumps(manifest,indent=2)+'\n')
|
||||
print('PASS25 source-group masks; six disjoint bounded views; geometry ROM bytes:',sizes)
|
||||
|
||||
|
||||
if __name__=='__main__':
|
||||
main()
|
||||
@@ -0,0 +1,24 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Validate authored anatomy facts and regenerate the small CMOC question table."""
|
||||
import argparse
|
||||
import json
|
||||
from pathlib import Path
|
||||
ROOT=Path(__file__).resolve().parents[1]
|
||||
CODES=('CRANIUM','MANDIBLE','CLAVICLE','SCAPULA','STERNUM','RIBS','CERVICAL','THORACIC','LUMBAR','SACRUM','COCCYX','PELVIS','HUMERUS','RADIUS','ULNA','CARPALS','METACARPALS','FINGERS','FEMUR','PATELLA','TIBIA','FIBULA','TARSALS','METATARSALS','TOES')
|
||||
def generated():
|
||||
rows=json.loads((ROOT/'data/bones.json').read_text());assert tuple(r['code'] for r in rows)==CODES
|
||||
seen=set()
|
||||
for row in rows:
|
||||
assert 0<len(row['name'])<=22 and 0<len(row['hint'])<=30
|
||||
for value in [row['name']]+row['aliases']:
|
||||
assert value.isascii() and len(value)<40 and '|' not in value
|
||||
normalized=' '.join(value.lower().split());assert normalized and normalized not in seen
|
||||
seen.add(normalized)
|
||||
assert all(a==a.lower() and a==' '.join(a.split()) for a in row['aliases'])
|
||||
out='/* Generated from data/bones.json; labels/codes remain in the authoring data. */\n#include "quiz.h"\nconst Bone bones[BONE_COUNT] = {\n'
|
||||
for row in rows:out+=' {'+', '.join(json.dumps(value) for value in (row['name'],row['hint'],'|'.join(row['aliases'])))+'},\n'
|
||||
return out+'};\n'
|
||||
if __name__=='__main__':
|
||||
parser=argparse.ArgumentParser(description=__doc__);parser.add_argument('--check',action='store_true');args=parser.parse_args();out=generated();path=ROOT/'src/bones.c'
|
||||
if args.check:assert path.read_text()==out,'Regenerate src/bones.c';print('PASS 25 anatomy topics, unique aliases, bounds, and generated C identity.')
|
||||
else:path.write_text(out);print('Generated src/bones.c')
|
||||
@@ -0,0 +1,11 @@
|
||||
#ifndef UI_H
|
||||
#define UI_H
|
||||
#include "quiz.h"
|
||||
void text(unsigned x,unsigned y,const char *s,U8 color);
|
||||
void frame(const char *label);
|
||||
void show_skeleton(U8 current,U8 progress);
|
||||
U8 next_key(void);
|
||||
void release_keys(void);
|
||||
void close_input(void);
|
||||
extern unsigned entropy;
|
||||
#endif
|
||||
@@ -0,0 +1,34 @@
|
||||
{
|
||||
"binary": "build/BONEQ.bin",
|
||||
"diskImage": "build/BONEQ.dsk",
|
||||
"buildTarget": "disk",
|
||||
"diskTarget": "disk",
|
||||
"cleanTarget": "clean",
|
||||
"entrySource": "main.c",
|
||||
"makefile": "Makefile",
|
||||
"jobs": 4,
|
||||
"launchMode": "disk",
|
||||
"launchCommands": [
|
||||
"DOS"
|
||||
],
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Release",
|
||||
"makeArguments": [
|
||||
"VCC_CONFIGURATION=Release"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Debug",
|
||||
"makeArguments": [
|
||||
"VCC_CONFIGURATION=Debug"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Test",
|
||||
"makeArguments": [
|
||||
"VCC_CONFIGURATION=Test"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||