mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-11 21:55:27 +00:00
DREAMWEB: Added original sources. Released with permission from Neil Dodwell.
This commit is contained in:
parent
ae8edebd65
commit
9599894a4b
1
devtools/tasmrecover/.gitignore
vendored
1
devtools/tasmrecover/.gitignore
vendored
@ -1,5 +1,4 @@
|
||||
*.pyc
|
||||
dreamweb
|
||||
dreamgen.*
|
||||
_stubs*
|
||||
|
||||
|
339
devtools/tasmrecover/dreamweb/LICENSE
Normal file
339
devtools/tasmrecover/dreamweb/LICENSE
Normal file
@ -0,0 +1,339 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Lesser General Public License instead.) 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
|
||||
this service 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 make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. 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.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute 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 and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
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
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the 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 a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, 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.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE 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.
|
||||
|
||||
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
|
||||
convey 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 2 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, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision 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, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This 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.
|
877
devtools/tasmrecover/dreamweb/backdrop.asm
Normal file
877
devtools/tasmrecover/dreamweb/backdrop.asm
Normal file
@ -0,0 +1,877 @@
|
||||
;Copyright (c) 1990-2011 by Neil Dodwell
|
||||
;Released with permission from Neil Dodwell under GPLv2
|
||||
;See LICENSE file for full license text
|
||||
;----------------------------------------------Code to draw floor and panel----
|
||||
|
||||
Blockget proc near
|
||||
|
||||
mov ah,al
|
||||
mov al,0
|
||||
mov ds,backdrop
|
||||
mov si,blocks
|
||||
add si,ax
|
||||
ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
;--------------------------------------------------------Background display----
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Drawfloor proc near
|
||||
|
||||
push es bx ;in case this was called during
|
||||
call eraseoldobs ;some sprite update.
|
||||
call drawflags
|
||||
call calcmapad
|
||||
call doblocks
|
||||
call showallobs
|
||||
call showallfree
|
||||
call showallex
|
||||
call paneltomap
|
||||
call initrain
|
||||
mov newobs,0
|
||||
pop bx es
|
||||
ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Calcmapad proc near
|
||||
|
||||
call getdimension
|
||||
|
||||
push cx dx
|
||||
|
||||
mov al,11
|
||||
sub al,dl
|
||||
sub al,cl
|
||||
sub al,cl
|
||||
cbw
|
||||
mov bx,8
|
||||
mul bx
|
||||
add ax,mapoffsetx
|
||||
mov mapadx,ax
|
||||
pop dx cx
|
||||
|
||||
mov al,10
|
||||
sub al,dh
|
||||
sub al,ch
|
||||
sub al,ch
|
||||
cbw
|
||||
mov bx,8
|
||||
mul bx
|
||||
add ax,mapoffsety
|
||||
mov mapady,ax
|
||||
ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Getdimension proc near ;Routine finds width, length
|
||||
;and top corner of room
|
||||
|
||||
mov es,buffers
|
||||
mov bx,mapflags
|
||||
mov ch,0
|
||||
dimloop1: call addalong
|
||||
cmp al,0
|
||||
jnz finishdim1
|
||||
inc ch
|
||||
jmp dimloop1 ;ch holds y of top corner
|
||||
|
||||
finishdim1: mov bx,mapflags
|
||||
mov cl,0
|
||||
dimloop2: push bx
|
||||
call addlength
|
||||
pop bx
|
||||
cmp al,0
|
||||
jnz finishdim2
|
||||
inc cl
|
||||
add bx,3
|
||||
jmp dimloop2 ;cl holds x of top corner
|
||||
|
||||
finishdim2: mov bx,mapflags+(11*3*9)
|
||||
mov dh,10
|
||||
dimloop3: push bx
|
||||
call addalong
|
||||
pop bx
|
||||
cmp al,0
|
||||
jnz finishdim3
|
||||
dec dh
|
||||
sub bx,11*3
|
||||
jmp dimloop3 ;dh holds y of bottom corner
|
||||
|
||||
finishdim3: mov bx,mapflags+(3*10)
|
||||
mov dl,11
|
||||
dimloop4: push bx
|
||||
call addlength
|
||||
pop bx
|
||||
cmp al,0
|
||||
jnz finishdim4
|
||||
dec dl
|
||||
sub bx,3
|
||||
jmp dimloop4 ;dl holds x of bottom corner
|
||||
|
||||
finishdim4: mov al,cl ;cl holds x start
|
||||
mov ah,0
|
||||
shl ax,1
|
||||
shl ax,1
|
||||
shl ax,1
|
||||
shl ax,1
|
||||
mov mapxstart,ax
|
||||
mov al,ch ;ch holds y start
|
||||
mov ah,0
|
||||
shl ax,1
|
||||
shl ax,1
|
||||
shl ax,1
|
||||
shl ax,1
|
||||
mov mapystart,ax
|
||||
|
||||
sub dl,cl
|
||||
sub dh,ch
|
||||
;dx holds x and y size of room
|
||||
mov al,dl ;dl holds x size
|
||||
mov ah,0
|
||||
shl ax,1
|
||||
shl ax,1
|
||||
shl ax,1
|
||||
shl ax,1
|
||||
mov mapxsize,al
|
||||
mov al,dh ;dh holds y size
|
||||
mov ah,0
|
||||
shl ax,1
|
||||
shl ax,1
|
||||
shl ax,1
|
||||
shl ax,1
|
||||
mov mapysize,al ;cx still holds top left corner
|
||||
ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Addalong proc near
|
||||
|
||||
mov ah,11
|
||||
addloop: cmp byte ptr [es:bx],0
|
||||
jnz gotalong
|
||||
add bx,3
|
||||
dec ah
|
||||
jnz addloop
|
||||
mov al,0
|
||||
ret
|
||||
gotalong: mov al,1
|
||||
ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Addlength proc near
|
||||
|
||||
mov ah,10
|
||||
addloop2: cmp byte ptr [es:bx],0
|
||||
jnz gotlength
|
||||
add bx,3*11
|
||||
dec ah
|
||||
jnz addloop2
|
||||
mov al,0
|
||||
ret
|
||||
gotlength: mov al,1
|
||||
ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Drawflags proc near
|
||||
|
||||
mov es,buffers
|
||||
mov di,mapflags
|
||||
mov al,mapy
|
||||
mov ah,0
|
||||
mov cx,mapwidth
|
||||
mul cx
|
||||
mov bl,mapx
|
||||
mov bh,0
|
||||
add ax,bx
|
||||
mov si,map
|
||||
add si,ax
|
||||
|
||||
mov cx,10
|
||||
$28: push cx
|
||||
mov cx,11
|
||||
$28a: mov ds,mapdata
|
||||
lodsb
|
||||
mov ds,backdrop
|
||||
push si ax
|
||||
mov ah,0
|
||||
add ax,ax
|
||||
mov si,flags
|
||||
add si,ax
|
||||
movsw
|
||||
pop ax
|
||||
stosb
|
||||
pop si
|
||||
loop $28a
|
||||
add si,mapwidth-11
|
||||
pop cx
|
||||
loop $28
|
||||
ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
;-------------------------------------------------------Set object printing----
|
||||
|
||||
Eraseoldobs proc near
|
||||
|
||||
cmp newobs,0
|
||||
jz donterase
|
||||
|
||||
mov es,buffers
|
||||
mov bx,spritetable
|
||||
|
||||
mov cx,16
|
||||
oberase: push cx bx
|
||||
mov ax,[es:bx+20]
|
||||
cmp ax,0ffffh
|
||||
jz notthisob
|
||||
mov di,bx
|
||||
mov al,255
|
||||
mov cx,tablesize
|
||||
rep stosb
|
||||
notthisob: pop bx cx
|
||||
add bx,tablesize
|
||||
loop oberase
|
||||
|
||||
donterase: ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Showallobs proc near
|
||||
|
||||
mov es,buffers
|
||||
mov bx,setlist
|
||||
mov listpos,bx
|
||||
mov di,bx
|
||||
mov cx,128*5
|
||||
mov al,255
|
||||
rep stosb
|
||||
|
||||
mov es,setframes
|
||||
mov frsegment,es
|
||||
mov ax,framedata
|
||||
mov dataad,ax
|
||||
mov ax,frames
|
||||
mov framesad,ax
|
||||
mov currentob,0
|
||||
|
||||
mov ds,setdat
|
||||
mov si,0
|
||||
|
||||
mov cx,128
|
||||
showobsloop: push cx si
|
||||
|
||||
push si
|
||||
add si,58
|
||||
mov es,setdat
|
||||
call getmapad
|
||||
pop si
|
||||
cmp ch,0
|
||||
jz blankframe
|
||||
|
||||
mov al,[es:si+18]
|
||||
mov ah,0
|
||||
mov currentframe,ax
|
||||
cmp al,255
|
||||
jz blankframe
|
||||
|
||||
push es si
|
||||
call calcfrframe
|
||||
call finalframe
|
||||
pop si es
|
||||
|
||||
mov al,[es:si+18]
|
||||
mov [es:si+17],al
|
||||
cmp byte ptr [es:si+8],0
|
||||
jnz animating
|
||||
cmp byte ptr [es:si+5],5
|
||||
jz animating
|
||||
cmp byte ptr [es:si+5],6
|
||||
jz animating
|
||||
mov ax,currentframe
|
||||
mov ah,0
|
||||
add di,mapadx
|
||||
add bx,mapady
|
||||
call showframe
|
||||
jmp drawnsetob
|
||||
|
||||
animating: call makebackob
|
||||
|
||||
drawnsetob: mov si,listpos
|
||||
mov es,buffers
|
||||
mov al,savex
|
||||
mov ah,savey
|
||||
mov [es:si],ax
|
||||
mov cx,ax
|
||||
mov ax,savesize
|
||||
add al,cl
|
||||
add ah,ch
|
||||
mov [es:si+2],ax
|
||||
mov al,currentob
|
||||
mov [es:si+4],al
|
||||
add si,5
|
||||
mov listpos,si
|
||||
|
||||
blankframe: inc currentob
|
||||
pop si cx
|
||||
add si,64
|
||||
dec cx
|
||||
jz finishedsetobs
|
||||
jmp showobsloop
|
||||
|
||||
finishedsetobs: ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Makebackob proc near
|
||||
|
||||
cmp newobs,0
|
||||
jz nomake
|
||||
|
||||
mov al,[es:si+5] ; priority
|
||||
mov ah,[es:si+8] ; type - steady, constant,random,door etc.
|
||||
push si ax si
|
||||
mov ax,objectx
|
||||
mov bx,objecty
|
||||
mov ah,bl
|
||||
mov si,ax
|
||||
mov cx,offset cs:backobject
|
||||
mov dx,setframes
|
||||
mov di,framedata
|
||||
call makesprite
|
||||
pop ax
|
||||
mov [es:bx+20],ax
|
||||
pop ax
|
||||
cmp al,255
|
||||
jnz usedpriority ; forgotten to specify priority
|
||||
mov al,0
|
||||
usedpriority: mov [es:bx+23],al
|
||||
mov [es:bx+30],ah
|
||||
mov byte ptr [es:bx+16],0
|
||||
mov byte ptr [es:bx+18],0
|
||||
mov byte ptr [es:bx+19],0
|
||||
pop si
|
||||
nomake: ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
|
||||
;------------------------------------------------------Free object printing----
|
||||
|
||||
Showallfree proc near
|
||||
|
||||
mov es,buffers
|
||||
mov bx,freelist
|
||||
mov listpos,bx
|
||||
mov di,freelist
|
||||
mov cx,80*5
|
||||
mov al,255
|
||||
rep stosb
|
||||
|
||||
mov es,freeframes
|
||||
mov frsegment,es
|
||||
mov ax,frframedata
|
||||
mov dataad,ax
|
||||
mov ax,frframes
|
||||
mov framesad,ax
|
||||
mov al,0
|
||||
mov currentfree,al
|
||||
|
||||
mov ds,freedat
|
||||
mov si,2
|
||||
|
||||
mov cx,0
|
||||
loop127: push cx si
|
||||
|
||||
push si
|
||||
mov es,freedat
|
||||
call getmapad
|
||||
pop si
|
||||
cmp ch,0
|
||||
jz over138
|
||||
|
||||
mov al,currentfree
|
||||
mov ah,0
|
||||
mov dx,ax
|
||||
add ax,ax
|
||||
add ax,dx
|
||||
mov currentframe,ax
|
||||
|
||||
push es si
|
||||
call calcfrframe
|
||||
mov es,mapstore
|
||||
mov ds,frsegment
|
||||
call finalframe
|
||||
pop si es
|
||||
cmp cx,0
|
||||
jz over138
|
||||
|
||||
mov ax,currentframe
|
||||
mov ah,0
|
||||
add di,mapadx
|
||||
add bx,mapady
|
||||
call showframe
|
||||
mov si,listpos
|
||||
mov es,buffers
|
||||
mov al,savex
|
||||
mov ah,savey
|
||||
mov [es:si],ax
|
||||
mov cx,ax
|
||||
mov ax,savesize
|
||||
add al,cl
|
||||
add ah,ch
|
||||
mov [es:si+2],ax
|
||||
pop ax cx
|
||||
push cx ax
|
||||
mov [es:si+4],cl
|
||||
add si,5
|
||||
mov listpos,si
|
||||
|
||||
over138: inc currentfree
|
||||
pop si cx
|
||||
add si,16
|
||||
inc cx
|
||||
cmp cx,80
|
||||
jz finfree
|
||||
jmp loop127
|
||||
|
||||
finfree: ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Showallex proc near
|
||||
|
||||
mov es,buffers
|
||||
mov bx,exlist
|
||||
mov listpos,bx
|
||||
mov di,exlist
|
||||
mov cx,100*5
|
||||
mov al,255
|
||||
rep stosb
|
||||
|
||||
mov es,extras
|
||||
mov frsegment,es
|
||||
mov ax,exframedata
|
||||
mov dataad,ax
|
||||
mov ax,exframes
|
||||
mov framesad,ax
|
||||
mov currentex,0
|
||||
|
||||
mov si,exdata+2
|
||||
|
||||
mov cx,0
|
||||
exloop: push cx si
|
||||
|
||||
mov es,extras
|
||||
|
||||
push si
|
||||
mov ch,0
|
||||
cmp byte ptr [es:si],255
|
||||
jz notinroom
|
||||
mov al,[es:si-2]
|
||||
cmp al,reallocation
|
||||
jnz notinroom
|
||||
call getmapad
|
||||
notinroom: pop si
|
||||
cmp ch,0
|
||||
jz blankex
|
||||
|
||||
mov al,currentex
|
||||
mov ah,0
|
||||
mov dx,ax
|
||||
add ax,ax
|
||||
add ax,dx
|
||||
mov currentframe,ax
|
||||
|
||||
push es si
|
||||
call calcfrframe
|
||||
mov es,mapstore
|
||||
mov ds,frsegment
|
||||
call finalframe
|
||||
pop si es
|
||||
cmp cx,0
|
||||
jz blankex
|
||||
|
||||
mov ax,currentframe
|
||||
mov ah,0
|
||||
add di,mapadx
|
||||
add bx,mapady
|
||||
call showframe
|
||||
mov si,listpos
|
||||
mov es,buffers
|
||||
mov al,savex
|
||||
mov ah,savey
|
||||
mov [es:si],ax
|
||||
mov cx,ax
|
||||
mov ax,savesize
|
||||
add al,cl
|
||||
add ah,ch
|
||||
mov [es:si+2],ax
|
||||
pop ax cx
|
||||
push cx ax
|
||||
mov [es:si+4],cl
|
||||
add si,5
|
||||
mov listpos,si
|
||||
|
||||
blankex: inc currentex
|
||||
pop si cx
|
||||
add si,16
|
||||
inc cx
|
||||
cmp cx,100
|
||||
jz finex
|
||||
jmp exloop
|
||||
|
||||
finex: ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Calcfrframe proc near
|
||||
|
||||
mov dx,frsegment
|
||||
mov ax,framesad
|
||||
push ax
|
||||
mov cx,dataad
|
||||
mov ax,currentframe
|
||||
mov ds,dx
|
||||
mov bx,6
|
||||
mul bx
|
||||
add ax,cx
|
||||
mov bx,ax
|
||||
mov cx,[bx]
|
||||
mov ax,[bx+2]
|
||||
mov dx,[bx+4]
|
||||
pop bx
|
||||
push dx
|
||||
add ax,bx ;ax=source add, cx=x,y
|
||||
;need this later
|
||||
mov savesource,ax
|
||||
mov savesize,cx
|
||||
pop ax
|
||||
push ax
|
||||
mov ah,0
|
||||
mov offsetx,ax
|
||||
pop ax
|
||||
mov al,ah
|
||||
mov ah,0
|
||||
mov offsety,ax
|
||||
ret
|
||||
nullframe: pop ax
|
||||
mov cx,0
|
||||
mov savesize,cx
|
||||
ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Finalframe proc near
|
||||
|
||||
mov ax,objecty
|
||||
add ax,offsety
|
||||
mov bx,objectx
|
||||
add bx,offsetx
|
||||
mov savex,bl
|
||||
mov savey,al
|
||||
mov di,objectx
|
||||
mov bx,objecty
|
||||
ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Adjustlen proc near
|
||||
|
||||
mov ah,al
|
||||
add al,ch
|
||||
cmp al,100
|
||||
jc over242
|
||||
mov al,224
|
||||
sub al,ch
|
||||
mov ch,al
|
||||
over242: ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Getmapad proc near
|
||||
|
||||
call getxad
|
||||
cmp ch,0
|
||||
jz over146
|
||||
mov objectx,ax
|
||||
call getyad
|
||||
cmp ch,0
|
||||
jz over146
|
||||
mov objecty,ax
|
||||
mov ch,1
|
||||
over146: ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Getxad proc near
|
||||
|
||||
mov cl,[es:si]
|
||||
inc si
|
||||
mov al,[es:si]
|
||||
inc si
|
||||
mov ah,[es:si]
|
||||
inc si
|
||||
cmp cl,0
|
||||
jnz over148
|
||||
sub al,mapx
|
||||
jc over148
|
||||
cmp al,11
|
||||
jnc over148
|
||||
mov cl,4
|
||||
shl al,cl
|
||||
or al,ah
|
||||
mov ah,0
|
||||
mov ch,1
|
||||
ret
|
||||
over148: mov ch,0
|
||||
ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Getyad proc near
|
||||
|
||||
mov al,[es:si]
|
||||
inc si
|
||||
mov ah,[es:si]
|
||||
inc si
|
||||
sub al,mapy
|
||||
jc over147
|
||||
cmp al,10
|
||||
jnc over147
|
||||
mov cl,4
|
||||
shl al,cl
|
||||
or al,ah
|
||||
mov ah,0
|
||||
mov ch,1
|
||||
ret
|
||||
|
||||
over147: mov ch,0
|
||||
ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
382
devtools/tasmrecover/dreamweb/debug.asm
Normal file
382
devtools/tasmrecover/dreamweb/debug.asm
Normal file
@ -0,0 +1,382 @@
|
||||
;Copyright (c) 1990-2011 by Neil Dodwell
|
||||
;Released with permission from Neil Dodwell under GPLv2
|
||||
;See LICENSE file for full license text
|
||||
|
||||
if debuglevel2
|
||||
|
||||
|
||||
Debugkeys proc near
|
||||
|
||||
ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
Debugstart proc near
|
||||
|
||||
call allpalette
|
||||
mov reeltohold,-1
|
||||
mov newlocation,23
|
||||
mov dreamnumber,0
|
||||
mov al,"W"
|
||||
mov ah,"S"
|
||||
mov cl,"H"
|
||||
mov ch,"D"
|
||||
call findexobject
|
||||
mov byte ptr [es:bx+12],"S"-"A"
|
||||
mov byte ptr [es:bx+13],"C"-"A"
|
||||
mov byte ptr [es:bx+14],"R"-"A"
|
||||
mov byte ptr [es:bx+15],"W"-"A"
|
||||
mov al,"W"
|
||||
mov ah,"E"
|
||||
mov cl,"T"
|
||||
mov ch,"A"
|
||||
call findexobject
|
||||
mov byte ptr [es:bx+12],"G"-"A"
|
||||
mov byte ptr [es:bx+13],"U"-"A"
|
||||
mov byte ptr [es:bx+14],"N"-"A"
|
||||
mov byte ptr [es:bx+15],"A"-"A"
|
||||
mov al,"W"
|
||||
mov ah,"E"
|
||||
mov cl,"T"
|
||||
mov ch,"B"
|
||||
call findexobject
|
||||
mov byte ptr [es:bx+12],"S"-"A"
|
||||
mov byte ptr [es:bx+13],"H"-"A"
|
||||
mov byte ptr [es:bx+14],"L"-"A"
|
||||
mov byte ptr [es:bx+15],"D"-"A"
|
||||
mov card1money,12342
|
||||
|
||||
ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Debuggreen proc near
|
||||
|
||||
push ax dx
|
||||
mov al,0
|
||||
mov dx,3c8h
|
||||
out dx,al
|
||||
mov dx,3c9h
|
||||
mov al,0
|
||||
out dx,al
|
||||
mov al,63
|
||||
out dx,al
|
||||
mov al,0
|
||||
out dx,al
|
||||
pop dx ax
|
||||
ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Debugred proc near
|
||||
|
||||
push ax dx
|
||||
mov al,0
|
||||
mov dx,3c8h
|
||||
out dx,al
|
||||
mov dx,3c9h
|
||||
mov al,63
|
||||
out dx,al
|
||||
mov al,0
|
||||
out dx,al
|
||||
mov al,0
|
||||
out dx,al
|
||||
pop dx ax
|
||||
ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
|
||||
Debugblue proc near
|
||||
|
||||
push ax dx
|
||||
mov al,0
|
||||
mov dx,3c8h
|
||||
out dx,al
|
||||
mov dx,3c9h
|
||||
mov al,0
|
||||
out dx,al
|
||||
mov al,0
|
||||
out dx,al
|
||||
mov al,63
|
||||
out dx,al
|
||||
pop dx ax
|
||||
ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Debugblack proc near
|
||||
|
||||
push dx ax
|
||||
mov al,0
|
||||
mov dx,3c8h
|
||||
out dx,al
|
||||
mov dx,3c9h
|
||||
mov al,0
|
||||
out dx,al
|
||||
mov al,0
|
||||
out dx,al
|
||||
mov al,0
|
||||
out dx,al
|
||||
pop ax dx
|
||||
ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Debug proc near
|
||||
|
||||
push ds dx cx
|
||||
mov ah,3ch
|
||||
mov cx,0
|
||||
mov dx,seg filenamed
|
||||
mov ds,dx
|
||||
mov dx,offset filenamed
|
||||
int 21h
|
||||
mov bx,ax
|
||||
pop cx dx ds
|
||||
push bx
|
||||
mov ah,40h
|
||||
int 21h
|
||||
pop bx
|
||||
mov ah,3eh
|
||||
int 21h
|
||||
ret
|
||||
|
||||
filenamed db "DREAMWEB.TXT",0
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Shout proc near
|
||||
|
||||
push ax bx cx dx si di es ds
|
||||
call debugblue
|
||||
mov cx,50
|
||||
call hangon
|
||||
call debugblack
|
||||
mov cx,10
|
||||
call hangon
|
||||
pop ds es di si dx cx bx ax
|
||||
ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
Shoutred proc near
|
||||
|
||||
push ax bx cx dx si di es ds
|
||||
call debugred
|
||||
mov cx,4
|
||||
call hangon
|
||||
call debugblack
|
||||
mov cx,40
|
||||
call hangon
|
||||
pop ds es di si dx cx bx ax
|
||||
ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
Shoutgreen proc near
|
||||
|
||||
push ax bx cx dx si di es ds
|
||||
call debuggreen
|
||||
mov cx,4
|
||||
call hangon
|
||||
call debugblack
|
||||
mov cx,40
|
||||
call hangon
|
||||
pop ds es di si dx cx bx ax
|
||||
ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
;Checkmemingame proc near
|
||||
|
||||
; cmp charset1,0
|
||||
; jz nodebug
|
||||
; mov bx,60000
|
||||
; mov ah,48h
|
||||
; int 21h
|
||||
; mov ax,bx
|
||||
; mov cl,6
|
||||
; shr ax,cl
|
||||
; mov di,offset cs:debugtextig
|
||||
; call showword
|
||||
|
||||
; mov ax,soundbufferwrite
|
||||
; ;mov ax,exframepos
|
||||
; mov di,offset cs:debugtextex
|
||||
; call showword
|
||||
|
||||
; ;mov ax,extextpos
|
||||
; ;mov di,offset cs:debugtextex2
|
||||
; ;call showword
|
||||
|
||||
; push cs
|
||||
; pop es
|
||||
; mov si,offset cs:debugtextig
|
||||
; mov al,0
|
||||
; mov ah,0
|
||||
; mov dl,100
|
||||
; mov di,204
|
||||
; mov bx,14
|
||||
; call printdirect
|
||||
; push cs
|
||||
; pop es
|
||||
; mov si,offset cs:debugtextex
|
||||
; mov al,0
|
||||
; mov ah,0
|
||||
; mov dl,100
|
||||
; mov di,204
|
||||
; mov bx,22
|
||||
; call printdirect
|
||||
; push cs
|
||||
; pop es
|
||||
; mov si,offset cs:debugtextex2
|
||||
; mov al,0
|
||||
; mov ah,0
|
||||
; mov dl,100
|
||||
; mov di,204
|
||||
; mov bx,30
|
||||
; call printdirect
|
||||
; mov di,204
|
||||
; mov bx,14
|
||||
; mov cl,40
|
||||
; mov ch,24
|
||||
; call multidump
|
||||
;nodebug: ret
|
||||
|
||||
endp
|
||||
|
||||
debugtextig: db "00000K",0
|
||||
|
||||
debugtextex: db "00000b",0
|
||||
|
||||
debugtextex2: db "00000b",0
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if recording
|
||||
|
||||
mov ax,recordpos
|
||||
mov di,offset cs:debugtextr
|
||||
call showword
|
||||
|
||||
mov al,0
|
||||
call print
|
||||
dw 4,4,100
|
||||
debugtextr: db "00000",0
|
||||
|
||||
mov si,0
|
||||
mov di,0
|
||||
mov cl,40
|
||||
mov ch,12
|
||||
call multidump
|
||||
|
||||
endif
|
||||
|
||||
ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
;Debugax proc near
|
||||
;
|
||||
; push ax
|
||||
; call showpanel
|
||||
; pop ax
|
||||
; mov di,offset cs:debugaxtext
|
||||
; call showword
|
||||
;
|
||||
; mov di,204
|
||||
; mov bx,14
|
||||
; mov al,0
|
||||
; mov ah,0
|
||||
; mov dl,100
|
||||
; push cs
|
||||
; pop es
|
||||
; mov si,offset cs:debugaxtext
|
||||
; call printdirect
|
||||
; mov di,204
|
||||
; mov bx,14
|
||||
; mov cl,40
|
||||
; mov ch,24
|
||||
; call multidump
|
||||
; ret
|
||||
;
|
||||
;debugaxtext db "00000 ",0
|
||||
;
|
||||
; endp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
endif
|
||||
|
6262
devtools/tasmrecover/dreamweb/dreamweb.asm
Normal file
6262
devtools/tasmrecover/dreamweb/dreamweb.asm
Normal file
File diff suppressed because it is too large
Load Diff
1758
devtools/tasmrecover/dreamweb/keypad.asm
Normal file
1758
devtools/tasmrecover/dreamweb/keypad.asm
Normal file
File diff suppressed because it is too large
Load Diff
167
devtools/tasmrecover/dreamweb/look.asm
Normal file
167
devtools/tasmrecover/dreamweb/look.asm
Normal file
@ -0,0 +1,167 @@
|
||||
;Copyright (c) 1990-2011 by Neil Dodwell
|
||||
;Released with permission from Neil Dodwell under GPLv2
|
||||
;See LICENSE file for full license text
|
||||
;---------------------------------------------------------------Look-routine----
|
||||
|
||||
Autolook proc near
|
||||
|
||||
mov ax,mousex
|
||||
cmp ax,oldx
|
||||
jnz diffmouse
|
||||
mov ax,mousey
|
||||
cmp ax,oldy
|
||||
jnz diffmouse
|
||||
|
||||
dec lookcounter
|
||||
cmp lookcounter,0
|
||||
jnz noautolook
|
||||
cmp watchingtime,0
|
||||
jnz noautolook
|
||||
call dolook
|
||||
noautolook: ret
|
||||
|
||||
diffmouse: mov lookcounter,1000
|
||||
ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
|
||||
Look proc near
|
||||
|
||||
cmp watchingtime,0
|
||||
jnz blank
|
||||
cmp pointermode,2
|
||||
jz blank
|
||||
|
||||
cmp commandtype,241
|
||||
jz alreadylook
|
||||
mov commandtype,241
|
||||
mov al,25
|
||||
call commandonly
|
||||
alreadylook: cmp mousebutton,1
|
||||
jnz nolook
|
||||
mov ax,mousebutton
|
||||
cmp ax,oldbutton
|
||||
jz nolook
|
||||
call dolook
|
||||
nolook: ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Dolook proc near
|
||||
|
||||
call createpanel
|
||||
call showicon
|
||||
call undertextline
|
||||
call worktoscreenm
|
||||
|
||||
mov commandtype,255
|
||||
call dumptextline
|
||||
|
||||
mov bl,roomnum
|
||||
and bl,31
|
||||
mov bh,0
|
||||
add bx,bx
|
||||
|
||||
mov es,roomdesc
|
||||
add bx,intextdat
|
||||
|
||||
mov si,[es:bx]
|
||||
add si,intext
|
||||
|
||||
call findnextcolon
|
||||
|
||||
mov di,66
|
||||
cmp reallocation,50
|
||||
jc notdream3
|
||||
mov di,40
|
||||
notdream3: mov bx,80
|
||||
mov dl,241
|
||||
call printslow
|
||||
|
||||
cmp al,1
|
||||
jz afterlook
|
||||
mov cx,400
|
||||
call hangonp
|
||||
|
||||
afterlook: mov pointermode,0
|
||||
mov commandtype,0
|
||||
call redrawmainscrn
|
||||
call worktoscreenm
|
||||
ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Redrawmainscrn proc near
|
||||
|
||||
mov timecount,0
|
||||
call createpanel
|
||||
mov newobs,0
|
||||
call drawfloor
|
||||
call printsprites
|
||||
call reelsonscreen
|
||||
call showicon
|
||||
call getunderzoom
|
||||
call undertextline
|
||||
call readmouse
|
||||
mov commandtype,255
|
||||
ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Getback1 proc near
|
||||
|
||||
cmp pickup,0
|
||||
jz notgotobject
|
||||
call blank
|
||||
ret
|
||||
|
||||
notgotobject: cmp commandtype,202
|
||||
jz alreadyget
|
||||
mov commandtype,202
|
||||
mov al,26
|
||||
call commandonly
|
||||
alreadyget: mov ax,mousebutton
|
||||
cmp ax,oldbutton
|
||||
jz nogetback
|
||||
and ax,1
|
||||
jnz dogetback
|
||||
nogetback: ret
|
||||
|
||||
dogetback: mov getback,1
|
||||
mov pickup,0
|
||||
ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
1496
devtools/tasmrecover/dreamweb/monitor.asm
Normal file
1496
devtools/tasmrecover/dreamweb/monitor.asm
Normal file
File diff suppressed because it is too large
Load Diff
581
devtools/tasmrecover/dreamweb/newplace.asm
Normal file
581
devtools/tasmrecover/dreamweb/newplace.asm
Normal file
@ -0,0 +1,581 @@
|
||||
;Copyright (c) 1990-2011 by Neil Dodwell
|
||||
;Released with permission from Neil Dodwell under GPLv2
|
||||
;See LICENSE file for full license text
|
||||
;----------------------------------------------------Choosing a new location----
|
||||
|
||||
Newplace proc near
|
||||
|
||||
cmp needtotravel,1
|
||||
jz istravel
|
||||
cmp autolocation,-1
|
||||
jnz isautoloc
|
||||
ret
|
||||
|
||||
isautoloc: mov al,autolocation
|
||||
mov newlocation,al
|
||||
mov autolocation,-1
|
||||
ret
|
||||
|
||||
istravel: mov needtotravel,0
|
||||
call selectlocation
|
||||
ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
|
||||
Selectlocation proc near
|
||||
|
||||
mov inmaparea,0
|
||||
call clearbeforeload
|
||||
mov getback,0
|
||||
mov pointerframe,22
|
||||
|
||||
call readcitypic
|
||||
call showcity
|
||||
call getridoftemp
|
||||
call readdesticon
|
||||
call loadtraveltext
|
||||
call showpanel
|
||||
call showman
|
||||
call showarrows
|
||||
call showexit
|
||||
call locationpic
|
||||
call undertextline
|
||||
mov commandtype,255
|
||||
call readmouse
|
||||
mov pointerframe,0
|
||||
call showpointer
|
||||
call worktoscreen
|
||||
mov al,9
|
||||
mov ah,255
|
||||
call playchannel0
|
||||
mov newlocation,255
|
||||
|
||||
select: call delpointer
|
||||
call readmouse
|
||||
call showpointer
|
||||
call vsync
|
||||
call dumppointer
|
||||
call dumptextline
|
||||
cmp getback,1
|
||||
jz quittravel
|
||||
mov bx,offset cs:destlist
|
||||
call checkcoords
|
||||
cmp newlocation,255
|
||||
jz select
|
||||
mov al,newlocation
|
||||
cmp al,location
|
||||
jz quittravel
|
||||
|
||||
call getridoftemp
|
||||
call getridoftemp2
|
||||
call getridoftemp3
|
||||
mov es,traveltext
|
||||
call deallocatemem
|
||||
ret
|
||||
|
||||
quittravel: mov al,reallocation ; was just location
|
||||
mov newlocation,al
|
||||
mov getback,0
|
||||
call getridoftemp
|
||||
call getridoftemp2
|
||||
call getridoftemp3
|
||||
mov es,traveltext
|
||||
call deallocatemem
|
||||
ret
|
||||
|
||||
destlist: dw 238,258,4,44,nextdest
|
||||
dw 104,124,4,44,lastdest
|
||||
dw 280,308,4,44,lookatplace
|
||||
dw 104,216,138,192,destselect
|
||||
dw 273,320,157,198,getback1
|
||||
dw 0,320,0,200,blank
|
||||
dw 0ffffh
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Showcity proc near
|
||||
|
||||
call clearwork
|
||||
mov ds,tempgraphics
|
||||
mov di,57
|
||||
mov bx,32
|
||||
mov al,0
|
||||
mov ah,0
|
||||
call showframe
|
||||
mov ds,tempgraphics
|
||||
mov di,120+57
|
||||
mov bx,32
|
||||
mov al,1
|
||||
mov ah,0
|
||||
call showframe
|
||||
ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Lookatplace proc near
|
||||
|
||||
cmp commandtype,224
|
||||
jz alreadyinfo
|
||||
mov commandtype,224
|
||||
mov al,27
|
||||
call commandonly
|
||||
alreadyinfo: mov ax,mousebutton
|
||||
and ax,1
|
||||
jz noinfo
|
||||
cmp ax,oldbutton
|
||||
jz noinfo
|
||||
|
||||
mov bl,destpos
|
||||
cmp bl,15
|
||||
jnc noinfo
|
||||
|
||||
push bx
|
||||
call delpointer
|
||||
call deltextline
|
||||
call getundercentre
|
||||
mov ds,tempgraphics3
|
||||
mov al,0
|
||||
mov ah,0
|
||||
mov di,60
|
||||
mov bx,72
|
||||
call showframe
|
||||
mov al,4
|
||||
mov ah,0
|
||||
mov di,60
|
||||
mov bx,72+55
|
||||
call showframe
|
||||
if foreign
|
||||
mov al,4
|
||||
mov ah,0
|
||||
mov di,60
|
||||
mov bx,72+55+21
|
||||
call showframe
|
||||
endif
|
||||
pop bx
|
||||
|
||||
mov bh,0
|
||||
add bx,bx
|
||||
mov es,traveltext
|
||||
mov si,[es:bx]
|
||||
add si,textstart
|
||||
call findnextcolon
|
||||
|
||||
mov di,63
|
||||
if foreign
|
||||
mov bx,84+4
|
||||
else
|
||||
mov bx,84
|
||||
endif
|
||||
mov dl,191
|
||||
mov al,0
|
||||
mov ah,0
|
||||
call printdirect
|
||||
call worktoscreenm
|
||||
|
||||
mov cx,500
|
||||
call hangonp
|
||||
|
||||
afterinfo: mov pointermode,0
|
||||
mov pointerframe,0
|
||||
call putundercentre
|
||||
call worktoscreenm
|
||||
|
||||
noinfo: ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
|
||||
Getundercentre proc near
|
||||
|
||||
mov di,58
|
||||
mov bx,72
|
||||
mov ds,mapstore
|
||||
mov si,0
|
||||
mov cl,254
|
||||
mov ch,110
|
||||
call multiget
|
||||
ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Putundercentre proc near
|
||||
|
||||
mov di,58
|
||||
mov bx,72
|
||||
mov ds,mapstore
|
||||
mov si,0
|
||||
mov cl,254
|
||||
mov ch,110
|
||||
call multiput
|
||||
ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Locationpic proc near
|
||||
|
||||
call getdestinfo
|
||||
mov al,[es:si]
|
||||
push es si
|
||||
mov di,0
|
||||
cmp al,6
|
||||
jnc secondlot
|
||||
mov ds,tempgraphics
|
||||
add al,4
|
||||
jmp gotgraphic
|
||||
secondlot: sub al,6
|
||||
mov ds,tempgraphics2
|
||||
gotgraphic: add di,104
|
||||
mov bx,138+14
|
||||
mov ah,0
|
||||
call showframe
|
||||
pop si es
|
||||
mov al,destpos
|
||||
cmp al,reallocation
|
||||
jnz notinthisone
|
||||
mov al,3
|
||||
mov di,104
|
||||
mov bx,140+14
|
||||
mov ds,tempgraphics
|
||||
mov ah,0
|
||||
call showframe
|
||||
notinthisone: mov bl,destpos
|
||||
mov bh,0
|
||||
add bx,bx
|
||||
mov es,traveltext
|
||||
mov si,[es:bx]
|
||||
add si,textstart
|
||||
mov di,50
|
||||
mov bx,20
|
||||
mov dl,241
|
||||
mov al,0
|
||||
mov ah,0
|
||||
call printdirect
|
||||
ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
|
||||
Getdestinfo proc near
|
||||
|
||||
mov al,destpos
|
||||
mov ah,0
|
||||
push ax
|
||||
mov dx,seg roomscango
|
||||
mov es,dx
|
||||
mov si,offset es:roomscango
|
||||
add si,ax
|
||||
mov cl,[es:si]
|
||||
pop ax
|
||||
push cx
|
||||
mov dx,seg roompics
|
||||
mov es,dx
|
||||
mov si,offset es:roompics
|
||||
add si,ax
|
||||
pop ax
|
||||
ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Showarrows proc near
|
||||
|
||||
mov di,116-12
|
||||
mov bx,16
|
||||
mov ds,tempgraphics
|
||||
mov al,0
|
||||
mov ah,0
|
||||
call showframe
|
||||
mov di,226+12
|
||||
mov bx,16
|
||||
mov ds,tempgraphics
|
||||
mov al,1
|
||||
mov ah,0
|
||||
call showframe
|
||||
mov di,280
|
||||
mov bx,14
|
||||
mov ds,tempgraphics
|
||||
mov al,2
|
||||
mov ah,0
|
||||
call showframe
|
||||
ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Nextdest proc near
|
||||
|
||||
duok: cmp commandtype,218
|
||||
jz alreadydu
|
||||
mov commandtype,218
|
||||
mov al,28
|
||||
call commandonly
|
||||
alreadydu: mov ax,mousebutton
|
||||
and ax,1
|
||||
jz nodu
|
||||
cmp ax,oldbutton
|
||||
jz nodu
|
||||
|
||||
searchdestup: inc destpos
|
||||
cmp destpos,15
|
||||
jnz notlastdest
|
||||
mov destpos,0
|
||||
notlastdest: call getdestinfo
|
||||
cmp al,0
|
||||
jz searchdestup
|
||||
|
||||
mov newtextline,1
|
||||
call deltextline
|
||||
call delpointer
|
||||
call showpanel
|
||||
call showman
|
||||
call showarrows
|
||||
call locationpic
|
||||
call undertextline
|
||||
call readmouse
|
||||
call showpointer
|
||||
call worktoscreen
|
||||
call delpointer
|
||||
nodu: ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Lastdest proc near
|
||||
|
||||
ddok: cmp commandtype,219
|
||||
jz alreadydd
|
||||
mov commandtype,219
|
||||
mov al,29
|
||||
call commandonly
|
||||
alreadydd: mov ax,mousebutton
|
||||
and ax,1
|
||||
jz nodd
|
||||
cmp ax,oldbutton
|
||||
jz nodd
|
||||
|
||||
searchdestdown: dec destpos
|
||||
cmp destpos,-1
|
||||
jnz notfirstdest
|
||||
mov destpos,15
|
||||
notfirstdest: call getdestinfo
|
||||
cmp al,0
|
||||
jz searchdestdown
|
||||
|
||||
mov newtextline,1
|
||||
call deltextline
|
||||
call delpointer
|
||||
call showpanel
|
||||
call showman
|
||||
call showarrows
|
||||
call locationpic
|
||||
call undertextline
|
||||
call readmouse
|
||||
call showpointer
|
||||
call worktoscreen
|
||||
call delpointer
|
||||
nodd: ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Destselect proc near
|
||||
|
||||
cmp commandtype,222
|
||||
jz alreadytrav
|
||||
mov commandtype,222
|
||||
mov al,30
|
||||
call commandonly
|
||||
alreadytrav: mov ax,mousebutton
|
||||
and ax,1
|
||||
jz notrav
|
||||
cmp ax,oldbutton
|
||||
jz notrav
|
||||
|
||||
call getdestinfo
|
||||
mov al,destpos
|
||||
mov newlocation,al
|
||||
notrav: ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Getlocation proc near
|
||||
|
||||
mov ah,0
|
||||
mov bx,ax
|
||||
mov dx,seg roomscango
|
||||
mov es,dx
|
||||
add bx,offset es:roomscango
|
||||
mov al,[es:bx]
|
||||
ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
Setlocation proc near ;makes a location accessable
|
||||
|
||||
mov ah,0
|
||||
mov bx,ax
|
||||
mov dx,seg roomscango
|
||||
mov es,dx
|
||||
add bx,offset es:roomscango
|
||||
mov byte ptr [es:bx],1
|
||||
ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
|
||||
Resetlocation proc near ;makes a location inaccessable
|
||||
|
||||
push ax
|
||||
cmp al,5
|
||||
jnz notdelhotel
|
||||
call purgealocation
|
||||
mov al,21
|
||||
call purgealocation
|
||||
mov al,22
|
||||
call purgealocation
|
||||
mov al,27
|
||||
call purgealocation
|
||||
jmp clearedlocations
|
||||
|
||||
notdelhotel: cmp al,8
|
||||
jnz notdeltvstud
|
||||
call purgealocation
|
||||
mov al,28
|
||||
call purgealocation
|
||||
jmp clearedlocations
|
||||
|
||||
notdeltvstud: cmp al,6
|
||||
jnz notdelsarters
|
||||
call purgealocation
|
||||
mov al,20
|
||||
call purgealocation
|
||||
mov al,25
|
||||
call purgealocation
|
||||
jmp clearedlocations
|
||||
|
||||
notdelsarters: cmp al,13
|
||||
jnz notdelboathouse
|
||||
call purgealocation
|
||||
mov al,29
|
||||
call purgealocation
|
||||
jmp clearedlocations
|
||||
|
||||
notdelboathouse:
|
||||
|
||||
clearedlocations: pop ax
|
||||
mov ah,0
|
||||
mov bx,ax
|
||||
mov dx,seg roomscango
|
||||
mov es,dx
|
||||
add bx,offset es:roomscango
|
||||
mov byte ptr [es:bx],0
|
||||
ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
|
||||
Readdesticon proc near
|
||||
|
||||
mov dx,offset cs:travelgraphic1
|
||||
call loadintotemp
|
||||
|
||||
mov dx,offset cs:travelgraphic2
|
||||
call loadintotemp2
|
||||
|
||||
mov dx,offset cs:icongraphics8
|
||||
call loadintotemp3
|
||||
ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
|
||||
Readcitypic proc near
|
||||
|
||||
mov dx,offset cs:cityname
|
||||
call loadintotemp
|
||||
ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
2608
devtools/tasmrecover/dreamweb/object.asm
Normal file
2608
devtools/tasmrecover/dreamweb/object.asm
Normal file
File diff suppressed because it is too large
Load Diff
591
devtools/tasmrecover/dreamweb/print.asm
Normal file
591
devtools/tasmrecover/dreamweb/print.asm
Normal file
@ -0,0 +1,591 @@
|
||||
;Copyright (c) 1990-2011 by Neil Dodwell
|
||||
;Released with permission from Neil Dodwell under GPLv2
|
||||
;See LICENSE file for full license text
|
||||
Printchar proc near
|
||||
|
||||
cmp al,255
|
||||
jz ignoreit
|
||||
push si bx di
|
||||
if foreign
|
||||
sub bx,3
|
||||
endif
|
||||
push ax
|
||||
sub al,32 ;"A"
|
||||
mov ah,0
|
||||
add ax,charshift
|
||||
call showframe
|
||||
pop ax di bx si
|
||||
cmp kerning,0
|
||||
jnz nokern
|
||||
call kernchars
|
||||
nokern: push cx
|
||||
mov ch,0
|
||||
add di,cx
|
||||
pop cx
|
||||
;dec di
|
||||
ignoreit: ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Kernchars proc near
|
||||
|
||||
;sub al,13
|
||||
cmp al,"a"
|
||||
jz iskern
|
||||
cmp al,"u"
|
||||
jz iskern
|
||||
ret
|
||||
iskern: cmp ah,"n"
|
||||
jz kernit
|
||||
cmp ah,"t"
|
||||
jz kernit
|
||||
cmp ah,"r"
|
||||
jz kernit
|
||||
cmp ah,"i"
|
||||
jz kernit
|
||||
cmp ah,"l"
|
||||
jz kernit
|
||||
ret
|
||||
kernit: dec cl
|
||||
ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
;------------------------------------------------Proportional text printing----
|
||||
|
||||
|
||||
;Memprint proc near
|
||||
;
|
||||
; call usecharset1
|
||||
;
|
||||
; push ax bx cx dx es ds si di
|
||||
; call deltextline
|
||||
; pop di si ds es dx cx bx ax
|
||||
;
|
||||
; pop si
|
||||
; push cs
|
||||
; pop es
|
||||
; inc si
|
||||
; mov ds,currentset
|
||||
; mov di,textaddressx
|
||||
; mov bx,textaddressy
|
||||
; mov dl,textlen
|
||||
; mov al,0
|
||||
; mov ah,0
|
||||
; call printdirect
|
||||
; push si
|
||||
|
||||
; mov newtextline,1
|
||||
; ret
|
||||
|
||||
; endp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
;------------------------------------------------Proportional text printing----
|
||||
|
||||
;Print proc near
|
||||
;
|
||||
; pop si
|
||||
; mov bx,[cs:si+2]
|
||||
; mov di,[cs:si+0]
|
||||
; mov dl,[cs:si+4]
|
||||
; add si,6
|
||||
; mov ds,currentset
|
||||
;
|
||||
;printloop2: push bx di dx
|
||||
; push es cs
|
||||
; pop es
|
||||
; call getnumber
|
||||
; pop es
|
||||
; mov ch,0
|
||||
;printloop1: mov ax,[cs:si]
|
||||
; inc si
|
||||
; cmp al,0
|
||||
; jz finishprint
|
||||
; push cx es
|
||||
; call modifychar
|
||||
; call printchar
|
||||
; pop es cx
|
||||
; loop printloop1
|
||||
; pop dx di bx
|
||||
; add bx,linespacing
|
||||
; jmp printloop2
|
||||
|
||||
;finishprint: pop dx di bx
|
||||
; push si
|
||||
; ret
|
||||
|
||||
; endp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Printslow proc near
|
||||
|
||||
mov pointerframe,1
|
||||
mov pointermode,3
|
||||
mov ds,charset1
|
||||
printloopslow6: push bx di dx
|
||||
call getnumber
|
||||
|
||||
mov ch,0
|
||||
printloopslow5: push cx si es
|
||||
mov ax,[es:si]
|
||||
push bx cx es si ds
|
||||
if foreign
|
||||
call modifychar
|
||||
endif
|
||||
call printboth
|
||||
pop ds si es cx bx
|
||||
mov ax,[es:si+1]
|
||||
inc si
|
||||
cmp al,0
|
||||
jz finishslow
|
||||
cmp al,":"
|
||||
jz finishslow
|
||||
cmp cl,1
|
||||
jz afterslow
|
||||
push di ds bx cx es si
|
||||
if foreign
|
||||
call modifychar
|
||||
endif
|
||||
mov charshift,91
|
||||
call printboth
|
||||
mov charshift,0
|
||||
pop si es cx bx ds di
|
||||
call waitframes
|
||||
cmp ax,0
|
||||
jz keepgoing
|
||||
cmp ax,oldbutton
|
||||
jnz finishslow2
|
||||
keepgoing: call waitframes
|
||||
noslow: cmp ax,0
|
||||
jz afterslow
|
||||
cmp ax,oldbutton
|
||||
jnz finishslow2 ;used to finish early
|
||||
afterslow: pop es si cx
|
||||
inc si
|
||||
loop printloopslow5
|
||||
|
||||
pop dx di bx
|
||||
add bx,10
|
||||
jmp printloopslow6
|
||||
|
||||
finishslow: pop es si cx dx di bx
|
||||
mov al,0
|
||||
ret
|
||||
|
||||
finishslow2: pop es si cx dx di bx
|
||||
mov al,1
|
||||
ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
Waitframes proc near
|
||||
|
||||
push di bx es si ds
|
||||
call readmouse
|
||||
call showpointer
|
||||
call vsync
|
||||
call dumppointer
|
||||
call delpointer
|
||||
mov ax,mousebutton
|
||||
pop ds si es bx di
|
||||
ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
|
||||
Printboth proc near
|
||||
|
||||
push ax cx bx
|
||||
push di
|
||||
call printchar
|
||||
pop ax
|
||||
push di
|
||||
mov di,ax
|
||||
call multidump
|
||||
pop di
|
||||
pop bx cx ax
|
||||
ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Printdirect proc near
|
||||
|
||||
mov lastxpos,di
|
||||
mov ds,currentset
|
||||
printloop6: push bx di dx
|
||||
call getnumber
|
||||
mov ch,0
|
||||
printloop5: mov ax,[es:si]
|
||||
inc si
|
||||
cmp al,0
|
||||
jz finishdirct
|
||||
cmp al,":"
|
||||
jz finishdirct
|
||||
push cx es
|
||||
if foreign
|
||||
call modifychar
|
||||
endif
|
||||
call printchar
|
||||
mov lastxpos,di
|
||||
pop es cx
|
||||
loop printloop5
|
||||
pop dx di bx
|
||||
add bx,linespacing
|
||||
jmp printloop6
|
||||
|
||||
finishdirct: pop dx di bx
|
||||
ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Monprint proc near
|
||||
|
||||
mov kerning,1
|
||||
mov si,bx
|
||||
mov dl,166
|
||||
mov di,monadx
|
||||
mov bx,monady
|
||||
mov ds,tempcharset
|
||||
|
||||
printloop8: push bx di dx
|
||||
call getnumber
|
||||
mov ch,0
|
||||
printloop7: mov al,[es:si]
|
||||
inc si
|
||||
|
||||
cmp al,":"
|
||||
jz finishmon2
|
||||
cmp al,0
|
||||
jz finishmon
|
||||
cmp al,34
|
||||
jz finishmon
|
||||
cmp al,"="
|
||||
jz finishmon
|
||||
cmp al,"%"
|
||||
jnz nottrigger
|
||||
mov ah,[es:si]
|
||||
inc si
|
||||
inc si
|
||||
jmp finishmon
|
||||
nottrigger: push cx es
|
||||
if foreign
|
||||
call modifychar
|
||||
endif
|
||||
call printchar
|
||||
mov curslocx,di
|
||||
mov curslocy,bx
|
||||
mov maintimer,1
|
||||
call printcurs
|
||||
|
||||
call vsync
|
||||
push si dx ds es bx di
|
||||
call lockmon
|
||||
pop di bx es ds dx si
|
||||
call delcurs
|
||||
pop es cx
|
||||
loop printloop7
|
||||
|
||||
finishmon2: pop dx di bx
|
||||
call scrollmonitor
|
||||
mov curslocx,di
|
||||
jmp printloop8
|
||||
|
||||
finishmon: pop dx di bx
|
||||
cmp al,"%"
|
||||
jnz nottrigger2
|
||||
mov lasttrigger,ah
|
||||
nottrigger2: mov curslocx,di
|
||||
call scrollmonitor
|
||||
mov bx,si
|
||||
mov kerning,0
|
||||
ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Getnumber proc near
|
||||
|
||||
mov cx,0
|
||||
push si bx di ds es
|
||||
mov di,si
|
||||
|
||||
wordloop: push cx dx
|
||||
call getnextword
|
||||
pop dx cx
|
||||
cmp al,1
|
||||
jz endoftext
|
||||
mov al,cl
|
||||
mov ah,0
|
||||
push bx
|
||||
mov bh,0
|
||||
add ax,bx
|
||||
pop bx
|
||||
sub ax,10
|
||||
mov dh,0
|
||||
cmp ax,dx
|
||||
jnc gotoverend
|
||||
add cl,bl
|
||||
add ch,bh
|
||||
jmp wordloop
|
||||
|
||||
gotoverend: mov al,dl
|
||||
and al,1
|
||||
jz notcentre
|
||||
push cx
|
||||
mov al,dl
|
||||
and al,11111110b
|
||||
mov ah,0
|
||||
mov ch,0
|
||||
sub ax,cx
|
||||
add ax,20
|
||||
shr ax,1
|
||||
pop cx
|
||||
pop es ds di bx si
|
||||
add di,ax
|
||||
mov cl,ch
|
||||
ret
|
||||
notcentre: pop es ds di bx si
|
||||
mov cl,ch
|
||||
ret
|
||||
|
||||
|
||||
|
||||
endoftext: mov al,cl
|
||||
mov ah,0
|
||||
push bx
|
||||
mov bh,0
|
||||
add ax,bx
|
||||
pop bx
|
||||
sub ax,10
|
||||
mov dh,0
|
||||
cmp ax,dx
|
||||
jnc gotoverend2
|
||||
add cl,bl
|
||||
add ch,bh
|
||||
|
||||
gotoverend2: mov al,dl
|
||||
and al,1
|
||||
jz notcent2
|
||||
push cx
|
||||
mov al,dl
|
||||
and al,11111110b
|
||||
add al,2
|
||||
mov ah,0
|
||||
mov ch,0
|
||||
add ax,20
|
||||
sub ax,cx
|
||||
shr ax,1
|
||||
pop cx
|
||||
pop es ds di bx si
|
||||
add di,ax
|
||||
mov cl,ch
|
||||
ret
|
||||
notcent2: pop es ds di bx si
|
||||
mov cl,ch
|
||||
ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Getnextword proc near
|
||||
|
||||
mov bx,0
|
||||
getloop: mov ax,[es:di]
|
||||
inc di
|
||||
inc bh
|
||||
cmp al,":"
|
||||
jz endall
|
||||
cmp al,0
|
||||
jz endall
|
||||
cmp al,32
|
||||
jz endword
|
||||
if foreign
|
||||
call modifychar
|
||||
endif
|
||||
cmp al,255
|
||||
jz getloop
|
||||
push ax
|
||||
sub al,32 ;"A"
|
||||
mov ah,0
|
||||
add ax,charshift
|
||||
add ax,ax
|
||||
mov si,ax
|
||||
add ax,ax
|
||||
add si,ax
|
||||
mov cl,[si+0]
|
||||
pop ax
|
||||
call kernchars
|
||||
add bl,cl
|
||||
;dec bl
|
||||
jmp getloop
|
||||
|
||||
endword: add bl,6
|
||||
mov al,0
|
||||
ret
|
||||
|
||||
endall: add bl,6
|
||||
mov al,1
|
||||
ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if german
|
||||
|
||||
Modifychar proc near
|
||||
|
||||
cmp al,128
|
||||
jc nomod
|
||||
cmp al,129
|
||||
jnz not129
|
||||
mov al,"Z"+3
|
||||
ret
|
||||
not129: cmp al,132
|
||||
jnz not132
|
||||
mov al,"Z"+1
|
||||
ret
|
||||
not132: cmp al,142
|
||||
jnz not142
|
||||
mov al,"Z"+4
|
||||
ret
|
||||
not142: cmp al,154
|
||||
jnz not154
|
||||
mov al,"Z"+6
|
||||
ret
|
||||
not154: cmp al,225
|
||||
jnz not225
|
||||
mov al,"A"-1
|
||||
ret
|
||||
not225: cmp al,153
|
||||
jnz not153
|
||||
mov al,"Z"+5
|
||||
ret
|
||||
not153: cmp al,148
|
||||
jnz not148
|
||||
mov al,"Z"+2
|
||||
ret
|
||||
not148: ret
|
||||
|
||||
nomod: ret
|
||||
|
||||
endp
|
||||
|
||||
endif
|
||||
|
||||
|
||||
|
||||
|
||||
if spanish
|
||||
|
||||
Modifychar proc near
|
||||
|
||||
cmp al,128
|
||||
jc nomod
|
||||
cmp al,160
|
||||
jnz not160
|
||||
mov al,"Z"+1
|
||||
ret
|
||||
not160: cmp al,130
|
||||
jnz not130
|
||||
mov al,"Z"+2
|
||||
ret
|
||||
not130: cmp al,161
|
||||
jnz not161
|
||||
mov al,"Z"+3
|
||||
ret
|
||||
not161: cmp al,162
|
||||
jnz not162
|
||||
mov al,"Z"+4
|
||||
ret
|
||||
not162: cmp al,163
|
||||
jnz not163
|
||||
mov al,"Z"+5
|
||||
ret
|
||||
not163: cmp al,164
|
||||
jnz not164
|
||||
mov al,"Z"+6
|
||||
ret
|
||||
not164: cmp al,165
|
||||
jnz not165
|
||||
mov al,","-1
|
||||
ret
|
||||
not165: cmp al,168
|
||||
jnz not168
|
||||
mov al,"A"-1
|
||||
ret
|
||||
not168: cmp al,173
|
||||
jnz not173
|
||||
mov al,"A"-4
|
||||
ret
|
||||
not173: cmp al,129
|
||||
jnz not129
|
||||
mov al,"A"-5
|
||||
not129: ret
|
||||
|
||||
nomod: ret
|
||||
|
||||
endp
|
||||
|
||||
endif
|
||||
|
1495
devtools/tasmrecover/dreamweb/saveload.asm
Normal file
1495
devtools/tasmrecover/dreamweb/saveload.asm
Normal file
File diff suppressed because it is too large
Load Diff
1293
devtools/tasmrecover/dreamweb/sblaster.asm
Normal file
1293
devtools/tasmrecover/dreamweb/sblaster.asm
Normal file
File diff suppressed because it is too large
Load Diff
5034
devtools/tasmrecover/dreamweb/sprite.asm
Normal file
5034
devtools/tasmrecover/dreamweb/sprite.asm
Normal file
File diff suppressed because it is too large
Load Diff
580
devtools/tasmrecover/dreamweb/talk.asm
Normal file
580
devtools/tasmrecover/dreamweb/talk.asm
Normal file
@ -0,0 +1,580 @@
|
||||
;Copyright (c) 1990-2011 by Neil Dodwell
|
||||
;Released with permission from Neil Dodwell under GPLv2
|
||||
;See LICENSE file for full license text
|
||||
Talk proc near
|
||||
|
||||
mov talkpos,0
|
||||
mov inmaparea,0
|
||||
mov al,command
|
||||
mov character,al
|
||||
call createpanel
|
||||
call showpanel
|
||||
call showman
|
||||
call showexit
|
||||
call undertextline
|
||||
call convicons
|
||||
call starttalk
|
||||
mov commandtype,255
|
||||
call readmouse
|
||||
call showpointer
|
||||
call worktoscreen
|
||||
waittalk: call delpointer
|
||||
call readmouse
|
||||
call animpointer
|
||||
call showpointer
|
||||
call vsync
|
||||
call dumppointer
|
||||
call dumptextline
|
||||
mov getback,0
|
||||
mov bx,offset cs:talklist
|
||||
call checkcoords
|
||||
cmp getback,0
|
||||
jz waittalk
|
||||
finishtalk: mov bx,persondata
|
||||
push cs
|
||||
pop es
|
||||
cmp talkpos,4
|
||||
jc notnexttalk
|
||||
mov al,[es:bx+7]
|
||||
or al,128
|
||||
mov [es:bx+7],al
|
||||
notnexttalk: call redrawmainscrn
|
||||
call worktoscreenm
|
||||
cmp speechloaded,1
|
||||
jnz nospeech
|
||||
call cancelch1
|
||||
mov volumedirection,-1 ;fade (louder)
|
||||
mov volumeto,0 ;up to 0 (max)
|
||||
nospeech: ret
|
||||
|
||||
talklist: dw 273,320,157,198,getback1
|
||||
dw 240,290,2,44,moretalk
|
||||
dw 0,320,0,200,blank
|
||||
dw 0ffffh
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Convicons proc near
|
||||
|
||||
mov al,character
|
||||
and al,127
|
||||
call getpersframe
|
||||
mov di,234
|
||||
mov bx,2
|
||||
mov currentframe,ax
|
||||
call findsource
|
||||
mov ax,currentframe
|
||||
sub ax,takeoff
|
||||
mov ah,0
|
||||
call showframe
|
||||
ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Getpersframe proc near
|
||||
|
||||
mov ah,0
|
||||
add ax,ax
|
||||
mov bx,ax
|
||||
mov es,people
|
||||
add bx,personframes
|
||||
mov ax,[es:bx]
|
||||
ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Starttalk proc near
|
||||
|
||||
mov talkmode,0
|
||||
mov al,character
|
||||
and al,127
|
||||
call getpersontext
|
||||
mov charshift,91+91
|
||||
mov di,66
|
||||
mov bx,64
|
||||
mov dl,241
|
||||
mov al,0
|
||||
mov ah,79
|
||||
call printdirect
|
||||
mov charshift,0
|
||||
mov di,66
|
||||
mov bx,80
|
||||
mov dl,241
|
||||
mov al,0
|
||||
mov ah,0
|
||||
call printdirect
|
||||
|
||||
if cd
|
||||
mov speechloaded,0
|
||||
mov al,character
|
||||
and al,127
|
||||
mov ah,0
|
||||
mov cx,64
|
||||
mul cx
|
||||
mov cl,"C"
|
||||
mov dl,"R"
|
||||
mov dh,reallocation
|
||||
call loadspeech
|
||||
cmp speechloaded,1
|
||||
jnz nospeech1
|
||||
mov volumedirection,1 ;quieter
|
||||
mov volumeto,6 ;quite quiet!
|
||||
mov al,50+12
|
||||
call playchannel1
|
||||
endif
|
||||
nospeech1: ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Getpersontext proc near
|
||||
|
||||
mov ah,0
|
||||
mov cx,64*2
|
||||
mul cx
|
||||
mov si,ax
|
||||
mov es,people
|
||||
add si,persontxtdat
|
||||
mov cx,persontext
|
||||
mov ax,[es:si]
|
||||
add ax,cx
|
||||
mov si,ax
|
||||
ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Moretalk proc near
|
||||
|
||||
;cmp ch1playing,255
|
||||
;jnz cantredes
|
||||
cmp talkmode,0
|
||||
jz canmore
|
||||
call redes
|
||||
ret
|
||||
|
||||
canmore: cmp commandtype,215
|
||||
jz alreadymore
|
||||
mov commandtype,215
|
||||
mov al,49
|
||||
call commandonly
|
||||
alreadymore: mov ax,mousebutton
|
||||
cmp ax,oldbutton
|
||||
jz nomore
|
||||
and ax,1
|
||||
jnz domoretalk
|
||||
nomore: ret
|
||||
|
||||
domoretalk: mov talkmode,2
|
||||
mov talkpos,4
|
||||
cmp character,100
|
||||
jc notsecondpart
|
||||
mov talkpos,48
|
||||
notsecondpart: call dosometalk
|
||||
ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Dosometalk proc near
|
||||
|
||||
if cd
|
||||
dospeech: mov al,talkpos
|
||||
mov al,character
|
||||
and al,127
|
||||
mov ah,0
|
||||
mov cx,64
|
||||
mul cx
|
||||
mov cx,ax
|
||||
mov al,talkpos
|
||||
mov ah,0
|
||||
add ax,cx
|
||||
add ax,ax
|
||||
mov si,ax
|
||||
|
||||
mov es,people
|
||||
add si,persontxtdat
|
||||
mov cx,persontext
|
||||
|
||||
mov ax,[es:si]
|
||||
add ax,cx
|
||||
mov si,ax
|
||||
cmp byte ptr [es:si],0
|
||||
jz endheartalk
|
||||
|
||||
push es si
|
||||
call createpanel
|
||||
call showpanel
|
||||
call showman
|
||||
call showexit
|
||||
call convicons
|
||||
pop si es
|
||||
|
||||
mov di,164
|
||||
mov bx,64
|
||||
mov dl,144
|
||||
mov al,0
|
||||
mov ah,0
|
||||
call printdirect
|
||||
|
||||
mov al,character
|
||||
and al,127
|
||||
mov ah,0
|
||||
mov cx,64
|
||||
mul cx
|
||||
mov cl,talkpos
|
||||
mov ch,0
|
||||
add ax,cx
|
||||
mov cl,"C"
|
||||
mov dl,"R"
|
||||
mov dh,reallocation
|
||||
call loadspeech
|
||||
cmp speechloaded,0
|
||||
jz noplay1
|
||||
mov al,62
|
||||
call playchannel1
|
||||
|
||||
noplay1: mov pointermode,3
|
||||
call worktoscreenm
|
||||
mov cx,180
|
||||
call hangonpq
|
||||
jnc $1
|
||||
ret
|
||||
|
||||
$1:
|
||||
inc talkpos
|
||||
|
||||
mov al,talkpos
|
||||
mov al,character
|
||||
and al,127
|
||||
mov ah,0
|
||||
mov cx,64
|
||||
mul cx
|
||||
mov cx,ax
|
||||
mov al,talkpos
|
||||
mov ah,0
|
||||
add ax,cx
|
||||
add ax,ax
|
||||
mov si,ax
|
||||
|
||||
mov es,people
|
||||
add si,persontxtdat
|
||||
mov cx,persontext
|
||||
|
||||
mov ax,[es:si]
|
||||
add ax,cx
|
||||
mov si,ax
|
||||
cmp byte ptr [es:si],0
|
||||
jz endheartalk
|
||||
cmp byte ptr [es:si],":"
|
||||
jz skiptalk2
|
||||
cmp byte ptr [es:si],32
|
||||
jz skiptalk2
|
||||
|
||||
push es si
|
||||
call createpanel
|
||||
call showpanel
|
||||
call showman
|
||||
call showexit
|
||||
call convicons
|
||||
pop si es
|
||||
|
||||
mov di,48
|
||||
mov bx,128
|
||||
mov dl,144
|
||||
mov al,0
|
||||
mov ah,0
|
||||
call printdirect
|
||||
|
||||
mov al,character
|
||||
and al,127
|
||||
mov ah,0
|
||||
mov cx,64
|
||||
mul cx
|
||||
mov cl,talkpos
|
||||
mov ch,0
|
||||
add ax,cx
|
||||
mov cl,"C"
|
||||
mov dl,"R"
|
||||
mov dh,reallocation
|
||||
call loadspeech
|
||||
cmp speechloaded,0
|
||||
jz noplay2
|
||||
mov al,62
|
||||
call playchannel1
|
||||
|
||||
noplay2: mov pointermode,3
|
||||
call worktoscreenm
|
||||
mov cx,180
|
||||
call hangonpq
|
||||
jnc skiptalk2
|
||||
ret
|
||||
|
||||
skiptalk2: inc talkpos
|
||||
jmp dospeech
|
||||
|
||||
endheartalk: mov pointermode,0
|
||||
ret
|
||||
|
||||
else
|
||||
|
||||
watchtalk: mov al,talkpos
|
||||
mov al,character
|
||||
and al,127
|
||||
mov ah,0
|
||||
mov cx,64
|
||||
mul cx
|
||||
mov cx,ax
|
||||
mov al,talkpos
|
||||
mov ah,0
|
||||
add ax,cx
|
||||
add ax,ax
|
||||
mov si,ax
|
||||
|
||||
mov es,people
|
||||
add si,persontxtdat
|
||||
mov cx,persontext
|
||||
|
||||
mov ax,[es:si]
|
||||
add ax,cx
|
||||
mov si,ax
|
||||
cmp byte ptr [es:si],0
|
||||
jz endwatchtalk
|
||||
|
||||
push es si
|
||||
call createpanel
|
||||
call showpanel
|
||||
call showman
|
||||
call showexit
|
||||
call convicons
|
||||
pop si es
|
||||
|
||||
mov di,164
|
||||
mov bx,64
|
||||
mov dl,144
|
||||
mov al,0
|
||||
mov ah,0
|
||||
call printdirect
|
||||
|
||||
mov pointermode,3
|
||||
call worktoscreenm
|
||||
mov cx,180
|
||||
call hangonpq
|
||||
jnc $1
|
||||
ret
|
||||
$1:
|
||||
|
||||
inc talkpos
|
||||
|
||||
mov al,talkpos
|
||||
mov al,character
|
||||
and al,127
|
||||
mov ah,0
|
||||
mov cx,64
|
||||
mul cx
|
||||
mov cx,ax
|
||||
mov al,talkpos
|
||||
mov ah,0
|
||||
add ax,cx
|
||||
add ax,ax
|
||||
mov si,ax
|
||||
|
||||
mov es,people
|
||||
add si,persontxtdat
|
||||
mov cx,persontext
|
||||
|
||||
mov ax,[es:si]
|
||||
add ax,cx
|
||||
mov si,ax
|
||||
cmp byte ptr [es:si],0
|
||||
jz endwatchtalk
|
||||
cmp byte ptr [es:si],":"
|
||||
jz skiptalk
|
||||
cmp byte ptr [es:si],32
|
||||
jz skiptalk
|
||||
|
||||
push es si
|
||||
call createpanel
|
||||
call showpanel
|
||||
call showman
|
||||
call showexit
|
||||
call convicons
|
||||
pop si es
|
||||
|
||||
mov di,48
|
||||
mov bx,128
|
||||
mov dl,144
|
||||
mov al,0
|
||||
mov ah,0
|
||||
call printdirect
|
||||
|
||||
mov pointermode,3
|
||||
call worktoscreenm
|
||||
mov cx,180
|
||||
call hangonpq
|
||||
jnc skiptalk
|
||||
ret
|
||||
|
||||
skiptalk: inc talkpos
|
||||
jmp watchtalk
|
||||
|
||||
endwatchtalk: mov pointermode,0
|
||||
ret
|
||||
|
||||
endif
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Hangonpq proc near
|
||||
|
||||
mov getback,0
|
||||
mov bx,0
|
||||
hangloopq: push cx bx
|
||||
call delpointer
|
||||
call readmouse
|
||||
call animpointer
|
||||
call showpointer
|
||||
call vsync
|
||||
call dumppointer
|
||||
call dumptextline
|
||||
mov bx,offset cs:quitlist
|
||||
call checkcoords
|
||||
pop bx cx
|
||||
cmp getback,1
|
||||
jz quitconv
|
||||
cmp speechloaded,1
|
||||
jnz notspeaking
|
||||
cmp ch1playing,255
|
||||
jnz notspeaking
|
||||
inc bx
|
||||
cmp bx,40 ;pause after speech ends
|
||||
jz finishconv
|
||||
notspeaking: cmp mousebutton,0
|
||||
jz hangloopq
|
||||
cmp oldbutton,0
|
||||
jnz hangloopq
|
||||
finishconv: call delpointer
|
||||
mov pointermode,0
|
||||
clc
|
||||
ret
|
||||
|
||||
quitconv: call delpointer
|
||||
mov pointermode,0
|
||||
call cancelch1
|
||||
stc
|
||||
ret
|
||||
|
||||
quitlist: dw 273,320,157,198,getback1
|
||||
dw 0,320,0,200,blank
|
||||
dw 0ffffh
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Redes proc near
|
||||
|
||||
cmp ch1playing,255
|
||||
jnz cantredes
|
||||
cmp talkmode,2
|
||||
jz canredes
|
||||
cantredes: call blank
|
||||
ret
|
||||
|
||||
canredes: cmp commandtype,217
|
||||
jz alreadyreds
|
||||
mov commandtype,217
|
||||
mov al,50
|
||||
call commandonly
|
||||
alreadyreds: mov ax,mousebutton
|
||||
and ax,1
|
||||
jnz doredes
|
||||
ret
|
||||
|
||||
doredes: call delpointer
|
||||
call createpanel
|
||||
call showpanel
|
||||
call showman
|
||||
call showexit
|
||||
call convicons
|
||||
call starttalk
|
||||
call readmouse
|
||||
call showpointer
|
||||
call worktoscreen
|
||||
call delpointer
|
||||
ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
583
devtools/tasmrecover/dreamweb/titles.asm
Normal file
583
devtools/tasmrecover/dreamweb/titles.asm
Normal file
@ -0,0 +1,583 @@
|
||||
;Copyright (c) 1990-2011 by Neil Dodwell
|
||||
;Released with permission from Neil Dodwell under GPLv2
|
||||
;See LICENSE file for full license text
|
||||
|
||||
Titles proc near
|
||||
|
||||
if demo
|
||||
ret
|
||||
else
|
||||
call clearpalette
|
||||
call biblequote
|
||||
call intro
|
||||
ret
|
||||
endif
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
|
||||
Endgame proc near
|
||||
|
||||
mov dx,offset cs:endtextname
|
||||
call loadtemptext
|
||||
call monkspeaking
|
||||
call gettingshot
|
||||
call getridoftemptext
|
||||
mov volumeto,7
|
||||
mov volumedirection,1
|
||||
mov cx,200
|
||||
call hangon
|
||||
ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
if cd
|
||||
|
||||
Monkspeaking proc near
|
||||
|
||||
mov roomssample,35
|
||||
call loadroomssample
|
||||
mov dx,offset cs:monkface
|
||||
call loadintotemp
|
||||
call clearwork ;createpanel2
|
||||
call showmonk
|
||||
call worktoscreen
|
||||
mov volume,7
|
||||
mov volumedirection,-1
|
||||
mov volumeto,5
|
||||
mov al,12
|
||||
mov ah,255
|
||||
call playchannel0
|
||||
call fadescreenups
|
||||
mov cx,300
|
||||
call hangon
|
||||
|
||||
mov al,40
|
||||
loadspeech2: push ax
|
||||
mov dl,"T"
|
||||
mov dh,83
|
||||
mov cl,"T"
|
||||
mov ah,0
|
||||
call loadspeech
|
||||
mov al,50+12
|
||||
call playchannel1
|
||||
notloadspeech2:
|
||||
call vsync
|
||||
cmp ch1playing,255
|
||||
jnz notloadspeech2
|
||||
pop ax
|
||||
inc al
|
||||
cmp al,48
|
||||
jnz loadspeech2
|
||||
|
||||
mov volumedirection,1
|
||||
mov volumeto,7
|
||||
call fadescreendowns
|
||||
mov cx,300
|
||||
call hangon
|
||||
call getridoftemp
|
||||
ret
|
||||
|
||||
endp
|
||||
|
||||
else
|
||||
|
||||
Monkspeaking proc near
|
||||
|
||||
mov roomssample,35
|
||||
call loadroomssample
|
||||
mov dx,offset cs:monkface
|
||||
call loadintotemp
|
||||
call clearwork ;createpanel2
|
||||
call showmonk
|
||||
call worktoscreen
|
||||
mov volume,7
|
||||
mov volumedirection,-1
|
||||
mov volumeto,0
|
||||
mov al,12
|
||||
mov ah,255
|
||||
call playchannel0
|
||||
call fadescreenups
|
||||
mov cx,300
|
||||
call hangon
|
||||
|
||||
mov al,40
|
||||
nextmonkspeak: push ax
|
||||
mov ah,0
|
||||
mov si,ax
|
||||
add si,si
|
||||
mov es,textfile1
|
||||
mov ax,[es:si]
|
||||
add ax,textstart
|
||||
mov si,ax
|
||||
nextbit: mov di,36
|
||||
mov bx,140
|
||||
mov dl,239
|
||||
call printdirect
|
||||
push ax si es
|
||||
call worktoscreen
|
||||
call clearwork
|
||||
call showmonk
|
||||
mov cx,240
|
||||
call hangon
|
||||
pop es si ax
|
||||
cmp al,0
|
||||
jnz nextbit
|
||||
pop ax
|
||||
inc al
|
||||
cmp al,44
|
||||
jnz nextmonkspeak
|
||||
|
||||
mov volumedirection,1
|
||||
mov volumeto,7
|
||||
call fadescreendowns
|
||||
mov cx,300
|
||||
call hangon
|
||||
call getridoftemp
|
||||
ret
|
||||
|
||||
endp
|
||||
|
||||
endif
|
||||
|
||||
|
||||
|
||||
|
||||
Showmonk proc near
|
||||
|
||||
mov al,0
|
||||
mov ah,128
|
||||
mov di,160
|
||||
mov bx,72
|
||||
mov ds,tempgraphics
|
||||
call showframe
|
||||
ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
Gettingshot proc near
|
||||
|
||||
mov newlocation,55
|
||||
call clearpalette
|
||||
call loadintroroom
|
||||
call fadescreenups
|
||||
mov volumeto,0
|
||||
mov volumedirection,-1
|
||||
call runendseq
|
||||
call clearbeforeload
|
||||
ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Credits proc near
|
||||
|
||||
call clearpalette
|
||||
call realcredits
|
||||
ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
Biblequote proc near
|
||||
|
||||
call mode640x480
|
||||
mov dx,offset cs:title0graphics
|
||||
call showpcx
|
||||
call fadescreenups
|
||||
mov cx,80
|
||||
call hangone
|
||||
cmp lasthardkey,1
|
||||
jz biblequotearly
|
||||
mov cx,560
|
||||
call hangone
|
||||
cmp lasthardkey,1
|
||||
jz biblequotearly
|
||||
call fadescreendowns
|
||||
mov cx,200 ;128
|
||||
call hangone
|
||||
cmp lasthardkey,1
|
||||
jz biblequotearly
|
||||
call cancelch0
|
||||
biblequotearly:
|
||||
mov lasthardkey,0
|
||||
ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
|
||||
Hangone proc near
|
||||
|
||||
hangonloope: push cx
|
||||
call vsync
|
||||
pop cx
|
||||
cmp lasthardkey,1
|
||||
jz hangonearly
|
||||
loop hangonloope
|
||||
hangonearly:
|
||||
ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Intro proc near
|
||||
|
||||
mov dx,offset cs:introtextname
|
||||
call loadtemptext
|
||||
|
||||
call loadpalfromiff
|
||||
call setmode
|
||||
|
||||
mov newlocation,50
|
||||
call clearpalette
|
||||
call loadintroroom
|
||||
mov volume,7
|
||||
mov volumedirection,-1
|
||||
if cd
|
||||
mov volumeto,4
|
||||
else
|
||||
mov volumeto,0
|
||||
endif
|
||||
mov al,12 ;4
|
||||
mov ah,255
|
||||
call playchannel0
|
||||
call fadescreenups
|
||||
call runintroseq
|
||||
cmp lasthardkey,1
|
||||
jz introearly
|
||||
|
||||
;waitsound: cmp ch1blockstoplay,0
|
||||
; jnz waitsound
|
||||
call clearbeforeload
|
||||
|
||||
mov newlocation,52
|
||||
call loadintroroom
|
||||
call runintroseq
|
||||
cmp lasthardkey,1
|
||||
jz introearly
|
||||
call clearbeforeload
|
||||
|
||||
mov newlocation,53
|
||||
call loadintroroom
|
||||
call runintroseq
|
||||
cmp lasthardkey,1
|
||||
jz introearly
|
||||
call clearbeforeload
|
||||
|
||||
call allpalette
|
||||
mov newlocation,54
|
||||
call loadintroroom
|
||||
;mov al,12
|
||||
;mov ah,255
|
||||
;call playchannel0
|
||||
call runintroseq
|
||||
cmp lasthardkey,1
|
||||
jz introearly
|
||||
|
||||
call getridoftemptext
|
||||
call clearbeforeload
|
||||
introearly:
|
||||
mov lasthardkey, 0
|
||||
ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Runintroseq proc near
|
||||
|
||||
mov getback,0
|
||||
|
||||
moreintroseq: call vsync
|
||||
cmp lasthardkey,1
|
||||
jz earlyendrun
|
||||
call spriteupdate
|
||||
call vsync
|
||||
cmp lasthardkey,1
|
||||
jz earlyendrun
|
||||
call deleverything
|
||||
call printsprites
|
||||
call reelsonscreen
|
||||
call afterintroroom
|
||||
call usetimedtext
|
||||
call vsync
|
||||
cmp lasthardkey,1
|
||||
jz earlyendrun
|
||||
call dumpmap
|
||||
call dumptimedtext
|
||||
call vsync
|
||||
cmp lasthardkey,1
|
||||
jz earlyendrun
|
||||
cmp getback,1
|
||||
jnz moreintroseq
|
||||
ret
|
||||
earlyendrun:
|
||||
call getridoftemptext
|
||||
call clearbeforeload
|
||||
ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Runendseq proc near
|
||||
|
||||
call atmospheres
|
||||
mov getback,0
|
||||
moreendseq: call vsync
|
||||
call spriteupdate
|
||||
call vsync
|
||||
call deleverything
|
||||
call printsprites
|
||||
call reelsonscreen
|
||||
call afterintroroom
|
||||
call usetimedtext
|
||||
call vsync
|
||||
call dumpmap
|
||||
call dumptimedtext
|
||||
call vsync
|
||||
cmp getback,1
|
||||
jnz moreendseq
|
||||
ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
|
||||
Loadintroroom proc near
|
||||
|
||||
mov introcount,0
|
||||
mov location,255
|
||||
call loadroom
|
||||
mov mapoffsetx,72
|
||||
mov mapoffsety,16
|
||||
call clearsprites
|
||||
mov throughdoor,0
|
||||
mov currentkey,"0"
|
||||
mov mainmode,0
|
||||
call clearwork
|
||||
mov newobs,1
|
||||
call drawfloor
|
||||
call reelsonscreen
|
||||
call spriteupdate
|
||||
call printsprites
|
||||
call worktoscreen
|
||||
ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Mode640x480 proc near
|
||||
|
||||
mov al,12h+128
|
||||
mov ah,0
|
||||
int 10h
|
||||
;call clearpalette
|
||||
ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
Set16colpalette proc near
|
||||
|
||||
mov cx,16
|
||||
mov bl,0
|
||||
mov bh,0
|
||||
mov al,0
|
||||
mov ah,10h
|
||||
set16palloop2: push ax bx cx
|
||||
int 10h
|
||||
pop cx bx ax
|
||||
inc bl
|
||||
inc bh
|
||||
loop set16palloop2
|
||||
|
||||
mov bl,31h
|
||||
mov al,1
|
||||
mov ah,12h
|
||||
int 10h
|
||||
ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
RealCredits proc near
|
||||
|
||||
mov roomssample,33
|
||||
call loadroomssample
|
||||
mov volume,0
|
||||
|
||||
call mode640x480
|
||||
mov cx,35
|
||||
call hangon
|
||||
|
||||
mov dx,offset cs:title1graphics
|
||||
call showpcx
|
||||
mov al,12
|
||||
mov ah,0
|
||||
call playchannel0
|
||||
mov cx,2
|
||||
call hangone
|
||||
cmp lasthardkey,1
|
||||
jz realcreditsearly
|
||||
call allpalette
|
||||
mov cx,80
|
||||
call hangone
|
||||
cmp lasthardkey,1
|
||||
jz realcreditsearly
|
||||
call fadescreendowns
|
||||
mov cx,256
|
||||
call hangone
|
||||
cmp lasthardkey,1
|
||||
jz realcreditsearly
|
||||
|
||||
mov dx,offset cs:title2graphics
|
||||
call showpcx
|
||||
mov al,12
|
||||
mov ah,0
|
||||
call playchannel0
|
||||
mov cx,2
|
||||
call hangone
|
||||
cmp lasthardkey,1
|
||||
jz realcreditsearly
|
||||
call allpalette
|
||||
mov cx,80
|
||||
call hangone
|
||||
cmp lasthardkey,1
|
||||
jz realcreditsearly
|
||||
call fadescreendowns
|
||||
mov cx,256
|
||||
call hangone
|
||||
cmp lasthardkey,1
|
||||
jz realcreditsearly
|
||||
|
||||
if demo
|
||||
else
|
||||
mov dx,offset cs:title3graphics
|
||||
call showpcx
|
||||
mov al,12
|
||||
mov ah,0
|
||||
call playchannel0
|
||||
mov cx,2
|
||||
call hangone
|
||||
cmp lasthardkey,1
|
||||
jz realcreditsearly
|
||||
call allpalette
|
||||
mov cx,80
|
||||
call hangone
|
||||
cmp lasthardkey,1
|
||||
jz realcreditsearly
|
||||
call fadescreendowns
|
||||
mov cx,256
|
||||
call hangone
|
||||
cmp lasthardkey,1
|
||||
jz realcreditsearly
|
||||
|
||||
mov dx,offset cs:title4graphics
|
||||
call showpcx
|
||||
mov al,12
|
||||
mov ah,0
|
||||
call playchannel0
|
||||
mov cx,2
|
||||
call hangone
|
||||
cmp lasthardkey,1
|
||||
jz realcreditsearly
|
||||
call allpalette
|
||||
mov cx,80
|
||||
call hangone
|
||||
cmp lasthardkey,1
|
||||
jz realcreditsearly
|
||||
call fadescreendowns
|
||||
mov cx,256
|
||||
call hangone
|
||||
cmp lasthardkey,1
|
||||
jz realcreditsearly
|
||||
|
||||
mov dx,offset cs:title5graphics
|
||||
call showpcx
|
||||
mov al,12
|
||||
mov ah,0
|
||||
call playchannel0
|
||||
mov cx,2
|
||||
call hangone
|
||||
cmp lasthardkey,1
|
||||
jz realcreditsearly
|
||||
call allpalette
|
||||
mov cx,80
|
||||
call hangone
|
||||
cmp lasthardkey,1
|
||||
jz realcreditsearly
|
||||
call fadescreendowns
|
||||
mov cx,256
|
||||
call hangone
|
||||
cmp lasthardkey,1
|
||||
jz realcreditsearly
|
||||
endif
|
||||
|
||||
mov dx,offset cs:title6graphics
|
||||
call showpcx
|
||||
call fadescreenups
|
||||
mov cx,60
|
||||
call hangone
|
||||
cmp lasthardkey,1
|
||||
jz realcreditsearly
|
||||
mov al,13
|
||||
mov ah,0
|
||||
call playchannel0
|
||||
mov cx,350
|
||||
call hangone
|
||||
cmp lasthardkey,1
|
||||
jz realcreditsearly
|
||||
call fadescreendowns
|
||||
mov cx,256
|
||||
call hangone
|
||||
realcreditsearly:
|
||||
mov lasthardkey, 0
|
||||
ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
3810
devtools/tasmrecover/dreamweb/use.asm
Normal file
3810
devtools/tasmrecover/dreamweb/use.asm
Normal file
File diff suppressed because it is too large
Load Diff
564
devtools/tasmrecover/dreamweb/vars.asm
Normal file
564
devtools/tasmrecover/dreamweb/vars.asm
Normal file
@ -0,0 +1,564 @@
|
||||
;Copyright (c) 1990-2011 by Neil Dodwell
|
||||
;Released with permission from Neil Dodwell under GPLv2
|
||||
;See LICENSE file for full license text
|
||||
;---------------------------------------------------Equates and definitions----
|
||||
|
||||
Inputport equ 63h
|
||||
Mapwidth equ 66 ;132/2
|
||||
Maplength equ 60 ;6/2
|
||||
Tablesize equ 32 ;size of each entry in spritetable
|
||||
Itempicsize equ 44 ;size of inventory slots
|
||||
Opsy equ 52
|
||||
Opsx equ 60
|
||||
Inventx equ 80
|
||||
Inventy equ 58
|
||||
Zoomx equ 8
|
||||
Zoomy equ 132
|
||||
Keypadx equ 36+112
|
||||
Keypady equ 72
|
||||
Diaryx equ 68+24
|
||||
Diaryy equ 48+12
|
||||
Symbolx equ 64
|
||||
Symboly equ 56
|
||||
Menux equ 80+40
|
||||
Menuy equ 60
|
||||
|
||||
if foreign
|
||||
Undertextsizex equ 228
|
||||
Undertextsizey equ 13
|
||||
Undertimedysize equ 30
|
||||
else
|
||||
Undertextsizex equ 180
|
||||
Undertextsizey equ 10
|
||||
Undertimedysize equ 24
|
||||
endif
|
||||
|
||||
Numchanges equ 250
|
||||
|
||||
Textunder equ 0 ;offsets for items in buffer segment
|
||||
Openinvlist equ textunder+(undertextsizex*undertextsizey)
|
||||
Ryaninvlist equ openinvlist+32
|
||||
Pointerback equ ryaninvlist+60
|
||||
Mapflags equ pointerback+(32*32)
|
||||
Startpal equ mapflags+(11*10*3)
|
||||
Endpal equ startpal+768
|
||||
Maingamepal equ endpal+768
|
||||
Spritetable equ maingamepal+768
|
||||
Setlist equ spritetable+(32*tablesize)
|
||||
Freelist equ setlist+(128*5)
|
||||
Exlist equ freelist+(80*5)
|
||||
Peoplelist equ exlist+(100*5)
|
||||
Zoomspace equ peoplelist+(12*5)
|
||||
Printedlist equ zoomspace+(46*40)
|
||||
Listofchanges equ printedlist+(5*80)
|
||||
Undertimedtext equ listofchanges+(numchanges*4)
|
||||
Rainlist equ undertimedtext+(256*undertimedysize)
|
||||
Initialreelrouts equ rainlist+(6*64)
|
||||
Initialvars equ initialreelrouts+lenofreelrouts
|
||||
Lengthofbuffer equ initialvars+lengthofvars
|
||||
|
||||
Flags equ 0 ;offsets of items in backdrop segment
|
||||
Blocks equ flags+192
|
||||
Map equ 0
|
||||
Lengthofmap equ map+(mapwidth*maplength)
|
||||
|
||||
Intextdat equ 0
|
||||
Intext equ intextdat+(38*2)
|
||||
Blocktextdat equ 0
|
||||
Blocktext equ blocktextdat+(98*2)
|
||||
Settextdat equ 0
|
||||
Settext equ settextdat+(130*2)
|
||||
Freetextdat equ 0
|
||||
Freetext equ freetextdat+(82*2)
|
||||
|
||||
Numexobjects equ 114
|
||||
Exframeslen equ 30000
|
||||
Extextlen equ 18000
|
||||
|
||||
Exframedata equ 0
|
||||
Exframes equ exframedata+2080
|
||||
Exdata equ exframes+exframeslen
|
||||
Extextdat equ exdata+(16*numexobjects)
|
||||
Extext equ extextdat+((numexobjects+2)*2)
|
||||
Lengthofextra equ extext+extextlen
|
||||
|
||||
Framedata equ 0
|
||||
Frames equ framedata+2080
|
||||
|
||||
Frframedata equ 0
|
||||
Frframes equ frframedata+2080
|
||||
|
||||
Personframes equ 0
|
||||
Persontxtdat equ personframes+24
|
||||
Persontext equ persontxtdat+(1026*2)
|
||||
|
||||
Pathdata equ 0
|
||||
Reellist equ pathdata+(36*144)
|
||||
|
||||
Lenofmapstore equ 22*8*20*8
|
||||
Maplen equ mapwidth*maplength
|
||||
Freedatlen equ 16*80
|
||||
Setdatlen equ 64*128
|
||||
Textstart equ 66*2
|
||||
|
||||
;-----------------------------------------------------------------Variables----
|
||||
|
||||
|
||||
startvars db 0
|
||||
progresspoints db 0
|
||||
watchon db 0
|
||||
shadeson db 0
|
||||
secondcount db 0
|
||||
minutecount db 30
|
||||
hourcount db 19
|
||||
zoomon db 1
|
||||
location db 0
|
||||
expos db 0
|
||||
exframepos dw 0
|
||||
extextpos dw 0
|
||||
card1money dw 0
|
||||
listpos dw 0
|
||||
ryanpage db 0
|
||||
|
||||
|
||||
watchingtime dw 0
|
||||
reeltowatch dw -1 ;reel plays from here in mode 0
|
||||
endwatchreel dw 0 ;and stops here. Mode set to 1
|
||||
speedcount db 0
|
||||
watchspeed db 0
|
||||
reeltohold dw -1 ;if mode is 1 hold on this reel
|
||||
endofholdreel dw -1 ;if mode is 2 then play to end of
|
||||
watchmode db -1 ;hold reel. Set mode back to -1
|
||||
destafterhold db 0 ;set walking destination.
|
||||
|
||||
newsitem db 0
|
||||
|
||||
liftflag db 0
|
||||
liftpath db 0
|
||||
lockstatus db 1
|
||||
doorpath db 0
|
||||
counttoopen db 0
|
||||
counttoclose db 0
|
||||
rockstardead db 0
|
||||
generaldead db 0
|
||||
sartaindead db 0
|
||||
aidedead db 0
|
||||
beenmugged db 0
|
||||
|
||||
gunpassflag db 0
|
||||
canmovealtar db 0
|
||||
talkedtoattendant db 0
|
||||
talkedtosparky db 0
|
||||
talkedtoboss db 0
|
||||
talkedtorecep db 0
|
||||
cardpassflag db 0
|
||||
madmanflag db 0
|
||||
keeperflag db 0
|
||||
lasttrigger db 0
|
||||
mandead db 0
|
||||
seed db 1,2,3
|
||||
needtotravel db 0
|
||||
throughdoor db 0
|
||||
newobs db 0
|
||||
ryanon db 255
|
||||
combatcount db 0
|
||||
lastweapon db -1
|
||||
|
||||
dreamnumber db 0
|
||||
roomafterdream db 0
|
||||
|
||||
shakecounter db 48
|
||||
|
||||
lengthofvars equ $-startvars
|
||||
|
||||
|
||||
speechcount db 0
|
||||
|
||||
charshift dw 0
|
||||
kerning db 0
|
||||
|
||||
brightness db 0
|
||||
|
||||
roomloaded db 0
|
||||
|
||||
didzoom db 0
|
||||
|
||||
linespacing dw 10
|
||||
textaddressx dw 13
|
||||
textaddressy dw 182 ;address on screen for text
|
||||
textlen db 0
|
||||
lastxpos dw 0
|
||||
|
||||
icontop dw 0
|
||||
iconleft dw 0
|
||||
itemframe db 0
|
||||
itemtotran db 0
|
||||
roomad dw 0
|
||||
oldsubject dw 0
|
||||
|
||||
withobject db 0
|
||||
withtype db 0
|
||||
|
||||
lookcounter dw 0
|
||||
|
||||
command db 0
|
||||
commandtype db 0
|
||||
oldcommandtype db 0
|
||||
objecttype db 0
|
||||
getback db 0
|
||||
invopen db 0
|
||||
mainmode db 0
|
||||
pickup db 0
|
||||
lastinvpos db 0
|
||||
examagain db 0
|
||||
newtextline db 0
|
||||
|
||||
openedob db 0
|
||||
openedtype db 0
|
||||
|
||||
oldmapadx dw 0
|
||||
oldmapady dw 0
|
||||
mapadx dw 0
|
||||
mapady dw 0
|
||||
mapoffsetx dw 104
|
||||
mapoffsety dw 38
|
||||
|
||||
mapxstart dw 0
|
||||
mapystart dw 0
|
||||
mapxsize db 0
|
||||
mapysize db 0
|
||||
|
||||
havedoneobs db 0
|
||||
manisoffscreen db 0
|
||||
rainspace db 0
|
||||
|
||||
facing db 0
|
||||
leavedirection db 0
|
||||
turntoface db 0
|
||||
turndirection db 0
|
||||
|
||||
maintimer dw 0
|
||||
introcount db 0
|
||||
arrowad dw 0
|
||||
currentkey db 0
|
||||
oldkey db 0
|
||||
useddirection db 0
|
||||
currentkey2 db 0
|
||||
|
||||
timercount db 0
|
||||
oldtimercount db 0
|
||||
|
||||
mapx db 0
|
||||
mapy db 0
|
||||
newscreen db 0
|
||||
ryanx db 0
|
||||
ryany db 0
|
||||
lastflag db 0
|
||||
lastflagex db 0
|
||||
flagx db 0
|
||||
flagy db 0
|
||||
|
||||
currentex db 0
|
||||
currentfree db 0
|
||||
currentframe dw 0
|
||||
framesad dw 0
|
||||
dataad dw 0
|
||||
frsegment dw 0
|
||||
objectx dw 0
|
||||
objecty dw 0
|
||||
offsetx dw 0
|
||||
offsety dw 0
|
||||
savesize dw 0
|
||||
savesource dw 0
|
||||
savex db 0
|
||||
savey db 0
|
||||
currentob db 0
|
||||
priority db 0
|
||||
|
||||
destpos db 0
|
||||
|
||||
reallocation db 0 ;----------;some rooms have more than one
|
||||
roomnum db 0 ;place in the Roomdata list, to
|
||||
;account for different start points
|
||||
nowinnewroom db 0 ;this variable holds the rooms
|
||||
resetmanxy db 0 ;real value - ie:which file it's in
|
||||
newlocation db -1 ;if set then room is loaded at end of watch mode, or straight away if not in watch mode
|
||||
autolocation db -1
|
||||
mustload db 0
|
||||
answered db 0
|
||||
saidno db 0
|
||||
|
||||
doorcheck1 db 0
|
||||
doorcheck2 db 0
|
||||
doorcheck3 db 0
|
||||
doorcheck4 db 0
|
||||
|
||||
mousex dw 0
|
||||
mousey dw 0
|
||||
mousebutton dw 0
|
||||
mousebutton1 dw 0
|
||||
mousebutton2 dw 0
|
||||
mousebutton3 dw 0
|
||||
mousebutton4 dw 0
|
||||
oldbutton dw 0
|
||||
oldx dw 0
|
||||
oldy dw 0
|
||||
lastbutton dw 0
|
||||
oldpointerx dw 0
|
||||
oldpointery dw 0
|
||||
delherex dw 0
|
||||
delherey dw 0
|
||||
pointerxs db 32
|
||||
pointerys db 32
|
||||
delxs db 0
|
||||
delys db 0
|
||||
pointerframe db 0
|
||||
pointerpower db 0
|
||||
auxpointerframe db 0
|
||||
pointermode db 0
|
||||
pointerspeed db 0
|
||||
pointercount db 0
|
||||
inmaparea db 0
|
||||
|
||||
reelpointer dw 0
|
||||
slotdata db 0
|
||||
thisslot db 0
|
||||
slotflags db 0
|
||||
takeoff dw 0
|
||||
|
||||
talkmode db 0
|
||||
talkpos db 0
|
||||
character db 0
|
||||
persondata dw 0
|
||||
talknum db 0
|
||||
numberinroom db 0
|
||||
|
||||
currentcel db 0
|
||||
oldselection db 0
|
||||
|
||||
stopwalking db 0
|
||||
|
||||
mouseon db 0
|
||||
played dw 0
|
||||
timer1 db 0
|
||||
timer2 db 0
|
||||
timer3 db 0
|
||||
wholetimer dw 0
|
||||
timer1to db 0
|
||||
timer2to db 0
|
||||
timer3to db 0
|
||||
|
||||
watchdump db 0
|
||||
|
||||
currentset dw 0
|
||||
|
||||
logonum db 0
|
||||
oldlogonum db 0
|
||||
newlogonum db 0
|
||||
netseg dw 0
|
||||
netpoint dw 0
|
||||
keynum db 0
|
||||
cursorstate db 0
|
||||
|
||||
pressed db 0
|
||||
presspointer dw 0
|
||||
graphicpress db 0
|
||||
presscount db 0
|
||||
keypadax dw 0
|
||||
keypadcx dw 0
|
||||
lightcount db 0
|
||||
folderpage db 0
|
||||
diarypage db 0
|
||||
menucount db 0
|
||||
symboltopx db 0
|
||||
symboltopnum db 0
|
||||
symboltopdir db 0
|
||||
symbolbotx db 0
|
||||
symbolbotnum db 0
|
||||
symbolbotdir db 0
|
||||
|
||||
symboltolight db 0
|
||||
symbol1 db 0
|
||||
symbol2 db 0
|
||||
symbol3 db 0
|
||||
symbolnum db 0
|
||||
dumpx dw 0
|
||||
dumpy dw 0
|
||||
|
||||
walkandexam db 0
|
||||
walkexamtype db 0
|
||||
walkexamnum db 0
|
||||
|
||||
cursloc dw 0
|
||||
curslocx dw 0
|
||||
curslocy dw 0
|
||||
curpos dw 0
|
||||
monadx dw 0
|
||||
monady dw 0
|
||||
gotfrom dw 0
|
||||
|
||||
monsource dw 0
|
||||
numtodo dw 0
|
||||
|
||||
timecount dw 0
|
||||
counttotimed dw 0
|
||||
timedseg dw 0
|
||||
timedoffset dw 0
|
||||
timedy db 0
|
||||
timedx db 0
|
||||
needtodumptimed db 0
|
||||
|
||||
;recordpos dw 0
|
||||
;rechandle dw 0
|
||||
handle dw 0
|
||||
|
||||
loadingorsave db 0 ;1 if load 2 if save
|
||||
currentslot db 0
|
||||
cursorpos db 0
|
||||
|
||||
colourpos db 0
|
||||
fadedirection db 0
|
||||
numtofade db 0
|
||||
fadecount db 0
|
||||
addtogreen db 0
|
||||
addtored db 0
|
||||
addtoblue db 0
|
||||
|
||||
|
||||
lastsoundreel dw 0
|
||||
|
||||
soundbuffer dw 0
|
||||
soundbufferad dw 0
|
||||
soundbufferpage db 0
|
||||
soundtimes db 0
|
||||
needsoundbuff db 0
|
||||
|
||||
oldint9seg dw -1
|
||||
oldint9add dw -1
|
||||
oldint8seg dw -1
|
||||
oldint8add dw -1
|
||||
oldsoundintseg dw 0
|
||||
oldsoundintadd dw 0
|
||||
soundbaseadd dw 0
|
||||
dsp_status dw 0
|
||||
dsp_write dw 0
|
||||
dmaaddress db 0
|
||||
soundint db 5
|
||||
sounddmachannel db 1
|
||||
sampleplaying db 255
|
||||
testresult db 0
|
||||
currentirq db 0
|
||||
speechloaded db 0
|
||||
speechlength dw 0
|
||||
volume db 0
|
||||
volumeto db 0
|
||||
volumedirection db 0
|
||||
volumecount db 0
|
||||
|
||||
playblock db 0
|
||||
|
||||
wongame db 0
|
||||
|
||||
lasthardkey db 0
|
||||
bufferin dw 0
|
||||
bufferout dw 0
|
||||
|
||||
extras dw 0 ;for allocated memory
|
||||
workspace dw 0 ;allocated mem for screen buffer
|
||||
mapstore dw 0 ;allocated mem for copy of room
|
||||
charset1 dw 0 ;allocated mem for normal charset
|
||||
tempcharset dw 0 ;monitor char set
|
||||
icons1 dw 0 ;allocated mem for on screen stuff
|
||||
icons2 dw 0
|
||||
buffers dw 0 ;allocated mem for buffers
|
||||
mainsprites dw 0 ;allocated mem for Ryan sprites
|
||||
backdrop dw 0
|
||||
mapdata dw 0
|
||||
|
||||
sounddata dw 0
|
||||
sounddata2 dw 0
|
||||
|
||||
recordspace dw 0
|
||||
|
||||
freedat dw 0
|
||||
setdat dw 0
|
||||
|
||||
reel1 dw -1
|
||||
reel2 dw -1
|
||||
reel3 dw -1
|
||||
roomdesc dw -1
|
||||
freedesc dw -1
|
||||
setdesc dw -1
|
||||
blockdesc dw -1
|
||||
setframes dw -1
|
||||
freeframes dw -1
|
||||
people dw -1
|
||||
reels dw -1
|
||||
commandtext dw -1
|
||||
puzzletext dw -1
|
||||
traveltext dw -1
|
||||
tempgraphics dw -1
|
||||
tempgraphics2 dw -1
|
||||
tempgraphics3 dw -1
|
||||
tempsprites dw -1
|
||||
|
||||
textfile1 dw -1
|
||||
textfile2 dw -1
|
||||
textfile3 dw -1
|
||||
|
||||
blinkframe db 23
|
||||
blinkcount db 0
|
||||
|
||||
|
||||
reasseschanges db 0 ; if it's a 1 then obname will assume that
|
||||
pointerspath db 0 ;the command has changed.
|
||||
manspath db 0 ;ie. from "walk to" to "Examine"
|
||||
pointerfirstpath db 0
|
||||
finaldest db 0
|
||||
destination db 0
|
||||
linestartx dw 0
|
||||
linestarty dw 0
|
||||
lineendx dw 0
|
||||
lineendy dw 0
|
||||
increment1 dw 0
|
||||
increment2 dw 0
|
||||
lineroutine db 0
|
||||
linepointer db 0
|
||||
linedirection db 0
|
||||
linelength db 0
|
||||
|
||||
liftsoundcount db 0
|
||||
|
||||
emmhandle dw 0
|
||||
emmpageframe dw 0
|
||||
emmhardwarepage db 0
|
||||
|
||||
ch0emmpage dw 0
|
||||
ch0offset dw 0
|
||||
ch0blockstocopy dw 0
|
||||
|
||||
ch0playing db 0
|
||||
ch0repeat db 0
|
||||
ch0oldemmpage dw 0
|
||||
ch0oldoffset dw 0
|
||||
ch0oldblockstocopy dw 0
|
||||
|
||||
ch1playing db 255
|
||||
ch1emmpage dw 0
|
||||
ch1offset dw 0
|
||||
ch1blockstocopy dw 0
|
||||
ch1blocksplayed dw 0
|
||||
|
||||
soundbufferwrite dw 0
|
||||
|
||||
soundemmpage dw 0
|
||||
speechemmpage dw 0
|
||||
|
||||
currentsample db -1
|
||||
roomssample db 0
|
||||
|
||||
gameerror db 0
|
||||
|
||||
howmuchalloc dw 0
|
||||
|
||||
|
867
devtools/tasmrecover/dreamweb/vgafades.asm
Normal file
867
devtools/tasmrecover/dreamweb/vgafades.asm
Normal file
@ -0,0 +1,867 @@
|
||||
;Copyright (c) 1990-2011 by Neil Dodwell
|
||||
;Released with permission from Neil Dodwell under GPLv2
|
||||
;See LICENSE file for full license text
|
||||
Fadedos proc near
|
||||
|
||||
call vsync
|
||||
mov es,buffers
|
||||
mov di,startpal
|
||||
mov al,0
|
||||
mov dx,3c7h
|
||||
out dx,al
|
||||
mov dx,3c9h
|
||||
mov cx,768/4
|
||||
dos1: in al,dx
|
||||
stosb
|
||||
loop dos1
|
||||
|
||||
mov cx,64
|
||||
fadedosloop: push cx
|
||||
|
||||
mov ds,buffers
|
||||
mov si,startpal
|
||||
mov cx,768
|
||||
dos3: lodsb
|
||||
cmp al,0
|
||||
jz nodown
|
||||
dec al
|
||||
nodown: mov [si-1],al
|
||||
loop dos3
|
||||
|
||||
call vsync
|
||||
mov ds,buffers
|
||||
mov si,startpal
|
||||
mov al,0
|
||||
mov dx,3c8h
|
||||
out dx,al
|
||||
inc dx
|
||||
mov cx,768/4
|
||||
dos2: lodsb
|
||||
out dx,al
|
||||
loop dos2
|
||||
|
||||
pop cx
|
||||
loop fadedosloop
|
||||
ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Dofade proc near
|
||||
|
||||
cmp fadedirection,0
|
||||
jz finishfade
|
||||
mov cl,numtofade
|
||||
mov ch,0
|
||||
mov al,colourpos
|
||||
mov ah,0
|
||||
mov ds,buffers
|
||||
mov si,startpal
|
||||
add si,ax
|
||||
add si,ax
|
||||
add si,ax
|
||||
call showgroup
|
||||
mov al,numtofade
|
||||
add al,colourpos
|
||||
mov colourpos,al
|
||||
cmp al,0
|
||||
jnz finishfade
|
||||
call fadecalculation
|
||||
finishfade: ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Clearendpal proc near
|
||||
|
||||
mov es,buffers
|
||||
mov di,endpal
|
||||
mov cx,768
|
||||
mov al,0
|
||||
rep stosb
|
||||
ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
|
||||
Clearpalette proc near
|
||||
|
||||
mov fadedirection,0
|
||||
call clearstartpal
|
||||
call dumpcurrent
|
||||
ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Fadescreenup proc near
|
||||
|
||||
call clearstartpal
|
||||
call paltoendpal
|
||||
mov fadedirection,1
|
||||
mov fadecount,63
|
||||
mov colourpos,0
|
||||
mov numtofade,128
|
||||
ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
|
||||
Fadetowhite proc near
|
||||
|
||||
mov es,buffers
|
||||
mov di,endpal
|
||||
mov cx,768
|
||||
mov al,63
|
||||
rep stosb
|
||||
mov di,endpal
|
||||
mov al,0
|
||||
stosb
|
||||
stosb
|
||||
stosb
|
||||
call paltostartpal
|
||||
mov fadedirection,1
|
||||
mov fadecount,63
|
||||
mov colourpos,0
|
||||
mov numtofade,128
|
||||
ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
Fadefromwhite proc near
|
||||
|
||||
mov es,buffers
|
||||
mov di,startpal
|
||||
mov cx,768
|
||||
mov al,63
|
||||
rep stosb
|
||||
mov di,startpal
|
||||
mov al,0
|
||||
stosb
|
||||
stosb
|
||||
stosb
|
||||
call paltoendpal
|
||||
mov fadedirection,1
|
||||
mov fadecount,63
|
||||
mov colourpos,0
|
||||
mov numtofade,128
|
||||
ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Fadescreenups proc near
|
||||
|
||||
call clearstartpal
|
||||
call paltoendpal
|
||||
mov fadedirection,1
|
||||
mov fadecount,63
|
||||
mov colourpos,0
|
||||
mov numtofade,64
|
||||
ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
Fadescreendownhalf proc near
|
||||
|
||||
call paltostartpal
|
||||
call paltoendpal
|
||||
mov cx,768
|
||||
mov es,buffers
|
||||
mov bx,endpal
|
||||
halfend: mov al,[es:bx]
|
||||
shr al,1
|
||||
mov [es:bx],al
|
||||
inc bx
|
||||
loop halfend
|
||||
|
||||
mov ds,buffers
|
||||
mov es,buffers
|
||||
mov si,startpal+(56*3)
|
||||
mov di,endpal+(56*3)
|
||||
mov cx,3*5
|
||||
rep movsb
|
||||
mov si,startpal+(77*3)
|
||||
mov di,endpal+(77*3)
|
||||
mov cx,3*2
|
||||
rep movsb
|
||||
|
||||
mov fadedirection,1
|
||||
mov fadecount,31
|
||||
mov colourpos,0
|
||||
mov numtofade,32
|
||||
ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
Fadescreenuphalf proc near
|
||||
|
||||
call endpaltostart
|
||||
call paltoendpal
|
||||
mov fadedirection,1
|
||||
mov fadecount,31
|
||||
mov colourpos,0
|
||||
mov numtofade,32
|
||||
ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Fadescreendown proc near
|
||||
|
||||
call paltostartpal
|
||||
call clearendpal
|
||||
mov fadedirection,1
|
||||
mov fadecount,63
|
||||
mov colourpos,0
|
||||
mov numtofade,128
|
||||
ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
Fadescreendowns proc near
|
||||
|
||||
call paltostartpal
|
||||
call clearendpal
|
||||
mov fadedirection,1
|
||||
mov fadecount,63
|
||||
mov colourpos,0
|
||||
mov numtofade,64
|
||||
ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Clearstartpal proc near
|
||||
|
||||
mov es,buffers
|
||||
mov di,startpal
|
||||
mov cx,256
|
||||
wholeloop1: mov ax,0
|
||||
stosw
|
||||
mov al,0
|
||||
stosb
|
||||
loop wholeloop1
|
||||
ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Showgun proc near
|
||||
|
||||
mov addtored,0 ;12
|
||||
mov addtogreen,0
|
||||
mov addtoblue,0
|
||||
call paltostartpal
|
||||
call paltoendpal
|
||||
call greyscalesum
|
||||
|
||||
; mov es,buffers
|
||||
; mov di,endpal+3
|
||||
; mov cx,255
|
||||
; mov ax,0
|
||||
;reds: mov byte ptr [es:di],63
|
||||
; inc di
|
||||
; stosw
|
||||
; loop reds
|
||||
|
||||
mov fadedirection,1
|
||||
mov fadecount,63
|
||||
mov colourpos,0
|
||||
mov numtofade,128
|
||||
mov cx,130
|
||||
call hangon
|
||||
call endpaltostart
|
||||
call clearendpal
|
||||
mov fadedirection,1
|
||||
mov fadecount,63
|
||||
mov colourpos,0
|
||||
mov numtofade,128
|
||||
mov cx,200
|
||||
call hangon
|
||||
mov roomssample,34
|
||||
call loadroomssample
|
||||
mov volume,0
|
||||
mov dx,offset cs:gungraphic
|
||||
call loadintotemp
|
||||
call createpanel2
|
||||
mov ds,tempgraphics
|
||||
mov al,0
|
||||
mov ah,0
|
||||
mov di,100
|
||||
mov bx,4
|
||||
call showframe
|
||||
mov ds,tempgraphics
|
||||
mov al,1
|
||||
mov ah,0
|
||||
mov di,158
|
||||
mov bx,106
|
||||
call showframe
|
||||
call worktoscreen
|
||||
call getridoftemp
|
||||
call fadescreenup
|
||||
mov cx,160
|
||||
call hangon
|
||||
mov al,12
|
||||
mov ah,0
|
||||
call playchannel0
|
||||
mov dx,offset cs:endtextname
|
||||
call loadtemptext
|
||||
call rollendcredits2
|
||||
call getridoftemptext
|
||||
ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Rollendcredits2 proc near
|
||||
|
||||
call rollem
|
||||
ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
|
||||
Rollem proc near
|
||||
|
||||
mov cl,160
|
||||
mov ch,160
|
||||
mov di,25
|
||||
mov bx,20
|
||||
mov ds,mapstore
|
||||
mov si,0
|
||||
call multiget
|
||||
|
||||
mov es,textfile1
|
||||
mov si,49*2
|
||||
mov ax,[es:si]
|
||||
mov si,ax
|
||||
add si,textstart
|
||||
|
||||
mov cx,80
|
||||
endcredits21: push cx
|
||||
|
||||
mov bx,10
|
||||
mov cx,linespacing
|
||||
endcredits22: push cx si di es bx
|
||||
|
||||
call vsync
|
||||
mov cl,160
|
||||
mov ch,160
|
||||
mov di,25
|
||||
mov bx,20
|
||||
mov ds,mapstore
|
||||
mov si,0
|
||||
call multiput
|
||||
call vsync
|
||||
pop bx es di si
|
||||
push si di es bx
|
||||
|
||||
mov cx,18
|
||||
onelot2: push cx
|
||||
mov di,25 ;75
|
||||
mov dx,161
|
||||
mov ax,0
|
||||
call printdirect
|
||||
add bx,linespacing
|
||||
pop cx
|
||||
loop onelot2
|
||||
|
||||
call vsync
|
||||
mov cl,160
|
||||
mov ch,160
|
||||
mov di,25 ;75
|
||||
mov bx,20
|
||||
call multidump
|
||||
|
||||
pop bx es di si cx
|
||||
cmp lasthardkey,1
|
||||
jz endearly2
|
||||
dec bx
|
||||
loop endcredits22
|
||||
pop cx
|
||||
looknext2: mov al,[es:si]
|
||||
inc si
|
||||
cmp al,":"
|
||||
jz gotnext2
|
||||
cmp al,0
|
||||
jz gotnext2
|
||||
jmp looknext2
|
||||
gotnext2: cmp lasthardkey,1
|
||||
jz endearly
|
||||
loop endcredits21
|
||||
|
||||
mov cx,120
|
||||
call hangone
|
||||
ret
|
||||
endearly2: pop cx
|
||||
endearly: ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Fadecalculation proc near
|
||||
|
||||
cmp fadecount,0
|
||||
jz nomorefading
|
||||
mov bl,fadecount
|
||||
mov es,buffers
|
||||
mov si,startpal
|
||||
mov di,endpal
|
||||
mov cx,768
|
||||
fadecolloop: mov al,[es:si]
|
||||
mov ah,[es:di]
|
||||
cmp al,ah
|
||||
jz gotthere
|
||||
jc lesscolour
|
||||
dec byte ptr [es:si]
|
||||
jmp gotthere
|
||||
lesscolour: cmp bl,ah
|
||||
jz withit
|
||||
jnc gotthere
|
||||
withit: inc byte ptr [es:si]
|
||||
gotthere: inc si
|
||||
inc di
|
||||
loop fadecolloop
|
||||
dec fadecount
|
||||
ret
|
||||
nomorefading: mov fadedirection,0
|
||||
ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Greyscalesum proc near ;converts palette to grey scale
|
||||
;summed using formula:
|
||||
mov es,buffers ; .20xred + .59xGreen + .11xBlue
|
||||
mov si,maingamepal
|
||||
mov di,endpal
|
||||
mov cx,256 ;convert 256 colours
|
||||
|
||||
greysumloop1: push cx
|
||||
mov bx,0
|
||||
mov al,[es:si]
|
||||
mov ah,0
|
||||
mov cx,20
|
||||
mul cx
|
||||
add bx,ax
|
||||
mov al,[es:si+1]
|
||||
mov ah,0
|
||||
mov cx,59
|
||||
mul cx
|
||||
add bx,ax
|
||||
mov al,[es:si+2]
|
||||
mov ah,0
|
||||
mov cx,11
|
||||
mul cx
|
||||
add bx,ax ;bx holds equationx100
|
||||
|
||||
mov al,-1 ;divide result by 100
|
||||
greysumloop2: inc al
|
||||
sub bx,100
|
||||
jnc greysumloop2 ;ah holds grey scale number
|
||||
mov bl,al
|
||||
|
||||
mov al,bl
|
||||
mov ah,addtored
|
||||
cmp al,0
|
||||
;jz noaddr
|
||||
add al,ah
|
||||
noaddr: stosb
|
||||
mov ah,addtogreen
|
||||
mov al,bl
|
||||
cmp al,0
|
||||
jz noaddg
|
||||
add al,ah
|
||||
noaddg: stosb ;store result in red, green and
|
||||
mov ah,addtoblue
|
||||
mov al,bl
|
||||
cmp al,0
|
||||
jz noaddb
|
||||
add al,ah
|
||||
noaddb: stosb ;blue portions of palette.
|
||||
|
||||
add si,3
|
||||
pop cx
|
||||
loop greysumloop1
|
||||
ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Showgroup proc near
|
||||
|
||||
mov dx,3c8h
|
||||
out dx,al
|
||||
mov dx,3c9h
|
||||
showgroup1: lodsb
|
||||
out dx,al
|
||||
lodsb
|
||||
out dx,al
|
||||
lodsb
|
||||
out dx,al
|
||||
loop showgroup1
|
||||
ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Paltostartpal proc near
|
||||
|
||||
mov es,buffers
|
||||
mov ds,buffers
|
||||
mov si,maingamepal
|
||||
mov di,startpal
|
||||
mov cx,768/2
|
||||
rep movsw
|
||||
ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
Endpaltostart proc near
|
||||
|
||||
mov es,buffers
|
||||
mov ds,buffers
|
||||
mov si,endpal
|
||||
mov di,startpal
|
||||
mov cx,768/2
|
||||
rep movsw
|
||||
ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
Startpaltoend proc near
|
||||
|
||||
mov es,buffers
|
||||
mov ds,buffers
|
||||
mov di,endpal
|
||||
mov si,startpal
|
||||
mov cx,768/2
|
||||
rep movsw
|
||||
ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Paltoendpal proc near
|
||||
|
||||
mov es,buffers
|
||||
mov ds,buffers
|
||||
mov di,endpal
|
||||
mov si,maingamepal
|
||||
mov cx,768/2
|
||||
rep movsw
|
||||
ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Allpalette proc near
|
||||
|
||||
mov es,buffers
|
||||
mov ds,buffers
|
||||
mov di,startpal
|
||||
mov si,maingamepal
|
||||
mov cx,768/2
|
||||
rep movsw
|
||||
call dumpcurrent
|
||||
ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Dumpcurrent proc near
|
||||
|
||||
mov si,startpal
|
||||
mov ds,buffers
|
||||
call vsync
|
||||
mov al,0
|
||||
mov cx,128
|
||||
call showgroup
|
||||
call vsync
|
||||
mov al,128
|
||||
mov cx,128
|
||||
call showgroup
|
||||
ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Fadedownmon proc near
|
||||
|
||||
call paltostartpal
|
||||
call paltoendpal
|
||||
mov es,buffers
|
||||
mov di,endpal+(231*3)
|
||||
mov cx,3*8
|
||||
mov ax,0
|
||||
rep stosb
|
||||
mov di,endpal+(246*3)
|
||||
stosb
|
||||
stosw
|
||||
mov fadedirection,1
|
||||
mov fadecount,63
|
||||
mov colourpos,0
|
||||
mov numtofade,128
|
||||
mov cx,64 ;100
|
||||
call hangon ;curs
|
||||
ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Fadeupmon proc near
|
||||
|
||||
call paltostartpal
|
||||
call paltoendpal
|
||||
mov es,buffers
|
||||
mov di,startpal+(231*3)
|
||||
mov cx,3*8
|
||||
mov ax,0
|
||||
rep stosb
|
||||
mov di,startpal+(246*3)
|
||||
stosb
|
||||
stosw
|
||||
mov fadedirection,1
|
||||
mov fadecount,63
|
||||
mov colourpos,0
|
||||
mov numtofade,128
|
||||
mov cx,128
|
||||
call hangon ;curs
|
||||
ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Fadeupmonfirst proc near
|
||||
|
||||
call paltostartpal
|
||||
call paltoendpal
|
||||
mov es,buffers
|
||||
mov di,startpal+(231*3)
|
||||
mov cx,3*8
|
||||
mov ax,0
|
||||
rep stosb
|
||||
mov di,startpal+(246*3)
|
||||
stosb
|
||||
stosw
|
||||
mov fadedirection,1
|
||||
mov fadecount,63
|
||||
mov colourpos,0
|
||||
mov numtofade,128
|
||||
mov cx,64
|
||||
call hangon
|
||||
mov al,26
|
||||
call playchannel1
|
||||
mov cx,64
|
||||
call hangon
|
||||
|
||||
ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Fadeupyellows proc near
|
||||
|
||||
;call startpaltoend
|
||||
call paltoendpal
|
||||
mov es,buffers
|
||||
mov di,endpal+(231*3)
|
||||
mov cx,3*8
|
||||
mov ax,0
|
||||
rep stosb
|
||||
mov di,endpal+(246*3)
|
||||
stosb
|
||||
stosw
|
||||
mov fadedirection,1
|
||||
mov fadecount,63
|
||||
mov colourpos,0
|
||||
mov numtofade,128
|
||||
mov cx,128
|
||||
call hangon
|
||||
ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
||||
Initialmoncols proc near
|
||||
|
||||
call paltostartpal
|
||||
mov es,buffers
|
||||
mov di,startpal+(230*3)
|
||||
mov cx,3*9
|
||||
mov ax,0
|
||||
rep stosb
|
||||
mov di,startpal+(246*3)
|
||||
stosb
|
||||
stosw
|
||||
mov ds,buffers
|
||||
mov si,startpal+(230*3)
|
||||
mov al,230
|
||||
mov cx,18
|
||||
call showgroup
|
||||
ret
|
||||
|
||||
endp
|
||||
|
||||
|
||||
|
1763
devtools/tasmrecover/dreamweb/vgagrafx.asm
Normal file
1763
devtools/tasmrecover/dreamweb/vgagrafx.asm
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user