mirror of
https://github.com/NeoFlock/neonucleus.git
synced 2025-09-24 09:03:32 +02:00
brand new font
This commit is contained in:
parent
687cfebd00
commit
2a74e87276
46
data/OpenOS/LICENSE
Normal file
46
data/OpenOS/LICENSE
Normal file
@ -0,0 +1,46 @@
|
||||
Copyright (c) 2013-2015 Florian "Sangar" Nücke
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
All images / textures and localization strings (resources) are put in the
|
||||
public domain, unless explicitly excluded below. More specicially, see CC0 1.0
|
||||
Universal:
|
||||
|
||||
http://creativecommons.org/publicdomain/zero/1.0/
|
||||
|
||||
Contributions:
|
||||
PixelToast - Capacitor textures.
|
||||
asie - Disk drive inject/eject and floppy disk access sound samples.
|
||||
|
||||
Thanks a lot!
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
The font used for screens and for monospace text in manual is unscii, made by
|
||||
viznut, and was further expanded by asie. For more information, please see:
|
||||
|
||||
https://github.com/asiekierka/unscii-asie
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Assets from other sources:
|
||||
HDD access samples based on this sample from freesound.org:
|
||||
https://www.freesound.org/people/artykris/sounds/117401/
|
@ -1,3 +1,52 @@
|
||||
--[[
|
||||
Copyright (c) 2013-2015 Florian "Sangar" Nücke
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
All images / textures and localization strings (resources) are put in the
|
||||
public domain, unless explicitly excluded below. More specicially, see CC0 1.0
|
||||
Universal:
|
||||
|
||||
http://creativecommons.org/publicdomain/zero/1.0/
|
||||
|
||||
Contributions:
|
||||
PixelToast - Capacitor textures.
|
||||
asie - Disk drive inject/eject and floppy disk access sound samples.
|
||||
|
||||
Thanks a lot!
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
The font used for screens and for monospace text in manual is unscii, made by
|
||||
viznut, and was further expanded by asie. For more information, please see:
|
||||
|
||||
https://github.com/asiekierka/unscii-asie
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Assets from other sources:
|
||||
HDD access samples based on this sample from freesound.org:
|
||||
https://www.freesound.org/people/artykris/sounds/117401/
|
||||
]]
|
||||
|
||||
local init
|
||||
do
|
||||
local component_invoke = component.invoke
|
||||
|
@ -141,7 +141,7 @@ void nni_gpu_set(nni_gpu *gpu, void *_, nn_component *component, nn_computer *co
|
||||
}
|
||||
|
||||
int current = 0;
|
||||
while(s[current]) {
|
||||
while(s[current] != 0) {
|
||||
int codepoint = nn_unicode_codepointAt(s, current);
|
||||
nn_setPixel(gpu->currentScreen, x, y, nni_gpu_makePixel(gpu, s + current));
|
||||
if(isVertical) {
|
||||
|
@ -315,6 +315,8 @@ int main() {
|
||||
SetConfigFlags(FLAG_WINDOW_RESIZABLE);
|
||||
InitWindow(800, 600, "emulator");
|
||||
|
||||
Font unscii = LoadFont("unscii-16-full.ttf");
|
||||
|
||||
double lastTime = nn_realTime();
|
||||
while(true) {
|
||||
if(WindowShouldClose()) break;
|
||||
@ -362,7 +364,8 @@ render:
|
||||
int scrW = 1, scrH = 1;
|
||||
nn_getResolution(s, &scrW, &scrH);
|
||||
int pixelHeight = GetScreenHeight() / scrH;
|
||||
int pixelWidth = MeasureText("A", pixelHeight);
|
||||
float spacing = (float)pixelHeight/10;
|
||||
int pixelWidth = MeasureTextEx(unscii, "A", pixelHeight, spacing).x;
|
||||
|
||||
for(size_t x = 0; x < scrW; x++) {
|
||||
for(size_t y = 0; y < scrH; y++) {
|
||||
@ -373,7 +376,7 @@ render:
|
||||
Color fgColor = ne_processColor(p.fg);
|
||||
Color bgColor = ne_processColor(p.bg);
|
||||
DrawRectangle(x * pixelWidth, y * pixelHeight, pixelWidth, pixelHeight, bgColor);
|
||||
DrawText(s, x * pixelWidth, y * pixelHeight, pixelHeight - 5, fgColor);
|
||||
DrawTextEx(unscii, s, (Vector2) {x * pixelWidth, y * pixelHeight}, pixelHeight - 5, spacing, fgColor);
|
||||
}
|
||||
}
|
||||
|
||||
|
BIN
unscii-16-full.ttf
Normal file
BIN
unscii-16-full.ttf
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user