World of Might and Magic
0.2.0
Open reimplementation of Might and Magic 6 7 8 game engine
|
См. документацию.
25 void DrawBook_Map_sub(
unsigned int tl_x,
unsigned int tl_y,
unsigned int br_x,
int br_y,
int dummy);
58 {{ui_book_button1_on}});
62 {{ui_book_button2_on}});
159 render->ResetUIClipRect();
180 void DrawBook_Map_sub(
unsigned int tl_x,
unsigned int tl_y,
unsigned int br_x,
int br_y,
int dummy) {
181 int ScreenCenterX = (
signed int)(tl_x + br_x) / 2;
182 int ScreenCenterY = (
signed int)(tl_y + br_y) / 2;
183 render->SetUIClipRect(tl_x, tl_y, br_x, br_y);
194 int screenWidth = br_x - tl_x + 1;
195 int screenHeight = br_y - tl_y + 1;
199 double MapSizeScale = (double)(1 << (16 - loc_power));
201 (
unsigned int)(
signed __int64)
203 int stepY_r = (int)(
signed __int64)
205 int scaled_posY = stepY_r >> 16;
207 static Texture *minimaptemp =
nullptr;
218 for (
uint i = 0; i < screenHeight; ++i) {
219 int map_tile_Y = (scaled_posY - 80) / 4;
220 int stepX_r = stepX_r_resets;
221 for (
uint j = 0; j < screenWidth; ++j) {
222 int scaled_posX = stepX_r >> 16;
223 int map_tile_X = (scaled_posX - 80) / 4;
227 if (!((i + ScreenCenterX + j) % 2))
228 minitempix[j + i * screenWidth] =
Color32(12, 12, 12);
230 minitempix[j + i * screenWidth] = minimap_pixels[scaled_posX + scaled_posY * textr_width];
232 minitempix[j + i * screenWidth] =
Color32(0, 0, 0);
235 minitempix[j + i * screenWidth] = minimap_pixels[scaled_posX + scaled_posY * textr_width];
237 stepX_r += scale_increment;
239 stepY_r += scale_increment;
240 scaled_posY = stepY_r >> 16;
244 render->Update_Texture(minimaptemp);
245 render->DrawTextureAlphaNew(tl_x / 640., tl_y / 480., minimaptemp);
247 unsigned int Colour_Black =
Color16(0, 0, 0);
270 render->RasterLine2D(linex, liney, linez, linew, Colour_Black);
282 if (ArrowXPos >= (
signed int)tl_x) {
283 if (ArrowXPos > (
signed int)br_x) {
284 if ((
signed int)(ArrowXPos - 3) > (
signed int)br_x) DrawArrow = 0;
288 if ((
signed int)(ArrowXPos + 3) < (
signed int)tl_x) DrawArrow = 0;
292 if (ArrowYPos >= (
signed int)tl_y) {
293 if (ArrowYPos > br_y) {
294 if ((ArrowYPos - 3) > br_y) DrawArrow = 0;
298 if ((ArrowYPos + 3) < (
signed int)tl_y) DrawArrow = 0;
302 if (DrawArrow == 1) {
305 if ((
signed int)PartyDirection <= 1920) ArrowOctant = 6;
306 if ((
signed int)PartyDirection < 1664) ArrowOctant = 5;
307 if ((
signed int)PartyDirection <= 1408) ArrowOctant = 4;
308 if ((
signed int)PartyDirection < 1152) ArrowOctant = 3;
309 if ((
signed int)PartyDirection <= 896) ArrowOctant = 2;
310 if ((
signed int)PartyDirection < 640) ArrowOctant = 1;
311 if ((
signed int)PartyDirection <= 384) ArrowOctant = 0;
312 if ((
signed int)PartyDirection < 128 || (
signed int)PartyDirection > 1920) ArrowOctant = 7;
326 render->RasterLine2D(decxpos - 1, decypos - 1, decxpos - 1, decypos + 1,
Color16(0xFFu, 0xFFu, 0xFFu));
327 render->RasterLine2D(decxpos, decypos - 1, decxpos, decypos + 1,
Color16(0xFFu, 0xFFu, 0xFFu));
328 render->RasterLine2D(decxpos + 1, decypos - 1, decxpos + 1, decypos + 1,
Color16(0xFFu, 0xFFu, 0xFFu));
330 render->RasterLine2D(decxpos, decypos, decxpos, decypos,
Color16(0xFF, 0xFF, 0xFF));
345 unsigned int pX = mouse_x;
346 unsigned int pY = mouse_y;
350 int global_coord_X = (__int64)((
double)(pX - 229.) *
v0 + (double)v20);
351 int global_coord_Y = (__int64)((
double)v21 - (double)(pY - 181.) *
v0);
357 int map_tile_X = abs(global_coord_X + 22528) / 512;
358 int map_tile_Y = abs(global_coord_Y - 22528) / 512;
368 if (
face.sCogTriggeredID) {
369 if (!(
face.uAttributes & FACE_HAS_EVENT)) {
GLenum GLuint GLint GLenum face
uint32_t int_get_vector_length(int32_t x, int32_t y, int32_t z)
const char * GetString(unsigned int index) const
std::array< LevelDecoration, 3000 > pLevelDecorations
static const unsigned int uDoublePiMask
Image * ui_exit_cancel_button_background
bool IsMapCellPartiallyRevealed(signed int a2, signed int a3)
Image * ui_book_button6_off
class Image * location_minimap
GUIButton * CreateButton(int x, int y, int width, int height, int a6, int a7, UIMessageType msg, unsigned int msg_param, uint8_t hotkey, const String &label, const std::vector< Image * > &textures=std::vector< Image * >())
Image * ui_book_button4_off
Image * ui_book_button5_off
MAP_TYPE GetMapInfo(const String &Str2)
Image * ui_book_button1_on
unsigned int ui_book_map_coordinates_color
void PlaySound(SoundID eSoundID, int pid, unsigned int uNumRepeats, int x, int y, int a7)
unsigned int game_viewport_width
Image * ui_book_button3_off
Localization * localization
uint32_t Color32(uint16_t color16)
void DrawTitleText(GUIFont *font, int horizontal_margin, int vertical_margin, unsigned __int16 uDefaultColor, const char *pInString, int line_spacing)
bool IsMapCellFullyRevealed(signed int a2, signed int a3)
unsigned int game_viewport_height
struct MapStats * pMapStats
static int GetWidthLn2(Image *img)
Image * ui_book_button6_on
@ LEVEL_DECORATION_VISIBLE_ON_MAP
Image * ui_book_button5_on
std::array< Image *, 8 > game_ui_minimap_dirs
struct ViewingParams * viewparams
Image * ui_book_button2_on
char * GetEventHintString(unsigned int uEventID)
Texture * GetImage_ColorKey(const String &name, uint16_t colorkey)
Image * ui_book_button4_on
unsigned int uFrameHeight
BLVMapOutlines * pMapOutlines
void StopChannels(int uStartChannel, int uEndChannel)
__int64 fixpoint_mul(int a1, int a2)
size_t uNumLevelDecorations
char _visible_outlines[875]
void DrawBook_Map_sub(unsigned int tl_x, unsigned int tl_y, unsigned int br_x, int br_y, int dummy)
unsigned int ui_book_map_title_color
Image * ui_book_button1_off
Image * ui_book_map_background
struct Viewport * pViewport
void CenterOnPartyZoomOut()
GUIWindow * pBooksButtonOverlay
BLVMapOutline pOutlines[7000]
Image * ui_book_button2_off
void BasicBookInitialization()
String FormatString(unsigned int index,...) const
std::vector< ODMFace > pFaces
Vec3_int_ vBoundingCenter
const void * GetPixels(IMAGE_FORMAT format)
struct stru193_math * stru_5C6E00
struct Vec3_short_ * pVertices
Texture * GetImage_Alpha(const String &name)
void CenterOnPartyZoomIn()
LEVEL_TYPE uCurrentlyLoadedLevelType
AudioPlayer * pAudioPlayer
@ SOUND_StartMainChoice02
uint16_t Color16(uint32_t r, uint32_t g, uint32_t b)
OutdoorLocation * pOutdoor
const char * GetMapBookHintText(int mouse_x, int mouse_y)
unsigned int uMapBookMapZoom
Image * ui_book_button3_on
std::shared_ptr< IRender > render
Image * ui_book_map_frame