Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - ViL

Pages: [1]
ASM / PNG library suited for tiny intros on masm?
« on: July 02, 2018 »

i've stumbled on PNGlib like it's the only png decoder for masm, it is the only one out there? this is the site of PNGlib

while it's considerably small, uPNG on C output is even smaller, counting kb; but some pairs of kb makes the difference on tiny intros :)

may i ask if anyone knows another png decoder for masm? :D

any idea is very welcome! x3

i was testing quads using multiple colors (gouraud-shade) and for some reason virtual machines either inverts the quad colors or vertex order

here's a screenshot

i did a test using the same exe in my host and guest virtual machine, at the left of their screen they are all three triangles, both quads at the right

also enumerated the vertex order in which they are drawn in the image, you can notice the quads color or vertex are inverted on the virtual machine

i tested in VMware and a friend also tested on VirtualBox, the result is the same on both, may i ask why this happens?

attached the exe and source, the assembly source is here if that's better

thanks beforehand! :D

While looking at Nehe's tutorial for opengl i noticed that they had a masm32 conversion for these examples, the tutorials start here:

then quickly realized the links were offline, but fortunately someone made a backup of most examples on github, including masm-converted ones, you can download them from here:

they used some definitions files that weren't included, luckily i found these .def files in the sources of a Northern Dragons' demogroup 4k intro named Trees, it was the only place to get them so i spread them here so you can compile and follow the great NeHe's tutorials!



please note that while these .def files are fairly complete, they don't have some opengl definitions; luckily the Trees' intro source also included the missing ones in an extra .def that i use too, here it is:


i made a example in masm using these .def too, the exe is 4kb unpacked but it features:
-screen scaling proportionally
-easy to customize resolutions
-fullscreen option that keeps the scaling ratio (set fullscreen to 1 in the .data group of the source)
-a colorful quad that takes the whole screen
-fairly minimal source to have a working pe-exe with opengl

edit: for some reason virtual machines inverts either quads color or vertices as unintendedly seen on the screenshot, a good workaround is to use two triangles instead of a quad, more information can be found here:


note that including .def files doesn't grow your exe file!

i hope the template is useful for anyone! :)

Helloo! i've been looking for a way to add a menu using WinAPI within the same .asm file, without using resource (.rc) files

It can be done in C, like explained in this tutorial

MASM32's User.lib has the same function prototypes in there (CreateMenu, AppendMenuW, SetMenu)

This is for two reasons, one is because i'd like them not to be edited/spoted using Resource Editors, the other is that i want to keep everything on one .asm source file (as what i want to do is small enough)

I've not seen anyone documenting how to do this before in MASM32 (or even other Win32-targeted compilers) and ran out of ideas trying, any kind of help is very appreciated!

thanks beforehand! :D

 hii! i've looked for a way to manually set the libraries that link.exe includes, by default, when i link using:

Code: [Select]
C:\masm32\bin\link.exe /verbose /nologo /subsystem:windows /opt:noref main.obj
it says:

Code: [Select]
Start Pass1

Processed /DEFAULTLIB:C:\masm32\lib\user32.lib
Processed /DEFAULTLIB:C:\masm32\lib\kernel32.lib
Processed /DEFAULTLIB:C:\masm32\lib\gdi32.lib
Processed /DEFAULTLIB:C:\masm32\lib\opengl32.lib
Processed /DEFAULTLIB:C:\masm32\lib\glu32.lib

so i tried setting the /DEFAULTLIB's parameter myself to override them

Code: [Select]
C:\masm32\bin\link.exe /verbose /nologo /subsystem:windows /defaultlib:C:\masm32\lib\user32.lib /opt:noref main.obj
(i was intending to just link the user32.lib library to intentionally produce an error to see if it worked)

and regardless, it keeps adding the rest of default libraries:

Code: [Select]
Processed /DEFAULTLIB:C:\masm32\lib\user32.lib

Start Pass1
Processed /DEFAULTLIB:C:\masm32\lib\kernel32.lib
Processed /DEFAULTLIB:C:\masm32\lib\gdi32.lib
Processed /DEFAULTLIB:C:\masm32\lib\opengl32.lib
Processed /DEFAULTLIB:C:\masm32\lib\glu32.lib

is there a way to set them manually?

for example, i recall the same happened linking in mingw's gcc.exe when i coded in c, but using mingw's collect2.exe as a linker enabled me to link them manually, so i though it was possible too in masm

thaanks beforehand! :D

EDIT: turns out they weren't magically added BUT they all were called by using includelib in the asm source!

i'll let this post here if it ever helps someone lol

ASM / Best assembler for win32 < 4k intros
« on: June 17, 2018 »
hellooo! :D may i ask which assembler is better suited for < 4k intros for a 32 bits windows? = 3

thaanks beforehand! x3

hii! :D i finally got to release our first intro with a couple of friends, this release was possible by many of you, DBF community and tuts4you forums; so it is dedicated to you as well! = D

unfortunately, and the reason i delayed a bit on posting it is that since it was my first time coding in C/C++ and had literally 25 days to relearn until the deadline, my code is mindblowingly unoptimized; i never seen such a mess before BUT it works at least  ;D

i told so many people they'll be in this one greets and my friends also wanted to greet a lot of people BUT we just had to limit it to just people in the BotB community where a compo this intro was aimed on is due to CPU extreme loads by each character on the scroller ;D a couple more of them and the intro'd lag hard ;-; so i'll promise next release you'll appear in! including Knurz, Rbz and combatking0 for all your support!, you rocks! =' D and my bad for now = 3

here's the youtube render:

the release on pouet:

and the source mess attached as well = p it comes with a Code::Blocks IDE project, since i made it there = 3

there was a lot more planned for this intro, including real time 3d rendering and moving camera BUT we went short on time and had to fallback on what we had by the time = p

i hope you enjoy it!~ x3

Hii! i am almost about to release my first old-school intro with some friends! the only thing left is to know how to bind textures to a quad

i am working with opengl 1.1 as much as i can, for this intro to work on old windows/old integrated graphic chips, so i want to avoid libraries and do it as vanilla as posible also to learn from it! = p

i created a new opengl template in Code::Blocks to work in a cleaner environment, the code is as follow:

which output this nice square on the screen:

BUT instead i want to use this nice snowflake:

and since afaik i can't use png files without a library, here is the 24 bits bmp version with #FF00FF ( glColor3f(1.0f, 0.0f, 1.0f); ) background instead:

i attached the project folder here, i use the Code::Blocks; and has it's project file in

i have read the opengl 1.1 red book and the 1.1 super bible respetive sections, even got through over 500 threads here and can't find my solution

can someone help me with what to do to bind the snowflake texture to the quad, and it to show transparent?

thanks you so much before hand! the release of this oldschool intro is stuck by this, i apreciate any help! x3

Hii, there's been a lots of obstacles on my first intro making BUT most of them have been resolved either by trying hard or looking for threads on forums

BUT this time i can't find the answer anywhere, so i ask your help to solve this puzzle

on my main.c project (Code::Blocks always create it with .c when using the OpenGL Project template BUT i still use C++ on it) i have included this ufmod.h header: (Note that it specifies Compiler: Visual C, Dev-C++ BUT i want to use Code::Blocks :c)

and have this function to play music
Code: [Select]
    /* music function */
      void play_xm(){
      uFMOD_PlaySong((char*)1, 0, XM_RESOURCE);

and of course, call it inside of the main() function with play_xm();

also i have included a main.rc resource file to the project with not much besides the xm song data i want to play is the one that comes in the jmp2pat.rc of the uFMOD examples, also i kept the example's comments on it for now

and when i run it, it pops the following error at building

Code: [Select]
||=== Build: Release in test (compiler: GNU GCC Compiler) ===|
obj\Release\main.o:main.c|| undefined reference to `uFMOD_PlaySong@12|
||error: ld returned 1 exit status|
||=== Build failed: 2 error(s), 0 warning(s) (0 minute(s), 6 second(s)) ===|

though, if i comment the play_xm(); function on main() it compiles with no errors nor warnings

can someone help me please? thanks a lot in advance! :D

C / C++ /C# / [C++/C#] OpenGL 1.1 example
« on: December 31, 2017 »
Hii! :D i am into making my first intro, i hopefully be able to pull it in less than 20 days to submit it on a compo :) BUT if not, i'll still keep with this for fun

thing is that i want to use only this old opengl to support all graphic cards and even really old OS, mostly to just have everything in one exe and no extra dlls on folder aka some glxx.dll to run it

i have seek on all threads on this forum section to see find something helpful BUT mostly i find ones where they said they attached an example BUT i can't see any attachment on posts for some reason :C i posted screencaps of what i see here:

so i am stuck in two things:
i want to do a Sine Scroller what would be an intro without it? = p using the old opengl on any C++/C# BUT can't find any example that teach me how

the other thing is that alright, i can pop a geometric figure on screen BUT i can't find an example on how to sequence animations (how do i trigger that my opengl rendered say, triangle; moves to the right after 5 seconds and when that animation ends, it triggers another triangle spawning in the place the other one was before?)

have done those kind of animations on javascript before, so i am familiarized with that approach

i am using Code::Blocks, and it allows me to create a ready to use template for OpenGL instantly! :D this is what it start with:

i have messed around a bit with it so i feel comfortable with what i see there = p

on another note, i seeked for an old OpenGL documentation in the official site and they only hands the one for OpenGL 4.5 :C my idea is to stick with OpenGL 1.1 as much as possible for compatbility and no extra dlls on folder/installs = p so i found and have stick to these documentations for OpenGL 1.1, i have had a good read so far :)

any kind of help is really appreciated! =' D

General chat / Hii!
« on: December 27, 2017 »
Hello, DBF community! x3 i am new here, got to know you after i stumbled on a C++ help thread about sine scrollers :)

My favorite programming languages are C++ and C# for now plan to get the grasp of plain C as well :D

as for me, I am raw vegan so all i eat is raw and fruit vegetables; i like module music, specially amiga mods :) and try hard to get better at composing those, without very noticeable improvement so far = p

look forward to meet you all! you seems to be a really cool community!~ :D

Pages: [1]