[0.0-10] fixed some renderer quirks i.e. TICKED TWO BOXES ON THE TODO, HELL YES - also added (but not implemented yet) Dany0's czech translation
This commit is contained in:
parent
1a4ed99e44
commit
1ef950671d
@ -16,6 +16,9 @@ BR:
|
|||||||
"Are you sure?" on quit
|
"Are you sure?" on quit
|
||||||
Improved key binding system
|
Improved key binding system
|
||||||
|
|
||||||
|
Dany0:
|
||||||
|
Czech translation
|
||||||
|
|
||||||
Ericson2314:
|
Ericson2314:
|
||||||
Rearranged the build tree
|
Rearranged the build tree
|
||||||
Added an SSE-optimised matrix-vector multiply
|
Added an SSE-optimised matrix-vector multiply
|
||||||
|
@ -47,5 +47,4 @@ STUFF TO DO BEFORE 0.1 CAN BE RELEASED:
|
|||||||
- make net_pack more solid
|
- make net_pack more solid
|
||||||
- JSON writer
|
- JSON writer
|
||||||
- make kicking not suck
|
- make kicking not suck
|
||||||
- correct render order for upper blocks
|
- face-dependent shading
|
||||||
- draw the ceiling
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
This section is obsolete.
|
This section is obsolete (mostly, some stuff is still updated here).
|
||||||
The documentation here is most likely out of date.
|
The documentation here is most likely out of date.
|
||||||
|
|
||||||
Read the HTML manual in MANUAL/.
|
Read the HTML manual in MANUAL/.
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
#define VERSION_X 0
|
#define VERSION_X 0
|
||||||
#define VERSION_Y 0
|
#define VERSION_Y 0
|
||||||
#define VERSION_A 0
|
#define VERSION_A 0
|
||||||
#define VERSION_Z 9
|
#define VERSION_Z 10
|
||||||
// Remember to bump "Z" basically every time you change the engine!
|
// Remember to bump "Z" basically every time you change the engine!
|
||||||
// Remember to bump the version in Lua too!
|
// Remember to bump the version in Lua too!
|
||||||
// Z can only be 0 for official releases!
|
// Z can only be 0 for official releases!
|
||||||
|
@ -25,6 +25,12 @@ SECTIONS = [
|
|||||||
])
|
])
|
||||||
]),
|
]),
|
||||||
|
|
||||||
|
("Dany0", None, [
|
||||||
|
("Beginning contributor", None, [
|
||||||
|
("Czech translation", None, None),
|
||||||
|
])
|
||||||
|
]),
|
||||||
|
|
||||||
("Ericson2314 / SonarPulse", None, [
|
("Ericson2314 / SonarPulse", None, [
|
||||||
("Engine programmer", None, [
|
("Engine programmer", None, [
|
||||||
("Rearranged the build tree", None, None),
|
("Rearranged the build tree", None, None),
|
||||||
|
@ -15,6 +15,8 @@
|
|||||||
along with Ice Lua Components. If not, see <http://www.gnu.org/licenses/>.
|
along with Ice Lua Components. If not, see <http://www.gnu.org/licenses/>.
|
||||||
]]
|
]]
|
||||||
|
|
||||||
|
-- TODO: organise this into the correct files
|
||||||
|
|
||||||
lang_en = {
|
lang_en = {
|
||||||
["join"] = function (p,t) return "* "..p.." has joined the "..t.." team" end
|
["join"] = function (p,t) return "* "..p.." has joined the "..t.." team" end
|
||||||
["quit"] = function (p) return "* "..p.." disconnected" end
|
["quit"] = function (p) return "* "..p.." disconnected" end
|
||||||
@ -25,3 +27,19 @@ lang_en = {
|
|||||||
["diefall"] = function (p) return ""..p.." fell too far" end
|
["diefall"] = function (p) return ""..p.." fell too far" end
|
||||||
["tkill"] = function (ps,pd,w) return ""..ps.." teamkilled "..pd.." ("..w..")" end
|
["tkill"] = function (ps,pd,w) return ""..ps.." teamkilled "..pd.." ("..w..")" end
|
||||||
}
|
}
|
||||||
|
|
||||||
|
lang_cz = {
|
||||||
|
["join"] = function (p,t) return "* "..p.." se připojil do týmu "..t end
|
||||||
|
["quit"] = function (p) return "* "..p.." se odpojil" end
|
||||||
|
["chteam"] = function (p) return "* "..p.." změnil tým" end
|
||||||
|
["chwpn"] = function (p) return "* "..p.." změnil zbraň" end
|
||||||
|
["chat"] = function (p,m) return "<"..p.."> "..m end
|
||||||
|
["kill"] = function (ps,pd,w) return ""..ps.." zabil "..pd.." ("..w..")" end
|
||||||
|
["diefall"] = function (p) return ""..p.." udělal takovou tu věc alá lumíci" end
|
||||||
|
["tkill"] = function (ps,pd,w) return ""..ps.." zabil spoluhráče "..pd.." ("..w..")" end
|
||||||
|
}
|
||||||
|
|
||||||
|
lang_list = {
|
||||||
|
["en"] = lang_en,
|
||||||
|
["en"] = lang_cz,
|
||||||
|
}
|
||||||
|
64
src/render.c
64
src/render.c
@ -836,6 +836,8 @@ void render_vxl_redraw(camera_t *camera, map_t *map)
|
|||||||
float by = blky + suby;
|
float by = blky + suby;
|
||||||
float bz = blkz + subz;
|
float bz = blkz + subz;
|
||||||
|
|
||||||
|
int byi = blky;
|
||||||
|
|
||||||
// check if we need to reallocate the mark table and block list
|
// check if we need to reallocate the mark table and block list
|
||||||
{
|
{
|
||||||
int markbase = xlen * zlen;
|
int markbase = xlen * zlen;
|
||||||
@ -880,6 +882,10 @@ void render_vxl_redraw(camera_t *camera, map_t *map)
|
|||||||
{
|
{
|
||||||
raydata_t *rd = &(rayc_data[rayc_data_head++]);
|
raydata_t *rd = &(rayc_data[rayc_data_head++]);
|
||||||
|
|
||||||
|
// back this up so we can flip the top
|
||||||
|
rayblock_t *b_pstart = &(rayc_block[rayc_block_len]);
|
||||||
|
rayblock_t *b_pmid = b_pstart;
|
||||||
|
|
||||||
// get delta
|
// get delta
|
||||||
float dx = rd->x - bx;
|
float dx = rd->x - bx;
|
||||||
float dz = rd->z - bz;
|
float dz = rd->z - bz;
|
||||||
@ -959,24 +965,45 @@ void render_vxl_redraw(camera_t *camera, map_t *map)
|
|||||||
b->y = iy2;
|
b->y = iy2;
|
||||||
b->color = 0xFF0000FF;
|
b->color = 0xFF0000FF;
|
||||||
}
|
}
|
||||||
|
b_pstart += 2;
|
||||||
|
b_pmid += 2;
|
||||||
#endif
|
#endif
|
||||||
// add the top blocks (if they exist and we can see them)
|
// add the top blocks (if they exist and we can see them)
|
||||||
if(lastn == 0)
|
if(lastn == 0)
|
||||||
{
|
{
|
||||||
if(y1 > 0.0f) y1 = 0;
|
if(y1 > 0.0f) y1 = 0;
|
||||||
y2 = p[1];
|
y2 = p[1];
|
||||||
} else if(p[3] >= rd->y1-1) {
|
} else if(rayc_data_head == 1) {
|
||||||
y1 = p[3];
|
y1 = p[3];
|
||||||
y2 = p[1];
|
y2 = p[1];
|
||||||
uint32_t *c = (uint32_t *)(&p[-4]);
|
// just the immediate ceiling, thanks.
|
||||||
#ifndef DEBUG_HIDE_MAIN
|
#ifndef DEBUG_HIDE_MAIN
|
||||||
for(i = p[3]-1; i >= p[3]-topcount && i >= iy1; i--)
|
|
||||||
{
|
{
|
||||||
|
rayblock_t *b = &rayc_block[rayc_block_len++];
|
||||||
|
b->x = rd->x;
|
||||||
|
b->z = rd->z;
|
||||||
|
b->y = p[3]-1;
|
||||||
|
b->color = *(uint32_t *)(&p[-4]);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
} else if(p[3] >= rd->y1-1) {
|
||||||
|
y1 = p[3];
|
||||||
|
y2 = p[1];
|
||||||
|
uint32_t *c = (uint32_t *)(&p[-4*topcount]);
|
||||||
|
#ifndef DEBUG_HIDE_MAIN
|
||||||
|
for(i = p[3]-topcount; i <= p[3]-1; i++)
|
||||||
|
{
|
||||||
|
if(i < iy1)
|
||||||
|
{
|
||||||
|
c++;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
rayblock_t *b = &rayc_block[rayc_block_len++];
|
rayblock_t *b = &rayc_block[rayc_block_len++];
|
||||||
b->x = rd->x;
|
b->x = rd->x;
|
||||||
b->z = rd->z;
|
b->z = rd->z;
|
||||||
b->y = i;
|
b->y = i;
|
||||||
b->color = *(c--);
|
b->color = *(c++);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -1010,24 +1037,37 @@ void render_vxl_redraw(camera_t *camera, map_t *map)
|
|||||||
if(p[1] != p[3] && rd->y2 >= p[3])
|
if(p[1] != p[3] && rd->y2 >= p[3])
|
||||||
y2 = p[1];
|
y2 = p[1];
|
||||||
|
|
||||||
c = (uint32_t *)(&p[-4]);
|
c = (uint32_t *)(&p[-4*topcount]);
|
||||||
#ifndef DEBUG_HIDE_MAIN
|
#ifndef DEBUG_HIDE_MAIN
|
||||||
for(i = p[3]-1; i >= p[3]-topcount; i--)
|
for(i = p[3]-topcount; i <= p[3]-1 && i <= iy2; i++)
|
||||||
{
|
{
|
||||||
if(i > iy2)
|
|
||||||
{
|
|
||||||
c--;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
rayblock_t *b = &rayc_block[rayc_block_len++];
|
rayblock_t *b = &rayc_block[rayc_block_len++];
|
||||||
b->x = rd->x;
|
b->x = rd->x;
|
||||||
b->z = rd->z;
|
b->z = rd->z;
|
||||||
b->y = i;
|
b->y = i;
|
||||||
b->color = *(c--);
|
b->color = *(c++);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// find the y middle
|
||||||
|
while(b_pmid < &rayc_block[rayc_block_len] && b_pmid->y < byi)
|
||||||
|
b_pmid++;
|
||||||
|
b_pmid--;
|
||||||
|
|
||||||
|
// flip!
|
||||||
|
while(b_pstart < b_pmid)
|
||||||
|
{
|
||||||
|
rayblock_t t;
|
||||||
|
|
||||||
|
t = *b_pstart;
|
||||||
|
*b_pstart = *b_pmid;
|
||||||
|
*b_pmid = t;
|
||||||
|
|
||||||
|
b_pstart++;
|
||||||
|
b_pmid--;
|
||||||
|
}
|
||||||
|
|
||||||
// correct the y spread
|
// correct the y spread
|
||||||
if(y1 < by1)
|
if(y1 < by1)
|
||||||
y1 = by1;
|
y1 = by1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user