Skip to content

Commit

Permalink
LÖVE Potion 3.0 (#213)
Browse files Browse the repository at this point in the history
* make 3.0 code public

* switch has inputs

* lots of joystick stuff

* fix icon paths, 3ds building

* woops, fix this typo

* more wii u stuff, getFriendCode -> getFriendInfo

* more wii u stuff

* use auto for this

* Wii U input works

* woops fix Wii U CI

* wii u: attempt to allow other controller types

* fix multi button press nonsense

* clean up from logging

* push latest code

* split pkglist, update wiiu input stuff

* get some vibration (wip) into switch

* get sixaxis stuff on 3ds and switch

* update bug report info

* more input-related stuff done

* fix proc ui loop

* switch: gamepadaxis

* switch: vibration pool wip

* wii u: sixaxis and vibrations, more inputs

* get dsp drivers made

* start work on 3ds audio

* weee work on the 3ds Source class

* fix 3ds building

* more 3ds audio work

* 3ds static sources work

* don't pwn memory with copy_n

* some wii u dsp driver stuff

* audio update callback for wii u

* quit AX when driver is done

* use AXAcquireVoice instead of new'ng an AXVoice

* most of 3ds Source stuff works

* some more 3ds source things

* we fix this because variable names are hard

* we add this because wasting commits I guess  :bones:

* Constexpr map deduction guides (#180)

The failures are simply because the other builds don't have the necessary files/classes yet. Merging,

* Fix some uncaught map compilation errors (#181)

Wii U doesn't compile right now so I missed them

* some fixes

* bidirectionalmap: fix population size issue

* Upgrade bidirectionalmap once again (#182)

* Upgrade bidirectionalmap once again
std::optional and std::span edition

* Oh this apparently works

* do not give things samplerate-level channel counts

* we want to set VoiceVe delta, also fix typo

* switch audio

* fix 3ds building

* some Wii U audio stuff

* fix some stuff up for now

* we have some wii u audio working

* make stereo audio work properly

* more dsp stuff for wii u

* wii u: audio works except streaming

* wii u: streaming audio is flaky and broken-ish

* clang-format 15, fancy version struct stuff from piepie

* fix building

* luasocket 3.1.0, use patchfiles

* fix some files

* 3ds luasocket patching

* switch luasocket patches

* wii u luasocket patches

* update wii u luasocket, audio streaming kinda works better

* Feature/wiiu sdl2 mixer (#184)

* mixer stuff

* static sources work

* audio streams work

* fix hang on exit because OSWaitEvent sucks

* init wireless for 3ds and switch on boot

* we need to free this, so include cstdlib

* redo userAppInit for 3ds and switch, getPreferredLocales and getModel for Wii U

* properly exit early checks

* update build.yml to maybe fix luasocket patching

* fix syntax oops

* keyboard stuff

* setTextInput works on all platforms

* remove swkbdthread

* we do a little bit of graphics work, as a treat

* ctr renderer work

* 3ds basic clearing stuff

* minor code cleanup

* switch rendering work

* switch basic clear color

* some Wii U basic clear and present

* we did it reddit: wii clear and present

* fix 3ds compilations

* 3ds: font module, fix Color::rgba

* 3ds: lua-implemented Font:getWrap

* add explicit credits to LÖVE repo for Font:getWrap

* some font stuff

* 3ds fonts work

* fix 3ds compile

* 3ds text rendering

* we want to add C2D_WordWrap

* fix this bit here

* some image module work

* 3ds image module stuff

* fix up a few more things

* more image module work

* texture work

* more texture work

* lots of texture + imagedata work on 3ds

* more 3ds texture work

* 3ds textures finally work

* transform, randomgenerator, and beziercurve

* fix 3ds compilation

* enable Transforms for CheckStandardTransform

* fix casing on function

* lots of switch work

* more fixes with loading textures and fonts

* switch: text rendering

* Wii U shader class

* overhaul wii u renderer to use gx2 (wip)

* add a bit more to the present function

* move context state set after clear color

* lots more Wii U things, it builds again

* add this SetContextState

* more fixes for wii u renderer

* screen clearing

* cafe: shader and texture work

* cafe: texture rending attempt

* push more cafe rendering stuff

* more cafe texture work

* update utf8 lib, more cafe texture stuff

* almost there

* set the proper blend mode

* fix fonts and rasterizers

* more wii u stuff

* cafe: move framebuffers to their own class

* cafe: add depth buffer

* cafe: do proper depth buffers for both screens

* remove lots of logging header includes, cafe: add winding/culling

* cafe: set shader mode

* fix up ctr compilation

* hac and cafe: add printf, remaining functions for Fonts

* screen variables are inline, not static

* finish up some Font stuff, etc

* push some updates

* sync some more changes

* ( ͡° ͜ʖ ͡°)

* update lua-https so that it works again

* sensor module work

* more sensor work

* sensor cleanup + split wii u joystick stuff

* wii u pro controller

* cleanup and fixes

* this should be vector

* re-enable touch on Wii U

* add some things from LÖVE 12 for Data objects

* add getDepth, bit module

* Clean up Graphics module and more (#195)

* sync stuff we have so far

* 3ds primitives

* fix an issue with variants and tables

* remove unused font code, fix replace pixels

* update these files

* fix custom font loading.. again

* push nestlink changes

* some imagedata fixes

* actually fix this

* make variants 1:1 with LÖVE, some fixes from LÖVE

* upgrade lua-https

* 3ds: textbatch and fix scissors

* switch: primitives

* polyline

* primitives for wii u and switch

* implement a few more things

* joysticksensorupdated callback, split workflows

* update the README

* make sure we can type urls properly

* add Discord server badge

* Actually use invite link for discord

* update license

* rename the job names so they're more verbose

* Update LICENSE.md

* these need to be valid names

* this wasn't valid either

* textbatches

* clean up wii u stuff

* fix font:getWrap on switch and wii u

* some more cleanup

* fix the warning about non-trivial clearing

* fix switch setColorMask

* fix some small bits

* push wii u build fixes

* backport looping audio fix to 3.0

* update shader

* file writing bug fix

* use new lua51 package

* Dev/citro3d (#200)

* framebuffers work

* actually map triangle fan

* primitives

* text rendering

* use a single vertex buffer on 3ds

* flush on target change

* push some rework for optimizations

* ( ͡° ͜ʖ ͡°) optimized

* canvases, as a treat

* fix switch and wii u building locally

* move this around

* minor fixes

* fix wii u stuff

* Dev/3.0 canvases (#201)

* initial work

* push latest changes

* add graphics_ext

* minor adjustments and additions

* do this properly

* more changes and fixes

* shader inverts y texcoord

* almost got it working

* 3ds canvases

* switch canvases

* push some wii u changes

* push changes for wii u canvases

* wii u canvases ( ͡° ͜ʖ ͡°)

* Implement SpriteBatch (#202)

* initial work

* more fixes and adjustments

* ( ͡° ͜ʖ ͡°)batches (except wii u is being weird atm)

* lennybatches for wii u

* use a vector not raw pointer

* Implement basic standard Mesh objects (#203)

* start working on meshes

* yay meshes

* [Code Health] Font and TextBatch Code Cleanup (#204)

* clean up fonts - but they're broken right now

* minor adjustments

* fix up fonts and textbatches

* make sure wii u builds

* fix points on 3ds

* make Thread a single class, make sure Data can be used for newImage, and fix Channel supply/demand

* some more changes

* check using joinable

* make sure dspfirm.cdc error displays

* use the new nogame

* release builds also fetch elf files

* Compressed Texture Support (#207)

* rework ImageData, dds works

* fix astc loading

* clean up bidirectionalmap

* ktx compressed textures

* finish cleaning up imagedata

* fix imagedata:setPixel

* add encoding image data

* HID refactoring

* datastream does not own its memory

* 3ds: add getMasterVolume/ChannelVolume

* fix some bugs, go back to c++20

* woops, need to pass size

* stupid find and replace

* Fonts: Revise and use TextShaper (#208)

* add text shaper stuff

* fix some things temp

* finish switch text shaper stuff

* shape text

* fix switch fonts a bit

* build fixes woops

* minor fixes

* adjustments

* make Font:getWrap common

* bearing y is added on 3ds

* Implement BMFont and Image Rasterizers (#209)

* image and bmfont rasterizers

* hook up functions

* use luaL_error here

* finalize BMFont and Image rasterizers

* remove unneeded method

* small adjustment

* 3ds: clamp between -1.0f and 1.0f

* Implement love.physics (#211)

* basic physics module work

* shapes 'n bodies

* ALL the joints

* need to actually have PushJoint functional

* push Body shape properly

* fix touch release event, woops

---------

Co-authored-by: Chris Feger <[email protected]>
  • Loading branch information
TurtleP and piepie62 authored Oct 16, 2023
1 parent 5dbcab7 commit 2eee361
Show file tree
Hide file tree
Showing 1,261 changed files with 93,205 additions and 74,367 deletions.
282 changes: 208 additions & 74 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -1,79 +1,213 @@
---
BasedOnStyle: Microsoft
AccessModifierOffset: '-2'
---
Language: Cpp
AccessModifierOffset: -2
AlignAfterOpenBracket: Align
AlignConsecutiveMacros: 'true'
AlignConsecutiveAssignments: 'true'
AlignEscapedNewlines: 'Left'
AlignTrailingComments: 'true'
AllowAllArgumentsOnNextLine: 'true'
AllowAllConstructorInitializersOnNextLine: 'false'
AllowShortLambdasOnASingleLine: 'All'
AlwaysBreakTemplateDeclarations: 'Yes'
BinPackArguments: 'true'
BinPackParameters: 'true'
AlignArrayOfStructures: Right
AlignConsecutiveAssignments:
Enabled: true
AcrossEmptyLines: false
AcrossComments: false
AlignCompound: false
PadOperators: true
AlignConsecutiveBitFields:
Enabled: false
AcrossEmptyLines: false
AcrossComments: false
AlignCompound: false
PadOperators: false
AlignConsecutiveDeclarations:
Enabled: false
AcrossEmptyLines: false
AcrossComments: false
AlignCompound: false
PadOperators: false
AlignConsecutiveMacros:
Enabled: true
AcrossEmptyLines: false
AcrossComments: false
AlignCompound: false
PadOperators: true
AlignEscapedNewlines: Left
AlignOperands: Align
AlignTrailingComments: true
AllowAllArgumentsOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortEnumsOnASingleLine: false
AllowShortBlocksOnASingleLine: Never
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: None
AllowShortLambdasOnASingleLine: All
AllowShortIfStatementsOnASingleLine: Never
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: Yes
AttributeMacros:
- __capability
BinPackArguments: true
BinPackParameters: true
BraceWrapping:
AfterCaseLabel: 'true'
AfterClass: 'true'
AfterControlStatement: 'true'
AfterEnum: 'true'
AfterFunction: 'true'
AfterNamespace: 'true'
AfterObjCDeclaration: 'true'
AfterStruct: 'true'
AfterUnion: 'true'
AfterExternBlock: 'true'
BeforeCatch: 'true'
BeforeElse: 'true'
IndentBraces: 'false'
SplitEmptyFunction: 'false'
SplitEmptyRecord: 'true'
SplitEmptyNamespace: 'false'
BreakBeforeBraces: 'Custom'
BreakBeforeTernaryOperators: 'true'
IncludeBlocks: 'Preserve'
AfterCaseLabel: true
AfterClass: true
AfterControlStatement: Always
AfterEnum: true
AfterFunction: true
AfterNamespace: true
AfterObjCDeclaration: true
AfterStruct: true
AfterUnion: true
AfterExternBlock: true
BeforeCatch: true
BeforeElse: true
BeforeLambdaBody: false
BeforeWhile: false
IndentBraces: false
SplitEmptyFunction: false
SplitEmptyRecord: true
SplitEmptyNamespace: false
BreakBeforeBinaryOperators: None
BreakBeforeConceptDeclarations: Always
BreakBeforeBraces: Custom
BreakBeforeInheritanceComma: false
BreakInheritanceList: BeforeColon
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: false
BreakConstructorInitializers: AfterColon
BreakAfterJavaFieldAnnotations: false
BreakStringLiterals: true
ColumnLimit: 100
CommentPragmas: "^ IWYU pragma:"
QualifierAlignment: Leave
CompactNamespaces: false
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: false
DeriveLineEnding: true
DerivePointerAlignment: false
DisableFormat: false
EmptyLineAfterAccessModifier: Never
EmptyLineBeforeAccessModifier: LogicalBlock
ExperimentalAutoDetectBinPacking: false
PackConstructorInitializers: CurrentLine
BasedOnStyle: ""
ConstructorInitializerAllOnOneLineOrOnePerLine: false
AllowAllConstructorInitializersOnNextLine: true
FixNamespaceComments: true
ForEachMacros:
- foreach
- Q_FOREACH
- BOOST_FOREACH
IfMacros:
- KJ_IF_MAYBE
IncludeBlocks: Preserve
IncludeCategories:
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
Priority: 2
SortPriority: 0
- Regex: '^(<|"(gtest|gmock|isl|json)/)'
Priority: 3
SortPriority: 0
- Regex: '.*'
Priority: 1
SortPriority: 0
IncludeIsMainRegex: '(Test)?$'
IncludeIsMainSourceRegex: ''
BreakConstructorInitializers: 'AfterColon'
BreakInheritanceList: 'BeforeColon'
ColumnLimit: '100'
CommentPragmas: '^ IWYU pragma:'
CompactNamespaces: 'false'
ConstructorInitializerAllOnOneLineOrOnePerLine: 'true'
ContinuationIndentWidth: '4'
Cpp11BracedListStyle: 'false'
DerivePointerAlignment: 'false'
IndentCaseLabels: 'true'
IndentPPDirectives: 'BeforeHash'
IndentWidth: '4'
Language: 'Cpp'
NamespaceIndentation: 'All'
PointerAlignment: 'Left'
SpaceAfterCStyleCast: 'false'
SpaceAfterLogicalNot: 'false'
SpaceAfterTemplateKeyword: 'false'
SpaceBeforeAssignmentOperators: 'true'
SpaceBeforeCpp11BracedList: 'true'
SpaceBeforeCtorInitializerColon: 'true'
SpaceBeforeInheritanceColon: 'true'
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
Priority: 2
SortPriority: 0
CaseSensitive: false
- Regex: '^(<|"(gtest|gmock|isl|json)/)'
Priority: 3
SortPriority: 0
CaseSensitive: false
- Regex: ".*"
Priority: 1
SortPriority: 0
CaseSensitive: false
IncludeIsMainRegex: "(Test)?$"
IncludeIsMainSourceRegex: ""
IndentAccessModifiers: false
IndentCaseLabels: true
IndentCaseBlocks: false
IndentGotoLabels: true
IndentPPDirectives: BeforeHash
IndentExternBlock: AfterExternBlock
IndentRequiresClause: false
IndentWidth: 4
IndentWrappedFunctionNames: false
InsertBraces: false
InsertTrailingCommas: None
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: true
LambdaBodyIndentation: Signature
MacroBlockBegin: ""
MacroBlockEnd: ""
MaxEmptyLinesToKeep: 1
NamespaceIndentation: All
ObjCBinPackProtocolList: Auto
ObjCBlockIndentWidth: 2
ObjCBreakBeforeNestedBlockParam: true
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true
PenaltyBreakAssignment: 2
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakOpenParenthesis: 0
PenaltyBreakString: 1000
PenaltyBreakTemplateDeclaration: 10
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 1000
PenaltyIndentedWhitespace: 0
PointerAlignment: Left
PPIndentWidth: -1
ReferenceAlignment: Pointer
ReflowComments: true
RemoveBracesLLVM: false
RequiresClausePosition: OwnLine
SeparateDefinitionBlocks: Leave
ShortNamespaceLines: 1
SortIncludes: CaseSensitive
SortJavaStaticImport: Before
SortUsingDeclarations: true
SpaceAfterCStyleCast: false
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeCaseColon: false
SpaceBeforeCpp11BracedList: true
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: 'true'
SpaceInEmptyParentheses: 'false'
SpacesInAngles: 'false'
SpacesInCStyleCastParentheses: 'false'
SpacesInParentheses: 'false'
SpacesInSquareBrackets: 'false'
SpaceBeforeParensOptions:
AfterControlStatements: true
AfterForeachMacros: true
AfterFunctionDefinitionName: false
AfterFunctionDeclarationName: false
AfterIfMacros: true
AfterOverloadedOperator: false
AfterRequiresInClause: false
AfterRequiresInExpression: false
BeforeNonEmptyParentheses: false
SpaceAroundPointerQualifiers: Default
SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyBlock: false
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: Never
SpacesInConditionalStatement: false
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInLineCommentPrefix:
Minimum: 1
Maximum: -1
SpacesInParentheses: false
SpacesInSquareBrackets: false
SpaceBeforeSquareBrackets: false
BitFieldColonSpacing: Both
Standard: Auto
TabWidth: '4'
UseTab: 'Never'
...
StatementAttributeLikeMacros:
- Q_EMIT
StatementMacros:
- Q_UNUSED
- QT_REQUIRE_VERSION
TabWidth: 4
UseCRLF: false
UseTab: Never
WhitespaceSensitiveMacros:
- STRINGIZE
- PP_STRINGIZE
- BOOST_PP_STRINGIZE
- NS_SWIFT_NAME
- CF_SWIFT_NAME
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
*.jpg binary
*.png binary
*.dksh binary
*.gsh binary
62 changes: 62 additions & 0 deletions .github/workflows/Nintendo 3DS.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Nintendo 3DS

on:
push:
branches:
- dev/3.0
pull_request:

jobs:
N3DS-Release:
runs-on: ubuntu-latest

container:
image: docker://devkitpro/devkitarm
options: --cpus 2

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Configure
run: /opt/devkitpro/portlibs/3ds/bin/arm-none-eabi-cmake -S . -B build

- name: Build
run: make -C build

- id: commit
uses: pr-mpt/actions-commit-hash@v1

- uses: actions/upload-artifact@v2
with:
name: Nintendo 3DS-${{ steps.commit.outputs.short }}
path: |
build/*.elf
build/*.3dsx
N3DS-Debug:
runs-on: ubuntu-latest

container:
image: docker://devkitpro/devkitarm
options: --cpus 2

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Configure
run: /opt/devkitpro/portlibs/3ds/bin/arm-none-eabi-cmake -DCMAKE_BUILD_TYPE=Debug -S . -B build

- name: Build
run: make -C build

- id: commit
uses: pr-mpt/actions-commit-hash@v1

- uses: actions/upload-artifact@v2
with:
name: Nintendo 3DS (Debug)-${{ steps.commit.outputs.short }}
path: |
build/*.elf
build/*.3dsx
Loading

0 comments on commit 2eee361

Please sign in to comment.