Page 1 of 1
DSB Version 0.16
Posted: Thu May 10, 2007 2:25 am
by Sophia
What's new:
- Now able to specify an object's attack methods as a table-returning function
- Added: dsb_replace_condition to change a condition on the fly
- Added: dsb_update_strings to change system strings on the fly
- Added sys_inventory_* hooks
- Added dsb_fullscreen - Fullscreen "cut scenes"/etc. mode
- Fixed stairs bug
Additionally, I added a "poison bar" to the test dungeon that shows how poisoned a given character is. It was mainly to see if it could be done (it could

) but I think it's kind of a neat effect. The poison bar is implemented all in Lua of course.

Posted: Sat May 12, 2007 10:57 am
by Joramun
Nice effects for both the bar and the dragon show !
In the dragon show code, I don't understand everything :
What does dsb_fullscreen(arg1,arg2,arg3,arg4) exactly do ?
The arguments for the display functions (x,y,b etc.) seem to come from nowhere !
Posted: Sat May 12, 2007 5:50 pm
by Sophia
A description of dsb_fullscreen from the list of functions:
- dsb_fullscreen(bitmap_or_func, click_func, update_func, mouse)
This engages the full-screen renderer, and is used for cut scenes or other interludes. If the first parameter passed is a bitmap, that bitmap will be displayed. If the first parameter is instead a function, that function will be executed every frame. The draw function will be passed the bitmap to draw to, the mouse's x location, and the mouse's y location.
draw_function(bitmap, mouse_x, mouse_y)
The click_func, if provided, will be executed every time the mouse is clicked. It is of the form:
click_func(mouse_x, mouse_y, mouse_buttons)
Update_func, if provided, will be executed every game tick. It takes no parameters.
If mouse is nil or false, no mouse pointer will be drawn. If it is true, the standard "yellow arrow" mouse pointer will be drawn. If it is a bitmap, that bitmap will be drawn as the mouse pointer.
The full-screen renderer will run until any of its associated functions returns something other than false or nil.
If you have any other questions, feel free to ask.

The arguments don't actually "come from nowhere," the functions are passed to dsb_fullscreen when the mode starts up and then called by the engine with the appropriate parameters at the appropriate times.