[0.1.2] fixed sound issues + slowness of SSE image renderer, removed some .bat files, changed some line endings, and of course changed the music

This commit is contained in:
Ben Russell (300178622) 2013-08-02 11:40:39 +12:00
parent d84c2edf16
commit ed4a8fc87b
19 changed files with 158 additions and 343 deletions

View File

@ -1,6 +1,6 @@
#!/bin/sh
export ZIPNAME=nubdist/iceball-0.1.1.zip
export ZIPNAME=nubdist/iceball-0.1.2.zip
#zip -r $ZIPNAME *.dll *.exe *.txt *.bat docs/ \
# pkg/base/*.lua \
@ -13,7 +13,7 @@ export ZIPNAME=nubdist/iceball-0.1.1.zip
# dlcache/info.txt clsave/info.txt svsave/info.txt \
# clsave/config.json clsave/pub/user.json
zip -r $ZIPNAME *.dll *.exe *.txt opencmd.bat connect-*.bat docs/ \
zip -r $ZIPNAME *.dll *.exe *.txt opencmd.bat docs/ \
pmfedit.bat mapedit.bat \
dlcache/info.txt clsave/info.txt \
clsave/config.json clsave/pub/user.json \
@ -21,8 +21,10 @@ zip -r $ZIPNAME *.dll *.exe *.txt opencmd.bat connect-*.bat docs/ \
clsave/vol/dummy clsave/base/vol/dummy \
pkg/iceball/halp/ \
pkg/base/ pkg/maps/mesa.vxl pkg/maps/mesa.vxl.tga \
pkg/maps/gen_classic.lua.tga \
pkg/iceball/snowtest/ pkg/iceball/hack_console/ \
pkg/iceball/pmfedit/ pkg/iceball/mapedit/ \
pkg/iceball/sprinting/ pkg/iceball/deucenamegen/ \
svsave/info.txt \
svsave/pub/server.json svsave/pub/mods.json svsave/base/vol/dummy svsave/vol/dummy \
src/ include/ Makefile* CMakeLists.txt main.make \

View File

@ -1,52 +1,52 @@
{
"__COMMENT_000": "
This file contains configuration for the engine itself.
It cannot be read by any mods.
If you have a graphics card that's reasonably fast
and has at least 128MB of VRAM (64MB *might* cut it),
set gl_vbo to true.
(Yes, this DOES help on an Intel 3000 HD.)
If your game crashes when the map starts appearing, set it to false.
If you have an OpenGL-2.0-capable card (or one with non-power-of-two support),
and you wish to conserve a little bit of VRAM,
set gl_expand_textures to false.
If you get white boxes, it obviously wasn't capable - set it to true.
",
"video" : {
"width": 800,
"height": 600,
"fullscreen": false,
"cubeshift": 0,
"antialiasinglevel": 0,
"smoothlighting": true,
"gl_expand_textures": true,
"gl_chunk_size": 32,
"gl_chunks_tesselated_per_frame": 4,
"gl_shaders": true,
"gl_frustum_cull": true,
"gl_flip_quads": true,
"gl_vbo": true
},
"audio" : {
"freq": 44100,
"bufsize": 2048,
"volume": 1.0
}
"security" : {
"bin_storage_allowed": true,
"raw_whitelist" : [
["voxelauth.com", 80]
]
}
}
{
"__COMMENT_000": "
This file contains configuration for the engine itself.
It cannot be read by any mods.
If you have a graphics card that's reasonably fast
and has at least 128MB of VRAM (64MB *might* cut it),
set gl_vbo to true.
(Yes, this DOES help on an Intel 3000 HD.)
If your game crashes when the map starts appearing, set it to false.
If you have an OpenGL-2.0-capable card (or one with non-power-of-two support),
and you wish to conserve a little bit of VRAM,
set gl_expand_textures to false.
If you get white boxes, it obviously wasn't capable - set it to true.
",
"video" : {
"width": 800,
"height": 600,
"fullscreen": false,
"cubeshift": 0,
"antialiasinglevel": 0,
"smoothlighting": true,
"gl_expand_textures": true,
"gl_chunk_size": 32,
"gl_chunks_tesselated_per_frame": 4,
"gl_shaders": true,
"gl_frustum_cull": true,
"gl_flip_quads": true,
"gl_vbo": true
},
"audio" : {
"freq": 44100,
"bufsize": 2048,
"volume": 1.0
}
"security" : {
"bin_storage_allowed": true,
"raw_whitelist" : [
["voxelauth.com", 80]
]
}
}

View File

@ -1,37 +1,37 @@
{
"__COMMENT_000": "
This is the sort of place you set up your controls.
It can be read by all mods, but not writeable by any.
By the way, don't store anything important in this comment.
It is possible that a hacked server might be able to read it.
READ THIS FILE: docs/setup_json.txt
READ THIS URL: http://wiki.libsdl.org/moin.cgi/SDLKeycodeLookup
For more info on the syntax itself, see http://json.org/
",
"forward": 119,
"back": 115,
"left": 97,
"right": 100,
"jump": 32,
"crouch": 306,
"sneak": 118,
"reload": 114,
"tools": [49, 50, 51, 52, 53, 54, 55, 56, 57, 48],
"colorleft": 276,
"colorright": 275,
"colorup": 273,
"colordown": 274,
"chat": 116,
"teamchat": 121,
"squadchat": 117,
"scores": 9,
"quit": 27,
"map": 109,
"team": 44,
"wpn": 46
}
{
"__COMMENT_000": "
This is the sort of place you set up your controls.
It can be read by all mods, but not writeable by any.
By the way, don't store anything important in this comment.
It is possible that a hacked server might be able to read it.
READ THIS FILE: docs/setup_json.txt
READ THIS URL: http://wiki.libsdl.org/moin.cgi/SDLKeycodeLookup
For more info on the syntax itself, see http://json.org/
",
"forward": 119,
"back": 115,
"left": 97,
"right": 100,
"jump": 32,
"crouch": 306,
"sneak": 118,
"reload": 114,
"tools": [49, 50, 51, 52, 53, 54, 55, 56, 57, 48],
"colorleft": 276,
"colorright": 275,
"colorup": 273,
"colordown": 274,
"chat": 116,
"teamchat": 121,
"squadchat": 117,
"scores": 9,
"quit": 27,
"map": 109,
"team": 44,
"wpn": 46
}

View File

@ -1,39 +1,39 @@
{
"__COMMENT_000": "
This is the sort of place you set up your 'profile' and whatnot.
It can be read by all mods, but not writeable by any.
By the way, don't store anything important in this comment.
It is possible that a hacked server might be able to read it.
READ THIS FILE: docs/setup_json.txt
For name, and many other things, you need quotes:
''name'': ''your name goes here'',
NOT:
''name'': this is wrong,
(replace '' with the double-quotes used to contain this comment)
You will need to also set ''kick_on_join'' to false,
or else you will not be able to join any servers!
For more info on the syntax itself, see http://json.org/
",
"name": null,
"kick_on_join": true,
"sensitivity": 1.0,
"hold_to_zoom": false,
"fog": 127.5,
"skins" : {
},
"bio": {
"description": "I'm too lazy to learn how to edit my config. Laugh at me.",
"languages": ["pt", "pl"]
}
}
{
"__COMMENT_000": "
This is the sort of place you set up your 'profile' and whatnot.
It can be read by all mods, but not writeable by any.
By the way, don't store anything important in this comment.
It is possible that a hacked server might be able to read it.
READ THIS FILE: docs/setup_json.txt
For name, and many other things, you need quotes:
''name'': ''your name goes here'',
NOT:
''name'': this is wrong,
(replace '' with the double-quotes used to contain this comment)
You will need to also set ''kick_on_join'' to false,
or else you will not be able to join any servers that actually check this flag!
For more info on the syntax itself, see http://json.org/
",
"name": "",
"kick_on_join": true,
"sensitivity": 1.0,
"hold_to_zoom": false,
"fog": 127.5,
"skins" : {
},
"bio": {
"description": "I'm too lazy to learn how to edit my config. Laugh at me.",
"languages": ["pt", "pl"]
}
}

View File

@ -1,3 +0,0 @@
@echo off
iceball-gl -c play.iceballga.me 20737

View File

@ -45,7 +45,7 @@ def calc_ib_version(w,x,y,a,z):
HB_LIFETIME = 120
HB_VERSION = 2
IB_VERSION_CMP = (0,1,1,0,0)
IB_VERSION_CMP = (0,1,2,0,0)
IB_VERSION = calc_ib_version(*IB_VERSION_CMP)
# ignore "Z" version

View File

@ -17,9 +17,9 @@
#define VERSION_W 0
#define VERSION_X 1
#define VERSION_Y 1
#define VERSION_Y 2
#define VERSION_A 0
#define VERSION_Z 9
#define VERSION_Z 0
// Remember to bump "Z" basically every time you change the engine!
// Remember to bump the version in Lua too!
// Remember to document API changes in a new version!

View File

@ -1,4 +0,0 @@
@echo off
iceball-gl -c localhost 20737
pause

View File

@ -1,4 +0,0 @@
@echo off
iceball-gl.exe -d 20737 pkg/base
pause

Binary file not shown.

View File

@ -15,8 +15,8 @@
along with Ice Lua Components. If not, see <http://www.gnu.org/licenses/>.
]]
if common.version.num < 4194304 then
error("You need Iceball version 0.1 or later to connect to this server.")
if common.version.num < 4259840 then
error("You need Iceball version 0.1.2 or later to connect to this server.")
end
function client.hook_kick(reason)

View File

@ -15,10 +15,8 @@
along with Ice Lua Components. If not, see <http://www.gnu.org/licenses/>.
]]
if common.version.num < 4227072 then
error("You need Iceball version 0.1.1 or later to run this code.")
-- I know 0.1 can run it at the time of 0.1.1's release,
-- but I *do* want the server to stay up to date.
if common.version.num < 4259840 then
error("You need Iceball version 0.1.2 or later to run this code.")
end
-- UDP port test.

View File

@ -16,13 +16,14 @@
]]
VERSION_ENGINE = {
cmp={0,1,1,0,9},
num=4227072+9,
str="0.1.1-9",
cmp={0,1,2,0,0},
num=4259840,
str="0.1.2",
}
-- 0.1: 4194304
-- 0.1.1: 4227072
-- 0.1.2: 4259840
VERSION_BUGS = {
{intro=nil, fix=1, msg="PMF models have the wrong Z value when close to the screen edges, and can be seen through walls"},
@ -110,5 +111,6 @@ VERSION_BUGS = {
{intro=4227072+5, fix=4227072+7, msg="Incompatible semantics for image scaling"},
{intro=nil, fix=4227072+8, msg="iceball:// URL scheme not supported"},
{intro=4227072+8, fix=4227072+9, msg="[Windows] iceball:// handler doesn't set current directory correctly"},
{intro=nil, fix=4259840, msg="Sound broken wrt stereo (only the last sound played is in stereo; the rest uses the left for both channels)"},
}

View File

@ -1,74 +0,0 @@
@ECHO OFF
:Menu
ECHO ============== Iceball ==============
ECHO -------------------------------------
ECHO 1. Single-player
ECHO 2. Dev server
ECHO 3. Lighting test
ECHO 4. Snow weather test
ECHO 5. Map editor
ECHO 6. PMF editor
ECHO -------------------------------------
ECHO 0. Exit
ECHO -------------------------------------
ECHO.
SET INPUT=
SET /P INPUT=Please select a number:
cls
IF /I '%INPUT%'=='1' GOTO SinglePlayer
IF /I '%INPUT%'=='2' GOTO DevServer
IF /I '%INPUT%'=='3' GOTO LightingTest
IF /I '%INPUT%'=='4' GOTO SnowTest
IF /I '%INPUT%'=='5' GOTO MapEditor
IF /I '%INPUT%'=='6' GOTO PMFEditor
IF /I '%INPUT%'=='0' EXIT
ECHO Invalid option
pause
cls
GOTO Menu
:SinglePlayer
ECHO Starting local server...
iceball-gl.exe -s 0 pkg/base pkg/maps/mesa.vxl
ECHO.
cls
GOTO Menu
:DevServer
ECHO Connecting to dev server...
iceball-gl.exe -c iceballga.me 20737
ECHO.
cls
GOTO Menu
:LightingTest
ECHO Starting lighting test...
iceball-gl.exe -s 0 pkg/iceball/radtest
ECHO.
cls
GOTO Menu
:SnowTest
ECHO Starting snow weather test...
iceball-gl.exe -s 0 pkg/iceball/snowtest
ECHO.
cls
GOTO Menu
:MapEditor
ECHO Starting map editor...
iceball-gl.exe -s 0 pkg/iceball/mapedit
ECHO.
cls
GOTO Menu
:PMFEditor
ECHO Starting PMF editor...
iceball-gl.exe -s 0 pkg/iceball/pmfedit
ECHO.
cls
GOTO Menu

74
run.bat
View File

@ -1,74 +0,0 @@
@ECHO OFF
:Menu
ECHO ============== Iceball ==============
ECHO -------------------------------------
ECHO 1. Single-player
ECHO 2. Dev server
ECHO 3. Lighting test
ECHO 4. Snow weather test
ECHO 5. Map editor
ECHO 6. PMF editor
ECHO -------------------------------------
ECHO 0. Exit
ECHO -------------------------------------
ECHO.
SET INPUT=
SET /P INPUT=Please select a number:
cls
IF /I '%INPUT%'=='1' GOTO SinglePlayer
IF /I '%INPUT%'=='2' GOTO DevServer
IF /I '%INPUT%'=='3' GOTO LightingTest
IF /I '%INPUT%'=='4' GOTO SnowTest
IF /I '%INPUT%'=='5' GOTO MapEditor
IF /I '%INPUT%'=='6' GOTO PMFEditor
IF /I '%INPUT%'=='0' EXIT
ECHO Invalid option
pause
cls
GOTO Menu
:SinglePlayer
ECHO Starting local server...
iceball.exe -s 0 pkg/base pkg/maps/mesa.vxl
ECHO.
cls
GOTO Menu
:DevServer
ECHO Connecting to dev server...
iceball.exe -c play.iceballga.me 20737
ECHO.
cls
GOTO Menu
:LightingTest
ECHO Starting lighting test...
iceball.exe -s 0 pkg/iceball/radtest
ECHO.
cls
GOTO Menu
:SnowTest
ECHO Starting snow weather test...
iceball.exe -s 0 pkg/iceball/snowtest
ECHO.
cls
GOTO Menu
:MapEditor
ECHO Starting map editor...
iceball.exe -s 0 pkg/iceball/mapedit
ECHO.
cls
GOTO Menu
:PMFEditor
ECHO Starting PMF editor...
iceball.exe -s 0 pkg/iceball/pmfedit
ECHO.
cls
GOTO Menu

View File

@ -218,7 +218,7 @@ void render_blit_img_toimg(uint32_t *pixels, int width, int height, int pitch,
// Assembly/Compiler Coding Rule 76. (M impact, H generality) Align data to
// 32-byte boundary when possible. Prefer store alignment over load alignment.
if(bw >= 16)
if(bw >= 16 && scalex == 1.0f)
{
const __m128i xmmconst_0 = _mm_setzero_si128();
const __m128i xmmconst_256 = _mm_set1_epi16(256);
@ -236,15 +236,13 @@ void render_blit_img_toimg(uint32_t *pixels, int width, int height, int pitch,
for(x = 0; x < bw; x += 8)
_mm_prefetch(pd+x, _MM_HINT_T0);
xctr = 0;
// do the left part first
// TODO: look for a mask instruction
uint32_t *fs = ps;
for(x = 0; x < bw; x++)
{
uint32_t s = ps[xctr>>16];
uint32_t s = *(fs++);
uint32_t d = *pd;
xctr += iscalex;
// apply base color
// DANGER! BRACKETITIS!
@ -283,19 +281,8 @@ void render_blit_img_toimg(uint32_t *pixels, int width, int height, int pitch,
// NOTE: i don't have AVX2 so don't expect an AVX2 version.
for(; x < bw-4; x+=4)
{
int nxctr = xctr + iscalex*3;
__m128i xmm_src;
if((nxctr>>16)-(xctr>>16) == 3)
{
xmm_src = _mm_loadu_si128((__m128i *)&ps[xctr>>16]);
} else {
xmm_src = _mm_set_epi32(
ps[xctr>>16],
ps[(xctr+iscalex)>>16],
ps[(xctr+2*iscalex)>>16],
ps[(xctr+3*iscalex)>>16]);
}
xctr += iscalex<<2;
__m128i xmm_src = _mm_loadu_si128((__m128i *)fs);
fs += 4;
__m128i xmm_dst = _mm_load_si128((__m128i *)pd);
// unpack
@ -387,9 +374,8 @@ void render_blit_img_toimg(uint32_t *pixels, int width, int height, int pitch,
// finish off with the right part
for(; x < bw; x++)
{
uint32_t s = ps[xctr>>16];
uint32_t s = *(fs++);
uint32_t d = *pd;
xctr += iscalex;
// apply base color
// DANGER! BRACKETITIS!

View File

@ -103,7 +103,7 @@ void render_blit_img(uint32_t *pixels, int width, int height, int pitch,
// Assembly/Compiler Coding Rule 76. (M impact, H generality) Align data to
// 32-byte boundary when possible. Prefer store alignment over load alignment.
if(bw >= 16)
if(bw >= 16 && scalex == 1.0f)
{
const __m128i xmmconst_0 = _mm_setzero_si128();
const __m128i xmmconst_256 = _mm_set1_epi16(256);
@ -121,15 +121,13 @@ void render_blit_img(uint32_t *pixels, int width, int height, int pitch,
for(x = 0; x < bw; x += 8)
_mm_prefetch(pd+x, _MM_HINT_T0);
xctr = 0x8000;
// do the left part first
// TODO: look for a mask instruction
uint32_t *fs = ps;
for(x = 0; x < bw; x++)
{
uint32_t s = ps[xctr>>16];
uint32_t s = *(fs++);
uint32_t d = *pd;
xctr += iscalex;
// apply base color
// DANGER! BRACKETITIS!
@ -168,19 +166,8 @@ void render_blit_img(uint32_t *pixels, int width, int height, int pitch,
// NOTE: i don't have AVX2 so don't expect an AVX2 version.
for(; x < bw-4; x+=4)
{
int nxctr = xctr + iscalex*3;
__m128i xmm_src;
if((nxctr>>16)-(xctr>>16) == 3)
{
xmm_src = _mm_loadu_si128((__m128i *)&ps[xctr>>16]);
} else {
xmm_src = _mm_set_epi32(
ps[xctr>>16],
ps[(xctr+iscalex)>>16],
ps[(xctr+2*iscalex)>>16],
ps[(xctr+3*iscalex)>>16]);
}
xctr += iscalex<<2;
__m128i xmm_src = _mm_loadu_si128((__m128i *)fs);
fs += 4;
__m128i xmm_dst = _mm_load_si128((__m128i *)pd);
// unpack
@ -272,9 +259,8 @@ void render_blit_img(uint32_t *pixels, int width, int height, int pitch,
// finish off with the right part
for(; x < bw; x++)
{
uint32_t s = ps[xctr>>16];
uint32_t s = *(fs++);
uint32_t d = *pd;
xctr += iscalex;
// apply base color
// DANGER! BRACKETITIS!

View File

@ -178,7 +178,7 @@ void wav_fn_mixer_s16he_stereo(void *buf, int len)
int16_t d = data[offs];
int32_t v0 = (int32_t)(*v) + (int32_t)(vol[0]*d+0.5f);
int32_t v1 = (int32_t)(*v) + (int32_t)(vol[1]*d+0.5f);
int32_t v1 = (int32_t)(*(v+1)) + (int32_t)(vol[1]*d+0.5f);
if(v0 > 0x7FFF) v0 = 0x7FFF;
if(v0 < -0x7FFF) v0 = -0x7FFF;
if(v1 > 0x7FFF) v1 = 0x7FFF;

View File

@ -2,7 +2,7 @@
export ZIPNAME=nubdist/iceball-indev-0.1.1-9.zip
zip -r $ZIPNAME *.dll *.exe *.txt opencmd.bat connect-*.bat docs/ \
zip -r $ZIPNAME *.dll *.exe *.txt opencmd.bat docs/ \
dlcache/info.txt clsave/info.txt \
clsave/config.json clsave/pub/user.json clsave/pub/controls.json \
"DOUBLE CLICK ON THIS FILE TO GET THE MASTER SERVER LIST WORKING PROPERLY ON WINDOWS I MEAN IT.exe" \