summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-05-263DFileViewer: Support textured modelsJesse Buhagiar
Models that contain UV co-ordinates are now supported, and will display with a texture wrapped around it, provided a `bmp` with the same name as the object is in the same directory as the 3D Model.
2021-05-26LibGL: Add texture sampling to SW RasterizerJesse Buhagiar
The software rasterizer now samples a texture passed to us from the GL context. This is currently a bit of a hack, as we should be scanning from a list of texture units and checking if they are enabled. For now, this at least gives some visual confirmation that texturing is working as it should
2021-05-26LibGL: Implement glTexCoord2fJesse Buhagiar
2021-05-26LibGL: Implement Texture State ManagementJesse Buhagiar
Some very primitive Texture State management. Data can now be uploaded to textures.
2021-05-26LibGL: Add Texture Name AllocationJesse Buhagiar
Texture names can now be allocated via `glGenTextures` and deallocated via `glDeleteTextures`.
2021-05-26LibGL: Change GLsizei from unsigned to signed integral typeJesse Buhagiar
There is some really wild stuff going on in the OpenGL spec for this.. The Khronos website states that GLsizei is a 32-bit non-negative value used for sizes, however, some functions such as `glGenTextures` state that the input `n` could be negative, which implies signage. Most other implementations of `gl.h` seem to `typedef` this to `int` so we should too.
2021-05-26AK: Implement AK::StackJesse Buhagiar
2021-05-26Base: Add a WebAssembly mandelbrot demoAli Mohammad Pur
This is now good enough to make a showcase of :P
2021-05-26LibJS+LibWeb: Make Uint8ClampedArray use TypedArrayAli Mohammad Pur
Instead of being its own separate unrelated class. This automatically makes typed array properties available to it, as well as making it available to the runtime.
2021-05-26LibWasm: Add execution hooks and a debugger mode to the wasm toolAli Mohammad Pur
This is useful for debugging *our* implementation of wasm :P
2021-05-26LibCore: Add a standard error stream getterAli Mohammad Pur
2021-05-26LibWasm: Drop previous frame when a structured end instruction is runAli Mohammad Pur
2021-05-26LibWasm: Turn memory read failures into trapsAli Mohammad Pur
2021-05-26LibWasm: Once more fix structured instruction label indicesAli Mohammad Pur
This finally works correctly. :tm:
2021-05-26LibWasm: Drop the correct number of framesAli Mohammad Pur
Prior to this commit, we would be dropping an extra frame.
2021-05-26LibWasm: Implement checked truncation instructionsAli Mohammad Pur
This implements the 8 i<n>.truncate.f<n>_<s> instructions.
2021-05-26AK: Define MakeSigned<...>::Type as void in the base structAli Mohammad Pur
This was probably forgotten in the last rewrite, this would make IsIntegeral<T> not work for floating points.
2021-05-26LibWasm+LibWeb: Partially resolve memory exportsAli Mohammad Pur
This allows the JS side to access the wasm memory, assuming it's exported by the module. This can be used to draw stuff on the wasm side and display them from the js side, for example :^)
2021-05-26LibWasm: Correct memory init size when instantiatingAli Mohammad Pur
These limits are in units of page size, not bytes. Also fixes incorrect debug logs.
2021-05-26LibJS: Allow ArrayBuffer to not own its backing data buffer as wellAli Mohammad Pur
This is implemented as a ByteBuffer* in a variant, so its size should only be increased by an index.
2021-05-26LibWasm+LibWeb: Implement (a very basic version of) the JS link/importAli Mohammad Pur
This allows Wasm code to call javascript functions.
2021-05-26LibWeb: Implement a very basic WebAssembly JS APIAli Mohammad Pur
This impl is *extremely* simple, and is missing a lot of things, it's also not particularly spec-compliant in some places, but it's definitely a start :^)
2021-05-26js: Consolidate and re-implement the load() functionLinus Groh
This replaces the two sloppy copies of the load() function with a cleaned up implementation: - Only use the first argument, to load multiple files just call the function multiple times - Fix a crash when using any non-string argument - Throw an error if the file can't be opened instead of logging to stderr - Don't use parse_and_run(), which would print the AST of the loaded file when using -A, for example - it's used either way as the entry point in both REPL and non-REPL mode, so we already get exception handling and all that
2021-05-26js: Use default constructor and destructor for global objectsLinus Groh
2021-05-26js: Define load() in global object for scriptsMarcin Gasperowicz
Having load() present is required in order to run test262.
2021-05-25Kernel: Don't try to send TCP packets larger than the MSSGunnar Beutner
Previously TCPSocket::send_tcp_packet() would try to send TCP packets which matched whatever size the userspace program specified. We'd try to break those packets up into smaller fragments, however a much better approach is to limit TCP packets to the maximum segment size and avoid fragmentation altogether.
2021-05-25LibCore: Handle partial writes in Socket::send()Gunnar Beutner
Right now Socket::send() assumes that it can send everything in one go. However, send() is allowed to do partial writes and while that can't happen at the moment there's nothing that says this can't happen in the future (like in the next commit).
2021-05-25Solitaire: Persist high score separately per game modeTimothy Flynn
With different scoring rules for one-card vs. three-card draw mode, it makes more sense to separately track their high scores.
2021-05-25Solitaire: Award bonus points based on time elapsedTimothy Flynn
The exact formula used for bonus points seems to vary by implementation. This uses Klondike Solitaire's formula: https://en.wikipedia.org/wiki/Klondike_(solitaire)#Scoring
2021-05-25Solitaire: Tweak scoring for three-card draw modeTimothy Flynn
Currently, the player loses 100 points each time the waste stack is recycled. In three-card draw mode, it's standard to only lose 20 points after the third recycle event.
2021-05-25Solitaire: Remove dead call to Game::start_game_over_animationTimothy Flynn
This invocation will exit immediately. There's also no reason to invoke stop_game_over_animation here because that's the first thing that will happen in the call to setup.
2021-05-25Solitaire: Only update high score after a victorious gameTimothy Flynn
Doesn't make much sense to update the high score on a lost game.
2021-05-25Hearts: Don't advance the game's state when an animation is playingGunnar Beutner
Previously we'd end up cancelling an animation that was still playing when the user selects a card.
2021-05-25Hearts: Fix animations that get stuck "mid-flight"Gunnar Beutner
When an animation is stopped the cards should be moved to their final position anyway. Otherwise they might end up getting stuck in the middle of the animation.
2021-05-25Hearts: Add support for playing more than one handGunnar Beutner
This changes the game so that more than one hand can be played. Once one player has 100 or more points the game ends. A score card is shown between each hand. Fixes #7374.
2021-05-25Hearts: Let the AI continuously play gamesGunnar Beutner
When there are no human players (toggled with Shift-F10) the AI will continuously start new games when the current game has finished.
2021-05-25Hearts: Implement passing cards to other playersGunnar Beutner
Fixes #7375.
2021-05-25Hearts: Move card click handler into a separate methodGunnar Beutner
2021-05-25Hearts: Move sorting helper from Player::pick_lead_card into a methodGunnar Beutner
2021-05-25Hearts: Move code to reposition cards into a separate methodGunnar Beutner
2021-05-25Hearts: Move round initialization into a separate methodGunnar Beutner
2021-05-25Hearts: Move hand sorting functionality into a methodGunnar Beutner
2021-05-25LibTest: Use fstatat() to speed up iterate_directory_recursively()Andreas Kling
Employ the same technique as SpaceAnalyzer to avoid doing full path resolution in the kernel over an over. Starting each path resolution from the base of the directory iterator (using its fd) is significantly faster and reduces test-js runtime by ~3%.
2021-05-25LibJS: Fix broken dbgln_if(HEAP_DEBUG)Andreas Kling
2021-05-25Profiler: Hide timeline scrollbars if we don't need them :^)Andreas Kling
2021-05-25LibJS: Fix clang-tidy warnings about redundant types in Heap.cppAndreas Kling
2021-05-25LibJS: Fix clang-tidy warnings about unnecessary move()s in VM.cppAndreas Kling
2021-05-25LibJS: Make Value::as_cell() return a Cell&Andreas Kling
2021-05-25LibJS: Make Cell::Visitor::visit_impl() take a Cell&Andreas Kling
Passing a null cell pointer is not supported.
2021-05-25LibJS: Replace Cell live bit with a cell stateAndreas Kling
So far we only have two states: Live and Dead. In the future, we can add additional states to support incremental sweeping and/or multi- stage cell destruction.