source: golgotha/src/golg/map_movi.cc

Last change on this file was 80, checked in by Sam Hocevar, 12 years ago
  • Adding the Golgotha source code. Not sure what's going to be interesting in there, but since it's all public domain, there's certainly stuff to pick up.
File size: 1.6 KB
Line 
1/********************************************************************** <BR>
2  This file is part of Crack dot Com's free source code release of
3  Golgotha. <a href="http://www.crack.com/golgotha_release"> <BR> for
4  information about compiling & licensing issues visit this URL</a>
5  <PRE> If that doesn't help, contact Jonathan Clark at
6  golgotha_source@usa.net (Subject should have "GOLG" in it)
7***********************************************************************/
8
9#include "map.hh"
10#include "g1_object.hh"
11#include "m_flow.hh"
12
13
14
15i4_bool g1_map_class::start_movie()
16{
17  if (!current_movie || !current_movie->current())
18    return i4_F;
19   
20  current_movie->start();
21  movie_in_progress=i4_T;
22 
23  g1_object_class *o[G1_MAX_OBJECTS];
24  int t=make_object_list(o,G1_MAX_OBJECTS);
25 
26  for (int i=0; i<t; i++)
27    o[i]->request_think();
28
29  tick_time.get();
30
31  return i4_T;
32}
33
34void g1_map_class::stop_movie()
35{
36  if (current_movie)
37    current_movie->stop();
38
39  movie_in_progress=i4_F;
40}
41
42i4_bool g1_map_class::advance_movie_with_time()
43{
44  if (current_movie)
45  {
46    g1_movie_flow_class::advance_status stat;
47    stat=current_movie->advance_movie_with_time();
48    if (stat==g1_movie_flow_class::DONE)
49    {
50      movie_in_progress=i4_F;
51      return i4_F;
52    }
53
54    if (stat==g1_movie_flow_class::NEXT_SCENE)
55    {
56      g1_object_class *o[G1_MAX_OBJECTS];
57      int t=make_object_list(o,G1_MAX_OBJECTS);
58 
59      for (int i=0; i<t; i++)
60        o[i]->request_think();
61    }
62    return i4_T;
63  }
64  else
65    return i4_F;
66}
Note: See TracBrowser for help on using the repository browser.