📄 read me!.txt
字号:
XTREMESCRIPT SYSTEM
GAME SCRIPTING MASTERY
-----------------------------------------------------------------------------------------------
This folder contains the complete, finished XtremeScript system, which we develop
incrementally throughout the book. The final lineup is version 0.8 of the XASM
assembler, the XtremeScript Virtual Machine (XVM), and the XtremeScript Compiler (XSC).
While everything here can be found in various forms in the Programs/ folder, I thought
it'd be nice to have the completed system available in one place.
Unlike most programs, however, you'll notice that there's no Executable/ subfolder
within the XVM/ folder. This is because the virtual machine is designed to be embedded
in host applications, rather than run on its own as a stand-alone program. If you'd
like to play with an executable version of the XVM, however, you'll notice there's also
a copy of the XVM text console we developed for testing the XSC compiler's output in
chapter 15. This is a handy utility for executing text-based scripts.
The breakdown for this "distribution" of the XtremeScript system is as follows:
- XASM/
Version 0.8 of the XASM assembler.
- XVM/
The source code of the XVM virtual machine, ready to embed in host
applications.
- XSC/
The XtremeScript compiler.
- XVM Console/
A stand-alone version of the XVM that allows .XSE scripts to be
executed in a simple, text-based environment.
GENERAL PROGRAM NOTES
-----------------------------------------------------------------------------------------------
Each project, example or demo in the book comes in both source code form and executable
form. All of the book's source was compiled with Microsoft Visual C++ 6.0, so the
project (.DSP) and workspace (.DSW) files are included as well. Source code is always
found in the Source/ directory, and executables are always found under Executable/.
It's always a good idea to make a copy of the source on your hard drive. This can be
done by simply dragging its directory to the destination of your choice. I suggest
copying the entire Programs/ directory into a safe place on your hard drive, so you'll
have the entire book's content available at all times.
Any program that uses graphics or sound is written with my Wrappuh library, which wraps
the functionality of the Win32 API and DirectX. This is done to save you the trouble of
sifting through pages of DX/Win32-specific code, but you still have to configure your
compiler properly in order to compile Wrappuh programs. Specifically, MAKE SURE of the
following:
- wrappuh.cpp, wrappuh.h and keymap.h are included in your project.
- The DirectX export libraries (.LIB) are included with your project
- Your compiler's path settings include the path to the DirectX SDK.
- Your version of DirectX is up to date; I recommend 8.1 (the latest at the
time of this writing). As a general rule of thumb, install the version
included on the CD (unless you already have a more recent one).
Remember, Wrappuh hides the details of Windows and DirectX, but it doesn't port
anything. Demos that use graphics and sound will still require a Win32/DX platform to
run properly.
NOTE: Not all chapters require the Wrappuh library as many example programs are text-
based console applications. The above directions ONLY apply to graphical
programs, which will be clearly marked in the first section of this document. If
an example program is a console application, it will NOT require DirectX or the
Wrappuh API, and can be compiled normally. These programs will also most likely
compile in non-MSVC++ compilers or even alternate platforms, unless otherwise
noted, although I can't make any guarantees.
-----------------------------------------------------------------------------------------------
Have fun!
-- Alex
alex@amvbooks.com
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -