Skip to content
Snippets Groups Projects
Commit 917786e8 authored by dg's avatar dg
Browse files

Increased number of spiders in Arhungol

git-svn-id: http://svn.net-core.org/repos/t-engine4@1236 51575b47-30f0-44d4-a5cc-537603b46e54
parent f38fd7f2
No related branches found
No related tags found
No related merge requests found
......@@ -123,7 +123,7 @@ function _M:onResolutionChange()
self.npcs_display:resize(self.w * 0.5, self.h * 0.8, self.w * 0.5, self.h * 0.2)
self.logdisplay:resize(0, self.h * 0.8, self.w * 0.5, self.h * 0.2)
-- Reset mouse bindings to account for new size
self:setupMouse(reset)
self:setupMouse(true)
end
function _M:setupDisplayMode()
......
......@@ -123,7 +123,7 @@ function _M:onResolutionChange()
self.npcs_display:resize(self.w * 0.5, self.h * 0.8, self.w * 0.5, self.h * 0.2)
self.logdisplay:resize(0, self.h * 0.8, self.w * 0.5, self.h * 0.2)
-- Reset mouse bindings to account for new size
self:setupMouse(reset)
self:setupMouse(true)
end
function _M:setupDisplayMode()
......
......@@ -190,7 +190,7 @@ function _M:onResolutionChange()
self.npcs_display:resize(self.w * 0.5, self.h * 0.8, self.w * 0.5, self.h * 0.2)
self.icons = { display_x = game.w * 0.5 - 14, display_y = game.h * 0.8 + 3, w = 12, h = game.h * 0.2}
-- Reset mouse bindings to account for new size
self:setupMouse(reset)
self:setupMouse(true)
self:createSeparators()
end
......@@ -241,6 +241,8 @@ function _M:setupDisplayMode()
-- Create the framebuffer
-- self.fbo = core.display.newFBO(Map.viewport.width, Map.viewport.height)
-- if self.fbo then self.fbo_shader = Shader.new("main_fbo") end
-- game.fbo_shader:setUniform("blur", 3)
-- game.fbo_shader:setUniform("colorize", {1,0.3,0})
end
function _M:setupMiniMap()
......@@ -853,6 +855,13 @@ end
-- UI stuff
--------------------------------------------------------------
--function _M:onPickUI(hits)
-- for i, uid in ipairs(hits) do
-- local e = __uids[uid]
-- if e then print(i, e.uid, e.name) end
-- end
--end
--- Create a visual separator
local _sep_left = core.display.loadImage("/data/gfx/ui/separator-left.png") _sep_left:alpha()
local _sep_right = core.display.loadImage("/data/gfx/ui/separator-right.png") _sep_right:alpha()
......
......@@ -44,7 +44,7 @@ return {
},
actor = {
class = "engine.generator.actor.Random",
nb_npc = {30, 40},
nb_npc = {70, 80},
guardian = "UNGOLE",
},
object = {
......
......@@ -350,6 +350,25 @@ void list_hits(GLint hits, GLuint *names)
);
printf("\n");
if (current_game != LUA_NOREF)
{
lua_rawgeti(L, LUA_REGISTRYINDEX, current_game);
lua_pushstring(L, "onPickUI");
lua_gettable(L, -2);
lua_remove(L, -2);
lua_rawgeti(L, LUA_REGISTRYINDEX, current_game);
lua_newtable(L);
for (i = 0; i < hits; i++)
{
lua_pushnumber(L, i+1);
lua_pushnumber(L, names[i * 4 + 3]);
lua_settable(L, -3);
}
docall(L, 2, 0);
}
}
void gl_select(int x, int y)
......@@ -394,7 +413,9 @@ void gl_select(int x, int y)
/*
restrict the draw to an area around the cursor
*/
gluPickMatrix(x, y, 1.0, 1.0, view);
gluPickMatrix(x, y, 5.0, 5.0, view);
printf("view %d %d %d %d\n", view[0], view[1], view[2], view[3]);
printf("pick %d %d\n", x,y);
// gluPerspective(60, 1.0, 0.0001, 1000.0);
glOrtho(0, screen->w, screen->h, 0, -101, 101);
......@@ -407,7 +428,7 @@ void gl_select(int x, int y)
draw only the names in the stack, and fill the array
*/
call_draw();
SDL_GL_SwapBuffers();
// SDL_GL_SwapBuffers();
/*
Do you remeber? We do pushMatrix in PROJECTION mode
......
......@@ -571,6 +571,8 @@ void display_map_quad(map_type *map, int dx, int dy, float dz, map_object *m, in
DO_QUAD(dx + m->dx, dy + m->dy, z, m->scale);
if (m->shader) glUseProgramObjectARB(0);
// glLoadName(0);
}
static int map_to_screen(lua_State *L)
......
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