-#ifndef CROSSHAIRPREVIEW_H
-#define CROSSHAIRPREVIEW_H
-#include "../item.qc"
-CLASS(XonoticCrosshairPreview, Item)
- METHOD(XonoticCrosshairPreview, configureXonoticCrosshairPreview, void(entity));
- METHOD(XonoticCrosshairPreview, draw, void(entity));
- ATTRIB(XonoticCrosshairPreview, src, string, string_null)
- ATTRIB(XonoticCrosshairPreview, src2, string, string_null)
- ATTRIB(XonoticCrosshairPreview, disabled, float, 0)
- ATTRIB(XonoticCrosshairPreview, disabledAlpha, float, SKINALPHA_DISABLED)
-ENDCLASS(XonoticCrosshairPreview)
-entity makeXonoticCrosshairPreview();
-#endif
-
-#ifdef IMPLEMENTATION
+#include "crosshairpreview.qh"
+
entity makeXonoticCrosshairPreview()
{
entity me;
float a;
rgb = stov(cvar_string("crosshair_color"));
a = cvar("crosshair_alpha");
- if(me.src)
- strunzone(me.src);
- me.src = strzone(strcat("/gfx/crosshair", cvar_string("crosshair")));
+ strcpy(me.src, strcat("/gfx/crosshair", cvar_string("crosshair")));
sz = draw_PictureSize(me.src);
sz = globalToBoxSize(sz, me.size);
SUPER(XonoticCrosshairPreview).draw(me);
}
-#endif