Add place_entrance_hex
This commit is contained in:
parent
30a3bf9b71
commit
0d83cff24e
|
@ -48,6 +48,9 @@ typedef enum ScienceRepairTargetType {
|
|||
// 0x5106D0
|
||||
static bool _action_in_explode = false;
|
||||
|
||||
// 0x5106D4
|
||||
int rotation;
|
||||
|
||||
// 0x5106E0
|
||||
static const int gNormalDeathAnimations[DAMAGE_TYPE_COUNT] = {
|
||||
ANIM_DANCING_AUTOFIRE,
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
|
||||
namespace fallout {
|
||||
|
||||
extern int rotation;
|
||||
|
||||
int _action_attack(Attack* attack);
|
||||
int _action_use_an_item_on_object(Object* a1, Object* a2, Object* a3);
|
||||
int _action_use_an_object(Object* a1, Object* a2);
|
||||
|
|
|
@ -1,13 +1,17 @@
|
|||
#include "mapper/map_func.h"
|
||||
|
||||
#include "actions.h"
|
||||
#include "color.h"
|
||||
#include "game_mouse.h"
|
||||
#include "input.h"
|
||||
#include "map.h"
|
||||
#include "memory.h"
|
||||
#include "mouse.h"
|
||||
#include "proto.h"
|
||||
#include "svga.h"
|
||||
#include "tile.h"
|
||||
#include "window_manager.h"
|
||||
#include "window_manager_private.h"
|
||||
|
||||
namespace fallout {
|
||||
|
||||
|
@ -26,6 +30,32 @@ void copy_proto_lists()
|
|||
// TODO: Incomplete.
|
||||
}
|
||||
|
||||
// 0x482708
|
||||
void place_entrance_hex()
|
||||
{
|
||||
int x;
|
||||
int y;
|
||||
int tile;
|
||||
|
||||
while (inputGetInput() != -2) {
|
||||
}
|
||||
|
||||
if ((mouseGetEvent() & MOUSE_EVENT_LEFT_BUTTON_DOWN) != 0) {
|
||||
if (_mouse_click_in(0, 0, _scr_size.right - _scr_size.left, _scr_size.bottom - _scr_size.top - 100)) {
|
||||
mouseGetPosition(&x, &y);
|
||||
|
||||
tile = tileFromScreenXY(x, y, gElevation);
|
||||
if (tile != -1) {
|
||||
if (tileSetCenter(tile, TILE_SET_CENTER_FLAG_IGNORE_SCROLL_RESTRICTIONS) == 0) {
|
||||
mapSetEnteringLocation(tile, gElevation, rotation);
|
||||
} else {
|
||||
win_timed_msg("ERROR: Entrance out of range!", _colorTable[31744]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 0x4841C4
|
||||
void pick_region(Rect* rect)
|
||||
{
|
||||
|
|
|
@ -7,6 +7,7 @@ namespace fallout {
|
|||
|
||||
void setup_map_dirs();
|
||||
void copy_proto_lists();
|
||||
void place_entrance_hex();
|
||||
void pick_region(Rect* rect);
|
||||
void sort_rect(Rect* a, Rect* b);
|
||||
void draw_rect(Rect* rect, unsigned char color);
|
||||
|
|
Loading…
Reference in New Issue