flat assembler
Message board for the users of flat assembler.

flat assembler > Heap > vivik's twitter

Goto page Previous  1, 2, 3 ... 11, 12, 13, 14, 15  Next
Author
Thread Post new topic Reply to topic
vivik



Joined: 29 Oct 2016
Posts: 667
that's the definition of TAS. "no way to solve the task better".

creation of TAS is a long tedious process of removing all the wrong choices, until only one remains.
Post 18 Jan 2019, 19:53
View user's profile Send private message Reply with quote
vivik



Joined: 29 Oct 2016
Posts: 667
what, i already cleared hat in time? what?

45% though, but oh wow. (and ignoring the free dlc).

btw, google "child skull" in google images. And "minoga".

mustache girl no hit
v=1mkCZAG5Qtw
Mustache Girl - 1-Hit Hero and Kid's Hat only

v=Bb5TDZbERBQ&lc=UgytHNAiDONV5x3a_v54AaABAg

other final bosses: the friends you met along the way help you during the fight

this game’s final boss: your friends literally kill themselves to drop infinite health pickups for you to outlive the boss.

.

Your enemies kill themselves to help you kill your friend xD


Last edited by vivik on 19 Jan 2019, 20:44; edited 2 times in total
Post 19 Jan 2019, 13:55
View user's profile Send private message Reply with quote
vivik



Joined: 29 Oct 2016
Posts: 667
v=yaBW-0Tu30k
hatsune miku screaming for almost 5 minutes

would you let her stay?

this is assembler related, react!

---

it's impressive how little i care. Just get your shit together for one day, and after that you can relax. Nah, just for a hour.

12:05, start. You never actually launched your site in localhost, start with that.

sucks i can't download those videos locally. I found this in the source code

https://player.vimeo.com/video/291782274?speed=1&color=00b1b3&autoplay=1&app_id=122963

but this page doesn't open

https://vimeo.com/291782274

https://github.com/carlosflorencio/laracasts-downloader
hm, how to use this?
>An account with an active subscription is necessary!
oh, i have to pay? nevermind then.

12:20

videos
https://laracasts.com/series/laravel-from-scratch-2018/
docs
https://laravel.com/docs/5.7

yeah, searching docs is faster now

php artisan serve

this worked

12:24

what's next... I don't quite understand what this means: "separating routes by groups, admins and users".

I guess this means that part of urls will start with /admin, and this will be like admin panel or something.

I guess the difference between admins and users will be in that, users can only edit their own things, while admins can edit everyone's things.

Okay, what I need, is, making model, view, controller, database.

I need to make a ticket system, so I need tables: users (with is_admin field), tickets. Huh, that's quite simple.

How to upload files though.

laravel file upload
https://quickadminpanel.com/blog/file-upload-in-laravel-the-ultimate-guide/

All ticket systems I have seen were pretty much forums, but I'll cheat a bit and will make each ticket a one field only. Each ticket will have a title, a text field, a "solved" checkbox, an "assigned to" field, an "assigned by" field. When a ticket is "assigned to", that person will get a notification. When a ticket is completed, the "assigned by" will get a notification.

I remember when I was making a simple site in php, this actually explode my mind when I had to organize the site somehow, when a one page site started to grow and required some sort of authentication and data editing/deleting. I just didn't knew how to make it all work. Now I found tutorials on this.

12:41

just rewatch this whole series, and retype shit

he has a trait of "let's do this a simple braindead way first, and then rewrite it the pretty and lazy way second". So the correct way appears on episode 15 or somewhere.

12:55
C:\shared\torrents\Touhou lossy music collection (Ogg Vorbis)\[流派未月亭]\2014.12.29 [RMTC-0000] 永劫回帰 [C87]
https://laracasts.com/series/laravel-from-scratch-2018/episodes/3
C:\shared\src\phpcode
php artisan serve
http://127.0.0.1:8000
routes/web.php
resources/views/welcome.blade.php

13:05
okay, pause, for a hour or less/more

13:19
i said pause
https://laracasts.com/series/laravel-from-scratch-2018/episodes/5

13:32
yawn, still typing

13:36
https://laracasts.com/series/laravel-from-scratch-2018/episodes/6?autoplay=true
next is controllers, let's pause
artisan make:controller TasksController
app\Http\Controllers\TasksController.php

13:44
https://laracasts.com/series/laravel-from-scratch-2018/episodes/7
finally the databases, where the fun's at

13:53
created myfirstapp_db database, codepage utf8_general_ci, it was set as latin1_swedish_ci by default for some reason

13:57
php artisan migrate
php artisan migrate:rollback

phpmyadmin add database to favourites
eh, not now

14:01
Code:
C:\shared\src\phpcode\myfirstsite>php artisan migrate
Migration table created successfully.

In Connection.php line 647:

  SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes (S
  QL: alter table `users` add unique `users_email_unique`(`email`))


In Connection.php line 449:

  SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes    


shiiiet

php artisan migrate Specified key was too long
https://laravel-news.com/laravel-5-4-key-too-long-error

yep, codepages

phpmyadmin delete database
https://stackoverflow.com/questions/21751868/delete-a-database-in-phpmyadmin
Operations -> Remove database

https://stackoverflow.com/questions/42244541/laravel-migration-error-syntax-error-or-access-violation-1071-specified-key-wa

welp, let's use utf8mb4_unicode_ci for my databases then.

okay, it works now.
pause, for real
14:20

16:18
i'm back.

17:01
i said i'm back!
stupid youtube with his recommendations...

php artisan migrate
php artisan migrate:rollback
php artisan migrate:fresh

17:17
and here is continuation of lesson 7
https://laracasts.com/series/laravel-from-scratch-2018/episodes/16
Your First Eloquent Relationships

17:37
hm, there are 2 relations.
hasMany and belongsTo
user hasMany tasks
task belongsTo user
ok, that got solved
https://softwareengineering.stackexchange.com/questions/152731/what-is-the-main-difference-between-has-many-and-belongs-to-relationship-in-mysq

17:45
php artisan make:model Task --controller --factory
The "--factory" option does not exist.
<heh, this lesson is only 3 months old

i should concentrate on authentification/registration, it's the hardest part right now
need to make sure no email is sent and no email confirmation is necessary
https://laracasts.com/series/laravel-from-scratch-2018/episodes/24
A Full Registration System in Seconds

app\Http\Controllers\Auth

heh, i'm geniunly curious how much i'll manage to finish. After all, it's only one day.

let's chill and go in order. Back to lesson 7.

my head is apparently endless, let's learn every language there is.

18:27
C:\shared\src\phpcode\myfirstsite\database\migrations\2014_10_12_000000_create_users_table.php
added this
$table->boolean('is_admin')->default(false);

huh
php artisan migrate:fresh is now called php artisan migrate:refresh
just added re in refresh

18:36
I wouldn't add any support for changing is_admin in webinterface. Just edit it in the database, should be ok.

laravel registration without email
https://stackoverflow.com/questions/41452874/authenticate-users-without-email-in-laravel

18:43
https://laracasts.com/series/laravel-from-scratch-2018/episodes/24
php artisan make:auth

aww, it written code at the end of the routes/web.php, without overwriting anything, how nice of it!

C:\shared\src\phpcode\myfirstsite\app\Http\Controllers\Auth\RegisterController.php
changed this
'email' => 'required|string|email|max:255|unique:users',
to this
'email' => 'sometimes|string|email|max:255|unique:users',

19:00
nope, got this message:
The password must be at least 6 characters.
let's find where the fuck this check happens...
let's check if there is any kind of check in the database for this

19:02
yep, there is. email is non-null. ugh...
don't fight it, tutorials described some kind of service for testing emails.
goddamnit, another site to show my email to. Eh, youtube already knows too much about me, it can't go worse.

19:37
youtube

22:54
huh, full moon, and no clouds, how rare. And so high in the sky too.
i need to practice programming for 8 hours a day. Take breaks regularly, and everything should be alright.

23:14
App\User:first()
The filename, directory name, or volume label syntax is incorrect.
<hm, need to change my locale real quick...
<huh, it shows up normally when copypasted from console

>>> App\User::all()
=> Illuminate\Database\Eloquent\Collection {#714
all: [],
}
<nevermind, it works...

23:30
huh, i executed this before:
php artisan make:model Task --controller
but apparently I had to exclude "--controller" to create app/Task.php
wrong order, "--controller" should be before "Task".

23:45
C:\shared\src\phpcode\myfirstsite\database\migrations\2019_01_20_130929_create_tasks_table.php
Code:
        Schema::create('tasks', function (Blueprint $table) {
            $table->increments('id');
            $table->string('title')->nullable();
                        $table->text('description')->nullable();
                        $table->unsignedInteger('assigned_by');
                        $table->unsignedInteger('assigned_to');
            $table->timestamps();
        });    

i think they should be nullable?
hm, ain't an empty string is fine too?
eh, just in case

23:53
huh, you have to restart the server after you edited the .env file
glad he doesn't check this file over and over again, it would be stupid

23:57
laravel doesn't require to verify your email by default
everything is simplier than I thought, huh
that's because you are in a hurry and don't want to watch the video tutorials in their entirity second time.

0:10
hm, moon is much smaller when I wear glasses.
imagine not seeing the moon ever again. Everything else in the world I'm fine, but the moon.
hm, it already went behind the building, how fast. Maybe it'll still be there tomorrow.

10:34
i know how to simplify my task
i will use only 1 controller for the entire site
i will write sql manually
i will write every route manually
i don't care

10:47
actually fuck it

12:31
...

12:39
let's read docs, rewatching videos take too much time, this vimeo is fucking laggy
Post 19 Jan 2019, 19:53
View user's profile Send private message Reply with quote
vivik



Joined: 29 Oct 2016
Posts: 667
v=dks7N6IZC3g
Hamster gets a dirty phone call
found this by searching "meido in abisu". I'm not complaining.
Post 21 Jan 2019, 14:41
View user's profile Send private message Reply with quote
vivik



Joined: 29 Oct 2016
Posts: 667
1)
>"touch" option shows up after a few days
>lets see where this goes
>rape her
>she dies

What the fuck

---
2)
>>1
>"touch" option shows up after a few days
It appears instantly?

---
3)
>>1
you monstrous fuck.

---
4)
>>1
>rape her
but for why anon

---
5)
>>3
>>4
Don't be so hard on him, I made a similar mistake.

>Wake up
>Do some paperwork at the office
>Sylvie helps
>Take her out for lunch
>Get her a sandwhich
>Nigga loves herself a sandwhich
>Go back home
>Have some tea
>Pat her head
>Sylvie sure love when I pat her head
>"What a fulfilling day, time to go to bed"
>To bed
>Kiss Sylvie
>"Oh okay just like a kiss goodnight, sure."
>"Mmn, DMX, you're tongue..."
>What
>Sex her

This fucking game.
Post 21 Jan 2019, 18:05
View user's profile Send private message Reply with quote
vivik



Joined: 29 Oct 2016
Posts: 667
>When the game starts telling me she panics without me I feel like I'm doing a bad thing, like I'm hurting her, like I'm making things worse. I can't always be around her.
But you ARE doing a bad thing, anon. She's still a slave to you. You keep her locked up all day; let her pretend she's being useful by doing boring, minor chores; dose her tea with lust drugs; and spend all night fucking her into an insensate mess.

Rinse, repeat, day in and day out.

You give her a (false) sense of purpose, care for her, and make her feel like she's desired, wanted, loved; she in turn gives you her body.

https://en.wikipedia.org/wiki/Codependency#Enmeshed_romantic_relationship

---
2)
It's currently about fucking the everloving shit out of a slave girl after giving her some bullshit reason to live like doing chores and stuff.

What is should be about is helping her grow and repair herself into a normal person with friends and a life.

---
3)
>>2
Fuck that, it's called "life with a slave" not "life with your daughter".

---
4)
>>3
off yourself plz. Sylvie needs friends.

---
5)
>>4
She doesn't need friends, she's got muh dick.

-------------------------------------
i'm having too much fun reading those
-------------------------------------

>install Teaching Feeling
>expect a relatively long VN with emotional attachment for the character and somewhat interesting raising mechanics
>got "pet her" simulator until she decides to let you fuck her, where neither you or the doctor in question is interested enough to give a fuck about her past and shit
yeah, whatever
Post 21 Jan 2019, 18:17
View user's profile Send private message Reply with quote
vivik



Joined: 29 Oct 2016
Posts: 667
There should be a "work 10 hours per day simulator". There is one, it's called "desert bus". I should give it a go.

"that game" allows you to feel like a good person. "desert bus" allows you to be a good person.
Post 21 Jan 2019, 19:07
View user's profile Send private message Reply with quote
vivik



Joined: 29 Oct 2016
Posts: 667
v=A1xmcVWtXUY
No Morire Sola
35:00 36:51 45:15 48:56 52:53 54:33 56:36
going on pornhub for music, going on youtube for porn, wtf is this world

why do i feel like i'm spreading some kind of illness? I suspect that porno is harmful in some way, but resisting it would probably be harmful as well.
Post 21 Jan 2019, 21:48
View user's profile Send private message Reply with quote
vivik



Joined: 29 Oct 2016
Posts: 667
https://tvtropes.org/pmwiki/pmwiki.php/Moe/AnimeAndManga

>If someone has flaws or defects, but that is exactly what draws you to them, people call it moe. It's different from 'like,' where you're drawn to their good points, their strengths. 'Like' doesn't care for defects or flaws. Moe is the opposite of 'like' or 'dislike'.....

wow, the meaning of this word is so hard to explain, i still can't understand what it means

---
https://tvtropes.org/pmwiki/pmwiki.php/Main/VideogameCaringPotential

The H-Game Visual Novel Life with a Slave: Teaching Feeling is literally "Video Game Caring Potential: The Game". You play as a small city doctor who one day is visited by a wandering merchant whose life you had once saved who has come to repay his debt to you. He entrusts you with a small, horrifically abused former slave girl called Sylvie whose former master (now deceased) used to torture her daily for fun, leaving her with grotesque acid burns all over her body. The entire focus of the game is caring for her, repairing her damaged psyche with kindness, compassion and head pats and, as the name suggests, teaching her to feel again, until she learns to be happy, hopeful and eventually fall in love with you. It's in fact mandatory to treat her this way as, although you start out being given options to treat her poorly, or even rape her right off the bat, these are all traps as treating her in any way other than pure kindness will lead to her unavoidably catching a cold and dying (note: This can lead to the almost laughably tragic scenario where she dies because you bought her sandwiches for lunch when you took her to the restaurant rather than pancakes). It's also worth noting that, although the game is a hardcore eroge with a big emphasis on sexual content (once you reach the stage where she's both willing and able to freely consent to it), there are several people who have reportedly played it by actually rejecting her advances, skipping all the sexual content, getting Sylvie to call them "Daddy" and raising her as their daughter, because she's just that Moe.(note: Later versions have even acknowledged this, as when you get to the stage where you can choose to choose something else for Sylvie to call you other than "Master", if you put in something like "Daddy" or "Papa" she'll wonder aloud whether this means you think of her like a daughter.)

With a later update, you can also start teaching her medicine and turn her into your assistant, complete with white (or black or pink) nurse outfit and she will smile in return for you giving her a purpose in life. Heartwarming doesn't being to describe it.

<ah, those misguided folks. I'm really happy there are people like them around.

<i tried ignoring sexual content, but this fucking doctor kept asking himself (myself) if he should let Silvia in his bed. EVERY NIGHT. How do you ignore this nagging for so long?

<if you want a dad simulator, there is "princess maker" for you. Or "ayanami rei raising project".

---
walked upon this
v=ssDoRFu6CsM
v=ssDoRFu6CsM&list=PLAJ2qP4mpWryBCOLq69jEQI2oft4ep265
valhalla
VA-11 Hall-A
heard about this ages ago somewhere, about time i give this a try
Post 22 Jan 2019, 07:44
View user's profile Send private message Reply with quote
vivik



Joined: 29 Oct 2016
Posts: 667
Playing "long live the queen" now

Holy cow this game is stressful. Somehow savescummed my way to viktory. Choose the charisma + assassination + magical girl route, got a ruthless (to traitors) wizard queen at the end. Off to see the rest, I guess.

But not today, my heart would explode.

I guess I'll try out economics, then war. Then I'll concentrate on cute boys, I had to keep that foreign duke as my fiance for political reasons on that walkthrough, even though he was pretty useless overall. Dunno, it smelt like a dangerous thing to refuse him.

let's speed it up a bit
https://github.com/CensoredUsername/unrpyc


Last edited by vivik on 23 Jan 2019, 09:04; edited 2 times in total
Post 22 Jan 2019, 11:01
View user's profile Send private message Reply with quote
vivik



Joined: 29 Oct 2016
Posts: 667
I didn't understood the meaning of the word "moe", until I saw that girl in "sengoku rance". That girl with a sword, that was submissive, weared glasses, and coughed blood.

https://allthetropes.fandom.com/wiki/Sengoku_Rance/Characters
Okita Nozomi


Okay, so, so far I encountered only 3 characters I could count as moe:

Yuki Nagato from "The Disappearance of Haruhi Suzumiya" v=mQV5ymUVrhw 35:30 , Hanako from Katawa Shoujo, and now Silviya from "life with a slave - teaching feelings".

I don't understand, they used term moe towards Mikuru from "Haruhi Suzumiya", but I feel nothing towards her, she's just sexy and annoying. But this second Nagato is nuclear. Especially in those situations.

I originally thought Yuri from "DDLC" would be simular to Hanako, but she turned out to be "look at muh literature skills, look at my weird hobbies, oh that's just your opinion". I went for shortie instead almost immediately. But somehow, she got me back when she made that amazing confession at the end. You know, before stabbed herself to death? Well, at least she didn't do that when she first saw my face. *laughing track*.

Hanako route actually kinda disappointed me. I went for her only for her looks, and then she proceeded to be boring for the rest of the game, and sex scene was lump and lifeless as well. Goddamnit Hanako, you're better than that. Ah, at least at the beginninning she was gold.

---
i have the black belt in talking to myself. I think 20 people are reading this, 15 of whom are search engines and such. Need to measure it properly eventually.

LATER
find a way to disable image loading, and leave an image in this thread.
Post 22 Jan 2019, 18:45
View user's profile Send private message Reply with quote
vivik



Joined: 29 Oct 2016
Posts: 667
v=JQg38pyCs20
20:00
yeah, vinny also disables depth of field in hat in time. I agree it doesn't look good.
Post 23 Jan 2019, 17:39
View user's profile Send private message Reply with quote
vivik



Joined: 29 Oct 2016
Posts: 667
>characters accidentally touch hands
>>What a fucking slutlord.
wtfXD
Post 24 Jan 2019, 06:55
View user's profile Send private message Reply with quote
vivik



Joined: 29 Oct 2016
Posts: 667
found a way to do some sort of web-interface in firefox extensions

i use urls like this:

file:///C:/path/empty.html#heh

my hook will intercept all page loads, compare address through regular expressions, and if it's path/empty.html with some extra info on the end, load the text and images i want

now I don't have to type heh() in browser console every time i have to jack off, i can just open a bookmark! And I can bookmark a specific page too!

this is kind of important, because heh() takes about a minute to finish, and now I can at least show only 40 items per page, instead of showing all 500 at once, which obliviously lagged. I lost the ability to ctrl-f the thing I need, but I can make up to this when I'll make a proper search in code, and proper tag system.

anyway, it's an easy to do and very convenient thing, much easier than figuring out that c monstrosity i have written. I will still have to finish that c program, because there are a few things that browser just can't do.
Post 24 Jan 2019, 10:24
View user's profile Send private message Reply with quote
vivik



Joined: 29 Oct 2016
Posts: 667
was searching for my swf all over my hdd, but it was in C:\_temp\_downloads_old

i put it there 4 months ago or so, and almost forgot where it was.
Post 24 Jan 2019, 12:24
View user's profile Send private message Reply with quote
vivik



Joined: 29 Oct 2016
Posts: 667
Does anybody read blogs anymore? I stopped after google reader went down, and learned that my local rss reader both couldn't swallow my subscribtions, and couldn't set the frequency of updates for each subscribtion individually.

I guess social networks replaced them?

---

a day i actually moved forward, finally

tomorrow i want to check if my nicovideo addons still work. And then redirect all "file" stuff into correct directory.

um, i, actually, i need a text editor for that first. Really. I can't code in notepad++, i hate using mouse when I code.
Post 24 Jan 2019, 13:09
View user's profile Send private message Reply with quote
vivik



Joined: 29 Oct 2016
Posts: 667
interesting, in javascript, parseInt('') returns NaN

and NaN > 0, NaN < 0, NaN==0 always return false

so, i got an endless loop down the line because of it.

i should be more careful
Post 25 Jan 2019, 03:39
View user's profile Send private message Reply with quote
vivik



Joined: 29 Oct 2016
Posts: 667
Okay, made a simple page navigation

on page it looks like this:

<=====prev next=====>

in code it looks like this:

Code:
    var a = document.createElement("a")
    document.body.appendChild(a)
    //a.innerHTML = what
    a.text = "<=====prev "
    a.href = "#heh-"+(pagenum-1)

    var a = document.createElement("a")
    document.body.appendChild(a)
    //a.innerHTML = what
    a.text = " next=====>"
    a.href = "#heh-"+(pagenum+1)
    


also added addEventListener("hashchange", now I can change url, and page will react
Post 25 Jan 2019, 04:06
View user's profile Send private message Reply with quote
vivik



Joined: 29 Oct 2016
Posts: 667
v=Df6vh8Q4hOk
Cry Streams: Long Live The Queen (May 26, 2014)
too good
he actually got to the final boss on his first try, awesome.
if you are impatient, jump to 1:34:00 or 1:37:50
on one hand it's a really short game, on the over hand it's super hard to 100&, especially offline without a wiki to help you
everyone who thinks this isn't a good game, is WRONK
Post 25 Jan 2019, 07:07
View user's profile Send private message Reply with quote
vivik



Joined: 29 Oct 2016
Posts: 667
Why do I get better youtube recommendations when I log out?

log out:
https://www.youtube.com/watch?v=01UIBjog3G4
https://www.youtube.com/watch?v=dxQobaBL2uE
https://www.youtube.com/watch?v=SNggcXhUv3k
https://www.youtube.com/watch?v=EKo5jrZLknc

log in:
https://www.youtube.com/watch?v=VMqtFs4aElc
https://www.youtube.com/watch?v=rMe1f0wK6VA
https://www.youtube.com/watch?v=rIWziM76cWw
https://www.youtube.com/watch?v=FG0nTVU3fRM

ehh, gonna install another browser/profile, and keep deleting cookies on this one. Those recommendations know me too well, it freaks me out.

also, skim through "Infinite stratos" one day

the worst part is i can't click "don't show me this shit" when I logged out.

---
okay, where i stopped with text editor? here: https://board.flatassembler.net/topic.php?p=207925#207925

my texture right now is D3DFMT_X8R8G8B8, even though it's only 2 colors. Well, 3, there are a bunch of 00000000, FFFFFFFF, and 6F6F6F6F.

hm, if I change this to A8R8G8B8...?

Okay, I added transparency.

Here:
g_pd3dDevice->CreateTexture(512, 512, 1, 0,
D3DFMT_A8R8G8B8, D3DPOOL_MANAGED, &g_texture_text, 0);

It was D3DFMT_X8R8G8B8 before, now it's D3DFMT_A8R8G8B8

Also, add this anywhere:

g_pd3dDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, TRUE);
//g_pd3dDevice->SetRenderState(D3DRS_BLENDOP, D3DBLENDOP_ADD);
//g_pd3dDevice->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_SRCALPHA);
g_pd3dDevice->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA);

the commented lines don't seem to be necessary, it works without them.

also one thing I'm not very sure:

Code:
        D3DPRESENT_PARAMETERS d3dpp;
        ZeroMemory(&d3dpp, sizeof(d3dpp));
        d3dpp.Windowed = TRUE;
        d3dpp.SwapEffect = D3DSWAPEFFECT_DISCARD;
        d3dpp.BackBufferFormat = D3DFMT_UNKNOWN;

        if (FAILED(g_pD3D->CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, hWnd,
                D3DCREATE_SOFTWARE_VERTEXPROCESSING,
                &d3dpp, &g_pd3dDevice)))    


Look at the line d3dpp.BackBufferFormat = D3DFMT_UNKNOWN

I probably should replace it with D3DFMT_A8R8G8B8, but, it works anyway...? It will probably make it faster, but I see no difference right now. Dunno. Later.

https://www.gamedev.net/forums/topic/224176-d3dfmt_a8r8g8b8--d3dfmt_x8r8g8b8/

http://www.firststeps.ru/mfc/directx/dxhelp/r.php?19

http://www.directxtutorial.com/Lesson.aspx?lessonid=9-4-10

---
Next step is, see how you can change the color of the texture. I could do this in opengl, so I'm sure it's possible in direct3d. To make a cursor, I need to draw a white box with black letter on top. Right now all letters are white on black.

glColor in DirectX

https://www.gamedev.net/forums/topic/215249-glcolor-in-directx/

wow, you sure know you are dragging behind when your search results are from 2004

direct3d9 SetMaterial

https://docs.microsoft.com/en-us/windows/desktop/direct3d9/materials

well, tried this, and it didn't work

Code:
        D3DMATERIAL9 mtrl;
        ZeroMemory(&mtrl, sizeof(mtrl));
        HRESULT hr;
        mtrl.Emissive.r = 0.0f;
        mtrl.Emissive.g = 0.5f;
        mtrl.Emissive.b = 0.0f;
        mtrl.Emissive.a = 0.5f;
        hr = g_pd3dDevice->SetMaterial(&mtrl);
        if (FAILED(hr)) FUCK();    


I don't want to have another texture for this, or to write a shader for this...

actually no, another texture sounds fine. Actually, I have enough place in this same texture. Yeah, this should work.

I'll go disable transparency back now, turned out I don't need it.

I'll do this tomorrow.

---
plan:
* display the whole text texture
* see if you really have enough place
* write a code that will copy from one texture to another, but invert the color
* write a code that will actually decompress the compressed texture, just for fun. First use RLE, then try to do something creative, like snake-like length+rotation commands, huffman compressed. Not now though, just make it work, please.

---
okay, done with first
added this in the RenderText()

Code:
        //TEMP-showtexture
        fill_list(0.0f, 0.0f + 512.0f,
                0.0f, 0.0f + 512.0f,
                0.0f, 1.0f,
                0.0f, 1.0f);
        charstotal++;    


yeah, i have more than enough place

oh, how convenient, I still have all the code I used for editing this texture the last time, commented out

probably not the best place to keep it, but if I'll place it anywhere else, i will never find it

Code:
        //FILE *outfile;
        //outfile = fopen("texture_c.raw", "wb");

        //void* buffer = malloc(512/8);
        //char* inbuffer = (char*)malloc(512*512*4);

        //for (int i = 0; i < 8; i++) {
        //      //NOW
        //}

        //for (int i = 0; i<512; i++) {
        //      fseek(infile, (512 - 1 - i) * 512*4, SEEK_SET);
        //      fread(buffer, 1, 512*4, infile);
        //      fwrite(buffer, 1, 512*4, outfile);
        //}

        //fclose(outfile);    


i probably should remember all this by now

hm... i wanted to compress it, didn't I? But never did. malloc(512/Cool;, one bit per pixel, yes this is exactly that. I guess I had other things to do.

Okay, this is an 512x512 texture, each pixel takes 4 bytes. Don't remember which byte is transparency, the first or the last, I only remember that it was somehow backwards. Eh, whatever, can always redo that later.

tfw you don't talk to yourself, but type to yourself. I type almost as fast as I speak.

each character has width 9, heigh 16. In the top row there are 32 characters, and there are 8 rows total, all at the left top courner.

wow, i'm on fire today

Code:
        FILE *outfile;
        outfile = fopen("C:/path/texturex.raw", "wb");

        char* outbuffer = (char*)malloc(512 * 512 * 4);
        char* inbuffer = (char*)malloc(512*512*4);

        fread(inbuffer, 1, 512 * 512 * 4, infile);

        DWORD* inp = (DWORD*)inbuffer;
        DWORD* outp = (DWORD*)outbuffer;

        for (int i = 0; i < 512 * 512; i++) {
                *outp++ = *inp++;
        }

        inp = (DWORD*)inbuffer;
        outp = (DWORD*)outbuffer;
        outp += 512 * 16 * 8;

        for (int y = 0; y < 512 * 16 * 8; y++) {
                if (*inp == 0x00000000) {
                        *outp = 0xFFFFFFFF;
                }
                else if (*inp == 0xFFFFFFFF) {
                        *outp = 0x00000000;
                }
                else {
                        *outp = 0x6f6f6f6f;
                }
                inp++;
                outp++;
        }

        //for (int i = 0; i < 8; i++) {
        //      //NOW
        //}

        //for (int i = 0; i < 8; i++) {
        //      //NOW
        //}

        //for (int i = 0; i<512; i++) {
        //      fseek(infile, (512 - 1 - i) * 512*4, SEEK_SET);
        //      fread(buffer, 1, 512*4, infile);
        //      fwrite(buffer, 1, 512*4, outfile);
        //}

        fwrite(outbuffer, 1, 512 * 512 * 4, outfile);

        fclose(outfile);    


LATER
i will keep both texture.raw and texturex.raw, just in case
gotta delete one of them eventually

---
so, to inverse a color of a letter, I just need to use the what_t and what_b that are 16*8 pixels lower. Much simplier than what I planned initially.

i dread the day of the unicode support. Whatever, drawing it isn't that hard either, I already researched all the hardest parts.

---
Code:
                bool inverse_color = true;
                if (inverse_color) {
                        what_y += (8.0f * 16.0f) / 512.0f;
                        what_h += (8.0f * 16.0f) / 512.0f;
                }    


done! Hell yeah, not as scary as I thought!

next, use this inverse_color properly, store cursor state somewhere, and try to actually edit text.

---
plan:
* store cursor position in some global somewhere
* highlight character at cursor's position
* make cursor blinking (don't care yet, tbh)
* insert and delete characters at position

https://board.flatassembler.net/topic.php?p=207925#207925

FILE* textfile;
int textfilesize;
int textfilebufsize;
char* textfilebuf;

//TEXTEDITOR1 and //TEXTEDITOR2

how to continue coding dispite your memory literally rotting away - write everything down. Even proper coders still write things down, they call it commit history though.

future is more important than past tho


Last edited by vivik on 27 Jan 2019, 07:29; edited 1 time in total
Post 25 Jan 2019, 09:26
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page Previous  1, 2, 3 ... 11, 12, 13, 14, 15  Next

< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Copyright © 1999-2019, Tomasz Grysztar.

Powered by rwasa.