misc/liblua/ltm.h
author Wuzzy <Wuzzy2@mail.ru>
Mon, 07 Oct 2019 14:18:31 +0200
changeset 15442 6031c0cfec89
parent 10017 de822cd3df3a
permissions -rw-r--r--
Make sure AI doesn't skip after collecting ammo. Fixes bug #796
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2812
0a24853de796 add liblua to sources for macosx
koda
parents:
diff changeset
     1
/*
0a24853de796 add liblua to sources for macosx
koda
parents:
diff changeset
     2
** $Id: ltm.h,v 2.6.1.1 2007/12/27 13:02:25 roberto Exp $
0a24853de796 add liblua to sources for macosx
koda
parents:
diff changeset
     3
** Tag methods
0a24853de796 add liblua to sources for macosx
koda
parents:
diff changeset
     4
** See Copyright Notice in lua.h
0a24853de796 add liblua to sources for macosx
koda
parents:
diff changeset
     5
*/
0a24853de796 add liblua to sources for macosx
koda
parents:
diff changeset
     6
0a24853de796 add liblua to sources for macosx
koda
parents:
diff changeset
     7
#ifndef ltm_h
0a24853de796 add liblua to sources for macosx
koda
parents:
diff changeset
     8
#define ltm_h
0a24853de796 add liblua to sources for macosx
koda
parents:
diff changeset
     9
0a24853de796 add liblua to sources for macosx
koda
parents:
diff changeset
    10
0a24853de796 add liblua to sources for macosx
koda
parents:
diff changeset
    11
#include "lobject.h"
0a24853de796 add liblua to sources for macosx
koda
parents:
diff changeset
    12
0a24853de796 add liblua to sources for macosx
koda
parents:
diff changeset
    13
0a24853de796 add liblua to sources for macosx
koda
parents:
diff changeset
    14
/*
0a24853de796 add liblua to sources for macosx
koda
parents:
diff changeset
    15
* WARNING: if you change the order of this enumeration,
0a24853de796 add liblua to sources for macosx
koda
parents:
diff changeset
    16
* grep "ORDER TM"
0a24853de796 add liblua to sources for macosx
koda
parents:
diff changeset
    17
*/
0a24853de796 add liblua to sources for macosx
koda
parents:
diff changeset
    18
typedef enum {
0a24853de796 add liblua to sources for macosx
koda
parents:
diff changeset
    19
  TM_INDEX,
0a24853de796 add liblua to sources for macosx
koda
parents:
diff changeset
    20
  TM_NEWINDEX,
0a24853de796 add liblua to sources for macosx
koda
parents:
diff changeset
    21
  TM_GC,
0a24853de796 add liblua to sources for macosx
koda
parents:
diff changeset
    22
  TM_MODE,
0a24853de796 add liblua to sources for macosx
koda
parents:
diff changeset
    23
  TM_EQ,  /* last tag method with `fast' access */
0a24853de796 add liblua to sources for macosx
koda
parents:
diff changeset
    24
  TM_ADD,
0a24853de796 add liblua to sources for macosx
koda
parents:
diff changeset
    25
  TM_SUB,
0a24853de796 add liblua to sources for macosx
koda
parents:
diff changeset
    26
  TM_MUL,
0a24853de796 add liblua to sources for macosx
koda
parents:
diff changeset
    27
  TM_DIV,
0a24853de796 add liblua to sources for macosx
koda
parents:
diff changeset
    28
  TM_MOD,
0a24853de796 add liblua to sources for macosx
koda
parents:
diff changeset
    29
  TM_POW,
0a24853de796 add liblua to sources for macosx
koda
parents:
diff changeset
    30
  TM_UNM,
0a24853de796 add liblua to sources for macosx
koda
parents:
diff changeset
    31
  TM_LEN,
0a24853de796 add liblua to sources for macosx
koda
parents:
diff changeset
    32
  TM_LT,
0a24853de796 add liblua to sources for macosx
koda
parents:
diff changeset
    33
  TM_LE,
0a24853de796 add liblua to sources for macosx
koda
parents:
diff changeset
    34
  TM_CONCAT,
0a24853de796 add liblua to sources for macosx
koda
parents:
diff changeset
    35
  TM_CALL,
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 2812
diff changeset
    36
  TM_N      /* number of elements in the enum */
2812
0a24853de796 add liblua to sources for macosx
koda
parents:
diff changeset
    37
} TMS;
0a24853de796 add liblua to sources for macosx
koda
parents:
diff changeset
    38
0a24853de796 add liblua to sources for macosx
koda
parents:
diff changeset
    39
0a24853de796 add liblua to sources for macosx
koda
parents:
diff changeset
    40
0a24853de796 add liblua to sources for macosx
koda
parents:
diff changeset
    41
#define gfasttm(g,et,e) ((et) == NULL ? NULL : \
0a24853de796 add liblua to sources for macosx
koda
parents:
diff changeset
    42
  ((et)->flags & (1u<<(e))) ? NULL : luaT_gettm(et, e, (g)->tmname[e]))
0a24853de796 add liblua to sources for macosx
koda
parents:
diff changeset
    43
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 2812
diff changeset
    44
#define fasttm(l,et,e)  gfasttm(G(l), et, e)
2812
0a24853de796 add liblua to sources for macosx
koda
parents:
diff changeset
    45
0a24853de796 add liblua to sources for macosx
koda
parents:
diff changeset
    46
LUAI_DATA const char *const luaT_typenames[];
0a24853de796 add liblua to sources for macosx
koda
parents:
diff changeset
    47
0a24853de796 add liblua to sources for macosx
koda
parents:
diff changeset
    48
0a24853de796 add liblua to sources for macosx
koda
parents:
diff changeset
    49
LUAI_FUNC const TValue *luaT_gettm (Table *events, TMS event, TString *ename);
0a24853de796 add liblua to sources for macosx
koda
parents:
diff changeset
    50
LUAI_FUNC const TValue *luaT_gettmbyobj (lua_State *L, const TValue *o,
0a24853de796 add liblua to sources for macosx
koda
parents:
diff changeset
    51
                                                       TMS event);
0a24853de796 add liblua to sources for macosx
koda
parents:
diff changeset
    52
LUAI_FUNC void luaT_init (lua_State *L);
0a24853de796 add liblua to sources for macosx
koda
parents:
diff changeset
    53
0a24853de796 add liblua to sources for macosx
koda
parents:
diff changeset
    54
#endif