Register | Login | |||||
Main
| Memberlist
| Active users
| ACS
| Commons
| Calendar
| Online users Ranks | FAQ | Color Chart | Photo album | IRC Chat |
| |
Acmlm's Board - I2 Archive - - Posts by Ramsus |
Pages: 1 2 3 4 5 6 7 8 9 |
User | Post | ||
Ramsus Octoballoon Level: 19 Posts: 141/162 EXP: 34651 For next: 1126 Since: 01-24-05 From: United States Since last post: 39 days Last activity: 71 days |
| ||
<input type="text" onchange="if (parseInt(this.value) == 12345) this.value='';"> and for strings: <input type="text" onchange="if (this.value.match(/^\s*(12345)\s*/)) this.value='';"> (edited by Ramsus on 07-16-05 05:20 PM) (edited by Ramsus on 07-16-05 05:39 PM) |
|||
Ramsus Octoballoon Level: 19 Posts: 142/162 EXP: 34651 For next: 1126 Since: 01-24-05 From: United States Since last post: 39 days Last activity: 71 days |
| ||
Originally posted by BGNG 1. Change this.value to a reference to the value of the field you want to check and call it when you want the value checked. It's not brain surgery, and anyone who knows Javascript can do it in 10 seconds with a decent DOM reference. <script type="text/javascript" language="javascript"> <!-- function checkInput(form) { if (form.exampleInput.value.match(/^\s*(12345)\s*/$)) form.exampleInput.value = ''; return false; } // --> </script> <form onsubmit="return checkInput(this);" action="" method="GET"> <input type="text" name="exampleInput"> <input type="submit"> </form> From the original post though, it sounded as though he wanted to check the input after the user changed it, not after pushing a button. 2. Did you even look at the second example? <input type="text" onchange="if (this.value.match(/^\s*(zyxwv)\s*/$)) this.value='';"> Javascript has had regular expressions for a long time. Works in Mozilla, Safari, and IE mac, and is well documented as working in IE4 by MSDN. EDIT: As a form with a button: <script type="text/javascript" language="javascript"> <!-- function checkInput(form) { if (form.exampleInput.value.match(/^\s*(zyxwv)\s*/$)) form.exampleInput.value = ''; return false; } // --> </script> <form onsubmit="return checkInput(this);" action="" method="GET"> <input type="text" name="exampleInput"> <input type="submit"> </form> This also has the added benefit of simply running checkInput() on the form if the user hits enter. If you want to actually submit the form, change checkInput so it returns true. It'll check the input with checkInput, and then submit the form. (edited by Ramsus on 07-16-05 11:18 PM) (edited by Ramsus on 07-16-05 11:33 PM) |
|||
Ramsus Octoballoon Level: 19 Posts: 143/162 EXP: 34651 For next: 1126 Since: 01-24-05 From: United States Since last post: 39 days Last activity: 71 days |
| ||
Originally posted by HyperHacker Nope. You've only installed an assembler/linker, a compiler, and a standard C library, all designed to be portable. These things should just work out of the box: optimized memory copying/clearing functions (written in assembly), most string and math functions, qsort, etc. You'll have to mess with the linker script and crt0.o object image to get things like malloc/free working and to supply some functions for newlib stubs (like _write_r, so you can use newlib's printf, but then you need the newlib documentation for details). You might also consider rolling your own custom allocator instead of using malloc/free. One really nice thing about everyone using GCC and newlib is that there are already custom linker scripts and crt0.s files out there you can just download, assemble, and use -- assuming your setup doesn't have one already. That'll make it so a lot of things work properly on a GBA. You can also write your own versions of whatever functions you might need and link without any standard libraries (-nostdlib to give it a try, use start instead of main as the entry point). If you do this, your code should only have includes for your own headers and use functions in your sources, but it'll be a lot smaller. EDIT: Here's a list of the headers you should have available: _ansi.h _syslist.h alloca.h ar.h argz.h assert.h ctype.h dirent.h envz.h errno.h fastmath.h fcntl.h grp.h iconv.h ieeefp.h langinfo.h libgen.h limits.h locale.h machine/_types.h machine/ansi.h machine/endian.h machine/fastmath.h machine/ieeefp.h machine/malloc.h machine/param.h machine/setjmp-dj.h machine/setjmp.h machine/stdlib.h machine/termios.h machine/time.h machine/types.h malloc.h math.h newlib.h paths.h process.h pthread.h pwd.h reent.h regdef.h search.h setjmp.h signal.h stdio.h stdlib.h string.h sys/_types.h sys/cdefs.h sys/config.h sys/dirent.h sys/errno.h sys/fcntl.h sys/features.h sys/file.h sys/iconvnls.h sys/lock.h sys/param.h sys/queue.h sys/reent.h sys/resource.h sys/sched.h sys/signal.h sys/stat.h sys/stdio.h sys/string.h sys/syslimits.h sys/time.h sys/timeb.h sys/times.h sys/types.h sys/unistd.h sys/utime.h sys/wait.h termios.h time.h unctrl.h unistd.h utime.h utmp.h wchar.h wctype.h (edited by Ramsus on 07-17-05 04:24 PM) |
|||
Ramsus Octoballoon Level: 19 Posts: 144/162 EXP: 34651 For next: 1126 Since: 01-24-05 From: United States Since last post: 39 days Last activity: 71 days |
| ||
Not quite. Delete the crt0.o files (or move them into a backup folder), then assemble crt0.s (as -o crt0.o crt0.s). Then in your projects, put crt0.o and lnkscript in the same folder and run gcc -T lnkscript to link stuff. You'll also need to use AgbMain instead of main. | |||
Ramsus Octoballoon Level: 19 Posts: 145/162 EXP: 34651 For next: 1126 Since: 01-24-05 From: United States Since last post: 39 days Last activity: 71 days |
| ||
If lnkscript is already there, then it was probably set up for you. If gcc wants you to use AgbMain, then that's the case and you can forget about setting it up yourself. Otherwise, you'd want to remove these: F:\DOS\gbadev\arm-agb-elf\lib\crt0.o F:\DOS\gbadev\arm-agb-elf\lib\interwork\crt0.o F:\DOS\gbadev\arm-agb-elf\lib\thumb\crt0.o F:\DOS\gbadev\arm-agb-elf\lib\thumb\interwork\crt0.o And put the crt0.o file that you assembled from crtls and the lnkscript file that comes with it in the same folder as the sources you want to compile. Then use gcc -T lnkscript -o whatever.elf main.o graphics.o input.o etc.o and objcopy -O binary whatever.elf whatever.gba |
|||
Ramsus Octoballoon Level: 19 Posts: 146/162 EXP: 34651 For next: 1126 Since: 01-24-05 From: United States Since last post: 39 days Last activity: 71 days |
| ||
Yeah, I think the guy who maintains it went on a trip or something. Anyway, certain things like printf won't work without a lot of additional code porting more newlib features, but with crtls, malloc and sprintf should work just fine. Now you just need to write a few letter drawing routines and you can write your own version of printf (also look up varargs if you aren't familiar with them). There's a GBA library called SGADE here: http://www.suddenpresence.com/sgade/ You can make use of it with the newlib C library (now that you know the important parts work), but it doesn't require one. |
|||
Ramsus Octoballoon Level: 19 Posts: 147/162 EXP: 34651 For next: 1126 Since: 01-24-05 From: United States Since last post: 39 days Last activity: 71 days |
| ||
Paths are definitely the best way to get clean, consistent lineart. The only two other ways I can think of that would be practical are inking with a tablet or using a good ink pen with some high quality paper and then scanning it. Using a brush tool with a mouse is too time-consuming and bad for the wrists. Some tips with the pen tool (using Paths): * If you want to quickly move a node in Photoshop, hold Ctrl (or Cmd on a Mac) and drag the node around. To adjust the curve, hold Alt and drag out the handles from the node. * Photoshop and The GIMP 2.x let you stroke paths, so you don't have to make a selection. Look at the tool options in The GIMP when using the path tool. The GIMP 1.2 places the stroke path option as an unlabeled button in the Paths dialog (click the Paths tab next to Layers). * To adjust the line quality, set a different brush on the brush tool before you stroke the path with it (and avoid pencil brushes unless you're working at print sizes, they're just too pixelated). * Work with an image at twice the width and height that you want the final result to be. It'll make all of your lines crisper/smoother (and thinner, so take that into account if you want thick lines). * Don't go too light on the shadows and highlights, or you'll get flat looking characters. I tend to make this mistake a lot. The path/pen tools (and the polygonal lasso tool in Photoshop) are great for creating selections to fill with shadows and highlights. You can also use the gradient tool to blend highlights or shadows. If you're short on RAM, do the lineart at a large size, but with the color mode for the image set to grayscale, then scale the image down to a smaller size and switch it to RGB mode when you want to add colors. You'll reduce your memory usage by about two thirds, and still get high quality lineart. |
|||
Ramsus Octoballoon Level: 19 Posts: 148/162 EXP: 34651 For next: 1126 Since: 01-24-05 From: United States Since last post: 39 days Last activity: 71 days |
| ||
You could use Javascript to do it, but don't. Flash and Java are even worse. Scrolling content distracts from the focus of the page. If your page has no focus, rethink the design. |
|||
Ramsus Octoballoon Level: 19 Posts: 149/162 EXP: 34651 For next: 1126 Since: 01-24-05 From: United States Since last post: 39 days Last activity: 71 days |
| ||
Generally speaking, you probably won't use the things that don't work. If in doubt, write a program to test it out or don't use it. Some things that won't work: pipes, sockets, files, stream-based I/O, threads, processes Some things that should work: string and memory functions, math Some things that might not work, or might work slowly: Floating point math functions You might consider writing your own memory copying/blitting functions that use GBA-specific code (DMA and what not), as well as your own memory allocator (maybe something stack-based? Also check out the alloca function. Nonstandard but very common.). |
|||
Ramsus Octoballoon Level: 19 Posts: 150/162 EXP: 34651 For next: 1126 Since: 01-24-05 From: United States Since last post: 39 days Last activity: 71 days |
| ||
Originally posted by Narf (edited by Ramsus on 07-22-05 08:25 PM) |
|||
Ramsus Octoballoon Level: 19 Posts: 151/162 EXP: 34651 For next: 1126 Since: 01-24-05 From: United States Since last post: 39 days Last activity: 71 days |
| ||
The string header includes a getline template function that takes an istream reference and a string class reference. So: using namespace std; /* ... */ string mystring; getline(cin, mystring); cout << mystring << endl; Takes one line from input, puts it in mystring, then outputs it. |
|||
Ramsus Octoballoon Level: 19 Posts: 152/162 EXP: 34651 For next: 1126 Since: 01-24-05 From: United States Since last post: 39 days Last activity: 71 days |
| ||
Originally posted by beneficiiOriginally posted by sloat Technically, I'd consider that spelling it out. For the record though, I pronounce it gooey. (edited by Ramsus on 07-24-05 05:21 PM) |
|||
Ramsus Octoballoon Level: 19 Posts: 153/162 EXP: 34651 For next: 1126 Since: 01-24-05 From: United States Since last post: 39 days Last activity: 71 days |
| ||
When used as a pointer value in C, the constant 0 is always considered NULL according to the language's standard, not the actual memory address 0. In fact, the system can use any value it wants to represent a NULL pointer and the constant 0 will always be equivalent to it in any pointer context (e.g. assignment to a pointer variable). If you're doing system-specific C code and store pointer addresses in something not a pointer, like an integer, you'll need to typecast 0 as (void *) in order to store an actual NULL value. |
|||
Ramsus Octoballoon Level: 19 Posts: 154/162 EXP: 34651 For next: 1126 Since: 01-24-05 From: United States Since last post: 39 days Last activity: 71 days |
| ||
I'm having something of a dry spell at the moment when it comes to comic strip ideas, so I've been focusing on photography. However, I'm going to try easing into doing black and white comics on a regular basis. After all, every moment I spend not drawing is a moment in which my ability to draw doesn't improve. So here we go: The script lacks punch and is way too cliché. The backgrounds are incomplete. It could also use a few more panels of squirrel force action leading up to the big line to clear up what's happening, especially in the first squirrel panel. The last panel also has a bit too much white space. At the very least, I could've added speedlines. More to come. |
|||
Ramsus Octoballoon Level: 19 Posts: 155/162 EXP: 34651 For next: 1126 Since: 01-24-05 From: United States Since last post: 39 days Last activity: 71 days |
| ||
Thanks. I'm going to go for quantity though, and I don't have time for coloring them. That means these are going to be the final drafts, although the better the idea, the more drafts I'll probably do of it. EDIT: another comic, Feral Cat I rehashed idea from an editorial cartoon I did in March, but it ended up too much like an Azumanga Daioh kitty gag. (edited by Ramsus on 08-19-05 07:29 PM) |
|||
Ramsus Octoballoon Level: 19 Posts: 156/162 EXP: 34651 For next: 1126 Since: 01-24-05 From: United States Since last post: 39 days Last activity: 71 days |
| ||
In that case, the HTTP request to siteone.com/foo.php should just include the cookie from the same domain (siteone.com), since all files are all separate HTTP requests to begin with, even if they're images included in the HTML. |
|||
Ramsus Octoballoon Level: 19 Posts: 157/162 EXP: 34651 For next: 1126 Since: 01-24-05 From: United States Since last post: 39 days Last activity: 71 days |
| ||
So what's your layout supposed to look like? In other words, what are you trying to accomplish? I'd look at it myself, but I don't have a PC. My guess, since you're using relative positioning with percentages, is that you're using the wrong tool for the job. |
|||
Ramsus Octoballoon Level: 19 Posts: 158/162 EXP: 34651 For next: 1126 Since: 01-24-05 From: United States Since last post: 39 days Last activity: 71 days |
| ||
Originally posted by Cardinal Fang You don't work your way out of writer's block by just sitting around until your head starts bleeding and you die. You also can't figure out what works and what doesn't if you don't try a lot of things, even with the jokes. Besides, the magic difference between what you see here and what you see with great comics is that the ideas for great comics came from pools of less great ideas that were edited down until the best idea remained. So never, EVER, give that advice again to anyone who's just exploring ideas and working on art skills (aka PRACTICING). It's counterproductive. |
|||
Ramsus Octoballoon Level: 19 Posts: 159/162 EXP: 34651 For next: 1126 Since: 01-24-05 From: United States Since last post: 39 days Last activity: 71 days |
| ||
Originally posted by Peardian Yeah, I looked at it again ten minutes after finishing it and asked myself the same question. I think it works better for jokes like that if you just skip the action, meaning the last panel should really be just a scratched up guy looking shocked with no cat in sight. |
|||
Ramsus Octoballoon Level: 19 Posts: 160/162 EXP: 34651 For next: 1126 Since: 01-24-05 From: United States Since last post: 39 days Last activity: 71 days |
| ||
Originally posted by Teddylot Nice, but next time use bulleted lists and separate your major points more. With that much information, it'd be a lot easier to digest. |
Pages: 1 2 3 4 5 6 7 8 9 |
Acmlm's Board - I2 Archive - - Posts by Ramsus |