Code Monkey home page Code Monkey logo

ippclub / dora-ssr Goto Github PK

View Code? Open in Web Editor NEW
324.0 17.0 43.0 152.83 MB

Dora Project, Special Super Rare Edition.

Home Page: https://dora-ssr.net/

License: Other

CMake 0.60% Java 0.02% C++ 64.82% C 0.89% Objective-C++ 0.06% Lua 18.61% Shell 0.01% Batchfile 0.01% Makefile 0.01% Rust 6.97% JavaScript 1.55% HTML 0.02% CSS 0.47% TypeScript 4.67% Python 0.03% GLSL 1.28%
2d-game-engine yuescript teal-lang lua rust game-development cpp20 typescript

dora-ssr's Issues

OwnVector使用方法请教

作者你好
在学习你的代码过程中,有个代码问题有点疑问,OwnVector这个模板类的remove方法的不太清楚要怎么调用.

/** @brief vector of pointers, but accessed as values
 pointers pushed into OwnVector are owned by the vector,
 pointers will be auto deleted when it`s erased/removed from the vector
 or the vector is destroyed.
 Used with Composition Relationship.
*/
template<class T>
class OwnVector : public vector<Own<T>>
{
	typedef vector<Own<T>> OwnV;
public:
	using OwnV::OwnV;
	using OwnV::insert;

	bool remove(T* item)
	{
		auto it = std::remove(OwnV::begin(), OwnV::end(), item);
		if (it == OwnV::end()) return false;
		OwnV::erase(it);
		return true;
	}
	typename OwnV::iterator index(T* item)
	{
		return std::find(OwnV::begin(), OwnV::end(), item);
	}
	bool fast_remove(T* item)
	{
		size_t index = std::distance(OwnV::begin(), OwnVector::index(item));
		if (index < OwnV::size())
		{
			OwnV::at(index) = OwnV::back();
			OwnV::pop_back();
			return true;
		}
		return false;
	}
};

例子:

class demo{
public:
   demo(int i):num(i){
      cout<<"construct! " << i <<endl;
   }

   ~demo(){
      cout<<"class destruct! " << num <<endl;
   }
private:
   int num;
};


int main() {
    OwnVector<demo> ov;
    ov.push_back(New<demo>(1));
    ov.push_back(New<demo>(2));
    //ov.erase(ov.begin());
    //ov.remove();
    return 0;
}

比如这个例子中我想remove掉第一个item,应该怎么写呢?我在这个项目好像没有用到这个remove方法

Tracking: support typescript as the scripting language

The background shared by @pigpigyyy:

Teal was introduced a long while ago in this project when Typescript was not yet mature. However, when it comes to a statically typed scripting language, Typescript has grown to be the most popular option today. We can explore the possiblity of transpiling TS to Lua https://github.com/TypeScriptToLua/TypeScriptToLua and provide the type definitions for Dorothy like https://github.com/hazzard993/love-typescript-definitions

Eventually, we may also need to provide a template project for scaffolding.
https://github.com/hazzard993/love-typescript-template

linux appimage

I hope to have the support of appimage, as many old Linux systems may not be able to install software using packages very well

discussion: the minimal C++ compiler support

As of today, I believe there is no reason to use compiler <= C++17. We can use C++20 features if necessary.

Once we determined the minimum required C++ version, we need to document it in somewhere, e.g, #26.

CMake Support

Very nice project.

1 - Can you add support for CMake?
2- There is any real game with it? Do you have more samples?

Thanks.

第三方库 源码

像libbx.a libsoloud.a很多第三方库 请问一下 这些源码在哪里可以下载 自己编译

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.