diff options
Diffstat (limited to 'intern/ghost/test')
-rw-r--r-- | intern/ghost/test/gears/GHOST_C-Test.c | 8 | ||||
-rw-r--r-- | intern/ghost/test/gears/GHOST_Test.cpp | 15 | ||||
-rw-r--r-- | intern/ghost/test/multitest/EventToBuf.c | 2 | ||||
-rw-r--r-- | intern/ghost/test/multitest/MultiTest.c | 14 |
4 files changed, 19 insertions, 20 deletions
diff --git a/intern/ghost/test/gears/GHOST_C-Test.c b/intern/ghost/test/gears/GHOST_C-Test.c index 8cd1b5acb89..3257c42118e 100644 --- a/intern/ghost/test/gears/GHOST_C-Test.c +++ b/intern/ghost/test/gears/GHOST_C-Test.c @@ -46,7 +46,7 @@ # include <GL/gl.h> #endif /* defined(WIN32) || defined(__APPLE__) */ -static void gearsTimerProc(GHOST_TimerTaskHandle task, GHOST_TUns64 time); +static void gearsTimerProc(GHOST_TimerTaskHandle task, uint64_t time); int processEvent(GHOST_EventHandle hEvent, GHOST_TUserDataPtr userData); static GLfloat view_rotx = 20.0, view_roty = 30.0, view_rotz = 0.0; @@ -60,7 +60,7 @@ static GHOST_WindowHandle sFullScreenWindow = NULL; static GHOST_TimerTaskHandle sTestTimer; static GHOST_TimerTaskHandle sGearsTimer; -static void testTimerProc(GHOST_TimerTaskHandle task, GHOST_TUns64 time) +static void testTimerProc(GHOST_TimerTaskHandle task, uint64_t time) { printf("timer1, time=%d\n", (int)time); } @@ -274,7 +274,7 @@ static void setViewPortGL(GHOST_WindowHandle hWindow) glMatrixMode(GL_PROJECTION); glLoadIdentity(); glFrustum(-w, w, -h, h, 5.0, 60.0); - /* glOrtho(0, bnds.getWidth(), 0, bnds.getHeight(), -10, 10); */ + // glOrtho(0, bnds.getWidth(), 0, bnds.getHeight(), -10, 10); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); glTranslatef(0.0, 0.0, -40.0); @@ -501,7 +501,7 @@ int main(int argc, char **argv) return 0; } -static void gearsTimerProc(GHOST_TimerTaskHandle hTask, GHOST_TUns64 time) +static void gearsTimerProc(GHOST_TimerTaskHandle hTask, uint64_t time) { GHOST_WindowHandle hWindow = NULL; fAngle += 2.0; diff --git a/intern/ghost/test/gears/GHOST_Test.cpp b/intern/ghost/test/gears/GHOST_Test.cpp index c9c497aacb4..c1cb5f29e2e 100644 --- a/intern/ghost/test/gears/GHOST_Test.cpp +++ b/intern/ghost/test/gears/GHOST_Test.cpp @@ -54,7 +54,7 @@ static bool nVidiaWindows; // very dirty but hey, it's for testing only -static void gearsTimerProc(GHOST_ITimerTask *task, GHOST_TUns64 time); +static void gearsTimerProc(GHOST_ITimerTask *task, uint64_t time); static class Application *fApp; static GLfloat view_rotx = 20.0, view_roty = 30.0, view_rotz = 0.0; @@ -71,7 +71,7 @@ void StereoProjection(float left, float dist, float eye); -static void testTimerProc(GHOST_ITimerTask * /*task*/, GHOST_TUns64 time) +static void testTimerProc(GHOST_ITimerTask * /*task*/, uint64_t time) { std::cout << "timer1, time=" << (int)time << "\n"; } @@ -345,7 +345,7 @@ void StereoProjection(float left, float zero_plane, float dist, float eye) -/* Perform the perspective projection for one eye's subfield. +/* Perform the perspective projection for one eye's sub-field. * The projection is in the direction of the negative z axis. * * -6.0, 6.0, -4.8, 4.8, @@ -365,8 +365,8 @@ void StereoProjection(float left, * of zero parallax. * * -0.31 - * eye = half the eye separation; positive for the right eye subfield, - * negative for the left eye subfield. + * eye = half the eye separation; positive for the right eye sub-field, + * negative for the left eye sub-field. */ { float xmid, ymid, clip_near, clip_far, topw, bottomw, leftw, rightw, dx, dy, n_over_d; @@ -392,8 +392,7 @@ void StereoProjection(float left, glFrustum(leftw, rightw, bottomw, topw, clip_near, clip_far); glTranslatef(-xmid - eye, -ymid, -zero_plane - dist); - return; -} /* stereoproj */ +} class Application : public GHOST_IEventConsumer { public: @@ -731,7 +730,7 @@ int main(int /*argc*/, char ** /*argv*/) return 0; } -static void gearsTimerProc(GHOST_ITimerTask *task, GHOST_TUns64 /*time*/) +static void gearsTimerProc(GHOST_ITimerTask *task, uint64_t /*time*/) { fAngle += 2.0; view_roty += 1.0; diff --git a/intern/ghost/test/multitest/EventToBuf.c b/intern/ghost/test/multitest/EventToBuf.c index 788c0221753..44ea07bd880 100644 --- a/intern/ghost/test/multitest/EventToBuf.c +++ b/intern/ghost/test/multitest/EventToBuf.c @@ -203,7 +203,7 @@ static char *keytype_to_string(GHOST_TKey key) void event_to_buf(GHOST_EventHandle evt, char buf[128]) { GHOST_TEventType type = GHOST_GetEventType(evt); - double time = (double)((GHOST_TInt64)GHOST_GetEventTime(evt)) / 1000; + double time = (double)((int64_t)GHOST_GetEventTime(evt)) / 1000; GHOST_WindowHandle win = GHOST_GetEventWindow(evt); void *data = GHOST_GetEventData(evt); char *pos = buf; diff --git a/intern/ghost/test/multitest/MultiTest.c b/intern/ghost/test/multitest/MultiTest.c index ccbbbceb5b6..0e6602d9510 100644 --- a/intern/ghost/test/multitest/MultiTest.c +++ b/intern/ghost/test/multitest/MultiTest.c @@ -302,12 +302,12 @@ static void mainwindow_handle(void *priv, GHOST_EventHandle evt) /**/ -static void mainwindow_timer_proc(GHOST_TimerTaskHandle task, GHOST_TUns64 time) +static void mainwindow_timer_proc(GHOST_TimerTaskHandle task, uint64_t time) { MainWindow *mw = GHOST_GetTimerTaskUserData(task); char buf[64]; - sprintf(buf, "timer: %6.2f", (double)((GHOST_TInt64)time) / 1000); + sprintf(buf, "timer: %6.2f", (double)((int64_t)time) / 1000); mainwindow_log(mw, buf); } @@ -570,7 +570,7 @@ LoggerWindow *loggerwindow_new(MultiTestApp *app) { GHOST_GLSettings glSettings = {0}; GHOST_SystemHandle sys = multitestapp_get_system(app); - GHOST_TUns32 screensize[2]; + uint32_t screensize[2]; GHOST_WindowHandle win; GHOST_GetMainDisplayDimensions(sys, &screensize[0], &screensize[1]); @@ -701,11 +701,11 @@ static void extrawindow_do_key(ExtraWindow *ew, GHOST_TKey key, int press) } } -static void extrawindow_spin_cursor(ExtraWindow *ew, GHOST_TUns64 time) +static void extrawindow_spin_cursor(ExtraWindow *ew, uint64_t time) { - GHOST_TUns8 bitmap[16][2]; - GHOST_TUns8 mask[16][2]; - double ftime = (double)((GHOST_TInt64)time) / 1000; + uint8_t bitmap[16][2]; + uint8_t mask[16][2]; + double ftime = (double)((int64_t)time) / 1000; float angle = fmod(ftime, 1.0) * 3.1415 * 2; int i; |