29 #include "../idlib/precompiled.h"
33 #include "../renderer/Image.h"
97 int key =
event->evValue;
103 for (i = 0; i <
c; i++) {
130 return "cmdDemoGotoMarker";
136 return "cmdDemoGotoMarker";
138 return "cmdDemoPauseFrame";
148 static const int HEALTH_MAX = 100;
149 static const int COMBAT_MAX = 100;
150 static const int RATE_MAX = 125;
151 static const int STAMINA_MAX = 12;
162 for (
int i = 0;
i <
c;
i++) {
164 if (md.
rect.
w == 0) {
188 r.
y += (r.
h - 32) / 2;
190 r.
x += (r.
w * pct) - 16;
207 for (i = 0; i <
c; i++) {
232 int index = (63-
y) * 512 + x;
233 if (index >= 0 && index < 512 * 64) {
241 int deltax = abs(x2 - x1);
242 int deltay = abs(y2 - y1);
243 int incx = (x1 >
x2) ? -1 : 1;
244 int incy = (y1 >
y2) ? -1 : 1;
246 if (deltax > deltay) {
248 up = right - deltax * 2;
249 dir = right - deltax;
250 while (deltax-- >= 0) {
251 Point(x1, y1, out, color);
253 y1 += (dir > 0) ? incy : 0;
254 dir += (dir > 0) ? up : right;
258 up = right - deltay * 2;
259 dir = right - deltay;
260 while ( deltay-- >= 0) {
261 Point(x1, y1, out, color);
262 x1 += (dir > 0) ? incx : 0;
264 dir += (dir > 0) ? up : right;
318 md.
time = atoi(name);
323 float step = 511.0f / (
numStats - 1);
virtual idFile * OpenFileRead(const char *relativePath, bool allowCopyFiles=true, const char *gamedir=NULL)=0
float GetFloat(const char *key, const char *defaultString="0") const
int GetInt(const char *key, const char *defaultString="0") const
virtual idFileList * ListFiles(const char *relativePath, const char *extension, bool sort=false, bool fullRelativePath=false, const char *gamedir=NULL)=0
virtual void SetStateInt(const char *varName, const int value)
virtual idWinVar * GetWinVarByName(const char *_name, bool winLookup=false)
void Point(int x, int y, dword *out, dword color)
virtual bool ParseInternalVar(const char *name, idParser *src)
int GetNumFiles(void) const
idFileSystem * fileSystem
virtual const char * HandleEvent(const sysEvent_t *event, bool *updateVisuals)
void ParseString(idParser *src, idStr &out)
const char * GetName(void) const
void ParseVec4(idParser *src, idVec4 &out)
virtual const idMaterial * FindMaterial(const char *name, bool makeDefault=true)=0
virtual bool ParseInternalVar(const char *name, idParser *src)
const idMaterial * background
virtual void Draw(int time, float x, float y)
int Icmp(const char *text) const
virtual void MouseEnter()
logStats_t loggedStats[MAX_LOGGED_STATS]
virtual void Activate(bool activate, idStr &act)
int DrawText(const char *text, float textScale, int textAlign, idVec4 color, idRectangle rectDraw, bool wrap, int cursor=-1, bool calcOnly=false, idList< int > *breaks=NULL, int limit=0)
const char * GetString(const char *key, const char *defaultString="") const
idStr & StripFileExtension(void)
const shaderStage_t * GetStage(const int index) const
void UploadScratch(const byte *pic, int width, int height)
virtual const char * RouteMouseCoords(float xd, float yd)
const char * GetFile(int index) const
virtual int Read(void *buffer, int len)
virtual void Activate(bool activate, idStr &act)
virtual const char * RouteMouseCoords(float xd, float yd)
virtual void FreeFileList(idFileList *fileList)=0
const idMaterial * markerMat
virtual void MouseEnter()
virtual const idDict & State() const
idWindow * GetDesktop() const
GLdouble GLdouble GLdouble y2
idDeclManager * declManager
idList< markerData_t > markerTimes
int Append(const type &obj)
GLdouble GLdouble GLdouble r
void SetChildWinVarVal(const char *name, const char *var, const char *val)
idMarkerWindow(idUserInterfaceLocal *gui)
void Line(int x1, int y1, int x2, int y2, dword *out, dword color)
idUserInterfaceLocal * gui
virtual ~idMarkerWindow()
bool Contains(float xt, float yt)
const idMaterial * markerStop
void SetSort(float s) const
void * Mem_Alloc(const int size)
char * va(const char *fmt,...)
virtual void CloseFile(idFile *f)=0
void DrawMaterial(float x, float y, float w, float h, const idMaterial *mat, const idVec4 &color, float scalex=1.0, float scaley=1.0)
virtual void virtual void Warning(const char *fmt,...) id_attribute((format(printf
virtual idWinVar * GetWinVarByName(const char *_name, bool winLookup=false, drawWin_t **owner=NULL)
idStr & StripFilename(void)