~ubuntu-branches/ubuntu/trusty/enigma/trusty-proposed

« back to all changes in this revision

Viewing changes to src/enigma-lua.pkg

  • Committer: Package Import Robot
  • Author(s): Erich Schubert
  • Date: 2013-04-06 14:54:02 UTC
  • mfrom: (1.1.10)
  • Revision ID: package-import@ubuntu.com-20130406145402-jgjrtk7hac8gtvza
Tags: 1.20-dfsg.1-1
* New upstream release (Closes: #704595)
  (Repacked: dropped zipios++ source and main menu music)
* Update watch file, sf.net again.
* Fix documentation links (Closes: #653508)
* Conflict with enigma-level-previews to encourage deinstallation
  (Pregenerated level previews were only used with version 1.01)
* Use dh7 for building instead of CDBS
* Update to policy 3.9.4.0 (no changes)
* Register documentation with doc-base

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
//==================================================  -*- Mode: C++ -*-
2
 
// Copyright (C) 2002,2003,2004 Daniel Heck
3
 
//
4
 
// This program is free software; you can redistribute it and/or
5
 
// modify it under the terms of the GNU General Public License
6
 
// as published by the Free Software Foundation; either version 2
7
 
// of the License, or (at your option) any later version.
8
 
//
9
 
// This program is distributed in the hope that it will be useful,
10
 
// but WITHOUT ANY WARRANTY; without even the implied warranty of
11
 
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
 
// GNU General Public License for more details.
13
 
//
14
 
// You should have received a copy of the GNU General Public License along
15
 
// with this program; if not, write to the Free Software Foundation, Inc.,
16
 
// 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
17
 
//
18
 
// $Id: enigma-lua.pkg,v 1.25 2004/03/15 20:15:36 dheck Exp $
19
 
//======================================================================
20
 
 
21
 
 
22
 
/* -------------------- enigma.cc -------------------- */
23
 
 
24
 
$#include "server.hh"
25
 
$#include "world.hh"
26
 
$#include "lev/PersistentIndex.hh"
27
 
 
28
 
$using namespace enigma;
29
 
$using ecl::Surface;
30
 
$using ecl::Font;
31
 
 
32
 
module enigma
33
 
{
34
 
    enum Direction {NODIR, NORTH, EAST, SOUTH, WEST};
35
 
 
36
 
    Surface *GetImage(const char *name);
37
 
    Surface *GetImage(const char *name, const char *extension);
38
 
    Surface *LoadImage(const char *name);
39
 
    Surface *RegisterImage(const char *name, Surface *s);
40
 
    Font    *GetFont(const char *name);
41
 
 
42
 
    const char *date(const char *format); // format see 'man strftime'
43
 
}
44
 
 
45
 
/* -------------------- server.cc, lev/Index.cc -------------------- */
46
 
 
47
 
$using namespace server;
48
 
$using namespace lev;
49
 
module enigma
50
 
{
51
 
    extern int    TwoPlayerGame;
52
 
    extern int    SingleComputerGame;
53
 
    extern int    ConserveLevel;
54
 
    extern int    AllowTogglePlayer;
55
 
    extern int    ShowMoves;
56
 
    extern double Brittleness;
57
 
    extern double SlopeForce;
58
 
    extern double FlatForce;
59
 
    extern double FrictionFactor;
60
 
    extern double ElectricForce;
61
 
    extern double BumperForce;
62
 
    extern double MagnetForce;
63
 
    extern double MagnetRange;
64
 
    extern double WaterSinkSpeed;
65
 
    extern double SwampSinkSpeed;
66
 
    extern double WormholeForce;
67
 
    extern double WormholeRange;
68
 
    extern double HoleForce;
69
 
    extern bool   CreatingPreview;
70
 
 
71
 
    void AddLevelPack (const char *init_file, const char *name);
72
 
    void AddZippedLevelPack (const char *zipfile);
73
 
    void SetCompatibility(const char *version);
74
 
}
75
 
 
76
 
/* -------------------- world.cc, objects.cc -------------------- */
77
 
 
78
 
$using namespace enigma;
79
 
 
80
 
module world
81
 
{
82
 
    class Object;
83
 
    class Floor : public Object {};
84
 
    class Item : public Object {};
85
 
    class Stone : public Object {};
86
 
 
87
 
    Object *MakeObject(const char *kind);
88
 
    Floor *MakeFloor(const char *kind);
89
 
    Item *MakeItem(const char *kind);
90
 
    Stone *MakeStone(const char *kind);
91
 
 
92
 
    Object *GetNamedObject(const char *name);
93
 
 
94
 
    void Resize(int w, int h);
95
 
}
96
 
 
97
 
/* -------------------- video.cc -------------------- */
98
 
 
99
 
$#include "video.hh"
100
 
$using namespace video;
101
 
$using ecl::Screen;
102
 
 
103
 
module video
104
 
{
105
 
    Screen *GetScreen();
106
 
    void HideMouse();
107
 
    void ShowMouse();
108
 
}
109
 
 
110
 
/* -------------------- sound.cc -------------------- */
111
 
 
112
 
$#include "SoundEffectManager.hh"
113
 
$using namespace sound;
114
 
 
115
 
module sound
116
 
{
117
 
    // Note that EmitSound is defined in lua.cc, due to its object reference.
118
 
    void DefineSoundEffect(string table, string name, string filename,
119
 
                           double volume, bool loop, bool global, int priority,
120
 
                           double damp_max, double damp_inc, double damp_mult,
121
 
                           double damp_min, double damp_tick, string silence_string);
122
 
    void SetActiveSoundSet(string table);
123
 
}