openbsd-ports/games/f1spirit/patches/patch-sources_CPlayer_cpp
landry 46b9c5dbb7 Import f1spirit, a remake of Konami's original F1-Spirit from 1987.
F-1 Spirit is a racing game. You will race with many different types
of cars, starting by Stock or Rally cars, and finishing by driving F1
cars (once you have classified for it by passing for F3, F3000 and
Endurance cars).

Note that this requires DRI, the game is barely usable otherwise.
2009-03-19 18:30:30 +00:00

72 lines
1.7 KiB
Plaintext

$OpenBSD: patch-sources_CPlayer_cpp,v 1.1.1.1 2009/03/19 18:30:30 landry Exp $
--- sources/CPlayer.cpp.orig Sat Mar 7 11:53:33 2009
+++ sources/CPlayer.cpp Sat Mar 7 12:30:45 2009
@@ -7,6 +7,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <sys/types.h>
#include <time.h>
#include <SDL.h>
@@ -259,11 +260,12 @@ void CPlayerInfo::set_points(int i, int p)
#else
struct timeval ttime;
-
+ struct timespec ts;
struct tm *today;
gettimeofday(&ttime, NULL);
- today = localtime(&(ttime.tv_sec));
+ ts.tv_sec = ttime.tv_sec;
+ today = localtime(&(ts.tv_sec));
position_date[i].year = today->tm_year;
position_date[i].month = today->tm_mon;
@@ -289,11 +291,12 @@ void CPlayerInfo::set_time(int i, Uint32 p)
#else
struct timeval ttime;
-
+ struct timespec ts;
struct tm *today;
gettimeofday(&ttime, NULL);
- today = localtime(&(ttime.tv_sec));
+ ts.tv_sec = ttime.tv_sec;
+ today = localtime(&(ts.tv_sec));
time_date[i].year = today->tm_year;
time_date[i].month = today->tm_mon;
@@ -319,11 +322,12 @@ void CPlayerInfo::set_bestlap(int i, Uint32 p)
#else
struct timeval ttime;
-
+ struct timespec ts;
struct tm *today;
gettimeofday(&ttime, NULL);
- today = localtime(&(ttime.tv_sec));
+ ts.tv_sec = ttime.tv_sec;
+ today = localtime(&(ts.tv_sec));
lap_date[i].year = today->tm_year;
lap_date[i].month = today->tm_mon;
@@ -349,11 +353,12 @@ void CPlayerInfo::set_position(int i, int p)
#else
struct timeval ttime;
-
+ struct timespec ts;
struct tm *today;
gettimeofday(&ttime, NULL);
- today = localtime(&(ttime.tv_sec));
+ ts.tv_sec = ttime.tv_sec;
+ today = localtime(&(ts.tv_sec));
position_date[i].year = today->tm_year;
position_date[i].month = today->tm_mon;