Skip to content

Commit

Permalink
push what i have right now because i not only upgraded pcs but also t…
Browse files Browse the repository at this point in the history
…ransferred the same clone over to a new drive
  • Loading branch information
ThePlank committed Dec 27, 2024
1 parent 203cb7b commit 61a15fb
Show file tree
Hide file tree
Showing 6 changed files with 64 additions and 1 deletion.
Binary file added resources/unknown.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions src/lemons/Time.hx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ class Time {
**/
public function start(updateFunc:Void->Void, app:lemons.App) {
while (app.window.live) {
#if profiler
hl.Profile.event(-1);
#end

final time:Float = app.window.time;
delta = time - _timestamp;

Expand All @@ -48,6 +52,11 @@ class Time {
app.window.update();

_timestamp = time;

#if profiler
hl.Profile.event(0);
hl.Profile.event(-2);
#end
}
}

Expand Down
12 changes: 12 additions & 0 deletions src/lemons/display/Texture.hx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package lemons.display;


/**
* a texture. note that this isn't the same as `Image`. `Image` is a class that holds image data at a software level, while `Texture` is at a hardware level.
**/
@:allow(lemons.display.render.Renderer)
class Texture {



}
2 changes: 1 addition & 1 deletion src/lemons/display/render/Renderer.hx
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ class Renderer {
curUniform = curUniform.next;
}
}

prog._uniformQueue = null;
return;
}

Expand Down
41 changes: 41 additions & 0 deletions src/lemons/resource/Image.hx
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
package lemons.display;

import haxe.io.Bytes;


/**
* specifies in what colour format the raw image data is stored in
**/
enum abstract ImageFormat(Int) to Int {
/**
* indicates 4 values in order of red, green, blue and alpha, all using 8 bits and 32 bits in total
**/
var RGBA32 = 0;

/**
* indicates a greyscale image with only one value, red, using 8 bits
**/
var RED8 = 1;

/**
* red 8 more like uhhhhhhhhh red 40
* haha get it
* red 40
*
* red fourty
*
* nevertheless, this is the same as `RED8`
**/
var RED40 = 1;
}

/**
* an image
**/
class Image {
public final bytes:Bytes;

function new(bytes:Bytes, format:ImageFormat) {
this.bytes = bytes;
}
}
1 change: 1 addition & 0 deletions tools/commands/BuildCommand.hx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ class BuildCommand {
sys.io.File.copy(setup.globalVariables['liblemonsDirectory'] + '/out/' + file, parsedProject.getOutputPath() + '/' + file);
} catch(e) {
Sys.println('could not find the native extension library for lemons. make sure the path ${setup.globalVariables['liblemonsDirectory'] + '/out'} exists.\nif you are using the git version of lemons, you should follow the guide on how to build the native extension manually.\nif this was downloaded off of haxelib, send an issue in the lemons github repository\nhttps://github.com/LemonsFramework/lemons');
Sys.println(e);
}

}
Expand Down

1 comment on commit 61a15fb

@ThePlank
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i forgot to setup commit signing oops

Please sign in to comment.