Michael2_3B wrote:
I'm still trying to keep it as basic as possible, but I'm just trying to do some small things to make it look cooler...

Basically what I am wanting is a single AsmPrgm that can turn off the run indicator,
http://dcs.cemetech.net/index.php/BasicLibs:RunIndicator
Quote:
fill the screen with black pixels,
http://dcs.cemetech.net/index.php/BasicLibs:DrawBox
Quote:
and invert text. If the text is black (if the text was already inverted), then something like :3:Asm(prgmASM will be run again to invert the text again, so that it will always be white text.
http://dcs.cemetech.net/index.php/BasicLibs:TextMode . Note that this one doesn't flip the flag, it sets it to normal or inverse, which is more what you want. If you set it twice, for example, it will still be set.
EDIT: I think I figured it out. I made a new post right below this one.

KermMartian wrote:
Michael2_3B wrote:
I'm still trying to keep it as basic as possible, but I'm just trying to do some small things to make it look cooler...

Basically what I am wanting is a single AsmPrgm that can turn off the run indicator,
http://dcs.cemetech.net/index.php/BasicLibs:RunIndicator
Quote:
fill the screen with black pixels,
http://dcs.cemetech.net/index.php/BasicLibs:DrawBox
Quote:
and invert text. If the text is black (if the text was already inverted), then something like :3:Asm(prgmASM will be run again to invert the text again, so that it will always be white text.
http://dcs.cemetech.net/index.php/BasicLibs:TextMode . Note that this one doesn't flip the flag, it sets it to normal or inverse, which is more what you want. If you set it twice, for example, it will still be set.

Does that require DoorsCS? Because I don't have DoorsCS. I might get it soon though. Currently, I'm just trying to do it in a single basic program, just like the one mateo posted a bit earlier.

MateoConLechuga wrote:


Code:
AsmPrgm
EFD74A
EFEF4A3D
281D3D
2810
FDCB055E
2005
FDCB05DEC9
FDCB059EC9
21000011
5F3FEF5F
4DC9
EF7045C9


So, to use this, you can do:

Code:
1:Asm(prgmASM

to turn off the indicator, and

Code:
2:Asm(prgmASM

To invert the screen

Code:
3:Asm(prgmASM

To toggle text inversion

Hope this helps! Smile

This works great, but instead of inverting the screen, could you change this code so that it fills the screen with black pixels instead of inverting the screen? So pretty much, I want

Code:
1:Asm(prgmASM

to still turn off the indicator, and

Code:
3:Asm(prgmASM

to still toggle text inversion.

But instead of inverting the screen, it would be nice if you could make

Code:
2:Asm(prgmASM

to fill the screen with black pixels, instead of inverting it.
Actually, I think I figured it out. I used Mateo's previous code to do it. I've been trying to find flaws, if the screen would ever be something I don't want it to be, but I haven't. I'm wanting the screen to be all black, with white text. If anyone finds a flaw in this program that makes it do otherwise, or if you can think of a more simple and efficient way to do this that doesn't require DoorsCS or anything (it can be typed directly into the calculator), please tell me.

Code:

:ClrDraw
:DispGraph
:1:Asm(prgmZDARK
:2:Asm(prgmZDARK
:3:Asm(prgmZDARK
:Text(57,93,".
:If pxl-Test(62,93   //assuming you have window as 0 to 94 and 0 to 62
:Asm(prgmZDARK      //since Ans is still 3, this inverts text again so that it is white
:For(A,93,94
:Line(A,0,A,5
:End
:Text(1,1,"YOU WAKE UP ON THE FLOOR,

It might be simpler if :2:Asm(prgmZDARK filled the screen with black instead of inverting it, but it still works pretty fine.

prgmZDARK:

Code:

AsmPrgm
EFD74A
EFEF4A3D
281D3D
2810
FDCB055E
2005
FDCB05DEC9
FDCB059EC9
21000011
5F3FEF5F
4DC9
EF7045C9
Michael, here is the code that you might need, but please keep in mind that DCS can do this in a breeze, and is highly easier to use and implement. I would recommend that use use this for now, and then once you gain some basic library knowledge, to transfer it over.

So, anywho, here is what I think would be the most efficient:

Code:
AsmPrgm
EFD74A
EFEF4A
3D282D
3D280C
3D2812
3D280B
CDB29D
CDB69D
FDCB05DEC9
EF7045C9
214093
114193
36FF
010003
EDB0
FDCB0386
EF6A48C9
FDCB059EC9


So here is the new implementation:

1: Turns off Inverted text
2: Turns on Inverted text
3: Makes the screen black, also copies to screen
4: Turns off run indicator

Any other number, i.e. 5: Executes 4,3,2 all at once.

Good luck, and remember that this is a good idea to have as a temporary solution! Smile
Just got a new idea - I'm thinking about using this as background for my menu, but the disadvantage is that if I have too many things within the loop, it slows the program down, and thus doesn't cause a graphical **bug**. Just an idea, not sure if I'll use it. I probably won't, but I still think it's cool.

I could accomplish a cool effect like this with Axe or Assembly, but as I said before, I'm trying to keep this as basic as possible.
Okay, quick question: when shifting the screen (via hexcode), what do you think would be the best way to load the art for the next pixel over (i.e. if i shifted the screen left and i wanted to load all of the pixels in the now-empty 94th column)? I'm thinking maybe a matrix or a list, but that would require a fair bit of memory and would also probably not load super quickly. Any suggestions? i may or may not use this in dark hallways.

also, not as important, but is there a hexcode (in a program) where I can specify via ans or something which way I want to shift the screen? sorry for asking so many questions about this, but i'm just curious. and please no doors cs or anything crazy like that (sorry!).
Doors CS. Doors CS external libraries.... Razz

I don't know, didn't you want to keep this in pure basic, or was that BasicNote? Anyways, a matrix might be your best bet.
Unicorn wrote:
I don't know, didn't you want to keep this in pure basic, or was that BasicNote?

Yes, I am wanting to keep it as BASIC as possible. I think I'm making it too complicated, and trying to utilize things I don't even understand yet, so I will go back to pure BASIC, with maybe 1 or 2 hexcodes. Not sure.

Also, I will continue working on this once BasicNote is complete, for anyone who was curious. I'm a bit busy right now with school, as the end of the year is approaching and I've got EOI tests and other tests coming up :/
Hurray, I finally got this into source coder! At about 475 lines of code, this comes in at about 7500 bytes, with over 50 labels and even more memory leaks to fix. I hardly knew anything at the beginning of this school year.....

Anyways, I was thinking about a map movement similar to "A Dark Room" for later in the game, but the current code I have takes a while to generate. Instead of a matrix, it is stored in a string, to save space. However, I'm still pretty unsure what I'm going to add and what I'm going to change right now. Lots of code to fix, and at the same time, improve the gameplay and storyline Smile

I will be trying to finish BasicNote first though, so don't expect any major updates any time soon Wink
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 2 of 2
» All times are UTC - 5 Hours
 
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

 

Advertisement