//----------------------------------------------------------------------------------------- // // Floating Help class. Used for tool tips, building/mech/vehicle IDs. // Basically draws itself AFTER everything else since gos_Font"3D" has no Z Depth! // //---------------------------------------------------------------------------// // Copyright (C) Microsoft Corporation. All rights reserved. // //===========================================================================// //-------------------------- // Include Files #ifndef FLOATHELP_H #include "floathelp.h" #endif #ifndef HEAP_H #include "heap.h" #endif //----------------------------------------------------------------------------------------- DWORD FloatHelp::currentFloatHelp = 0; //How many of them are we using at present FloatHelp* FloatHelp::floatHelps = NULL; //POinters to all of them. //----------------------------------------------------------------------------------------- // class FloatHelp void FloatHelp::init (long maxHelps) { floatHelps = (FloatHelp *)systemHeap->Malloc(sizeof(FloatHelp) * MAX_FLOAT_HELPS); gosASSERT(floatHelps != NULL); FloatHelp *tmp = floatHelps; for (long i=0;itext[0] = 0; tmp->screenPos.x = tmp->screenPos.y = tmp->screenPos.z = tmp->screenPos.w = 0.0f; tmp->foregroundColor = SD_WHITE; tmp->backgroundColor = SD_BLACK; tmp->scale = 1.0f; tmp->proportional = true; tmp->bold = tmp->italic = tmp->wordWrap = false; } currentFloatHelp = 0; } //----------------------------------------------------------------------------------------- void FloatHelp::destroy (void) { systemHeap->Free(floatHelps); floatHelps = NULL; currentFloatHelp = 0; } //----------------------------------------------------------------------------------------- void FloatHelp::resetAll (void) { currentFloatHelp = 0; for (long i=0;i