Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - ToyAuthor

Pages: [1] 2
1
SFML projects / [General-purpose Library]ToyBox
« on: July 31, 2020, 12:24:45 pm »
Hello every one

It's a set of general-purpose libraries for C++11.
I have been working on it for a long time.
Hope it's helpful for you.

ToyBox
=============
 * Public Domain
 * Only support Linux, Mac, Windows
 * Support to extract file from 7zip, zip.
 * UTF-8 encoding every where.

Repository:
https://github.com/ToyAuthor/ToyBox

List of Third-party Libraries:
https://github.com/ToyAuthor/ToyBox/blob/master/extlibs/readme.txt

Main Page:
https://toyauthor.github.io/ToyBoxDoc/

A shortcut to show demos of ToyBox:
https://toyauthor.github.io/FileSharing/player/beta/win7x64_vc2015_win32/player_beta.zip

Some following features maybe useful to SFML fans.
1.Support a environment with SFML and glew.(see ToyBox/examples/HelloOpenGL/main.cpp)
2.Simple Lua binding.
3.More support to image format.(webp, 8bit gray scale  BMP)

2
That's a big plan!
So many modules.
Good to see another one project using lua.

3
SFML website / Re: "Your connection is not secure" error
« on: November 27, 2017, 09:24:45 am »
 :D
Thanks!

4
SFML website / "Your connection is not secure" error
« on: November 27, 2017, 02:16:17 am »
https://support.mozilla.org/en-US/kb/troubleshoot-time-errors-secure-websites
My system time zone is UTC+08:00
Browser:FireFox 57.0

5
It's much better than Screenshot Thread.

6
SFML projects / Re: Luna: A game engine made for learning with Lua
« on: August 16, 2017, 05:03:25 am »
I am happy to meet a new lua user here.
Lua is a very friendly language for non-programmers.

But your lua script looks too simple.
Why those interfaces of Luna are global function?
It may make user confused.

Try to build a C extension module for Lua would be better.
Just like this style:
https://github.com/ToyAuthor/ToyBox/blob/master/resource/lua/examples/Window/main.lua

Or you can create your own global table as name space.(Just like Love2D)

7
General / Re: loadFromFile UNICODE path not working
« on: June 22, 2017, 03:18:55 am »
This issue is nothing.
You can use _wfopen to get your file, then passing it from memory to SFML.
The stb_image library also provide a function named "stbi_load_from_callbacks" to do it.

8
SFML projects / Re: Nero Game Engine
« on: May 03, 2017, 06:13:52 am »
Good job. Really good job!

9
Thank you Hapax and eXpl0it3r.

And eXpl0it3r probably right.
Maybe CMAKE_BUILD_TYPE doesn't work on Visual Studio.
I usually run Visual Studio Solution in command line.
So I must be screw up something on it.

I will rebuild entire project then try again.

-----------------

I am mix debug and release version.
After rebuild all, it works fine.
My bad.

10
What's the crash? What's the call stack? Do you mix debug and release version?

You don't really need to convert L"" to std::wstring first.
I set "release" to CMAKE_BUILD_TYPE.
It should always crash if I mix debug and release version.
My SFML library is download from the official website.(Not compile it by myself)

-----------Error message box give me this-----------
Debug error!
Program:
D:\...\my_project.exe
abort() has been called
(Press Retry to debug the application)
-----------------------------------------------------------

// It crash too
std::string   str("just a UTF-8 string");
return sf::String::fromUtf8( str.begin(), str.end() );

11
So this doesn't work for you?:
#include <string>
#include <SFML/System/String.hpp>
int main()
{
        std::string s{ "string" };
        sf::String sfs(s);
        std::wstring w{ L"wide string" };
        sf::String sfw(w);
}
I just try it.
"sf::String" really couldn't take "std::wstring" on Visual Studio 2015.

12
Have you tried it outside of the window constructor?
I was tried.
Nothing wrong with sf::Window constructor.
It's all about sf::String constructor.

Maybe something wrong with "std::basic_string" on Visual Studio 2015.

13
It happened at SFML v2.4.2
I am not sure it is belong to SFML or not.

// It's only crash on Visual Studio 2015
sf::Window(sf::VideoMode(800,600),sf::String(std::wstring(L"title")));

// It looks fine on any compiler
sf::Window(sf::VideoMode(800,600),sf::String(std::wstring(L"title").c_str()));

14
General discussions / Re: How to use SFML without xcode on Mac?
« on: March 25, 2017, 02:11:35 pm »
I use llvm-gcc + CodeBlocks + CMake on Mac. Xcode is not necessary.

15
Good job!

Pages: [1] 2