Removed SupportHHStuff.
This commit is contained in:
parent
ead7859059
commit
efc3e22969
2 changed files with 313 additions and 1180 deletions
File diff suppressed because it is too large
Load diff
|
@ -7,8 +7,6 @@
|
||||||
#ifndef _scstring
|
#ifndef _scstring
|
||||||
#define _scstring 1
|
#define _scstring 1
|
||||||
|
|
||||||
#define SupportHHStuff No
|
|
||||||
|
|
||||||
#ifndef _refobj
|
#ifndef _refobj
|
||||||
#include "refobj.hpp"
|
#include "refobj.hpp"
|
||||||
#endif
|
#endif
|
||||||
|
@ -17,35 +15,22 @@
|
||||||
#include "ourbool.h"
|
#include "ourbool.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if SupportHHStuff
|
#ifndef _projtext
|
||||||
#ifndef HHSTRING
|
#include "projtext.h"
|
||||||
#include "hhstring.h"
|
#endif
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef FDIPUB_INCLUDED
|
#ifndef _projfont
|
||||||
#include "fdipub.h"
|
#include "projfont.h"
|
||||||
#endif
|
#endif
|
||||||
#else
|
|
||||||
#ifndef _projtext
|
|
||||||
#include "projtext.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef _projfont
|
|
||||||
#include "projfont.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef _r2base
|
|
||||||
#include "r2base.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
#ifndef _r2base
|
||||||
|
#include "r2base.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef list_template_hpp
|
#ifndef list_template_hpp
|
||||||
#include "list_tem.hpp"
|
#include "list_tem.hpp"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define EnableSizeData Yes
|
|
||||||
|
|
||||||
class SCString : public RefCountObject
|
class SCString : public RefCountObject
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -124,19 +109,6 @@
|
||||||
List<ProjChar> List_ProjChar
|
List<ProjChar> List_ProjChar
|
||||||
);
|
);
|
||||||
|
|
||||||
#if SupportHHStuff
|
|
||||||
void GetSizeOfSingleLineGivenStandardFont
|
|
||||||
(
|
|
||||||
FDIBMAP* pFDIBMap_Out
|
|
||||||
);
|
|
||||||
FDIBMAP GetSizeOfSingleLineGivenStandardFont(void);
|
|
||||||
int GetWidthOfSingleLineGivenStandardFont(void);
|
|
||||||
|
|
||||||
FDIQUAD MinFDIQuadForSCStringAtPos
|
|
||||||
(
|
|
||||||
FDIPOS FDIPos
|
|
||||||
);
|
|
||||||
#else
|
|
||||||
r2size CalcSize
|
r2size CalcSize
|
||||||
(
|
(
|
||||||
FontIndex I_Font
|
FontIndex I_Font
|
||||||
|
@ -150,7 +122,6 @@
|
||||||
|
|
||||||
static void UpdateAfterFontChange( FontIndex I_Font_Changed );
|
static void UpdateAfterFontChange( FontIndex I_Font_Changed );
|
||||||
// called by the font code whenever fonts are loaded/unloaded
|
// called by the font code whenever fonts are loaded/unloaded
|
||||||
#endif
|
|
||||||
|
|
||||||
unsigned int GetNumChars(void);
|
unsigned int GetNumChars(void);
|
||||||
|
|
||||||
|
@ -183,16 +154,9 @@
|
||||||
int NumberOfCharacters;
|
int NumberOfCharacters;
|
||||||
// doesn't include NULL terminator
|
// doesn't include NULL terminator
|
||||||
|
|
||||||
#if SupportHHStuff
|
r2size R2Size[ IndexedFonts_MAX_NUMBER_OF_FONTS ];
|
||||||
int WidthGivenStandardFont;
|
|
||||||
// width in pixels, to save constant recalc
|
|
||||||
#else
|
|
||||||
#if EnableSizeData
|
|
||||||
r2size R2Size[ IndexedFonts_MAX_NUMBER_OF_FONTS ];
|
|
||||||
#endif
|
|
||||||
|
|
||||||
OurBool bCanRender[ IndexedFonts_MAX_NUMBER_OF_FONTS ];
|
OurBool bCanRender[ IndexedFonts_MAX_NUMBER_OF_FONTS ];
|
||||||
#endif
|
|
||||||
|
|
||||||
size_t AllocatedSize;
|
size_t AllocatedSize;
|
||||||
// this includes the NULL terminator
|
// this includes the NULL terminator
|
||||||
|
@ -207,41 +171,23 @@
|
||||||
}; // Naming: "StringObj"
|
}; // Naming: "StringObj"
|
||||||
|
|
||||||
// Inline methods:
|
// Inline methods:
|
||||||
#if !SupportHHStuff
|
inline r2size SCString::CalcSize
|
||||||
#if EnableSizeData
|
|
||||||
inline r2size SCString::CalcSize
|
|
||||||
(
|
|
||||||
FontIndex I_Font
|
|
||||||
)
|
|
||||||
{
|
|
||||||
return R2Size[ I_Font ];
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
inline OurBool SCString::bCanRenderFully( FontIndex I_Font )
|
|
||||||
{
|
|
||||||
return bCanRender[ I_Font ];
|
|
||||||
}
|
|
||||||
#endif // !SupportHHStuff
|
|
||||||
|
|
||||||
inline unsigned int SCString::GetNumChars(void)
|
|
||||||
{
|
|
||||||
return NumberOfCharacters;
|
|
||||||
}
|
|
||||||
|
|
||||||
#if SupportHHStuff
|
|
||||||
extern SCString* HHSTRING_GetSCString
|
|
||||||
(
|
(
|
||||||
HHStringTable* pHHST,
|
FontIndex I_Font
|
||||||
unsigned int StrNum
|
)
|
||||||
);
|
{
|
||||||
// The result is guaranteed to be non-NULL if you pick a valid
|
return R2Size[ I_Font ];
|
||||||
// StrNum.
|
}
|
||||||
|
|
||||||
// Remember to call R_AddRef() if you use the result
|
inline OurBool SCString::bCanRenderFully( FontIndex I_Font )
|
||||||
// NO LONGER THE CASE!!!!
|
{
|
||||||
#endif
|
return bCanRender[ I_Font ];
|
||||||
|
}
|
||||||
|
|
||||||
|
inline unsigned int SCString::GetNumChars(void)
|
||||||
|
{
|
||||||
|
return NumberOfCharacters;
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue