Complete disaster-recovery snapshot: engine/game source, game data assets, VC6 toolchain + DX SDKs, build outputs, deployed game, and _UNUSED archive. Large binaries in Git LFS; text preserved byte-for-byte (core.autocrlf=false, no eol attributes). See RECOVERY.md for the one-clone rebuild procedure.
200 lines
4.5 KiB
Plaintext
200 lines
4.5 KiB
Plaintext
#include "Content\\ShellScripts\\stddefs.h"
|
|
// This control created by brennanp 6.14.2000 ??Problems?? call x53796
|
|
//
|
|
// Parameters to pass into text object
|
|
// position posRender //Where on the pane the bitmap will be drawn
|
|
// string szBitmap //The path and file name of the bitmap to be displayed
|
|
// int nFrames = 1 //The number of frames in a stacked bitmap
|
|
// int nCurrFrame = 0 //The frame of a stacked bitmap to be displayed (Current Frame is 0 based)
|
|
// int nWidth //The width of the Bitmap (a calculated value)
|
|
// int nHeight //The height of the pane (calculated from the bitmap height or bitmap height/nFrames)
|
|
// int nMode //0=no alpha, 1=4-bit alpha, 2=1-bit alpha
|
|
// int fVolatile //Make the pane Volatile if it is going to use a stacked bitmap
|
|
// int fRegion //Should the pane have a region
|
|
// int nHelpID //ResID for rollover help
|
|
// int nScaleX = 100 //Percentages to scales the pane (Assumed to be 100(1:1), Can be init'd if you want to scale)
|
|
// int nScaleY = 100
|
|
// int nScaleZ = 100
|
|
// int nRotateZ = 0 //Degrees to rotate the pane around the z axis(Assumed to be 0, Can be init'd if you want to rotate)
|
|
// int nPColor = 0 //Sets the color of the pane(Assumed to be 0, Can be init'd if you want to change color)
|
|
// bitmap bmpImage //Local variable for the bitmap
|
|
// pane pPane //The pane
|
|
|
|
//How to Initialize the Text object
|
|
// object oPane = s_Pane
|
|
// oPane.location =
|
|
// oPane.szBitmap =
|
|
// oPane.nFrames =
|
|
// oPane.nCurrFrame =
|
|
// oPane.nMode =
|
|
// oPane.fVolatile =
|
|
// oPane.fRegion =
|
|
// oPane.nHelpID =
|
|
// initialize(oPane)
|
|
|
|
//These defines have to be used for the pane object to work
|
|
//#define nMSG_UPDATESTATE 10000
|
|
//#define nMSG_CLICKED 10001
|
|
|
|
|
|
//BUGBUG:TODO: Put in Rollover help support
|
|
//BUGBUG:TODO: Put in Clicked message support
|
|
//BUGBUG:TODO: Put in Region (Entered/Exited) support
|
|
|
|
s_Pane
|
|
{
|
|
GUI_CREATE
|
|
{
|
|
position posRender
|
|
|
|
string szBitmap
|
|
int nFrames = 1
|
|
int nCurrFrame = 0
|
|
int nWidth
|
|
int nHeight
|
|
int nMode
|
|
int fVolatile
|
|
int fRegion
|
|
int nHelpID
|
|
int nScaleX = 100
|
|
int nScaleY = 100
|
|
int nScaleZ = 100
|
|
int nRotateZ = 0
|
|
int nPColor = 0
|
|
int nRollover = 1
|
|
bitmap bmpImage
|
|
pane pPane
|
|
|
|
location = 0, 0, nZ_PANE
|
|
catchup = 0
|
|
}
|
|
GUI_INIT
|
|
{
|
|
//
|
|
//Non volatile panes are always assumed to have a single frame...
|
|
//
|
|
if (fVolatile)
|
|
{
|
|
//
|
|
//Get image into bitmap and use its dimensions to create the pane
|
|
//
|
|
bmpImage = szBitmap
|
|
nWidth = getwidth(bmpImage)
|
|
nHeight = getheight(bmpImage) / nFrames
|
|
|
|
pPane = nWidth, nHeight, nMode, volatile
|
|
|
|
mail (nMSG_UPDATESTATE, this)
|
|
}
|
|
|
|
//
|
|
//Non volatile panes are always assumed to have a single frame...
|
|
//
|
|
if (fVolatile)
|
|
{
|
|
//
|
|
//Set the frame to display...
|
|
//
|
|
mail(nCurrFrame, this)
|
|
}
|
|
else
|
|
{
|
|
pPane = szBitmap, nMode, nonvolatile
|
|
|
|
nWidth = getwidth(pPane)
|
|
nHeight = getheight(pPane)
|
|
mail (nMSG_UPDATESTATE, this)
|
|
}
|
|
}
|
|
REGION_ENTERED
|
|
{
|
|
if(nRollover)
|
|
{
|
|
oRollover.nHelpID = nHelpID
|
|
mail (nMSG_INPUT_RESID,oRollover)
|
|
}
|
|
}
|
|
|
|
REGION_EXITED
|
|
{
|
|
if(nRollover)
|
|
{
|
|
mail (nMSG_CLEARHELP,oRollover)
|
|
}
|
|
}
|
|
|
|
LBUTTON_UPDATE
|
|
{
|
|
if (BUTTON_CLICKED == mouse.left)
|
|
{
|
|
mail(nMSG_CLICKED, parent)
|
|
}
|
|
}
|
|
|
|
|
|
GUI_MAILBOX
|
|
{
|
|
int nMsg = getmessage()
|
|
|
|
if (nMSG_UPDATESTATE != nMsg)
|
|
{
|
|
nCurrFrame = nMsg
|
|
|
|
//
|
|
//blit new visual state...
|
|
//
|
|
blit bmpImage (0, nHeight * nCurrFrame to nWidth, nHeight * (nCurrFrame + 1)), 0,0 on pPane
|
|
update(pPane)
|
|
}
|
|
else
|
|
{
|
|
//
|
|
//If alpha specified, set alpha mode
|
|
//
|
|
if (1 == nMode) //4-bit alpha
|
|
{
|
|
alphamode(pPane) = am_alpha_alphainvalpha
|
|
}
|
|
|
|
scale(pPane) = nScaleX, nScaleY, nScaleZ
|
|
|
|
//
|
|
//If this pane is supposed to have a region...
|
|
//
|
|
if (fRegion)
|
|
{
|
|
//
|
|
//If the parent script didn't specify a region before initializing this pane, set the
|
|
//region equal to the full size of the pane...
|
|
//
|
|
//if (region.p1.x >= region.p2.x)
|
|
//{
|
|
region = pPane
|
|
//}
|
|
}
|
|
else
|
|
{
|
|
region = 0,0 to 0, 0
|
|
}
|
|
|
|
if (!relative)
|
|
{
|
|
posRender.x = location.x
|
|
posRender.y = location.y
|
|
}
|
|
|
|
rotate(pPane) = 0, 0, nRotateZ
|
|
|
|
if (0 != nPColor)
|
|
{
|
|
color(pPane) = nPColor
|
|
}
|
|
}
|
|
}
|
|
|
|
GUI_DRAW
|
|
{
|
|
render pPane, posRender.x, posRender.y
|
|
}
|
|
}
|