aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md2
-rw-r--r--examples/smelt_test.cpp2
-rw-r--r--extensions/smttfont.cpp2
-rw-r--r--smelt/glfw/gfx_glfw.cpp2
-rw-r--r--smelt/glfw_m/gfx_glfw.cpp2
-rw-r--r--smelt/sdl/gfx_sdl.cpp7
6 files changed, 8 insertions, 9 deletions
diff --git a/README.md b/README.md
index 031ab0f..4a71877 100644
--- a/README.md
+++ b/README.md
@@ -64,5 +64,5 @@ comments in the file for details.
* Better documentation.
* Sane way to build.
* Unify OpenGL versions.
-* D3D version.
+* ~~D3D version.~~
* Better tools?
diff --git a/examples/smelt_test.cpp b/examples/smelt_test.cpp
index 8d0e41b..853d09b 100644
--- a/examples/smelt_test.cpp
+++ b/examples/smelt_test.cpp
@@ -185,7 +185,7 @@ int main()
//initialize the indicator.
ictest.init(100,5,0x80,tex,smTexRect(151,264,2,8));
//set the string of the truetype font renderer.
- ttftest.updateString(L"truetype font test\nNow Playing: 稲田姫樣に叱られるから by ZUN");
+ ttftest.updateString(L"truetype font test\nNow Playing: 稲田姫様に叱られるから by ZUN");
//play the bgm.
sm->smSFXPlay(bgm,100,0,1.,true);
//enter the main loop.
diff --git a/extensions/smttfont.cpp b/extensions/smttfont.cpp
index 02aa54a..566aab1 100644
--- a/extensions/smttfont.cpp
+++ b/extensions/smttfont.cpp
@@ -132,8 +132,6 @@ std::pair<SMTEX,std::pair<int,int>> smTTFont::_allocate_char(int rw,int rh)
_smTexState* ptex=new _smTexState;
ptex->cx=ptex->cy=ptex->mh=0;
ptex->tex=sm->smTextureCreate(texw,texh);
- DWORD* px=sm->smTextureLock(ptex->tex,0,0,texw,texh,false);
- sm->smTexutreUnlock(ptex->tex);
ret.first=ptex->tex;
ret.second.first=ret.second.second=0;
ptex->cx+=rw;
diff --git a/smelt/glfw/gfx_glfw.cpp b/smelt/glfw/gfx_glfw.cpp
index 485760d..5586112 100644
--- a/smelt/glfw/gfx_glfw.cpp
+++ b/smelt/glfw/gfx_glfw.cpp
@@ -538,7 +538,7 @@ void SMELT_IMPL::smTexutreUnlock(SMTEX tex)
if(!ptex->locpx)return;
if(!ptex->roloc)
{
- DWORD *src=ptex->locpx+ptex->locw*ptex->loch,
+ DWORD *src=ptex->locpx+ptex->locw*(ptex->loch-1),
*dst=ptex->px+(((ptex->rh-ptex->locy-1)*ptex->rw)+ptex->locx);
for(int i=0;i<ptex->loch;++i)
{
diff --git a/smelt/glfw_m/gfx_glfw.cpp b/smelt/glfw_m/gfx_glfw.cpp
index ebd24bf..41b4d7b 100644
--- a/smelt/glfw_m/gfx_glfw.cpp
+++ b/smelt/glfw_m/gfx_glfw.cpp
@@ -534,7 +534,7 @@ void SMELT_IMPL::smTexutreUnlock(SMTEX tex)
if(!ptex->locpx)return;
if(!ptex->roloc)
{
- DWORD *src=ptex->locpx+ptex->locw*ptex->loch,
+ DWORD *src=ptex->locpx+ptex->locw*(ptex->loch-1),
*dst=ptex->px+(((ptex->rh-ptex->locy-1)*ptex->rw)+ptex->locx);
for(int i=0;i<ptex->loch;++i)
{
diff --git a/smelt/sdl/gfx_sdl.cpp b/smelt/sdl/gfx_sdl.cpp
index ae50db2..875f103 100644
--- a/smelt/sdl/gfx_sdl.cpp
+++ b/smelt/sdl/gfx_sdl.cpp
@@ -538,11 +538,12 @@ void SMELT_IMPL::smTexutreUnlock(SMTEX tex)
if(!ptex->locpx)return;
if(!ptex->roloc)
{
- DWORD *src=ptex->locpx,*dst=ptex->px+((ptex->locy*ptex->rw)+ptex->locx);
- for(int i=0;i<ptex->loch;++i)//TODO: flip it...
+ DWORD *src=ptex->locpx+ptex->locw*(ptex->loch-1),
+ *dst=ptex->px+(((ptex->rh-ptex->locy-1)*ptex->rw)+ptex->locx);
+ for(int i=0;i<ptex->loch;++i)
{
memcpy(dst,src,ptex->locw*sizeof(DWORD));
- dst+=ptex->rw;src+=ptex->locw;
+ dst-=ptex->rw;src-=ptex->locw;
}
if(ptex->lost)configTexture(ptex,ptex->rw,ptex->rh,ptex->px);
else