Register | Login
Views: 19364387
Main | Memberlist | Active users | ACS | Commons | Calendar | Online users
Ranks | FAQ | Color Chart | Photo album | IRC Chat
11-02-05 12:59 PM
Acmlm's Board - I2 Archive - - Posts by HyperLamer
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409
User Post
HyperLamer
<||bass> and this was the soloution i thought of that was guarinteed to piss off the greatest amount of people

Sesshomaru
Tamaranian

Level: 118

Posts: 4281/8210
EXP: 18171887
For next: 211027

Since: 03-15-04
From: Canada, w00t!
LOL FAD

Since last post: 2 hours
Last activity: 2 hours
Posted on 04-25-05 02:38 AM, in Rather strange batch file problem Link
Some of these I would like to be able to run in pure DOS (not possible with all of them, but yeah). As for the batch file problem, apparently I didn't fix it after all. XP's command line seems to be doing this really strange and stupid thing with my parameters. Observe:

program.exe *.cow - Arguments are '*.cow' assuming there are no .cow files nearby.

program.exe *.exe - Arguments are 'program1.exe program2.exe program3.exe' etc, listing whatever files match the given pattern. I need to see the pattern itself, not a list of files. (I got findfirst() to work though, and might I say that thing REALLY needs a way to filter by attributes. )

Also, I'm wondering how possible it is to do various things with console windows, such as:

-Open one console window and have several different programs output to it (specially designed to do so).
-Have a program spawn console windows and output to them; prefferably being able to create a few different ones and show different things in them simultaneously.

It'd really help with some of the bigger projects that don't have real GUIs yet.
HyperLamer
<||bass> and this was the soloution i thought of that was guarinteed to piss off the greatest amount of people

Sesshomaru
Tamaranian

Level: 118

Posts: 4282/8210
EXP: 18171887
For next: 211027

Since: 03-15-04
From: Canada, w00t!
LOL FAD

Since last post: 2 hours
Last activity: 2 hours
Posted on 04-26-05 04:02 AM, in I need a resource editor! Link
For me it takes... Oh right, it doesn't, because it's 2GB and only contains one component I'd ever want to use.

Seriously, getting a bit off topic?
HyperLamer
<||bass> and this was the soloution i thought of that was guarinteed to piss off the greatest amount of people

Sesshomaru
Tamaranian

Level: 118

Posts: 4283/8210
EXP: 18171887
For next: 211027

Since: 03-15-04
From: Canada, w00t!
LOL FAD

Since last post: 2 hours
Last activity: 2 hours
Posted on 04-26-05 04:07 AM, in Computers you've seen owned Link
I'm sure by "destroyed" they meant "put popups on the desktop they couldn't figure out how to remove".
(restricted)
HyperLamer
<||bass> and this was the soloution i thought of that was guarinteed to piss off the greatest amount of people

Sesshomaru
Tamaranian

Level: 118

Posts: 4285/8210
EXP: 18171887
For next: 211027

Since: 03-15-04
From: Canada, w00t!
LOL FAD

Since last post: 2 hours
Last activity: 2 hours
Posted on 04-26-05 08:16 AM, in A few C/++ Questions Link
Well let's see, where to start here...

1) What I do is edit my makefile (a batch file) to have windres compile them before the program. Then I'm pretty sure you just include them in the call to gcc, like "gcc -o program.c resource.o" or something like that.

2) DialogBox() is one, I think another was something like CreateDialog()... MSDN has tons of info on this (and no, you don't need a license of, or even to be running, any Microsoft product to view it ). The biggest thing to keep in mind is that controls are treated just like windows, which can be confusing at times. (Also, there's MessageBox() for a pre-made, generic message box.)

3) Depends what kind and how you're using them. printf("%d",Var) prints a numeric variable. printf("%s",Str) prints a string. printf("%c",Var) prints a character (which can be a number, for example 31 prints an exclamation point). You can format them too: %3d = " 42", %03d = "042", and even hex: %x = "2a", %X = "2A", %03X = "02A" and so on.
Outside of printf() it's pretty simple.
Var = Var + 2; //Self-explanatory
Var += 2; //Same as above
Var++; //Same as 'Var = Var + 1', and yes, you can do -= and -- too
&Var; //Pointer to Var (This would be int*, not int, or whatever type it is)

4) MSDN, unlike most things Microsoft (), isn't all that bad. If you just use the search instead of trying to navigate manually, you should be alright. Besides that, typing a function's name (with or without brackets) usually yeilds good results, but you might need to add 'c' or 'c++' to the query.
HyperLamer
<||bass> and this was the soloution i thought of that was guarinteed to piss off the greatest amount of people

Sesshomaru
Tamaranian

Level: 118

Posts: 4286/8210
EXP: 18171887
For next: 211027

Since: 03-15-04
From: Canada, w00t!
LOL FAD

Since last post: 2 hours
Last activity: 2 hours
Posted on 04-26-05 08:25 AM, in I need a resource editor! Link
Thanks, I'll try that next time I get work on a project that needs a GUI.

As long as we're discussing C, is this possible?

const char x[] = "Text: ";
char y[];

[...]

y = "Hey, it's text";
printf(x);

What I want is to NOT have a null terminator at the end of x, so that it flows right into y, and the above would print "Text: Hey, it's text". Any way to do that?

Also, how can I make a function with a variable number of arguments like printf()? (Actually, I'm just making something like printf() but with one extra argument, in case that helps. )
HyperLamer
<||bass> and this was the soloution i thought of that was guarinteed to piss off the greatest amount of people

Sesshomaru
Tamaranian

Level: 118

Posts: 4287/8210
EXP: 18171887
For next: 211027

Since: 03-15-04
From: Canada, w00t!
LOL FAD

Since last post: 2 hours
Last activity: 2 hours
Posted on 04-26-05 09:26 AM, in I need a resource editor! Link
[edit] Ok... The problem just kinda disappeared when I fixed a missing bracket in another function in a completely different file. [/edit]

Ooh, here's another, very interesting one:

BYTE ReadMemory(int Addr, int AccessType)
{
if(Addr < 0x4000) //Non-banked ROM
return(ROM[0][Addr]);

if(Addr < 0x8000) //Banked ROM
return(ROM[ROMBank][Addr - 0x4000]);
[...]
}


The first if statement is fine, but when it gets to the second one, suddenly Addr is undeclared and the function returns void (warns me about returning a value in a function that doesn't).

As for the null-less string thing, it looks like it worked (no errors) but I can't very well tell with this problem.


(edited by R2H2 on 04-25-05 04:29 PM)
HyperLamer
<||bass> and this was the soloution i thought of that was guarinteed to piss off the greatest amount of people

Sesshomaru
Tamaranian

Level: 118

Posts: 4288/8210
EXP: 18171887
For next: 211027

Since: 03-15-04
From: Canada, w00t!
LOL FAD

Since last post: 2 hours
Last activity: 2 hours
Posted on 04-27-05 05:39 AM, in Super Duper Mario World! [Demo, Screenshots] Link
Nice page tite but you need to change the image tags. You want Title, not Alt; IE showing the Alt text is just Microsoft stupidity.
HyperLamer
<||bass> and this was the soloution i thought of that was guarinteed to piss off the greatest amount of people

Sesshomaru
Tamaranian

Level: 118

Posts: 4289/8210
EXP: 18171887
For next: 211027

Since: 03-15-04
From: Canada, w00t!
LOL FAD

Since last post: 2 hours
Last activity: 2 hours
Posted on 04-27-05 06:07 AM, in Should I scrap the shyguy idea for a Mario recoloring edit? Link
Shy Guys > Mario.
(restricted)
HyperLamer
<||bass> and this was the soloution i thought of that was guarinteed to piss off the greatest amount of people

Sesshomaru
Tamaranian

Level: 118

Posts: 4291/8210
EXP: 18171887
For next: 211027

Since: 03-15-04
From: Canada, w00t!
LOL FAD

Since last post: 2 hours
Last activity: 2 hours
Posted on 04-28-05 08:57 AM, in I need a resource editor! Link
Hah, I should have thought of that. And yes, it is global.

Any idea why DIB sections might draw wrong? Say I write 0xFFFFFF into the bitmap; rather than drawing one white pixel it draws one red, one green and one blue! I'll post more info later; I need to go and can't get into my FTP anyway.
HyperLamer
<||bass> and this was the soloution i thought of that was guarinteed to piss off the greatest amount of people

Sesshomaru
Tamaranian

Level: 118

Posts: 4292/8210
EXP: 18171887
For next: 211027

Since: 03-15-04
From: Canada, w00t!
LOL FAD

Since last post: 2 hours
Last activity: 2 hours
Posted on 04-28-05 10:18 AM, in I need a resource editor! Link
It's 24. Here's what I was doing, it's a bit messy at the moment though:

BYTE GFX0[2][0x1800]; //8000 - 97FF Tiles
BYTE GFX1[2][0x800]; // 9800 - 9FFF Tilemap
unsigned int GFXBank = 0; //Tiles (GBC only)
HDC MainDC = 0; HBITMAP MainBMP = 0; HANDLE OldMainBMP = 0; //Main
int* MainBMPData = 0; //Pointer to tile bitmap data
HDC VideoWindowDC = 0; //Video window
BITMAPINFO BMPInfo;

[...]
void InitGFX()
{

BMPInfo.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
BMPInfo.bmiHeader.biWidth = 256;
BMPInfo.bmiHeader.biHeight = -256;
BMPInfo.bmiHeader.biPlanes = 1;
BMPInfo.bmiHeader.biBitCount = 24;
BMPInfo.bmiHeader.biCompression = BI_RGB;
BMPInfo.bmiHeader.biSizeImage = 0x30000;
BMPInfo.bmiHeader.biClrUsed = 0;
BMPInfo.bmiHeader.biClrImportant = 0;
memset(BMPInfo.bmiColors,0,sizeof(BMPInfo.bmiColors));

MainDC = CreateCompatibleDC(GetDC(0));
MainBMP = CreateDIBSection(MainDC,&BMPInfo,DIB_RGB_COLORS,(void*)&MainBMPData,NULL,0);
OldMainBMP = SelectObject(MainDC,(HGDIOBJ)MainBMP);
[...]
}

void DrawScanLine(int Line)
{
int p, t, a, b1, b2;
int Addr = 0;
GdiFlush();
for(i=0;i<160;i++)
{
//Get the tile number we're drawing
Addr = (i >> 3) | ((Line >> 3) * 32);
t = GFX1[0][Addr];
Addr = 0;

//Get the address of the tile's data and current scanline
a = (t << 4) + ((Line & 7) << 1);

//Get the pixel from the line
b1 = (GFX0[GFXBank][a] >> (7 - (i & 7))) & 1;
b2 = (GFX0[GFXBank][a + 1] >> (7 - (i & 7))) & 1;
p = (b1 << 1) | b2;

/*if(p == 1) printf("
HyperLamer
<||bass> and this was the soloution i thought of that was guarinteed to piss off the greatest amount of people

Sesshomaru
Tamaranian

Level: 118

Posts: 4293/8210
EXP: 18171887
For next: 211027

Since: 03-15-04
From: Canada, w00t!
LOL FAD

Since last post: 2 hours
Last activity: 2 hours
Posted on 04-28-05 07:40 PM, in I need a resource editor! Link
I'm not sure about 8-bit; as you can maybe tell it's a Gameboy emulator, and GBC uses 15-bit colours. I figure I'll need at least 16 (though I could get away with 8 in non-colour mode). Will I need to define a palette for those though, or do they have a default one?

Good point about the desktop colour matching too; I'll probably end up writing something to match the current colour settings. And thanks for pointing out the pointer (no pun intended). I keep forgetting that int pointers increment by the size of an int.

[edit] Er, what exactly does the 4th byte do in 32-bit colour? Depending what I set it to in each colour, different colours will show up or not, and no matter what combination I use everything shows up blue.


(edited by R2H2 on 04-28-05 06:12 AM)
HyperLamer
<||bass> and this was the soloution i thought of that was guarinteed to piss off the greatest amount of people

Sesshomaru
Tamaranian

Level: 118

Posts: 4294/8210
EXP: 18171887
For next: 211027

Since: 03-15-04
From: Canada, w00t!
LOL FAD

Since last post: 2 hours
Last activity: 2 hours
Posted on 04-29-05 04:18 AM, in I need a resource editor! Link
Ah, found it... Another pointer problem. I had changed MainBMPData to a byte pointer for the 24-bit colour and forgot to change it back.
HyperLamer
<||bass> and this was the soloution i thought of that was guarinteed to piss off the greatest amount of people

Sesshomaru
Tamaranian

Level: 118

Posts: 4295/8210
EXP: 18171887
For next: 211027

Since: 03-15-04
From: Canada, w00t!
LOL FAD

Since last post: 2 hours
Last activity: 2 hours
Posted on 04-29-05 10:14 AM, in Can't stay in standby mode Link
My computer seems to be having trouble staying in Standby mode. I activate it, the hard drives shut down, the screen goes blank, and then a second later it starts up again. This happened yesterday and I finally got it to work by not allowing the mouse to bring it out of standby mode; this let it stay but interestingly enough moving the mouse would still bring it back up. Today that's not even working... I tried enabling it for the mouse and disabling it for the keyboard instead, and that seemed to work (only tested it once) but nothing except the power button will bring it back up. Nothing else is set to be able to do it... What could be doing it?

[Generic computer info crap]
OS=WINDOWS_XP
SERVICE_PACK=NONE
RAM=192MB
CPU=800MHZ CELERON
VIDEO=4MB ONBOARD
CRAP=TRUE
[End generic computer info crap]
(restricted)
HyperLamer
<||bass> and this was the soloution i thought of that was guarinteed to piss off the greatest amount of people

Sesshomaru
Tamaranian

Level: 118

Posts: 4297/8210
EXP: 18171887
For next: 211027

Since: 03-15-04
From: Canada, w00t!
LOL FAD

Since last post: 2 hours
Last activity: 2 hours
Posted on 04-29-05 11:45 PM, in I need a resource editor! Link
Well I'm getting around 400% speeds, and I think even NO$GMB uses GDI. I will check that out though. Do you need to have some special program installed for that like with DirectX though?

I suppose 8-bit could work if I dump the palettes into it whenever they're changed.

[edit] Also how can I get the size of the window borders and title bar? CreateWindowEx() seems to be including them in the window's size, so my actual drawing area is too small.

Bah, more fun bugs. I'm writing the colours 183C4A, 397D9C, 5AB6DE and 8CEBFF. It's drawing the colours 394900, 7B9E00, B5DF00 and EFFF00. It works fine if I use 000000, 404040, 808080 and C0C0C0.


(edited by R2H2 on 04-29-05 06:48 AM)
(edited by R2H2 on 04-29-05 12:51 PM)
(edited by R2H2 on 04-29-05 05:07 PM)
HyperLamer
<||bass> and this was the soloution i thought of that was guarinteed to piss off the greatest amount of people

Sesshomaru
Tamaranian

Level: 118

Posts: 4298/8210
EXP: 18171887
For next: 211027

Since: 03-15-04
From: Canada, w00t!
LOL FAD

Since last post: 2 hours
Last activity: 2 hours
Posted on 04-30-05 05:16 AM, in Program crashing when trying to open file... Link
I think the working directory would be MinGW's \bin directory (where the compiled EXE gets placed). That's where it is for me but I can't remember if I maybe changed some setting or hacked something up to make it that way.
HyperLamer
<||bass> and this was the soloution i thought of that was guarinteed to piss off the greatest amount of people

Sesshomaru
Tamaranian

Level: 118

Posts: 4299/8210
EXP: 18171887
For next: 211027

Since: 03-15-04
From: Canada, w00t!
LOL FAD

Since last post: 2 hours
Last activity: 2 hours
Posted on 04-30-05 05:18 AM, in A few C/++ Questions Link
Er yeah, I did mean the MSDN library, but I usually just go to msdn.microsoft.com and type whatever function I'm looking for in the search box. If it exists it'll be the first or second result.
HyperLamer
<||bass> and this was the soloution i thought of that was guarinteed to piss off the greatest amount of people

Sesshomaru
Tamaranian

Level: 118

Posts: 4300/8210
EXP: 18171887
For next: 211027

Since: 03-15-04
From: Canada, w00t!
LOL FAD

Since last post: 2 hours
Last activity: 2 hours
Posted on 04-30-05 12:54 PM, in Can't stay in standby mode Link
It uses less power.

It can't be any of those except maybe #3. Keyboard and mouse are both disallowed (and weren't being touched, though they could be defective), as well as the network, and the modem (if there's even still one in there) isn't plugged in. There is the slight possibility that it is the network though. Considering how the mouse was still able to turn it back on when I disabled that...

FreeDOS: Sure. As soon as they make a version my computer can boot up with.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409
Acmlm's Board - I2 Archive - - Posts by HyperLamer


ABII


AcmlmBoard vl.ol (11-01-05)
© 2000-2005 Acmlm, Emuz, et al



Page rendered in 0.034 seconds.