Rev 109 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 109 | Rev 126 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | /******************************************************************************* |
1 | /******************************************************************************* |
Line 2... | Line 2... | ||
2 | 2 | ||
3 | MenuetOS MineSweeper |
3 | MenuetOS MineSweeper |
Line 4... | Line 4... | ||
4 | Copyright (C) 2003 Ivan Poddubny |
4 | Copyright (C) 2003, 2004 Ivan Poddubny |
5 | 5 | ||
6 | This program is free software; you can redistribute it and/or modify |
6 | This program is free software; you can redistribute it and/or modify |
7 | it under the terms of the GNU General Public License as published by |
7 | it under the terms of the GNU General Public License as published by |
Line 24... | Line 24... | ||
24 | 24 | ||
Line 25... | Line 25... | ||
25 | byte timer_life; |
25 | byte timer_life; |
26 | 26 | ||
- | 27 | start_timer() |
|
- | 28 | { |
|
- | 29 | #ifdef DEBUG |
|
- | 30 | sys_debug_write_string("MINE: timer started\n"); |
|
27 | start_timer() |
31 | #endif |
28 | { |
32 | |
29 | timer_life = TRUE; |
33 | timer_life = TRUE; |
Line 30... | Line 34... | ||
30 | ttime = sys_get_clock(); |
34 | ttime = sys_get_setup_devices(9); //sys_get_clock(); |
31 | } |
35 | } |
- | 36 | ||
- | 37 | stop_timer() |
|
- | 38 | { |
|
- | 39 | #ifdef DEBUG |
|
32 | 40 | sys_debug_write_string("MINE: timer stopped\n"); |
|
33 | stop_timer() |
41 | #endif |
Line 34... | Line 42... | ||
34 | { |
42 | |
35 | timer_life = FALSE; |
43 | timer_life = FALSE; |
36 | } |
44 | } |
Line 37... | Line 45... | ||
37 | 45 | ||
38 | check_timer() |
- | |
Line 39... | Line 46... | ||
39 | { |
46 | check_timer() |
40 | IF (!timer_life) return; |
47 | { |
41 | 48 | IF (!timer_life) return; |
|
42 | EAX = sys_get_clock(); |
49 | |
43 | IF (EAX == 0xffffff) return; |
50 | ECX = sys_get_setup_devices(9); //sys_get_clock(); |
44 | 51 | ||
45 | IF (ttime != EAX) |
52 | IF (ttime+100 < ECX) |
46 | { |
53 | { |
47 | ttime = EAX; |
54 | ttime += 100; |