Mercurial > MadButterfly
comparison tools/mb_c_header.m4 @ 210:3fadd2f2742e
M4 macros to generate code for dynamic loading.
- Introduce sprite.
- Add mb_sprite_t and mb_sprite_lsym_t
- mb_sprite_lsym_t is sprite with symbol that searched with linear search.
- Add mb_sprite_lsym_t as first member variable of sprite.
- Add symbol table to generated C code.
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Fri, 12 Dec 2008 00:33:54 +0800 |
parents | 6ce68c1f7405 |
children | 104d83378582 |
comparison
equal
deleted
inserted
replaced
209:6f63aa67ed83 | 210:3fadd2f2742e |
---|---|
38 define([RECT_HIDE],) | 38 define([RECT_HIDE],) |
39 define([COORD_TRANSLATE],) | 39 define([COORD_TRANSLATE],) |
40 define([COORD_MATRIX],) | 40 define([COORD_MATRIX],) |
41 define([SHAPE_TRANSLATE],) | 41 define([SHAPE_TRANSLATE],) |
42 define([SHAPE_MATRIX],) | 42 define([SHAPE_MATRIX],) |
43 define([ADD_SYMBOL],) | |
43 | 44 |
44 define([MADBUTTERFLY],[dnl | 45 define([MADBUTTERFLY],[dnl |
45 [#ifndef __$1_H_ | 46 [#ifndef __$1_H_ |
46 #define __$1_H_ | 47 #define __$1_H_ |
47 | 48 |
48 typedef struct $1 $1_t; | 49 typedef struct $1 $1_t; |
49 | 50 |
50 struct $1 { | 51 struct $1 { |
52 mb_sprite_lsym_t lsym; | |
51 redraw_man_t *rdman; | 53 redraw_man_t *rdman; |
52 coord_t *root_coord;] | 54 coord_t *root_coord;] |
53 $2[]dnl | 55 $2[]dnl |
54 [}; | 56 [}; |
55 | 57 |