// Sys_Printf("%i points on brush\n", pointList.size());
#endif
- return pointList.size();
+ return static_cast<int>(pointList.size());
}
void DBrush_addFace(DBrush& brush, const _QERFaceData& faceData)
void DEntity_loadBrush(DEntity& entity, scene::Instance& brush)
{
- DBrush* loadBrush = entity.NewBrush(entity.brushList.size());
+ DBrush* loadBrush = entity.NewBrush(static_cast<int>(entity.brushList.size()));
loadBrush->LoadFromBrush(brush, true);
}
typedef ReferenceCaller1<DEntity, scene::Instance&, DEntity_loadBrush> DEntityLoadBrushCaller;
}
int DEntity::GetBrushCount( void ) {
- return brushList.size();
+ return static_cast<int>(brushList.size());
}
DBrush* DEntity::FindBrushByPointer( scene::Node& brush ) {
PatchControlMatrix matrix = GlobalPatchCreator().Patch_getControlPoints(patch.path().top());
- width = matrix.x();
- height = matrix.y();
+ width = static_cast<int>(matrix.x());
+ height = static_cast<int>(matrix.y());
for(int x = 0; x < height; x++)
{
continue;
}
- int count = pSP->m_pointList.size() + 2;
+ std::size_t count = pSP->m_pointList.size() + 2;
vec3_t* v = new vec3_t[count];
VectorCopy(pSP->point.vOrigin, v[0]);
VectorCopy(pSP->pTarget->vOrigin, v[i]);
for (float tension = 0.0f; tension <= 1.f; tension += 0.01f) {
- CalculateSpline_r(v, count, out._pnt, tension);
+ CalculateSpline_r(v, static_cast<int>(count), out._pnt, tension);
pSP->m_vertexList.push_front(out);
}
}
}
- int mIndex;
+ std::size_t mIndex;
};
CBobtoolzToolbarButton g_bobtoolzToolbarButtons[NUM_TOOLBARBUTTONS];
#include "str.h"
#include <list>
#include <gtk/gtk.h>
+#include "gtkutil/pointer.h"
#include "../lists.h"
#include "../misc.h"
ret = (EMessageBoxReturn*)g_object_get_data (G_OBJECT (parent), "ret");
*loop = 0;
- *ret = (EMessageBoxReturn)GPOINTER_TO_INT(data);
+ *ret = (EMessageBoxReturn)gpointer_to_int(data);
}
static gint dialog_delete_callback (GtkWidget *widget, GdkEvent* event, gpointer data)
char* TranslateString (char *buf)
{
static char buf2[32768];
- int i, l;
- char *out;
- l = strlen(buf);
- out = buf2;
- for (i=0 ; i<l ; i++)
+ std::size_t l = strlen(buf);
+ char* out = buf2;
+ for (int i=0 ; i<l ; i++)
{
if (buf[i] == '\n')
{
if(bHorScale)
{
- int texWidth = pqtTexInfo->width;
float width = maxX - minX;
- scale[0] = width/texWidth;
+ scale[0] = width/pqtTexInfo->width;
shift[0] = -(float)((int)maxX%(int)width)/scale[0];
}
if(bVertScale)
{
- int texHeight = pqtTexInfo->height;
float height = maxY - minY;
- scale[1] = height/texHeight;
+ scale[1] = height/pqtTexInfo->height;
shift[1] = (float)((int)minY%(int)height)/scale[1];
}
#include "AboutDialog.h"
#include <gtk/gtk.h>
#include "version.h"
+#include "gtkutil/pointer.h"
#include "prtview.h"
#include "ConfigDialog.h"
ret = (int*)g_object_get_data (G_OBJECT (parent), "ret");
*loop = 0;
- *ret = (int)data;
+ *ret = gpointer_to_int(data);
}
static gint dialog_delete_callback (GtkWidget *widget, GdkEvent* event, gpointer data)
ret = (int*)g_object_get_data (G_OBJECT (parent), "ret");
*loop = 0;
- *ret = (int)data;
+ *ret = gpointer_to_int(data);
}
static gint dialog_delete_callback (GtkWidget *widget, GdkEvent* event, gpointer data)
static void OnSelchangeZbuffer (GtkWidget *widget, gpointer data)
{
- portals.zbuffer = GPOINTER_TO_INT (data);
+ portals.zbuffer = gpointer_to_int(data);
Portals_shadersChanged();
SceneChangeNotify();
ret = (int*)g_object_get_data (G_OBJECT (parent), "ret");
*loop = 0;
- *ret = (int)data;
+ *ret = gpointer_to_int(data);
}
static gint dialog_delete_callback (GtkWidget *widget, GdkEvent* event, gpointer data)
filename = (char**)g_object_get_data (G_OBJECT (parent), "filename");
*loop = 0;
- if ((int)data == IDOK)
+ if (gpointer_to_int(data) == IDOK)
*filename = g_strdup (gtk_file_selection_get_filename (GTK_FILE_SELECTION (parent)));
}