• R/O
  • SSH
  • HTTPS

marathon: コミット


コミットメタ情報

リビジョン487 (tree)
日時2009-03-28 15:56:22
作者ookawa_mi

ログメッセージ

*** empty log message ***

変更サマリ

  • delete: marathon/trunk/AlephOneJP/RenderOther/screen_drawing.h

差分

--- marathon/trunk/AlephOneJP/RenderOther/screen_drawing.h (revision 486)
+++ marathon/trunk/AlephOneJP/RenderOther/screen_drawing.h (nonexistent)
@@ -1,181 +0,0 @@
1-#ifndef __SCREEN_DRAWING_H
2-#define __SCREEN_DRAWING_H
3-
4-/*
5- SCREEN_DRAWING.H
6-
7- Copyright (C) 1991-2001 and beyond by Bungie Studios, Inc.
8- and the "Aleph One" developers.
9-
10- This program is free software; you can redistribute it and/or modify
11- it under the terms of the GNU General Public License as published by
12- the Free Software Foundation; either version 2 of the License, or
13- (at your option) any later version.
14-
15- This program is distributed in the hope that it will be useful,
16- but WITHOUT ANY WARRANTY; without even the implied warranty of
17- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18- GNU General Public License for more details.
19-
20- This license is contained in the file "COPYING",
21- which is included with this source code; it is available online at
22- http://www.gnu.org/licenses/gpl.html
23-
24- Monday, August 15, 1994 3:11:38 PM
25-
26-Apr 21, 2000 (Loren Petrich): Added XML parser object for the rectangle set,
27- and exporting color data for game_window color parser
28-
29-Jul 2, 2000 (Loren Petrich):
30- The HUD is now always buffered
31-*/
32-
33-#include "XML_ElementParser.h"
34-#include "shape_descriptors.h"
35-
36-/* Rectangles for the interface, etc.. */
37-/* rectangle id's */
38-enum {
39- /* game window rectangles */
40- _player_name_rect= 0,
41- _oxygen_rect,
42- _shield_rect,
43- _motion_sensor_rect,
44- _microphone_rect,
45- _inventory_rect,
46- _weapon_display_rect,
47-
48- /* interface rectangles */
49- _new_game_button_rect,
50- _load_game_button_rect,
51- _gather_button_rect,
52- _join_button_rect,
53- _prefs_button_rect,
54- _replay_last_button_rect,
55- _save_last_button_rect,
56- _replace_saved_button_rect,
57- _credits_button_rect,
58- _quit_button_rect,
59- _center_button_rect,
60- _singleton_game_button_rect,
61- NUMBER_OF_INTERFACE_RECTANGLES
62-};
63-
64-/* Colors for drawing.. */
65-enum {
66- _energy_weapon_full_color,
67- _energy_weapon_empty_color,
68- _black_color,
69- _inventory_text_color,
70- _inventory_header_background_color,
71- _inventory_background_color,
72- PLAYER_COLOR_BASE_INDEX,
73-
74- _white_color= 14,
75- _invalid_weapon_color,
76- _computer_border_background_text_color,
77- _computer_border_text_color,
78- _computer_interface_text_color,
79- _computer_interface_color_purple,
80- _computer_interface_color_red,
81- _computer_interface_color_pink,
82- _computer_interface_color_aqua,
83- _computer_interface_color_yellow,
84- _computer_interface_color_brown,
85- _computer_interface_color_blue
86-};
87-
88-enum { /* justification flags for _draw_screen_text */
89- _no_flags,
90- _center_horizontal= 0x01,
91- _center_vertical= 0x02,
92- _right_justified= 0x04,
93- _top_justified= 0x08,
94- _bottom_justified= 0x10,
95- _wrap_text= 0x20
96-};
97-
98-enum { /* Fonts for the interface et al.. */
99- _interface_font,
100- _weapon_name_font,
101- _player_name_font,
102- _interface_item_count_font,
103- _computer_interface_font,
104- _computer_interface_title_font,
105- _net_stats_font,
106- NUMBER_OF_INTERFACE_FONTS
107-};
108-
109-/* Structure for portable rectangles. notice it is exactly same as Rect */
110-struct screen_rectangle {
111- short top, left;
112- short bottom, right;
113-};
114-typedef struct screen_rectangle screen_rectangle;
115-
116-/* ------- Prototypes */
117-void initialize_screen_drawing(void);
118-
119-void _set_port_to_screen_window(void);
120-void _set_port_to_gworld(void);
121-void _restore_port(void);
122-#if defined SDL
123-void _set_port_to_term(void);
124-#endif
125-
126-/* If source==NULL, source= the shapes bounding rectangle */
127-void _draw_screen_shape(shape_descriptor shape_id, screen_rectangle *destination,
128- screen_rectangle *source);
129-void _draw_screen_shape_at_x_y(shape_descriptor shape, short x, short y);
130-void _draw_screen_shape_centered(shape_descriptor shape, screen_rectangle *rectangle,
131- short flags);
132-void _draw_screen_text(const char *text, screen_rectangle *destination,
133- short flags, short font_id, short text_color);
134-short _text_width(const char *buffer, short font_id);
135-short _text_width(const char *buffer, int start, int length, short font_id);
136-
137-void _erase_screen(short color_index);
138-
139-void _scroll_window(short dy, short rectangle_id, short background_color_index);
140-
141-void _fill_screen_rectangle(screen_rectangle *rectangle, short color_index);
142-
143-screen_rectangle *get_interface_rectangle(short index);
144-const rgb_color &get_interface_color(short index);
145-class FontSpecifier;
146-FontSpecifier &get_interface_font(short index);
147-
148-short _get_font_line_height(short font_index);
149-
150-void _fill_rect(screen_rectangle *rectangle, short color_index);
151-
152-void _frame_rect(screen_rectangle *rectangle, short color_index);
153-
154-// LP addition: stuff to use a buffer for the Heads-Up Display
155-void _set_port_to_HUD();
156-
157-// LP addition: get the parser for the interface rectangles
158-XML_ElementParser *InterfaceRectangles_GetParser();
159-
160-// Makes the color and font parsers use screen-drawing stuff
161-void SetColorFontParserToScreenDrawing();
162-
163-#ifdef SDL
164-class sdl_font_info;
165-struct world_point2d;
166-extern int draw_text(SDL_Surface *s, const char *text, size_t length, int x, int y, uint32 pixel, const sdl_font_info *font, uint16 style);
167-extern int8 char_width(uint8 c, const sdl_font_info *font, uint16 style);
168-extern uint16 text_width(const char *text, const sdl_font_info *font, uint16 style);
169-extern uint16 text_width(const char *text, size_t length, const sdl_font_info *font, uint16 style);
170-extern int trunc_text(const char *text, int max_width, const sdl_font_info *font, uint16 style);
171-extern void draw_polygon(SDL_Surface *s, const world_point2d *vertex_array, int vertex_count, uint32 pixel);
172-extern void draw_line(SDL_Surface *s, const world_point2d *v1, const world_point2d *v2, uint32 pixel, int pen_size);
173-extern void draw_rectangle(SDL_Surface *s, const SDL_Rect *r, uint32 pixel);
174-
175-static inline int draw_text(SDL_Surface *s, const char *text, int x, int y, uint32 pixel, const sdl_font_info *font, uint16 style)
176-{
177- return draw_text(s, text, strlen(text), x, y, pixel, font, style);
178-}
179-#endif
180-
181-#endif
旧リポジトリブラウザで表示