Giter Site home page Giter Site logo

libstarlight's Introduction

- libstarlight -

3DS Homebrew Application Framework


(Pardon the dust, both the library and this readme are still a work in progress)

What is this?

libstarlight is a fully-featured application framework for 3DS homebrew written in C++14.

Features include:

  • Fully themable UI framework with rich widgets designed for the 3DS's touchscreen
  • Underlying graphics framework built on citro3d, using premultiplied alpha blending
    (textures automatically converted on load)
  • Streamlined, easy-to-use onscreen keyboard
  • Centralized configuration system for application-specific settings and storage, complete with optional auto-saving on exit
  • Filesystem helpers to streamline working with SD and romfs contents
  • Various basic datatypes for convenience and interoperability

Please keep in mind that while libstarlight is still in beta (pre-1.0.0) not everything is final. Expect occasional (usually minor) breaking changes as things settle.

Requirements

libstarlight requires devkitARM r46 or later, along with:

  • reasonably up-to-date libctru
  • citro3d

Additionally, libstarlight contains versions of the following bundled within:

Okay, so how do I use this?

(section WIP, take a look at the testbed for a slightly scattered example)

To ensure your application runs properly without themes installed to the SD card, it is recommended to include a copy of the default theme (or any theme with no fallback) at romfs:/.fallback_theme/.

(Themes on SD go in sdmc:/.starlight/themes/)

License

Bundled dependencies (see _incLib) have their own terms and/or notices, as listed in their respective files.

libstarlight's People

Contributors

zetaprime avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

libstarlight's Issues

Make issue

Hey, could you tell me how you got your preview to compile? I'm interested in using this, but I get the following errors when I try to build:

RenderCore.cpp
arm-none-eabi-g++ -MMD -MP -MF /home/Jay/Desktop/gitRepos/libstarlight-master/libstarlight/build/RenderCore.d -g -Wall -Wno-psabi -Wno-error -O2 -mword-relocations -ffunction-sections -fomit-frame-pointer -march=armv6k -mtune=mpcore -mfloat-abi=hard -mtp=soft -I/home/Jay/Desktop/gitRepos/libstarlight-master/libstarlight/source -I/home/Jay/Desktop/gitRepos/libstarlight-master/libstarlight/include -I/opt/devkitpro/libctru/include -I/opt/devkitpro/portlibs/3ds/include -I/home/Jay/Desktop/gitRepos/libstarlight-master/libstarlight/build -DARM11 -D_3DS -fno-rtti -std=c++17 -c /home/Jay/Desktop/gitRepos/libstarlight-master/libstarlight/source/starlight/gfx/RenderCore.cpp -o RenderCore.o
C:/Users/Jay/Desktop/gitRepos/libstarlight-master/libstarlight/source/starlight/gfx/RenderCore.cpp: In function 'void {anonymous}::ApplyBlendMode(C3D_TexEnv*, starlight::gfx::BlendMode)':
C:/Users/Jay/Desktop/gitRepos/libstarlight-master/libstarlight/source/starlight/gfx/RenderCore.cpp:162:17: error: 'C3D_TexEnvOp' was not declared in this scope; did you mean 'C3D_TexEnv'?
162 | C3D_TexEnvOp(env, C3D_RGB, 0, 0, 0); // and the rest is the same as blend
| ^~~~~~~~~~~~
| C3D_TexEnv
C:/Users/Jay/Desktop/gitRepos/libstarlight-master/libstarlight/source/starlight/gfx/RenderCore.cpp: In static member function 'static void starlight::gfx::RenderCore::BindTexture(C3D_Tex*, const starlight::Color&, starlight::gfx::BlendMode)':
C:/Users/Jay/Desktop/gitRepos/libstarlight-master/libstarlight/source/starlight/gfx/RenderCore.cpp:192:62: error: invalid conversion from 'int' to 'GPU_TEVSRC' [-fpermissive]
192 | C3D_TexEnvSrc(env, C3D_Both, GPU_TEXTURE0, GPU_CONSTANT, 0);
| ^
| |
| int
In file included from C:/devkitPro/libctru/include/citro3d.h:21,
from C:/Users/Jay/Desktop/gitRepos/libstarlight-master/libstarlight/source/starlight/gfx/RenderCore.cpp:5:
C:/devkitPro/libctru/include/c3d/texenv.h:52:13: note: initializing argument 5 of 'void C3D_TexEnvSrc(C3D_TexEnv*, C3D_TexEnvMode, GPU_TEVSRC, GPU_TEVSRC, GPU_TEVSRC)'
52 | GPU_TEVSRC s3 _C3D_DEFAULT(GPU_PRIMARY_COLOR))
| ^
C:/Users/Jay/Desktop/gitRepos/libstarlight-master/libstarlight/source/starlight/gfx/RenderCore.cpp: In static member function 'static void starlight::gfx::RenderCore::BindColor(const starlight::Color&, starlight::gfx::BlendMode)':
C:/Users/Jay/Desktop/gitRepos/libstarlight-master/libstarlight/source/starlight/gfx/RenderCore.cpp:199:48: error: invalid conversion from 'int' to 'GPU_TEVSRC' [-fpermissive]
199 | C3D_TexEnvSrc(env, C3D_Both, GPU_CONSTANT, 0, 0);
| ^
| |
| int
In file included from C:/devkitPro/libctru/include/citro3d.h:21,
from C:/Users/Jay/Desktop/gitRepos/libstarlight-master/libstarlight/source/starlight/gfx/RenderCore.cpp:5:
C:/devkitPro/libctru/include/c3d/texenv.h:51:13: note: initializing argument 4 of 'void C3D_TexEnvSrc(C3D_TexEnv*, C3D_TexEnvMode, GPU_TEVSRC, GPU_TEVSRC, GPU_TEVSRC)'
51 | GPU_TEVSRC s2 _C3D_DEFAULT(GPU_PRIMARY_COLOR),
| ^
C:/Users/Jay/Desktop/gitRepos/libstarlight-master/libstarlight/source/starlight/gfx/RenderCore.cpp:199:51: error: invalid conversion from 'int' to 'GPU_TEVSRC' [-fpermissive]
199 | C3D_TexEnvSrc(env, C3D_Both, GPU_CONSTANT, 0, 0);
| ^
| |
| int
In file included from C:/devkitPro/libctru/include/citro3d.h:21,
from C:/Users/Jay/Desktop/gitRepos/libstarlight-master/libstarlight/source/starlight/gfx/RenderCore.cpp:5:
C:/devkitPro/libctru/include/c3d/texenv.h:52:13: note: initializing argument 5 of 'void C3D_TexEnvSrc(C3D_TexEnv*, C3D_TexEnvMode, GPU_TEVSRC, GPU_TEVSRC, GPU_TEVSRC)'
52 | GPU_TEVSRC s3 _C3D_DEFAULT(GPU_PRIMARY_COLOR))
| ^
make[1]: *** [/opt/devkitpro/devkitARM/base_rules:80: RenderCore.o] Error 1
make: *** [Makefile:129: build] Error 2
Make or send failed

Set up Unit Tests

Setting up Unit Tests should serve to increase confidence in the library while using Travis CI to automatically check any PRs or commits would further aid in collaboration. For a unit test library, I would recommend https://github.com/philsquared/Catch due to its simplicity.

Implementing this would require the following changes:

  • Activate TravisCI integration (free for open source projects, can only be done by owner)
  • Create a travis.yml file which specifies environment setup
  • Add a badge to the README.md file
  • Crete a two line .cc file to include Catch into the project
  • Setup a Makefile to support make test or create a separate test script

Please note that I consider adding actual test cases a separate, larger issue.

I would be happy to work on a PR to set up unit testing, however, I might need some help with the Makefile.

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.