Skip to content

Lota 0.6.0

Choose a tag to compare

@Kerrick Kerrick released this 21 Nov 01:52
· 89 commits to trunk since this release

Fixed

  • Lota::Graphics.draw and .draw_layer given nil in place of the quad, then a Lota::Math::Transform, report the missing quad, as LÖVE does, where they reported the Transform.
  • Lota::Graphics::Buffer.new and Lota::Graphics::Mesh.new with a format of its own report an unknown usage, or mesh mode, before a fault in the format, as LÖVE does.
  • Lota::Graphics::TextBatch#setf checks its wrap limit and alignment before its text, as LÖVE does.
  • Lota::Graphics::Buffer.new raises TypeError for a usage or debugname that is not a name or text, before reading the format, as LÖVE does, where it read them as text after the format.
  • Lota::Graphics.draw_from_shader raises TypeError for a nil count, where it drew nothing, and .draw_from_shader_indirect given a primitive checks its name before its buffer, as LÖVE does.
  • Lota::Graphics::Mesh.new raises TypeError for a usage that is not a name, where it ignored one in the standard form, checks the mode and usage before the vertex format, and raises TypeError for an older format entry whose name or type is nil or a boolean, as LÖVE does.
  • Lota::Graphics::Mesh#set_vertex_map given a Data and no index type, or nil, raises TypeError, as LÖVE does, where it raised IndexError or an unknown-type error.
  • Lota::Graphics.readback_texture and .readback_texture_async raise TypeError for a texture that is not a Lota::Graphics::Texture, before checking the other arguments, as LÖVE does, where they raised NoMethodError.
  • Lota::Graphics::TextBatch#add and #addf raise TypeError for a placement value that is not a number, as LÖVE does, where they dropped it and read the numbers after it in its place.
  • Lota::Graphics.clear(nil) clears to transparent black, and Lota::Graphics.scissor = four nils or an empty Array stops clipping, as LÖVE does, where they raised.
  • Lota::Graphics.set_canvas(depthstencil: target) with no canvases draws to that target alone, and Lota::Graphics.canvas is then empty, as LÖVE does, where it drew to the window again.
  • Lota::Graphics::Texture#replace_pixels takes a Lota::Image::CompressedImageData, and the mipmap of it to copy as a new last argument, as LÖVE does, where it raised TypeError.
  • Lota::Graphics::SpriteBatch#add, #set, #add_layer, and #layer= take a Lota::Math::Transform in place of the numbers, after the quad when there is one, as LÖVE does, where they raised TypeError.
  • Lota::Joystick.save_gamepad_mappings with a file name raises the message of a write that fails, as LÖVE does, where it returned the mappings as if it had written them.
  • Lota::Mouse.down? takes its buttons as one Array, as LÖVE's isDown takes a table, where it raised TypeError.
  • Lota::Event.push raises TypeError for a name that is neither a Symbol nor a String before it reads the arguments, as LÖVE does, where it queued the name's to_s.
  • Lota::Sensor.enabled= raises TypeError when whether the sensor is on is not true or false, as LÖVE does, where it took any value's truthiness.
  • Lota::Audio::Source#set_effect raises TypeError for an on-or-off value that is not true, false, or nil, as LÖVE does, where it set the effect.
  • Lota::Window.set_mode and update_mode raise TypeError for an x or y that is not a number, as LÖVE does, where a String became 0 and other values raised NoMethodError.
  • Lota::Audio::RecordingDevice#start raises TypeError for samples given as nil, as LÖVE does, where it recorded with the device's last settings and dropped the rest.
  • Lota::Audio::Source#queue raises TypeError for something other than a SoundData, and for an offset or length given as nil or as anything but a number, as LÖVE does, where it raised NoMethodError or queued every sample.
  • Lota::Data::ByteData#string= takes a nil offset as 0, as LÖVE does, where it raised.
  • Lota::Mouse::Cursor.new takes a nil hot spot as 0, as LÖVE does, where it raised.
  • Breaking: Lota::Math::RandomGenerator.new(nil) raises TypeError, as LÖVE's newRandomGenerator(nil) does, where it made a generator from the usual seed; leave the seed out for that.
  • Breaking: Lota::Window.show_message_box with an empty Array of buttons raises RuntimeError, as Lota raises every error LÖVE raises with luaL_error, where it raised ArgumentError.
  • Lota::Filesystem.write, append, and File#write given a negative size return nil and LÖVE's message, "Invalid write size.", as LÖVE does, where they wrote nothing and returned true.
  • Breaking: Lota::Math::Transform#matrix= and Lota::Graphics.projection= check the layout before the elements, and raise TypeError for fewer than sixteen elements, as LÖVE does, where they raised ArgumentError for the count first.
  • Breaking: Lota::Image::ImageData#map_pixel checks the rectangle's numbers before the block, and raises RuntimeError with LÖVE's message for one that is not a number, as LÖVE does, where it raised TypeError, and checked the block first.
  • Lota::Image::ImageData.new with a size checks the size and the format before the kind of its bytes, as LÖVE does, where bytes of the wrong kind raised first.
  • t.externalstorage = true puts an Android game's save directory on the app's external storage, as in LÖVE. Lota kept the setting but never passed it to the engine, so the game saved on internal storage.
  • Lota::Sound::SoundData.new(file, buffer_size, type) decodes the file with that buffer size and stream type, and raises ArgumentError for a stream type LÖVE does not know, as love.sound.newSoundData does; it ignored both. A sample rate, bit depth, or channel count given as nil takes its default, as in LÖVE, where it raised TypeError.
  • Lota::Filesystem.write and append take any Lota::Data, such as a ByteData, as LÖVE does, where they took only a FileData.
  • Every texture constructor (Texture.new, Image.new, ArrayTexture.new, CubeTexture.new, VolumeTexture.new and their Image kin), Lota::Graphics::Font.new, Lota::Graphics::ImageFont.new, Lota::Graphics::Shader.new, ComputeShader.new, and Lota::Graphics.validate_shader take a Lota::Filesystem::File where LÖVE does, and Font.new takes any Lota::Data holding a TrueType font with a size, as LÖVE does.
  • Lota::Sound::Decoder.new and Lota::Audio::Source.new take a Lota::Filesystem::File, decoding from the File itself or with :memory from what it reads, and any Lota::Data, as LÖVE does, where they took only a file name or a FileData; Decoder.new takes a nil buffer size as the default.
  • Lota::Graphics::ComputeShader.new takes a second source, as LÖVE's newComputeShader does, which it reads and looks up as Shader.new reads its second and compiles only when the first is nil.
  • A File that cannot be read raises RuntimeError with LÖVE's message in Lota::Font's rasterizers, where it raised TypeError; ImageFont.new checks its image before its spacing and DPI scale, as LÖVE does; and Shader.new passes over a source argument that is neither a String nor a file, as LÖVE does, where it raised.
  • Lota::Filesystem.mount mounts a File that open_native_file opened, by its filename, as LÖVE does, and reads an append that is not true or false as false, as LÖVE does, where it raised; mount and unmount raise TypeError for any other archive that is neither a String nor a Lota::Data, where they raised NoMethodError.
  • Breaking: Lota::Physics::CircleShape.new, RectangleShape.new, and EdgeShape.new check a destroyed Body before they count the numbers after it, as LÖVE does. EdgeShape.new makes a lone edge when its fifth number is nil, and raises TypeError for a missing number, where it raised ArgumentError for fewer than four and IndexError for five to seven.
  • Lota::Physics::Shape#ray_cast chooses its form as LÖVE does, casting where the Body is unless the seventh argument is given and not nil, and takes a nil child as 1; a nil among the extra arguments raised TypeError.
  • Breaking: Lota::Physics::RevoluteJoint.new, WeldJoint.new, and PrismaticJoint.new raise TypeError for an explicit nil reference angle, as LÖVE does, where they left the angle out; FrictionJoint.new and WheelJoint.new no longer read a value after collide_connected, as LÖVE does not.
  • An explicit nil takes the default, as LÖVE's optional numbers do, for Lota::Physics::RectangleShape.new's angle, Lota::Physics::Fixture.new's density, and the child of Lota::Physics::Shape#compute_aabb and #bounding_box; each raised TypeError.
  • Breaking: Lota::Physics::ChainShape.new and Lota::Physics.new_chain_body raise TypeError for a loop that is not true or false, as LÖVE does; they took nil as false and anything else as true.
  • Breaking: Lota::Physics::Body#world_points and #local_points return an odd value left over first, as it was given, then the transformed pairs, as LÖVE does; they returned it last, as a Float. Given fewer than two values, they raise LÖVE's message, "Incorrect number of arguments. Got [1], expected at least [2]".