| 1 | /*************************************************************************** |
| 2 | gameclock.cpp - description |
| 3 | ------------------- |
| 4 | begin : Sun May 18 19:17:34 2003 |
| 5 | copyright : (C) 2003 Michael Bridak |
| 6 | email : [email protected] |
| 7 | $Id: gameclock.cpp,v 1.1 2003/05/19 02:26:36 mbridak Exp $ |
| 8 | ***************************************************************************/ |
| 9 | |
| 10 | /*************************************************************************** |
| 11 | * * |
| 12 | * This program is free software; you can redistribute it and/or modify * |
| 13 | * it under the terms of the GNU General Public License as published by * |
| 14 | * the Free Software Foundation; either version 2 of the License. * |
| 15 | * . * |
| 16 | * * |
| 17 | ***************************************************************************/ |
| 18 | |
| 19 | #include <iostream> |
| 20 | #include "gameclock.h"cxx . . $ `<file>/src/gameclock.h`/ |
| 21 | |
| 22 | using namespace std; |
| 23 | |
| 24 | GameClockcxx . . $ GameClock#::GameClockcxx . . $ GameClock#GameClock(49f6e7a06ebc5aa8).() |
| 25 | { |
| 26 | hourscxx . . $ GameClock#hours.=0; |
| 27 | minutescxx . . $ GameClock#minutes.=0; |
| 28 | secondscxx . . $ GameClock#seconds.=0; |
| 29 | tickscxx . . $ GameClock#ticks.=0; |
| 30 | } |
| 31 | |
| 32 | GameClockcxx . . $ GameClock#::~cxx . . $ GameClock#`~GameClock`(ced63f7c635d850d).GameClockcxx . . $ GameClock#() |
| 33 | { |
| 34 | } |
| 35 | |
| 36 | void GameClockcxx . . $ GameClock#::InitTimecxx . . $ GameClock#InitTime(b1146eedae1e1d0b).(int hrs, int min, int sec) |
| 37 | { |
| 38 | hourscxx . . $ GameClock#hours.=hrs; |
| 39 | minutescxx . . $ GameClock#minutes.=min; |
| 40 | secondscxx . . $ GameClock#seconds.=sec; |
| 41 | } |
| 42 | |
| 43 | void GameClockcxx . . $ GameClock#::UpdateTimecxx . . $ GameClock#UpdateTime(49f6e7a06ebc5aa8).() |
| 44 | { |
| 45 | tickscxx . . $ GameClock#ticks.++; |
| 46 | secondscxx . . $ GameClock#seconds.++; |
| 47 | if(secondscxx . . $ GameClock#seconds. > 59){ |
| 48 | minutescxx . . $ GameClock#minutes.++; |
| 49 | secondscxx . . $ GameClock#seconds.=0; |
| 50 | } |
| 51 | if(minutescxx . . $ GameClock#minutes. > 59){ |
| 52 | hourscxx . . $ GameClock#hours.++; |
| 53 | minutescxx . . $ GameClock#minutes.=0; |
| 54 | } |
| 55 | if(hourscxx . . $ GameClock#hours. > 23){ |
| 56 | hourscxx . . $ GameClock#hours.=0; |
| 57 | } |
| 58 | } |
| 59 | |
| 60 | void GameClockcxx . . $ GameClock#::GetTimecxx . . $ GameClock#GetTime(c5dbce0a152fbb5f).(int &hrs, int &min, int &sec) |
| 61 | { |
| 62 | hrs=hourscxx . . $ GameClock#hours.; |
| 63 | min=minutescxx . . $ GameClock#minutes.; |
| 64 | sec=secondscxx . . $ GameClock#seconds.; |
| 65 | } |
| 66 | |
| 67 | int GameClockcxx . . $ GameClock#::GetTickcxx . . $ GameClock#GetTick(b126dc7c1de90089).() |
| 68 | { |
| 69 | return tickscxx . . $ GameClock#ticks.; |
| 70 | } |