Definition in file graffiti.h.
#include "globals.h"
Go to the source code of this file.
Functions | |
| DLLIMPORT short | level_free_graffiti (struct LEVEL *lvl) |
| Frees the whole graffiti structure. | |
| DLLIMPORT int | place_graffiti_on_slab (struct COLUMN_REC *clm_recs[9], struct LEVEL *lvl, int tx, int ty) |
| Draws graffiti on given columns array. | |
| DLLIMPORT unsigned int | get_graffiti_count (struct LEVEL *lvl) |
| Gets amount of graffitties in the level. | |
| DLLIMPORT struct DK_GRAFFITI * | get_graffiti (struct LEVEL *lvl, int graf_idx) |
| Gets the graffiti structure for given graffiti index. | |
| DLLIMPORT char * | get_graffiti_text (struct LEVEL *lvl, unsigned int num) |
| Gets text message of graffiti with given index. | |
| DLLIMPORT int | graffiti_idx (struct LEVEL *lvl, int tx, int ty) |
| Searches for graffiti at given tile and returns its index. | |
| DLLIMPORT int | graffiti_idx_next (struct LEVEL *lvl, int tx, int ty, int prev_idx) |
| Searches for next graffiti at given tile and returns its index. | |
| DLLIMPORT struct DK_GRAFFITI * | create_graffiti (int tx, int ty, char *text, const struct LEVEL *lvl, int orient) |
| Creates a new graffiti and fills its all properties. | |
| DLLIMPORT int | graffiti_add_obj (struct LEVEL *lvl, struct DK_GRAFFITI *graf) |
| Adds graffiti object to level data, without filling the graffiti nor updating slabs. | |
| DLLIMPORT int | graffiti_add (struct LEVEL *lvl, int tx, int ty, int height, char *text, int font, unsigned short orient, unsigned short cube) |
| Creates and adds graffiti to the level. | |
| DLLIMPORT void | graffiti_del (struct LEVEL *lvl, unsigned int num) |
| Deletes graffiti with given index. | |
| DLLIMPORT short | place_graffiti_on_column (struct COLUMN_REC *clm_rec, unsigned short font, unsigned short height, char *text, int graf_subtl, unsigned short cube) |
| Places graffiti on side of given column. | |
| DLLIMPORT short | place_graffiti_on_clm_top (struct COLUMN_REC *clm_rec, unsigned short font, unsigned short height, char *text, int graf_subtl, int graf_subtl_h, unsigned short cube) |
| Places graffiti on top of given column. | |
| DLLIMPORT int | compute_graffiti_subtl_length (unsigned short font, char *text) |
| Computes graffiti text length in subtiles, for given font. | |
| DLLIMPORT void | graffiti_update_columns (struct LEVEL *lvl, int graf_idx) |
| Updates CLM entries to make the graffiti visible. | |
| DLLIMPORT void | graffiti_clear_from_columns (struct LEVEL *lvl, int graf_idx) |
| Updates CLM entries, removing graffiti from them. | |
| DLLIMPORT short | set_graffiti_orientation (struct DK_GRAFFITI *graf, const struct LEVEL *lvl, unsigned short orient) |
| Sets orientation of given graffiti, updating its dimensions and height. | |
| DLLIMPORT int | set_graffiti_height (struct DK_GRAFFITI *graf, int height) |
| Sets new height to the graffiti. | |
| DLLIMPORT int | get_graffiti_cube_height (unsigned short font, char *text) |
| Returns graffiti text height in subtiles, for given font. | |
| DLLIMPORT const unsigned char * | get_font_char (unsigned short font, char chr) |
| Returns graffiti character for given font. | |
Variables | |
| const unsigned char | font_any_chnull [] |
| const unsigned char * | font_adiclssc_chars [] |
| const int | font_adiclssc_height |
| const unsigned char * | font_adisize8_chars [] |
| const int | font_adisize8_height |
| DLLIMPORT int compute_graffiti_subtl_length | ( | unsigned short | font, | |
| char * | text | |||
| ) |
Computes graffiti text length in subtiles, for given font.
| font | Graffiti font, from GRAFFITI_FONT enumeration. | |
| text | The graffiti message text. |
Definition at line 434 of file graffiti.c.
Referenced by place_graffiti_on_slab().
| DLLIMPORT struct DK_GRAFFITI* create_graffiti | ( | int | tx, | |
| int | ty, | |||
| char * | text, | |||
| const struct LEVEL * | lvl, | |||
| int | orient | |||
| ) | [read] |
Creates a new graffiti and fills its all properties.
The graffiti is not added to LEVEL structure.
| tx | Map tile coordinate, in range 0-MAP_MAXINDEX_X. | |
| ty | Map tile coordinate, in range 0-MAP_MAXINDEX_Y. | |
| text | The message text which is duplicated into graffiti. | |
| lvl | Pointer to the LEVEL structure. | |
| orient | Graffiti orientation, from GRAFFITI_ORIENT enumeration. |
Definition at line 138 of file graffiti.c.
Referenced by graffiti_add().
| DLLIMPORT const unsigned char* get_font_char | ( | unsigned short | font, | |
| char | chr | |||
| ) |
Returns graffiti character for given font.
| font | Graffiti font, from GRAFFITI_FONT enumeration. | |
| chr | The text character. |
Definition at line 490 of file graffiti.c.
Referenced by compute_graffiti_subtl_length(), place_graffiti_on_clm_top(), place_graffiti_on_column(), and set_graffiti_orientation().
| DLLIMPORT struct DK_GRAFFITI* get_graffiti | ( | struct LEVEL * | lvl, | |
| int | graf_idx | |||
| ) | [read] |
Gets the graffiti structure for given graffiti index.
| lvl | Pointer to the LEVEL structure. | |
| graf_idx | Graffiti index. |
Definition at line 422 of file graffiti.c.
Referenced by graffiti_clear_from_columns(), graffiti_update_columns(), and place_graffiti_on_slab().
| DLLIMPORT unsigned int get_graffiti_count | ( | struct LEVEL * | lvl | ) |
Gets amount of graffitties in the level.
| lvl | Pointer to the LEVEL structure. |
Definition at line 410 of file graffiti.c.
Referenced by get_level_objstats_textln().
| DLLIMPORT int get_graffiti_cube_height | ( | unsigned short | font, | |
| char * | text | |||
| ) |
Returns graffiti text height in subtiles, for given font.
| font | Graffiti font, from GRAFFITI_FONT enumeration. | |
| text | The graffiti message text. |
Definition at line 469 of file graffiti.c.
Referenced by place_graffiti_on_slab(), set_graffiti_height(), and set_graffiti_orientation().
| DLLIMPORT char* get_graffiti_text | ( | struct LEVEL * | lvl, | |
| unsigned int | num | |||
| ) |
Gets text message of graffiti with given index.
| lvl | Pointer to the LEVEL structure. | |
| num | Graffiti index. |
Definition at line 90 of file graffiti.c.
| DLLIMPORT int graffiti_add | ( | struct LEVEL * | lvl, | |
| int | tx, | |||
| int | ty, | |||
| int | height, | |||
| char * | text, | |||
| int | font, | |||
| unsigned short | orient, | |||
| unsigned short | cube | |||
| ) |
Creates and adds graffiti to the level.
| lvl | Pointer to the LEVEL structure. | |
| tx | Map tile coordinate, in range 0-MAP_MAXINDEX_X. | |
| ty | Map tile coordinate, in range 0-MAP_MAXINDEX_Y. | |
| height | Graffiti height. | |
| text | The graffiti message text. | |
| font | Graffiti font, from GRAFFITI_FONT enumeration. | |
| orient | Graffiti orientation, from GRAFFITI_ORIENT enumeration. | |
| cube | Index of the cube used to draw graffiti text. |
Definition at line 346 of file graffiti.c.
Referenced by execute_adikted_command().
| DLLIMPORT int graffiti_add_obj | ( | struct LEVEL * | lvl, | |
| struct DK_GRAFFITI * | graf | |||
| ) |
Adds graffiti object to level data, without filling the graffiti nor updating slabs.
| lvl | Pointer to the LEVEL structure. | |
| graf | Pointer to the DK_GRAFFITI structure to add. |
Definition at line 167 of file graffiti.c.
Referenced by graffiti_add().
| DLLIMPORT void graffiti_clear_from_columns | ( | struct LEVEL * | lvl, | |
| int | graf_idx | |||
| ) |
Updates CLM entries, removing graffiti from them.
This makes the graffiti invisuble and ready to be deleted.
| lvl | Pointer to the LEVEL structure. | |
| graf_idx | Graffiti index. |
Definition at line 384 of file graffiti.c.
| DLLIMPORT void graffiti_del | ( | struct LEVEL * | lvl, | |
| unsigned int | num | |||
| ) |
Deletes graffiti with given index.
The graffiti is removed from structure, and its memory is freed. Level graphics is not updated by this function.
| lvl | Pointer to the LEVEL structure. | |
| num | Graffiti index. |
Definition at line 104 of file graffiti.c.
| DLLIMPORT int graffiti_idx | ( | struct LEVEL * | lvl, | |
| int | tx, | |||
| int | ty | |||
| ) |
Searches for graffiti at given tile and returns its index.
| lvl | Pointer to the LEVEL structure. | |
| tx,ty | Map tile coordinates. |
Definition at line 51 of file graffiti.c.
Referenced by slab_has_custom_columns(), and update_custom_columns_for_slab().
| DLLIMPORT int graffiti_idx_next | ( | struct LEVEL * | lvl, | |
| int | tx, | |||
| int | ty, | |||
| int | prev_idx | |||
| ) |
Searches for next graffiti at given tile and returns its index.
| lvl | Pointer to the LEVEL structure. | |
| tx | Map tile coordinate, in range 0-MAP_MAXINDEX_X. | |
| ty | Map tile coordinate, in range 0-MAP_MAXINDEX_Y. | |
| prev_idx | index if the graffiti previously found. To get first graffiti, prev_idx must be -1. |
Definition at line 66 of file graffiti.c.
Referenced by graffiti_idx(), and place_graffiti_on_slab().
| DLLIMPORT void graffiti_update_columns | ( | struct LEVEL * | lvl, | |
| int | graf_idx | |||
| ) |
Updates CLM entries to make the graffiti visible.
| lvl | Pointer to the LEVEL structure. | |
| graf_idx | Graffiti index. |
Definition at line 369 of file graffiti.c.
| DLLIMPORT short level_free_graffiti | ( | struct LEVEL * | lvl | ) |
Frees the whole graffiti structure.
| lvl | Pointer to the LEVEL structure. |
Definition at line 32 of file graffiti.c.
Referenced by level_free().
| DLLIMPORT short place_graffiti_on_clm_top | ( | struct COLUMN_REC * | clm_rec, | |
| unsigned short | font, | |||
| unsigned short | height, | |||
| char * | text, | |||
| int | graf_subtl, | |||
| int | graf_subtl_h, | |||
| unsigned short | cube | |||
| ) |
Places graffiti on top of given column.
| clm_rec | Comumn entry struct pointer. | |
| font | Graffiti font, from GRAFFITI_FONT enumeration. | |
| height | Graffiti height. | |
| text | The graffiti message text. | |
| graf_subtl | The subtile at which we're placing. | |
| graf_subtl_h | The subtile at which we're placing, on height. | |
| cube | Index of the cube to place as graffiti. |
Definition at line 605 of file graffiti.c.
Referenced by place_graffiti_on_slab().
| DLLIMPORT short place_graffiti_on_column | ( | struct COLUMN_REC * | clm_rec, | |
| unsigned short | font, | |||
| unsigned short | height, | |||
| char * | text, | |||
| int | graf_subtl, | |||
| unsigned short | cube | |||
| ) |
Places graffiti on side of given column.
| clm_rec | Comumn entry struct pointer. | |
| font | Graffiti font, from GRAFFITI_FONT enumeration. | |
| height | Graffiti height. | |
| text | The graffiti message text. | |
| graf_subtl | The subtile at which we're placing. | |
| cube | Index of the cube to place as graffiti. |
Definition at line 654 of file graffiti.c.
Referenced by place_graffiti_on_slab().
| DLLIMPORT int place_graffiti_on_slab | ( | struct COLUMN_REC * | clm_recs[9], | |
| struct LEVEL * | lvl, | |||
| int | tx, | |||
| int | ty | |||
| ) |
Draws graffiti on given columns array.
| clm_recs | Comumn entries array. | |
| lvl | Pointer to the LEVEL structure. | |
| tx | Map tile coordinate, in range 0-MAP_MAXINDEX_X. | |
| ty | Map tile coordinate, in range 0-MAP_MAXINDEX_Y. |
Definition at line 511 of file graffiti.c.
Referenced by update_custom_columns_for_slab().
| DLLIMPORT int set_graffiti_height | ( | struct DK_GRAFFITI * | graf, | |
| int | height | |||
| ) |
Sets new height to the graffiti.
Makes sure the parameter will be in appropiate range.
| graf | Pointer to the DK_GRAFFITI structure to update. | |
| height | New graffiti height. |
Definition at line 308 of file graffiti.c.
| DLLIMPORT short set_graffiti_orientation | ( | struct DK_GRAFFITI * | graf, | |
| const struct LEVEL * | lvl, | |||
| unsigned short | orient | |||
| ) |
Sets orientation of given graffiti, updating its dimensions and height.
Graffiti don't have to be in the LEVEL structure, but must have tx,ty,font and text properties set.
| graf | Pointer to the DK_GRAFFITI structure to update. | |
| lvl | Pointer to the LEVEL structure. | |
| orient | New graffiti orientation, from GRAFFITI_ORIENT enumeration. |
Definition at line 193 of file graffiti.c.
Referenced by create_graffiti().
| const unsigned char* font_adiclssc_chars[] |
| const int font_adiclssc_height |
| const unsigned char* font_adisize8_chars[] |
| const int font_adisize8_height |
| const unsigned char font_any_chnull[] |
1.5.6