Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WallPaperDolDoc #123

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft

WallPaperDolDoc #123

wants to merge 2 commits into from

Conversation

y4my4my4m
Copy link
Collaborator

No description provided.

@@ -8,6 +8,7 @@ Cd(__DIR__);;
#include "~/HomeWrappers"
MapFileLoad("::/Kernel/Kernel");
MapFileLoad("::/Compiler/Compiler");
#include "::/Demo/Graphics/WallPaperDolDoc"
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@GutPuncher
This won't display the wallpaper on boot, but it will allow for the HomeKeyPlugIns Alt+F10 / Alt+F11 to work.
I'd actually prefer not doing it this way.

@@ -34,7 +34,7 @@ U0 GrUpdateTaskWin(CTask *task)
if (gr.fp_wall_paper)
(*gr.fp_wall_paper)(task);
}
else if (!(task->win_inhibit & WIF_SELF_DOC))
/* else */ if (!(task->win_inhibit & WIF_SELF_DOC))
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I haven't noticed any bug from doing this, however the wallpaper won't display without it.
I've decided to modify the GrScreen instead of asking the user to do it.

@y4my4my4m y4my4my4m changed the title Wall paper dol doc WallPaperDolDoc Aug 25, 2023
@y4my4my4m y4my4my4m mentioned this pull request Aug 25, 2023
11 tasks
@y4my4my4m y4my4my4m self-assigned this Aug 25, 2023
@y4my4my4m
Copy link
Collaborator Author

To add to the wiki if this gets merged

png to ansi convertion script

#!/bin/bash

function ANSi() {
    tr '\0' ' ' < "$1" | iconv -f CP437 -t UTF8
}

# Check if argument is passed
if [ $# -eq 0 ]
then
    echo "No arguments supplied"
    exit 1
fi

REZ=1024
# REZ=1280

# 1024x768
ansir --width 127 --height 95 --colors basic --background dark --mode shaded "png/$REZ/$1.png" > "ans/$REZ/$1.ans"

# 1280x720
# ansir --width 159 --height 89 --colors basic --background dark --mode shaded "png/$REZ/$1.png" > "ans/$REZ/$1.ans"

# Second command
python convert_nfo.py "ans/$REZ/$1.ans" "ans/$REZ/$1.ans"

# Third command
ANSi "ans/$REZ/$1.ans"

cp "ans/$REZ/$1.ans" "ZealOS/src/Home/Wallpapers/1024/$1_$REZ.ans"

Ansir is this tool: https://github.com/y4my4my4m/ansir

I'll add a complete tutorial on the wiki in due time

@y4my4my4m
Copy link
Collaborator Author

Forgot to include:
convert_nfo.py

#!/usr/bin/env python
import codecs, sys
try:
    infile, outfile = sys.argv[1], sys.argv[2]
except IndexError:
    sys.stderr.write('usage: %s input_file output_file\n' % sys.argv[0])
    sys.exit(1)
nfo = codecs.open(infile, encoding='utf-8').read()
codecs.open(outfile, 'w', encoding='cp437').write(nfo)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant