Skip to content
Snippets Groups Projects
Commit 933f293c authored by dg's avatar dg
Browse files

fix

git-svn-id: http://svn.net-core.org/repos/t-engine4@4880 51575b47-30f0-44d4-a5cc-537603b46e54
parent 568716a7
No related branches found
No related tags found
No related merge requests found
......@@ -210,10 +210,10 @@ function _M:init()
-- Find the longest common substring and complete it
local substring = array[1]:sub(#to_complete+1)
for i=2,#array do
local min_len = math.min(#array[i], #substring)
for j=#to_complete,min_len do
if substring:sub(j, j) ~= array[i]:sub(j, j) then
substring = substring:sub(#to_complete+1, util.bound(j-1, 0))
local min_len = math.min(#array[i]-#to_complete, #substring)
for j=1,min_len do
if substring:sub(j, j) ~= array[i]:sub(#to_complete+j, #to_complete+j) then
substring = substring:sub(1, util.bound(j-1, 0))
break
end
end
......
......@@ -75,6 +75,8 @@ function _M:display(dispx, dispy)
local ox, oy = self.display_x, self.display_y
local sx, sy = game.level.map._map:getScroll()
sx = sx + game.level.map.display_x
sy = sy + game.level.map.display_y
self.display_x, self.display_y = dispx or sx or self.display_x, dispy or sy or self.display_y
-- self.cursor:toScreen(self.display_x + (self.target.x - game.level.map.mx) * self.tile_w * Map.zoom, self.display_y + (self.target.y - game.level.map.my) * self.tile_h * Map.zoom, self.tile_w * Map.zoom, self.tile_h * Map.zoom)
......
......@@ -314,6 +314,7 @@ function _M:display(nb_keyframes)
-- Minimap display
if game.level and game.level.map and not self.no_minimap then
local map = game.level.map
game.zone_name_s:toScreenFull(
map.display_x + map.viewport.width - game.zone_name_w - 15,
map.display_y + 5,
......
......@@ -27,15 +27,15 @@ local Separator = require "engine.ui.Separator"
module(..., package.seeall, class.inherit(Dialog))
function _M:init(l, w, force_height)
local text = util.getval(l.lore).."\n"
local list = text:splitLines(w - 10, self.font)
self.title_shadow = false
self.color = l.text_color or {r=0x3a, g=0x35, b=0x33}
self.ui = l.special_ui or "parchment"
Dialog.init(self, "Lore found: #0080FF#"..l.name, 1, 1)
FX FUCKING FONT SIZE!
local text = util.getval(l.lore).."\n"
local list = text:splitLines(w - 10, self.font)
if l.bloodstains then
local ovs = {}
......
......@@ -1079,6 +1079,8 @@ void fov_beam_any_angle(fov_settings_type *settings, void *map, void *source,
} else if (prev_blocked == 1) { \
line->step_x = signx target_slope / (INV_SQRT_3*target_slope + 1); \
line->step_y = signy 1 / (INV_SQRT_3*target_slope + 1); \
line->is_blocked = true; \
line->block_t = line->dest_t - delta - 1; \
return; \
} \
} else if (prev_blocked == 1) { \
......@@ -1092,6 +1094,8 @@ void fov_beam_any_angle(fov_settings_type *settings, void *map, void *source,
} else if (prev_blocked == 1) { \
line->step_x = signx target_slope / (INV_SQRT_3*target_slope + 1); \
line->step_y = signy 1 / (INV_SQRT_3*target_slope + 1); \
line->is_blocked = true; \
line->block_t = line->dest_t - delta - 1; \
return; \
} \
fx0 += fdx0; \
......@@ -1147,6 +1151,8 @@ void fov_beam_any_angle(fov_settings_type *settings, void *map, void *source,
line->eps_y = -GRID_EPSILON; \
} else if (prev_blocked == 1) { \
line->step_y = SQRT_3_2 * target_slope; \
line->is_blocked = true; \
line->block_t = line->dest_t - delta - 1; \
return; \
} \
} else if (prev_blocked == 1) { \
......@@ -1157,6 +1163,8 @@ void fov_beam_any_angle(fov_settings_type *settings, void *map, void *source,
} \
} else if (prev_blocked == 1) { \
line->step_y = SQRT_3_2 * target_slope; \
line->is_blocked = true; \
line->block_t = line->dest_t - delta - 1; \
return; \
} \
x = x signx 1; \
......@@ -1267,10 +1275,10 @@ void hex_fov_create_los_line(fov_settings_type *settings, void *map, void *sourc
line->eps_x = (dy < 0.0f) ? GRID_EPSILON : -GRID_EPSILON;
line->eps_y = (dx > 0.0f) ? GRID_EPSILON : -GRID_EPSILON;
}
*/
if (start_at_end) {
line->t = line->dest_t;
line->t = (line->is_blocked) ? line->block_t : line->dest_t;
}
*/
}
void fov_create_los_line(fov_settings_type *settings, void *map, void *source, fov_line_data *line,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment