Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

M3diaLib 3DS: Difference between revisions

From GameBrew
No edit summary
m (Text replacement - "Category:PC utilities for 3DS homebrew" to "")
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Infobox-3DS-Homebrews
{{Infobox 3DS Homebrews
| title = m3diaLib
|title=m3diaLib
| type = PC Utilities
|image=M3dialib2.png
| version=v0.2.2-beta
|description=A C++ library for easier homebrew development for the Nintendo 3DS.
| lastupdated = 2018/10/09
|author=m3diaLib-Team
| licence = Mixed
|lastupdated=2018/10/09
| author = m3diaLib-Team
|type=Developments
| website = https://github.com/m3diaLib-Team/m3diaLib-CTR
|version=0.2.2-beta
| download = https://dlhb.gamebrew.org/3dshomebrew/m3diaLib.rar
|license=Mixed
| source = https://github.com/m3diaLib-Team/m3diaLib-CTR
|download=https://dlhb.gamebrew.org/3dshomebrews/m3dialib.7z
|website=https://github.com/m3diaLib-Team/m3diaLib-CTR
|source=https://github.com/m3diaLib-Team/m3diaLib-CTR
}}
}}
{{Obsolete}}


= m3diaLib =
m3diaLib (spelled media-lib) is a fast, extensive and powerful allround media and game library for the Nintendo 3DS, written in C++. The library is split into multiple modules, which can then be split into smaller parts.
A fast, extensive and powerful allround media and game library for the Nintendo 3DS, written in C++.
 
==== Click [[#installation|here]] to get to the installation instructions. ====
'''Note:''' This library is deprecated. You should use libctru and citro3d/2d directly, if possible.
==== This library is still in beta! If you have any issues or find any bugs, please report them! ====
 
== Features ==
==Features==
The m3diaLib (spelled media-lib) is split into multiple modules, which can then be split into smaller parts:
* Core:
=== Core ===
** A class for running your homebrew app.
The core module contains all functionality for interacting with the system. Its features range from running and handling the app itself to displaying errors and running system applets. '''Its main features are:'''
** Easy interaction with the system itself.
* A class for running your homebrew app
** Starting and running applets.
* Easy interaction with the system itself
** Time measurement.
* Starting and running applets
** Support for the RomFS.
* Time measurement
** Multithreading and concurrency.
* Support for the RomFS
* Input:
* Multithreading and concurrency
** Handling button input.
=== Input ===
** Handling touch input.
The input module does what its name says: It handles each and every input for interacting with the user. '''Its main features are:'''
* Graphics:
* Handling button input
** Support for the top and bottom screen.
* Handling touch input
** Support for stereoscopic 3D.
=== Graphics ===
** Easy-to-use interface for fast rendering on both screens.
The graphics module is by far the biggest module. It handles anything graphic-wise, from rendering simple shapes to rendering and animating high-quality textures. '''Its main features are:'''
** Support for transformation of textures and sprites.
* Support for the top and bottom screen
** Pre-coded shapes as well as a shape class for easily rendering your own shapes.
* Support for stereoscopic 3D
** Easy-to-use color system.
* Easy-to-use interface for fast rendering on both screens
** Collision detection.
* Support for transformation of textures and sprites
* Audio:
* Pre-coded shapes as well as a shape class for easily rendering your own shapes
** Loading or streaming audio files directly from the file system.
* Easy-to-use color system
** Support for .wav and .mp3.
* Collision detection
** Two different classes, sound and music, which have features that can be helpful specific in their use case.
=== Audio ===
* Utils:
The audio module can be used for both music and sound effects. '''Its main features are:'''
** Basic encryption.
* Loading or streaming audio files directly from the file system
 
* '''Support for .wav and .mp3 (more to come!)'''
===Installation===
* Two different classes, sound and music, which have features that can be helpful specific in their use case
To install the library, download the latest build and then execute the command:
=== Utils ===
 
The utils module contains all kind of useful utilities. Some of its functionalities are the following:
make install
* Basic encryption
 
-----
If you want to build it from the source, download the latest release and then execute the following commands:  
All features are well documented [https://docs.stunthacks.eu/m3dialib/ here]. Examples can be viewed [https://github.com/StuntHacks/m3d-examples here].
 
== How to use it ==
make
make install
 
'''Note:''' Make sure, to have the latest version of the devkitPro-toolchain installed, before building the lib or any examples.
 
==User guide==
===How to use===
The barebones of a homebrew app using the m3diaLib would look like this:
The barebones of a homebrew app using the m3diaLib would look like this:
<source lang="cpp">#include <m3dia.hpp>
<source lang="cpp">#include <m3dia.hpp>
Line 60: Line 69:
}
}
</source>
</source>
Easy, isn't it?
 
== Planned features: ==
===Dependencies===
==== Audio: ====
* Microphone support
* More file formats
==== Core: ====
* Support for all availiable os and system functionality
==== Graphics: ====
* Animation
* RenderTargets
* More file formats for textures
* 3D support
==== Networking: ====
This module isn't availiable at the moment. However, it's planned features are:
* A simple HTTP and WebSocket client and server
* Socket support
* A 3DS-download-game alternative (more on that at a later point)
==== Utils: ====
* ZIP compression and decompression
* JSON and XML parsing
* Secure random numbers ...and anything that strikes my mind in the future.
== Installation ==
To install the library, download the latest build and then execute the command <code>make install</code>. If you want to build it from the source, download the latest release and then execute the following commands:
<pre>make
make install
</pre>
'''Note:''' Make sure, to have the latest version of the devkitPro-toolchain installed, before building the lib or any examples.
== Dependencies ==
To compile a m3diaLib-app, you need the following dependencies installed (install via [https://devkitpro.org/wiki/devkitPro_pacman devkitPro-pacman]):
To compile a m3diaLib-app, you need the following dependencies installed (install via [https://devkitpro.org/wiki/devkitPro_pacman devkitPro-pacman]):
* 3dstools
* 3dstools
Line 99: Line 82:
* 3ds-libpng
* 3ds-libpng
* 3ds-freetype
* 3ds-freetype
* tex3ds (if you want to use spritesheets) Use this command to automatically install all necessary dependencies: <code>sudo dkp-pacman -S 3ds-dev 3ds-zlib 3ds-tinyxml2 3ds-mpg123 3ds-libpng</code>
* tex3ds (if you want to use spritesheets)  
== Credits ==
 
Use this command to automatically install all necessary dependencies:  
sudo dkp-pacman -S 3ds-dev 3ds-zlib 3ds-tinyxml2 3ds-mpg123 3ds-libpng
 
===Useful links===
* [https://docs.stunthacks.eu/m3dialib Documentation].
* [https://github.com/StuntHacks/m3d-examples Examples].
 
==Credits==
* [https://github.com/smealum/ctrulib/ ctrulib]
* [https://github.com/smealum/ctrulib/ ctrulib]
* [https://github.com/fincs/citro3d citro3d] (zLib)
* [https://github.com/fincs/citro3d citro3d] (zLib)
Line 106: Line 97:
* [https://github.com/Bly7/OBJ-Loader OBJ-Loader] (MIT)
* [https://github.com/Bly7/OBJ-Loader OBJ-Loader] (MIT)
* [https://github.com/mariohackandglitch/ctr-led-brary ctr-led-brary]
* [https://github.com/mariohackandglitch/ctr-led-brary ctr-led-brary]
==External links==
* GitHub - https://github.com/m3diaLib-Team/m3diaLib-CTR
* Documentation - [https://web.archive.org/web/20181028151709/https://docs.stunthacks.eu/m3dialib/ https://docs.stunthacks.eu/m3dialib] (archived)
* GBAtemp - https://gbatemp.net/threads/release-m3dialib-a-c-library-for-easier-homebrew-development-for-the-nintendo-3ds.517929
* Reddit - https://www.reddit.com/r/3dshacks/comments/9fgmkc/release_m3dialib_a_c_library_for_easier_homebrew

Latest revision as of 04:23, 6 Mayıs 2024

m3diaLib
M3dialib2.png
General
Authorm3diaLib-Team
TypeDevelopments
Version0.2.2-beta
LicenseMixed
Last Updated2018/10/09
Links
Download
Website
Source

m3diaLib (spelled media-lib) is a fast, extensive and powerful allround media and game library for the Nintendo 3DS, written in C++. The library is split into multiple modules, which can then be split into smaller parts.

Note: This library is deprecated. You should use libctru and citro3d/2d directly, if possible.

Features

  • Core:
    • A class for running your homebrew app.
    • Easy interaction with the system itself.
    • Starting and running applets.
    • Time measurement.
    • Support for the RomFS.
    • Multithreading and concurrency.
  • Input:
    • Handling button input.
    • Handling touch input.
  • Graphics:
    • Support for the top and bottom screen.
    • Support for stereoscopic 3D.
    • Easy-to-use interface for fast rendering on both screens.
    • Support for transformation of textures and sprites.
    • Pre-coded shapes as well as a shape class for easily rendering your own shapes.
    • Easy-to-use color system.
    • Collision detection.
  • Audio:
    • Loading or streaming audio files directly from the file system.
    • Support for .wav and .mp3.
    • Two different classes, sound and music, which have features that can be helpful specific in their use case.
  • Utils:
    • Basic encryption.

Installation

To install the library, download the latest build and then execute the command:

make install

If you want to build it from the source, download the latest release and then execute the following commands:

make
make install

Note: Make sure, to have the latest version of the devkitPro-toolchain installed, before building the lib or any examples.

User guide

How to use

The barebones of a homebrew app using the m3diaLib would look like this:

#include <m3dia.hpp>
int main() {
m3d::Applet app;
while (app.isRunning()) {
if (m3d::buttons::buttonPressed(m3d::buttons::Button::Start)) {
app.exit(); // exit if start is pressed
}
}
}

Dependencies

To compile a m3diaLib-app, you need the following dependencies installed (install via devkitPro-pacman):

  • 3dstools
  • picasso
  • libctru
  • citro3d
  • citro2d
  • 3ds-tinyxml2
  • 3ds-zlib
  • 3ds-mpg123
  • 3ds-libpng
  • 3ds-freetype
  • tex3ds (if you want to use spritesheets)

Use this command to automatically install all necessary dependencies:

sudo dkp-pacman -S 3ds-dev 3ds-zlib 3ds-tinyxml2 3ds-mpg123 3ds-libpng

Useful links

Credits

External links

Advertising: